Azeem, Attached is some dot1q stuff I did with click (in part of a wake on line repeater project) back in 2006.
The Dot1q element basically takes two configuration parameters. One bool to tell it if it is to tag or untag, the other to define the vlan id. All the heavy lifting, and what you're probably looking for, is in the helper files. This also allows the functionality to be used in in other elements. As was the case in the repeater project I did, since I was duplicating packets across vlans on a trunked interface. vlanRx::Dot1q(false, <vlanid>); vlanTx::Dot1q(true, <vlanid>); Hope this helps. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Thomas Paine (pain...@uwec.edu) University of Wisconsin - Eau Claire ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -----Original Message----- From: click-boun...@pdos.csail.mit.edu [mailto:click-boun...@pdos.csail.mit.edu] On Behalf Of Azeem Khan Sent: Saturday, February 28, 2009 3:35 AM To: Click Users Mailing List Subject: [Click] VLAN scripts? Hello everyone, Where can I find some click script examples which assume interfaces are on VLANs. A google search reveals some old email exchanges that said that VLAN support was being added in. Changelog for Click 1.6.0 also says that VLAN support is there as of 2004. But no sample scripts. I would like to know how to create an Ethernet frame, set the VLAN tag or examine the VLAN tag from an incoming frame. Thank you. Azeem Khan Bombay, India _________________________________________________________________ For the freshest Indian Jobs Visit MSN Jobs http://www.in.msn.com/jobs _______________________________________________ click mailing list click@amsterdam.lcs.mit.edu https://amsterdam.lcs.mit.edu/mailman/listinfo/click
dot1qhelper.hh
Description: dot1qhelper.hh
dot1q.cc
Description: dot1q.cc
dot1q.hh
Description: dot1q.hh
dot1qhelper.cc
Description: dot1qhelper.cc
_______________________________________________ click mailing list click@amsterdam.lcs.mit.edu https://amsterdam.lcs.mit.edu/mailman/listinfo/click