History

Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next

Pull networking updates from David Miller: 1) Add WireGuard 2) Add HE and TWT support to ath11k driver, from John Crispin. 3) Add ESP in TCP encapsulation support, from Sabrina Dubroca. 4) Add variable window congestion control to TIPC, from Jon Maloy. 5) Add BCM84881 PHY driver, from Russell King. 6) Start adding netlink support for ethtool operations, from Michal Kubecek. 7) Add XDP drop and TX action support to ena driver, from Sameeh Jubran. 8) Add new ipv4 route notifications so that mlxsw driver does not have to handle identical routes itself. From Ido Schimmel. 9) Add BPF dynamic program extensions, from Alexei Starovoitov. 10) Support RX and TX timestamping in igc, from Vinicius Costa Gomes. 11) Add support for macsec HW offloading, from Antoine Tenart. 12) Add initial support for MPTCP protocol, from Christoph Paasch, Matthieu Baerts, Florian Westphal, Peter Krystad, and many others. 13) Add Octeontx2 PF support, from Sunil Goutham, Geetha sowjanya, Linu Cherian, and others. * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next: (1469 commits) net: phy: add default ARCH_BCM_IPROC for MDIO_BCM_IPROC udp: segment looped gso packets correctly netem: change mailing list qed: FW 8.42.2.0 debug features qed: rt init valid initialization changed qed: Debug feature: ilt and mdump qed: FW 8.42.2.0 Add fw overlay feature qed: FW 8.42.2.0 HSI changes qed: FW 8.42.2.0 iscsi/fcoe changes qed: Add abstraction for different hsi values per chip qed: FW 8.42.2.0 Additional ll2 type qed: Use dmae to write to widebus registers in fw_funcs qed: FW 8.42.2.0 Parser offsets modified qed: FW 8.42.2.0 Queue Manager changes qed: FW 8.42.2.0 Expose new registers and change windows qed: FW 8.42.2.0 Internal ram offsets modifications MAINTAINERS: Add entry for Marvell OcteonTX2 Physical Function driver Documentation: net: octeontx2: Add RVU HW and drivers overview octeontx2-pf: ethtool RSS config support octeontx2-pf: Add basic ethtool support ...

Linus Torvalds committed 6 years ago

Commit bd2463a2 parents a78208e f76e4c11827 files · +157546 −32784Browse files

Showing the changes to include/uapi/linux (26 of 1827 files). Show all

Unified · Split

26 files
  1. include/uapi/linux/audit.h +1 −0
  2. include/uapi/linux/batadv_packet.h +1 −1
  3. include/uapi/linux/batman_adv.h +1 −1
  4. include/uapi/linux/bpf.h +78 −4
  5. include/uapi/linux/btf.h +8 −1
  6. include/uapi/linux/ethtool.h +11 −0
  7. include/uapi/linux/ethtool_netlink.h +237 −0
  8. include/uapi/linux/hdlc/ioctl.h +9 −0
  9. include/uapi/linux/if.h +1 −0
  10. include/uapi/linux/if_bonding.h +10 −0
  11. include/uapi/linux/if_bridge.h +41 −0
  12. include/uapi/linux/if_link.h +8 −0
  13. include/uapi/linux/if_macsec.h +11 −0
  14. include/uapi/linux/in.h +2 −0
  15. include/uapi/linux/mii.h +12 −0
  16. include/uapi/linux/net_tstamp.h +8 −0
  17. include/uapi/linux/netfilter/nf_tables.h +44 −3
  18. include/uapi/linux/openvswitch.h +31 −0
  19. include/uapi/linux/pkt_sched.h +48 −0
  20. include/uapi/linux/rtnetlink.h +11 −0
  21. include/uapi/linux/snmp.h +2 −0
  22. include/uapi/linux/tcp.h +4 −2
  23. include/uapi/linux/tipc_netlink.h +2 −0
  24. include/uapi/linux/udp.h +1 −0
  25. include/uapi/linux/vm_sockets.h +5 −3
  26. include/uapi/linux/wireguard.h +196 −0
