-
Notifications
You must be signed in to change notification settings - Fork 24
/
compat.h
150 lines (128 loc) · 2.95 KB
/
compat.h
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
/*
* This file is a part of plotnetcfg, a tool to visualize network config.
* Copyright (C) 2015 Red Hat, Inc. -- Jiri Benc <[email protected]>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#ifndef _COMPAT_H
#define _COMPAT_H
#ifndef UNIX_PATH_MAX
#define UNIX_PATH_MAX 108
#endif
#define IFLA_LINK_NETNSID 37
#define IFLA_XDP 43
#if IFLA_MAX < IFLA_XDP
#undef IFLA_MAX
#define IFLA_MAX IFLA_XDP
#endif
#define NETNSA_NSID 1
#define NETNSA_FD 3
#if NETNSA_MAX < NETNSA_FD
#undef NETNSA_MAX
#define NETNSA_MAX NETNSA_FD
#endif
#ifndef RTM_GETNSID
#define RTM_GETNSID 90
#endif
#if RTM_MAX < RTM_GETNSID
#undef RTM_MAX
#define RTM_MAX (((RTM_GETNSID + 4) & ~3) - 1)
#endif
#define OVS_VPORT_FAMILY "ovs_vport"
#define OVS_VPORT_CMD_GET 3
#define OVS_VPORT_ATTR_NAME 3
struct ovs_header {
int dp_ifindex;
};
#define IFLA_VXLAN_GROUP6 16
#define IFLA_VXLAN_LOCAL6 17
#define IFLA_VXLAN_COLLECT_METADATA 25
#if IFLA_VXLAN_MAX < IFLA_VXLAN_COLLECT_METADATA
#undef IFLA_VXLAN_MAX
#define IFLA_VXLAN_MAX IFLA_VXLAN_COLLECT_METADATA
#endif
#ifndef IFLA_BOND_MAX
enum {
IFLA_BOND_UNSPEC,
IFLA_BOND_MODE,
IFLA_BOND_ACTIVE_SLAVE,
IFLA_BOND_MIIMON,
IFLA_BOND_UPDELAY,
IFLA_BOND_DOWNDELAY,
IFLA_BOND_USE_CARRIER,
IFLA_BOND_ARP_INTERVAL,
IFLA_BOND_ARP_IP_TARGET,
IFLA_BOND_ARP_VALIDATE,
IFLA_BOND_ARP_ALL_TARGETS,
IFLA_BOND_PRIMARY,
IFLA_BOND_PRIMARY_RESELECT,
IFLA_BOND_FAIL_OVER_MAC,
IFLA_BOND_XMIT_HASH_POLICY,
IFLA_BOND_RESEND_IGMP,
IFLA_BOND_NUM_PEER_NOTIF,
IFLA_BOND_ALL_SLAVES_ACTIVE,
IFLA_BOND_MIN_LINKS,
IFLA_BOND_LP_INTERVAL,
IFLA_BOND_PACKETS_PER_SLAVE,
IFLA_BOND_AD_LACP_RATE,
IFLA_BOND_AD_SELECT,
IFLA_BOND_AD_INFO,
__IFLA_BOND_MAX,
};
#define IFLA_BOND_MAX (__IFLA_BOND_MAX - 1)
#endif
#ifndef IFLA_XDP_MAX
enum {
IFLA_XDP_UNSPEC,
IFLA_XDP_FD,
IFLA_XDP_ATTACHED,
IFLA_XDP_FLAGS,
IFLA_XDP_PROG_ID,
IFLA_XDP_DRV_PROG_ID,
IFLA_XDP_SKB_PROG_ID,
IFLA_XDP_HW_PROG_ID,
__IFLA_XDP_MAX,
};
#define IFLA_XDP_MAX (__IFLA_XDP_MAX - 1)
enum {
XDP_ATTACHED_NONE = 0,
XDP_ATTACHED_DRV,
XDP_ATTACHED_SKB,
XDP_ATTACHED_HW,
XDP_ATTACHED_MULTI,
};
#endif
#ifndef IFLA_XFRM_MAX
enum {
IFLA_XFRM_UNSPEC,
IFLA_XFRM_LINK,
IFLA_XFRM_IF_ID,
__IFLA_XFRM_MAX
};
#define IFLA_XFRM_MAX (__IFLA_XFRM_MAX - 1)
#endif
#ifndef RTAX_QUICKACK
#define RTAX_QUICKACK 15
#endif
#ifndef RTAX_CC_ALGO
#define RTAX_CC_ALGO 16
#endif
#if RTAX_MAX < RTAX_CC_ALGO
#undef RTAX_MAX
#define RTAX_MAX RTAX_CC_ALGO
#endif
#ifndef RTPROT_MROUTED
#define RTPROT_MROUTED 17
#endif
#ifndef RTPROT_BABEL
#define RTPROT_BABEL 42
#endif
#endif