/* * netsniff-ng - the packet sniffing beast * Copyright 2012 Markus Amend , Deutsche Flugsicherung GmbH * Subject to the GPL, version 2. * * Encapsulating Security Payload described in RFC4303 */ #include #include #include /* for ntohs() */ #include "proto.h" #include "protos.h" #include "dissector_eth.h" #include "built_in.h" #include "pkt_buff.h" struct esp_hdr { uint32_t h_spi; uint32_t h_sn; } __packed; static void esp(struct pkt_buff *pkt) { struct esp_hdr *esp_ops; esp_ops = (struct esp_hdr *) pkt_pull(pkt, sizeof(*esp_ops)); if (esp_ops == NULL) return; tprintf(" [ ESP "); tprintf("SPI (0x%x), ", ntohl(esp_ops->h_spi)); tprintf("SN (0x%x)", ntohl(esp_ops->h_sn)); tprintf(" ]\n"); } static void esp_less(struct pkt_buff *pkt) { struct esp_hdr *esp_ops; esp_ops = (struct esp_hdr *) pkt_pull(pkt, sizeof(*esp_ops)); if (esp_ops == NULL) return; tprintf(" ESP"); } struct protocol ip_esp_ops = { .key = 0x32, .print_full = esp, .print_less = esp_less, }; ue='emaclite-cleanup'>emaclite-cleanup net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2017-02-10 16:43:50 +0100
committerDavid S. Miller <davem@davemloft.net>2017-02-13 22:23:39 -0500
commitfb585b44383c4cff85f92e67377ee1c5f07d6dc1 (patch)
treed4fd25ce57198133f90c637abdd578094725b587
parent37fabbf4d489cc2e1cbf7cde816d9453a65ddfb7 (diff)
net: make net_device members garp_port and mrp_port conditional
garp_port is only used in net/802/garp.c which is only compiled with CONFIG_GARP enabled. Same goes for mrp_port which is only used in net/802/mrp.c with CONFIG_MRP enabled. Only include the two members in struct net_device if their respective CONFIG_* is enabled. This saves a few bytes in struct net_device in case CONFIG_GARP or CONFIG_MRP are not enabled. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--include/linux/netdevice.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h