include/uapi/linux/audit.h+1−0
@@ -116,6 +116,7 @@ · 115 unmodified lines
116#define AUDIT_FANOTIFY 1331 /* Fanotify access decision */116#define AUDIT_FANOTIFY 1331 /* Fanotify access decision */
117#define AUDIT_TIME_INJOFFSET 1332 /* Timekeeping offset injected */117#define AUDIT_TIME_INJOFFSET 1332 /* Timekeeping offset injected */
118#define AUDIT_TIME_ADJNTPVAL 1333 /* NTP value adjustment */118#define AUDIT_TIME_ADJNTPVAL 1333 /* NTP value adjustment */
119#define AUDIT_BPF 1334 /* BPF subsystem */
119 120
120#define AUDIT_AVC 1400 /* SE Linux avc denial or grant */121#define AUDIT_AVC 1400 /* SE Linux avc denial or grant */
121#define AUDIT_SELINUX_ERR 1401 /* Internal SE Linux Errors */122#define AUDIT_SELINUX_ERR 1401 /* Internal SE Linux Errors */
include/uapi/linux/batadv_packet.h+1−1
@@ -1,5 +1,5 @@
1/* SPDX-License-Identifier: (GPL-2.0 WITH Linux-syscall-note) */1/* SPDX-License-Identifier: (GPL-2.0 WITH Linux-syscall-note) */
2/* Copyright (C) 2007-2019 B.A.T.M.A.N. contributors:2/* Copyright (C) 2007-2020 B.A.T.M.A.N. contributors:
3 *3 *
4 * Marek Lindner, Simon Wunderlich4 * Marek Lindner, Simon Wunderlich
5 */5 */
include/uapi/linux/batman_adv.h+1−1
@@ -1,5 +1,5 @@
1/* SPDX-License-Identifier: MIT */1/* SPDX-License-Identifier: MIT */
2/* Copyright (C) 2016-2019 B.A.T.M.A.N. contributors:2/* Copyright (C) 2016-2020 B.A.T.M.A.N. contributors:
3 *3 *
4 * Matthias Schiffer4 * Matthias Schiffer
5 */5 */
include/uapi/linux/bpf.h+78−4
@@ -107,6 +107,10 @@ enum bpf_cmd { · 106 unmodified lines
107 BPF_MAP_LOOKUP_AND_DELETE_ELEM,107 BPF_MAP_LOOKUP_AND_DELETE_ELEM,
108 BPF_MAP_FREEZE,108 BPF_MAP_FREEZE,
109 BPF_BTF_GET_NEXT_ID,109 BPF_BTF_GET_NEXT_ID,
110 BPF_MAP_LOOKUP_BATCH,
111 BPF_MAP_LOOKUP_AND_DELETE_BATCH,
112 BPF_MAP_UPDATE_BATCH,
113 BPF_MAP_DELETE_BATCH,
110};114};
111 115
112enum bpf_map_type {116enum bpf_map_type {
@@ -136,6 +140,7 @@ enum bpf_map_type { · 23 unmodified lines
136 BPF_MAP_TYPE_STACK,140 BPF_MAP_TYPE_STACK,
137 BPF_MAP_TYPE_SK_STORAGE,141 BPF_MAP_TYPE_SK_STORAGE,
138 BPF_MAP_TYPE_DEVMAP_HASH,142 BPF_MAP_TYPE_DEVMAP_HASH,
143 BPF_MAP_TYPE_STRUCT_OPS,
139};144};
140 145
141/* Note that tracing related programs such as146/* Note that tracing related programs such as
@@ -174,6 +179,8 @@ enum bpf_prog_type { · 32 unmodified lines
174 BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE,179 BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE,
175 BPF_PROG_TYPE_CGROUP_SOCKOPT,180 BPF_PROG_TYPE_CGROUP_SOCKOPT,
176 BPF_PROG_TYPE_TRACING,181 BPF_PROG_TYPE_TRACING,
182 BPF_PROG_TYPE_STRUCT_OPS,
183 BPF_PROG_TYPE_EXT,
177};184};
178 185
179enum bpf_attach_type {186enum bpf_attach_type {
@@ -231,6 +238,11 @@ enum bpf_attach_type { · 51 unmodified lines
231 * When children program makes decision (like picking TCP CA or sock bind)238 * When children program makes decision (like picking TCP CA or sock bind)
232 * parent program has a chance to override it.239 * parent program has a chance to override it.
233 *240 *
241 * With BPF_F_ALLOW_MULTI a new program is added to the end of the list of
242 * programs for a cgroup. Though it's possible to replace an old program at
243 * any position by also specifying BPF_F_REPLACE flag and position itself in
244 * replace_bpf_fd attribute. Old program at this position will be released.
245 *
234 * A cgroup with MULTI or OVERRIDE flag allows any attach flags in sub-cgroups.246 * A cgroup with MULTI or OVERRIDE flag allows any attach flags in sub-cgroups.
235 * A cgroup with NONE doesn't allow any programs in sub-cgroups.247 * A cgroup with NONE doesn't allow any programs in sub-cgroups.
236 * Ex1:248 * Ex1:
@@ -249,6 +261,7 @@ enum bpf_attach_type { · 12 unmodified lines
249 */261 */
250#define BPF_F_ALLOW_OVERRIDE (1U << 0)262#define BPF_F_ALLOW_OVERRIDE (1U << 0)
251#define BPF_F_ALLOW_MULTI (1U << 1)263#define BPF_F_ALLOW_MULTI (1U << 1)
264#define BPF_F_REPLACE (1U << 2)
252 265
253/* If BPF_F_STRICT_ALIGNMENT is used in BPF_PROG_LOAD command, the266/* If BPF_F_STRICT_ALIGNMENT is used in BPF_PROG_LOAD command, the
254 * verifier will perform strict alignment checking as if the kernel267 * verifier will perform strict alignment checking as if the kernel
@@ -351,7 +364,12 @@ enum bpf_attach_type { · 96 unmodified lines
351/* Enable memory-mapping BPF map */364/* Enable memory-mapping BPF map */
352#define BPF_F_MMAPABLE (1U << 10)365#define BPF_F_MMAPABLE (1U << 10)
353 366
354/* flags for BPF_PROG_QUERY */367/* Flags for BPF_PROG_QUERY. */
368
369/* Query effective (directly attached + inherited from ancestor cgroups)
370 * programs that will be executed for events within a cgroup.
371 * attach_flags with this flag are returned only for directly attached programs.
372 */
355#define BPF_F_QUERY_EFFECTIVE (1U << 0)373#define BPF_F_QUERY_EFFECTIVE (1U << 0)
356 374
357enum bpf_stack_build_id_status {375enum bpf_stack_build_id_status {
@@ -391,6 +409,10 @@ union bpf_attr { · 33 unmodified lines
391 __u32 btf_fd; /* fd pointing to a BTF type data */409 __u32 btf_fd; /* fd pointing to a BTF type data */
392 __u32 btf_key_type_id; /* BTF type_id of the key */410 __u32 btf_key_type_id; /* BTF type_id of the key */
393 __u32 btf_value_type_id; /* BTF type_id of the value */411 __u32 btf_value_type_id; /* BTF type_id of the value */
412 __u32 btf_vmlinux_value_type_id;/* BTF type_id of a kernel-
413 * struct stored as the
414 * map value
415 */
394 };416 };
395 417
396 struct { /* anonymous struct used by BPF_MAP_*_ELEM commands */418 struct { /* anonymous struct used by BPF_MAP_*_ELEM commands */
@@ -403,6 +425,23 @@ union bpf_attr { · 6 unmodified lines
403 __u64 flags;425 __u64 flags;
404 };426 };
405 427
428 struct { /* struct used by BPF_MAP_*_BATCH commands */
429 __aligned_u64 in_batch; /* start batch,
430 * NULL to start from beginning
431 */
432 __aligned_u64 out_batch; /* output: next start batch */
433 __aligned_u64 keys;
434 __aligned_u64 values;
435 __u32 count; /* input/output:
436 * input: # of key/value
437 * elements
438 * output: # of filled elements
439 */
440 __u32 map_fd;
441 __u64 elem_flags;
442 __u64 flags;
443 } batch;
444
406 struct { /* anonymous struct used by BPF_PROG_LOAD command */445 struct { /* anonymous struct used by BPF_PROG_LOAD command */
407 __u32 prog_type; /* one of enum bpf_prog_type */446 __u32 prog_type; /* one of enum bpf_prog_type */
408 __u32 insn_cnt;447 __u32 insn_cnt;
@@ -442,6 +481,10 @@ union bpf_attr { · 33 unmodified lines
442 __u32 attach_bpf_fd; /* eBPF program to attach */481 __u32 attach_bpf_fd; /* eBPF program to attach */
443 __u32 attach_type;482 __u32 attach_type;
444 __u32 attach_flags;483 __u32 attach_flags;
484 __u32 replace_bpf_fd; /* previously attached eBPF
485 * program to replace if
486 * BPF_F_REPLACE is used
487 */
445 };488 };
446 489
447 struct { /* anonymous struct used by BPF_PROG_TEST_RUN command */490 struct { /* anonymous struct used by BPF_PROG_TEST_RUN command */
@@ -2693,7 +2736,8 @@ union bpf_attr { · 2245 unmodified lines
2693 *2736 *
2694 * int bpf_send_signal(u32 sig)2737 * int bpf_send_signal(u32 sig)
2695 * Description2738 * Description
2696 * Send signal *sig* to the current task.2739 * Send signal *sig* to the process of the current task.
2740 * The signal may be delivered to any of this process's threads.
2697 * Return2741 * Return
2698 * 0 on success or successfully queued.2742 * 0 on success or successfully queued.
2699 *2743 *
@@ -2821,6 +2865,33 @@ union bpf_attr { · 121 unmodified lines
2821 * Return2865 * Return
2822 * On success, the strictly positive length of the string, including2866 * On success, the strictly positive length of the string, including
2823 * the trailing NUL character. On error, a negative value.2867 * the trailing NUL character. On error, a negative value.
2868 *
2869 * int bpf_tcp_send_ack(void *tp, u32 rcv_nxt)
2870 * Description
2871 * Send out a tcp-ack. *tp* is the in-kernel struct tcp_sock.
2872 * *rcv_nxt* is the ack_seq to be sent out.
2873 * Return
2874 * 0 on success, or a negative error in case of failure.
2875 *
2876 * int bpf_send_signal_thread(u32 sig)
2877 * Description
2878 * Send signal *sig* to the thread corresponding to the current task.
2879 * Return
2880 * 0 on success or successfully queued.
2881 *
2882 * **-EBUSY** if work queue under nmi is full.
2883 *
2884 * **-EINVAL** if *sig* is invalid.
2885 *
2886 * **-EPERM** if no permission to send the *sig*.
2887 *
2888 * **-EAGAIN** if bpf program can try again.
2889 *
2890 * u64 bpf_jiffies64(void)
2891 * Description
2892 * Obtain the 64bit jiffies
2893 * Return
2894 * The 64 bit jiffies
2824 */2895 */
2825#define __BPF_FUNC_MAPPER(FN) \2896#define __BPF_FUNC_MAPPER(FN) \
2826 FN(unspec), \2897 FN(unspec), \
@@ -2938,7 +3009,10 @@ union bpf_attr { · 111 unmodified lines
2938 FN(probe_read_user), \3009 FN(probe_read_user), \
2939 FN(probe_read_kernel), \3010 FN(probe_read_kernel), \
2940 FN(probe_read_user_str), \3011 FN(probe_read_user_str), \
2941 FN(probe_read_kernel_str),3012 FN(probe_read_kernel_str), \
3013 FN(tcp_send_ack), \
3014 FN(send_signal_thread), \
3015 FN(jiffies64),
2942 3016
2943/* integer value in 'imm' field of BPF_CALL instruction selects which helper3017/* integer value in 'imm' field of BPF_CALL instruction selects which helper
2944 * function eBPF program intends to call3018 * function eBPF program intends to call
@@ -3339,7 +3413,7 @@ struct bpf_map_info { · 394 unmodified lines
3339 __u32 map_flags;3413 __u32 map_flags;
3340 char name[BPF_OBJ_NAME_LEN];3414 char name[BPF_OBJ_NAME_LEN];
3341 __u32 ifindex;3415 __u32 ifindex;
3342 __u32 :32;3416 __u32 btf_vmlinux_value_type_id;
3343 __u64 netns_dev;3417 __u64 netns_dev;
3344 __u64 netns_ino;3418 __u64 netns_ino;
3345 __u32 btf_id;3419 __u32 btf_id;
include/uapi/linux/btf.h+8−1
@@ -142,7 +142,14 @@ struct btf_param { · 141 unmodified lines
142 142
143enum {143enum {
144 BTF_VAR_STATIC = 0,144 BTF_VAR_STATIC = 0,
145 BTF_VAR_GLOBAL_ALLOCATED,145 BTF_VAR_GLOBAL_ALLOCATED = 1,
146 BTF_VAR_GLOBAL_EXTERN = 2,
147};
148
149enum btf_func_linkage {
150 BTF_FUNC_STATIC = 0,
151 BTF_FUNC_GLOBAL = 1,
152 BTF_FUNC_EXTERN = 2,
146};153};
147 154
148/* BTF_KIND_VAR is followed by a single "struct btf_var" to describe155/* BTF_KIND_VAR is followed by a single "struct btf_var" to describe
include/uapi/linux/ethtool.h+11−0
@@ -593,6 +593,9 @@ struct ethtool_pauseparam { · 592 unmodified lines
593 * @ETH_SS_RSS_HASH_FUNCS: RSS hush function names593 * @ETH_SS_RSS_HASH_FUNCS: RSS hush function names
594 * @ETH_SS_PHY_STATS: Statistic names, for use with %ETHTOOL_GPHYSTATS594 * @ETH_SS_PHY_STATS: Statistic names, for use with %ETHTOOL_GPHYSTATS
595 * @ETH_SS_PHY_TUNABLES: PHY tunable names595 * @ETH_SS_PHY_TUNABLES: PHY tunable names
596 * @ETH_SS_LINK_MODES: link mode names
597 * @ETH_SS_MSG_CLASSES: debug message class names
598 * @ETH_SS_WOL_MODES: wake-on-lan modes
596 */599 */
597enum ethtool_stringset {600enum ethtool_stringset {
598 ETH_SS_TEST = 0,601 ETH_SS_TEST = 0,
@@ -604,6 +607,12 @@ enum ethtool_stringset { · 5 unmodified lines
604 ETH_SS_TUNABLES,607 ETH_SS_TUNABLES,
605 ETH_SS_PHY_STATS,608 ETH_SS_PHY_STATS,
606 ETH_SS_PHY_TUNABLES,609 ETH_SS_PHY_TUNABLES,
610 ETH_SS_LINK_MODES,
611 ETH_SS_MSG_CLASSES,
612 ETH_SS_WOL_MODES,
613
614 /* add new constants above here */
615 ETH_SS_COUNT
607};616};
608 617
609/**618/**
@@ -1688,6 +1697,8 @@ static inline int ethtool_validate_duplex(__u8 duplex) · 1078 unmodified lines
1688#define WAKE_MAGICSECURE (1 << 6) /* only meaningful if WAKE_MAGIC */1697#define WAKE_MAGICSECURE (1 << 6) /* only meaningful if WAKE_MAGIC */
1689#define WAKE_FILTER (1 << 7)1698#define WAKE_FILTER (1 << 7)
1690 1699
1700#define WOL_MODE_COUNT 8
1701
1691/* L2-L4 network traffic flow types */1702/* L2-L4 network traffic flow types */
1692#define TCP_V4_FLOW 0x01 /* hash or spec (tcp_ip4_spec) */1703#define TCP_V4_FLOW 0x01 /* hash or spec (tcp_ip4_spec) */
1693#define UDP_V4_FLOW 0x02 /* hash or spec (udp_ip4_spec) */1704#define UDP_V4_FLOW 0x02 /* hash or spec (udp_ip4_spec) */
include/uapi/linux/ethtool_netlink.h+237−0
@@ -0,0 +1,237 @@
1/* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */
2/*
3 * include/uapi/linux/ethtool_netlink.h - netlink interface for ethtool
4 *
5 * See Documentation/networking/ethtool-netlink.txt in kernel source tree for
6 * doucumentation of the interface.
7 */
8
9#ifndef _UAPI_LINUX_ETHTOOL_NETLINK_H_
10#define _UAPI_LINUX_ETHTOOL_NETLINK_H_
11
12#include <linux/ethtool.h>
13
14/* message types - userspace to kernel */
15enum {
16 ETHTOOL_MSG_USER_NONE,
17 ETHTOOL_MSG_STRSET_GET,
18 ETHTOOL_MSG_LINKINFO_GET,
19 ETHTOOL_MSG_LINKINFO_SET,
20 ETHTOOL_MSG_LINKMODES_GET,
21 ETHTOOL_MSG_LINKMODES_SET,
22 ETHTOOL_MSG_LINKSTATE_GET,
23 ETHTOOL_MSG_DEBUG_GET,
24 ETHTOOL_MSG_DEBUG_SET,
25 ETHTOOL_MSG_WOL_GET,
26 ETHTOOL_MSG_WOL_SET,
27
28 /* add new constants above here */
29 __ETHTOOL_MSG_USER_CNT,
30 ETHTOOL_MSG_USER_MAX = __ETHTOOL_MSG_USER_CNT - 1
31};
32
33/* message types - kernel to userspace */
34enum {
35 ETHTOOL_MSG_KERNEL_NONE,
36 ETHTOOL_MSG_STRSET_GET_REPLY,
37 ETHTOOL_MSG_LINKINFO_GET_REPLY,
38 ETHTOOL_MSG_LINKINFO_NTF,
39 ETHTOOL_MSG_LINKMODES_GET_REPLY,
40 ETHTOOL_MSG_LINKMODES_NTF,
41 ETHTOOL_MSG_LINKSTATE_GET_REPLY,
42 ETHTOOL_MSG_DEBUG_GET_REPLY,
43 ETHTOOL_MSG_DEBUG_NTF,
44 ETHTOOL_MSG_WOL_GET_REPLY,
45 ETHTOOL_MSG_WOL_NTF,
46
47 /* add new constants above here */
48 __ETHTOOL_MSG_KERNEL_CNT,
49 ETHTOOL_MSG_KERNEL_MAX = __ETHTOOL_MSG_KERNEL_CNT - 1
50};
51
52/* request header */
53
54/* use compact bitsets in reply */
55#define ETHTOOL_FLAG_COMPACT_BITSETS (1 << 0)
56/* provide optional reply for SET or ACT requests */
57#define ETHTOOL_FLAG_OMIT_REPLY (1 << 1)
58
59#define ETHTOOL_FLAG_ALL (ETHTOOL_FLAG_COMPACT_BITSETS | \
60 ETHTOOL_FLAG_OMIT_REPLY)
61
62enum {
63 ETHTOOL_A_HEADER_UNSPEC,
64 ETHTOOL_A_HEADER_DEV_INDEX, /* u32 */
65 ETHTOOL_A_HEADER_DEV_NAME, /* string */
66 ETHTOOL_A_HEADER_FLAGS, /* u32 - ETHTOOL_FLAG_* */
67
68 /* add new constants above here */
69 __ETHTOOL_A_HEADER_CNT,
70 ETHTOOL_A_HEADER_MAX = __ETHTOOL_A_HEADER_CNT - 1
71};
72
73/* bit sets */
74
75enum {
76 ETHTOOL_A_BITSET_BIT_UNSPEC,
77 ETHTOOL_A_BITSET_BIT_INDEX, /* u32 */
78 ETHTOOL_A_BITSET_BIT_NAME, /* string */
79 ETHTOOL_A_BITSET_BIT_VALUE, /* flag */
80
81 /* add new constants above here */
82 __ETHTOOL_A_BITSET_BIT_CNT,
83 ETHTOOL_A_BITSET_BIT_MAX = __ETHTOOL_A_BITSET_BIT_CNT - 1
84};
85
86enum {
87 ETHTOOL_A_BITSET_BITS_UNSPEC,
88 ETHTOOL_A_BITSET_BITS_BIT, /* nest - _A_BITSET_BIT_* */
89
90 /* add new constants above here */
91 __ETHTOOL_A_BITSET_BITS_CNT,
92 ETHTOOL_A_BITSET_BITS_MAX = __ETHTOOL_A_BITSET_BITS_CNT - 1
93};
94
95enum {
96 ETHTOOL_A_BITSET_UNSPEC,
97 ETHTOOL_A_BITSET_NOMASK, /* flag */
98 ETHTOOL_A_BITSET_SIZE, /* u32 */
99 ETHTOOL_A_BITSET_BITS, /* nest - _A_BITSET_BITS_* */
100 ETHTOOL_A_BITSET_VALUE, /* binary */
101 ETHTOOL_A_BITSET_MASK, /* binary */
102
103 /* add new constants above here */
104 __ETHTOOL_A_BITSET_CNT,
105 ETHTOOL_A_BITSET_MAX = __ETHTOOL_A_BITSET_CNT - 1
106};
107
108/* string sets */
109
110enum {
111 ETHTOOL_A_STRING_UNSPEC,
112 ETHTOOL_A_STRING_INDEX, /* u32 */
113 ETHTOOL_A_STRING_VALUE, /* string */
114
115 /* add new constants above here */
116 __ETHTOOL_A_STRING_CNT,
117 ETHTOOL_A_STRING_MAX = __ETHTOOL_A_STRING_CNT - 1
118};
119
120enum {
121 ETHTOOL_A_STRINGS_UNSPEC,
122 ETHTOOL_A_STRINGS_STRING, /* nest - _A_STRINGS_* */
123
124 /* add new constants above here */
125 __ETHTOOL_A_STRINGS_CNT,
126 ETHTOOL_A_STRINGS_MAX = __ETHTOOL_A_STRINGS_CNT - 1
127};
128
129enum {
130 ETHTOOL_A_STRINGSET_UNSPEC,
131 ETHTOOL_A_STRINGSET_ID, /* u32 */
132 ETHTOOL_A_STRINGSET_COUNT, /* u32 */
133 ETHTOOL_A_STRINGSET_STRINGS, /* nest - _A_STRINGS_* */
134
135 /* add new constants above here */
136 __ETHTOOL_A_STRINGSET_CNT,
137 ETHTOOL_A_STRINGSET_MAX = __ETHTOOL_A_STRINGSET_CNT - 1
138};
139
140enum {
141 ETHTOOL_A_STRINGSETS_UNSPEC,
142 ETHTOOL_A_STRINGSETS_STRINGSET, /* nest - _A_STRINGSET_* */
143
144 /* add new constants above here */
145 __ETHTOOL_A_STRINGSETS_CNT,
146 ETHTOOL_A_STRINGSETS_MAX = __ETHTOOL_A_STRINGSETS_CNT - 1
147};
148
149/* STRSET */
150
151enum {
152 ETHTOOL_A_STRSET_UNSPEC,
153 ETHTOOL_A_STRSET_HEADER, /* nest - _A_HEADER_* */
154 ETHTOOL_A_STRSET_STRINGSETS, /* nest - _A_STRINGSETS_* */
155 ETHTOOL_A_STRSET_COUNTS_ONLY, /* flag */
156
157 /* add new constants above here */
158 __ETHTOOL_A_STRSET_CNT,
159 ETHTOOL_A_STRSET_MAX = __ETHTOOL_A_STRSET_CNT - 1
160};
161
162/* LINKINFO */
163
164enum {
165 ETHTOOL_A_LINKINFO_UNSPEC,
166 ETHTOOL_A_LINKINFO_HEADER, /* nest - _A_HEADER_* */
167 ETHTOOL_A_LINKINFO_PORT, /* u8 */
168 ETHTOOL_A_LINKINFO_PHYADDR, /* u8 */
169 ETHTOOL_A_LINKINFO_TP_MDIX, /* u8 */
170 ETHTOOL_A_LINKINFO_TP_MDIX_CTRL, /* u8 */
171 ETHTOOL_A_LINKINFO_TRANSCEIVER, /* u8 */
172
173 /* add new constants above here */
174 __ETHTOOL_A_LINKINFO_CNT,
175 ETHTOOL_A_LINKINFO_MAX = __ETHTOOL_A_LINKINFO_CNT - 1
176};
177
178/* LINKMODES */
179
180enum {
181 ETHTOOL_A_LINKMODES_UNSPEC,
182 ETHTOOL_A_LINKMODES_HEADER, /* nest - _A_HEADER_* */
183 ETHTOOL_A_LINKMODES_AUTONEG, /* u8 */
184 ETHTOOL_A_LINKMODES_OURS, /* bitset */
185 ETHTOOL_A_LINKMODES_PEER, /* bitset */
186 ETHTOOL_A_LINKMODES_SPEED, /* u32 */
187 ETHTOOL_A_LINKMODES_DUPLEX, /* u8 */
188
189 /* add new constants above here */
190 __ETHTOOL_A_LINKMODES_CNT,
191 ETHTOOL_A_LINKMODES_MAX = __ETHTOOL_A_LINKMODES_CNT - 1
192};
193
194/* LINKSTATE */
195
196enum {
197 ETHTOOL_A_LINKSTATE_UNSPEC,
198 ETHTOOL_A_LINKSTATE_HEADER, /* nest - _A_HEADER_* */
199 ETHTOOL_A_LINKSTATE_LINK, /* u8 */
200
201 /* add new constants above here */
202 __ETHTOOL_A_LINKSTATE_CNT,
203 ETHTOOL_A_LINKSTATE_MAX = __ETHTOOL_A_LINKSTATE_CNT - 1
204};
205
206/* DEBUG */
207
208enum {
209 ETHTOOL_A_DEBUG_UNSPEC,
210 ETHTOOL_A_DEBUG_HEADER, /* nest - _A_HEADER_* */
211 ETHTOOL_A_DEBUG_MSGMASK, /* bitset */
212
213 /* add new constants above here */
214 __ETHTOOL_A_DEBUG_CNT,
215 ETHTOOL_A_DEBUG_MAX = __ETHTOOL_A_DEBUG_CNT - 1
216};
217
218/* WOL */
219
220enum {
221 ETHTOOL_A_WOL_UNSPEC,
222 ETHTOOL_A_WOL_HEADER, /* nest - _A_HEADER_* */
223 ETHTOOL_A_WOL_MODES, /* bitset */
224 ETHTOOL_A_WOL_SOPASS, /* binary */
225
226 /* add new constants above here */
227 __ETHTOOL_A_WOL_CNT,
228 ETHTOOL_A_WOL_MAX = __ETHTOOL_A_WOL_CNT - 1
229};
230
231/* generic netlink info */
232#define ETHTOOL_GENL_NAME "ethtool"
233#define ETHTOOL_GENL_VERSION 1
234
235#define ETHTOOL_MCGRP_MONITOR_NAME "monitor"
236
237#endif /* _UAPI_LINUX_ETHTOOL_NETLINK_H_ */
include/uapi/linux/hdlc/ioctl.h+9−0
@@ -79,6 +79,15 @@ typedef struct { · 78 unmodified lines
79 unsigned int timeout;79 unsigned int timeout;
80} cisco_proto;80} cisco_proto;
81 81
82typedef struct {
83 unsigned short dce; /* 1 for DCE (network side) operation */
84 unsigned int modulo; /* modulo (8 = basic / 128 = extended) */
85 unsigned int window; /* frame window size */
86 unsigned int t1; /* timeout t1 */
87 unsigned int t2; /* timeout t2 */
88 unsigned int n2; /* frame retry counter */
89} x25_hdlc_proto;
90
82/* PPP doesn't need any info now - supply length = 0 to ioctl */91/* PPP doesn't need any info now - supply length = 0 to ioctl */
83 92
84#endif /* __ASSEMBLY__ */93#endif /* __ASSEMBLY__ */
include/uapi/linux/if.h+1−0
@@ -213,6 +213,7 @@ struct if_settings { · 212 unmodified lines
213 fr_proto __user *fr;213 fr_proto __user *fr;
214 fr_proto_pvc __user *fr_pvc;214 fr_proto_pvc __user *fr_pvc;
215 fr_proto_pvc_info __user *fr_pvc_info;215 fr_proto_pvc_info __user *fr_pvc_info;
216 x25_hdlc_proto __user *x25;
216 217
217 /* interface settings */218 /* interface settings */
218 sync_serial_settings __user *sync;219 sync_serial_settings __user *sync;
include/uapi/linux/if_bonding.h+10−0
@@ -95,6 +95,16 @@ · 94 unmodified lines
95#define BOND_XMIT_POLICY_ENCAP23 3 /* encapsulated layer 2+3 */95#define BOND_XMIT_POLICY_ENCAP23 3 /* encapsulated layer 2+3 */
96#define BOND_XMIT_POLICY_ENCAP34 4 /* encapsulated layer 3+4 */96#define BOND_XMIT_POLICY_ENCAP34 4 /* encapsulated layer 3+4 */
97 97
98/* 802.3ad port state definitions (43.4.2.2 in the 802.3ad standard) */
99#define LACP_STATE_LACP_ACTIVITY 0x1
100#define LACP_STATE_LACP_TIMEOUT 0x2
101#define LACP_STATE_AGGREGATION 0x4
102#define LACP_STATE_SYNCHRONIZATION 0x8
103#define LACP_STATE_COLLECTING 0x10
104#define LACP_STATE_DISTRIBUTING 0x20
105#define LACP_STATE_DEFAULTED 0x40
106#define LACP_STATE_EXPIRED 0x80
107
98typedef struct ifbond {108typedef struct ifbond {
99 __s32 bond_mode;109 __s32 bond_mode;
100 __s32 num_slaves;110 __s32 num_slaves;
include/uapi/linux/if_bridge.h+41−0
@@ -130,6 +130,7 @@ enum { · 129 unmodified lines
130#define BRIDGE_VLAN_INFO_RANGE_BEGIN (1<<3) /* VLAN is start of vlan range */130#define BRIDGE_VLAN_INFO_RANGE_BEGIN (1<<3) /* VLAN is start of vlan range */
131#define BRIDGE_VLAN_INFO_RANGE_END (1<<4) /* VLAN is end of vlan range */131#define BRIDGE_VLAN_INFO_RANGE_END (1<<4) /* VLAN is end of vlan range */
132#define BRIDGE_VLAN_INFO_BRENTRY (1<<5) /* Global bridge VLAN entry */132#define BRIDGE_VLAN_INFO_BRENTRY (1<<5) /* Global bridge VLAN entry */
133#define BRIDGE_VLAN_INFO_ONLY_OPTS (1<<6) /* Skip create/delete/flags */
133 134
134struct bridge_vlan_info {135struct bridge_vlan_info {
135 __u16 flags;136 __u16 flags;
@@ -156,6 +157,45 @@ struct bridge_vlan_xstats { · 20 unmodified lines
156 __u32 pad2;157 __u32 pad2;
157};158};
158 159
160struct bridge_stp_xstats {
161 __u64 transition_blk;
162 __u64 transition_fwd;
163 __u64 rx_bpdu;
164 __u64 tx_bpdu;
165 __u64 rx_tcn;
166 __u64 tx_tcn;
167};
168
169/* Bridge vlan RTM header */
170struct br_vlan_msg {
171 __u8 family;
172 __u8 reserved1;
173 __u16 reserved2;
174 __u32 ifindex;
175};
176
177/* Bridge vlan RTM attributes
178 * [BRIDGE_VLANDB_ENTRY] = {
179 * [BRIDGE_VLANDB_ENTRY_INFO]
180 * ...
181 * }
182 */
183enum {
184 BRIDGE_VLANDB_UNSPEC,
185 BRIDGE_VLANDB_ENTRY,
186 __BRIDGE_VLANDB_MAX,
187};
188#define BRIDGE_VLANDB_MAX (__BRIDGE_VLANDB_MAX - 1)
189
190enum {
191 BRIDGE_VLANDB_ENTRY_UNSPEC,
192 BRIDGE_VLANDB_ENTRY_INFO,
193 BRIDGE_VLANDB_ENTRY_RANGE,
194 BRIDGE_VLANDB_ENTRY_STATE,
195 __BRIDGE_VLANDB_ENTRY_MAX,
196};
197#define BRIDGE_VLANDB_ENTRY_MAX (__BRIDGE_VLANDB_ENTRY_MAX - 1)
198
159/* Bridge multicast database attributes199/* Bridge multicast database attributes
160 * [MDBA_MDB] = {200 * [MDBA_MDB] = {
161 * [MDBA_MDB_ENTRY] = {201 * [MDBA_MDB_ENTRY] = {
@@ -262,6 +302,7 @@ enum { · 100 unmodified lines
262 BRIDGE_XSTATS_VLAN,302 BRIDGE_XSTATS_VLAN,
263 BRIDGE_XSTATS_MCAST,303 BRIDGE_XSTATS_MCAST,
264 BRIDGE_XSTATS_PAD,304 BRIDGE_XSTATS_PAD,
305 BRIDGE_XSTATS_STP,
265 __BRIDGE_XSTATS_MAX306 __BRIDGE_XSTATS_MAX
266};307};
267#define BRIDGE_XSTATS_MAX (__BRIDGE_XSTATS_MAX - 1)308#define BRIDGE_XSTATS_MAX (__BRIDGE_XSTATS_MAX - 1)
include/uapi/linux/if_link.h+8−0
@@ -169,6 +169,7 @@ enum { · 168 unmodified lines
169 IFLA_MAX_MTU,169 IFLA_MAX_MTU,
170 IFLA_PROP_LIST,170 IFLA_PROP_LIST,
171 IFLA_ALT_IFNAME, /* Alternative ifname */171 IFLA_ALT_IFNAME, /* Alternative ifname */
172 IFLA_PERM_ADDRESS,
172 __IFLA_MAX173 __IFLA_MAX
173};174};
174 175
@@ -485,6 +486,13 @@ enum macsec_validation_type { · 310 unmodified lines
485 MACSEC_VALIDATE_MAX = __MACSEC_VALIDATE_END - 1,486 MACSEC_VALIDATE_MAX = __MACSEC_VALIDATE_END - 1,
486};487};
487 488
489enum macsec_offload {
490 MACSEC_OFFLOAD_OFF = 0,
491 MACSEC_OFFLOAD_PHY = 1,
492 __MACSEC_OFFLOAD_END,
493 MACSEC_OFFLOAD_MAX = __MACSEC_OFFLOAD_END - 1,
494};
495
488/* IPVLAN section */496/* IPVLAN section */
489enum {497enum {
490 IFLA_IPVLAN_UNSPEC,498 IFLA_IPVLAN_UNSPEC,
include/uapi/linux/if_macsec.h+11−0
@@ -45,6 +45,7 @@ enum macsec_attrs { · 44 unmodified lines
45 MACSEC_ATTR_RXSC_LIST, /* dump, nested, macsec_rxsc_attrs for each RXSC */45 MACSEC_ATTR_RXSC_LIST, /* dump, nested, macsec_rxsc_attrs for each RXSC */
46 MACSEC_ATTR_TXSC_STATS, /* dump, nested, macsec_txsc_stats_attr */46 MACSEC_ATTR_TXSC_STATS, /* dump, nested, macsec_txsc_stats_attr */
47 MACSEC_ATTR_SECY_STATS, /* dump, nested, macsec_secy_stats_attr */47 MACSEC_ATTR_SECY_STATS, /* dump, nested, macsec_secy_stats_attr */
48 MACSEC_ATTR_OFFLOAD, /* config, nested, macsec_offload_attrs */
48 __MACSEC_ATTR_END,49 __MACSEC_ATTR_END,
49 NUM_MACSEC_ATTR = __MACSEC_ATTR_END,50 NUM_MACSEC_ATTR = __MACSEC_ATTR_END,
50 MACSEC_ATTR_MAX = __MACSEC_ATTR_END - 1,51 MACSEC_ATTR_MAX = __MACSEC_ATTR_END - 1,
@@ -97,6 +98,15 @@ enum macsec_sa_attrs { · 46 unmodified lines
97 MACSEC_SA_ATTR_MAX = __MACSEC_SA_ATTR_END - 1,98 MACSEC_SA_ATTR_MAX = __MACSEC_SA_ATTR_END - 1,
98};99};
99 100
101enum macsec_offload_attrs {
102 MACSEC_OFFLOAD_ATTR_UNSPEC,
103 MACSEC_OFFLOAD_ATTR_TYPE, /* config/dump, u8 0..2 */
104 MACSEC_OFFLOAD_ATTR_PAD,
105 __MACSEC_OFFLOAD_ATTR_END,
106 NUM_MACSEC_OFFLOAD_ATTR = __MACSEC_OFFLOAD_ATTR_END,
107 MACSEC_OFFLOAD_ATTR_MAX = __MACSEC_OFFLOAD_ATTR_END - 1,
108};
109
100enum macsec_nl_commands {110enum macsec_nl_commands {
101 MACSEC_CMD_GET_TXSC,111 MACSEC_CMD_GET_TXSC,
102 MACSEC_CMD_ADD_RXSC,112 MACSEC_CMD_ADD_RXSC,
@@ -108,6 +118,7 @@ enum macsec_nl_commands { · 5 unmodified lines
108 MACSEC_CMD_ADD_RXSA,118 MACSEC_CMD_ADD_RXSA,
109 MACSEC_CMD_DEL_RXSA,119 MACSEC_CMD_DEL_RXSA,
110 MACSEC_CMD_UPD_RXSA,120 MACSEC_CMD_UPD_RXSA,
121 MACSEC_CMD_UPD_OFFLOAD,
111};122};
112 123
113/* u64 per-RXSC stats */124/* u64 per-RXSC stats */
include/uapi/linux/in.h+2−0
@@ -76,6 +76,8 @@ enum { · 75 unmodified lines
76#define IPPROTO_MPLS IPPROTO_MPLS76#define IPPROTO_MPLS IPPROTO_MPLS
77 IPPROTO_RAW = 255, /* Raw IP packets */77 IPPROTO_RAW = 255, /* Raw IP packets */
78#define IPPROTO_RAW IPPROTO_RAW78#define IPPROTO_RAW IPPROTO_RAW
79 IPPROTO_MPTCP = 262, /* Multipath TCP connection */
80#define IPPROTO_MPTCP IPPROTO_MPTCP
79 IPPROTO_MAX81 IPPROTO_MAX
80};82};
81#endif83#endif
include/uapi/linux/mii.h+12−0
@@ -131,6 +131,18 @@ · 130 unmodified lines
131#define NWAYTEST_LOOPBACK 0x0100 /* Enable loopback for N-way */131#define NWAYTEST_LOOPBACK 0x0100 /* Enable loopback for N-way */
132#define NWAYTEST_RESV2 0xfe00 /* Unused... */132#define NWAYTEST_RESV2 0xfe00 /* Unused... */
133 133
134/* MAC and PHY tx_config_Reg[15:0] for SGMII in-band auto-negotiation.*/
135#define ADVERTISE_SGMII 0x0001 /* MAC can do SGMII */
136#define LPA_SGMII 0x0001 /* PHY can do SGMII */
137#define LPA_SGMII_DPX_SPD_MASK 0x1C00 /* SGMII duplex and speed bits */
138#define LPA_SGMII_10HALF 0x0000 /* Can do 10mbps half-duplex */
139#define LPA_SGMII_10FULL 0x1000 /* Can do 10mbps full-duplex */
140#define LPA_SGMII_100HALF 0x0400 /* Can do 100mbps half-duplex */
141#define LPA_SGMII_100FULL 0x1400 /* Can do 100mbps full-duplex */
142#define LPA_SGMII_1000HALF 0x0800 /* Can do 1000mbps half-duplex */
143#define LPA_SGMII_1000FULL 0x1800 /* Can do 1000mbps full-duplex */
144#define LPA_SGMII_LINK 0x8000 /* PHY link with copper-side partner */
145
134/* 1000BASE-T Control register */146/* 1000BASE-T Control register */
135#define ADVERTISE_1000FULL 0x0200 /* Advertise 1000BASE-T full duplex */147#define ADVERTISE_1000FULL 0x0200 /* Advertise 1000BASE-T full duplex */
136#define ADVERTISE_1000HALF 0x0100 /* Advertise 1000BASE-T half duplex */148#define ADVERTISE_1000HALF 0x0100 /* Advertise 1000BASE-T half duplex */
include/uapi/linux/net_tstamp.h+8−0
@@ -90,6 +90,14 @@ enum hwtstamp_tx_types { · 89 unmodified lines
90 * queue.90 * queue.
91 */91 */
92 HWTSTAMP_TX_ONESTEP_SYNC,92 HWTSTAMP_TX_ONESTEP_SYNC,
93
94 /*
95 * Same as HWTSTAMP_TX_ONESTEP_SYNC, but also enables time
96 * stamp insertion directly into PDelay_Resp packets. In this
97 * case, neither transmitted Sync nor PDelay_Resp packets will
98 * receive a time stamp via the socket error queue.
99 */
100 HWTSTAMP_TX_ONESTEP_P2P,
93};101};
94 102
95/* possible values for hwtstamp_config->rx_filter */103/* possible values for hwtstamp_config->rx_filter */
include/uapi/linux/netfilter/nf_tables.h+44−3
@@ -48,6 +48,7 @@ enum nft_registers { · 47 unmodified lines
48 48
49#define NFT_REG_SIZE 1649#define NFT_REG_SIZE 16
50#define NFT_REG32_SIZE 450#define NFT_REG32_SIZE 4
51#define NFT_REG32_COUNT (NFT_REG32_15 - NFT_REG32_00 + 1)
51 52
52/**53/**
53 * enum nft_verdicts - nf_tables internal verdicts54 * enum nft_verdicts - nf_tables internal verdicts
@@ -301,14 +302,28 @@ enum nft_set_policies { · 247 unmodified lines
301 * enum nft_set_desc_attributes - set element description302 * enum nft_set_desc_attributes - set element description
302 *303 *
303 * @NFTA_SET_DESC_SIZE: number of elements in set (NLA_U32)304 * @NFTA_SET_DESC_SIZE: number of elements in set (NLA_U32)
305 * @NFTA_SET_DESC_CONCAT: description of field concatenation (NLA_NESTED)
304 */306 */
305enum nft_set_desc_attributes {307enum nft_set_desc_attributes {
306 NFTA_SET_DESC_UNSPEC,308 NFTA_SET_DESC_UNSPEC,
307 NFTA_SET_DESC_SIZE,309 NFTA_SET_DESC_SIZE,
310 NFTA_SET_DESC_CONCAT,
308 __NFTA_SET_DESC_MAX311 __NFTA_SET_DESC_MAX
309};312};
310#define NFTA_SET_DESC_MAX (__NFTA_SET_DESC_MAX - 1)313#define NFTA_SET_DESC_MAX (__NFTA_SET_DESC_MAX - 1)
311 314
315/**
316 * enum nft_set_field_attributes - attributes of concatenated fields
317 *
318 * @NFTA_SET_FIELD_LEN: length of single field, in bits (NLA_U32)
319 */
320enum nft_set_field_attributes {
321 NFTA_SET_FIELD_UNSPEC,
322 NFTA_SET_FIELD_LEN,
323 __NFTA_SET_FIELD_MAX
324};
325#define NFTA_SET_FIELD_MAX (__NFTA_SET_FIELD_MAX - 1)
326
312/**327/**
313 * enum nft_set_attributes - nf_tables set netlink attributes328 * enum nft_set_attributes - nf_tables set netlink attributes
314 *329 *
@@ -370,6 +385,7 @@ enum nft_set_elem_flags { · 55 unmodified lines
370 * @NFTA_SET_ELEM_USERDATA: user data (NLA_BINARY)385 * @NFTA_SET_ELEM_USERDATA: user data (NLA_BINARY)
371 * @NFTA_SET_ELEM_EXPR: expression (NLA_NESTED: nft_expr_attributes)386 * @NFTA_SET_ELEM_EXPR: expression (NLA_NESTED: nft_expr_attributes)
372 * @NFTA_SET_ELEM_OBJREF: stateful object reference (NLA_STRING)387 * @NFTA_SET_ELEM_OBJREF: stateful object reference (NLA_STRING)
388 * @NFTA_SET_ELEM_KEY_END: closing key value (NLA_NESTED: nft_data)
373 */389 */
374enum nft_set_elem_attributes {390enum nft_set_elem_attributes {
375 NFTA_SET_ELEM_UNSPEC,391 NFTA_SET_ELEM_UNSPEC,
@@ -382,6 +398,7 @@ enum nft_set_elem_attributes { · 6 unmodified lines
382 NFTA_SET_ELEM_EXPR,398 NFTA_SET_ELEM_EXPR,
383 NFTA_SET_ELEM_PAD,399 NFTA_SET_ELEM_PAD,
384 NFTA_SET_ELEM_OBJREF,400 NFTA_SET_ELEM_OBJREF,
401 NFTA_SET_ELEM_KEY_END,
385 __NFTA_SET_ELEM_MAX402 __NFTA_SET_ELEM_MAX
386};403};
387#define NFTA_SET_ELEM_MAX (__NFTA_SET_ELEM_MAX - 1)404#define NFTA_SET_ELEM_MAX (__NFTA_SET_ELEM_MAX - 1)
@@ -484,6 +501,20 @@ enum nft_immediate_attributes { · 96 unmodified lines
484};501};
485#define NFTA_IMMEDIATE_MAX (__NFTA_IMMEDIATE_MAX - 1)502#define NFTA_IMMEDIATE_MAX (__NFTA_IMMEDIATE_MAX - 1)
486 503
504/**
505 * enum nft_bitwise_ops - nf_tables bitwise operations
506 *
507 * @NFT_BITWISE_BOOL: mask-and-xor operation used to implement NOT, AND, OR and
508 * XOR boolean operations
509 * @NFT_BITWISE_LSHIFT: left-shift operation
510 * @NFT_BITWISE_RSHIFT: right-shift operation
511 */
512enum nft_bitwise_ops {
513 NFT_BITWISE_BOOL,
514 NFT_BITWISE_LSHIFT,
515 NFT_BITWISE_RSHIFT,
516};
517
487/**518/**
488 * enum nft_bitwise_attributes - nf_tables bitwise expression netlink attributes519 * enum nft_bitwise_attributes - nf_tables bitwise expression netlink attributes
489 *520 *
@@ -492,16 +523,20 @@ enum nft_immediate_attributes { · 2 unmodified lines
492 * @NFTA_BITWISE_LEN: length of operands (NLA_U32)523 * @NFTA_BITWISE_LEN: length of operands (NLA_U32)
493 * @NFTA_BITWISE_MASK: mask value (NLA_NESTED: nft_data_attributes)524 * @NFTA_BITWISE_MASK: mask value (NLA_NESTED: nft_data_attributes)
494 * @NFTA_BITWISE_XOR: xor value (NLA_NESTED: nft_data_attributes)525 * @NFTA_BITWISE_XOR: xor value (NLA_NESTED: nft_data_attributes)
526 * @NFTA_BITWISE_OP: type of operation (NLA_U32: nft_bitwise_ops)
527 * @NFTA_BITWISE_DATA: argument for non-boolean operations
528 * (NLA_NESTED: nft_data_attributes)
495 *529 *
496 * The bitwise expression performs the following operation:530 * The bitwise expression supports boolean and shift operations. It implements
531 * the boolean operations by performing the following operation:
497 *532 *
498 * dreg = (sreg & mask) ^ xor533 * dreg = (sreg & mask) ^ xor
499 *534 *
500 * which allow to express all bitwise operations:535 * with these mask and xor values:
501 *536 *
502 * mask xor537 * mask xor
503 * NOT: 1 1538 * NOT: 1 1
504 * OR: 0 x539 * OR: ~x x
505 * XOR: 1 x540 * XOR: 1 x
506 * AND: x 0541 * AND: x 0
507 */542 */
@@ -512,6 +547,8 @@ enum nft_bitwise_attributes { · 4 unmodified lines
512 NFTA_BITWISE_LEN,547 NFTA_BITWISE_LEN,
513 NFTA_BITWISE_MASK,548 NFTA_BITWISE_MASK,
514 NFTA_BITWISE_XOR,549 NFTA_BITWISE_XOR,
550 NFTA_BITWISE_OP,
551 NFTA_BITWISE_DATA,
515 __NFTA_BITWISE_MAX552 __NFTA_BITWISE_MAX
516};553};
517#define NFTA_BITWISE_MAX (__NFTA_BITWISE_MAX - 1)554#define NFTA_BITWISE_MAX (__NFTA_BITWISE_MAX - 1)
@@ -805,6 +842,8 @@ enum nft_exthdr_attributes { · 287 unmodified lines
805 * @NFT_META_TIME_NS: time since epoch (in nanoseconds)842 * @NFT_META_TIME_NS: time since epoch (in nanoseconds)
806 * @NFT_META_TIME_DAY: day of week (from 0 = Sunday to 6 = Saturday)843 * @NFT_META_TIME_DAY: day of week (from 0 = Sunday to 6 = Saturday)
807 * @NFT_META_TIME_HOUR: hour of day (in seconds)844 * @NFT_META_TIME_HOUR: hour of day (in seconds)
845 * @NFT_META_SDIF: slave device interface index
846 * @NFT_META_SDIFNAME: slave device interface name
808 */847 */
809enum nft_meta_keys {848enum nft_meta_keys {
810 NFT_META_LEN,849 NFT_META_LEN,
@@ -840,6 +879,8 @@ enum nft_meta_keys { · 29 unmodified lines
840 NFT_META_TIME_NS,879 NFT_META_TIME_NS,
841 NFT_META_TIME_DAY,880 NFT_META_TIME_DAY,
842 NFT_META_TIME_HOUR,881 NFT_META_TIME_HOUR,
882 NFT_META_SDIF,
883 NFT_META_SDIFNAME,
843};884};
844 885
845/**886/**
include/uapi/linux/openvswitch.h+31−0
@@ -672,6 +672,32 @@ struct ovs_action_push_mpls { · 671 unmodified lines
672 __be16 mpls_ethertype; /* Either %ETH_P_MPLS_UC or %ETH_P_MPLS_MC */672 __be16 mpls_ethertype; /* Either %ETH_P_MPLS_UC or %ETH_P_MPLS_MC */
673};673};
674 674
675/**
676 * struct ovs_action_add_mpls - %OVS_ACTION_ATTR_ADD_MPLS action
677 * argument.
678 * @mpls_lse: MPLS label stack entry to push.
679 * @mpls_ethertype: Ethertype to set in the encapsulating ethernet frame.
680 * @tun_flags: MPLS tunnel attributes.
681 *
682 * The only values @mpls_ethertype should ever be given are %ETH_P_MPLS_UC and
683 * %ETH_P_MPLS_MC, indicating MPLS unicast or multicast. Other are rejected.
684 */
685struct ovs_action_add_mpls {
686 __be32 mpls_lse;
687 __be16 mpls_ethertype; /* Either %ETH_P_MPLS_UC or %ETH_P_MPLS_MC */
688 __u16 tun_flags;
689};
690
691#define OVS_MPLS_L3_TUNNEL_FLAG_MASK (1 << 0) /* Flag to specify the place of
692 * insertion of MPLS header.
693 * When false, the MPLS header
694 * will be inserted at the start
695 * of the packet.
696 * When true, the MPLS header
697 * will be inserted at the start
698 * of the l3 header.
699 */
700
675/**701/**
676 * struct ovs_action_push_vlan - %OVS_ACTION_ATTR_PUSH_VLAN action argument.702 * struct ovs_action_push_vlan - %OVS_ACTION_ATTR_PUSH_VLAN action argument.
677 * @vlan_tpid: Tag protocol identifier (TPID) to push.703 * @vlan_tpid: Tag protocol identifier (TPID) to push.
@@ -892,6 +918,10 @@ struct check_pkt_len_arg { · 214 unmodified lines
892 * @OVS_ACTION_ATTR_CHECK_PKT_LEN: Check the packet length and execute a set918 * @OVS_ACTION_ATTR_CHECK_PKT_LEN: Check the packet length and execute a set
893 * of actions if greater than the specified packet length, else execute919 * of actions if greater than the specified packet length, else execute
894 * another set of actions.920 * another set of actions.
921 * @OVS_ACTION_ATTR_ADD_MPLS: Push a new MPLS label stack entry at the
922 * start of the packet or at the start of the l3 header depending on the value
923 * of l3 tunnel flag in the tun_flags field of OVS_ACTION_ATTR_ADD_MPLS
924 * argument.
895 *925 *
896 * Only a single header can be set with a single %OVS_ACTION_ATTR_SET. Not all926 * Only a single header can be set with a single %OVS_ACTION_ATTR_SET. Not all
897 * fields within a header are modifiable, e.g. the IPv4 protocol and fragment927 * fields within a header are modifiable, e.g. the IPv4 protocol and fragment
@@ -927,6 +957,7 @@ enum ovs_action_attr { · 29 unmodified lines
927 OVS_ACTION_ATTR_METER, /* u32 meter ID. */957 OVS_ACTION_ATTR_METER, /* u32 meter ID. */
928 OVS_ACTION_ATTR_CLONE, /* Nested OVS_CLONE_ATTR_*. */958 OVS_ACTION_ATTR_CLONE, /* Nested OVS_CLONE_ATTR_*. */
929 OVS_ACTION_ATTR_CHECK_PKT_LEN, /* Nested OVS_CHECK_PKT_LEN_ATTR_*. */959 OVS_ACTION_ATTR_CHECK_PKT_LEN, /* Nested OVS_CHECK_PKT_LEN_ATTR_*. */
960 OVS_ACTION_ATTR_ADD_MPLS, /* struct ovs_action_add_mpls. */
930 961
931 __OVS_ACTION_ATTR_MAX, /* Nothing past this will be accepted962 __OVS_ACTION_ATTR_MAX, /* Nothing past this will be accepted
932 * from userspace. */963 * from userspace. */
include/uapi/linux/pkt_sched.h+48−0
@@ -971,6 +971,37 @@ struct tc_pie_xstats { · 970 unmodified lines
971 __u32 ecn_mark; /* packets marked with ecn*/971 __u32 ecn_mark; /* packets marked with ecn*/
972};972};
973 973
974/* FQ PIE */
975enum {
976 TCA_FQ_PIE_UNSPEC,
977 TCA_FQ_PIE_LIMIT,
978 TCA_FQ_PIE_FLOWS,
979 TCA_FQ_PIE_TARGET,
980 TCA_FQ_PIE_TUPDATE,
981 TCA_FQ_PIE_ALPHA,
982 TCA_FQ_PIE_BETA,
983 TCA_FQ_PIE_QUANTUM,
984 TCA_FQ_PIE_MEMORY_LIMIT,
985 TCA_FQ_PIE_ECN_PROB,
986 TCA_FQ_PIE_ECN,
987 TCA_FQ_PIE_BYTEMODE,
988 TCA_FQ_PIE_DQ_RATE_ESTIMATOR,
989 __TCA_FQ_PIE_MAX
990};
991#define TCA_FQ_PIE_MAX (__TCA_FQ_PIE_MAX - 1)
992
993struct tc_fq_pie_xstats {
994 __u32 packets_in; /* total number of packets enqueued */
995 __u32 dropped; /* packets dropped due to fq_pie_action */
996 __u32 overlimit; /* dropped due to lack of space in queue */
997 __u32 overmemory; /* dropped due to lack of memory in queue */
998 __u32 ecn_mark; /* packets marked with ecn */
999 __u32 new_flow_count; /* count of new flows created by packets */
1000 __u32 new_flows_len; /* count of flows in new list */
1001 __u32 old_flows_len; /* count of flows in old list */
1002 __u32 memory_usage; /* total memory across all queues */
1003};
1004
974/* CBS */1005/* CBS */
975struct tc_cbs_qopt {1006struct tc_cbs_qopt {
976 __u8 offload;1007 __u8 offload;
@@ -1187,4 +1218,21 @@ enum { · 210 unmodified lines
1187 1218
1188#define TCA_TAPRIO_ATTR_MAX (__TCA_TAPRIO_ATTR_MAX - 1)1219#define TCA_TAPRIO_ATTR_MAX (__TCA_TAPRIO_ATTR_MAX - 1)
1189 1220
1221/* ETS */
1222
1223#define TCQ_ETS_MAX_BANDS 16
1224
1225enum {
1226 TCA_ETS_UNSPEC,
1227 TCA_ETS_NBANDS, /* u8 */
1228 TCA_ETS_NSTRICT, /* u8 */
1229 TCA_ETS_QUANTA, /* nested TCA_ETS_QUANTA_BAND */
1230 TCA_ETS_QUANTA_BAND, /* u32 */
1231 TCA_ETS_PRIOMAP, /* nested TCA_ETS_PRIOMAP_BAND */
1232 TCA_ETS_PRIOMAP_BAND, /* u8 */
1233 __TCA_ETS_MAX,
1234};
1235
1236#define TCA_ETS_MAX (__TCA_ETS_MAX - 1)
1237
1190#endif1238#endif
include/uapi/linux/rtnetlink.h+11−0
@@ -171,6 +171,13 @@ enum { · 170 unmodified lines
171 RTM_GETLINKPROP,171 RTM_GETLINKPROP,
172#define RTM_GETLINKPROP RTM_GETLINKPROP172#define RTM_GETLINKPROP RTM_GETLINKPROP
173 173
174 RTM_NEWVLAN = 112,
175#define RTM_NEWNVLAN RTM_NEWVLAN
176 RTM_DELVLAN,
177#define RTM_DELVLAN RTM_DELVLAN
178 RTM_GETVLAN,
179#define RTM_GETVLAN RTM_GETVLAN
180
174 __RTM_MAX,181 __RTM_MAX,
175#define RTM_MAX (((__RTM_MAX + 3) & ~3) - 1)182#define RTM_MAX (((__RTM_MAX + 3) & ~3) - 1)
176};183};
@@ -309,6 +316,8 @@ enum rt_scope_t { · 132 unmodified lines
309#define RTM_F_PREFIX 0x800 /* Prefix addresses */316#define RTM_F_PREFIX 0x800 /* Prefix addresses */
310#define RTM_F_LOOKUP_TABLE 0x1000 /* set rtm_table to FIB lookup result */317#define RTM_F_LOOKUP_TABLE 0x1000 /* set rtm_table to FIB lookup result */
311#define RTM_F_FIB_MATCH 0x2000 /* return full fib lookup match */318#define RTM_F_FIB_MATCH 0x2000 /* return full fib lookup match */
319#define RTM_F_OFFLOAD 0x4000 /* route is offloaded */
320#define RTM_F_TRAP 0x8000 /* route is trapping packets */
312 321
313/* Reserved table identifiers */322/* Reserved table identifiers */
314 323
@@ -721,6 +730,8 @@ enum rtnetlink_groups { · 406 unmodified lines
721#define RTNLGRP_IPV6_MROUTE_R RTNLGRP_IPV6_MROUTE_R730#define RTNLGRP_IPV6_MROUTE_R RTNLGRP_IPV6_MROUTE_R
722 RTNLGRP_NEXTHOP,731 RTNLGRP_NEXTHOP,
723#define RTNLGRP_NEXTHOP RTNLGRP_NEXTHOP732#define RTNLGRP_NEXTHOP RTNLGRP_NEXTHOP
733 RTNLGRP_BRVLAN,
734#define RTNLGRP_BRVLAN RTNLGRP_BRVLAN
724 __RTNLGRP_MAX735 __RTNLGRP_MAX
725};736};
726#define RTNLGRP_MAX (__RTNLGRP_MAX - 1)737#define RTNLGRP_MAX (__RTNLGRP_MAX - 1)
include/uapi/linux/snmp.h+2−0
@@ -285,6 +285,8 @@ enum · 284 unmodified lines
285 LINUX_MIB_TCPRCVQDROP, /* TCPRcvQDrop */285 LINUX_MIB_TCPRCVQDROP, /* TCPRcvQDrop */
286 LINUX_MIB_TCPWQUEUETOOBIG, /* TCPWqueueTooBig */286 LINUX_MIB_TCPWQUEUETOOBIG, /* TCPWqueueTooBig */
287 LINUX_MIB_TCPFASTOPENPASSIVEALTKEY, /* TCPFastOpenPassiveAltKey */287 LINUX_MIB_TCPFASTOPENPASSIVEALTKEY, /* TCPFastOpenPassiveAltKey */
288 LINUX_MIB_TCPTIMEOUTREHASH, /* TCPTimeoutRehash */
289 LINUX_MIB_TCPDUPLICATEDATAREHASH, /* TCPDuplicateDataRehash */
288 __LINUX_MIB_MAX290 __LINUX_MIB_MAX
289};291};
290 292
include/uapi/linux/tcp.h+4−2
@@ -311,20 +311,22 @@ enum { · 310 unmodified lines
311 TCP_NLA_DSACK_DUPS, /* DSACK blocks received */311 TCP_NLA_DSACK_DUPS, /* DSACK blocks received */
312 TCP_NLA_REORD_SEEN, /* reordering events seen */312 TCP_NLA_REORD_SEEN, /* reordering events seen */
313 TCP_NLA_SRTT, /* smoothed RTT in usecs */313 TCP_NLA_SRTT, /* smoothed RTT in usecs */
314 TCP_NLA_TIMEOUT_REHASH, /* Timeout-triggered rehash attempts */
314};315};
315 316
316/* for TCP_MD5SIG socket option */317/* for TCP_MD5SIG socket option */
317#define TCP_MD5SIG_MAXKEYLEN 80318#define TCP_MD5SIG_MAXKEYLEN 80
318 319
319/* tcp_md5sig extension flags for TCP_MD5SIG_EXT */320/* tcp_md5sig extension flags for TCP_MD5SIG_EXT */
320#define TCP_MD5SIG_FLAG_PREFIX 1 /* address prefix length */321#define TCP_MD5SIG_FLAG_PREFIX 0x1 /* address prefix length */
322#define TCP_MD5SIG_FLAG_IFINDEX 0x2 /* ifindex set */
321 323
322struct tcp_md5sig {324struct tcp_md5sig {
323 struct __kernel_sockaddr_storage tcpm_addr; /* address associated */325 struct __kernel_sockaddr_storage tcpm_addr; /* address associated */
324 __u8 tcpm_flags; /* extension flags */326 __u8 tcpm_flags; /* extension flags */
325 __u8 tcpm_prefixlen; /* address prefix */327 __u8 tcpm_prefixlen; /* address prefix */
326 __u16 tcpm_keylen; /* key length */328 __u16 tcpm_keylen; /* key length */
327 __u32 __tcpm_pad; /* zero */329 int tcpm_ifindex; /* device index for scope */
328 __u8 tcpm_key[TCP_MD5SIG_MAXKEYLEN]; /* key (binary) */330 __u8 tcpm_key[TCP_MD5SIG_MAXKEYLEN]; /* key (binary) */
329};331};
330 332
include/uapi/linux/tipc_netlink.h+2−0
@@ -65,6 +65,7 @@ enum { · 64 unmodified lines
65 TIPC_NL_UDP_GET_REMOTEIP,65 TIPC_NL_UDP_GET_REMOTEIP,
66 TIPC_NL_KEY_SET,66 TIPC_NL_KEY_SET,
67 TIPC_NL_KEY_FLUSH,67 TIPC_NL_KEY_FLUSH,
68 TIPC_NL_ADDR_LEGACY_GET,
68 69
69 __TIPC_NL_CMD_MAX,70 __TIPC_NL_CMD_MAX,
70 TIPC_NL_CMD_MAX = __TIPC_NL_CMD_MAX - 171 TIPC_NL_CMD_MAX = __TIPC_NL_CMD_MAX - 1
@@ -176,6 +177,7 @@ enum { · 105 unmodified lines
176 TIPC_NLA_NET_ADDR, /* u32 */177 TIPC_NLA_NET_ADDR, /* u32 */
177 TIPC_NLA_NET_NODEID, /* u64 */178 TIPC_NLA_NET_NODEID, /* u64 */
178 TIPC_NLA_NET_NODEID_W1, /* u64 */179 TIPC_NLA_NET_NODEID_W1, /* u64 */
180 TIPC_NLA_NET_ADDR_LEGACY, /* flag */
179 181
180 __TIPC_NLA_NET_MAX,182 __TIPC_NLA_NET_MAX,
181 TIPC_NLA_NET_MAX = __TIPC_NLA_NET_MAX - 1183 TIPC_NLA_NET_MAX = __TIPC_NLA_NET_MAX - 1
include/uapi/linux/udp.h+1−0
@@ -42,5 +42,6 @@ struct udphdr { · 41 unmodified lines
42#define UDP_ENCAP_GTP0 4 /* GSM TS 09.60 */42#define UDP_ENCAP_GTP0 4 /* GSM TS 09.60 */
43#define UDP_ENCAP_GTP1U 5 /* 3GPP TS 29.060 */43#define UDP_ENCAP_GTP1U 5 /* 3GPP TS 29.060 */
44#define UDP_ENCAP_RXRPC 644#define UDP_ENCAP_RXRPC 6
45#define TCP_ENCAP_ESPINTCP 7 /* Yikes, this is really xfrm encap types. */
45 46
46#endif /* _UAPI_LINUX_UDP_H */47#endif /* _UAPI_LINUX_UDP_H */
include/uapi/linux/vm_sockets.h+5−3
@@ -99,11 +99,13 @@ · 98 unmodified lines
99 99
100#define VMADDR_CID_HYPERVISOR 0100#define VMADDR_CID_HYPERVISOR 0
101 101
102/* This CID is specific to VMCI and can be considered reserved (even VMCI102/* Use this as the destination CID in an address when referring to the
103 * doesn't use it anymore, it's a legacy value from an older release).103 * local communication (loopback).
104 * (This was VMADDR_CID_RESERVED, but even VMCI doesn't use it anymore,
105 * it was a legacy value from an older release).
104 */106 */
105 107
106#define VMADDR_CID_RESERVED 1108#define VMADDR_CID_LOCAL 1
107 109
108/* Use this as the destination CID in an address when referring to the host110/* Use this as the destination CID in an address when referring to the host
109 * (any process other than the hypervisor). VMCI relies on it being 2, but111 * (any process other than the hypervisor). VMCI relies on it being 2, but
include/uapi/linux/wireguard.h+196−0
@@ -0,0 +1,196 @@
1/* SPDX-License-Identifier: (GPL-2.0 WITH Linux-syscall-note) OR MIT */
2/*
3 * Copyright (C) 2015-2019 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
4 *
5 * Documentation
6 * =============
7 *
8 * The below enums and macros are for interfacing with WireGuard, using generic
9 * netlink, with family WG_GENL_NAME and version WG_GENL_VERSION. It defines two
10 * methods: get and set. Note that while they share many common attributes,
11 * these two functions actually accept a slightly different set of inputs and
12 * outputs.
13 *
14 * WG_CMD_GET_DEVICE
15 * -----------------
16 *
17 * May only be called via NLM_F_REQUEST | NLM_F_DUMP. The command should contain
18 * one but not both of:
19 *
20 * WGDEVICE_A_IFINDEX: NLA_U32
21 * WGDEVICE_A_IFNAME: NLA_NUL_STRING, maxlen IFNAMSIZ - 1
22 *
23 * The kernel will then return several messages (NLM_F_MULTI) containing the
24 * following tree of nested items:
25 *
26 * WGDEVICE_A_IFINDEX: NLA_U32
27 * WGDEVICE_A_IFNAME: NLA_NUL_STRING, maxlen IFNAMSIZ - 1
28 * WGDEVICE_A_PRIVATE_KEY: NLA_EXACT_LEN, len WG_KEY_LEN
29 * WGDEVICE_A_PUBLIC_KEY: NLA_EXACT_LEN, len WG_KEY_LEN
30 * WGDEVICE_A_LISTEN_PORT: NLA_U16
31 * WGDEVICE_A_FWMARK: NLA_U32
32 * WGDEVICE_A_PEERS: NLA_NESTED
33 * 0: NLA_NESTED
34 * WGPEER_A_PUBLIC_KEY: NLA_EXACT_LEN, len WG_KEY_LEN
35 * WGPEER_A_PRESHARED_KEY: NLA_EXACT_LEN, len WG_KEY_LEN
36 * WGPEER_A_ENDPOINT: NLA_MIN_LEN(struct sockaddr), struct sockaddr_in or struct sockaddr_in6
37 * WGPEER_A_PERSISTENT_KEEPALIVE_INTERVAL: NLA_U16
38 * WGPEER_A_LAST_HANDSHAKE_TIME: NLA_EXACT_LEN, struct __kernel_timespec
39 * WGPEER_A_RX_BYTES: NLA_U64
40 * WGPEER_A_TX_BYTES: NLA_U64
41 * WGPEER_A_ALLOWEDIPS: NLA_NESTED
42 * 0: NLA_NESTED
43 * WGALLOWEDIP_A_FAMILY: NLA_U16
44 * WGALLOWEDIP_A_IPADDR: NLA_MIN_LEN(struct in_addr), struct in_addr or struct in6_addr
45 * WGALLOWEDIP_A_CIDR_MASK: NLA_U8
46 * 0: NLA_NESTED
47 * ...
48 * 0: NLA_NESTED
49 * ...
50 * ...
51 * WGPEER_A_PROTOCOL_VERSION: NLA_U32
52 * 0: NLA_NESTED
53 * ...
54 * ...
55 *
56 * It is possible that all of the allowed IPs of a single peer will not
57 * fit within a single netlink message. In that case, the same peer will
58 * be written in the following message, except it will only contain
59 * WGPEER_A_PUBLIC_KEY and WGPEER_A_ALLOWEDIPS. This may occur several
60 * times in a row for the same peer. It is then up to the receiver to
61 * coalesce adjacent peers. Likewise, it is possible that all peers will
62 * not fit within a single message. So, subsequent peers will be sent
63 * in following messages, except those will only contain WGDEVICE_A_IFNAME
64 * and WGDEVICE_A_PEERS. It is then up to the receiver to coalesce these
65 * messages to form the complete list of peers.
66 *
67 * Since this is an NLA_F_DUMP command, the final message will always be
68 * NLMSG_DONE, even if an error occurs. However, this NLMSG_DONE message
69 * contains an integer error code. It is either zero or a negative error
70 * code corresponding to the errno.
71 *
72 * WG_CMD_SET_DEVICE
73 * -----------------
74 *
75 * May only be called via NLM_F_REQUEST. The command should contain the
76 * following tree of nested items, containing one but not both of
77 * WGDEVICE_A_IFINDEX and WGDEVICE_A_IFNAME:
78 *
79 * WGDEVICE_A_IFINDEX: NLA_U32
80 * WGDEVICE_A_IFNAME: NLA_NUL_STRING, maxlen IFNAMSIZ - 1
81 * WGDEVICE_A_FLAGS: NLA_U32, 0 or WGDEVICE_F_REPLACE_PEERS if all current
82 * peers should be removed prior to adding the list below.
83 * WGDEVICE_A_PRIVATE_KEY: len WG_KEY_LEN, all zeros to remove
84 * WGDEVICE_A_LISTEN_PORT: NLA_U16, 0 to choose randomly
85 * WGDEVICE_A_FWMARK: NLA_U32, 0 to disable
86 * WGDEVICE_A_PEERS: NLA_NESTED
87 * 0: NLA_NESTED
88 * WGPEER_A_PUBLIC_KEY: len WG_KEY_LEN
89 * WGPEER_A_FLAGS: NLA_U32, 0 and/or WGPEER_F_REMOVE_ME if the
90 * specified peer should not exist at the end of the
91 * operation, rather than added/updated and/or
92 * WGPEER_F_REPLACE_ALLOWEDIPS if all current allowed
93 * IPs of this peer should be removed prior to adding
94 * the list below and/or WGPEER_F_UPDATE_ONLY if the
95 * peer should only be set if it already exists.
96 * WGPEER_A_PRESHARED_KEY: len WG_KEY_LEN, all zeros to remove
97 * WGPEER_A_ENDPOINT: struct sockaddr_in or struct sockaddr_in6
98 * WGPEER_A_PERSISTENT_KEEPALIVE_INTERVAL: NLA_U16, 0 to disable
99 * WGPEER_A_ALLOWEDIPS: NLA_NESTED
100 * 0: NLA_NESTED
101 * WGALLOWEDIP_A_FAMILY: NLA_U16
102 * WGALLOWEDIP_A_IPADDR: struct in_addr or struct in6_addr
103 * WGALLOWEDIP_A_CIDR_MASK: NLA_U8
104 * 0: NLA_NESTED
105 * ...
106 * 0: NLA_NESTED
107 * ...
108 * ...
109 * WGPEER_A_PROTOCOL_VERSION: NLA_U32, should not be set or used at
110 * all by most users of this API, as the
111 * most recent protocol will be used when
112 * this is unset. Otherwise, must be set
113 * to 1.
114 * 0: NLA_NESTED
115 * ...
116 * ...
117 *
118 * It is possible that the amount of configuration data exceeds that of
119 * the maximum message length accepted by the kernel. In that case, several
120 * messages should be sent one after another, with each successive one
121 * filling in information not contained in the prior. Note that if
122 * WGDEVICE_F_REPLACE_PEERS is specified in the first message, it probably
123 * should not be specified in fragments that come after, so that the list
124 * of peers is only cleared the first time but appended after. Likewise for
125 * peers, if WGPEER_F_REPLACE_ALLOWEDIPS is specified in the first message
126 * of a peer, it likely should not be specified in subsequent fragments.
127 *
128 * If an error occurs, NLMSG_ERROR will reply containing an errno.
129 */
130
131#ifndef _WG_UAPI_WIREGUARD_H
132#define _WG_UAPI_WIREGUARD_H
133
134#define WG_GENL_NAME "wireguard"
135#define WG_GENL_VERSION 1
136
137#define WG_KEY_LEN 32
138
139enum wg_cmd {
140 WG_CMD_GET_DEVICE,
141 WG_CMD_SET_DEVICE,
142 __WG_CMD_MAX
143};
144#define WG_CMD_MAX (__WG_CMD_MAX - 1)
145
146enum wgdevice_flag {
147 WGDEVICE_F_REPLACE_PEERS = 1U << 0,
148 __WGDEVICE_F_ALL = WGDEVICE_F_REPLACE_PEERS
149};
150enum wgdevice_attribute {
151 WGDEVICE_A_UNSPEC,
152 WGDEVICE_A_IFINDEX,
153 WGDEVICE_A_IFNAME,
154 WGDEVICE_A_PRIVATE_KEY,
155 WGDEVICE_A_PUBLIC_KEY,
156 WGDEVICE_A_FLAGS,
157 WGDEVICE_A_LISTEN_PORT,
158 WGDEVICE_A_FWMARK,
159 WGDEVICE_A_PEERS,
160 __WGDEVICE_A_LAST
161};
162#define WGDEVICE_A_MAX (__WGDEVICE_A_LAST - 1)
163
164enum wgpeer_flag {
165 WGPEER_F_REMOVE_ME = 1U << 0,
166 WGPEER_F_REPLACE_ALLOWEDIPS = 1U << 1,
167 WGPEER_F_UPDATE_ONLY = 1U << 2,
168 __WGPEER_F_ALL = WGPEER_F_REMOVE_ME | WGPEER_F_REPLACE_ALLOWEDIPS |
169 WGPEER_F_UPDATE_ONLY
170};
171enum wgpeer_attribute {
172 WGPEER_A_UNSPEC,
173 WGPEER_A_PUBLIC_KEY,
174 WGPEER_A_PRESHARED_KEY,
175 WGPEER_A_FLAGS,
176 WGPEER_A_ENDPOINT,
177 WGPEER_A_PERSISTENT_KEEPALIVE_INTERVAL,
178 WGPEER_A_LAST_HANDSHAKE_TIME,
179 WGPEER_A_RX_BYTES,
180 WGPEER_A_TX_BYTES,
181 WGPEER_A_ALLOWEDIPS,
182 WGPEER_A_PROTOCOL_VERSION,
183 __WGPEER_A_LAST
184};
185#define WGPEER_A_MAX (__WGPEER_A_LAST - 1)
186
187enum wgallowedip_attribute {
188 WGALLOWEDIP_A_UNSPEC,
189 WGALLOWEDIP_A_FAMILY,
190 WGALLOWEDIP_A_IPADDR,
191 WGALLOWEDIP_A_CIDR_MASK,
192 __WGALLOWEDIP_A_LAST
193};
194#define WGALLOWEDIP_A_MAX (__WGALLOWEDIP_A_LAST - 1)
195
196#endif /* _WG_UAPI_WIREGUARD_H */