You can use FromHost / ToHost. These elements create a new TUN/TAP network interface, on which your server can be listening to. You just need to be careful to set the ip and netmasks correctly (i.e., so that Linux routes traffic to that new interface instead of the real one). You will also need to reply to the ARP requests coming from Linux, and take care of the actual ARP requests/replies from Click (see FromHost documentation).
Best, Julien On Tue, Oct 16, 2012 at 12:31 AM, Christian Kreibich <[email protected]> wrote: > I have a pretty standard Click setup in which a user-space Click running > on Linux realizes a basic router between two interfaces (eth0 and eth1), > grabbing and sending packets via FromDevice and ToDevice. When testing > this setup with a client process located on machine A, a server process > located on machine B, and the machine running Click sitting in between, > everything works as expected. > > For various reasons it would be handy to run the server process and the > Click instance on the same host, with the server listening on loopback. > When I try this, packets appear on lo in tcpdump, but the server process > doesn't see them. I seem to recall that packets sent via ToDevice will > not be processed by the local kernel. Is that in fact the case, and if > so, what's a good way to make this work? Do I need to go the KernelTun > or ToHost route? > > Thanks, > -C. > _______________________________________________ > 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
