blob: 59a8cd2c60892f43b5791f781b0f3f96955053da (
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
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
151
152
153
154
155
|
/* SPDX-License-Identifier: LGPL-2.1+ */
#pragma once
#include <linux/loop.h>
#include <linux/rtnetlink.h>
#include <net/ethernet.h>
#include "missing_ethtool.h"
#include "missing_fib_rules.h"
#include "missing_fou.h"
#include "missing_if_bridge.h"
#include "missing_if_link.h"
#include "missing_if_tunnel.h"
#include "missing_vxcan.h"
/* if.h */
/* The following two defines are actually available in the kernel headers for longer, but we define them here anyway,
* since that makes it easier to use them in conjunction with the glibc net/if.h header which conflicts with
* linux/if.h. */
#ifndef IF_OPER_UNKNOWN
#define IF_OPER_UNKNOWN 0
#endif
#ifndef IF_OPER_UP
#define IF_OPER_UP 6
#endif
#ifndef IFF_LOWER_UP
#define IFF_LOWER_UP 0x10000
#endif
#ifndef IFF_DORMANT
#define IFF_DORMANT 0x20000
#endif
/* if_addr.h */
#if !HAVE_IFA_FLAGS
#define IFA_FLAGS 8
#endif
#ifndef IFA_F_MANAGETEMPADDR
#define IFA_F_MANAGETEMPADDR 0x100
#endif
#ifndef IFA_F_NOPREFIXROUTE
#define IFA_F_NOPREFIXROUTE 0x200
#endif
#ifndef IFA_F_MCAUTOJOIN
#define IFA_F_MCAUTOJOIN 0x400
#endif
/* if_arp.h */
#ifndef ARPHRD_IP6GRE
#define ARPHRD_IP6GRE 823
#endif
/* if_bonding.h */
#ifndef BOND_XMIT_POLICY_ENCAP23
#define BOND_XMIT_POLICY_ENCAP23 3
#endif
#ifndef BOND_XMIT_POLICY_ENCAP34
#define BOND_XMIT_POLICY_ENCAP34 4
#endif
/* if_tun.h */
#ifndef IFF_MULTI_QUEUE
#define IFF_MULTI_QUEUE 0x100
#endif
/* in6.h */
#ifndef IPV6_UNICAST_IF
#define IPV6_UNICAST_IF 76
#endif
/* ip.h */
#ifndef IPV4_MIN_MTU
#define IPV4_MIN_MTU 68
#endif
/* ipv6.h */
#ifndef IPV6_MIN_MTU
#define IPV6_MIN_MTU 1280
#endif
/* loop.h */
#if !HAVE_LO_FLAGS_PARTSCAN
#define LO_FLAGS_PARTSCAN 8
#endif
#ifndef LOOP_CTL_REMOVE
#define LOOP_CTL_REMOVE 0x4C81
#endif
#ifndef LOOP_CTL_GET_FREE
#define LOOP_CTL_GET_FREE 0x4C82
#endif
/* netdevice.h */
#ifndef NET_ADDR_RANDOM
#define NET_ADDR_RANDOM 1
#endif
#ifndef NET_NAME_UNKNOWN
#define NET_NAME_UNKNOWN 0
#endif
#ifndef NET_NAME_ENUM
#define NET_NAME_ENUM 1
#endif
#ifndef NET_NAME_PREDICTABLE
#define NET_NAME_PREDICTABLE 2
#endif
#ifndef NET_NAME_USER
#define NET_NAME_USER 3
#endif
#ifndef NET_NAME_RENAMED
#define NET_NAME_RENAMED 4
#endif
/* netlink.h */
#ifndef NETLINK_LIST_MEMBERSHIPS /* b42be38b2778eda2237fc759e55e3b698b05b315 (4.2) */
#define NETLINK_LIST_MEMBERSHIPS 9
#endif
/* rtnetlink.h */
#ifndef RTA_PREF
#define RTA_PREF 20
#endif
#ifndef RTAX_QUICKACK
#define RTAX_QUICKACK 15
#endif
#ifndef RTA_EXPIRES
#define RTA_EXPIRES 23
#endif
/* Note that LOOPBACK_IFINDEX is currently not exported by the
* kernel/glibc, but hardcoded internally by the kernel. However, as
* it is exported to userspace indirectly via rtnetlink and the
* ioctls, and made use of widely we define it here too, in a way that
* is compatible with the kernel's internal definition. */
#ifndef LOOPBACK_IFINDEX
#define LOOPBACK_IFINDEX 1
#endif
/* Not exposed yet. Similar values are defined in net/ethernet.h */
#ifndef ETHERTYPE_LLDP
#define ETHERTYPE_LLDP 0x88cc
#endif
|