aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-11-13 03:40:34 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-11-13 03:40:34 -0500
commit42a2d923cc349583ebf6fdd52a7d35e1c2f7e6bd (patch)
tree2b2b0c03b5389c1301800119333967efafd994ca /include/uapi/linux
parent5cbb3d216e2041700231bcfc383ee5f8b7fc8b74 (diff)
parent75ecab1df14d90e86cebef9ec5c76befde46e65f (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
Pull networking updates from David Miller: 1) The addition of nftables. No longer will we need protocol aware firewall filtering modules, it can all live in userspace. At the core of nftables is a, for lack of a better term, virtual machine that executes byte codes to inspect packet or metadata (arriving interface index, etc.) and make verdict decisions. Besides support for loading packet contents and comparing them, the interpreter supports lookups in various datastructures as fundamental operations. For example sets are supports, and therefore one could create a set of whitelist IP address entries which have ACCEPT verdicts attached to them, and use the appropriate byte codes to do such lookups. Since the interpreted code is composed in userspace, userspace can do things like optimize things before giving it to the kernel. Another major improvement is the capability of atomically updating portions of the ruleset. In the existing netfilter implementation, one has to update the entire rule set in order to make a change and this is very expensive. Userspace tools exist to create nftables rules using existing netfilter rule sets, but both kernel implementations will need to co-exist for quite some time as we transition from the old to the new stuff. Kudos to Patrick McHardy, Pablo Neira Ayuso, and others who have worked so hard on this. 2) Daniel Borkmann and Hannes Frederic Sowa made several improvements to our pseudo-random number generator, mostly used for things like UDP port randomization and netfitler, amongst other things. In particular the taus88 generater is updated to taus113, and test cases are added. 3) Support 64-bit rates in HTB and TBF schedulers, from Eric Dumazet and Yang Yingliang. 4) Add support for new 577xx tigon3 chips to tg3 driver, from Nithin Sujir. 5) Fix two fatal flaws in TCP dynamic right sizing, from Eric Dumazet, Neal Cardwell, and Yuchung Cheng. 6) Allow IP_TOS and IP_TTL to be specified in sendmsg() ancillary control message data, much like other socket option attributes. From Francesco Fusco. 7) Allow applications to specify a cap on the rate computed automatically by the kernel for pacing flows, via a new SO_MAX_PACING_RATE socket option. From Eric Dumazet. 8) Make the initial autotuned send buffer sizing in TCP more closely reflect actual needs, from Eric Dumazet. 9) Currently early socket demux only happens for TCP sockets, but we can do it for connected UDP sockets too. Implementation from Shawn Bohrer. 10) Refactor inet socket demux with the goal of improving hash demux performance for listening sockets. With the main goals being able to use RCU lookups on even request sockets, and eliminating the listening lock contention. From Eric Dumazet. 11) The bonding layer has many demuxes in it's fast path, and an RCU conversion was started back in 3.11, several changes here extend the RCU usage to even more locations. From Ding Tianhong and Wang Yufen, based upon suggestions by Nikolay Aleksandrov and Veaceslav Falico. 12) Allow stackability of segmentation offloads to, in particular, allow segmentation offloading over tunnels. From Eric Dumazet. 13) Significantly improve the handling of secret keys we input into the various hash functions in the inet hashtables, TCP fast open, as well as syncookies. From Hannes Frederic Sowa. The key fundamental operation is "net_get_random_once()" which uses static keys. Hannes even extended this to ipv4/ipv6 fragmentation handling and our generic flow dissector. 14) The generic driver layer takes care now to set the driver data to NULL on device removal, so it's no longer necessary for drivers to explicitly set it to NULL any more. Many drivers have been cleaned up in this way, from Jingoo Han. 15) Add a BPF based packet scheduler classifier, from Daniel Borkmann. 16) Improve CRC32 interfaces and generic SKB checksum iterators so that SCTP's checksumming can more cleanly be handled. Also from Daniel Borkmann. 17) Add a new PMTU discovery mode, IP_PMTUDISC_INTERFACE, which forces using the interface MTU value. This helps avoid PMTU attacks, particularly on DNS servers. From Hannes Frederic Sowa. 18) Use generic XPS for transmit queue steering rather than internal (re-)implementation in virtio-net. From Jason Wang. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1622 commits) random32: add test cases for taus113 implementation random32: upgrade taus88 generator to taus113 from errata paper random32: move rnd_state to linux/random.h random32: add prandom_reseed_late() and call when nonblocking pool becomes initialized random32: add periodic reseeding random32: fix off-by-one in seeding requirement PHY: Add RTL8201CP phy_driver to realtek xtsonic: add missing platform_set_drvdata() in xtsonic_probe() macmace: add missing platform_set_drvdata() in mace_probe() ethernet/arc/arc_emac: add missing platform_set_drvdata() in arc_emac_probe() ipv6: protect for_each_sk_fl_rcu in mem_check with rcu_read_lock_bh vlan: Implement vlan_dev_get_egress_qos_mask as an inline. ixgbe: add warning when max_vfs is out of range. igb: Update link modes display in ethtool netfilter: push reasm skb through instead of original frag skbs ip6_output: fragment outgoing reassembled skb properly MAINTAINERS: mv643xx_eth: take over maintainership from Lennart net_sched: tbf: support of 64bit rates ixgbe: deleting dfwd stations out of order can cause null ptr deref ixgbe: fix build err, num_rx_queues is only available with CONFIG_RPS ...
Diffstat (limited to 'include/uapi/linux')
-rw-r--r--include/uapi/linux/can/bcm.h32
-rw-r--r--include/uapi/linux/can/error.h32
-rw-r--r--include/uapi/linux/can/gw.h32
-rw-r--r--include/uapi/linux/can/netlink.h8
-rw-r--r--include/uapi/linux/can/raw.h32
-rw-r--r--include/uapi/linux/hsr_netlink.h50
-rw-r--r--include/uapi/linux/if.h1
-rw-r--r--include/uapi/linux/if_bonding.h2
-rw-r--r--include/uapi/linux/if_ether.h1
-rw-r--r--include/uapi/linux/if_link.h24
-rw-r--r--include/uapi/linux/in.h5
-rw-r--r--include/uapi/linux/ip_vs.h2
-rw-r--r--include/uapi/linux/netfilter/Kbuild2
-rw-r--r--include/uapi/linux/netfilter/ipset/ip_set.h16
-rw-r--r--include/uapi/linux/netfilter/nf_conntrack_common.h4
-rw-r--r--include/uapi/linux/netfilter/nf_tables.h718
-rw-r--r--include/uapi/linux/netfilter/nf_tables_compat.h38
-rw-r--r--include/uapi/linux/netfilter/nfnetlink.h10
-rw-r--r--include/uapi/linux/netfilter/nfnetlink_cttimeout.h2
-rw-r--r--include/uapi/linux/nfc.h4
-rw-r--r--include/uapi/linux/nl80211.h27
-rw-r--r--include/uapi/linux/openvswitch.h18
-rw-r--r--include/uapi/linux/pkt_cls.h14
-rw-r--r--include/uapi/linux/pkt_sched.h4
-rw-r--r--include/uapi/linux/random.h7
25 files changed, 1067 insertions, 18 deletions
diff --git a/include/uapi/linux/can/bcm.h b/include/uapi/linux/can/bcm.h
index 3ebe387fea4d..382251a1d214 100644
--- a/include/uapi/linux/can/bcm.h
+++ b/include/uapi/linux/can/bcm.h
@@ -7,6 +7,38 @@
7 * Copyright (c) 2002-2007 Volkswagen Group Electronic Research 7 * Copyright (c) 2002-2007 Volkswagen Group Electronic Research
8 * All rights reserved. 8 * All rights reserved.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
12 * are met:
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
18 * 3. Neither the name of Volkswagen nor the names of its contributors
19 * may be used to endorse or promote products derived from this software
20 * without specific prior written permission.
21 *
22 * Alternatively, provided that this notice is retained in full, this
23 * software may be distributed under the terms of the GNU General
24 * Public License ("GPL") version 2, in which case the provisions of the
25 * GPL apply INSTEAD OF those given above.
26 *
27 * The provided data structures and external interfaces from this code
28 * are not restricted to be used by modules with a GPL compatible license.
29 *
30 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
31 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
32 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
33 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
34 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
35 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
36 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
37 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
38 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
39 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
40 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
41 * DAMAGE.
10 */ 42 */
11 43
12#ifndef CAN_BCM_H 44#ifndef CAN_BCM_H
diff --git a/include/uapi/linux/can/error.h b/include/uapi/linux/can/error.h
index 7b7148bded71..b63204545320 100644
--- a/include/uapi/linux/can/error.h
+++ b/include/uapi/linux/can/error.h
@@ -7,6 +7,38 @@
7 * Copyright (c) 2002-2007 Volkswagen Group Electronic Research 7 * Copyright (c) 2002-2007 Volkswagen Group Electronic Research
8 * All rights reserved. 8 * All rights reserved.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
12 * are met:
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
18 * 3. Neither the name of Volkswagen nor the names of its contributors
19 * may be used to endorse or promote products derived from this software
20 * without specific prior written permission.
21 *
22 * Alternatively, provided that this notice is retained in full, this
23 * software may be distributed under the terms of the GNU General
24 * Public License ("GPL") version 2, in which case the provisions of the
25 * GPL apply INSTEAD OF those given above.
26 *
27 * The provided data structures and external interfaces from this code
28 * are not restricted to be used by modules with a GPL compatible license.
29 *
30 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
31 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
32 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
33 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
34 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
35 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
36 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
37 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
38 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
39 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
40 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
41 * DAMAGE.
10 */ 42 */
11 43
12#ifndef CAN_ERROR_H 44#ifndef CAN_ERROR_H
diff --git a/include/uapi/linux/can/gw.h b/include/uapi/linux/can/gw.h
index 4e27c82b564a..844c8964bdfe 100644
--- a/include/uapi/linux/can/gw.h
+++ b/include/uapi/linux/can/gw.h
@@ -7,6 +7,38 @@
7 * Copyright (c) 2011 Volkswagen Group Electronic Research 7 * Copyright (c) 2011 Volkswagen Group Electronic Research
8 * All rights reserved. 8 * All rights reserved.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
12 * are met:
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
18 * 3. Neither the name of Volkswagen nor the names of its contributors
19 * may be used to endorse or promote products derived from this software
20 * without specific prior written permission.
21 *
22 * Alternatively, provided that this notice is retained in full, this
23 * software may be distributed under the terms of the GNU General
24 * Public License ("GPL") version 2, in which case the provisions of the
25 * GPL apply INSTEAD OF those given above.
26 *
27 * The provided data structures and external interfaces from this code
28 * are not restricted to be used by modules with a GPL compatible license.
29 *
30 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
31 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
32 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
33 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
34 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
35 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
36 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
37 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
38 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
39 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
40 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
41 * DAMAGE.
10 */ 42 */
11 43
12#ifndef CAN_GW_H 44#ifndef CAN_GW_H
diff --git a/include/uapi/linux/can/netlink.h b/include/uapi/linux/can/netlink.h
index 14966ddb7df1..df944ed206a8 100644
--- a/include/uapi/linux/can/netlink.h
+++ b/include/uapi/linux/can/netlink.h
@@ -5,6 +5,14 @@
5 * 5 *
6 * Copyright (c) 2009 Wolfgang Grandegger <wg@grandegger.com> 6 * Copyright (c) 2009 Wolfgang Grandegger <wg@grandegger.com>
7 * 7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the version 2 of the GNU General Public License
10 * as published by the Free Software Foundation
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
8 */ 16 */
9 17
10#ifndef CAN_NETLINK_H 18#ifndef CAN_NETLINK_H
diff --git a/include/uapi/linux/can/raw.h b/include/uapi/linux/can/raw.h
index a814062b0719..c7d8c334e0ce 100644
--- a/include/uapi/linux/can/raw.h
+++ b/include/uapi/linux/can/raw.h
@@ -8,6 +8,38 @@
8 * Copyright (c) 2002-2007 Volkswagen Group Electronic Research 8 * Copyright (c) 2002-2007 Volkswagen Group Electronic Research
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
13 * are met:
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions and the following disclaimer.
16 * 2. Redistributions in binary form must reproduce the above copyright
17 * notice, this list of conditions and the following disclaimer in the
18 * documentation and/or other materials provided with the distribution.
19 * 3. Neither the name of Volkswagen nor the names of its contributors
20 * may be used to endorse or promote products derived from this software
21 * without specific prior written permission.
22 *
23 * Alternatively, provided that this notice is retained in full, this
24 * software may be distributed under the terms of the GNU General
25 * Public License ("GPL") version 2, in which case the provisions of the
26 * GPL apply INSTEAD OF those given above.
27 *
28 * The provided data structures and external interfaces from this code
29 * are not restricted to be used by modules with a GPL compatible license.
30 *
31 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
34 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
36 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
37 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
38 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
39 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
40 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
41 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
42 * DAMAGE.
11 */ 43 */
12 44
13#ifndef CAN_RAW_H 45#ifndef CAN_RAW_H
diff --git a/include/uapi/linux/hsr_netlink.h b/include/uapi/linux/hsr_netlink.h
new file mode 100644
index 000000000000..2475cb8a53af
--- /dev/null
+++ b/include/uapi/linux/hsr_netlink.h
@@ -0,0 +1,50 @@
1/*
2 * Copyright 2011-2013 Autronica Fire and Security AS
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the Free
6 * Software Foundation; either version 2 of the License, or (at your option)
7 * any later version.
8 *
9 * Author(s):
10 * 2011-2013 Arvid Brodin, arvid.brodin@xdin.com
11 */
12
13#ifndef __UAPI_HSR_NETLINK_H
14#define __UAPI_HSR_NETLINK_H
15
16/* Generic Netlink HSR family definition
17 */
18
19/* attributes */
20enum {
21 HSR_A_UNSPEC,
22 HSR_A_NODE_ADDR,
23 HSR_A_IFINDEX,
24 HSR_A_IF1_AGE,
25 HSR_A_IF2_AGE,
26 HSR_A_NODE_ADDR_B,
27 HSR_A_IF1_SEQ,
28 HSR_A_IF2_SEQ,
29 HSR_A_IF1_IFINDEX,
30 HSR_A_IF2_IFINDEX,
31 HSR_A_ADDR_B_IFINDEX,
32 __HSR_A_MAX,
33};
34#define HSR_A_MAX (__HSR_A_MAX - 1)
35
36
37/* commands */
38enum {
39 HSR_C_UNSPEC,
40 HSR_C_RING_ERROR,
41 HSR_C_NODE_DOWN,
42 HSR_C_GET_NODE_STATUS,
43 HSR_C_SET_NODE_STATUS,
44 HSR_C_GET_NODE_LIST,
45 HSR_C_SET_NODE_LIST,
46 __HSR_C_MAX,
47};
48#define HSR_C_MAX (__HSR_C_MAX - 1)
49
50#endif /* __UAPI_HSR_NETLINK_H */
diff --git a/include/uapi/linux/if.h b/include/uapi/linux/if.h
index 1ec407b01e46..d758163b0e43 100644
--- a/include/uapi/linux/if.h
+++ b/include/uapi/linux/if.h
@@ -83,6 +83,7 @@
83#define IFF_SUPP_NOFCS 0x80000 /* device supports sending custom FCS */ 83#define IFF_SUPP_NOFCS 0x80000 /* device supports sending custom FCS */
84#define IFF_LIVE_ADDR_CHANGE 0x100000 /* device supports hardware address 84#define IFF_LIVE_ADDR_CHANGE 0x100000 /* device supports hardware address
85 * change when it's running */ 85 * change when it's running */
86#define IFF_MACVLAN 0x200000 /* Macvlan device */
86 87
87 88
88#define IF_GET_IFACE 0x0001 /* for querying only */ 89#define IF_GET_IFACE 0x0001 /* for querying only */
diff --git a/include/uapi/linux/if_bonding.h b/include/uapi/linux/if_bonding.h
index a17edda8a781..9635a62f6f89 100644
--- a/include/uapi/linux/if_bonding.h
+++ b/include/uapi/linux/if_bonding.h
@@ -91,6 +91,8 @@
91#define BOND_XMIT_POLICY_LAYER2 0 /* layer 2 (MAC only), default */ 91#define BOND_XMIT_POLICY_LAYER2 0 /* layer 2 (MAC only), default */
92#define BOND_XMIT_POLICY_LAYER34 1 /* layer 3+4 (IP ^ (TCP || UDP)) */ 92#define BOND_XMIT_POLICY_LAYER34 1 /* layer 3+4 (IP ^ (TCP || UDP)) */
93#define BOND_XMIT_POLICY_LAYER23 2 /* layer 2+3 (IP ^ MAC) */ 93#define BOND_XMIT_POLICY_LAYER23 2 /* layer 2+3 (IP ^ MAC) */
94#define BOND_XMIT_POLICY_ENCAP23 3 /* encapsulated layer 2+3 */
95#define BOND_XMIT_POLICY_ENCAP34 4 /* encapsulated layer 3+4 */
94 96
95typedef struct ifbond { 97typedef struct ifbond {
96 __s32 bond_mode; 98 __s32 bond_mode;
diff --git a/include/uapi/linux/if_ether.h b/include/uapi/linux/if_ether.h
index ade07f1c491a..2ce0f6a78fa5 100644
--- a/include/uapi/linux/if_ether.h
+++ b/include/uapi/linux/if_ether.h
@@ -85,6 +85,7 @@
85#define ETH_P_8021AH 0x88E7 /* 802.1ah Backbone Service Tag */ 85#define ETH_P_8021AH 0x88E7 /* 802.1ah Backbone Service Tag */
86#define ETH_P_MVRP 0x88F5 /* 802.1Q MVRP */ 86#define ETH_P_MVRP 0x88F5 /* 802.1Q MVRP */
87#define ETH_P_1588 0x88F7 /* IEEE 1588 Timesync */ 87#define ETH_P_1588 0x88F7 /* IEEE 1588 Timesync */
88#define ETH_P_PRP 0x88FB /* IEC 62439-3 PRP/HSRv0 */
88#define ETH_P_FCOE 0x8906 /* Fibre Channel over Ethernet */ 89#define ETH_P_FCOE 0x8906 /* Fibre Channel over Ethernet */
89#define ETH_P_TDLS 0x890D /* TDLS */ 90#define ETH_P_TDLS 0x890D /* TDLS */
90#define ETH_P_FIP 0x8914 /* FCoE Initialization Protocol */ 91#define ETH_P_FIP 0x8914 /* FCoE Initialization Protocol */
diff --git a/include/uapi/linux/if_link.h b/include/uapi/linux/if_link.h
index 80394e8dc3a3..b78566f59aba 100644
--- a/include/uapi/linux/if_link.h
+++ b/include/uapi/linux/if_link.h
@@ -325,6 +325,17 @@ struct ifla_vxlan_port_range {
325 __be16 high; 325 __be16 high;
326}; 326};
327 327
328/* Bonding section */
329
330enum {
331 IFLA_BOND_UNSPEC,
332 IFLA_BOND_MODE,
333 IFLA_BOND_ACTIVE_SLAVE,
334 __IFLA_BOND_MAX,
335};
336
337#define IFLA_BOND_MAX (__IFLA_BOND_MAX - 1)
338
328/* SR-IOV virtual function management section */ 339/* SR-IOV virtual function management section */
329 340
330enum { 341enum {
@@ -470,4 +481,17 @@ enum {
470 481
471#define IFLA_IPOIB_MAX (__IFLA_IPOIB_MAX - 1) 482#define IFLA_IPOIB_MAX (__IFLA_IPOIB_MAX - 1)
472 483
484
485/* HSR section */
486
487enum {
488 IFLA_HSR_UNSPEC,
489 IFLA_HSR_SLAVE1,
490 IFLA_HSR_SLAVE2,
491 IFLA_HSR_MULTICAST_SPEC,
492 __IFLA_HSR_MAX,
493};
494
495#define IFLA_HSR_MAX (__IFLA_HSR_MAX - 1)
496
473#endif /* _UAPI_LINUX_IF_LINK_H */ 497#endif /* _UAPI_LINUX_IF_LINK_H */
diff --git a/include/uapi/linux/in.h b/include/uapi/linux/in.h
index f9e8e496ae5d..393c5de09d42 100644
--- a/include/uapi/linux/in.h
+++ b/include/uapi/linux/in.h
@@ -115,6 +115,11 @@ struct in_addr {
115#define IP_PMTUDISC_WANT 1 /* Use per route hints */ 115#define IP_PMTUDISC_WANT 1 /* Use per route hints */
116#define IP_PMTUDISC_DO 2 /* Always DF */ 116#define IP_PMTUDISC_DO 2 /* Always DF */
117#define IP_PMTUDISC_PROBE 3 /* Ignore dst pmtu */ 117#define IP_PMTUDISC_PROBE 3 /* Ignore dst pmtu */
118/* Always use interface mtu (ignores dst pmtu) but don't set DF flag.
119 * Also incoming ICMP frag_needed notifications will be ignored on
120 * this socket to prevent accepting spoofed ones.
121 */
122#define IP_PMTUDISC_INTERFACE 4
118 123
119#define IP_MULTICAST_IF 32 124#define IP_MULTICAST_IF 32
120#define IP_MULTICAST_TTL 33 125#define IP_MULTICAST_TTL 33
diff --git a/include/uapi/linux/ip_vs.h b/include/uapi/linux/ip_vs.h
index 29458223d044..fbcffe8041f7 100644
--- a/include/uapi/linux/ip_vs.h
+++ b/include/uapi/linux/ip_vs.h
@@ -334,7 +334,7 @@ enum {
334 __IPVS_CMD_ATTR_MAX, 334 __IPVS_CMD_ATTR_MAX,
335}; 335};
336 336
337#define IPVS_CMD_ATTR_MAX (__IPVS_SVC_ATTR_MAX - 1) 337#define IPVS_CMD_ATTR_MAX (__IPVS_CMD_ATTR_MAX - 1)
338 338
339/* 339/*
340 * Attributes used to describe a service 340 * Attributes used to describe a service
diff --git a/include/uapi/linux/netfilter/Kbuild b/include/uapi/linux/netfilter/Kbuild
index 174915420d3f..17c3af2c4bb9 100644
--- a/include/uapi/linux/netfilter/Kbuild
+++ b/include/uapi/linux/netfilter/Kbuild
@@ -5,6 +5,8 @@ header-y += nf_conntrack_ftp.h
5header-y += nf_conntrack_sctp.h 5header-y += nf_conntrack_sctp.h
6header-y += nf_conntrack_tcp.h 6header-y += nf_conntrack_tcp.h
7header-y += nf_conntrack_tuple_common.h 7header-y += nf_conntrack_tuple_common.h
8header-y += nf_tables.h
9header-y += nf_tables_compat.h
8header-y += nf_nat.h 10header-y += nf_nat.h
9header-y += nfnetlink.h 11header-y += nfnetlink.h
10header-y += nfnetlink_acct.h 12header-y += nfnetlink_acct.h
diff --git a/include/uapi/linux/netfilter/ipset/ip_set.h b/include/uapi/linux/netfilter/ipset/ip_set.h
index 8024cdf13b70..25d3b2f79c02 100644
--- a/include/uapi/linux/netfilter/ipset/ip_set.h
+++ b/include/uapi/linux/netfilter/ipset/ip_set.h
@@ -10,12 +10,14 @@
10#ifndef _UAPI_IP_SET_H 10#ifndef _UAPI_IP_SET_H
11#define _UAPI_IP_SET_H 11#define _UAPI_IP_SET_H
12 12
13
14#include <linux/types.h> 13#include <linux/types.h>
15 14
16/* The protocol version */ 15/* The protocol version */
17#define IPSET_PROTOCOL 6 16#define IPSET_PROTOCOL 6
18 17
18/* The maximum permissible comment length we will accept over netlink */
19#define IPSET_MAX_COMMENT_SIZE 255
20
19/* The max length of strings including NUL: set and type identifiers */ 21/* The max length of strings including NUL: set and type identifiers */
20#define IPSET_MAXNAMELEN 32 22#define IPSET_MAXNAMELEN 32
21 23
@@ -110,6 +112,7 @@ enum {
110 IPSET_ATTR_IFACE, 112 IPSET_ATTR_IFACE,
111 IPSET_ATTR_BYTES, 113 IPSET_ATTR_BYTES,
112 IPSET_ATTR_PACKETS, 114 IPSET_ATTR_PACKETS,
115 IPSET_ATTR_COMMENT,
113 __IPSET_ATTR_ADT_MAX, 116 __IPSET_ATTR_ADT_MAX,
114}; 117};
115#define IPSET_ATTR_ADT_MAX (__IPSET_ATTR_ADT_MAX - 1) 118#define IPSET_ATTR_ADT_MAX (__IPSET_ATTR_ADT_MAX - 1)
@@ -140,6 +143,7 @@ enum ipset_errno {
140 IPSET_ERR_IPADDR_IPV4, 143 IPSET_ERR_IPADDR_IPV4,
141 IPSET_ERR_IPADDR_IPV6, 144 IPSET_ERR_IPADDR_IPV6,
142 IPSET_ERR_COUNTER, 145 IPSET_ERR_COUNTER,
146 IPSET_ERR_COMMENT,
143 147
144 /* Type specific error codes */ 148 /* Type specific error codes */
145 IPSET_ERR_TYPE_SPECIFIC = 4352, 149 IPSET_ERR_TYPE_SPECIFIC = 4352,
@@ -176,6 +180,8 @@ enum ipset_cadt_flags {
176 IPSET_FLAG_NOMATCH = (1 << IPSET_FLAG_BIT_NOMATCH), 180 IPSET_FLAG_NOMATCH = (1 << IPSET_FLAG_BIT_NOMATCH),
177 IPSET_FLAG_BIT_WITH_COUNTERS = 3, 181 IPSET_FLAG_BIT_WITH_COUNTERS = 3,
178 IPSET_FLAG_WITH_COUNTERS = (1 << IPSET_FLAG_BIT_WITH_COUNTERS), 182 IPSET_FLAG_WITH_COUNTERS = (1 << IPSET_FLAG_BIT_WITH_COUNTERS),
183 IPSET_FLAG_BIT_WITH_COMMENT = 4,
184 IPSET_FLAG_WITH_COMMENT = (1 << IPSET_FLAG_BIT_WITH_COMMENT),
179 IPSET_FLAG_CADT_MAX = 15, 185 IPSET_FLAG_CADT_MAX = 15,
180}; 186};
181 187
@@ -250,6 +256,14 @@ struct ip_set_req_get_set {
250#define IP_SET_OP_GET_BYINDEX 0x00000007 /* Get set name by index */ 256#define IP_SET_OP_GET_BYINDEX 0x00000007 /* Get set name by index */
251/* Uses ip_set_req_get_set */ 257/* Uses ip_set_req_get_set */
252 258
259#define IP_SET_OP_GET_FNAME 0x00000008 /* Get set index and family */
260struct ip_set_req_get_set_family {
261 unsigned int op;
262 unsigned int version;
263 unsigned int family;
264 union ip_set_name_index set;
265};
266
253#define IP_SET_OP_VERSION 0x00000100 /* Ask kernel version */ 267#define IP_SET_OP_VERSION 0x00000100 /* Ask kernel version */
254struct ip_set_req_version { 268struct ip_set_req_version {
255 unsigned int op; 269 unsigned int op;
diff --git a/include/uapi/linux/netfilter/nf_conntrack_common.h b/include/uapi/linux/netfilter/nf_conntrack_common.h
index 8dd803818ebe..319f47128db8 100644
--- a/include/uapi/linux/netfilter/nf_conntrack_common.h
+++ b/include/uapi/linux/netfilter/nf_conntrack_common.h
@@ -25,6 +25,10 @@ enum ip_conntrack_info {
25 IP_CT_NUMBER = IP_CT_IS_REPLY * 2 - 1 25 IP_CT_NUMBER = IP_CT_IS_REPLY * 2 - 1
26}; 26};
27 27
28#define NF_CT_STATE_INVALID_BIT (1 << 0)
29#define NF_CT_STATE_BIT(ctinfo) (1 << ((ctinfo) % IP_CT_IS_REPLY + 1))
30#define NF_CT_STATE_UNTRACKED_BIT (1 << (IP_CT_NUMBER + 1))
31
28/* Bitset representing status of connection. */ 32/* Bitset representing status of connection. */
29enum ip_conntrack_status { 33enum ip_conntrack_status {
30 /* It's an expected connection: bit 0 set. This bit never changed */ 34 /* It's an expected connection: bit 0 set. This bit never changed */
diff --git a/include/uapi/linux/netfilter/nf_tables.h b/include/uapi/linux/netfilter/nf_tables.h
new file mode 100644
index 000000000000..fbfd229a8e99
--- /dev/null
+++ b/include/uapi/linux/netfilter/nf_tables.h
@@ -0,0 +1,718 @@
1#ifndef _LINUX_NF_TABLES_H
2#define _LINUX_NF_TABLES_H
3
4#define NFT_CHAIN_MAXNAMELEN 32
5
6enum nft_registers {
7 NFT_REG_VERDICT,
8 NFT_REG_1,
9 NFT_REG_2,
10 NFT_REG_3,
11 NFT_REG_4,
12 __NFT_REG_MAX
13};
14#define NFT_REG_MAX (__NFT_REG_MAX - 1)
15
16/**
17 * enum nft_verdicts - nf_tables internal verdicts
18 *
19 * @NFT_CONTINUE: continue evaluation of the current rule
20 * @NFT_BREAK: terminate evaluation of the current rule
21 * @NFT_JUMP: push the current chain on the jump stack and jump to a chain
22 * @NFT_GOTO: jump to a chain without pushing the current chain on the jump stack
23 * @NFT_RETURN: return to the topmost chain on the jump stack
24 *
25 * The nf_tables verdicts share their numeric space with the netfilter verdicts.
26 */
27enum nft_verdicts {
28 NFT_CONTINUE = -1,
29 NFT_BREAK = -2,
30 NFT_JUMP = -3,
31 NFT_GOTO = -4,
32 NFT_RETURN = -5,
33};
34
35/**
36 * enum nf_tables_msg_types - nf_tables netlink message types
37 *
38 * @NFT_MSG_NEWTABLE: create a new table (enum nft_table_attributes)
39 * @NFT_MSG_GETTABLE: get a table (enum nft_table_attributes)
40 * @NFT_MSG_DELTABLE: delete a table (enum nft_table_attributes)
41 * @NFT_MSG_NEWCHAIN: create a new chain (enum nft_chain_attributes)
42 * @NFT_MSG_GETCHAIN: get a chain (enum nft_chain_attributes)
43 * @NFT_MSG_DELCHAIN: delete a chain (enum nft_chain_attributes)
44 * @NFT_MSG_NEWRULE: create a new rule (enum nft_rule_attributes)
45 * @NFT_MSG_GETRULE: get a rule (enum nft_rule_attributes)
46 * @NFT_MSG_DELRULE: delete a rule (enum nft_rule_attributes)
47 * @NFT_MSG_NEWSET: create a new set (enum nft_set_attributes)
48 * @NFT_MSG_GETSET: get a set (enum nft_set_attributes)
49 * @NFT_MSG_DELSET: delete a set (enum nft_set_attributes)
50 * @NFT_MSG_NEWSETELEM: create a new set element (enum nft_set_elem_attributes)
51 * @NFT_MSG_GETSETELEM: get a set element (enum nft_set_elem_attributes)
52 * @NFT_MSG_DELSETELEM: delete a set element (enum nft_set_elem_attributes)
53 */
54enum nf_tables_msg_types {
55 NFT_MSG_NEWTABLE,
56 NFT_MSG_GETTABLE,
57 NFT_MSG_DELTABLE,
58 NFT_MSG_NEWCHAIN,
59 NFT_MSG_GETCHAIN,
60 NFT_MSG_DELCHAIN,
61 NFT_MSG_NEWRULE,
62 NFT_MSG_GETRULE,
63 NFT_MSG_DELRULE,
64 NFT_MSG_NEWSET,
65 NFT_MSG_GETSET,
66 NFT_MSG_DELSET,
67 NFT_MSG_NEWSETELEM,
68 NFT_MSG_GETSETELEM,
69 NFT_MSG_DELSETELEM,
70 NFT_MSG_MAX,
71};
72
73/**
74 * enum nft_list_attributes - nf_tables generic list netlink attributes
75 *
76 * @NFTA_LIST_ELEM: list element (NLA_NESTED)
77 */
78enum nft_list_attributes {
79 NFTA_LIST_UNPEC,
80 NFTA_LIST_ELEM,
81 __NFTA_LIST_MAX
82};
83#define NFTA_LIST_MAX (__NFTA_LIST_MAX - 1)
84
85/**
86 * enum nft_hook_attributes - nf_tables netfilter hook netlink attributes
87 *
88 * @NFTA_HOOK_HOOKNUM: netfilter hook number (NLA_U32)
89 * @NFTA_HOOK_PRIORITY: netfilter hook priority (NLA_U32)
90 */
91enum nft_hook_attributes {
92 NFTA_HOOK_UNSPEC,
93 NFTA_HOOK_HOOKNUM,
94 NFTA_HOOK_PRIORITY,
95 __NFTA_HOOK_MAX
96};
97#define NFTA_HOOK_MAX (__NFTA_HOOK_MAX - 1)
98
99/**
100 * enum nft_table_flags - nf_tables table flags
101 *
102 * @NFT_TABLE_F_DORMANT: this table is not active
103 */
104enum nft_table_flags {
105 NFT_TABLE_F_DORMANT = 0x1,
106};
107
108/**
109 * enum nft_table_attributes - nf_tables table netlink attributes
110 *
111 * @NFTA_TABLE_NAME: name of the table (NLA_STRING)
112 * @NFTA_TABLE_FLAGS: bitmask of enum nft_table_flags (NLA_U32)
113 */
114enum nft_table_attributes {
115 NFTA_TABLE_UNSPEC,
116 NFTA_TABLE_NAME,
117 NFTA_TABLE_FLAGS,
118 __NFTA_TABLE_MAX
119};
120#define NFTA_TABLE_MAX (__NFTA_TABLE_MAX - 1)
121
122/**
123 * enum nft_chain_attributes - nf_tables chain netlink attributes
124 *
125 * @NFTA_CHAIN_TABLE: name of the table containing the chain (NLA_STRING)
126 * @NFTA_CHAIN_HANDLE: numeric handle of the chain (NLA_U64)
127 * @NFTA_CHAIN_NAME: name of the chain (NLA_STRING)
128 * @NFTA_CHAIN_HOOK: hook specification for basechains (NLA_NESTED: nft_hook_attributes)
129 * @NFTA_CHAIN_POLICY: numeric policy of the chain (NLA_U32)
130 * @NFTA_CHAIN_USE: number of references to this chain (NLA_U32)
131 * @NFTA_CHAIN_TYPE: type name of the string (NLA_NUL_STRING)
132 * @NFTA_CHAIN_COUNTERS: counter specification of the chain (NLA_NESTED: nft_counter_attributes)
133 */
134enum nft_chain_attributes {
135 NFTA_CHAIN_UNSPEC,
136 NFTA_CHAIN_TABLE,
137 NFTA_CHAIN_HANDLE,
138 NFTA_CHAIN_NAME,
139 NFTA_CHAIN_HOOK,
140 NFTA_CHAIN_POLICY,
141 NFTA_CHAIN_USE,
142 NFTA_CHAIN_TYPE,
143 NFTA_CHAIN_COUNTERS,
144 __NFTA_CHAIN_MAX
145};
146#define NFTA_CHAIN_MAX (__NFTA_CHAIN_MAX - 1)
147
148/**
149 * enum nft_rule_attributes - nf_tables rule netlink attributes
150 *
151 * @NFTA_RULE_TABLE: name of the table containing the rule (NLA_STRING)
152 * @NFTA_RULE_CHAIN: name of the chain containing the rule (NLA_STRING)
153 * @NFTA_RULE_HANDLE: numeric handle of the rule (NLA_U64)
154 * @NFTA_RULE_EXPRESSIONS: list of expressions (NLA_NESTED: nft_expr_attributes)
155 * @NFTA_RULE_COMPAT: compatibility specifications of the rule (NLA_NESTED: nft_rule_compat_attributes)
156 * @NFTA_RULE_POSITION: numeric handle of the previous rule (NLA_U64)
157 */
158enum nft_rule_attributes {
159 NFTA_RULE_UNSPEC,
160 NFTA_RULE_TABLE,
161 NFTA_RULE_CHAIN,
162 NFTA_RULE_HANDLE,
163 NFTA_RULE_EXPRESSIONS,
164 NFTA_RULE_COMPAT,
165 NFTA_RULE_POSITION,
166 __NFTA_RULE_MAX
167};
168#define NFTA_RULE_MAX (__NFTA_RULE_MAX - 1)
169
170/**
171 * enum nft_rule_compat_flags - nf_tables rule compat flags
172 *
173 * @NFT_RULE_COMPAT_F_INV: invert the check result
174 */
175enum nft_rule_compat_flags {
176 NFT_RULE_COMPAT_F_INV = (1 << 1),
177 NFT_RULE_COMPAT_F_MASK = NFT_RULE_COMPAT_F_INV,
178};
179
180/**
181 * enum nft_rule_compat_attributes - nf_tables rule compat attributes
182 *
183 * @NFTA_RULE_COMPAT_PROTO: numerice value of handled protocol (NLA_U32)
184 * @NFTA_RULE_COMPAT_FLAGS: bitmask of enum nft_rule_compat_flags (NLA_U32)
185 */
186enum nft_rule_compat_attributes {
187 NFTA_RULE_COMPAT_UNSPEC,
188 NFTA_RULE_COMPAT_PROTO,
189 NFTA_RULE_COMPAT_FLAGS,
190 __NFTA_RULE_COMPAT_MAX
191};
192#define NFTA_RULE_COMPAT_MAX (__NFTA_RULE_COMPAT_MAX - 1)
193
194/**
195 * enum nft_set_flags - nf_tables set flags
196 *
197 * @NFT_SET_ANONYMOUS: name allocation, automatic cleanup on unlink
198 * @NFT_SET_CONSTANT: set contents may not change while bound
199 * @NFT_SET_INTERVAL: set contains intervals
200 * @NFT_SET_MAP: set is used as a dictionary
201 */
202enum nft_set_flags {
203 NFT_SET_ANONYMOUS = 0x1,
204 NFT_SET_CONSTANT = 0x2,
205 NFT_SET_INTERVAL = 0x4,
206 NFT_SET_MAP = 0x8,
207};
208
209/**
210 * enum nft_set_attributes - nf_tables set netlink attributes
211 *
212 * @NFTA_SET_TABLE: table name (NLA_STRING)
213 * @NFTA_SET_NAME: set name (NLA_STRING)
214 * @NFTA_SET_FLAGS: bitmask of enum nft_set_flags (NLA_U32)
215 * @NFTA_SET_KEY_TYPE: key data type, informational purpose only (NLA_U32)
216 * @NFTA_SET_KEY_LEN: key data length (NLA_U32)
217 * @NFTA_SET_DATA_TYPE: mapping data type (NLA_U32)
218 * @NFTA_SET_DATA_LEN: mapping data length (NLA_U32)
219 */
220enum nft_set_attributes {
221 NFTA_SET_UNSPEC,
222 NFTA_SET_TABLE,
223 NFTA_SET_NAME,
224 NFTA_SET_FLAGS,
225 NFTA_SET_KEY_TYPE,
226 NFTA_SET_KEY_LEN,
227 NFTA_SET_DATA_TYPE,
228 NFTA_SET_DATA_LEN,
229 __NFTA_SET_MAX
230};
231#define NFTA_SET_MAX (__NFTA_SET_MAX - 1)
232
233/**
234 * enum nft_set_elem_flags - nf_tables set element flags
235 *
236 * @NFT_SET_ELEM_INTERVAL_END: element ends the previous interval
237 */
238enum nft_set_elem_flags {
239 NFT_SET_ELEM_INTERVAL_END = 0x1,
240};
241
242/**
243 * enum nft_set_elem_attributes - nf_tables set element netlink attributes
244 *
245 * @NFTA_SET_ELEM_KEY: key value (NLA_NESTED: nft_data)
246 * @NFTA_SET_ELEM_DATA: data value of mapping (NLA_NESTED: nft_data_attributes)
247 * @NFTA_SET_ELEM_FLAGS: bitmask of nft_set_elem_flags (NLA_U32)
248 */
249enum nft_set_elem_attributes {
250 NFTA_SET_ELEM_UNSPEC,
251 NFTA_SET_ELEM_KEY,
252 NFTA_SET_ELEM_DATA,
253 NFTA_SET_ELEM_FLAGS,
254 __NFTA_SET_ELEM_MAX
255};
256#define NFTA_SET_ELEM_MAX (__NFTA_SET_ELEM_MAX - 1)
257
258/**
259 * enum nft_set_elem_list_attributes - nf_tables set element list netlink attributes
260 *
261 * @NFTA_SET_ELEM_LIST_TABLE: table of the set to be changed (NLA_STRING)
262 * @NFTA_SET_ELEM_LIST_SET: name of the set to be changed (NLA_STRING)
263 * @NFTA_SET_ELEM_LIST_ELEMENTS: list of set elements (NLA_NESTED: nft_set_elem_attributes)
264 */
265enum nft_set_elem_list_attributes {
266 NFTA_SET_ELEM_LIST_UNSPEC,
267 NFTA_SET_ELEM_LIST_TABLE,
268 NFTA_SET_ELEM_LIST_SET,
269 NFTA_SET_ELEM_LIST_ELEMENTS,
270 __NFTA_SET_ELEM_LIST_MAX
271};
272#define NFTA_SET_ELEM_LIST_MAX (__NFTA_SET_ELEM_LIST_MAX - 1)
273
274/**
275 * enum nft_data_types - nf_tables data types
276 *
277 * @NFT_DATA_VALUE: generic data
278 * @NFT_DATA_VERDICT: netfilter verdict
279 *
280 * The type of data is usually determined by the kernel directly and is not
281 * explicitly specified by userspace. The only difference are sets, where
282 * userspace specifies the key and mapping data types.
283 *
284 * The values 0xffffff00-0xffffffff are reserved for internally used types.
285 * The remaining range can be freely used by userspace to encode types, all
286 * values are equivalent to NFT_DATA_VALUE.
287 */
288enum nft_data_types {
289 NFT_DATA_VALUE,
290 NFT_DATA_VERDICT = 0xffffff00U,
291};
292
293#define NFT_DATA_RESERVED_MASK 0xffffff00U
294
295/**
296 * enum nft_data_attributes - nf_tables data netlink attributes
297 *
298 * @NFTA_DATA_VALUE: generic data (NLA_BINARY)
299 * @NFTA_DATA_VERDICT: nf_tables verdict (NLA_NESTED: nft_verdict_attributes)
300 */
301enum nft_data_attributes {
302 NFTA_DATA_UNSPEC,
303 NFTA_DATA_VALUE,
304 NFTA_DATA_VERDICT,
305 __NFTA_DATA_MAX
306};
307#define NFTA_DATA_MAX (__NFTA_DATA_MAX - 1)
308
309/**
310 * enum nft_verdict_attributes - nf_tables verdict netlink attributes
311 *
312 * @NFTA_VERDICT_CODE: nf_tables verdict (NLA_U32: enum nft_verdicts)
313 * @NFTA_VERDICT_CHAIN: jump target chain name (NLA_STRING)
314 */
315enum nft_verdict_attributes {
316 NFTA_VERDICT_UNSPEC,
317 NFTA_VERDICT_CODE,
318 NFTA_VERDICT_CHAIN,
319 __NFTA_VERDICT_MAX
320};
321#define NFTA_VERDICT_MAX (__NFTA_VERDICT_MAX - 1)
322
323/**
324 * enum nft_expr_attributes - nf_tables expression netlink attributes
325 *
326 * @NFTA_EXPR_NAME: name of the expression type (NLA_STRING)
327 * @NFTA_EXPR_DATA: type specific data (NLA_NESTED)
328 */
329enum nft_expr_attributes {
330 NFTA_EXPR_UNSPEC,
331 NFTA_EXPR_NAME,
332 NFTA_EXPR_DATA,
333 __NFTA_EXPR_MAX
334};
335#define NFTA_EXPR_MAX (__NFTA_EXPR_MAX - 1)
336
337/**
338 * enum nft_immediate_attributes - nf_tables immediate expression netlink attributes
339 *
340 * @NFTA_IMMEDIATE_DREG: destination register to load data into (NLA_U32)
341 * @NFTA_IMMEDIATE_DATA: data to load (NLA_NESTED: nft_data_attributes)
342 */
343enum nft_immediate_attributes {
344 NFTA_IMMEDIATE_UNSPEC,
345 NFTA_IMMEDIATE_DREG,
346 NFTA_IMMEDIATE_DATA,
347 __NFTA_IMMEDIATE_MAX
348};
349#define NFTA_IMMEDIATE_MAX (__NFTA_IMMEDIATE_MAX - 1)
350
351/**
352 * enum nft_bitwise_attributes - nf_tables bitwise expression netlink attributes
353 *
354 * @NFTA_BITWISE_SREG: source register (NLA_U32: nft_registers)
355 * @NFTA_BITWISE_DREG: destination register (NLA_U32: nft_registers)
356 * @NFTA_BITWISE_LEN: length of operands (NLA_U32)
357 * @NFTA_BITWISE_MASK: mask value (NLA_NESTED: nft_data_attributes)
358 * @NFTA_BITWISE_XOR: xor value (NLA_NESTED: nft_data_attributes)
359 *
360 * The bitwise expression performs the following operation:
361 *
362 * dreg = (sreg & mask) ^ xor
363 *
364 * which allow to express all bitwise operations:
365 *
366 * mask xor
367 * NOT: 1 1
368 * OR: 0 x
369 * XOR: 1 x
370 * AND: x 0
371 */
372enum nft_bitwise_attributes {
373 NFTA_BITWISE_UNSPEC,
374 NFTA_BITWISE_SREG,
375 NFTA_BITWISE_DREG,
376 NFTA_BITWISE_LEN,
377 NFTA_BITWISE_MASK,
378 NFTA_BITWISE_XOR,
379 __NFTA_BITWISE_MAX
380};
381#define NFTA_BITWISE_MAX (__NFTA_BITWISE_MAX - 1)
382
383/**
384 * enum nft_byteorder_ops - nf_tables byteorder operators
385 *
386 * @NFT_BYTEORDER_NTOH: network to host operator
387 * @NFT_BYTEORDER_HTON: host to network opertaor
388 */
389enum nft_byteorder_ops {
390 NFT_BYTEORDER_NTOH,
391 NFT_BYTEORDER_HTON,
392};
393
394/**
395 * enum nft_byteorder_attributes - nf_tables byteorder expression netlink attributes
396 *
397 * @NFTA_BYTEORDER_SREG: source register (NLA_U32: nft_registers)
398 * @NFTA_BYTEORDER_DREG: destination register (NLA_U32: nft_registers)
399 * @NFTA_BYTEORDER_OP: operator (NLA_U32: enum nft_byteorder_ops)
400 * @NFTA_BYTEORDER_LEN: length of the data (NLA_U32)
401 * @NFTA_BYTEORDER_SIZE: data size in bytes (NLA_U32: 2 or 4)
402 */
403enum nft_byteorder_attributes {
404 NFTA_BYTEORDER_UNSPEC,
405 NFTA_BYTEORDER_SREG,
406 NFTA_BYTEORDER_DREG,
407 NFTA_BYTEORDER_OP,
408 NFTA_BYTEORDER_LEN,
409 NFTA_BYTEORDER_SIZE,
410 __NFTA_BYTEORDER_MAX
411};
412#define NFTA_BYTEORDER_MAX (__NFTA_BYTEORDER_MAX - 1)
413
414/**
415 * enum nft_cmp_ops - nf_tables relational operator
416 *
417 * @NFT_CMP_EQ: equal
418 * @NFT_CMP_NEQ: not equal
419 * @NFT_CMP_LT: less than
420 * @NFT_CMP_LTE: less than or equal to
421 * @NFT_CMP_GT: greater than
422 * @NFT_CMP_GTE: greater than or equal to
423 */
424enum nft_cmp_ops {
425 NFT_CMP_EQ,
426 NFT_CMP_NEQ,
427 NFT_CMP_LT,
428 NFT_CMP_LTE,
429 NFT_CMP_GT,
430 NFT_CMP_GTE,
431};
432
433/**
434 * enum nft_cmp_attributes - nf_tables cmp expression netlink attributes
435 *
436 * @NFTA_CMP_SREG: source register of data to compare (NLA_U32: nft_registers)
437 * @NFTA_CMP_OP: cmp operation (NLA_U32: nft_cmp_ops)
438 * @NFTA_CMP_DATA: data to compare against (NLA_NESTED: nft_data_attributes)
439 */
440enum nft_cmp_attributes {
441 NFTA_CMP_UNSPEC,
442 NFTA_CMP_SREG,
443 NFTA_CMP_OP,
444 NFTA_CMP_DATA,
445 __NFTA_CMP_MAX
446};
447#define NFTA_CMP_MAX (__NFTA_CMP_MAX - 1)
448
449/**
450 * enum nft_lookup_attributes - nf_tables set lookup expression netlink attributes
451 *
452 * @NFTA_LOOKUP_SET: name of the set where to look for (NLA_STRING)
453 * @NFTA_LOOKUP_SREG: source register of the data to look for (NLA_U32: nft_registers)
454 * @NFTA_LOOKUP_DREG: destination register (NLA_U32: nft_registers)
455 */
456enum nft_lookup_attributes {
457 NFTA_LOOKUP_UNSPEC,
458 NFTA_LOOKUP_SET,
459 NFTA_LOOKUP_SREG,
460 NFTA_LOOKUP_DREG,
461 __NFTA_LOOKUP_MAX
462};
463#define NFTA_LOOKUP_MAX (__NFTA_LOOKUP_MAX - 1)
464
465/**
466 * enum nft_payload_bases - nf_tables payload expression offset bases
467 *
468 * @NFT_PAYLOAD_LL_HEADER: link layer header
469 * @NFT_PAYLOAD_NETWORK_HEADER: network header
470 * @NFT_PAYLOAD_TRANSPORT_HEADER: transport header
471 */
472enum nft_payload_bases {
473 NFT_PAYLOAD_LL_HEADER,
474 NFT_PAYLOAD_NETWORK_HEADER,
475 NFT_PAYLOAD_TRANSPORT_HEADER,
476};
477
478/**
479 * enum nft_payload_attributes - nf_tables payload expression netlink attributes
480 *
481 * @NFTA_PAYLOAD_DREG: destination register to load data into (NLA_U32: nft_registers)
482 * @NFTA_PAYLOAD_BASE: payload base (NLA_U32: nft_payload_bases)
483 * @NFTA_PAYLOAD_OFFSET: payload offset relative to base (NLA_U32)
484 * @NFTA_PAYLOAD_LEN: payload length (NLA_U32)
485 */
486enum nft_payload_attributes {
487 NFTA_PAYLOAD_UNSPEC,
488 NFTA_PAYLOAD_DREG,
489 NFTA_PAYLOAD_BASE,
490 NFTA_PAYLOAD_OFFSET,
491 NFTA_PAYLOAD_LEN,
492 __NFTA_PAYLOAD_MAX
493};
494#define NFTA_PAYLOAD_MAX (__NFTA_PAYLOAD_MAX - 1)
495
496/**
497 * enum nft_exthdr_attributes - nf_tables IPv6 extension header expression netlink attributes
498 *
499 * @NFTA_EXTHDR_DREG: destination register (NLA_U32: nft_registers)
500 * @NFTA_EXTHDR_TYPE: extension header type (NLA_U8)
501 * @NFTA_EXTHDR_OFFSET: extension header offset (NLA_U32)
502 * @NFTA_EXTHDR_LEN: extension header length (NLA_U32)
503 */
504enum nft_exthdr_attributes {
505 NFTA_EXTHDR_UNSPEC,
506 NFTA_EXTHDR_DREG,
507 NFTA_EXTHDR_TYPE,
508 NFTA_EXTHDR_OFFSET,
509 NFTA_EXTHDR_LEN,
510 __NFTA_EXTHDR_MAX
511};
512#define NFTA_EXTHDR_MAX (__NFTA_EXTHDR_MAX - 1)
513
514/**
515 * enum nft_meta_keys - nf_tables meta expression keys
516 *
517 * @NFT_META_LEN: packet length (skb->len)
518 * @NFT_META_PROTOCOL: packet ethertype protocol (skb->protocol), invalid in OUTPUT
519 * @NFT_META_PRIORITY: packet priority (skb->priority)
520 * @NFT_META_MARK: packet mark (skb->mark)
521 * @NFT_META_IIF: packet input interface index (dev->ifindex)
522 * @NFT_META_OIF: packet output interface index (dev->ifindex)
523 * @NFT_META_IIFNAME: packet input interface name (dev->name)
524 * @NFT_META_OIFNAME: packet output interface name (dev->name)
525 * @NFT_META_IIFTYPE: packet input interface type (dev->type)
526 * @NFT_META_OIFTYPE: packet output interface type (dev->type)
527 * @NFT_META_SKUID: originating socket UID (fsuid)
528 * @NFT_META_SKGID: originating socket GID (fsgid)
529 * @NFT_META_NFTRACE: packet nftrace bit
530 * @NFT_META_RTCLASSID: realm value of packet's route (skb->dst->tclassid)
531 * @NFT_META_SECMARK: packet secmark (skb->secmark)
532 */
533enum nft_meta_keys {
534 NFT_META_LEN,
535 NFT_META_PROTOCOL,
536 NFT_META_PRIORITY,
537 NFT_META_MARK,
538 NFT_META_IIF,
539 NFT_META_OIF,
540 NFT_META_IIFNAME,
541 NFT_META_OIFNAME,
542 NFT_META_IIFTYPE,
543 NFT_META_OIFTYPE,
544 NFT_META_SKUID,
545 NFT_META_SKGID,
546 NFT_META_NFTRACE,
547 NFT_META_RTCLASSID,
548 NFT_META_SECMARK,
549};
550
551/**
552 * enum nft_meta_attributes - nf_tables meta expression netlink attributes
553 *
554 * @NFTA_META_DREG: destination register (NLA_U32)
555 * @NFTA_META_KEY: meta data item to load (NLA_U32: nft_meta_keys)
556 */
557enum nft_meta_attributes {
558 NFTA_META_UNSPEC,
559 NFTA_META_DREG,
560 NFTA_META_KEY,
561 __NFTA_META_MAX
562};
563#define NFTA_META_MAX (__NFTA_META_MAX - 1)
564
565/**
566 * enum nft_ct_keys - nf_tables ct expression keys
567 *
568 * @NFT_CT_STATE: conntrack state (bitmask of enum ip_conntrack_info)
569 * @NFT_CT_DIRECTION: conntrack direction (enum ip_conntrack_dir)
570 * @NFT_CT_STATUS: conntrack status (bitmask of enum ip_conntrack_status)
571 * @NFT_CT_MARK: conntrack mark value
572 * @NFT_CT_SECMARK: conntrack secmark value
573 * @NFT_CT_EXPIRATION: relative conntrack expiration time in ms
574 * @NFT_CT_HELPER: connection tracking helper assigned to conntrack
575 * @NFT_CT_L3PROTOCOL: conntrack layer 3 protocol
576 * @NFT_CT_SRC: conntrack layer 3 protocol source (IPv4/IPv6 address)
577 * @NFT_CT_DST: conntrack layer 3 protocol destination (IPv4/IPv6 address)
578 * @NFT_CT_PROTOCOL: conntrack layer 4 protocol
579 * @NFT_CT_PROTO_SRC: conntrack layer 4 protocol source
580 * @NFT_CT_PROTO_DST: conntrack layer 4 protocol destination
581 */
582enum nft_ct_keys {
583 NFT_CT_STATE,
584 NFT_CT_DIRECTION,
585 NFT_CT_STATUS,
586 NFT_CT_MARK,
587 NFT_CT_SECMARK,
588 NFT_CT_EXPIRATION,
589 NFT_CT_HELPER,
590 NFT_CT_L3PROTOCOL,
591 NFT_CT_SRC,
592 NFT_CT_DST,
593 NFT_CT_PROTOCOL,
594 NFT_CT_PROTO_SRC,
595 NFT_CT_PROTO_DST,
596};
597
598/**
599 * enum nft_ct_attributes - nf_tables ct expression netlink attributes
600 *
601 * @NFTA_CT_DREG: destination register (NLA_U32)
602 * @NFTA_CT_KEY: conntrack data item to load (NLA_U32: nft_ct_keys)
603 * @NFTA_CT_DIRECTION: direction in case of directional keys (NLA_U8)
604 */
605enum nft_ct_attributes {
606 NFTA_CT_UNSPEC,
607 NFTA_CT_DREG,
608 NFTA_CT_KEY,
609 NFTA_CT_DIRECTION,
610 __NFTA_CT_MAX
611};
612#define NFTA_CT_MAX (__NFTA_CT_MAX - 1)
613
614/**
615 * enum nft_limit_attributes - nf_tables limit expression netlink attributes
616 *
617 * @NFTA_LIMIT_RATE: refill rate (NLA_U64)
618 * @NFTA_LIMIT_UNIT: refill unit (NLA_U64)
619 */
620enum nft_limit_attributes {
621 NFTA_LIMIT_UNSPEC,
622 NFTA_LIMIT_RATE,
623 NFTA_LIMIT_UNIT,
624 __NFTA_LIMIT_MAX
625};
626#define NFTA_LIMIT_MAX (__NFTA_LIMIT_MAX - 1)
627
628/**
629 * enum nft_counter_attributes - nf_tables counter expression netlink attributes
630 *
631 * @NFTA_COUNTER_BYTES: number of bytes (NLA_U64)
632 * @NFTA_COUNTER_PACKETS: number of packets (NLA_U64)
633 */
634enum nft_counter_attributes {
635 NFTA_COUNTER_UNSPEC,
636 NFTA_COUNTER_BYTES,
637 NFTA_COUNTER_PACKETS,
638 __NFTA_COUNTER_MAX
639};
640#define NFTA_COUNTER_MAX (__NFTA_COUNTER_MAX - 1)
641
642/**
643 * enum nft_log_attributes - nf_tables log expression netlink attributes
644 *
645 * @NFTA_LOG_GROUP: netlink group to send messages to (NLA_U32)
646 * @NFTA_LOG_PREFIX: prefix to prepend to log messages (NLA_STRING)
647 * @NFTA_LOG_SNAPLEN: length of payload to include in netlink message (NLA_U32)
648 * @NFTA_LOG_QTHRESHOLD: queue threshold (NLA_U32)
649 */
650enum nft_log_attributes {
651 NFTA_LOG_UNSPEC,
652 NFTA_LOG_GROUP,
653 NFTA_LOG_PREFIX,
654 NFTA_LOG_SNAPLEN,
655 NFTA_LOG_QTHRESHOLD,
656 __NFTA_LOG_MAX
657};
658#define NFTA_LOG_MAX (__NFTA_LOG_MAX - 1)
659
660/**
661 * enum nft_reject_types - nf_tables reject expression reject types
662 *
663 * @NFT_REJECT_ICMP_UNREACH: reject using ICMP unreachable
664 * @NFT_REJECT_TCP_RST: reject using TCP RST
665 */
666enum nft_reject_types {
667 NFT_REJECT_ICMP_UNREACH,
668 NFT_REJECT_TCP_RST,
669};
670
671/**
672 * enum nft_reject_attributes - nf_tables reject expression netlink attributes
673 *
674 * @NFTA_REJECT_TYPE: packet type to use (NLA_U32: nft_reject_types)
675 * @NFTA_REJECT_ICMP_CODE: ICMP code to use (NLA_U8)
676 */
677enum nft_reject_attributes {
678 NFTA_REJECT_UNSPEC,
679 NFTA_REJECT_TYPE,
680 NFTA_REJECT_ICMP_CODE,
681 __NFTA_REJECT_MAX
682};
683#define NFTA_REJECT_MAX (__NFTA_REJECT_MAX - 1)
684
685/**
686 * enum nft_nat_types - nf_tables nat expression NAT types
687 *
688 * @NFT_NAT_SNAT: source NAT
689 * @NFT_NAT_DNAT: destination NAT
690 */
691enum nft_nat_types {
692 NFT_NAT_SNAT,
693 NFT_NAT_DNAT,
694};
695
696/**
697 * enum nft_nat_attributes - nf_tables nat expression netlink attributes
698 *
699 * @NFTA_NAT_TYPE: NAT type (NLA_U32: nft_nat_types)
700 * @NFTA_NAT_FAMILY: NAT family (NLA_U32)
701 * @NFTA_NAT_REG_ADDR_MIN: source register of address range start (NLA_U32: nft_registers)
702 * @NFTA_NAT_REG_ADDR_MAX: source register of address range end (NLA_U32: nft_registers)
703 * @NFTA_NAT_REG_PROTO_MIN: source register of proto range start (NLA_U32: nft_registers)
704 * @NFTA_NAT_REG_PROTO_MAX: source register of proto range end (NLA_U32: nft_registers)
705 */
706enum nft_nat_attributes {
707 NFTA_NAT_UNSPEC,
708 NFTA_NAT_TYPE,
709 NFTA_NAT_FAMILY,
710 NFTA_NAT_REG_ADDR_MIN,
711 NFTA_NAT_REG_ADDR_MAX,
712 NFTA_NAT_REG_PROTO_MIN,
713 NFTA_NAT_REG_PROTO_MAX,
714 __NFTA_NAT_MAX
715};
716#define NFTA_NAT_MAX (__NFTA_NAT_MAX - 1)
717
718#endif /* _LINUX_NF_TABLES_H */
diff --git a/include/uapi/linux/netfilter/nf_tables_compat.h b/include/uapi/linux/netfilter/nf_tables_compat.h
new file mode 100644
index 000000000000..8310f5f76551
--- /dev/null
+++ b/include/uapi/linux/netfilter/nf_tables_compat.h
@@ -0,0 +1,38 @@
1#ifndef _NFT_COMPAT_NFNETLINK_H_
2#define _NFT_COMPAT_NFNETLINK_H_
3
4enum nft_target_attributes {
5 NFTA_TARGET_UNSPEC,
6 NFTA_TARGET_NAME,
7 NFTA_TARGET_REV,
8 NFTA_TARGET_INFO,
9 __NFTA_TARGET_MAX
10};
11#define NFTA_TARGET_MAX (__NFTA_TARGET_MAX - 1)
12
13enum nft_match_attributes {
14 NFTA_MATCH_UNSPEC,
15 NFTA_MATCH_NAME,
16 NFTA_MATCH_REV,
17 NFTA_MATCH_INFO,
18 __NFTA_MATCH_MAX
19};
20#define NFTA_MATCH_MAX (__NFTA_MATCH_MAX - 1)
21
22#define NFT_COMPAT_NAME_MAX 32
23
24enum {
25 NFNL_MSG_COMPAT_GET,
26 NFNL_MSG_COMPAT_MAX
27};
28
29enum {
30 NFTA_COMPAT_UNSPEC = 0,
31 NFTA_COMPAT_NAME,
32 NFTA_COMPAT_REV,
33 NFTA_COMPAT_TYPE,
34 __NFTA_COMPAT_MAX,
35};
36#define NFTA_COMPAT_MAX (__NFTA_COMPAT_MAX - 1)
37
38#endif
diff --git a/include/uapi/linux/netfilter/nfnetlink.h b/include/uapi/linux/netfilter/nfnetlink.h
index 4a4efafad5f4..596ddd45253c 100644
--- a/include/uapi/linux/netfilter/nfnetlink.h
+++ b/include/uapi/linux/netfilter/nfnetlink.h
@@ -18,6 +18,8 @@ enum nfnetlink_groups {
18#define NFNLGRP_CONNTRACK_EXP_UPDATE NFNLGRP_CONNTRACK_EXP_UPDATE 18#define NFNLGRP_CONNTRACK_EXP_UPDATE NFNLGRP_CONNTRACK_EXP_UPDATE
19 NFNLGRP_CONNTRACK_EXP_DESTROY, 19 NFNLGRP_CONNTRACK_EXP_DESTROY,
20#define NFNLGRP_CONNTRACK_EXP_DESTROY NFNLGRP_CONNTRACK_EXP_DESTROY 20#define NFNLGRP_CONNTRACK_EXP_DESTROY NFNLGRP_CONNTRACK_EXP_DESTROY
21 NFNLGRP_NFTABLES,
22#define NFNLGRP_NFTABLES NFNLGRP_NFTABLES
21 __NFNLGRP_MAX, 23 __NFNLGRP_MAX,
22}; 24};
23#define NFNLGRP_MAX (__NFNLGRP_MAX - 1) 25#define NFNLGRP_MAX (__NFNLGRP_MAX - 1)
@@ -51,6 +53,12 @@ struct nfgenmsg {
51#define NFNL_SUBSYS_ACCT 7 53#define NFNL_SUBSYS_ACCT 7
52#define NFNL_SUBSYS_CTNETLINK_TIMEOUT 8 54#define NFNL_SUBSYS_CTNETLINK_TIMEOUT 8
53#define NFNL_SUBSYS_CTHELPER 9 55#define NFNL_SUBSYS_CTHELPER 9
54#define NFNL_SUBSYS_COUNT 10 56#define NFNL_SUBSYS_NFTABLES 10
57#define NFNL_SUBSYS_NFT_COMPAT 11
58#define NFNL_SUBSYS_COUNT 12
59
60/* Reserved control nfnetlink messages */
61#define NFNL_MSG_BATCH_BEGIN NLMSG_MIN_TYPE
62#define NFNL_MSG_BATCH_END NLMSG_MIN_TYPE+1
55 63
56#endif /* _UAPI_NFNETLINK_H */ 64#endif /* _UAPI_NFNETLINK_H */
diff --git a/include/uapi/linux/netfilter/nfnetlink_cttimeout.h b/include/uapi/linux/netfilter/nfnetlink_cttimeout.h
index a2810a7c5e30..1ab0b97b3a1e 100644
--- a/include/uapi/linux/netfilter/nfnetlink_cttimeout.h
+++ b/include/uapi/linux/netfilter/nfnetlink_cttimeout.h
@@ -6,6 +6,8 @@ enum ctnl_timeout_msg_types {
6 IPCTNL_MSG_TIMEOUT_NEW, 6 IPCTNL_MSG_TIMEOUT_NEW,
7 IPCTNL_MSG_TIMEOUT_GET, 7 IPCTNL_MSG_TIMEOUT_GET,
8 IPCTNL_MSG_TIMEOUT_DELETE, 8 IPCTNL_MSG_TIMEOUT_DELETE,
9 IPCTNL_MSG_TIMEOUT_DEFAULT_SET,
10 IPCTNL_MSG_TIMEOUT_DEFAULT_GET,
9 11
10 IPCTNL_MSG_TIMEOUT_MAX 12 IPCTNL_MSG_TIMEOUT_MAX
11}; 13};
diff --git a/include/uapi/linux/nfc.h b/include/uapi/linux/nfc.h
index 29bed72a4ac4..6ad6cc03ccd3 100644
--- a/include/uapi/linux/nfc.h
+++ b/include/uapi/linux/nfc.h
@@ -85,6 +85,7 @@
85 * a specific SE notifies us about the end of a transaction. The parameter 85 * a specific SE notifies us about the end of a transaction. The parameter
86 * for this event is the application ID (AID). 86 * for this event is the application ID (AID).
87 * @NFC_CMD_GET_SE: Dump all discovered secure elements from an NFC controller. 87 * @NFC_CMD_GET_SE: Dump all discovered secure elements from an NFC controller.
88 * @NFC_CMD_SE_IO: Send/Receive APDUs to/from the selected secure element.
88 */ 89 */
89enum nfc_commands { 90enum nfc_commands {
90 NFC_CMD_UNSPEC, 91 NFC_CMD_UNSPEC,
@@ -114,6 +115,7 @@ enum nfc_commands {
114 NFC_EVENT_SE_CONNECTIVITY, 115 NFC_EVENT_SE_CONNECTIVITY,
115 NFC_EVENT_SE_TRANSACTION, 116 NFC_EVENT_SE_TRANSACTION,
116 NFC_CMD_GET_SE, 117 NFC_CMD_GET_SE,
118 NFC_CMD_SE_IO,
117/* private: internal use only */ 119/* private: internal use only */
118 __NFC_CMD_AFTER_LAST 120 __NFC_CMD_AFTER_LAST
119}; 121};
@@ -147,6 +149,7 @@ enum nfc_commands {
147 * @NFC_ATTR_SE_INDEX: Secure element index 149 * @NFC_ATTR_SE_INDEX: Secure element index
148 * @NFC_ATTR_SE_TYPE: Secure element type (UICC or EMBEDDED) 150 * @NFC_ATTR_SE_TYPE: Secure element type (UICC or EMBEDDED)
149 * @NFC_ATTR_FIRMWARE_DOWNLOAD_STATUS: Firmware download operation status 151 * @NFC_ATTR_FIRMWARE_DOWNLOAD_STATUS: Firmware download operation status
152 * @NFC_ATTR_APDU: Secure element APDU
150 */ 153 */
151enum nfc_attrs { 154enum nfc_attrs {
152 NFC_ATTR_UNSPEC, 155 NFC_ATTR_UNSPEC,
@@ -174,6 +177,7 @@ enum nfc_attrs {
174 NFC_ATTR_SE_TYPE, 177 NFC_ATTR_SE_TYPE,
175 NFC_ATTR_SE_AID, 178 NFC_ATTR_SE_AID,
176 NFC_ATTR_FIRMWARE_DOWNLOAD_STATUS, 179 NFC_ATTR_FIRMWARE_DOWNLOAD_STATUS,
180 NFC_ATTR_SE_APDU,
177/* private: internal use only */ 181/* private: internal use only */
178 __NFC_ATTR_AFTER_LAST 182 __NFC_ATTR_AFTER_LAST
179}; 183};
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
index fde2c021b26d..f752e9821e71 100644
--- a/include/uapi/linux/nl80211.h
+++ b/include/uapi/linux/nl80211.h
@@ -988,7 +988,7 @@ enum nl80211_commands {
988 * to query the CRDA to retrieve one regulatory domain. This attribute can 988 * to query the CRDA to retrieve one regulatory domain. This attribute can
989 * also be used by userspace to query the kernel for the currently set 989 * also be used by userspace to query the kernel for the currently set
990 * regulatory domain. We chose an alpha2 as that is also used by the 990 * regulatory domain. We chose an alpha2 as that is also used by the
991 * IEEE-802.11d country information element to identify a country. 991 * IEEE-802.11 country information element to identify a country.
992 * Users can also simply ask the wireless core to set regulatory domain 992 * Users can also simply ask the wireless core to set regulatory domain
993 * to a specific alpha2. 993 * to a specific alpha2.
994 * @NL80211_ATTR_REG_RULES: a nested array of regulatory domain regulatory 994 * @NL80211_ATTR_REG_RULES: a nested array of regulatory domain regulatory
@@ -1496,6 +1496,18 @@ enum nl80211_commands {
1496 * @NL80211_ATTR_RXMGMT_FLAGS: flags for nl80211_send_mgmt(), u32. 1496 * @NL80211_ATTR_RXMGMT_FLAGS: flags for nl80211_send_mgmt(), u32.
1497 * As specified in the &enum nl80211_rxmgmt_flags. 1497 * As specified in the &enum nl80211_rxmgmt_flags.
1498 * 1498 *
1499 * @NL80211_ATTR_STA_SUPPORTED_CHANNELS: array of supported channels.
1500 *
1501 * @NL80211_ATTR_STA_SUPPORTED_OPER_CLASSES: array of supported
1502 * supported operating classes.
1503 *
1504 * @NL80211_ATTR_HANDLE_DFS: A flag indicating whether user space
1505 * controls DFS operation in IBSS mode. If the flag is included in
1506 * %NL80211_CMD_JOIN_IBSS request, the driver will allow use of DFS
1507 * channels and reports radar events to userspace. Userspace is required
1508 * to react to radar events, e.g. initiate a channel switch or leave the
1509 * IBSS network.
1510 *
1499 * @NL80211_ATTR_MAX: highest attribute number currently defined 1511 * @NL80211_ATTR_MAX: highest attribute number currently defined
1500 * @__NL80211_ATTR_AFTER_LAST: internal use 1512 * @__NL80211_ATTR_AFTER_LAST: internal use
1501 */ 1513 */
@@ -1806,6 +1818,12 @@ enum nl80211_attrs {
1806 1818
1807 NL80211_ATTR_RXMGMT_FLAGS, 1819 NL80211_ATTR_RXMGMT_FLAGS,
1808 1820
1821 NL80211_ATTR_STA_SUPPORTED_CHANNELS,
1822
1823 NL80211_ATTR_STA_SUPPORTED_OPER_CLASSES,
1824
1825 NL80211_ATTR_HANDLE_DFS,
1826
1809 /* add attributes here, update the policy in nl80211.c */ 1827 /* add attributes here, update the policy in nl80211.c */
1810 1828
1811 __NL80211_ATTR_AFTER_LAST, 1829 __NL80211_ATTR_AFTER_LAST,
@@ -3860,13 +3878,12 @@ enum nl80211_radar_event {
3860 * 3878 *
3861 * Channel states used by the DFS code. 3879 * Channel states used by the DFS code.
3862 * 3880 *
3863 * @IEEE80211_DFS_USABLE: The channel can be used, but channel availability 3881 * @NL80211_DFS_USABLE: The channel can be used, but channel availability
3864 * check (CAC) must be performed before using it for AP or IBSS. 3882 * check (CAC) must be performed before using it for AP or IBSS.
3865 * @IEEE80211_DFS_UNAVAILABLE: A radar has been detected on this channel, it 3883 * @NL80211_DFS_UNAVAILABLE: A radar has been detected on this channel, it
3866 * is therefore marked as not available. 3884 * is therefore marked as not available.
3867 * @IEEE80211_DFS_AVAILABLE: The channel has been CAC checked and is available. 3885 * @NL80211_DFS_AVAILABLE: The channel has been CAC checked and is available.
3868 */ 3886 */
3869
3870enum nl80211_dfs_state { 3887enum nl80211_dfs_state {
3871 NL80211_DFS_USABLE, 3888 NL80211_DFS_USABLE,
3872 NL80211_DFS_UNAVAILABLE, 3889 NL80211_DFS_UNAVAILABLE,
diff --git a/include/uapi/linux/openvswitch.h b/include/uapi/linux/openvswitch.h
index a74d375b439b..d120f9fe0017 100644
--- a/include/uapi/linux/openvswitch.h
+++ b/include/uapi/linux/openvswitch.h
@@ -63,15 +63,18 @@ enum ovs_datapath_cmd {
63 * not be sent. 63 * not be sent.
64 * @OVS_DP_ATTR_STATS: Statistics about packets that have passed through the 64 * @OVS_DP_ATTR_STATS: Statistics about packets that have passed through the
65 * datapath. Always present in notifications. 65 * datapath. Always present in notifications.
66 * @OVS_DP_ATTR_MEGAFLOW_STATS: Statistics about mega flow masks usage for the
67 * datapath. Always present in notifications.
66 * 68 *
67 * These attributes follow the &struct ovs_header within the Generic Netlink 69 * These attributes follow the &struct ovs_header within the Generic Netlink
68 * payload for %OVS_DP_* commands. 70 * payload for %OVS_DP_* commands.
69 */ 71 */
70enum ovs_datapath_attr { 72enum ovs_datapath_attr {
71 OVS_DP_ATTR_UNSPEC, 73 OVS_DP_ATTR_UNSPEC,
72 OVS_DP_ATTR_NAME, /* name of dp_ifindex netdev */ 74 OVS_DP_ATTR_NAME, /* name of dp_ifindex netdev */
73 OVS_DP_ATTR_UPCALL_PID, /* Netlink PID to receive upcalls */ 75 OVS_DP_ATTR_UPCALL_PID, /* Netlink PID to receive upcalls */
74 OVS_DP_ATTR_STATS, /* struct ovs_dp_stats */ 76 OVS_DP_ATTR_STATS, /* struct ovs_dp_stats */
77 OVS_DP_ATTR_MEGAFLOW_STATS, /* struct ovs_dp_megaflow_stats */
75 __OVS_DP_ATTR_MAX 78 __OVS_DP_ATTR_MAX
76}; 79};
77 80
@@ -84,6 +87,14 @@ struct ovs_dp_stats {
84 __u64 n_flows; /* Number of flows present */ 87 __u64 n_flows; /* Number of flows present */
85}; 88};
86 89
90struct ovs_dp_megaflow_stats {
91 __u64 n_mask_hit; /* Number of masks used for flow lookups. */
92 __u32 n_masks; /* Number of masks for the datapath. */
93 __u32 pad0; /* Pad for future expension. */
94 __u64 pad1; /* Pad for future expension. */
95 __u64 pad2; /* Pad for future expension. */
96};
97
87struct ovs_vport_stats { 98struct ovs_vport_stats {
88 __u64 rx_packets; /* total packets received */ 99 __u64 rx_packets; /* total packets received */
89 __u64 tx_packets; /* total packets transmitted */ 100 __u64 tx_packets; /* total packets transmitted */
@@ -260,6 +271,7 @@ enum ovs_key_attr {
260 OVS_KEY_ATTR_SKB_MARK, /* u32 skb mark */ 271 OVS_KEY_ATTR_SKB_MARK, /* u32 skb mark */
261 OVS_KEY_ATTR_TUNNEL, /* Nested set of ovs_tunnel attributes */ 272 OVS_KEY_ATTR_TUNNEL, /* Nested set of ovs_tunnel attributes */
262 OVS_KEY_ATTR_SCTP, /* struct ovs_key_sctp */ 273 OVS_KEY_ATTR_SCTP, /* struct ovs_key_sctp */
274 OVS_KEY_ATTR_TCP_FLAGS, /* be16 TCP flags. */
263 275
264#ifdef __KERNEL__ 276#ifdef __KERNEL__
265 OVS_KEY_ATTR_IPV4_TUNNEL, /* struct ovs_key_ipv4_tunnel */ 277 OVS_KEY_ATTR_IPV4_TUNNEL, /* struct ovs_key_ipv4_tunnel */
diff --git a/include/uapi/linux/pkt_cls.h b/include/uapi/linux/pkt_cls.h
index 082eafaf026b..25731dfb3fcc 100644
--- a/include/uapi/linux/pkt_cls.h
+++ b/include/uapi/linux/pkt_cls.h
@@ -388,6 +388,20 @@ enum {
388 388
389#define TCA_CGROUP_MAX (__TCA_CGROUP_MAX - 1) 389#define TCA_CGROUP_MAX (__TCA_CGROUP_MAX - 1)
390 390
391/* BPF classifier */
392
393enum {
394 TCA_BPF_UNSPEC,
395 TCA_BPF_ACT,
396 TCA_BPF_POLICE,
397 TCA_BPF_CLASSID,
398 TCA_BPF_OPS_LEN,
399 TCA_BPF_OPS,
400 __TCA_BPF_MAX,
401};
402
403#define TCA_BPF_MAX (__TCA_BPF_MAX - 1)
404
391/* Extended Matches */ 405/* Extended Matches */
392 406
393struct tcf_ematch_tree_hdr { 407struct tcf_ematch_tree_hdr {
diff --git a/include/uapi/linux/pkt_sched.h b/include/uapi/linux/pkt_sched.h
index 9b829134d422..307f293477e8 100644
--- a/include/uapi/linux/pkt_sched.h
+++ b/include/uapi/linux/pkt_sched.h
@@ -171,6 +171,8 @@ enum {
171 TCA_TBF_PARMS, 171 TCA_TBF_PARMS,
172 TCA_TBF_RTAB, 172 TCA_TBF_RTAB,
173 TCA_TBF_PTAB, 173 TCA_TBF_PTAB,
174 TCA_TBF_RATE64,
175 TCA_TBF_PRATE64,
174 __TCA_TBF_MAX, 176 __TCA_TBF_MAX,
175}; 177};
176 178
@@ -357,6 +359,8 @@ enum {
357 TCA_HTB_CTAB, 359 TCA_HTB_CTAB,
358 TCA_HTB_RTAB, 360 TCA_HTB_RTAB,
359 TCA_HTB_DIRECT_QLEN, 361 TCA_HTB_DIRECT_QLEN,
362 TCA_HTB_RATE64,
363 TCA_HTB_CEIL64,
360 __TCA_HTB_MAX, 364 __TCA_HTB_MAX,
361}; 365};
362 366
diff --git a/include/uapi/linux/random.h b/include/uapi/linux/random.h
index 7471b5b3b8ba..fff3528a078f 100644
--- a/include/uapi/linux/random.h
+++ b/include/uapi/linux/random.h
@@ -40,11 +40,4 @@ struct rand_pool_info {
40 __u32 buf[0]; 40 __u32 buf[0];
41}; 41};
42 42
43struct rnd_state {
44 __u32 s1, s2, s3;
45};
46
47/* Exported functions */
48
49
50#endif /* _UAPI_LINUX_RANDOM_H */ 43#endif /* _UAPI_LINUX_RANDOM_H */