aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-05-01 17:08:52 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-05-01 17:08:52 -0400
commit73287a43cc79ca06629a88d1a199cd283f42456a (patch)
treeacf4456e260115bea77ee31a29f10ce17f0db45c /include/uapi/linux
parent251df49db3327c64bf917bfdba94491fde2b4ee0 (diff)
parent20074f357da4a637430aec2879c9d864c5d2c23c (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
Pull networking updates from David Miller: "Highlights (1721 non-merge commits, this has to be a record of some sort): 1) Add 'random' mode to team driver, from Jiri Pirko and Eric Dumazet. 2) Make it so that any driver that supports configuration of multiple MAC addresses can provide the forwarding database add and del calls by providing a default implementation and hooking that up if the driver doesn't have an explicit set of handlers. From Vlad Yasevich. 3) Support GSO segmentation over tunnels and other encapsulating devices such as VXLAN, from Pravin B Shelar. 4) Support L2 GRE tunnels in the flow dissector, from Michael Dalton. 5) Implement Tail Loss Probe (TLP) detection in TCP, from Nandita Dukkipati. 6) In the PHY layer, allow supporting wake-on-lan in situations where the PHY registers have to be written for it to be configured. Use it to support wake-on-lan in mv643xx_eth. From Michael Stapelberg. 7) Significantly improve firewire IPV6 support, from YOSHIFUJI Hideaki. 8) Allow multiple packets to be sent in a single transmission using network coding in batman-adv, from Martin Hundebøll. 9) Add support for T5 cxgb4 chips, from Santosh Rastapur. 10) Generalize the VXLAN forwarding tables so that there is more flexibility in configurating various aspects of the endpoints. From David Stevens. 11) Support RSS and TSO in hardware over GRE tunnels in bxn2x driver, from Dmitry Kravkov. 12) Zero copy support in nfnelink_queue, from Eric Dumazet and Pablo Neira Ayuso. 13) Start adding networking selftests. 14) In situations of overload on the same AF_PACKET fanout socket, or per-cpu packet receive queue, minimize drop by distributing the load to other cpus/fanouts. From Willem de Bruijn and Eric Dumazet. 15) Add support for new payload offset BPF instruction, from Daniel Borkmann. 16) Convert several drivers over to mdoule_platform_driver(), from Sachin Kamat. 17) Provide a minimal BPF JIT image disassembler userspace tool, from Daniel Borkmann. 18) Rewrite F-RTO implementation in TCP to match the final specification of it in RFC4138 and RFC5682. From Yuchung Cheng. 19) Provide netlink socket diag of netlink sockets ("Yo dawg, I hear you like netlink, so I implemented netlink dumping of netlink sockets.") From Andrey Vagin. 20) Remove ugly passing of rtnetlink attributes into rtnl_doit functions, from Thomas Graf. 21) Allow userspace to be able to see if a configuration change occurs in the middle of an address or device list dump, from Nicolas Dichtel. 22) Support RFC3168 ECN protection for ipv6 fragments, from Hannes Frederic Sowa. 23) Increase accuracy of packet length used by packet scheduler, from Jason Wang. 24) Beginning set of changes to make ipv4/ipv6 fragment handling more scalable and less susceptible to overload and locking contention, from Jesper Dangaard Brouer. 25) Get rid of using non-type-safe NLMSG_* macros and use nlmsg_*() instead. From Hong Zhiguo. 26) Optimize route usage in IPVS by avoiding reference counting where possible, from Julian Anastasov. 27) Convert IPVS schedulers to RCU, also from Julian Anastasov. 28) Support cpu fanouts in xt_NFQUEUE netfilter target, from Holger Eitzenberger. 29) Network namespace support for nf_log, ebt_log, xt_LOG, ipt_ULOG, nfnetlink_log, and nfnetlink_queue. From Gao feng. 30) Implement RFC3168 ECN protection, from Hannes Frederic Sowa. 31) Support several new r8169 chips, from Hayes Wang. 32) Support tokenized interface identifiers in ipv6, from Daniel Borkmann. 33) Use usbnet_link_change() helper in USB net driver, from Ming Lei. 34) Add 802.1ad vlan offload support, from Patrick McHardy. 35) Support mmap() based netlink communication, also from Patrick McHardy. 36) Support HW timestamping in mlx4 driver, from Amir Vadai. 37) Rationalize AF_PACKET packet timestamping when transmitting, from Willem de Bruijn and Daniel Borkmann. 38) Bring parity to what's provided by /proc/net/packet socket dumping and the info provided by netlink socket dumping of AF_PACKET sockets. From Nicolas Dichtel. 39) Fix peeking beyond zero sized SKBs in AF_UNIX, from Benjamin Poirier" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1722 commits) filter: fix va_list build error af_unix: fix a fatal race with bit fields bnx2x: Prevent memory leak when cnic is absent bnx2x: correct reading of speed capabilities net: sctp: attribute printl with __printf for gcc fmt checks netlink: kconfig: move mmap i/o into netlink kconfig netpoll: convert mutex into a semaphore netlink: Fix skb ref counting. net_sched: act_ipt forward compat with xtables mlx4_en: fix a build error on 32bit arches Revert "bnx2x: allow nvram test to run when device is down" bridge: avoid OOPS if root port not found drivers: net: cpsw: fix kernel warn on cpsw irq enable sh_eth: use random MAC address if no valid one supplied 3c509.c: call SET_NETDEV_DEV for all device types (ISA/ISAPnP/EISA) tg3: fix to append hardware time stamping flags unix/stream: fix peeking with an offset larger than data in queue unix/dgram: fix peeking with an offset larger than data in queue unix/dgram: peek beyond 0-sized skbs openvswitch: Remove unneeded ovs_netdev_get_ifindex() ...
Diffstat (limited to 'include/uapi/linux')
-rw-r--r--include/uapi/linux/Kbuild2
-rw-r--r--include/uapi/linux/caif/caif_socket.h2
-rw-r--r--include/uapi/linux/caif/if_caif.h2
-rw-r--r--include/uapi/linux/cn_proc.h10
-rw-r--r--include/uapi/linux/filter.h3
-rw-r--r--include/uapi/linux/if_ether.h3
-rw-r--r--include/uapi/linux/if_link.h7
-rw-r--r--include/uapi/linux/if_packet.h29
-rw-r--r--include/uapi/linux/ip_vs.h4
-rw-r--r--include/uapi/linux/neighbour.h3
-rw-r--r--include/uapi/linux/netfilter/ipset/ip_set.h36
-rw-r--r--include/uapi/linux/netfilter/nfnetlink_queue.h10
-rw-r--r--include/uapi/linux/netfilter/xt_NFQUEUE.h9
-rw-r--r--include/uapi/linux/netfilter/xt_set.h9
-rw-r--r--include/uapi/linux/netfilter_ipv6/ip6t_frag.h4
-rw-r--r--include/uapi/linux/netlink.h34
-rw-r--r--include/uapi/linux/netlink_diag.h52
-rw-r--r--include/uapi/linux/nfc.h19
-rw-r--r--include/uapi/linux/nl80211.h156
-rw-r--r--include/uapi/linux/openvswitch.h456
-rw-r--r--include/uapi/linux/packet_diag.h5
-rw-r--r--include/uapi/linux/pkt_sched.h1
-rw-r--r--include/uapi/linux/rfkill.h2
-rw-r--r--include/uapi/linux/sctp.h846
-rw-r--r--include/uapi/linux/snmp.h8
-rw-r--r--include/uapi/linux/tcp.h26
-rw-r--r--include/uapi/linux/vm_sockets.h23
-rw-r--r--include/uapi/linux/xfrm.h3
28 files changed, 1685 insertions, 79 deletions
diff --git a/include/uapi/linux/Kbuild b/include/uapi/linux/Kbuild
index 5c8a1d25e21c..ab5d4992e568 100644
--- a/include/uapi/linux/Kbuild
+++ b/include/uapi/linux/Kbuild
@@ -285,6 +285,7 @@ header-y += nvram.h
285header-y += omap3isp.h 285header-y += omap3isp.h
286header-y += omapfb.h 286header-y += omapfb.h
287header-y += oom.h 287header-y += oom.h
288header-y += openvswitch.h
288header-y += packet_diag.h 289header-y += packet_diag.h
289header-y += param.h 290header-y += param.h
290header-y += parport.h 291header-y += parport.h
@@ -331,6 +332,7 @@ header-y += rtnetlink.h
331header-y += scc.h 332header-y += scc.h
332header-y += sched.h 333header-y += sched.h
333header-y += screen_info.h 334header-y += screen_info.h
335header-y += sctp.h
334header-y += sdla.h 336header-y += sdla.h
335header-y += seccomp.h 337header-y += seccomp.h
336header-y += securebits.h 338header-y += securebits.h
diff --git a/include/uapi/linux/caif/caif_socket.h b/include/uapi/linux/caif/caif_socket.h
index 3f3bac6af7bc..586e9f98184f 100644
--- a/include/uapi/linux/caif/caif_socket.h
+++ b/include/uapi/linux/caif/caif_socket.h
@@ -1,7 +1,7 @@
1/* linux/caif_socket.h 1/* linux/caif_socket.h
2 * CAIF Definitions for CAIF socket and network layer 2 * CAIF Definitions for CAIF socket and network layer
3 * Copyright (C) ST-Ericsson AB 2010 3 * Copyright (C) ST-Ericsson AB 2010
4 * Author: Sjur Brendeland/ sjur.brandeland@stericsson.com 4 * Author: Sjur Brendeland
5 * License terms: GNU General Public License (GPL) version 2 5 * License terms: GNU General Public License (GPL) version 2
6 */ 6 */
7 7
diff --git a/include/uapi/linux/caif/if_caif.h b/include/uapi/linux/caif/if_caif.h
index 5e7eed4edf51..7618aabe8c6b 100644
--- a/include/uapi/linux/caif/if_caif.h
+++ b/include/uapi/linux/caif/if_caif.h
@@ -1,6 +1,6 @@
1/* 1/*
2 * Copyright (C) ST-Ericsson AB 2010 2 * Copyright (C) ST-Ericsson AB 2010
3 * Author: Sjur Brendeland/ sjur.brandeland@stericsson.com 3 * Author: Sjur Brendeland
4 * License terms: GNU General Public License (GPL) version 2 4 * License terms: GNU General Public License (GPL) version 2
5 */ 5 */
6 6
diff --git a/include/uapi/linux/cn_proc.h b/include/uapi/linux/cn_proc.h
index 0d7b49973bb3..f6c271035bbd 100644
--- a/include/uapi/linux/cn_proc.h
+++ b/include/uapi/linux/cn_proc.h
@@ -56,7 +56,9 @@ struct proc_event {
56 PROC_EVENT_PTRACE = 0x00000100, 56 PROC_EVENT_PTRACE = 0x00000100,
57 PROC_EVENT_COMM = 0x00000200, 57 PROC_EVENT_COMM = 0x00000200,
58 /* "next" should be 0x00000400 */ 58 /* "next" should be 0x00000400 */
59 /* "last" is the last process event: exit */ 59 /* "last" is the last process event: exit,
60 * while "next to last" is coredumping event */
61 PROC_EVENT_COREDUMP = 0x40000000,
60 PROC_EVENT_EXIT = 0x80000000 62 PROC_EVENT_EXIT = 0x80000000
61 } what; 63 } what;
62 __u32 cpu; 64 __u32 cpu;
@@ -110,11 +112,17 @@ struct proc_event {
110 char comm[16]; 112 char comm[16];
111 } comm; 113 } comm;
112 114
115 struct coredump_proc_event {
116 __kernel_pid_t process_pid;
117 __kernel_pid_t process_tgid;
118 } coredump;
119
113 struct exit_proc_event { 120 struct exit_proc_event {
114 __kernel_pid_t process_pid; 121 __kernel_pid_t process_pid;
115 __kernel_pid_t process_tgid; 122 __kernel_pid_t process_tgid;
116 __u32 exit_code, exit_signal; 123 __u32 exit_code, exit_signal;
117 } exit; 124 } exit;
125
118 } event_data; 126 } event_data;
119}; 127};
120 128
diff --git a/include/uapi/linux/filter.h b/include/uapi/linux/filter.h
index 9cfde6941099..8eb9ccaa5b48 100644
--- a/include/uapi/linux/filter.h
+++ b/include/uapi/linux/filter.h
@@ -129,7 +129,8 @@ struct sock_fprog { /* Required for SO_ATTACH_FILTER. */
129#define SKF_AD_ALU_XOR_X 40 129#define SKF_AD_ALU_XOR_X 40
130#define SKF_AD_VLAN_TAG 44 130#define SKF_AD_VLAN_TAG 44
131#define SKF_AD_VLAN_TAG_PRESENT 48 131#define SKF_AD_VLAN_TAG_PRESENT 48
132#define SKF_AD_MAX 52 132#define SKF_AD_PAY_OFFSET 52
133#define SKF_AD_MAX 56
133#define SKF_NET_OFF (-0x100000) 134#define SKF_NET_OFF (-0x100000)
134#define SKF_LL_OFF (-0x200000) 135#define SKF_LL_OFF (-0x200000)
135 136
diff --git a/include/uapi/linux/if_ether.h b/include/uapi/linux/if_ether.h
index 798032d01112..ade07f1c491a 100644
--- a/include/uapi/linux/if_ether.h
+++ b/include/uapi/linux/if_ether.h
@@ -94,6 +94,9 @@
94#define ETH_P_EDSA 0xDADA /* Ethertype DSA [ NOT AN OFFICIALLY REGISTERED ID ] */ 94#define ETH_P_EDSA 0xDADA /* Ethertype DSA [ NOT AN OFFICIALLY REGISTERED ID ] */
95#define ETH_P_AF_IUCV 0xFBFB /* IBM af_iucv [ NOT AN OFFICIALLY REGISTERED ID ] */ 95#define ETH_P_AF_IUCV 0xFBFB /* IBM af_iucv [ NOT AN OFFICIALLY REGISTERED ID ] */
96 96
97#define ETH_P_802_3_MIN 0x0600 /* If the value in the ethernet type is less than this value
98 * then the frame is Ethernet II. Else it is 802.3 */
99
97/* 100/*
98 * Non DIX types. Won't clash for 1500 types. 101 * Non DIX types. Won't clash for 1500 types.
99 */ 102 */
diff --git a/include/uapi/linux/if_link.h b/include/uapi/linux/if_link.h
index c4edfe11f1f7..b05823cae784 100644
--- a/include/uapi/linux/if_link.h
+++ b/include/uapi/linux/if_link.h
@@ -201,6 +201,7 @@ enum {
201 IFLA_INET6_MCAST, /* MC things. What of them? */ 201 IFLA_INET6_MCAST, /* MC things. What of them? */
202 IFLA_INET6_CACHEINFO, /* time values and max reasm size */ 202 IFLA_INET6_CACHEINFO, /* time values and max reasm size */
203 IFLA_INET6_ICMP6STATS, /* statistics (icmpv6) */ 203 IFLA_INET6_ICMP6STATS, /* statistics (icmpv6) */
204 IFLA_INET6_TOKEN, /* device token */
204 __IFLA_INET6_MAX 205 __IFLA_INET6_MAX
205}; 206};
206 207
@@ -249,6 +250,7 @@ enum {
249 IFLA_VLAN_FLAGS, 250 IFLA_VLAN_FLAGS,
250 IFLA_VLAN_EGRESS_QOS, 251 IFLA_VLAN_EGRESS_QOS,
251 IFLA_VLAN_INGRESS_QOS, 252 IFLA_VLAN_INGRESS_QOS,
253 IFLA_VLAN_PROTOCOL,
252 __IFLA_VLAN_MAX, 254 __IFLA_VLAN_MAX,
253}; 255};
254 256
@@ -295,7 +297,7 @@ enum macvlan_mode {
295enum { 297enum {
296 IFLA_VXLAN_UNSPEC, 298 IFLA_VXLAN_UNSPEC,
297 IFLA_VXLAN_ID, 299 IFLA_VXLAN_ID,
298 IFLA_VXLAN_GROUP, 300 IFLA_VXLAN_GROUP, /* group or remote address */
299 IFLA_VXLAN_LINK, 301 IFLA_VXLAN_LINK,
300 IFLA_VXLAN_LOCAL, 302 IFLA_VXLAN_LOCAL,
301 IFLA_VXLAN_TTL, 303 IFLA_VXLAN_TTL,
@@ -303,11 +305,12 @@ enum {
303 IFLA_VXLAN_LEARNING, 305 IFLA_VXLAN_LEARNING,
304 IFLA_VXLAN_AGEING, 306 IFLA_VXLAN_AGEING,
305 IFLA_VXLAN_LIMIT, 307 IFLA_VXLAN_LIMIT,
306 IFLA_VXLAN_PORT_RANGE, 308 IFLA_VXLAN_PORT_RANGE, /* source port */
307 IFLA_VXLAN_PROXY, 309 IFLA_VXLAN_PROXY,
308 IFLA_VXLAN_RSC, 310 IFLA_VXLAN_RSC,
309 IFLA_VXLAN_L2MISS, 311 IFLA_VXLAN_L2MISS,
310 IFLA_VXLAN_L3MISS, 312 IFLA_VXLAN_L3MISS,
313 IFLA_VXLAN_PORT, /* destination port */
311 __IFLA_VXLAN_MAX 314 __IFLA_VXLAN_MAX
312}; 315};
313#define IFLA_VXLAN_MAX (__IFLA_VXLAN_MAX - 1) 316#define IFLA_VXLAN_MAX (__IFLA_VXLAN_MAX - 1)
diff --git a/include/uapi/linux/if_packet.h b/include/uapi/linux/if_packet.h
index f9a60375f0d0..b950c02030c0 100644
--- a/include/uapi/linux/if_packet.h
+++ b/include/uapi/linux/if_packet.h
@@ -55,6 +55,8 @@ struct sockaddr_ll {
55#define PACKET_FANOUT_HASH 0 55#define PACKET_FANOUT_HASH 0
56#define PACKET_FANOUT_LB 1 56#define PACKET_FANOUT_LB 1
57#define PACKET_FANOUT_CPU 2 57#define PACKET_FANOUT_CPU 2
58#define PACKET_FANOUT_ROLLOVER 3
59#define PACKET_FANOUT_FLAG_ROLLOVER 0x1000
58#define PACKET_FANOUT_FLAG_DEFRAG 0x8000 60#define PACKET_FANOUT_FLAG_DEFRAG 0x8000
59 61
60struct tpacket_stats { 62struct tpacket_stats {
@@ -84,19 +86,24 @@ struct tpacket_auxdata {
84}; 86};
85 87
86/* Rx ring - header status */ 88/* Rx ring - header status */
87#define TP_STATUS_KERNEL 0x0 89#define TP_STATUS_KERNEL 0
88#define TP_STATUS_USER 0x1 90#define TP_STATUS_USER (1 << 0)
89#define TP_STATUS_COPY 0x2 91#define TP_STATUS_COPY (1 << 1)
90#define TP_STATUS_LOSING 0x4 92#define TP_STATUS_LOSING (1 << 2)
91#define TP_STATUS_CSUMNOTREADY 0x8 93#define TP_STATUS_CSUMNOTREADY (1 << 3)
92#define TP_STATUS_VLAN_VALID 0x10 /* auxdata has valid tp_vlan_tci */ 94#define TP_STATUS_VLAN_VALID (1 << 4) /* auxdata has valid tp_vlan_tci */
93#define TP_STATUS_BLK_TMO 0x20 95#define TP_STATUS_BLK_TMO (1 << 5)
94 96
95/* Tx ring - header status */ 97/* Tx ring - header status */
96#define TP_STATUS_AVAILABLE 0x0 98#define TP_STATUS_AVAILABLE 0
97#define TP_STATUS_SEND_REQUEST 0x1 99#define TP_STATUS_SEND_REQUEST (1 << 0)
98#define TP_STATUS_SENDING 0x2 100#define TP_STATUS_SENDING (1 << 1)
99#define TP_STATUS_WRONG_FORMAT 0x4 101#define TP_STATUS_WRONG_FORMAT (1 << 2)
102
103/* Rx and Tx ring - header status */
104#define TP_STATUS_TS_SOFTWARE (1 << 29)
105#define TP_STATUS_TS_SYS_HARDWARE (1 << 30)
106#define TP_STATUS_TS_RAW_HARDWARE (1 << 31)
100 107
101/* Rx ring - feature request bits */ 108/* Rx ring - feature request bits */
102#define TP_FT_REQ_FILL_RXHASH 0x1 109#define TP_FT_REQ_FILL_RXHASH 0x1
diff --git a/include/uapi/linux/ip_vs.h b/include/uapi/linux/ip_vs.h
index 8a2d438dc499..a24537725e80 100644
--- a/include/uapi/linux/ip_vs.h
+++ b/include/uapi/linux/ip_vs.h
@@ -280,8 +280,8 @@ struct ip_vs_daemon_user {
280#define IPVS_GENL_VERSION 0x1 280#define IPVS_GENL_VERSION 0x1
281 281
282struct ip_vs_flags { 282struct ip_vs_flags {
283 __be32 flags; 283 __u32 flags;
284 __be32 mask; 284 __u32 mask;
285}; 285};
286 286
287/* Generic Netlink command attributes */ 287/* Generic Netlink command attributes */
diff --git a/include/uapi/linux/neighbour.h b/include/uapi/linux/neighbour.h
index adb068c53c4e..f175212420ab 100644
--- a/include/uapi/linux/neighbour.h
+++ b/include/uapi/linux/neighbour.h
@@ -21,6 +21,9 @@ enum {
21 NDA_CACHEINFO, 21 NDA_CACHEINFO,
22 NDA_PROBES, 22 NDA_PROBES,
23 NDA_VLAN, 23 NDA_VLAN,
24 NDA_PORT,
25 NDA_VNI,
26 NDA_IFINDEX,
24 __NDA_MAX 27 __NDA_MAX
25}; 28};
26 29
diff --git a/include/uapi/linux/netfilter/ipset/ip_set.h b/include/uapi/linux/netfilter/ipset/ip_set.h
index fbee42807a11..8024cdf13b70 100644
--- a/include/uapi/linux/netfilter/ipset/ip_set.h
+++ b/include/uapi/linux/netfilter/ipset/ip_set.h
@@ -108,6 +108,8 @@ enum {
108 IPSET_ATTR_CIDR2, 108 IPSET_ATTR_CIDR2,
109 IPSET_ATTR_IP2_TO, 109 IPSET_ATTR_IP2_TO,
110 IPSET_ATTR_IFACE, 110 IPSET_ATTR_IFACE,
111 IPSET_ATTR_BYTES,
112 IPSET_ATTR_PACKETS,
111 __IPSET_ATTR_ADT_MAX, 113 __IPSET_ATTR_ADT_MAX,
112}; 114};
113#define IPSET_ATTR_ADT_MAX (__IPSET_ATTR_ADT_MAX - 1) 115#define IPSET_ATTR_ADT_MAX (__IPSET_ATTR_ADT_MAX - 1)
@@ -137,12 +139,13 @@ enum ipset_errno {
137 IPSET_ERR_REFERENCED, 139 IPSET_ERR_REFERENCED,
138 IPSET_ERR_IPADDR_IPV4, 140 IPSET_ERR_IPADDR_IPV4,
139 IPSET_ERR_IPADDR_IPV6, 141 IPSET_ERR_IPADDR_IPV6,
142 IPSET_ERR_COUNTER,
140 143
141 /* Type specific error codes */ 144 /* Type specific error codes */
142 IPSET_ERR_TYPE_SPECIFIC = 4352, 145 IPSET_ERR_TYPE_SPECIFIC = 4352,
143}; 146};
144 147
145/* Flags at command level */ 148/* Flags at command level or match/target flags, lower half of cmdattrs*/
146enum ipset_cmd_flags { 149enum ipset_cmd_flags {
147 IPSET_FLAG_BIT_EXIST = 0, 150 IPSET_FLAG_BIT_EXIST = 0,
148 IPSET_FLAG_EXIST = (1 << IPSET_FLAG_BIT_EXIST), 151 IPSET_FLAG_EXIST = (1 << IPSET_FLAG_BIT_EXIST),
@@ -150,10 +153,20 @@ enum ipset_cmd_flags {
150 IPSET_FLAG_LIST_SETNAME = (1 << IPSET_FLAG_BIT_LIST_SETNAME), 153 IPSET_FLAG_LIST_SETNAME = (1 << IPSET_FLAG_BIT_LIST_SETNAME),
151 IPSET_FLAG_BIT_LIST_HEADER = 2, 154 IPSET_FLAG_BIT_LIST_HEADER = 2,
152 IPSET_FLAG_LIST_HEADER = (1 << IPSET_FLAG_BIT_LIST_HEADER), 155 IPSET_FLAG_LIST_HEADER = (1 << IPSET_FLAG_BIT_LIST_HEADER),
153 IPSET_FLAG_CMD_MAX = 15, /* Lower half */ 156 IPSET_FLAG_BIT_SKIP_COUNTER_UPDATE = 3,
157 IPSET_FLAG_SKIP_COUNTER_UPDATE =
158 (1 << IPSET_FLAG_BIT_SKIP_COUNTER_UPDATE),
159 IPSET_FLAG_BIT_SKIP_SUBCOUNTER_UPDATE = 4,
160 IPSET_FLAG_SKIP_SUBCOUNTER_UPDATE =
161 (1 << IPSET_FLAG_BIT_SKIP_SUBCOUNTER_UPDATE),
162 IPSET_FLAG_BIT_MATCH_COUNTERS = 5,
163 IPSET_FLAG_MATCH_COUNTERS = (1 << IPSET_FLAG_BIT_MATCH_COUNTERS),
164 IPSET_FLAG_BIT_RETURN_NOMATCH = 7,
165 IPSET_FLAG_RETURN_NOMATCH = (1 << IPSET_FLAG_BIT_RETURN_NOMATCH),
166 IPSET_FLAG_CMD_MAX = 15,
154}; 167};
155 168
156/* Flags at CADT attribute level */ 169/* Flags at CADT attribute level, upper half of cmdattrs */
157enum ipset_cadt_flags { 170enum ipset_cadt_flags {
158 IPSET_FLAG_BIT_BEFORE = 0, 171 IPSET_FLAG_BIT_BEFORE = 0,
159 IPSET_FLAG_BEFORE = (1 << IPSET_FLAG_BIT_BEFORE), 172 IPSET_FLAG_BEFORE = (1 << IPSET_FLAG_BIT_BEFORE),
@@ -161,7 +174,9 @@ enum ipset_cadt_flags {
161 IPSET_FLAG_PHYSDEV = (1 << IPSET_FLAG_BIT_PHYSDEV), 174 IPSET_FLAG_PHYSDEV = (1 << IPSET_FLAG_BIT_PHYSDEV),
162 IPSET_FLAG_BIT_NOMATCH = 2, 175 IPSET_FLAG_BIT_NOMATCH = 2,
163 IPSET_FLAG_NOMATCH = (1 << IPSET_FLAG_BIT_NOMATCH), 176 IPSET_FLAG_NOMATCH = (1 << IPSET_FLAG_BIT_NOMATCH),
164 IPSET_FLAG_CADT_MAX = 15, /* Upper half */ 177 IPSET_FLAG_BIT_WITH_COUNTERS = 3,
178 IPSET_FLAG_WITH_COUNTERS = (1 << IPSET_FLAG_BIT_WITH_COUNTERS),
179 IPSET_FLAG_CADT_MAX = 15,
165}; 180};
166 181
167/* Commands with settype-specific attributes */ 182/* Commands with settype-specific attributes */
@@ -190,6 +205,7 @@ enum ip_set_dim {
190 * If changed, new revision of iptables match/target is required. 205 * If changed, new revision of iptables match/target is required.
191 */ 206 */
192 IPSET_DIM_MAX = 6, 207 IPSET_DIM_MAX = 6,
208 /* Backward compatibility: set match revision 2 */
193 IPSET_BIT_RETURN_NOMATCH = 7, 209 IPSET_BIT_RETURN_NOMATCH = 7,
194}; 210};
195 211
@@ -202,6 +218,18 @@ enum ip_set_kopt {
202 IPSET_RETURN_NOMATCH = (1 << IPSET_BIT_RETURN_NOMATCH), 218 IPSET_RETURN_NOMATCH = (1 << IPSET_BIT_RETURN_NOMATCH),
203}; 219};
204 220
221enum {
222 IPSET_COUNTER_NONE = 0,
223 IPSET_COUNTER_EQ,
224 IPSET_COUNTER_NE,
225 IPSET_COUNTER_LT,
226 IPSET_COUNTER_GT,
227};
228
229struct ip_set_counter_match {
230 __u8 op;
231 __u64 value;
232};
205 233
206/* Interface to iptables/ip6tables */ 234/* Interface to iptables/ip6tables */
207 235
diff --git a/include/uapi/linux/netfilter/nfnetlink_queue.h b/include/uapi/linux/netfilter/nfnetlink_queue.h
index 70ec8c2bc11a..a2308ae5a73d 100644
--- a/include/uapi/linux/netfilter/nfnetlink_queue.h
+++ b/include/uapi/linux/netfilter/nfnetlink_queue.h
@@ -45,6 +45,7 @@ enum nfqnl_attr_type {
45 NFQA_CT, /* nf_conntrack_netlink.h */ 45 NFQA_CT, /* nf_conntrack_netlink.h */
46 NFQA_CT_INFO, /* enum ip_conntrack_info */ 46 NFQA_CT_INFO, /* enum ip_conntrack_info */
47 NFQA_CAP_LEN, /* __u32 length of captured packet */ 47 NFQA_CAP_LEN, /* __u32 length of captured packet */
48 NFQA_SKB_INFO, /* __u32 skb meta information */
48 49
49 __NFQA_MAX 50 __NFQA_MAX
50}; 51};
@@ -96,6 +97,13 @@ enum nfqnl_attr_config {
96/* Flags for NFQA_CFG_FLAGS */ 97/* Flags for NFQA_CFG_FLAGS */
97#define NFQA_CFG_F_FAIL_OPEN (1 << 0) 98#define NFQA_CFG_F_FAIL_OPEN (1 << 0)
98#define NFQA_CFG_F_CONNTRACK (1 << 1) 99#define NFQA_CFG_F_CONNTRACK (1 << 1)
99#define NFQA_CFG_F_MAX (1 << 2) 100#define NFQA_CFG_F_GSO (1 << 2)
101#define NFQA_CFG_F_MAX (1 << 3)
102
103/* flags for NFQA_SKB_INFO */
104/* packet appears to have wrong checksums, but they are ok */
105#define NFQA_SKB_CSUMNOTREADY (1 << 0)
106/* packet is GSO (i.e., exceeds device mtu) */
107#define NFQA_SKB_GSO (1 << 1)
100 108
101#endif /* _NFNETLINK_QUEUE_H */ 109#endif /* _NFNETLINK_QUEUE_H */
diff --git a/include/uapi/linux/netfilter/xt_NFQUEUE.h b/include/uapi/linux/netfilter/xt_NFQUEUE.h
index 9eafdbbb401c..8bb5fe657d34 100644
--- a/include/uapi/linux/netfilter/xt_NFQUEUE.h
+++ b/include/uapi/linux/netfilter/xt_NFQUEUE.h
@@ -26,4 +26,13 @@ struct xt_NFQ_info_v2 {
26 __u16 bypass; 26 __u16 bypass;
27}; 27};
28 28
29struct xt_NFQ_info_v3 {
30 __u16 queuenum;
31 __u16 queues_total;
32 __u16 flags;
33#define NFQ_FLAG_BYPASS 0x01 /* for compatibility with v2 */
34#define NFQ_FLAG_CPU_FANOUT 0x02 /* use current CPU (no hashing) */
35#define NFQ_FLAG_MASK 0x03
36};
37
29#endif /* _XT_NFQ_TARGET_H */ 38#endif /* _XT_NFQ_TARGET_H */
diff --git a/include/uapi/linux/netfilter/xt_set.h b/include/uapi/linux/netfilter/xt_set.h
index e3a9978f259f..964d3d42f874 100644
--- a/include/uapi/linux/netfilter/xt_set.h
+++ b/include/uapi/linux/netfilter/xt_set.h
@@ -62,4 +62,13 @@ struct xt_set_info_target_v2 {
62 __u32 timeout; 62 __u32 timeout;
63}; 63};
64 64
65/* Revision 3 match */
66
67struct xt_set_info_match_v3 {
68 struct xt_set_info match_set;
69 struct ip_set_counter_match packets;
70 struct ip_set_counter_match bytes;
71 __u32 flags;
72};
73
65#endif /*_XT_SET_H*/ 74#endif /*_XT_SET_H*/
diff --git a/include/uapi/linux/netfilter_ipv6/ip6t_frag.h b/include/uapi/linux/netfilter_ipv6/ip6t_frag.h
index b47f61b9e082..dfd8bc2268cf 100644
--- a/include/uapi/linux/netfilter_ipv6/ip6t_frag.h
+++ b/include/uapi/linux/netfilter_ipv6/ip6t_frag.h
@@ -4,9 +4,9 @@
4#include <linux/types.h> 4#include <linux/types.h>
5 5
6struct ip6t_frag { 6struct ip6t_frag {
7 __u32 ids[2]; /* Security Parameter Index */ 7 __u32 ids[2]; /* Identification range */
8 __u32 hdrlen; /* Header Length */ 8 __u32 hdrlen; /* Header Length */
9 __u8 flags; /* */ 9 __u8 flags; /* Flags */
10 __u8 invflags; /* Inverse flags */ 10 __u8 invflags; /* Inverse flags */
11}; 11};
12 12
diff --git a/include/uapi/linux/netlink.h b/include/uapi/linux/netlink.h
index 78d5b8a546d6..1a85940f8ab7 100644
--- a/include/uapi/linux/netlink.h
+++ b/include/uapi/linux/netlink.h
@@ -1,6 +1,7 @@
1#ifndef _UAPI__LINUX_NETLINK_H 1#ifndef _UAPI__LINUX_NETLINK_H
2#define _UAPI__LINUX_NETLINK_H 2#define _UAPI__LINUX_NETLINK_H
3 3
4#include <linux/kernel.h>
4#include <linux/socket.h> /* for __kernel_sa_family_t */ 5#include <linux/socket.h> /* for __kernel_sa_family_t */
5#include <linux/types.h> 6#include <linux/types.h>
6 7
@@ -78,7 +79,7 @@ struct nlmsghdr {
78#define NLMSG_ALIGNTO 4U 79#define NLMSG_ALIGNTO 4U
79#define NLMSG_ALIGN(len) ( ((len)+NLMSG_ALIGNTO-1) & ~(NLMSG_ALIGNTO-1) ) 80#define NLMSG_ALIGN(len) ( ((len)+NLMSG_ALIGNTO-1) & ~(NLMSG_ALIGNTO-1) )
80#define NLMSG_HDRLEN ((int) NLMSG_ALIGN(sizeof(struct nlmsghdr))) 81#define NLMSG_HDRLEN ((int) NLMSG_ALIGN(sizeof(struct nlmsghdr)))
81#define NLMSG_LENGTH(len) ((len)+NLMSG_ALIGN(NLMSG_HDRLEN)) 82#define NLMSG_LENGTH(len) ((len) + NLMSG_HDRLEN)
82#define NLMSG_SPACE(len) NLMSG_ALIGN(NLMSG_LENGTH(len)) 83#define NLMSG_SPACE(len) NLMSG_ALIGN(NLMSG_LENGTH(len))
83#define NLMSG_DATA(nlh) ((void*)(((char*)nlh) + NLMSG_LENGTH(0))) 84#define NLMSG_DATA(nlh) ((void*)(((char*)nlh) + NLMSG_LENGTH(0)))
84#define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), \ 85#define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), \
@@ -105,11 +106,42 @@ struct nlmsgerr {
105#define NETLINK_PKTINFO 3 106#define NETLINK_PKTINFO 3
106#define NETLINK_BROADCAST_ERROR 4 107#define NETLINK_BROADCAST_ERROR 4
107#define NETLINK_NO_ENOBUFS 5 108#define NETLINK_NO_ENOBUFS 5
109#define NETLINK_RX_RING 6
110#define NETLINK_TX_RING 7
108 111
109struct nl_pktinfo { 112struct nl_pktinfo {
110 __u32 group; 113 __u32 group;
111}; 114};
112 115
116struct nl_mmap_req {
117 unsigned int nm_block_size;
118 unsigned int nm_block_nr;
119 unsigned int nm_frame_size;
120 unsigned int nm_frame_nr;
121};
122
123struct nl_mmap_hdr {
124 unsigned int nm_status;
125 unsigned int nm_len;
126 __u32 nm_group;
127 /* credentials */
128 __u32 nm_pid;
129 __u32 nm_uid;
130 __u32 nm_gid;
131};
132
133enum nl_mmap_status {
134 NL_MMAP_STATUS_UNUSED,
135 NL_MMAP_STATUS_RESERVED,
136 NL_MMAP_STATUS_VALID,
137 NL_MMAP_STATUS_COPY,
138 NL_MMAP_STATUS_SKIP,
139};
140
141#define NL_MMAP_MSG_ALIGNMENT NLMSG_ALIGNTO
142#define NL_MMAP_MSG_ALIGN(sz) __ALIGN_KERNEL(sz, NL_MMAP_MSG_ALIGNMENT)
143#define NL_MMAP_HDRLEN NL_MMAP_MSG_ALIGN(sizeof(struct nl_mmap_hdr))
144
113#define NET_MAJOR 36 /* Major 36 is reserved for networking */ 145#define NET_MAJOR 36 /* Major 36 is reserved for networking */
114 146
115enum { 147enum {
diff --git a/include/uapi/linux/netlink_diag.h b/include/uapi/linux/netlink_diag.h
new file mode 100644
index 000000000000..4e31db4eea41
--- /dev/null
+++ b/include/uapi/linux/netlink_diag.h
@@ -0,0 +1,52 @@
1#ifndef __NETLINK_DIAG_H__
2#define __NETLINK_DIAG_H__
3
4#include <linux/types.h>
5
6struct netlink_diag_req {
7 __u8 sdiag_family;
8 __u8 sdiag_protocol;
9 __u16 pad;
10 __u32 ndiag_ino;
11 __u32 ndiag_show;
12 __u32 ndiag_cookie[2];
13};
14
15struct netlink_diag_msg {
16 __u8 ndiag_family;
17 __u8 ndiag_type;
18 __u8 ndiag_protocol;
19 __u8 ndiag_state;
20
21 __u32 ndiag_portid;
22 __u32 ndiag_dst_portid;
23 __u32 ndiag_dst_group;
24 __u32 ndiag_ino;
25 __u32 ndiag_cookie[2];
26};
27
28struct netlink_diag_ring {
29 __u32 ndr_block_size;
30 __u32 ndr_block_nr;
31 __u32 ndr_frame_size;
32 __u32 ndr_frame_nr;
33};
34
35enum {
36 NETLINK_DIAG_MEMINFO,
37 NETLINK_DIAG_GROUPS,
38 NETLINK_DIAG_RX_RING,
39 NETLINK_DIAG_TX_RING,
40
41 __NETLINK_DIAG_MAX,
42};
43
44#define NETLINK_DIAG_MAX (__NETLINK_DIAG_MAX - 1)
45
46#define NDIAG_PROTO_ALL ((__u8) ~0)
47
48#define NDIAG_SHOW_MEMINFO 0x00000001 /* show memory info of a socket */
49#define NDIAG_SHOW_GROUPS 0x00000002 /* show groups of a netlink socket */
50#define NDIAG_SHOW_RING_CFG 0x00000004 /* show ring configuration */
51
52#endif
diff --git a/include/uapi/linux/nfc.h b/include/uapi/linux/nfc.h
index 7969f46f1bb3..7c6f627a717d 100644
--- a/include/uapi/linux/nfc.h
+++ b/include/uapi/linux/nfc.h
@@ -90,6 +90,8 @@ enum nfc_commands {
90 NFC_CMD_LLC_SET_PARAMS, 90 NFC_CMD_LLC_SET_PARAMS,
91 NFC_CMD_ENABLE_SE, 91 NFC_CMD_ENABLE_SE,
92 NFC_CMD_DISABLE_SE, 92 NFC_CMD_DISABLE_SE,
93 NFC_CMD_LLC_SDREQ,
94 NFC_EVENT_LLC_SDRES,
93/* private: internal use only */ 95/* private: internal use only */
94 __NFC_CMD_AFTER_LAST 96 __NFC_CMD_AFTER_LAST
95}; 97};
@@ -140,11 +142,21 @@ enum nfc_attrs {
140 NFC_ATTR_LLC_PARAM_RW, 142 NFC_ATTR_LLC_PARAM_RW,
141 NFC_ATTR_LLC_PARAM_MIUX, 143 NFC_ATTR_LLC_PARAM_MIUX,
142 NFC_ATTR_SE, 144 NFC_ATTR_SE,
145 NFC_ATTR_LLC_SDP,
143/* private: internal use only */ 146/* private: internal use only */
144 __NFC_ATTR_AFTER_LAST 147 __NFC_ATTR_AFTER_LAST
145}; 148};
146#define NFC_ATTR_MAX (__NFC_ATTR_AFTER_LAST - 1) 149#define NFC_ATTR_MAX (__NFC_ATTR_AFTER_LAST - 1)
147 150
151enum nfc_sdp_attr {
152 NFC_SDP_ATTR_UNSPEC,
153 NFC_SDP_ATTR_URI,
154 NFC_SDP_ATTR_SAP,
155/* private: internal use only */
156 __NFC_SDP_ATTR_AFTER_LAST
157};
158#define NFC_SDP_ATTR_MAX (__NFC_SDP_ATTR_AFTER_LAST - 1)
159
148#define NFC_DEVICE_NAME_MAXSIZE 8 160#define NFC_DEVICE_NAME_MAXSIZE 8
149#define NFC_NFCID1_MAXSIZE 10 161#define NFC_NFCID1_MAXSIZE 10
150#define NFC_SENSB_RES_MAXSIZE 12 162#define NFC_SENSB_RES_MAXSIZE 12
@@ -220,4 +232,11 @@ struct sockaddr_nfc_llcp {
220#define NFC_LLCP_DIRECTION_RX 0x00 232#define NFC_LLCP_DIRECTION_RX 0x00
221#define NFC_LLCP_DIRECTION_TX 0x01 233#define NFC_LLCP_DIRECTION_TX 0x01
222 234
235/* socket option names */
236#define NFC_LLCP_RW 0
237#define NFC_LLCP_MIUX 1
238#define NFC_LLCP_REMOTE_MIU 2
239#define NFC_LLCP_REMOTE_LTO 3
240#define NFC_LLCP_REMOTE_RW 4
241
223#endif /*__LINUX_NFC_H */ 242#endif /*__LINUX_NFC_H */
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
index c46bb016f4e4..d1e48b5e348f 100644
--- a/include/uapi/linux/nl80211.h
+++ b/include/uapi/linux/nl80211.h
@@ -36,7 +36,21 @@
36 * The station is still assumed to belong to the AP interface it was added 36 * The station is still assumed to belong to the AP interface it was added
37 * to. 37 * to.
38 * 38 *
39 * TODO: need more info? 39 * Station handling varies per interface type and depending on the driver's
40 * capabilities.
41 *
42 * For drivers supporting TDLS with external setup (WIPHY_FLAG_SUPPORTS_TDLS
43 * and WIPHY_FLAG_TDLS_EXTERNAL_SETUP), the station lifetime is as follows:
44 * - a setup station entry is added, not yet authorized, without any rate
45 * or capability information, this just exists to avoid race conditions
46 * - when the TDLS setup is done, a single NL80211_CMD_SET_STATION is valid
47 * to add rate and capability information to the station and at the same
48 * time mark it authorized.
49 * - %NL80211_TDLS_ENABLE_LINK is then used
50 * - after this, the only valid operation is to remove it by tearing down
51 * the TDLS link (%NL80211_TDLS_DISABLE_LINK)
52 *
53 * TODO: need more info for other interface types
40 */ 54 */
41 55
42/** 56/**
@@ -499,9 +513,11 @@
499 * @NL80211_CMD_NEW_PEER_CANDIDATE: Notification on the reception of a 513 * @NL80211_CMD_NEW_PEER_CANDIDATE: Notification on the reception of a
500 * beacon or probe response from a compatible mesh peer. This is only 514 * beacon or probe response from a compatible mesh peer. This is only
501 * sent while no station information (sta_info) exists for the new peer 515 * sent while no station information (sta_info) exists for the new peer
502 * candidate and when @NL80211_MESH_SETUP_USERSPACE_AUTH is set. On 516 * candidate and when @NL80211_MESH_SETUP_USERSPACE_AUTH,
503 * reception of this notification, userspace may decide to create a new 517 * @NL80211_MESH_SETUP_USERSPACE_AMPE, or
504 * station (@NL80211_CMD_NEW_STATION). To stop this notification from 518 * @NL80211_MESH_SETUP_USERSPACE_MPM is set. On reception of this
519 * notification, userspace may decide to create a new station
520 * (@NL80211_CMD_NEW_STATION). To stop this notification from
505 * reoccurring, the userspace authentication daemon may want to create the 521 * reoccurring, the userspace authentication daemon may want to create the
506 * new station with the AUTHENTICATED flag unset and maybe change it later 522 * new station with the AUTHENTICATED flag unset and maybe change it later
507 * depending on the authentication result. 523 * depending on the authentication result.
@@ -611,6 +627,25 @@
611 * %NL80211_ATTR_RADAR_EVENT is used to inform about the type of the 627 * %NL80211_ATTR_RADAR_EVENT is used to inform about the type of the
612 * event. 628 * event.
613 * 629 *
630 * @NL80211_CMD_GET_PROTOCOL_FEATURES: Get global nl80211 protocol features,
631 * i.e. features for the nl80211 protocol rather than device features.
632 * Returns the features in the %NL80211_ATTR_PROTOCOL_FEATURES bitmap.
633 *
634 * @NL80211_CMD_UPDATE_FT_IES: Pass down the most up-to-date Fast Transition
635 * Information Element to the WLAN driver
636 *
637 * @NL80211_CMD_FT_EVENT: Send a Fast transition event from the WLAN driver
638 * to the supplicant. This will carry the target AP's MAC address along
639 * with the relevant Information Elements. This event is used to report
640 * received FT IEs (MDIE, FTIE, RSN IE, TIE, RICIE).
641 *
642 * @NL80211_CMD_CRIT_PROTOCOL_START: Indicates user-space will start running
643 * a critical protocol that needs more reliability in the connection to
644 * complete.
645 *
646 * @NL80211_CMD_CRIT_PROTOCOL_STOP: Indicates the connection reliability can
647 * return back to normal.
648 *
614 * @NL80211_CMD_MAX: highest used command number 649 * @NL80211_CMD_MAX: highest used command number
615 * @__NL80211_CMD_AFTER_LAST: internal use 650 * @__NL80211_CMD_AFTER_LAST: internal use
616 */ 651 */
@@ -765,6 +800,14 @@ enum nl80211_commands {
765 800
766 NL80211_CMD_RADAR_DETECT, 801 NL80211_CMD_RADAR_DETECT,
767 802
803 NL80211_CMD_GET_PROTOCOL_FEATURES,
804
805 NL80211_CMD_UPDATE_FT_IES,
806 NL80211_CMD_FT_EVENT,
807
808 NL80211_CMD_CRIT_PROTOCOL_START,
809 NL80211_CMD_CRIT_PROTOCOL_STOP,
810
768 /* add new commands above here */ 811 /* add new commands above here */
769 812
770 /* used to define NL80211_CMD_MAX below */ 813 /* used to define NL80211_CMD_MAX below */
@@ -884,7 +927,8 @@ enum nl80211_commands {
884 * consisting of a nested array. 927 * consisting of a nested array.
885 * 928 *
886 * @NL80211_ATTR_MESH_ID: mesh id (1-32 bytes). 929 * @NL80211_ATTR_MESH_ID: mesh id (1-32 bytes).
887 * @NL80211_ATTR_STA_PLINK_ACTION: action to perform on the mesh peer link. 930 * @NL80211_ATTR_STA_PLINK_ACTION: action to perform on the mesh peer link
931 * (see &enum nl80211_plink_action).
888 * @NL80211_ATTR_MPATH_NEXT_HOP: MAC address of the next hop for a mesh path. 932 * @NL80211_ATTR_MPATH_NEXT_HOP: MAC address of the next hop for a mesh path.
889 * @NL80211_ATTR_MPATH_INFO: information about a mesh_path, part of mesh path 933 * @NL80211_ATTR_MPATH_INFO: information about a mesh_path, part of mesh path
890 * info given for %NL80211_CMD_GET_MPATH, nested attribute described at 934 * info given for %NL80211_CMD_GET_MPATH, nested attribute described at
@@ -1167,10 +1211,10 @@ enum nl80211_commands {
1167 * @NL80211_ATTR_SUPPORT_MESH_AUTH: Currently, this means the underlying driver 1211 * @NL80211_ATTR_SUPPORT_MESH_AUTH: Currently, this means the underlying driver
1168 * allows auth frames in a mesh to be passed to userspace for processing via 1212 * allows auth frames in a mesh to be passed to userspace for processing via
1169 * the @NL80211_MESH_SETUP_USERSPACE_AUTH flag. 1213 * the @NL80211_MESH_SETUP_USERSPACE_AUTH flag.
1170 * @NL80211_ATTR_STA_PLINK_STATE: The state of a mesh peer link as 1214 * @NL80211_ATTR_STA_PLINK_STATE: The state of a mesh peer link as defined in
1171 * defined in &enum nl80211_plink_state. Used when userspace is 1215 * &enum nl80211_plink_state. Used when userspace is driving the peer link
1172 * driving the peer link management state machine. 1216 * management state machine. @NL80211_MESH_SETUP_USERSPACE_AMPE or
1173 * @NL80211_MESH_SETUP_USERSPACE_AMPE must be enabled. 1217 * @NL80211_MESH_SETUP_USERSPACE_MPM must be enabled.
1174 * 1218 *
1175 * @NL80211_ATTR_WOWLAN_TRIGGERS_SUPPORTED: indicates, as part of the wiphy 1219 * @NL80211_ATTR_WOWLAN_TRIGGERS_SUPPORTED: indicates, as part of the wiphy
1176 * capabilities, the supported WoWLAN triggers 1220 * capabilities, the supported WoWLAN triggers
@@ -1368,6 +1412,23 @@ enum nl80211_commands {
1368 * advertised to the driver, e.g., to enable TDLS off channel operations 1412 * advertised to the driver, e.g., to enable TDLS off channel operations
1369 * and PU-APSD. 1413 * and PU-APSD.
1370 * 1414 *
1415 * @NL80211_ATTR_PROTOCOL_FEATURES: global nl80211 feature flags, see
1416 * &enum nl80211_protocol_features, the attribute is a u32.
1417 *
1418 * @NL80211_ATTR_SPLIT_WIPHY_DUMP: flag attribute, userspace supports
1419 * receiving the data for a single wiphy split across multiple
1420 * messages, given with wiphy dump message
1421 *
1422 * @NL80211_ATTR_MDID: Mobility Domain Identifier
1423 *
1424 * @NL80211_ATTR_IE_RIC: Resource Information Container Information
1425 * Element
1426 *
1427 * @NL80211_ATTR_CRIT_PROT_ID: critical protocol identifier requiring increased
1428 * reliability, see &enum nl80211_crit_proto_id (u16).
1429 * @NL80211_ATTR_MAX_CRIT_PROT_DURATION: duration in milliseconds in which
1430 * the connection should have increased reliability (u16).
1431 *
1371 * @NL80211_ATTR_MAX: highest attribute number currently defined 1432 * @NL80211_ATTR_MAX: highest attribute number currently defined
1372 * @__NL80211_ATTR_AFTER_LAST: internal use 1433 * @__NL80211_ATTR_AFTER_LAST: internal use
1373 */ 1434 */
@@ -1654,6 +1715,18 @@ enum nl80211_attrs {
1654 NL80211_ATTR_STA_CAPABILITY, 1715 NL80211_ATTR_STA_CAPABILITY,
1655 NL80211_ATTR_STA_EXT_CAPABILITY, 1716 NL80211_ATTR_STA_EXT_CAPABILITY,
1656 1717
1718 NL80211_ATTR_PROTOCOL_FEATURES,
1719 NL80211_ATTR_SPLIT_WIPHY_DUMP,
1720
1721 NL80211_ATTR_DISABLE_VHT,
1722 NL80211_ATTR_VHT_CAPABILITY_MASK,
1723
1724 NL80211_ATTR_MDID,
1725 NL80211_ATTR_IE_RIC,
1726
1727 NL80211_ATTR_CRIT_PROT_ID,
1728 NL80211_ATTR_MAX_CRIT_PROT_DURATION,
1729
1657 /* add attributes here, update the policy in nl80211.c */ 1730 /* add attributes here, update the policy in nl80211.c */
1658 1731
1659 __NL80211_ATTR_AFTER_LAST, 1732 __NL80211_ATTR_AFTER_LAST,
@@ -2412,8 +2485,10 @@ enum nl80211_mesh_power_mode {
2412 * @NL80211_MESHCONF_TTL: specifies the value of TTL field set at a source mesh 2485 * @NL80211_MESHCONF_TTL: specifies the value of TTL field set at a source mesh
2413 * point. 2486 * point.
2414 * 2487 *
2415 * @NL80211_MESHCONF_AUTO_OPEN_PLINKS: whether we should automatically 2488 * @NL80211_MESHCONF_AUTO_OPEN_PLINKS: whether we should automatically open
2416 * open peer links when we detect compatible mesh peers. 2489 * peer links when we detect compatible mesh peers. Disabled if
2490 * @NL80211_MESH_SETUP_USERSPACE_MPM or @NL80211_MESH_SETUP_USERSPACE_AMPE are
2491 * set.
2417 * 2492 *
2418 * @NL80211_MESHCONF_HWMP_MAX_PREQ_RETRIES: the number of action frames 2493 * @NL80211_MESHCONF_HWMP_MAX_PREQ_RETRIES: the number of action frames
2419 * containing a PREQ that an MP can send to a particular destination (path 2494 * containing a PREQ that an MP can send to a particular destination (path
@@ -2559,6 +2634,9 @@ enum nl80211_meshconf_params {
2559 * vendor specific synchronization method or disable it to use the default 2634 * vendor specific synchronization method or disable it to use the default
2560 * neighbor offset synchronization 2635 * neighbor offset synchronization
2561 * 2636 *
2637 * @NL80211_MESH_SETUP_USERSPACE_MPM: Enable this option if userspace will
2638 * implement an MPM which handles peer allocation and state.
2639 *
2562 * @NL80211_MESH_SETUP_ATTR_MAX: highest possible mesh setup attribute number 2640 * @NL80211_MESH_SETUP_ATTR_MAX: highest possible mesh setup attribute number
2563 * 2641 *
2564 * @__NL80211_MESH_SETUP_ATTR_AFTER_LAST: Internal use 2642 * @__NL80211_MESH_SETUP_ATTR_AFTER_LAST: Internal use
@@ -2571,6 +2649,7 @@ enum nl80211_mesh_setup_params {
2571 NL80211_MESH_SETUP_USERSPACE_AUTH, 2649 NL80211_MESH_SETUP_USERSPACE_AUTH,
2572 NL80211_MESH_SETUP_USERSPACE_AMPE, 2650 NL80211_MESH_SETUP_USERSPACE_AMPE,
2573 NL80211_MESH_SETUP_ENABLE_VENDOR_SYNC, 2651 NL80211_MESH_SETUP_ENABLE_VENDOR_SYNC,
2652 NL80211_MESH_SETUP_USERSPACE_MPM,
2574 2653
2575 /* keep last */ 2654 /* keep last */
2576 __NL80211_MESH_SETUP_ATTR_AFTER_LAST, 2655 __NL80211_MESH_SETUP_ATTR_AFTER_LAST,
@@ -3307,6 +3386,23 @@ enum nl80211_plink_state {
3307 MAX_NL80211_PLINK_STATES = NUM_NL80211_PLINK_STATES - 1 3386 MAX_NL80211_PLINK_STATES = NUM_NL80211_PLINK_STATES - 1
3308}; 3387};
3309 3388
3389/**
3390 * enum nl80211_plink_action - actions to perform in mesh peers
3391 *
3392 * @NL80211_PLINK_ACTION_NO_ACTION: perform no action
3393 * @NL80211_PLINK_ACTION_OPEN: start mesh peer link establishment
3394 * @NL80211_PLINK_ACTION_BLOCK: block traffic from this mesh peer
3395 * @NUM_NL80211_PLINK_ACTIONS: number of possible actions
3396 */
3397enum plink_actions {
3398 NL80211_PLINK_ACTION_NO_ACTION,
3399 NL80211_PLINK_ACTION_OPEN,
3400 NL80211_PLINK_ACTION_BLOCK,
3401
3402 NUM_NL80211_PLINK_ACTIONS,
3403};
3404
3405
3310#define NL80211_KCK_LEN 16 3406#define NL80211_KCK_LEN 16
3311#define NL80211_KEK_LEN 16 3407#define NL80211_KEK_LEN 16
3312#define NL80211_REPLAY_CTR_LEN 8 3408#define NL80211_REPLAY_CTR_LEN 8
@@ -3456,6 +3552,10 @@ enum nl80211_ap_sme_features {
3456 * stations the authenticated/associated bits have to be set in the mask. 3552 * stations the authenticated/associated bits have to be set in the mask.
3457 * @NL80211_FEATURE_ADVERTISE_CHAN_LIMITS: cfg80211 advertises channel limits 3553 * @NL80211_FEATURE_ADVERTISE_CHAN_LIMITS: cfg80211 advertises channel limits
3458 * (HT40, VHT 80/160 MHz) if this flag is set 3554 * (HT40, VHT 80/160 MHz) if this flag is set
3555 * @NL80211_FEATURE_USERSPACE_MPM: This driver supports a userspace Mesh
3556 * Peering Management entity which may be implemented by registering for
3557 * beacons or NL80211_CMD_NEW_PEER_CANDIDATE events. The mesh beacon is
3558 * still generated by the driver.
3459 */ 3559 */
3460enum nl80211_feature_flags { 3560enum nl80211_feature_flags {
3461 NL80211_FEATURE_SK_TX_STATUS = 1 << 0, 3561 NL80211_FEATURE_SK_TX_STATUS = 1 << 0,
@@ -3474,6 +3574,7 @@ enum nl80211_feature_flags {
3474 /* bit 13 is reserved */ 3574 /* bit 13 is reserved */
3475 NL80211_FEATURE_ADVERTISE_CHAN_LIMITS = 1 << 14, 3575 NL80211_FEATURE_ADVERTISE_CHAN_LIMITS = 1 << 14,
3476 NL80211_FEATURE_FULL_AP_CLIENT_STATE = 1 << 15, 3576 NL80211_FEATURE_FULL_AP_CLIENT_STATE = 1 << 15,
3577 NL80211_FEATURE_USERSPACE_MPM = 1 << 16,
3477}; 3578};
3478 3579
3479/** 3580/**
@@ -3587,4 +3688,37 @@ enum nl80211_dfs_state {
3587 NL80211_DFS_AVAILABLE, 3688 NL80211_DFS_AVAILABLE,
3588}; 3689};
3589 3690
3691/**
3692 * enum enum nl80211_protocol_features - nl80211 protocol features
3693 * @NL80211_PROTOCOL_FEATURE_SPLIT_WIPHY_DUMP: nl80211 supports splitting
3694 * wiphy dumps (if requested by the application with the attribute
3695 * %NL80211_ATTR_SPLIT_WIPHY_DUMP. Also supported is filtering the
3696 * wiphy dump by %NL80211_ATTR_WIPHY, %NL80211_ATTR_IFINDEX or
3697 * %NL80211_ATTR_WDEV.
3698 */
3699enum nl80211_protocol_features {
3700 NL80211_PROTOCOL_FEATURE_SPLIT_WIPHY_DUMP = 1 << 0,
3701};
3702
3703/**
3704 * enum nl80211_crit_proto_id - nl80211 critical protocol identifiers
3705 *
3706 * @NL80211_CRIT_PROTO_UNSPEC: protocol unspecified.
3707 * @NL80211_CRIT_PROTO_DHCP: BOOTP or DHCPv6 protocol.
3708 * @NL80211_CRIT_PROTO_EAPOL: EAPOL protocol.
3709 * @NL80211_CRIT_PROTO_APIPA: APIPA protocol.
3710 * @NUM_NL80211_CRIT_PROTO: must be kept last.
3711 */
3712enum nl80211_crit_proto_id {
3713 NL80211_CRIT_PROTO_UNSPEC,
3714 NL80211_CRIT_PROTO_DHCP,
3715 NL80211_CRIT_PROTO_EAPOL,
3716 NL80211_CRIT_PROTO_APIPA,
3717 /* add other protocols before this one */
3718 NUM_NL80211_CRIT_PROTO
3719};
3720
3721/* maximum duration for critical protocol measures */
3722#define NL80211_CRIT_PROTO_MAX_DURATION 5000 /* msec */
3723
3590#endif /* __LINUX_NL80211_H */ 3724#endif /* __LINUX_NL80211_H */
diff --git a/include/uapi/linux/openvswitch.h b/include/uapi/linux/openvswitch.h
new file mode 100644
index 000000000000..405918dd7b3f
--- /dev/null
+++ b/include/uapi/linux/openvswitch.h
@@ -0,0 +1,456 @@
1
2/*
3 * Copyright (c) 2007-2011 Nicira Networks.
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of version 2 of the GNU General Public
7 * License as published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 * 02110-1301, USA
18 */
19
20#ifndef _UAPI__LINUX_OPENVSWITCH_H
21#define _UAPI__LINUX_OPENVSWITCH_H 1
22
23#include <linux/types.h>
24#include <linux/if_ether.h>
25
26/**
27 * struct ovs_header - header for OVS Generic Netlink messages.
28 * @dp_ifindex: ifindex of local port for datapath (0 to make a request not
29 * specific to a datapath).
30 *
31 * Attributes following the header are specific to a particular OVS Generic
32 * Netlink family, but all of the OVS families use this header.
33 */
34
35struct ovs_header {
36 int dp_ifindex;
37};
38
39/* Datapaths. */
40
41#define OVS_DATAPATH_FAMILY "ovs_datapath"
42#define OVS_DATAPATH_MCGROUP "ovs_datapath"
43#define OVS_DATAPATH_VERSION 0x1
44
45enum ovs_datapath_cmd {
46 OVS_DP_CMD_UNSPEC,
47 OVS_DP_CMD_NEW,
48 OVS_DP_CMD_DEL,
49 OVS_DP_CMD_GET,
50 OVS_DP_CMD_SET
51};
52
53/**
54 * enum ovs_datapath_attr - attributes for %OVS_DP_* commands.
55 * @OVS_DP_ATTR_NAME: Name of the network device that serves as the "local
56 * port". This is the name of the network device whose dp_ifindex is given in
57 * the &struct ovs_header. Always present in notifications. Required in
58 * %OVS_DP_NEW requests. May be used as an alternative to specifying
59 * dp_ifindex in other requests (with a dp_ifindex of 0).
60 * @OVS_DP_ATTR_UPCALL_PID: The Netlink socket in userspace that is initially
61 * set on the datapath port (for OVS_ACTION_ATTR_MISS). Only valid on
62 * %OVS_DP_CMD_NEW requests. A value of zero indicates that upcalls should
63 * not be sent.
64 * @OVS_DP_ATTR_STATS: Statistics about packets that have passed through the
65 * datapath. Always present in notifications.
66 *
67 * These attributes follow the &struct ovs_header within the Generic Netlink
68 * payload for %OVS_DP_* commands.
69 */
70enum ovs_datapath_attr {
71 OVS_DP_ATTR_UNSPEC,
72 OVS_DP_ATTR_NAME, /* name of dp_ifindex netdev */
73 OVS_DP_ATTR_UPCALL_PID, /* Netlink PID to receive upcalls */
74 OVS_DP_ATTR_STATS, /* struct ovs_dp_stats */
75 __OVS_DP_ATTR_MAX
76};
77
78#define OVS_DP_ATTR_MAX (__OVS_DP_ATTR_MAX - 1)
79
80struct ovs_dp_stats {
81 __u64 n_hit; /* Number of flow table matches. */
82 __u64 n_missed; /* Number of flow table misses. */
83 __u64 n_lost; /* Number of misses not sent to userspace. */
84 __u64 n_flows; /* Number of flows present */
85};
86
87struct ovs_vport_stats {
88 __u64 rx_packets; /* total packets received */
89 __u64 tx_packets; /* total packets transmitted */
90 __u64 rx_bytes; /* total bytes received */
91 __u64 tx_bytes; /* total bytes transmitted */
92 __u64 rx_errors; /* bad packets received */
93 __u64 tx_errors; /* packet transmit problems */
94 __u64 rx_dropped; /* no space in linux buffers */
95 __u64 tx_dropped; /* no space available in linux */
96};
97
98/* Fixed logical ports. */
99#define OVSP_LOCAL ((__u32)0)
100
101/* Packet transfer. */
102
103#define OVS_PACKET_FAMILY "ovs_packet"
104#define OVS_PACKET_VERSION 0x1
105
106enum ovs_packet_cmd {
107 OVS_PACKET_CMD_UNSPEC,
108
109 /* Kernel-to-user notifications. */
110 OVS_PACKET_CMD_MISS, /* Flow table miss. */
111 OVS_PACKET_CMD_ACTION, /* OVS_ACTION_ATTR_USERSPACE action. */
112
113 /* Userspace commands. */
114 OVS_PACKET_CMD_EXECUTE /* Apply actions to a packet. */
115};
116
117/**
118 * enum ovs_packet_attr - attributes for %OVS_PACKET_* commands.
119 * @OVS_PACKET_ATTR_PACKET: Present for all notifications. Contains the entire
120 * packet as received, from the start of the Ethernet header onward. For
121 * %OVS_PACKET_CMD_ACTION, %OVS_PACKET_ATTR_PACKET reflects changes made by
122 * actions preceding %OVS_ACTION_ATTR_USERSPACE, but %OVS_PACKET_ATTR_KEY is
123 * the flow key extracted from the packet as originally received.
124 * @OVS_PACKET_ATTR_KEY: Present for all notifications. Contains the flow key
125 * extracted from the packet as nested %OVS_KEY_ATTR_* attributes. This allows
126 * userspace to adapt its flow setup strategy by comparing its notion of the
127 * flow key against the kernel's.
128 * @OVS_PACKET_ATTR_ACTIONS: Contains actions for the packet. Used
129 * for %OVS_PACKET_CMD_EXECUTE. It has nested %OVS_ACTION_ATTR_* attributes.
130 * @OVS_PACKET_ATTR_USERDATA: Present for an %OVS_PACKET_CMD_ACTION
131 * notification if the %OVS_ACTION_ATTR_USERSPACE action specified an
132 * %OVS_USERSPACE_ATTR_USERDATA attribute, with the same length and content
133 * specified there.
134 *
135 * These attributes follow the &struct ovs_header within the Generic Netlink
136 * payload for %OVS_PACKET_* commands.
137 */
138enum ovs_packet_attr {
139 OVS_PACKET_ATTR_UNSPEC,
140 OVS_PACKET_ATTR_PACKET, /* Packet data. */
141 OVS_PACKET_ATTR_KEY, /* Nested OVS_KEY_ATTR_* attributes. */
142 OVS_PACKET_ATTR_ACTIONS, /* Nested OVS_ACTION_ATTR_* attributes. */
143 OVS_PACKET_ATTR_USERDATA, /* OVS_ACTION_ATTR_USERSPACE arg. */
144 __OVS_PACKET_ATTR_MAX
145};
146
147#define OVS_PACKET_ATTR_MAX (__OVS_PACKET_ATTR_MAX - 1)
148
149/* Virtual ports. */
150
151#define OVS_VPORT_FAMILY "ovs_vport"
152#define OVS_VPORT_MCGROUP "ovs_vport"
153#define OVS_VPORT_VERSION 0x1
154
155enum ovs_vport_cmd {
156 OVS_VPORT_CMD_UNSPEC,
157 OVS_VPORT_CMD_NEW,
158 OVS_VPORT_CMD_DEL,
159 OVS_VPORT_CMD_GET,
160 OVS_VPORT_CMD_SET
161};
162
163enum ovs_vport_type {
164 OVS_VPORT_TYPE_UNSPEC,
165 OVS_VPORT_TYPE_NETDEV, /* network device */
166 OVS_VPORT_TYPE_INTERNAL, /* network device implemented by datapath */
167 __OVS_VPORT_TYPE_MAX
168};
169
170#define OVS_VPORT_TYPE_MAX (__OVS_VPORT_TYPE_MAX - 1)
171
172/**
173 * enum ovs_vport_attr - attributes for %OVS_VPORT_* commands.
174 * @OVS_VPORT_ATTR_PORT_NO: 32-bit port number within datapath.
175 * @OVS_VPORT_ATTR_TYPE: 32-bit %OVS_VPORT_TYPE_* constant describing the type
176 * of vport.
177 * @OVS_VPORT_ATTR_NAME: Name of vport. For a vport based on a network device
178 * this is the name of the network device. Maximum length %IFNAMSIZ-1 bytes
179 * plus a null terminator.
180 * @OVS_VPORT_ATTR_OPTIONS: Vport-specific configuration information.
181 * @OVS_VPORT_ATTR_UPCALL_PID: The Netlink socket in userspace that
182 * OVS_PACKET_CMD_MISS upcalls will be directed to for packets received on
183 * this port. A value of zero indicates that upcalls should not be sent.
184 * @OVS_VPORT_ATTR_STATS: A &struct ovs_vport_stats giving statistics for
185 * packets sent or received through the vport.
186 *
187 * These attributes follow the &struct ovs_header within the Generic Netlink
188 * payload for %OVS_VPORT_* commands.
189 *
190 * For %OVS_VPORT_CMD_NEW requests, the %OVS_VPORT_ATTR_TYPE and
191 * %OVS_VPORT_ATTR_NAME attributes are required. %OVS_VPORT_ATTR_PORT_NO is
192 * optional; if not specified a free port number is automatically selected.
193 * Whether %OVS_VPORT_ATTR_OPTIONS is required or optional depends on the type
194 * of vport.
195 * and other attributes are ignored.
196 *
197 * For other requests, if %OVS_VPORT_ATTR_NAME is specified then it is used to
198 * look up the vport to operate on; otherwise dp_idx from the &struct
199 * ovs_header plus %OVS_VPORT_ATTR_PORT_NO determine the vport.
200 */
201enum ovs_vport_attr {
202 OVS_VPORT_ATTR_UNSPEC,
203 OVS_VPORT_ATTR_PORT_NO, /* u32 port number within datapath */
204 OVS_VPORT_ATTR_TYPE, /* u32 OVS_VPORT_TYPE_* constant. */
205 OVS_VPORT_ATTR_NAME, /* string name, up to IFNAMSIZ bytes long */
206 OVS_VPORT_ATTR_OPTIONS, /* nested attributes, varies by vport type */
207 OVS_VPORT_ATTR_UPCALL_PID, /* u32 Netlink PID to receive upcalls */
208 OVS_VPORT_ATTR_STATS, /* struct ovs_vport_stats */
209 __OVS_VPORT_ATTR_MAX
210};
211
212#define OVS_VPORT_ATTR_MAX (__OVS_VPORT_ATTR_MAX - 1)
213
214/* Flows. */
215
216#define OVS_FLOW_FAMILY "ovs_flow"
217#define OVS_FLOW_MCGROUP "ovs_flow"
218#define OVS_FLOW_VERSION 0x1
219
220enum ovs_flow_cmd {
221 OVS_FLOW_CMD_UNSPEC,
222 OVS_FLOW_CMD_NEW,
223 OVS_FLOW_CMD_DEL,
224 OVS_FLOW_CMD_GET,
225 OVS_FLOW_CMD_SET
226};
227
228struct ovs_flow_stats {
229 __u64 n_packets; /* Number of matched packets. */
230 __u64 n_bytes; /* Number of matched bytes. */
231};
232
233enum ovs_key_attr {
234 OVS_KEY_ATTR_UNSPEC,
235 OVS_KEY_ATTR_ENCAP, /* Nested set of encapsulated attributes. */
236 OVS_KEY_ATTR_PRIORITY, /* u32 skb->priority */
237 OVS_KEY_ATTR_IN_PORT, /* u32 OVS dp port number */
238 OVS_KEY_ATTR_ETHERNET, /* struct ovs_key_ethernet */
239 OVS_KEY_ATTR_VLAN, /* be16 VLAN TCI */
240 OVS_KEY_ATTR_ETHERTYPE, /* be16 Ethernet type */
241 OVS_KEY_ATTR_IPV4, /* struct ovs_key_ipv4 */
242 OVS_KEY_ATTR_IPV6, /* struct ovs_key_ipv6 */
243 OVS_KEY_ATTR_TCP, /* struct ovs_key_tcp */
244 OVS_KEY_ATTR_UDP, /* struct ovs_key_udp */
245 OVS_KEY_ATTR_ICMP, /* struct ovs_key_icmp */
246 OVS_KEY_ATTR_ICMPV6, /* struct ovs_key_icmpv6 */
247 OVS_KEY_ATTR_ARP, /* struct ovs_key_arp */
248 OVS_KEY_ATTR_ND, /* struct ovs_key_nd */
249 OVS_KEY_ATTR_SKB_MARK, /* u32 skb mark */
250 __OVS_KEY_ATTR_MAX
251};
252
253#define OVS_KEY_ATTR_MAX (__OVS_KEY_ATTR_MAX - 1)
254
255/**
256 * enum ovs_frag_type - IPv4 and IPv6 fragment type
257 * @OVS_FRAG_TYPE_NONE: Packet is not a fragment.
258 * @OVS_FRAG_TYPE_FIRST: Packet is a fragment with offset 0.
259 * @OVS_FRAG_TYPE_LATER: Packet is a fragment with nonzero offset.
260 *
261 * Used as the @ipv4_frag in &struct ovs_key_ipv4 and as @ipv6_frag &struct
262 * ovs_key_ipv6.
263 */
264enum ovs_frag_type {
265 OVS_FRAG_TYPE_NONE,
266 OVS_FRAG_TYPE_FIRST,
267 OVS_FRAG_TYPE_LATER,
268 __OVS_FRAG_TYPE_MAX
269};
270
271#define OVS_FRAG_TYPE_MAX (__OVS_FRAG_TYPE_MAX - 1)
272
273struct ovs_key_ethernet {
274 __u8 eth_src[ETH_ALEN];
275 __u8 eth_dst[ETH_ALEN];
276};
277
278struct ovs_key_ipv4 {
279 __be32 ipv4_src;
280 __be32 ipv4_dst;
281 __u8 ipv4_proto;
282 __u8 ipv4_tos;
283 __u8 ipv4_ttl;
284 __u8 ipv4_frag; /* One of OVS_FRAG_TYPE_*. */
285};
286
287struct ovs_key_ipv6 {
288 __be32 ipv6_src[4];
289 __be32 ipv6_dst[4];
290 __be32 ipv6_label; /* 20-bits in least-significant bits. */
291 __u8 ipv6_proto;
292 __u8 ipv6_tclass;
293 __u8 ipv6_hlimit;
294 __u8 ipv6_frag; /* One of OVS_FRAG_TYPE_*. */
295};
296
297struct ovs_key_tcp {
298 __be16 tcp_src;
299 __be16 tcp_dst;
300};
301
302struct ovs_key_udp {
303 __be16 udp_src;
304 __be16 udp_dst;
305};
306
307struct ovs_key_icmp {
308 __u8 icmp_type;
309 __u8 icmp_code;
310};
311
312struct ovs_key_icmpv6 {
313 __u8 icmpv6_type;
314 __u8 icmpv6_code;
315};
316
317struct ovs_key_arp {
318 __be32 arp_sip;
319 __be32 arp_tip;
320 __be16 arp_op;
321 __u8 arp_sha[ETH_ALEN];
322 __u8 arp_tha[ETH_ALEN];
323};
324
325struct ovs_key_nd {
326 __u32 nd_target[4];
327 __u8 nd_sll[ETH_ALEN];
328 __u8 nd_tll[ETH_ALEN];
329};
330
331/**
332 * enum ovs_flow_attr - attributes for %OVS_FLOW_* commands.
333 * @OVS_FLOW_ATTR_KEY: Nested %OVS_KEY_ATTR_* attributes specifying the flow
334 * key. Always present in notifications. Required for all requests (except
335 * dumps).
336 * @OVS_FLOW_ATTR_ACTIONS: Nested %OVS_ACTION_ATTR_* attributes specifying
337 * the actions to take for packets that match the key. Always present in
338 * notifications. Required for %OVS_FLOW_CMD_NEW requests, optional for
339 * %OVS_FLOW_CMD_SET requests.
340 * @OVS_FLOW_ATTR_STATS: &struct ovs_flow_stats giving statistics for this
341 * flow. Present in notifications if the stats would be nonzero. Ignored in
342 * requests.
343 * @OVS_FLOW_ATTR_TCP_FLAGS: An 8-bit value giving the OR'd value of all of the
344 * TCP flags seen on packets in this flow. Only present in notifications for
345 * TCP flows, and only if it would be nonzero. Ignored in requests.
346 * @OVS_FLOW_ATTR_USED: A 64-bit integer giving the time, in milliseconds on
347 * the system monotonic clock, at which a packet was last processed for this
348 * flow. Only present in notifications if a packet has been processed for this
349 * flow. Ignored in requests.
350 * @OVS_FLOW_ATTR_CLEAR: If present in a %OVS_FLOW_CMD_SET request, clears the
351 * last-used time, accumulated TCP flags, and statistics for this flow.
352 * Otherwise ignored in requests. Never present in notifications.
353 *
354 * These attributes follow the &struct ovs_header within the Generic Netlink
355 * payload for %OVS_FLOW_* commands.
356 */
357enum ovs_flow_attr {
358 OVS_FLOW_ATTR_UNSPEC,
359 OVS_FLOW_ATTR_KEY, /* Sequence of OVS_KEY_ATTR_* attributes. */
360 OVS_FLOW_ATTR_ACTIONS, /* Nested OVS_ACTION_ATTR_* attributes. */
361 OVS_FLOW_ATTR_STATS, /* struct ovs_flow_stats. */
362 OVS_FLOW_ATTR_TCP_FLAGS, /* 8-bit OR'd TCP flags. */
363 OVS_FLOW_ATTR_USED, /* u64 msecs last used in monotonic time. */
364 OVS_FLOW_ATTR_CLEAR, /* Flag to clear stats, tcp_flags, used. */
365 __OVS_FLOW_ATTR_MAX
366};
367
368#define OVS_FLOW_ATTR_MAX (__OVS_FLOW_ATTR_MAX - 1)
369
370/**
371 * enum ovs_sample_attr - Attributes for %OVS_ACTION_ATTR_SAMPLE action.
372 * @OVS_SAMPLE_ATTR_PROBABILITY: 32-bit fraction of packets to sample with
373 * @OVS_ACTION_ATTR_SAMPLE. A value of 0 samples no packets, a value of
374 * %UINT32_MAX samples all packets and intermediate values sample intermediate
375 * fractions of packets.
376 * @OVS_SAMPLE_ATTR_ACTIONS: Set of actions to execute in sampling event.
377 * Actions are passed as nested attributes.
378 *
379 * Executes the specified actions with the given probability on a per-packet
380 * basis.
381 */
382enum ovs_sample_attr {
383 OVS_SAMPLE_ATTR_UNSPEC,
384 OVS_SAMPLE_ATTR_PROBABILITY, /* u32 number */
385 OVS_SAMPLE_ATTR_ACTIONS, /* Nested OVS_ACTION_ATTR_* attributes. */
386 __OVS_SAMPLE_ATTR_MAX,
387};
388
389#define OVS_SAMPLE_ATTR_MAX (__OVS_SAMPLE_ATTR_MAX - 1)
390
391/**
392 * enum ovs_userspace_attr - Attributes for %OVS_ACTION_ATTR_USERSPACE action.
393 * @OVS_USERSPACE_ATTR_PID: u32 Netlink PID to which the %OVS_PACKET_CMD_ACTION
394 * message should be sent. Required.
395 * @OVS_USERSPACE_ATTR_USERDATA: If present, its variable-length argument is
396 * copied to the %OVS_PACKET_CMD_ACTION message as %OVS_PACKET_ATTR_USERDATA.
397 */
398enum ovs_userspace_attr {
399 OVS_USERSPACE_ATTR_UNSPEC,
400 OVS_USERSPACE_ATTR_PID, /* u32 Netlink PID to receive upcalls. */
401 OVS_USERSPACE_ATTR_USERDATA, /* Optional user-specified cookie. */
402 __OVS_USERSPACE_ATTR_MAX
403};
404
405#define OVS_USERSPACE_ATTR_MAX (__OVS_USERSPACE_ATTR_MAX - 1)
406
407/**
408 * struct ovs_action_push_vlan - %OVS_ACTION_ATTR_PUSH_VLAN action argument.
409 * @vlan_tpid: Tag protocol identifier (TPID) to push.
410 * @vlan_tci: Tag control identifier (TCI) to push. The CFI bit must be set
411 * (but it will not be set in the 802.1Q header that is pushed).
412 *
413 * The @vlan_tpid value is typically %ETH_P_8021Q. The only acceptable TPID
414 * values are those that the kernel module also parses as 802.1Q headers, to
415 * prevent %OVS_ACTION_ATTR_PUSH_VLAN followed by %OVS_ACTION_ATTR_POP_VLAN
416 * from having surprising results.
417 */
418struct ovs_action_push_vlan {
419 __be16 vlan_tpid; /* 802.1Q TPID. */
420 __be16 vlan_tci; /* 802.1Q TCI (VLAN ID and priority). */
421};
422
423/**
424 * enum ovs_action_attr - Action types.
425 *
426 * @OVS_ACTION_ATTR_OUTPUT: Output packet to port.
427 * @OVS_ACTION_ATTR_USERSPACE: Send packet to userspace according to nested
428 * %OVS_USERSPACE_ATTR_* attributes.
429 * @OVS_ACTION_ATTR_SET: Replaces the contents of an existing header. The
430 * single nested %OVS_KEY_ATTR_* attribute specifies a header to modify and its
431 * value.
432 * @OVS_ACTION_ATTR_PUSH_VLAN: Push a new outermost 802.1Q header onto the
433 * packet.
434 * @OVS_ACTION_ATTR_POP_VLAN: Pop the outermost 802.1Q header off the packet.
435 * @OVS_ACTION_ATTR_SAMPLE: Probabilitically executes actions, as specified in
436 * the nested %OVS_SAMPLE_ATTR_* attributes.
437 *
438 * Only a single header can be set with a single %OVS_ACTION_ATTR_SET. Not all
439 * fields within a header are modifiable, e.g. the IPv4 protocol and fragment
440 * type may not be changed.
441 */
442
443enum ovs_action_attr {
444 OVS_ACTION_ATTR_UNSPEC,
445 OVS_ACTION_ATTR_OUTPUT, /* u32 port number. */
446 OVS_ACTION_ATTR_USERSPACE, /* Nested OVS_USERSPACE_ATTR_*. */
447 OVS_ACTION_ATTR_SET, /* One nested OVS_KEY_ATTR_*. */
448 OVS_ACTION_ATTR_PUSH_VLAN, /* struct ovs_action_push_vlan. */
449 OVS_ACTION_ATTR_POP_VLAN, /* No argument. */
450 OVS_ACTION_ATTR_SAMPLE, /* Nested OVS_SAMPLE_ATTR_*. */
451 __OVS_ACTION_ATTR_MAX
452};
453
454#define OVS_ACTION_ATTR_MAX (__OVS_ACTION_ATTR_MAX - 1)
455
456#endif /* _LINUX_OPENVSWITCH_H */
diff --git a/include/uapi/linux/packet_diag.h b/include/uapi/linux/packet_diag.h
index afafd703ad92..b2cc0cd9c4d9 100644
--- a/include/uapi/linux/packet_diag.h
+++ b/include/uapi/linux/packet_diag.h
@@ -16,6 +16,8 @@ struct packet_diag_req {
16#define PACKET_SHOW_MCLIST 0x00000002 /* A set of packet_diag_mclist-s */ 16#define PACKET_SHOW_MCLIST 0x00000002 /* A set of packet_diag_mclist-s */
17#define PACKET_SHOW_RING_CFG 0x00000004 /* Rings configuration parameters */ 17#define PACKET_SHOW_RING_CFG 0x00000004 /* Rings configuration parameters */
18#define PACKET_SHOW_FANOUT 0x00000008 18#define PACKET_SHOW_FANOUT 0x00000008
19#define PACKET_SHOW_MEMINFO 0x00000010
20#define PACKET_SHOW_FILTER 0x00000020
19 21
20struct packet_diag_msg { 22struct packet_diag_msg {
21 __u8 pdiag_family; 23 __u8 pdiag_family;
@@ -32,6 +34,9 @@ enum {
32 PACKET_DIAG_RX_RING, 34 PACKET_DIAG_RX_RING,
33 PACKET_DIAG_TX_RING, 35 PACKET_DIAG_TX_RING,
34 PACKET_DIAG_FANOUT, 36 PACKET_DIAG_FANOUT,
37 PACKET_DIAG_UID,
38 PACKET_DIAG_MEMINFO,
39 PACKET_DIAG_FILTER,
35 40
36 __PACKET_DIAG_MAX, 41 __PACKET_DIAG_MAX,
37}; 42};
diff --git a/include/uapi/linux/pkt_sched.h b/include/uapi/linux/pkt_sched.h
index 32aef0a439ef..dbd71b0c7d8c 100644
--- a/include/uapi/linux/pkt_sched.h
+++ b/include/uapi/linux/pkt_sched.h
@@ -348,6 +348,7 @@ enum {
348 TCA_HTB_INIT, 348 TCA_HTB_INIT,
349 TCA_HTB_CTAB, 349 TCA_HTB_CTAB,
350 TCA_HTB_RTAB, 350 TCA_HTB_RTAB,
351 TCA_HTB_DIRECT_QLEN,
351 __TCA_HTB_MAX, 352 __TCA_HTB_MAX,
352}; 353};
353 354
diff --git a/include/uapi/linux/rfkill.h b/include/uapi/linux/rfkill.h
index 2753c6cc9740..058757f7a733 100644
--- a/include/uapi/linux/rfkill.h
+++ b/include/uapi/linux/rfkill.h
@@ -37,6 +37,7 @@
37 * @RFKILL_TYPE_WWAN: switch is on a wireless WAN device. 37 * @RFKILL_TYPE_WWAN: switch is on a wireless WAN device.
38 * @RFKILL_TYPE_GPS: switch is on a GPS device. 38 * @RFKILL_TYPE_GPS: switch is on a GPS device.
39 * @RFKILL_TYPE_FM: switch is on a FM radio device. 39 * @RFKILL_TYPE_FM: switch is on a FM radio device.
40 * @RFKILL_TYPE_NFC: switch is on an NFC device.
40 * @NUM_RFKILL_TYPES: number of defined rfkill types 41 * @NUM_RFKILL_TYPES: number of defined rfkill types
41 */ 42 */
42enum rfkill_type { 43enum rfkill_type {
@@ -48,6 +49,7 @@ enum rfkill_type {
48 RFKILL_TYPE_WWAN, 49 RFKILL_TYPE_WWAN,
49 RFKILL_TYPE_GPS, 50 RFKILL_TYPE_GPS,
50 RFKILL_TYPE_FM, 51 RFKILL_TYPE_FM,
52 RFKILL_TYPE_NFC,
51 NUM_RFKILL_TYPES, 53 NUM_RFKILL_TYPES,
52}; 54};
53 55
diff --git a/include/uapi/linux/sctp.h b/include/uapi/linux/sctp.h
new file mode 100644
index 000000000000..66b466e4ca08
--- /dev/null
+++ b/include/uapi/linux/sctp.h
@@ -0,0 +1,846 @@
1/* SCTP kernel implementation
2 * (C) Copyright IBM Corp. 2001, 2004
3 * Copyright (c) 1999-2000 Cisco, Inc.
4 * Copyright (c) 1999-2001 Motorola, Inc.
5 * Copyright (c) 2002 Intel Corp.
6 *
7 * This file is part of the SCTP kernel implementation
8 *
9 * This header represents the structures and constants needed to support
10 * the SCTP Extension to the Sockets API.
11 *
12 * This SCTP implementation is free software;
13 * you can redistribute it and/or modify it under the terms of
14 * the GNU General Public License as published by
15 * the Free Software Foundation; either version 2, or (at your option)
16 * any later version.
17 *
18 * This SCTP implementation is distributed in the hope that it
19 * will be useful, but WITHOUT ANY WARRANTY; without even the implied
20 * ************************
21 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
22 * See the GNU General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public License
25 * along with GNU CC; see the file COPYING. If not, write to
26 * the Free Software Foundation, 59 Temple Place - Suite 330,
27 * Boston, MA 02111-1307, USA.
28 *
29 * Please send any bug reports or fixes you make to the
30 * email address(es):
31 * lksctp developers <lksctp-developers@lists.sourceforge.net>
32 *
33 * Or submit a bug report through the following website:
34 * http://www.sf.net/projects/lksctp
35 *
36 * Written or modified by:
37 * La Monte H.P. Yarroll <piggy@acm.org>
38 * R. Stewart <randall@sctp.chicago.il.us>
39 * K. Morneau <kmorneau@cisco.com>
40 * Q. Xie <qxie1@email.mot.com>
41 * Karl Knutson <karl@athena.chicago.il.us>
42 * Jon Grimm <jgrimm@us.ibm.com>
43 * Daisy Chang <daisyc@us.ibm.com>
44 * Ryan Layer <rmlayer@us.ibm.com>
45 * Ardelle Fan <ardelle.fan@intel.com>
46 * Sridhar Samudrala <sri@us.ibm.com>
47 * Inaky Perez-Gonzalez <inaky.gonzalez@intel.com>
48 * Vlad Yasevich <vladislav.yasevich@hp.com>
49 *
50 * Any bugs reported given to us we will try to fix... any fixes shared will
51 * be incorporated into the next SCTP release.
52 */
53
54#ifndef _UAPI_SCTP_H
55#define _UAPI_SCTP_H
56
57#include <linux/types.h>
58#include <linux/socket.h>
59
60typedef __s32 sctp_assoc_t;
61
62/* The following symbols come from the Sockets API Extensions for
63 * SCTP <draft-ietf-tsvwg-sctpsocket-07.txt>.
64 */
65#define SCTP_RTOINFO 0
66#define SCTP_ASSOCINFO 1
67#define SCTP_INITMSG 2
68#define SCTP_NODELAY 3 /* Get/set nodelay option. */
69#define SCTP_AUTOCLOSE 4
70#define SCTP_SET_PEER_PRIMARY_ADDR 5
71#define SCTP_PRIMARY_ADDR 6
72#define SCTP_ADAPTATION_LAYER 7
73#define SCTP_DISABLE_FRAGMENTS 8
74#define SCTP_PEER_ADDR_PARAMS 9
75#define SCTP_DEFAULT_SEND_PARAM 10
76#define SCTP_EVENTS 11
77#define SCTP_I_WANT_MAPPED_V4_ADDR 12 /* Turn on/off mapped v4 addresses */
78#define SCTP_MAXSEG 13 /* Get/set maximum fragment. */
79#define SCTP_STATUS 14
80#define SCTP_GET_PEER_ADDR_INFO 15
81#define SCTP_DELAYED_ACK_TIME 16
82#define SCTP_DELAYED_ACK SCTP_DELAYED_ACK_TIME
83#define SCTP_DELAYED_SACK SCTP_DELAYED_ACK_TIME
84#define SCTP_CONTEXT 17
85#define SCTP_FRAGMENT_INTERLEAVE 18
86#define SCTP_PARTIAL_DELIVERY_POINT 19 /* Set/Get partial delivery point */
87#define SCTP_MAX_BURST 20 /* Set/Get max burst */
88#define SCTP_AUTH_CHUNK 21 /* Set only: add a chunk type to authenticate */
89#define SCTP_HMAC_IDENT 22
90#define SCTP_AUTH_KEY 23
91#define SCTP_AUTH_ACTIVE_KEY 24
92#define SCTP_AUTH_DELETE_KEY 25
93#define SCTP_PEER_AUTH_CHUNKS 26 /* Read only */
94#define SCTP_LOCAL_AUTH_CHUNKS 27 /* Read only */
95#define SCTP_GET_ASSOC_NUMBER 28 /* Read only */
96#define SCTP_GET_ASSOC_ID_LIST 29 /* Read only */
97#define SCTP_AUTO_ASCONF 30
98#define SCTP_PEER_ADDR_THLDS 31
99
100/* Internal Socket Options. Some of the sctp library functions are
101 * implemented using these socket options.
102 */
103#define SCTP_SOCKOPT_BINDX_ADD 100 /* BINDX requests for adding addrs */
104#define SCTP_SOCKOPT_BINDX_REM 101 /* BINDX requests for removing addrs. */
105#define SCTP_SOCKOPT_PEELOFF 102 /* peel off association. */
106/* Options 104-106 are deprecated and removed. Do not use this space */
107#define SCTP_SOCKOPT_CONNECTX_OLD 107 /* CONNECTX old requests. */
108#define SCTP_GET_PEER_ADDRS 108 /* Get all peer address. */
109#define SCTP_GET_LOCAL_ADDRS 109 /* Get all local address. */
110#define SCTP_SOCKOPT_CONNECTX 110 /* CONNECTX requests. */
111#define SCTP_SOCKOPT_CONNECTX3 111 /* CONNECTX requests (updated) */
112#define SCTP_GET_ASSOC_STATS 112 /* Read only */
113
114/*
115 * 5.2.1 SCTP Initiation Structure (SCTP_INIT)
116 *
117 * This cmsghdr structure provides information for initializing new
118 * SCTP associations with sendmsg(). The SCTP_INITMSG socket option
119 * uses this same data structure. This structure is not used for
120 * recvmsg().
121 *
122 * cmsg_level cmsg_type cmsg_data[]
123 * ------------ ------------ ----------------------
124 * IPPROTO_SCTP SCTP_INIT struct sctp_initmsg
125 *
126 */
127struct sctp_initmsg {
128 __u16 sinit_num_ostreams;
129 __u16 sinit_max_instreams;
130 __u16 sinit_max_attempts;
131 __u16 sinit_max_init_timeo;
132};
133
134/*
135 * 5.2.2 SCTP Header Information Structure (SCTP_SNDRCV)
136 *
137 * This cmsghdr structure specifies SCTP options for sendmsg() and
138 * describes SCTP header information about a received message through
139 * recvmsg().
140 *
141 * cmsg_level cmsg_type cmsg_data[]
142 * ------------ ------------ ----------------------
143 * IPPROTO_SCTP SCTP_SNDRCV struct sctp_sndrcvinfo
144 *
145 */
146struct sctp_sndrcvinfo {
147 __u16 sinfo_stream;
148 __u16 sinfo_ssn;
149 __u16 sinfo_flags;
150 __u32 sinfo_ppid;
151 __u32 sinfo_context;
152 __u32 sinfo_timetolive;
153 __u32 sinfo_tsn;
154 __u32 sinfo_cumtsn;
155 sctp_assoc_t sinfo_assoc_id;
156};
157
158/*
159 * sinfo_flags: 16 bits (unsigned integer)
160 *
161 * This field may contain any of the following flags and is composed of
162 * a bitwise OR of these values.
163 */
164
165enum sctp_sinfo_flags {
166 SCTP_UNORDERED = 1, /* Send/receive message unordered. */
167 SCTP_ADDR_OVER = 2, /* Override the primary destination. */
168 SCTP_ABORT=4, /* Send an ABORT message to the peer. */
169 SCTP_SACK_IMMEDIATELY = 8, /* SACK should be sent without delay */
170 SCTP_EOF=MSG_FIN, /* Initiate graceful shutdown process. */
171};
172
173typedef union {
174 __u8 raw;
175 struct sctp_initmsg init;
176 struct sctp_sndrcvinfo sndrcv;
177} sctp_cmsg_data_t;
178
179/* These are cmsg_types. */
180typedef enum sctp_cmsg_type {
181 SCTP_INIT, /* 5.2.1 SCTP Initiation Structure */
182#define SCTP_INIT SCTP_INIT
183 SCTP_SNDRCV, /* 5.2.2 SCTP Header Information Structure */
184#define SCTP_SNDRCV SCTP_SNDRCV
185} sctp_cmsg_t;
186
187/*
188 * 5.3.1.1 SCTP_ASSOC_CHANGE
189 *
190 * Communication notifications inform the ULP that an SCTP association
191 * has either begun or ended. The identifier for a new association is
192 * provided by this notificaion. The notification information has the
193 * following format:
194 *
195 */
196struct sctp_assoc_change {
197 __u16 sac_type;
198 __u16 sac_flags;
199 __u32 sac_length;
200 __u16 sac_state;
201 __u16 sac_error;
202 __u16 sac_outbound_streams;
203 __u16 sac_inbound_streams;
204 sctp_assoc_t sac_assoc_id;
205 __u8 sac_info[0];
206};
207
208/*
209 * sac_state: 32 bits (signed integer)
210 *
211 * This field holds one of a number of values that communicate the
212 * event that happened to the association. They include:
213 *
214 * Note: The following state names deviate from the API draft as
215 * the names clash too easily with other kernel symbols.
216 */
217enum sctp_sac_state {
218 SCTP_COMM_UP,
219 SCTP_COMM_LOST,
220 SCTP_RESTART,
221 SCTP_SHUTDOWN_COMP,
222 SCTP_CANT_STR_ASSOC,
223};
224
225/*
226 * 5.3.1.2 SCTP_PEER_ADDR_CHANGE
227 *
228 * When a destination address on a multi-homed peer encounters a change
229 * an interface details event is sent. The information has the
230 * following structure:
231 */
232struct sctp_paddr_change {
233 __u16 spc_type;
234 __u16 spc_flags;
235 __u32 spc_length;
236 struct sockaddr_storage spc_aaddr;
237 int spc_state;
238 int spc_error;
239 sctp_assoc_t spc_assoc_id;
240} __attribute__((packed, aligned(4)));
241
242/*
243 * spc_state: 32 bits (signed integer)
244 *
245 * This field holds one of a number of values that communicate the
246 * event that happened to the address. They include:
247 */
248enum sctp_spc_state {
249 SCTP_ADDR_AVAILABLE,
250 SCTP_ADDR_UNREACHABLE,
251 SCTP_ADDR_REMOVED,
252 SCTP_ADDR_ADDED,
253 SCTP_ADDR_MADE_PRIM,
254 SCTP_ADDR_CONFIRMED,
255};
256
257
258/*
259 * 5.3.1.3 SCTP_REMOTE_ERROR
260 *
261 * A remote peer may send an Operational Error message to its peer.
262 * This message indicates a variety of error conditions on an
263 * association. The entire error TLV as it appears on the wire is
264 * included in a SCTP_REMOTE_ERROR event. Please refer to the SCTP
265 * specification [SCTP] and any extensions for a list of possible
266 * error formats. SCTP error TLVs have the format:
267 */
268struct sctp_remote_error {
269 __u16 sre_type;
270 __u16 sre_flags;
271 __u32 sre_length;
272 __u16 sre_error;
273 sctp_assoc_t sre_assoc_id;
274 __u8 sre_data[0];
275};
276
277
278/*
279 * 5.3.1.4 SCTP_SEND_FAILED
280 *
281 * If SCTP cannot deliver a message it may return the message as a
282 * notification.
283 */
284struct sctp_send_failed {
285 __u16 ssf_type;
286 __u16 ssf_flags;
287 __u32 ssf_length;
288 __u32 ssf_error;
289 struct sctp_sndrcvinfo ssf_info;
290 sctp_assoc_t ssf_assoc_id;
291 __u8 ssf_data[0];
292};
293
294/*
295 * ssf_flags: 16 bits (unsigned integer)
296 *
297 * The flag value will take one of the following values
298 *
299 * SCTP_DATA_UNSENT - Indicates that the data was never put on
300 * the wire.
301 *
302 * SCTP_DATA_SENT - Indicates that the data was put on the wire.
303 * Note that this does not necessarily mean that the
304 * data was (or was not) successfully delivered.
305 */
306enum sctp_ssf_flags {
307 SCTP_DATA_UNSENT,
308 SCTP_DATA_SENT,
309};
310
311/*
312 * 5.3.1.5 SCTP_SHUTDOWN_EVENT
313 *
314 * When a peer sends a SHUTDOWN, SCTP delivers this notification to
315 * inform the application that it should cease sending data.
316 */
317struct sctp_shutdown_event {
318 __u16 sse_type;
319 __u16 sse_flags;
320 __u32 sse_length;
321 sctp_assoc_t sse_assoc_id;
322};
323
324/*
325 * 5.3.1.6 SCTP_ADAPTATION_INDICATION
326 *
327 * When a peer sends a Adaptation Layer Indication parameter , SCTP
328 * delivers this notification to inform the application
329 * that of the peers requested adaptation layer.
330 */
331struct sctp_adaptation_event {
332 __u16 sai_type;
333 __u16 sai_flags;
334 __u32 sai_length;
335 __u32 sai_adaptation_ind;
336 sctp_assoc_t sai_assoc_id;
337};
338
339/*
340 * 5.3.1.7 SCTP_PARTIAL_DELIVERY_EVENT
341 *
342 * When a receiver is engaged in a partial delivery of a
343 * message this notification will be used to indicate
344 * various events.
345 */
346struct sctp_pdapi_event {
347 __u16 pdapi_type;
348 __u16 pdapi_flags;
349 __u32 pdapi_length;
350 __u32 pdapi_indication;
351 sctp_assoc_t pdapi_assoc_id;
352};
353
354enum { SCTP_PARTIAL_DELIVERY_ABORTED=0, };
355
356/*
357 * 5.3.1.8. SCTP_AUTHENTICATION_EVENT
358 *
359 * When a receiver is using authentication this message will provide
360 * notifications regarding new keys being made active as well as errors.
361 */
362struct sctp_authkey_event {
363 __u16 auth_type;
364 __u16 auth_flags;
365 __u32 auth_length;
366 __u16 auth_keynumber;
367 __u16 auth_altkeynumber;
368 __u32 auth_indication;
369 sctp_assoc_t auth_assoc_id;
370};
371
372enum { SCTP_AUTH_NEWKEY = 0, };
373
374/*
375 * 6.1.9. SCTP_SENDER_DRY_EVENT
376 *
377 * When the SCTP stack has no more user data to send or retransmit, this
378 * notification is given to the user. Also, at the time when a user app
379 * subscribes to this event, if there is no data to be sent or
380 * retransmit, the stack will immediately send up this notification.
381 */
382struct sctp_sender_dry_event {
383 __u16 sender_dry_type;
384 __u16 sender_dry_flags;
385 __u32 sender_dry_length;
386 sctp_assoc_t sender_dry_assoc_id;
387};
388
389/*
390 * Described in Section 7.3
391 * Ancillary Data and Notification Interest Options
392 */
393struct sctp_event_subscribe {
394 __u8 sctp_data_io_event;
395 __u8 sctp_association_event;
396 __u8 sctp_address_event;
397 __u8 sctp_send_failure_event;
398 __u8 sctp_peer_error_event;
399 __u8 sctp_shutdown_event;
400 __u8 sctp_partial_delivery_event;
401 __u8 sctp_adaptation_layer_event;
402 __u8 sctp_authentication_event;
403 __u8 sctp_sender_dry_event;
404};
405
406/*
407 * 5.3.1 SCTP Notification Structure
408 *
409 * The notification structure is defined as the union of all
410 * notification types.
411 *
412 */
413union sctp_notification {
414 struct {
415 __u16 sn_type; /* Notification type. */
416 __u16 sn_flags;
417 __u32 sn_length;
418 } sn_header;
419 struct sctp_assoc_change sn_assoc_change;
420 struct sctp_paddr_change sn_paddr_change;
421 struct sctp_remote_error sn_remote_error;
422 struct sctp_send_failed sn_send_failed;
423 struct sctp_shutdown_event sn_shutdown_event;
424 struct sctp_adaptation_event sn_adaptation_event;
425 struct sctp_pdapi_event sn_pdapi_event;
426 struct sctp_authkey_event sn_authkey_event;
427 struct sctp_sender_dry_event sn_sender_dry_event;
428};
429
430/* Section 5.3.1
431 * All standard values for sn_type flags are greater than 2^15.
432 * Values from 2^15 and down are reserved.
433 */
434
435enum sctp_sn_type {
436 SCTP_SN_TYPE_BASE = (1<<15),
437 SCTP_ASSOC_CHANGE,
438#define SCTP_ASSOC_CHANGE SCTP_ASSOC_CHANGE
439 SCTP_PEER_ADDR_CHANGE,
440#define SCTP_PEER_ADDR_CHANGE SCTP_PEER_ADDR_CHANGE
441 SCTP_SEND_FAILED,
442#define SCTP_SEND_FAILED SCTP_SEND_FAILED
443 SCTP_REMOTE_ERROR,
444#define SCTP_REMOTE_ERROR SCTP_REMOTE_ERROR
445 SCTP_SHUTDOWN_EVENT,
446#define SCTP_SHUTDOWN_EVENT SCTP_SHUTDOWN_EVENT
447 SCTP_PARTIAL_DELIVERY_EVENT,
448#define SCTP_PARTIAL_DELIVERY_EVENT SCTP_PARTIAL_DELIVERY_EVENT
449 SCTP_ADAPTATION_INDICATION,
450#define SCTP_ADAPTATION_INDICATION SCTP_ADAPTATION_INDICATION
451 SCTP_AUTHENTICATION_EVENT,
452#define SCTP_AUTHENTICATION_INDICATION SCTP_AUTHENTICATION_EVENT
453 SCTP_SENDER_DRY_EVENT,
454#define SCTP_SENDER_DRY_EVENT SCTP_SENDER_DRY_EVENT
455};
456
457/* Notification error codes used to fill up the error fields in some
458 * notifications.
459 * SCTP_PEER_ADDRESS_CHAGE : spc_error
460 * SCTP_ASSOC_CHANGE : sac_error
461 * These names should be potentially included in the draft 04 of the SCTP
462 * sockets API specification.
463 */
464typedef enum sctp_sn_error {
465 SCTP_FAILED_THRESHOLD,
466 SCTP_RECEIVED_SACK,
467 SCTP_HEARTBEAT_SUCCESS,
468 SCTP_RESPONSE_TO_USER_REQ,
469 SCTP_INTERNAL_ERROR,
470 SCTP_SHUTDOWN_GUARD_EXPIRES,
471 SCTP_PEER_FAULTY,
472} sctp_sn_error_t;
473
474/*
475 * 7.1.1 Retransmission Timeout Parameters (SCTP_RTOINFO)
476 *
477 * The protocol parameters used to initialize and bound retransmission
478 * timeout (RTO) are tunable. See [SCTP] for more information on how
479 * these parameters are used in RTO calculation.
480 */
481struct sctp_rtoinfo {
482 sctp_assoc_t srto_assoc_id;
483 __u32 srto_initial;
484 __u32 srto_max;
485 __u32 srto_min;
486};
487
488/*
489 * 7.1.2 Association Parameters (SCTP_ASSOCINFO)
490 *
491 * This option is used to both examine and set various association and
492 * endpoint parameters.
493 */
494struct sctp_assocparams {
495 sctp_assoc_t sasoc_assoc_id;
496 __u16 sasoc_asocmaxrxt;
497 __u16 sasoc_number_peer_destinations;
498 __u32 sasoc_peer_rwnd;
499 __u32 sasoc_local_rwnd;
500 __u32 sasoc_cookie_life;
501};
502
503/*
504 * 7.1.9 Set Peer Primary Address (SCTP_SET_PEER_PRIMARY_ADDR)
505 *
506 * Requests that the peer mark the enclosed address as the association
507 * primary. The enclosed address must be one of the association's
508 * locally bound addresses. The following structure is used to make a
509 * set primary request:
510 */
511struct sctp_setpeerprim {
512 sctp_assoc_t sspp_assoc_id;
513 struct sockaddr_storage sspp_addr;
514} __attribute__((packed, aligned(4)));
515
516/*
517 * 7.1.10 Set Primary Address (SCTP_PRIMARY_ADDR)
518 *
519 * Requests that the local SCTP stack use the enclosed peer address as
520 * the association primary. The enclosed address must be one of the
521 * association peer's addresses. The following structure is used to
522 * make a set peer primary request:
523 */
524struct sctp_prim {
525 sctp_assoc_t ssp_assoc_id;
526 struct sockaddr_storage ssp_addr;
527} __attribute__((packed, aligned(4)));
528
529/* For backward compatibility use, define the old name too */
530#define sctp_setprim sctp_prim
531
532/*
533 * 7.1.11 Set Adaptation Layer Indicator (SCTP_ADAPTATION_LAYER)
534 *
535 * Requests that the local endpoint set the specified Adaptation Layer
536 * Indication parameter for all future INIT and INIT-ACK exchanges.
537 */
538struct sctp_setadaptation {
539 __u32 ssb_adaptation_ind;
540};
541
542/*
543 * 7.1.13 Peer Address Parameters (SCTP_PEER_ADDR_PARAMS)
544 *
545 * Applications can enable or disable heartbeats for any peer address
546 * of an association, modify an address's heartbeat interval, force a
547 * heartbeat to be sent immediately, and adjust the address's maximum
548 * number of retransmissions sent before an address is considered
549 * unreachable. The following structure is used to access and modify an
550 * address's parameters:
551 */
552enum sctp_spp_flags {
553 SPP_HB_ENABLE = 1<<0, /*Enable heartbeats*/
554 SPP_HB_DISABLE = 1<<1, /*Disable heartbeats*/
555 SPP_HB = SPP_HB_ENABLE | SPP_HB_DISABLE,
556 SPP_HB_DEMAND = 1<<2, /*Send heartbeat immediately*/
557 SPP_PMTUD_ENABLE = 1<<3, /*Enable PMTU discovery*/
558 SPP_PMTUD_DISABLE = 1<<4, /*Disable PMTU discovery*/
559 SPP_PMTUD = SPP_PMTUD_ENABLE | SPP_PMTUD_DISABLE,
560 SPP_SACKDELAY_ENABLE = 1<<5, /*Enable SACK*/
561 SPP_SACKDELAY_DISABLE = 1<<6, /*Disable SACK*/
562 SPP_SACKDELAY = SPP_SACKDELAY_ENABLE | SPP_SACKDELAY_DISABLE,
563 SPP_HB_TIME_IS_ZERO = 1<<7, /* Set HB delay to 0 */
564};
565
566struct sctp_paddrparams {
567 sctp_assoc_t spp_assoc_id;
568 struct sockaddr_storage spp_address;
569 __u32 spp_hbinterval;
570 __u16 spp_pathmaxrxt;
571 __u32 spp_pathmtu;
572 __u32 spp_sackdelay;
573 __u32 spp_flags;
574} __attribute__((packed, aligned(4)));
575
576/*
577 * 7.1.18. Add a chunk that must be authenticated (SCTP_AUTH_CHUNK)
578 *
579 * This set option adds a chunk type that the user is requesting to be
580 * received only in an authenticated way. Changes to the list of chunks
581 * will only effect future associations on the socket.
582 */
583struct sctp_authchunk {
584 __u8 sauth_chunk;
585};
586
587/*
588 * 7.1.19. Get or set the list of supported HMAC Identifiers (SCTP_HMAC_IDENT)
589 *
590 * This option gets or sets the list of HMAC algorithms that the local
591 * endpoint requires the peer to use.
592 */
593#ifndef __KERNEL__
594/* This here is only used by user space as is. It might not be a good idea
595 * to export/reveal the whole structure with reserved fields etc.
596 */
597enum {
598 SCTP_AUTH_HMAC_ID_SHA1 = 1,
599 SCTP_AUTH_HMAC_ID_SHA256 = 3,
600};
601#endif
602
603struct sctp_hmacalgo {
604 __u32 shmac_num_idents;
605 __u16 shmac_idents[];
606};
607
608/* Sadly, user and kernel space have different names for
609 * this structure member, so this is to not break anything.
610 */
611#define shmac_number_of_idents shmac_num_idents
612
613/*
614 * 7.1.20. Set a shared key (SCTP_AUTH_KEY)
615 *
616 * This option will set a shared secret key which is used to build an
617 * association shared key.
618 */
619struct sctp_authkey {
620 sctp_assoc_t sca_assoc_id;
621 __u16 sca_keynumber;
622 __u16 sca_keylength;
623 __u8 sca_key[];
624};
625
626/*
627 * 7.1.21. Get or set the active shared key (SCTP_AUTH_ACTIVE_KEY)
628 *
629 * This option will get or set the active shared key to be used to build
630 * the association shared key.
631 */
632
633struct sctp_authkeyid {
634 sctp_assoc_t scact_assoc_id;
635 __u16 scact_keynumber;
636};
637
638
639/*
640 * 7.1.23. Get or set delayed ack timer (SCTP_DELAYED_SACK)
641 *
642 * This option will effect the way delayed acks are performed. This
643 * option allows you to get or set the delayed ack time, in
644 * milliseconds. It also allows changing the delayed ack frequency.
645 * Changing the frequency to 1 disables the delayed sack algorithm. If
646 * the assoc_id is 0, then this sets or gets the endpoints default
647 * values. If the assoc_id field is non-zero, then the set or get
648 * effects the specified association for the one to many model (the
649 * assoc_id field is ignored by the one to one model). Note that if
650 * sack_delay or sack_freq are 0 when setting this option, then the
651 * current values will remain unchanged.
652 */
653struct sctp_sack_info {
654 sctp_assoc_t sack_assoc_id;
655 uint32_t sack_delay;
656 uint32_t sack_freq;
657};
658
659struct sctp_assoc_value {
660 sctp_assoc_t assoc_id;
661 uint32_t assoc_value;
662};
663
664/*
665 * 7.2.2 Peer Address Information
666 *
667 * Applications can retrieve information about a specific peer address
668 * of an association, including its reachability state, congestion
669 * window, and retransmission timer values. This information is
670 * read-only. The following structure is used to access this
671 * information:
672 */
673struct sctp_paddrinfo {
674 sctp_assoc_t spinfo_assoc_id;
675 struct sockaddr_storage spinfo_address;
676 __s32 spinfo_state;
677 __u32 spinfo_cwnd;
678 __u32 spinfo_srtt;
679 __u32 spinfo_rto;
680 __u32 spinfo_mtu;
681} __attribute__((packed, aligned(4)));
682
683/* Peer addresses's state. */
684/* UNKNOWN: Peer address passed by the upper layer in sendmsg or connect[x]
685 * calls.
686 * UNCONFIRMED: Peer address received in INIT/INIT-ACK address parameters.
687 * Not yet confirmed by a heartbeat and not available for data
688 * transfers.
689 * ACTIVE : Peer address confirmed, active and available for data transfers.
690 * INACTIVE: Peer address inactive and not available for data transfers.
691 */
692enum sctp_spinfo_state {
693 SCTP_INACTIVE,
694 SCTP_PF,
695 SCTP_ACTIVE,
696 SCTP_UNCONFIRMED,
697 SCTP_UNKNOWN = 0xffff /* Value used for transport state unknown */
698};
699
700/*
701 * 7.2.1 Association Status (SCTP_STATUS)
702 *
703 * Applications can retrieve current status information about an
704 * association, including association state, peer receiver window size,
705 * number of unacked data chunks, and number of data chunks pending
706 * receipt. This information is read-only. The following structure is
707 * used to access this information:
708 */
709struct sctp_status {
710 sctp_assoc_t sstat_assoc_id;
711 __s32 sstat_state;
712 __u32 sstat_rwnd;
713 __u16 sstat_unackdata;
714 __u16 sstat_penddata;
715 __u16 sstat_instrms;
716 __u16 sstat_outstrms;
717 __u32 sstat_fragmentation_point;
718 struct sctp_paddrinfo sstat_primary;
719};
720
721/*
722 * 7.2.3. Get the list of chunks the peer requires to be authenticated
723 * (SCTP_PEER_AUTH_CHUNKS)
724 *
725 * This option gets a list of chunks for a specified association that
726 * the peer requires to be received authenticated only.
727 */
728struct sctp_authchunks {
729 sctp_assoc_t gauth_assoc_id;
730 __u32 gauth_number_of_chunks;
731 uint8_t gauth_chunks[];
732};
733
734/* The broken spelling has been released already in lksctp-tools header,
735 * so don't break anyone, now that it's fixed.
736 */
737#define guth_number_of_chunks gauth_number_of_chunks
738
739/* Association states. */
740enum sctp_sstat_state {
741 SCTP_EMPTY = 0,
742 SCTP_CLOSED = 1,
743 SCTP_COOKIE_WAIT = 2,
744 SCTP_COOKIE_ECHOED = 3,
745 SCTP_ESTABLISHED = 4,
746 SCTP_SHUTDOWN_PENDING = 5,
747 SCTP_SHUTDOWN_SENT = 6,
748 SCTP_SHUTDOWN_RECEIVED = 7,
749 SCTP_SHUTDOWN_ACK_SENT = 8,
750};
751
752/*
753 * 8.2.6. Get the Current Identifiers of Associations
754 * (SCTP_GET_ASSOC_ID_LIST)
755 *
756 * This option gets the current list of SCTP association identifiers of
757 * the SCTP associations handled by a one-to-many style socket.
758 */
759struct sctp_assoc_ids {
760 __u32 gaids_number_of_ids;
761 sctp_assoc_t gaids_assoc_id[];
762};
763
764/*
765 * 8.3, 8.5 get all peer/local addresses in an association.
766 * This parameter struct is used by SCTP_GET_PEER_ADDRS and
767 * SCTP_GET_LOCAL_ADDRS socket options used internally to implement
768 * sctp_getpaddrs() and sctp_getladdrs() API.
769 */
770struct sctp_getaddrs_old {
771 sctp_assoc_t assoc_id;
772 int addr_num;
773#ifdef __KERNEL__
774 struct sockaddr __user *addrs;
775#else
776 struct sockaddr *addrs;
777#endif
778};
779
780struct sctp_getaddrs {
781 sctp_assoc_t assoc_id; /*input*/
782 __u32 addr_num; /*output*/
783 __u8 addrs[0]; /*output, variable size*/
784};
785
786/* A socket user request obtained via SCTP_GET_ASSOC_STATS that retrieves
787 * association stats. All stats are counts except sas_maxrto and
788 * sas_obs_rto_ipaddr. maxrto is the max observed rto + transport since
789 * the last call. Will return 0 when RTO was not update since last call
790 */
791struct sctp_assoc_stats {
792 sctp_assoc_t sas_assoc_id; /* Input */
793 /* Transport of observed max RTO */
794 struct sockaddr_storage sas_obs_rto_ipaddr;
795 __u64 sas_maxrto; /* Maximum Observed RTO for period */
796 __u64 sas_isacks; /* SACKs received */
797 __u64 sas_osacks; /* SACKs sent */
798 __u64 sas_opackets; /* Packets sent */
799 __u64 sas_ipackets; /* Packets received */
800 __u64 sas_rtxchunks; /* Retransmitted Chunks */
801 __u64 sas_outofseqtsns;/* TSN received > next expected */
802 __u64 sas_idupchunks; /* Dups received (ordered+unordered) */
803 __u64 sas_gapcnt; /* Gap Acknowledgements Received */
804 __u64 sas_ouodchunks; /* Unordered data chunks sent */
805 __u64 sas_iuodchunks; /* Unordered data chunks received */
806 __u64 sas_oodchunks; /* Ordered data chunks sent */
807 __u64 sas_iodchunks; /* Ordered data chunks received */
808 __u64 sas_octrlchunks; /* Control chunks sent */
809 __u64 sas_ictrlchunks; /* Control chunks received */
810};
811
812/* These are bit fields for msghdr->msg_flags. See section 5.1. */
813/* On user space Linux, these live in <bits/socket.h> as an enum. */
814enum sctp_msg_flags {
815 MSG_NOTIFICATION = 0x8000,
816#define MSG_NOTIFICATION MSG_NOTIFICATION
817};
818
819/*
820 * 8.1 sctp_bindx()
821 *
822 * The flags parameter is formed from the bitwise OR of zero or more of the
823 * following currently defined flags:
824 */
825#define SCTP_BINDX_ADD_ADDR 0x01
826#define SCTP_BINDX_REM_ADDR 0x02
827
828/* This is the structure that is passed as an argument(optval) to
829 * getsockopt(SCTP_SOCKOPT_PEELOFF).
830 */
831typedef struct {
832 sctp_assoc_t associd;
833 int sd;
834} sctp_peeloff_arg_t;
835
836/*
837 * Peer Address Thresholds socket option
838 */
839struct sctp_paddrthlds {
840 sctp_assoc_t spt_assoc_id;
841 struct sockaddr_storage spt_address;
842 __u16 spt_pathmaxrxt;
843 __u16 spt_pathpfthld;
844};
845
846#endif /* _UAPI_SCTP_H */
diff --git a/include/uapi/linux/snmp.h b/include/uapi/linux/snmp.h
index b49eab89c9fd..df2e8b4f9c03 100644
--- a/include/uapi/linux/snmp.h
+++ b/include/uapi/linux/snmp.h
@@ -50,6 +50,7 @@ enum
50 IPSTATS_MIB_OUTMCASTOCTETS, /* OutMcastOctets */ 50 IPSTATS_MIB_OUTMCASTOCTETS, /* OutMcastOctets */
51 IPSTATS_MIB_INBCASTOCTETS, /* InBcastOctets */ 51 IPSTATS_MIB_INBCASTOCTETS, /* InBcastOctets */
52 IPSTATS_MIB_OUTBCASTOCTETS, /* OutBcastOctets */ 52 IPSTATS_MIB_OUTBCASTOCTETS, /* OutBcastOctets */
53 IPSTATS_MIB_CSUMERRORS, /* InCsumErrors */
53 __IPSTATS_MIB_MAX 54 __IPSTATS_MIB_MAX
54}; 55};
55 56
@@ -87,6 +88,7 @@ enum
87 ICMP_MIB_OUTTIMESTAMPREPS, /* OutTimestampReps */ 88 ICMP_MIB_OUTTIMESTAMPREPS, /* OutTimestampReps */
88 ICMP_MIB_OUTADDRMASKS, /* OutAddrMasks */ 89 ICMP_MIB_OUTADDRMASKS, /* OutAddrMasks */
89 ICMP_MIB_OUTADDRMASKREPS, /* OutAddrMaskReps */ 90 ICMP_MIB_OUTADDRMASKREPS, /* OutAddrMaskReps */
91 ICMP_MIB_CSUMERRORS, /* InCsumErrors */
90 __ICMP_MIB_MAX 92 __ICMP_MIB_MAX
91}; 93};
92 94
@@ -103,6 +105,7 @@ enum
103 ICMP6_MIB_INERRORS, /* InErrors */ 105 ICMP6_MIB_INERRORS, /* InErrors */
104 ICMP6_MIB_OUTMSGS, /* OutMsgs */ 106 ICMP6_MIB_OUTMSGS, /* OutMsgs */
105 ICMP6_MIB_OUTERRORS, /* OutErrors */ 107 ICMP6_MIB_OUTERRORS, /* OutErrors */
108 ICMP6_MIB_CSUMERRORS, /* InCsumErrors */
106 __ICMP6_MIB_MAX 109 __ICMP6_MIB_MAX
107}; 110};
108 111
@@ -130,6 +133,7 @@ enum
130 TCP_MIB_RETRANSSEGS, /* RetransSegs */ 133 TCP_MIB_RETRANSSEGS, /* RetransSegs */
131 TCP_MIB_INERRS, /* InErrs */ 134 TCP_MIB_INERRS, /* InErrs */
132 TCP_MIB_OUTRSTS, /* OutRsts */ 135 TCP_MIB_OUTRSTS, /* OutRsts */
136 TCP_MIB_CSUMERRORS, /* InCsumErrors */
133 __TCP_MIB_MAX 137 __TCP_MIB_MAX
134}; 138};
135 139
@@ -147,6 +151,7 @@ enum
147 UDP_MIB_OUTDATAGRAMS, /* OutDatagrams */ 151 UDP_MIB_OUTDATAGRAMS, /* OutDatagrams */
148 UDP_MIB_RCVBUFERRORS, /* RcvbufErrors */ 152 UDP_MIB_RCVBUFERRORS, /* RcvbufErrors */
149 UDP_MIB_SNDBUFERRORS, /* SndbufErrors */ 153 UDP_MIB_SNDBUFERRORS, /* SndbufErrors */
154 UDP_MIB_CSUMERRORS, /* InCsumErrors */
150 __UDP_MIB_MAX 155 __UDP_MIB_MAX
151}; 156};
152 157
@@ -202,6 +207,8 @@ enum
202 LINUX_MIB_TCPFORWARDRETRANS, /* TCPForwardRetrans */ 207 LINUX_MIB_TCPFORWARDRETRANS, /* TCPForwardRetrans */
203 LINUX_MIB_TCPSLOWSTARTRETRANS, /* TCPSlowStartRetrans */ 208 LINUX_MIB_TCPSLOWSTARTRETRANS, /* TCPSlowStartRetrans */
204 LINUX_MIB_TCPTIMEOUTS, /* TCPTimeouts */ 209 LINUX_MIB_TCPTIMEOUTS, /* TCPTimeouts */
210 LINUX_MIB_TCPLOSSPROBES, /* TCPLossProbes */
211 LINUX_MIB_TCPLOSSPROBERECOVERY, /* TCPLossProbeRecovery */
205 LINUX_MIB_TCPRENORECOVERYFAIL, /* TCPRenoRecoveryFail */ 212 LINUX_MIB_TCPRENORECOVERYFAIL, /* TCPRenoRecoveryFail */
206 LINUX_MIB_TCPSACKRECOVERYFAIL, /* TCPSackRecoveryFail */ 213 LINUX_MIB_TCPSACKRECOVERYFAIL, /* TCPSackRecoveryFail */
207 LINUX_MIB_TCPSCHEDULERFAILED, /* TCPSchedulerFailed */ 214 LINUX_MIB_TCPSCHEDULERFAILED, /* TCPSchedulerFailed */
@@ -245,6 +252,7 @@ enum
245 LINUX_MIB_TCPFASTOPENPASSIVEFAIL, /* TCPFastOpenPassiveFail */ 252 LINUX_MIB_TCPFASTOPENPASSIVEFAIL, /* TCPFastOpenPassiveFail */
246 LINUX_MIB_TCPFASTOPENLISTENOVERFLOW, /* TCPFastOpenListenOverflow */ 253 LINUX_MIB_TCPFASTOPENLISTENOVERFLOW, /* TCPFastOpenListenOverflow */
247 LINUX_MIB_TCPFASTOPENCOOKIEREQD, /* TCPFastOpenCookieReqd */ 254 LINUX_MIB_TCPFASTOPENCOOKIEREQD, /* TCPFastOpenCookieReqd */
255 LINUX_MIB_TCPSPURIOUS_RTX_HOSTQUEUES, /* TCPSpuriousRtxHostQueues */
248 __LINUX_MIB_MAX 256 __LINUX_MIB_MAX
249}; 257};
250 258
diff --git a/include/uapi/linux/tcp.h b/include/uapi/linux/tcp.h
index 6b1ead0b0c9d..8d776ebc4829 100644
--- a/include/uapi/linux/tcp.h
+++ b/include/uapi/linux/tcp.h
@@ -102,7 +102,6 @@ enum {
102#define TCP_QUICKACK 12 /* Block/reenable quick acks */ 102#define TCP_QUICKACK 12 /* Block/reenable quick acks */
103#define TCP_CONGESTION 13 /* Congestion control algorithm */ 103#define TCP_CONGESTION 13 /* Congestion control algorithm */
104#define TCP_MD5SIG 14 /* TCP MD5 Signature (RFC2385) */ 104#define TCP_MD5SIG 14 /* TCP MD5 Signature (RFC2385) */
105#define TCP_COOKIE_TRANSACTIONS 15 /* TCP Cookie Transactions */
106#define TCP_THIN_LINEAR_TIMEOUTS 16 /* Use linear timeouts for thin streams*/ 105#define TCP_THIN_LINEAR_TIMEOUTS 16 /* Use linear timeouts for thin streams*/
107#define TCP_THIN_DUPACK 17 /* Fast retrans. after 1 dupack */ 106#define TCP_THIN_DUPACK 17 /* Fast retrans. after 1 dupack */
108#define TCP_USER_TIMEOUT 18 /* How long for loss retry before timeout */ 107#define TCP_USER_TIMEOUT 18 /* How long for loss retry before timeout */
@@ -199,29 +198,4 @@ struct tcp_md5sig {
199 __u8 tcpm_key[TCP_MD5SIG_MAXKEYLEN]; /* key (binary) */ 198 __u8 tcpm_key[TCP_MD5SIG_MAXKEYLEN]; /* key (binary) */
200}; 199};
201 200
202/* for TCP_COOKIE_TRANSACTIONS (TCPCT) socket option */
203#define TCP_COOKIE_MIN 8 /* 64-bits */
204#define TCP_COOKIE_MAX 16 /* 128-bits */
205#define TCP_COOKIE_PAIR_SIZE (2*TCP_COOKIE_MAX)
206
207/* Flags for both getsockopt and setsockopt */
208#define TCP_COOKIE_IN_ALWAYS (1 << 0) /* Discard SYN without cookie */
209#define TCP_COOKIE_OUT_NEVER (1 << 1) /* Prohibit outgoing cookies,
210 * supercedes everything. */
211
212/* Flags for getsockopt */
213#define TCP_S_DATA_IN (1 << 2) /* Was data received? */
214#define TCP_S_DATA_OUT (1 << 3) /* Was data sent? */
215
216/* TCP_COOKIE_TRANSACTIONS data */
217struct tcp_cookie_transactions {
218 __u16 tcpct_flags; /* see above */
219 __u8 __tcpct_pad1; /* zero */
220 __u8 tcpct_cookie_desired; /* bytes */
221 __u16 tcpct_s_data_desired; /* bytes of variable data */
222 __u16 tcpct_used; /* bytes in value */
223 __u8 tcpct_value[TCP_MSS_DEFAULT];
224};
225
226
227#endif /* _UAPI_LINUX_TCP_H */ 201#endif /* _UAPI_LINUX_TCP_H */
diff --git a/include/uapi/linux/vm_sockets.h b/include/uapi/linux/vm_sockets.h
index df91301847ec..b4ed5d895699 100644
--- a/include/uapi/linux/vm_sockets.h
+++ b/include/uapi/linux/vm_sockets.h
@@ -13,12 +13,10 @@
13 * more details. 13 * more details.
14 */ 14 */
15 15
16#ifndef _VM_SOCKETS_H_ 16#ifndef _UAPI_VM_SOCKETS_H
17#define _VM_SOCKETS_H_ 17#define _UAPI_VM_SOCKETS_H
18 18
19#if !defined(__KERNEL__) 19#include <linux/socket.h>
20#include <sys/socket.h>
21#endif
22 20
23/* Option name for STREAM socket buffer size. Use as the option name in 21/* Option name for STREAM socket buffer size. Use as the option name in
24 * setsockopt(3) or getsockopt(3) to set or get an unsigned long long that 22 * setsockopt(3) or getsockopt(3) to set or get an unsigned long long that
@@ -137,14 +135,13 @@
137#define VM_SOCKETS_VERSION_MINOR(_v) (((_v) & 0x0000FFFF)) 135#define VM_SOCKETS_VERSION_MINOR(_v) (((_v) & 0x0000FFFF))
138 136
139/* Address structure for vSockets. The address family should be set to 137/* Address structure for vSockets. The address family should be set to
140 * whatever vmci_sock_get_af_value_fd() returns. The structure members should 138 * AF_VSOCK. The structure members should all align on their natural
141 * all align on their natural boundaries without resorting to compiler packing 139 * boundaries without resorting to compiler packing directives. The total size
142 * directives. The total size of this structure should be exactly the same as 140 * of this structure should be exactly the same as that of struct sockaddr.
143 * that of struct sockaddr.
144 */ 141 */
145 142
146struct sockaddr_vm { 143struct sockaddr_vm {
147 sa_family_t svm_family; 144 __kernel_sa_family_t svm_family;
148 unsigned short svm_reserved1; 145 unsigned short svm_reserved1;
149 unsigned int svm_port; 146 unsigned int svm_port;
150 unsigned int svm_cid; 147 unsigned int svm_cid;
@@ -156,8 +153,4 @@ struct sockaddr_vm {
156 153
157#define IOCTL_VM_SOCKETS_GET_LOCAL_CID _IO(7, 0xb9) 154#define IOCTL_VM_SOCKETS_GET_LOCAL_CID _IO(7, 0xb9)
158 155
159#if defined(__KERNEL__) 156#endif /* _UAPI_VM_SOCKETS_H */
160int vm_sockets_get_local_cid(void);
161#endif
162
163#endif
diff --git a/include/uapi/linux/xfrm.h b/include/uapi/linux/xfrm.h
index 28e493b5b94c..a8cd6a4a2970 100644
--- a/include/uapi/linux/xfrm.h
+++ b/include/uapi/linux/xfrm.h
@@ -297,6 +297,7 @@ enum xfrm_attr_type_t {
297 XFRMA_MARK, /* struct xfrm_mark */ 297 XFRMA_MARK, /* struct xfrm_mark */
298 XFRMA_TFCPAD, /* __u32 */ 298 XFRMA_TFCPAD, /* __u32 */
299 XFRMA_REPLAY_ESN_VAL, /* struct xfrm_replay_esn */ 299 XFRMA_REPLAY_ESN_VAL, /* struct xfrm_replay_esn */
300 XFRMA_SA_EXTRA_FLAGS, /* __u32 */
300 __XFRMA_MAX 301 __XFRMA_MAX
301 302
302#define XFRMA_MAX (__XFRMA_MAX - 1) 303#define XFRMA_MAX (__XFRMA_MAX - 1)
@@ -367,6 +368,8 @@ struct xfrm_usersa_info {
367#define XFRM_STATE_ESN 128 368#define XFRM_STATE_ESN 128
368}; 369};
369 370
371#define XFRM_SA_XFLAG_DONT_ENCAP_DSCP 1
372
370struct xfrm_usersa_id { 373struct xfrm_usersa_id {
371 xfrm_address_t daddr; 374 xfrm_address_t daddr;
372 __be32 spi; 375 __be32 spi;