[Click] trying to use IPRewriter

kaushik saikia kaushik at india.hp.com
Thu Jul 8 17:07:15 EDT 2004


Hello,
 
I am a novice in using click. I have dowloaded click and trying use it 
user mode.
   
My basic intension is to redirect a packet which has come to one 
particular host to another host.(something similar to a proxy server).
 
For this purpose, I have picked up a very simple example from the 
example programs which comes along with click package.
 
the program goes like this..
 
Idle
  -> kt :: KernelTap(1.0.0.1/8)
  -> cl :: Classifier(12/0800 30/01010101 23/11,    // IP/UDP to fake 
address
                      12/0800 23/11 36/0035,  // IP/udp/dns
                      -);
 
rw :: IPRewriter(pattern 1.1.1.1 1024-65535 1.0.0.1 - 0 1);
 
// From proxy program.
cl[0] -> Strip(14) -> CheckIPHeader -> rw;
 
// From requesting host.
cl[1] -> Strip(14) -> CheckIPHeader -> rw;
 
// To DNS proxy.
rw[0] -> EtherEncap(0x0800, 0:0:0:0:0:0, 0:0:0:0:0:0) -> kt;
 
// Return from DNS proxy to requesting host.
rw[1] -> EtherEncap(0x0800, 0:0:0:0:0:0, 0:0:0:0:0:0) -> kt;
 
cl[2] -> Print(other) -> Discard;
 
I think i can use this program to fulfill my requirement. But 
unfortunately i am not fully able to understand this program. If 
someone can explain this program, I will be really grateful and then i 
can make necessary changes to meet my requrement.
 
thanks in advance,
-Kaushik.
 
 



More information about the click mailing list