Hi Bayani,
I would use the KernelTun element instead of ToHost. I have something similar
where i am rewriting the IP address and sending the video packets to the VLC
application. KernelTun works perfectly fine for me. just define
tun::KernelTun*1.0.0.1/8);
and use it in place of 'th'(ToHost).
Hope it helps.
Regards,
Tushar
Tºüçhé §übt!é
----- Original Message ----
From: Bayani Carbone <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Sent: Tuesday, June 10, 2008 9:22:40 PM
Subject: [Click] ToHost userlevel
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;
_______________________________________________
click mailing list
[email protected]
https://amsterdam.lcs.mit.edu/mailman/listinfo/click
_______________________________________________
click mailing list
[email protected]
https://amsterdam.lcs.mit.edu/mailman/listinfo/click