[Click] Building a packet reflector in click
david johnson
david.lloyd.johnson at gmail.com
Tue Aug 25 15:57:27 EDT 2009
Hi
I presented a course on click today - used a lot of material from
University of Antwerp - thanks Bart and Michael. I thought up some
tutorials for them to practice their concepts and I thought building a
packet reflector would be easy - until I tried to solve it
I tried something like this:
define($DEV ath0)
FromDevice($DEV)
-> c :: Classifier(12/0800, 12/0806 20/0002)
-> CheckIPHeader(14)
-> IPMirror
-> StripToNetworkHeader
-> Print ("Before ARP",200)
-> arpq :: ARPQuerier($DEV)
-> Print ("After ARP",200)
-> IPPrint
-> q :: Queue
-> ToDevice($DEV)
arpq[1] -> q;
c[1] -> [1] arpq;
But it doesn't work - the IP address swapping is working - but it never
gets to the Print("After ARP",200) statement.
Is this a hard problem or is their a simple solution that I'm missing
I'm trying to think out a set of click exercises that get progressively
harder for the students to do. Firstly without writing their own
elements and then with including writing their own elements - any ideas
will be most welcome. This would probably be a nice addition to the
documentation - exercises like these and their solutions.
Regards
David
More information about the click
mailing list