[Click] ToHost userlevel
Bayani Carbone
b.carbone at cs.ucl.ac.uk
Tue Jun 10 15:22:40 EDT 2008
Hello, I'm trying to use ToHost with userlevel click to send packets to
normal Linux processing but I can't get it to work.
I'm testing, using a client-server program. The client connects to the
server using a tcp socket and provides an IP address and port number.
What I do is, I make the client connect to the server using a random
destination port number. On the server side, click intercepts the
packet, re-writes the destination IP address/port number (IPRewriter) to
the ones expected by the server program then sends it to the server
application using ToHost.
Unfortunately, the server program does not seem to receive any packets.
I used IPPrint to check that the re-write is indeed working correctly
(which it is).
First of all, is it possible to do what I described using ToHost?
Second, if anyone has an example configuration file using ToHost in
userlevel click, that would be really helpful.
I attached my configuration file.
ps: I don't quite understand the whole fake0 dev_name thing, so any
pointers for this are also welcome.
Thanks,
Bayani Carbone
University College London
========================
Configuration:
--------------
th::ToHost(fake0);
tap0 :: FromHost(fake0)
-> fh_cl :: Classifier(12/0806)
-> ARPResponder(0/0 1:1:1:1:1:1)
-> th;
c0 :: Classifier(12/0800 23/8A,
-);
FromDevice(eth1)-> c0;
rw::IPRewriter(pattern - - 192.168.1.4 5001 0 1);
c0[0] -> CheckIPHeader(14)
-> rw[0]
-> IPPrint
-> th;
rw[1] -> Discard;
c0[1] -> Discard;
More information about the click
mailing list