[Click] How do I do this?

Adam M click at irotas.net
Thu Aug 2 10:47:44 EDT 2007


Hi Beyers,

I'm experimenting with the Socket approach that you mentioned, but so
far I'm not having much luck. 

I've got a simple configuration running just to make sure I understand
the basic plumbing:
Socket(UDP, 10.41.224.67, 1234, VERBOSE true, CLIENT false) ->
NotifierQueue -> Print -> Discard

I was expecting that UDP packets destined for my local box
(10.41.224.67) on port 1234 would be picked up by Socket and fed
downstream through the NotifierQueue into Print and then dumped by
Discard. However, I generate such packets from a remote box (and
verified with Ethereal that they are indeed arriving on my local box),
but Click doesn't seem to react.

The documentation for Socket is a bit confusing, and unfortunately
there's no example configuration for Socket in the 'conf' directory. I
was hoping that my mistake is egregious enough that you can easily
clarify it for me. :)

Thanks again,
Adam


On Thu, 2 Aug 2007 00:03:14 +0200, "Beyers Cronje" <bcronje at gmail.com>
said:
> HI Adam,
> 
> Why not use IPClassifier element?
> 
> I.e. the following click config file will forward all UDP port 1234
> packets
> to your simulation code element, and your element will output it to
> KernelTun element that delivers it to the tunnel interface:
> 
> FromDevice(eth0) -> Strip(14) -> MarkIPHeader -> IPClassifier(dst udp
> port
> 1234) -> YourSimulationElement -> KernelTun(1.0.0.1/8);
> 
> You might need to enable promiscuous mode in FromDevice if the
> destination
> ethernet address is not eth0's address.
> 
> Alternatively, if you are looking at a true UDP server, you should use
> the
> Socket element i.e.:
> 
> Socket(UDP, 10.1.1.1, 1234) -> YourSimulationElement ->
> KernelTun(1.0.0.1/8
> );
> 
> Beyers


More information about the click mailing list