/* * 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 "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, }; option value='emaclite-cleanup'>emaclite-cleanup net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Pirko <jiri@mellanox.com>2017-02-03 10:29:05 +0100
committerDavid S. Miller <davem@davemloft.net>2017-02-03 16:35:42 -0500
commitb862815c3ee7b49ec20a9ab25da55a5f0bcbb95e (patch)
tree51e6e326d62f70ec1aac5c687fbf89f8351d116c
parent8708ecf01d454607f15fe1b378c8b88de3b9c34b (diff)
list: introduce list_for_each_entry_from_reverse helper
Similar to list_for_each_entry_continue and its reverse variant list_for_each_entry_continue_reverse, introduce reverse helper for list_for_each_entry_from. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Acked-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--include/linux/list.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/list.h b/include/linux/list.h