[Click] Userlevel versus Linuxmodule

Beyers Cronje bcronje at gmail.com
Sat Aug 21 13:20:35 EDT 2010


Hi Italo,

ToHost is available in userlevel Click, see
http://read.cs.ucla.edu/click/elements/tohost.u

On Sat, Aug 21, 2010 at 3:51 PM, Italo Valcy <italo at dcc.ufba.br> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi guys,
>
> Em 20-08-2010 04:51, Beyers Cronje escreveu:
> >
> > By default in userlevel using FromDevice the kernel will also process the
> > packets. However there is a workaround using the following FromDevice
> config
> > parameter:
> >
> > *SNIFFER*Boolean. Specifies whether
> > FromDevice<http://read.cs.ucla.edu/click/elements/fromdevice> should
> > run in sniffer mode. In non-sniffer mode,
> > FromDevice<http://read.cs.ucla.edu/click/elements/fromdevice>
> >  installs KernelFilter
> > <http://read.cs.ucla.edu/click/elements/kernelfilter> filtering
> > rules to block the kernel from handling any packets arriving on device
> > DEVNAME. Default is true (sniffer mode).
> >
> > So setting SNIFFER to false will block the kernel from handling packets
> as
> > well.
>
> Just another question: this workaround seens to use iptables to block
> kernel from handling the packages, but do I have some way to give back
> the package to the ordinary Linux protocol stack? In other words, is
> there any workaround to have the same behavior of ToHost in linuxmode?
>
> I'm asking these questions because I'd like to be able to use
> test-ping.click example [1] in userlevel. Can I do this or should I
> start thinking about to use linuxmode instead of userlevel?
>
> Thanks for any help!
>
>
> Kind Regards, italo.
>
> 1 - test-ping.click example
> - ---------------8<----------------------
> // test-ping.click
>
> // This kernel configuration tests the FromDevice and ToDevice elements
> // by sending pings to host 131.179.80.139 (read.cs.ucla.edu) via 'eth0'.
> // Change the 'define' statement to use another device or address, or run
> // e.g. "click-install test-ping.click DEV=eth1" to change a parameter
> at the
> // command line.
> //
> // You should see, in 'dmesg' or /var/log/messages, a sequence of "icmp
> echo"
> // printouts intermixed with "ping :: ICMPPingSource" receive reports.
>  Also
> // check out the contents of /click/ping/summary.
>
> define($DEV eth0, $DADDR 131.179.80.139, $GW 131.179.33.1)
>
> FromDevice($DEV)
>        -> c :: Classifier(12/0800, 12/0806 20/0002, -)
>        -> CheckIPHeader(14)
>        -> ip :: IPClassifier(icmp echo-reply, -)
>        -> ping :: ICMPPingSource($DEV, $DADDR)
>        -> SetIPAddress($GW)
>        -> arpq :: ARPQuerier($DEV)
>        -> IPPrint
>        -> q :: Queue
>        -> { input -> t :: PullTee -> output; t [1] -> ToHostSniffers($DEV)
> }
>        -> ToDevice($DEV);
> arpq[1] -> q;
> c[1]    -> t :: Tee
>        -> [1] arpq;
> t[1]    -> host :: ToHost;
> c[2]    -> host;
> ip[1]   -> host;
> - ---------------8<----------------------
>
>
> - --
> Saudações,
>
> Italo Valcy :: http://wiki.dcc.ufba.br/~ItaloValcy
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAkxv2dkACgkQfidLqjN6RNHrcwCbBnVp09jRZBVRtMaE+kUdTG95
> KioAnjpq/QONTrCFZepdiOIB9jWBLgiw
> =1IpQ
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click
>


More information about the click mailing list