Linux Audio

Check our new training course

Loading...
v4.17
 1/* SPDX-License-Identifier: GPL-2.0 */
 2#ifndef __NET_GENEVE_H
 3#define __NET_GENEVE_H  1
 4
 5#include <net/udp_tunnel.h>
 6
 7/* Geneve Header:
 8 *  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 9 *  |Ver|  Opt Len  |O|C|    Rsvd.  |          Protocol Type        |
10 *  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11 *  |        Virtual Network Identifier (VNI)       |    Reserved   |
12 *  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
13 *  |                    Variable Length Options                    |
14 *  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
15 *
16 * Option Header:
17 *  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
18 *  |          Option Class         |      Type     |R|R|R| Length  |
19 *  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
20 *  |                      Variable Option Data                     |
21 *  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
22 */
23
24struct geneve_opt {
25	__be16	opt_class;
26	u8	type;
27#ifdef __LITTLE_ENDIAN_BITFIELD
28	u8	length:5;
29	u8	r3:1;
30	u8	r2:1;
31	u8	r1:1;
32#else
33	u8	r1:1;
34	u8	r2:1;
35	u8	r3:1;
36	u8	length:5;
37#endif
38	u8	opt_data[];
39};
40
41#define GENEVE_CRIT_OPT_TYPE (1 << 7)
42
43struct genevehdr {
44#ifdef __LITTLE_ENDIAN_BITFIELD
45	u8 opt_len:6;
46	u8 ver:2;
47	u8 rsvd1:6;
48	u8 critical:1;
49	u8 oam:1;
50#else
51	u8 ver:2;
52	u8 opt_len:6;
53	u8 oam:1;
54	u8 critical:1;
55	u8 rsvd1:6;
56#endif
57	__be16 proto_type;
58	u8 vni[3];
59	u8 rsvd2;
60	struct geneve_opt options[];
61};
62
63#ifdef CONFIG_INET
64struct net_device *geneve_dev_create_fb(struct net *net, const char *name,
65					u8 name_assign_type, u16 dst_port);
66#endif /*ifdef CONFIG_INET */
67
68#endif /*ifdef__NET_GENEVE_H */
v4.10.11
 
 1#ifndef __NET_GENEVE_H
 2#define __NET_GENEVE_H  1
 3
 4#include <net/udp_tunnel.h>
 5
 6/* Geneve Header:
 7 *  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 8 *  |Ver|  Opt Len  |O|C|    Rsvd.  |          Protocol Type        |
 9 *  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
10 *  |        Virtual Network Identifier (VNI)       |    Reserved   |
11 *  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
12 *  |                    Variable Length Options                    |
13 *  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
14 *
15 * Option Header:
16 *  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
17 *  |          Option Class         |      Type     |R|R|R| Length  |
18 *  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
19 *  |                      Variable Option Data                     |
20 *  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
21 */
22
23struct geneve_opt {
24	__be16	opt_class;
25	u8	type;
26#ifdef __LITTLE_ENDIAN_BITFIELD
27	u8	length:5;
28	u8	r3:1;
29	u8	r2:1;
30	u8	r1:1;
31#else
32	u8	r1:1;
33	u8	r2:1;
34	u8	r3:1;
35	u8	length:5;
36#endif
37	u8	opt_data[];
38};
39
40#define GENEVE_CRIT_OPT_TYPE (1 << 7)
41
42struct genevehdr {
43#ifdef __LITTLE_ENDIAN_BITFIELD
44	u8 opt_len:6;
45	u8 ver:2;
46	u8 rsvd1:6;
47	u8 critical:1;
48	u8 oam:1;
49#else
50	u8 ver:2;
51	u8 opt_len:6;
52	u8 oam:1;
53	u8 critical:1;
54	u8 rsvd1:6;
55#endif
56	__be16 proto_type;
57	u8 vni[3];
58	u8 rsvd2;
59	struct geneve_opt options[];
60};
61
62#ifdef CONFIG_INET
63struct net_device *geneve_dev_create_fb(struct net *net, const char *name,
64					u8 name_assign_type, u16 dst_port);
65#endif /*ifdef CONFIG_INET */
66
67#endif /*ifdef__NET_GENEVE_H */