/* * netsniff-ng - the packet sniffing beast * Copyright 2012 Markus Amend , Deutsche Flugsicherung GmbH * Subject to the GPL, version 2. * * http://www.ieee802.org/1/pages/802.1ad.html */ #include #include #include /* for ntohs() */ #include "proto.h" #include "dissector_eth.h" #include "built_in.h" #include "pkt_buff.h" struct QinQhdr { uint16_t TCI; uint16_t TPID; } __packed; static void QinQ_full(struct pkt_buff *pkt) { uint16_t tci; struct QinQhdr *QinQ = (struct QinQhdr *) pkt_pull(pkt, sizeof(*QinQ)); if (QinQ == NULL) return; tci = ntohs(QinQ->TCI); tprintf(" [ VLAN QinQ "); tprintf("Prio (%d), ", (tci & 0xE000) >> 13); tprintf("DEI (%d), ", (tci & 0x1000) >> 12); tprintf("ID (%d), ", (tci & 0x0FFF)); tprintf("Proto (0x%.4x)", ntohs(QinQ->TPID)); tprintf(" ]\n"); pkt_set_dissector(pkt, ð_lay2, ntohs(QinQ->TPID)); } static void QinQ_less(struct pkt_buff *pkt) { uint16_t tci; struct QinQhdr *QinQ = (struct QinQhdr *) pkt_pull(pkt, sizeof(*QinQ)); if (QinQ == NULL) return; tci = ntohs(QinQ->TCI); tprintf(" VLAN%d", (tci & 0x0FFF)); pkt_set_dissector(pkt, ð_lay2, ntohs(QinQ->TPID)); } struct protocol QinQ_ops = { .key = 0x88a8, .print_full = QinQ_full, .print_less = QinQ_less, }; back net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-05-18 10:28:45 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2016-05-18 10:28:45 -0700
commite34df3344d7b6f284e958147d7225faa340a1f39 (patch)
treecd721c5f49f27527dc7784497903c4be0ac842b7
parent442c9ac989d71599ebc39f4ea4d5b0e64996904b (diff)
parent9f5418010940236b2c39ea53b99055ca26ff1279 (diff)
Merge branch 'work.lookups' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull parallel lookup fixups from Al Viro: "Fix for xfs parallel readdir (turns out the cxfs exposure was not enough to catch all problems), and a reversion of btrfs back to ->iterate() until the fs/btrfs/delayed-inode.c gets fixed" * 'work.lookups' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: xfs: concurrent readdir hangs on data buffer locks Revert "btrfs: switch to ->iterate_shared()"