2 * netsniff-ng - the packet sniffing beast
3 * Copyright 2012 Markus Amend <markus@netsniff-ng.org>, Deutsche Flugsicherung GmbH
4 * Subject to the GPL, version 2.
6 * Encapsulating Security Payload described in RFC4303
11 #include <netinet/in.h> /* for ntohs() */
23 static void esp(struct pkt_buff
*pkt
)
25 struct esp_hdr
*esp_ops
;
27 esp_ops
= (struct esp_hdr
*) pkt_pull(pkt
, sizeof(*esp_ops
));
32 tprintf("SPI (0x%x), ", ntohl(esp_ops
->h_spi
));
33 tprintf("SN (0x%x)", ntohl(esp_ops
->h_sn
));
37 static void esp_less(struct pkt_buff
*pkt
)
39 struct esp_hdr
*esp_ops
;
41 esp_ops
= (struct esp_hdr
*) pkt_pull(pkt
, sizeof(*esp_ops
));
48 struct protocol ip_esp_ops
= {
51 .print_less
= esp_less
,