build: Add Makefile target for Coverity scanner
[netsniff-ng.git] / proto_ipv6_no_nxt_hdr.c
blobc1ef3d096f727567c8d3626cfa4fd3efa83e0b54
1 /*
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 * IPv6 No Next Header described in RFC2460
7 */
9 #include <stdio.h>
10 #include <stdint.h>
11 #include <netinet/in.h> /* for ntohs() */
13 #include "proto.h"
14 #include "protos.h"
15 #include "dissector_eth.h"
16 #include "built_in.h"
18 static void no_next_header(struct pkt_buff *pkt __maybe_unused)
21 * The value 59 in the Next Header field of an IPv6 header or any
22 * extension header indicates that there is nothing following that
23 * header. If the Payload Length field of the IPv6 header indicates the
24 * presence of octets past the end of a header whose Next Header field
25 * contains 59, those octets must be ignored, and passed on unchanged if
26 * the packet is forwarded.
28 tprintf(" [ No Next Header");
29 tprintf(" ]\n");
32 static void no_next_header_less(struct pkt_buff *pkt __maybe_unused)
34 tprintf(" No Next Header");
37 struct protocol ipv6_no_next_header_ops = {
38 .key = 0x3B,
39 .print_full = no_next_header,
40 .print_less = no_next_header_less,