[Click] How do I do this?

Adam M click at irotas.net
Wed Aug 1 19:31:09 EDT 2007


Hi Beyers,

Ah, both excellent ideas. I really need to get more familiar with the
available Elements!

>From my naive perspective, it seems that both approaches you mention are
functionally equivalent. Is there a more subtle difference between them
that would lead me to choose one over the other?

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