improving dissector_fuzz
[netsniff-ng.git] / src / proto_ipv6_no_nxt_hdr.h
blob791626a546b8c7941b7f55ce323d67b4f7889168
1 /*
2 * netsniff-ng - the packet sniffing beast
3 * Copyright 2012 Markus Amend <markus@netsniff-ng.org>
4 * Subject to the GPL, version 2.
6 * IPv6 No Next Header described in RFC2460
7 */
9 #ifndef PROTO_IPV6_NO_NXT_HDR_H
10 #define PROTO_IPV6_NO_NXT_HDR_H
12 #include <stdio.h>
13 #include <stdint.h>
14 #include <netinet/in.h> /* for ntohs() */
16 #include "proto_struct.h"
17 #include "dissector_eth.h"
19 static inline void no_next_header(struct pkt_buff *pkt)
22 * The value 59 in the Next Header field of an IPv6 header or any
23 * extension header indicates that there is nothing following that
24 * header. If the Payload Length field of the IPv6 header indicates the
25 * presence of octets past the end of a header whose Next Header field
26 * contains 59, those octets must be ignored, and passed on unchanged if
27 * the packet is forwarded.
29 tprintf(" [ No Next Header");
30 tprintf(" ]\n");
33 static inline void no_next_header_less(struct pkt_buff *pkt)
35 tprintf(" No Next Header");
38 struct protocol ipv6_no_next_header_ops = {
39 .key = 0x3B,
40 .print_full = no_next_header,
41 .print_less = no_next_header_less,
44 #endif /* PROTO_IPV6_NO_NXT_HDR_H */