This is a hack. Decode IEEE 802.1Q VLAN tagging so that we can decode
tagged traffic according to the encapsulated protocol. It needs in addition modifications to the filter generator which would deal with checking the ethertype and vlan header as required.
This commit is contained in:
parent
e0572d523f
commit
0bfc6e6706
@ -158,6 +158,13 @@ int
|
||||
ether_encap_print(u_short ethertype, const u_char *p,
|
||||
u_int length, u_int caplen)
|
||||
{
|
||||
if (ethertype == 0x8100) { /* IEEE 802.1Q vlan tagging encapsulation */
|
||||
printf ("[vlan %d] ", ntohs(*(u_short *)p) & 0x17ff);
|
||||
ethertype = ntohs(((u_short *)p)[1]);
|
||||
p += 4;
|
||||
length -= 4;
|
||||
caplen -= 4;
|
||||
}
|
||||
extracted_ethertype = ethertype;
|
||||
|
||||
switch (ethertype) {
|
||||
|
Loading…
Reference in New Issue
Block a user