Click extension for VLAN support

Brecht Vermeulen brecht.vermeulen at rug.ac.be
Thu Mar 20 16:38:05 EST 2003


Hi,

We would like to add some 802.1Q VLAN support to click and as 802.1Q
ethernet packets have a longer header than standard ethernet, we want to
ask for advice on naming of the struct (so that it is in line with
normal click naming schemes and can be adopted later in the
distribution).

We thought of adding in include/clicknet/ether.h

CLICK_SIZE_PACKED_STRUCTURE(
struct click_vlan_ether {,
    uint8_t     ether_dhost[6];
    uint8_t     ether_shost[6];
    uint16_t    vlan_proto;		/* Tag Protocol Identifier (TPI), Should
always be 0x8100 for 802.1Q packets */
    uint16_t	vlan_TCI;		/* bit 0-2: priority, bit 3: Canonical Fromat
Indicator, bit 4-15: VLAN Id */
    uint16_t	vlan_encapsulated_proto /*¨packet type ID field (or len) */
});

This is based on the naming in the Linux kernel
(include/linux/if_vlan.h).

The current research/development should concentrate on the ethernet
level (in particular the etherswitch as provided in click). So we think
nothing else has to be changed globally in click for this, only the
etherswitch elements.

Any comments/suggestions are welcome. (an existing implementation is
even better :-) )

best regards,
Brecht




More information about the click mailing list