]>
git.ipfire.org Git - thirdparty/systemd.git/blob - src/basic/missing_network.h
1 /* SPDX-License-Identifier: LGPL-2.1+ */
4 #include <linux/loop.h>
5 #include <linux/rtnetlink.h>
6 #include <net/ethernet.h>
8 #include "missing_ethtool.h"
9 #include "missing_fib_rules.h"
10 #include "missing_fou.h"
11 #include "missing_if_bridge.h"
12 #include "missing_if_link.h"
13 #include "missing_if_tunnel.h"
14 #include "missing_vxcan.h"
17 /* The following two defines are actually available in the kernel headers for longer, but we define them here anyway,
18 * since that makes it easier to use them in conjunction with the glibc net/if.h header which conflicts with
20 #ifndef IF_OPER_UNKNOWN
21 #define IF_OPER_UNKNOWN 0
29 #define IFF_LOWER_UP 0x10000
33 #define IFF_DORMANT 0x20000
41 #ifndef IFA_F_MANAGETEMPADDR
42 #define IFA_F_MANAGETEMPADDR 0x100
45 #ifndef IFA_F_NOPREFIXROUTE
46 #define IFA_F_NOPREFIXROUTE 0x200
49 #ifndef IFA_F_MCAUTOJOIN
50 #define IFA_F_MCAUTOJOIN 0x400
55 #define ARPHRD_IP6GRE 823
59 #ifndef BOND_XMIT_POLICY_ENCAP23
60 #define BOND_XMIT_POLICY_ENCAP23 3
63 #ifndef BOND_XMIT_POLICY_ENCAP34
64 #define BOND_XMIT_POLICY_ENCAP34 4
68 #ifndef IFF_MULTI_QUEUE
69 #define IFF_MULTI_QUEUE 0x100
73 #ifndef IPV6_UNICAST_IF
74 #define IPV6_UNICAST_IF 76
79 #define IPV4_MIN_MTU 68
84 #define IPV6_MIN_MTU 1280
88 #if !HAVE_LO_FLAGS_PARTSCAN
89 #define LO_FLAGS_PARTSCAN 8
92 #ifndef LOOP_CTL_REMOVE
93 #define LOOP_CTL_REMOVE 0x4C81
96 #ifndef LOOP_CTL_GET_FREE
97 #define LOOP_CTL_GET_FREE 0x4C82
101 #ifndef NET_ADDR_PERM
102 #define NET_ADDR_PERM 0
105 #ifndef NET_ADDR_RANDOM
106 #define NET_ADDR_RANDOM 1
109 #ifndef NET_ADDR_STOLEN
110 #define NET_ADDR_STOLEN 2
114 #define NET_ADDR_SET 3
117 #ifndef NET_NAME_UNKNOWN
118 #define NET_NAME_UNKNOWN 0
121 #ifndef NET_NAME_ENUM
122 #define NET_NAME_ENUM 1
125 #ifndef NET_NAME_PREDICTABLE
126 #define NET_NAME_PREDICTABLE 2
129 #ifndef NET_NAME_USER
130 #define NET_NAME_USER 3
133 #ifndef NET_NAME_RENAMED
134 #define NET_NAME_RENAMED 4
138 #ifndef NETLINK_LIST_MEMBERSHIPS /* b42be38b2778eda2237fc759e55e3b698b05b315 (4.2) */
139 #define NETLINK_LIST_MEMBERSHIPS 9
147 #ifndef RTAX_QUICKACK
148 #define RTAX_QUICKACK 15
152 #define RTA_EXPIRES 23
155 /* Note that LOOPBACK_IFINDEX is currently not exported by the
156 * kernel/glibc, but hardcoded internally by the kernel. However, as
157 * it is exported to userspace indirectly via rtnetlink and the
158 * ioctls, and made use of widely we define it here too, in a way that
159 * is compatible with the kernel's internal definition. */
160 #ifndef LOOPBACK_IFINDEX
161 #define LOOPBACK_IFINDEX 1
164 /* Not exposed yet. Similar values are defined in net/ethernet.h */
165 #ifndef ETHERTYPE_LLDP
166 #define ETHERTYPE_LLDP 0x88cc