/* * 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 "protos.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_proto(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_proto(pkt, ð_lay2, ntohs(QinQ->TPID)); } struct protocol QinQ_ops = { .key = 0x88a8, .print_full = QinQ_full, .print_less = QinQ_less, }; ump-back net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Zyngier <marc.zyngier@arm.com>2016-04-11 09:57:55 +0100
committerThomas Gleixner <tglx@linutronix.de>2016-05-02 13:42:51 +0200
commit287e9357abcc0ef079bf4e439e098a3bd6246a05 (patch)
treea59e2b077a3195733a37c15839794e6f2c26c2c3 /Documentation
parente3825ba1af3a27d7522c9f5f929f5a13b8b138ae (diff)
DT/arm,gic-v3: Documment PPI partition support
Add a decription of the PPI partitioning support. Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Acked-by: Rob Herring <robh+dt@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: devicetree@vger.kernel.org Cc: Jason Cooper <jason@lakedaemon.net> Cc: Will Deacon <will.deacon@arm.com> Link: http://lkml.kernel.org/r/1460365075-7316-6-git-send-email-marc.zyngier@arm.com Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'Documentation')