summaryrefslogtreecommitdiff
path: root/proto_ipv6_no_nxt_hdr.c
blob: d2cf072220a91eceff88453e8480ccd736356d48 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
 * netsniff-ng - the packet sniffing beast
 * Copyright 2012 Markus Amend <markus@netsniff-ng.org>, Deutsche Flugsicherung GmbH
 * Subject to the GPL, version 2.
 *
 * IPv6 No Next Header described in RFC2460
 */

#include <stdio.h>
#include <stdint.h>
#include <netinet/in.h>    /* for ntohs() */

#include "proto.h"
#include "dissector_eth.h"
#include "built_in.h"

static void no_next_header(struct pkt_buff *pkt __maybe_unused)
{
	/*
	 * The value 59 in the Next Header field of an IPv6 header or any
	 * extension header indicates that there is nothing following that
	 * header.  If the Payload Length field of the IPv6 header indicates the
	 * presence of octets past the end of a header whose Next Header field
	 * contains 59, those octets must be ignored, and passed on unchanged if
	 * the packet is forwarded.
	 */
	tprintf(" [ No Next Header");
	tprintf(" ]\n");
}

static void no_next_header_less(struct pkt_buff *pkt __maybe_unused)
{
	tprintf(" No Next Header");
}

struct protocol ipv6_no_next_header_ops = {
	.key = 0x3B,
	.print_full = no_next_header,
	.print_less = no_next_header_less,
};
td colspan='2' class='oid'>476d4b0b06ed78ec57f73f8dde182afc083b2b43 /include/linux/etherdevice.h parentc8585bd89e2e3c87eab6ca711e09b3af20fd469b (diff)
rename dev_hw_addr_random and remove redundant second
Renamed dev_hw_addr_random to eth_hw_addr_random() to reflect that this function only assign a random ethernet address (MAC). Removed the second parameter (u8 *hwaddr), it's redundant since the also given net_device already contains net_device->dev_addr. Set it directly. Adapt igbvf and ixgbevf to the changed function. Small fix for ixgbevf_probe(): if ixgbevf_sw_init() fails (which means the device got no dev_addr) handle the error and jump to err_sw_init as already done by igbvf in similar case. Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/etherdevice.h')