/* * 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, }; bmit' value='switch'/> net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
ption value='6'>6
ModeNameSize
space:
mode:
authorGeert Uytterhoeven <geert+renesas@glider.be>2016-04-20 14:02:36 +0200
committerSimon Horman <horms+renesas@verge.net.au>2016-04-22 17:23:13 +1000
commitbe32bcbbd18213803ff24e480340d4d2cca1df4f (patch)
tree9df76febaf6bee5f1c9c28a5419a2c2e6b179227
parenta93fed0956bef9e4df420aa181198d86d347895d (diff)
soc: renesas: Move pm-rcar to drivers/soc/renesas/rcar-sysc
Move the pm-rcar driver from arch/arm/mach-shmobile/ to drivers/soc/renesas/, and its header file to include/linux/soc/renesas/, so it can be shared between arm32 (R-Car H1 and Gen2) and arm64 (R-Car Gen3). Rename it to rcar-sysc as it's really a driver for the R-Car System Controller (SYSC). Kill the intermediate PM_RCAR config symbol, as it's not user configurable anymore, and to prepare for SoC-specific make rules. Add the missing #include <linux/types.h> to rcar-sysc.h, which was exposed by different include order. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>