History

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

Pull networking update from David Miller: 1) Checkpoint/restarted TCP sockets now can properly propagate the TCP timestamp offset. From Andrey Vagin. 2) VMWARE VM VSOCK layer, from Andy King. 3) Much improved support for virtual functions and SR-IOV in bnx2x, from Ariel ELior. 4) All protocols on ipv4 and ipv6 are now network namespace aware, and all the compatability checks for initial-namespace-only protocols is removed. Thanks to Tom Parkin for helping deal with the last major holdout, L2TP. 5) IPV6 support in netpoll and network namespace support in pktgen, from Cong Wang. 6) Multiple Registration Protocol (MRP) and Multiple VLAN Registration Protocol (MVRP) support, from David Ward. 7) Compute packet lengths more accurately in the packet scheduler, from Eric Dumazet. 8) Use per-task page fragment allocator in skb_append_datato_frags(), also from Eric Dumazet. 9) Add support for connection tracking labels in netfilter, from Florian Westphal. 10) Fix default multicast group joining on ipv6, and add anti-spoofing checks to 6to4 and 6rd. From Hannes Frederic Sowa. 11) Make ipv4/ipv6 fragmentation memory limits more reasonable in modern times, rearrange inet frag datastructures for better cacheline locality, and move more operations outside of locking. From Jesper Dangaard Brouer. 12) Instead of strict master <--> slave relationships, allow arbitrary scenerios with "upper device lists". From Jiri Pirko. 13) Improve rate limiting accuracy in TBF and act_police, also from Jiri Pirko. 14) Add a BPF filter netfilter match target, from Willem de Bruijn. 15) Orphan and delete a bunch of pre-historic networking drivers from Paul Gortmaker. 16) Add TSO support for GRE tunnels, from Pravin B SHelar. Although this still needs some minor bug fixing before it's %100 correct in all cases. 17) Handle unresolved IPSEC states like ARP, with a resolution packet queue. From Steffen Klassert. 18) Remove TCP Appropriate Byte Count support (ABC), from Stephen Hemminger. This was long overdue. 19) Support SO_REUSEPORT, from Tom Herbert. 20) Allow locking a socket BPF filter, so that it cannot change after a process drops capabilities. 21) Add VLAN filtering to bridge, from Vlad Yasevich. 22) Bring ipv6 on-par with ipv4 and do not cache neighbour entries in the ipv6 routes, from YOSHIFUJI Hideaki. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1538 commits) ipv6: fix race condition regarding dst->expires and dst->from. net: fix a wrong assignment in skb_split() ip_gre: remove an extra dst_release() ppp: set qdisc_tx_busylock to avoid LOCKDEP splat atl1c: restore buffer state net: fix a build failure when !CONFIG_PROC_FS net: ipv4: fix waring -Wunused-variable net: proc: fix build failed when procfs is not configured Revert "xen: netback: remove redundant xenvif_put" net: move procfs code to net/core/net-procfs.c qmi_wwan, cdc-ether: add ADU960S bonding: set sysfs device_type to 'bond' bonding: fix bond_release_all inconsistencies b44: use netdev_alloc_skb_ip_align() xen: netback: remove redundant xenvif_put net: fec: Do a sanity check on the gpio number ip_gre: propogate target device GSO capability to the tunnel device ip_gre: allow CSUM capable devices to handle packets bonding: Fix initialize after use for 3ad machine state spinlock bonding: Fix race condition between bond_enslave() and bond_3ad_update_lacp_rate() ...

Linus Torvalds committed 13 years ago

Commit a0b1c422 parents 8ec4942 ecd98831403 files · +99823 −60775Browse files

Showing the changes to include/uapi/linux (25 of 1403 files). Show all

Unified · Split

25 files
  1. include/uapi/linux/can/gw.h +2 −0
  2. include/uapi/linux/if_bridge.h +11 −0
  3. include/uapi/linux/if_ether.h +1 −0
  4. include/uapi/linux/if_link.h +1 −0
  5. include/uapi/linux/if_vlan.h +1 −0
  6. include/uapi/linux/in6.h +4 −16
  7. include/uapi/linux/ipv6.h +2 −0
  8. include/uapi/linux/mroute.h +3 −0
  9. include/uapi/linux/mroute6.h +3 −0
  10. include/uapi/linux/neighbour.h +1 −0
  11. include/uapi/linux/netfilter/Kbuild +2 −0
  12. include/uapi/linux/netfilter/nf_conntrack_common.h +1 −0
  13. include/uapi/linux/netfilter/nfnetlink_conntrack.h +2 −0
  14. include/uapi/linux/netfilter/xt_CT.h +5 −1
  15. include/uapi/linux/netfilter/xt_bpf.h +17 −0
  16. include/uapi/linux/netfilter/xt_connlabel.h +12 −0
  17. include/uapi/linux/netfilter/xt_conntrack.h +1 −0
  18. include/uapi/linux/nfc.h +24 −13
  19. include/uapi/linux/nl80211.h +386 −9
  20. include/uapi/linux/rtnetlink.h +1 −0
  21. include/uapi/linux/snmp.h +1 −0
  22. include/uapi/linux/tcp.h +1 −0
  23. include/uapi/linux/virtio_net.h +7 −1
  24. include/uapi/linux/vm_sockets.h +163 −0
  25. include/uapi/linux/wanrouter.h +4 −439
include/uapi/linux/can/gw.h+2−0
@@ -44,6 +44,7 @@ enum { · 43 unmodified lines
4444 CGW_SRC_IF, /* ifindex of source network interface */
4545 CGW_DST_IF, /* ifindex of destination network interface */
4646 CGW_FILTER, /* specify struct can_filter on source CAN device */
47+ CGW_DELETED, /* number of deleted CAN frames (see max_hops param) */
4748 __CGW_MAX
4849 };
4950
@@ -51,6 +52,7 @@ enum { · 1 unmodified line
5152
5253 #define CGW_FLAGS_CAN_ECHO 0x01
5354 #define CGW_FLAGS_CAN_SRC_TSTAMP 0x02
55+#define CGW_FLAGS_CAN_IIF_TX_OK 0x04
5456
5557 #define CGW_MOD_FUNCS 4 /* AND OR XOR SET */
5658
include/uapi/linux/if_bridge.h+11−0
@@ -108,15 +108,26 @@ struct __fdb_entry { · 107 unmodified lines
108108 * [IFLA_AF_SPEC] = {
109109 * [IFLA_BRIDGE_FLAGS]
110110 * [IFLA_BRIDGE_MODE]
111+ * [IFLA_BRIDGE_VLAN_INFO]
111112 * }
112113 */
113114 enum {
114115 IFLA_BRIDGE_FLAGS,
115116 IFLA_BRIDGE_MODE,
117+ IFLA_BRIDGE_VLAN_INFO,
116118 __IFLA_BRIDGE_MAX,
117119 };
118120 #define IFLA_BRIDGE_MAX (__IFLA_BRIDGE_MAX - 1)
119121
122+#define BRIDGE_VLAN_INFO_MASTER (1<<0) /* Operate on Bridge device as well */
123+#define BRIDGE_VLAN_INFO_PVID (1<<1) /* VLAN is PVID, ingress untagged */
124+#define BRIDGE_VLAN_INFO_UNTAGGED (1<<2) /* VLAN egresses untagged */
125+
126+struct bridge_vlan_info {
127+ __u16 flags;
128+ __u16 vid;
129+};
130+
120131 /* Bridge multicast database attributes
121132 * [MDBA_MDB] = {
122133 * [MDBA_MDB_ENTRY] = {
include/uapi/linux/if_ether.h+1−0
@@ -83,6 +83,7 @@ · 82 unmodified lines
8383 #define ETH_P_802_EX1 0x88B5 /* 802.1 Local Experimental 1. */
8484 #define ETH_P_TIPC 0x88CA /* TIPC */
8585 #define ETH_P_8021AH 0x88E7 /* 802.1ah Backbone Service Tag */
86+#define ETH_P_MVRP 0x88F5 /* 802.1Q MVRP */
8687 #define ETH_P_1588 0x88F7 /* IEEE 1588 Timesync */
8788 #define ETH_P_FCOE 0x8906 /* Fibre Channel over Ethernet */
8889 #define ETH_P_TDLS 0x890D /* TDLS */
include/uapi/linux/if_link.h+1−0
@@ -142,6 +142,7 @@ enum { · 141 unmodified lines
142142 #define IFLA_PROMISCUITY IFLA_PROMISCUITY
143143 IFLA_NUM_TX_QUEUES,
144144 IFLA_NUM_RX_QUEUES,
145+ IFLA_CARRIER,
145146 __IFLA_MAX
146147 };
147148
include/uapi/linux/if_vlan.h+1−0
@@ -34,6 +34,7 @@ enum vlan_flags { · 33 unmodified lines
3434 VLAN_FLAG_REORDER_HDR = 0x1,
3535 VLAN_FLAG_GVRP = 0x2,
3636 VLAN_FLAG_LOOSE_BINDING = 0x4,
37+ VLAN_FLAG_MVRP = 0x8,
3738 };
3839
3940 enum vlan_name_types {
include/uapi/linux/in6.h+4−16
@@ -38,11 +38,6 @@ struct in6_addr { · 37 unmodified lines
3838 #define s6_addr32 in6_u.u6_addr32
3939 };
4040
41−/* IPv6 Wildcard Address (::) and Loopback Address (::1) defined in RFC2553
42− * NOTE: Be aware the IN6ADDR_* constants and in6addr_* externals are defined
43− * in network byte order, not in host byte order as are the IPv4 equivalents
44− */
45−
4641 struct sockaddr_in6 {
4742 unsigned short int sin6_family; /* AF_INET6 */
4843 __be16 sin6_port; /* Transport layer port # */
@@ -264,17 +259,10 @@ struct in6_flowlabel_req { · 215 unmodified lines
264259
265260 /*
266261 * Multicast Routing:
267− * see include/linux/mroute6.h.
262+ * see include/uapi/linux/mroute6.h.
268263 *
269− * MRT6_INIT 200
270− * MRT6_DONE 201
271− * MRT6_ADD_MIF 202
272− * MRT6_DEL_MIF 203
273− * MRT6_ADD_MFC 204
274− * MRT6_DEL_MFC 205
275− * MRT6_VERSION 206
276− * MRT6_ASSERT 207
277− * MRT6_PIM 208
278− * (reserved) 209
264+ * MRT6_BASE 200
265+ * ...
266+ * MRT6_MAX
279267 */
280268 #endif /* _UAPI_LINUX_IN6_H */
include/uapi/linux/ipv6.h+2−0
@@ -63,6 +63,8 @@ struct ipv6_opt_hdr { · 62 unmodified lines
6363 #define ipv6_destopt_hdr ipv6_opt_hdr
6464 #define ipv6_hopopt_hdr ipv6_opt_hdr
6565
66+/* Router Alert option values (RFC2711) */
67+#define IPV6_OPT_ROUTERALERT_MLD 0x0000 /* MLD(RFC2710) */
6668
6769 /*
6870 * routing header type 0 (used in cmsghdr struct)
include/uapi/linux/mroute.h+3−0
@@ -26,6 +26,9 @@ · 25 unmodified lines
2626 #define MRT_ASSERT (MRT_BASE+7) /* Activate PIM assert mode */
2727 #define MRT_PIM (MRT_BASE+8) /* enable PIM code */
2828 #define MRT_TABLE (MRT_BASE+9) /* Specify mroute table ID */
29+#define MRT_ADD_MFC_PROXY (MRT_BASE+10) /* Add a (*,*|G) mfc entry */
30+#define MRT_DEL_MFC_PROXY (MRT_BASE+11) /* Del a (*,*|G) mfc entry */
31+#define MRT_MAX (MRT_BASE+11)
2932
3033 #define SIOCGETVIFCNT SIOCPROTOPRIVATE /* IP protocol privates */
3134 #define SIOCGETSGCNT (SIOCPROTOPRIVATE+1)
include/uapi/linux/mroute6.h+3−0
@@ -26,6 +26,9 @@ · 25 unmodified lines
2626 #define MRT6_ASSERT (MRT6_BASE+7) /* Activate PIM assert mode */
2727 #define MRT6_PIM (MRT6_BASE+8) /* enable PIM code */
2828 #define MRT6_TABLE (MRT6_BASE+9) /* Specify mroute table ID */
29+#define MRT6_ADD_MFC_PROXY (MRT6_BASE+10) /* Add a (*,*|G) mfc entry */
30+#define MRT6_DEL_MFC_PROXY (MRT6_BASE+11) /* Del a (*,*|G) mfc entry */
31+#define MRT6_MAX (MRT6_BASE+11)
2932
3033 #define SIOCGETMIFCNT_IN6 SIOCPROTOPRIVATE /* IP protocol privates */
3134 #define SIOCGETSGCNT_IN6 (SIOCPROTOPRIVATE+1)
include/uapi/linux/neighbour.h+1−0
@@ -20,6 +20,7 @@ enum { · 19 unmodified lines
2020 NDA_LLADDR,
2121 NDA_CACHEINFO,
2222 NDA_PROBES,
23+ NDA_VLAN,
2324 __NDA_MAX
2425 };
2526
include/uapi/linux/netfilter/Kbuild+2−0
@@ -35,9 +35,11 @@ header-y += xt_TCPOPTSTRIP.h · 34 unmodified lines
3535 header-y += xt_TEE.h
3636 header-y += xt_TPROXY.h
3737 header-y += xt_addrtype.h
38+header-y += xt_bpf.h
3839 header-y += xt_cluster.h
3940 header-y += xt_comment.h
4041 header-y += xt_connbytes.h
42+header-y += xt_connlabel.h
4143 header-y += xt_connlimit.h
4244 header-y += xt_connmark.h
4345 header-y += xt_conntrack.h
include/uapi/linux/netfilter/nf_conntrack_common.h+1−0
@@ -101,6 +101,7 @@ enum ip_conntrack_events { · 100 unmodified lines
101101 IPCT_MARK, /* new mark has been set */
102102 IPCT_NATSEQADJ, /* NAT is doing sequence adjustment */
103103 IPCT_SECMARK, /* new security mark has been set */
104+ IPCT_LABEL, /* new connlabel has been set */
104105 };
105106
106107 enum ip_conntrack_expect_events {
include/uapi/linux/netfilter/nfnetlink_conntrack.h+2−0
@@ -49,6 +49,8 @@ enum ctattr_type { · 48 unmodified lines
4949 CTA_SECCTX,
5050 CTA_TIMESTAMP,
5151 CTA_MARK_MASK,
52+ CTA_LABELS,
53+ CTA_LABELS_MASK,
5254 __CTA_MAX
5355 };
5456 #define CTA_MAX (__CTA_MAX - 1)
include/uapi/linux/netfilter/xt_CT.h+5−1
@@ -3,7 +3,11 @@ · 2 unmodified lines
33
44 #include <linux/types.h>
55
6−#define XT_CT_NOTRACK 0x1
6+enum {
7+ XT_CT_NOTRACK = 1 << 0,
8+ XT_CT_NOTRACK_ALIAS = 1 << 1,
9+ XT_CT_MASK = XT_CT_NOTRACK | XT_CT_NOTRACK_ALIAS,
10+};
711
812 struct xt_ct_target_info {
913 __u16 flags;
include/uapi/linux/netfilter/xt_bpf.h+17−0
@@ -0,0 +1,17 @@
1+#ifndef _XT_BPF_H
2+#define _XT_BPF_H
3+
4+#include <linux/filter.h>
5+#include <linux/types.h>
6+
7+#define XT_BPF_MAX_NUM_INSTR 64
8+
9+struct xt_bpf_info {
10+ __u16 bpf_program_num_elem;
11+ struct sock_filter bpf_program[XT_BPF_MAX_NUM_INSTR];
12+
13+ /* only used in the kernel */
14+ struct sk_filter *filter __attribute__((aligned(8)));
15+};
16+
17+#endif /*_XT_BPF_H */
include/uapi/linux/netfilter/xt_connlabel.h+12−0
@@ -0,0 +1,12 @@
1+#include <linux/types.h>
2+
3+#define XT_CONNLABEL_MAXBIT 127
4+enum xt_connlabel_mtopts {
5+ XT_CONNLABEL_OP_INVERT = 1 << 0,
6+ XT_CONNLABEL_OP_SET = 1 << 1,
7+};
8+
9+struct xt_connlabel_mtinfo {
10+ __u16 bit;
11+ __u16 options;
12+};
include/uapi/linux/netfilter/xt_conntrack.h+1−0
@@ -31,6 +31,7 @@ enum { · 30 unmodified lines
3131 XT_CONNTRACK_REPLSRC_PORT = 1 << 10,
3232 XT_CONNTRACK_REPLDST_PORT = 1 << 11,
3333 XT_CONNTRACK_DIRECTION = 1 << 12,
34+ XT_CONNTRACK_STATE_ALIAS = 1 << 13,
3435 };
3536
3637 struct xt_conntrack_mtinfo1 {
include/uapi/linux/nfc.h+24−13
@@ -5,20 +5,17 @@ · 4 unmodified lines
55 * Lauro Ramos Venancio <lauro.venancio@openbossa.org>
66 * Aloisio Almeida Jr <aloisio.almeida@openbossa.org>
77 *
8− * This program is free software; you can redistribute it and/or modify
9− * it under the terms of the GNU General Public License as published by
10− * the Free Software Foundation; either version 2 of the License, or
11− * (at your option) any later version.
8+ * Permission to use, copy, modify, and/or distribute this software for any
9+ * purpose with or without fee is hereby granted, provided that the above
10+ * copyright notice and this permission notice appear in all copies.
1211 *
13− * This program is distributed in the hope that it will be useful,
14− * but WITHOUT ANY WARRANTY; without even the implied warranty of
15− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16− * GNU General Public License for more details.
17− *
18− * You should have received a copy of the GNU General Public License
19− * along with this program; if not, write to the
20− * Free Software Foundation, Inc.,
21− * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
12+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
13+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
14+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
15+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
16+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
17+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
18+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
2219 */
2320
2421 #ifndef __LINUX_NFC_H
@@ -67,6 +64,11 @@ · 42 unmodified lines
6764 * subsequent CONNECT and CC messages.
6865 * If one of the passed parameters is wrong none is set and -EINVAL is
6966 * returned.
67+ * @NFC_CMD_ENABLE_SE: Enable the physical link to a specific secure element.
68+ * Once enabled a secure element will handle card emulation mode, i.e.
69+ * starting a poll from a device which has a secure element enabled means
70+ * we want to do SE based card emulation.
71+ * @NFC_CMD_DISABLE_SE: Disable the physical link to a specific secure element.
7072 */
7173 enum nfc_commands {
7274 NFC_CMD_UNSPEC,
@@ -86,6 +88,8 @@ enum nfc_commands { · 13 unmodified lines
8688 NFC_EVENT_TM_DEACTIVATED,
8789 NFC_CMD_LLC_GET_PARAMS,
8890 NFC_CMD_LLC_SET_PARAMS,
91+ NFC_CMD_ENABLE_SE,
92+ NFC_CMD_DISABLE_SE,
8993 /* private: internal use only */
9094 __NFC_CMD_AFTER_LAST
9195 };
@@ -114,6 +118,7 @@ enum nfc_commands { · 22 unmodified lines
114118 * @NFC_ATTR_LLC_PARAM_LTO: Link TimeOut parameter
115119 * @NFC_ATTR_LLC_PARAM_RW: Receive Window size parameter
116120 * @NFC_ATTR_LLC_PARAM_MIUX: MIU eXtension parameter
121+ * @NFC_ATTR_SE: Available Secure Elements
117122 */
118123 enum nfc_attrs {
119124 NFC_ATTR_UNSPEC,
@@ -134,6 +139,7 @@ enum nfc_attrs { · 14 unmodified lines
134139 NFC_ATTR_LLC_PARAM_LTO,
135140 NFC_ATTR_LLC_PARAM_RW,
136141 NFC_ATTR_LLC_PARAM_MIUX,
142+ NFC_ATTR_SE,
137143 /* private: internal use only */
138144 __NFC_ATTR_AFTER_LAST
139145 };
@@ -172,6 +178,11 @@ enum nfc_attrs { · 32 unmodified lines
172178 #define NFC_PROTO_NFC_DEP_MASK (1 << NFC_PROTO_NFC_DEP)
173179 #define NFC_PROTO_ISO14443_B_MASK (1 << NFC_PROTO_ISO14443_B)
174180
181+/* NFC Secure Elements */
182+#define NFC_SE_NONE 0x0
183+#define NFC_SE_UICC 0x1
184+#define NFC_SE_EMBEDDED 0x2
185+
175186 struct sockaddr_nfc {
176187 sa_family_t sa_family;
177188 __u32 dev_idx;
include/uapi/linux/nl80211.h+386−9
@@ -170,7 +170,8 @@ · 169 unmodified lines
170170 * %NL80211_ATTR_HIDDEN_SSID, %NL80211_ATTR_CIPHERS_PAIRWISE,
171171 * %NL80211_ATTR_CIPHER_GROUP, %NL80211_ATTR_WPA_VERSIONS,
172172 * %NL80211_ATTR_AKM_SUITES, %NL80211_ATTR_PRIVACY,
173− * %NL80211_ATTR_AUTH_TYPE and %NL80211_ATTR_INACTIVITY_TIMEOUT.
173+ * %NL80211_ATTR_AUTH_TYPE, %NL80211_ATTR_INACTIVITY_TIMEOUT,
174+ * %NL80211_ATTR_ACL_POLICY and %NL80211_ATTR_MAC_ADDRS.
174175 * The channel to use can be set on the interface or be given using the
175176 * %NL80211_ATTR_WIPHY_FREQ and the attributes determining channel width.
176177 * @NL80211_CMD_NEW_BEACON: old alias for %NL80211_CMD_START_AP
@@ -374,8 +375,8 @@ · 197 unmodified lines
374375 * requests to connect to a specified network but without separating
375376 * auth and assoc steps. For this, you need to specify the SSID in a
376377 * %NL80211_ATTR_SSID attribute, and can optionally specify the association
377− * IEs in %NL80211_ATTR_IE, %NL80211_ATTR_AUTH_TYPE, %NL80211_ATTR_MAC,
378− * %NL80211_ATTR_WIPHY_FREQ, %NL80211_ATTR_CONTROL_PORT,
378+ * IEs in %NL80211_ATTR_IE, %NL80211_ATTR_AUTH_TYPE, %NL80211_ATTR_USE_MFP,
379+ * %NL80211_ATTR_MAC, %NL80211_ATTR_WIPHY_FREQ, %NL80211_ATTR_CONTROL_PORT,
379380 * %NL80211_ATTR_CONTROL_PORT_ETHERTYPE and
380381 * %NL80211_ATTR_CONTROL_PORT_NO_ENCRYPT.
381382 * Background scan period can optionally be
@@ -512,6 +513,12 @@ · 130 unmodified lines
512513 * command with the %NL80211_ATTR_WOWLAN_TRIGGERS attribute. For
513514 * more background information, see
514515 * http://wireless.kernel.org/en/users/Documentation/WoWLAN.
516+ * The @NL80211_CMD_SET_WOWLAN command can also be used as a notification
517+ * from the driver reporting the wakeup reason. In this case, the
518+ * @NL80211_ATTR_WOWLAN_TRIGGERS attribute will contain the reason
519+ * for the wakeup, if it was caused by wireless. If it is not present
520+ * in the wakeup notification, the wireless device didn't cause the
521+ * wakeup but reports that it was woken up.
515522 *
516523 * @NL80211_CMD_SET_REKEY_OFFLOAD: This command is used give the driver
517524 * the necessary information for supporting GTK rekey offload. This
@@ -586,6 +593,24 @@ · 68 unmodified lines
586593 * @NL80211_CMD_SET_MCAST_RATE: Change the rate used to send multicast frames
587594 * for IBSS or MESH vif.
588595 *
596+ * @NL80211_CMD_SET_MAC_ACL: sets ACL for MAC address based access control.
597+ * This is to be used with the drivers advertising the support of MAC
598+ * address based access control. List of MAC addresses is passed in
599+ * %NL80211_ATTR_MAC_ADDRS and ACL policy is passed in
600+ * %NL80211_ATTR_ACL_POLICY. Driver will enable ACL with this list, if it
601+ * is not already done. The new list will replace any existing list. Driver
602+ * will clear its ACL when the list of MAC addresses passed is empty. This
603+ * command is used in AP/P2P GO mode. Driver has to make sure to clear its
604+ * ACL list during %NL80211_CMD_STOP_AP.
605+ *
606+ * @NL80211_CMD_RADAR_DETECT: Start a Channel availability check (CAC). Once
607+ * a radar is detected or the channel availability scan (CAC) has finished
608+ * or was aborted, or a radar was detected, usermode will be notified with
609+ * this event. This command is also used to notify userspace about radars
610+ * while operating on this channel.
611+ * %NL80211_ATTR_RADAR_EVENT is used to inform about the type of the
612+ * event.
613+ *
589614 * @NL80211_CMD_MAX: highest used command number
590615 * @__NL80211_CMD_AFTER_LAST: internal use
591616 */
@@ -736,6 +761,10 @@ enum nl80211_commands { · 144 unmodified lines
736761
737762 NL80211_CMD_SET_MCAST_RATE,
738763
764+ NL80211_CMD_SET_MAC_ACL,
765+
766+ NL80211_CMD_RADAR_DETECT,
767+
739768 /* add new commands above here */
740769
741770 /* used to define NL80211_CMD_MAX below */
@@ -958,7 +987,7 @@ enum nl80211_commands { · 216 unmodified lines
958987 * @NL80211_ATTR_USE_MFP: Whether management frame protection (IEEE 802.11w) is
959988 * used for the association (&enum nl80211_mfp, represented as a u32);
960989 * this attribute can be used
961− * with %NL80211_CMD_ASSOCIATE request
990+ * with %NL80211_CMD_ASSOCIATE and %NL80211_CMD_CONNECT requests
962991 *
963992 * @NL80211_ATTR_STA_FLAGS2: Attribute containing a
964993 * &struct nl80211_sta_flag_update.
@@ -1310,6 +1339,35 @@ enum nl80211_commands { · 345 unmodified lines
13101339 * if not given in START_AP 0 is assumed, if not given in SET_BSS
13111340 * no change is made.
13121341 *
1342+ * @NL80211_ATTR_LOCAL_MESH_POWER_MODE: local mesh STA link-specific power mode
1343+ * defined in &enum nl80211_mesh_power_mode.
1344+ *
1345+ * @NL80211_ATTR_ACL_POLICY: ACL policy, see &enum nl80211_acl_policy,
1346+ * carried in a u32 attribute
1347+ *
1348+ * @NL80211_ATTR_MAC_ADDRS: Array of nested MAC addresses, used for
1349+ * MAC ACL.
1350+ *
1351+ * @NL80211_ATTR_MAC_ACL_MAX: u32 attribute to advertise the maximum
1352+ * number of MAC addresses that a device can support for MAC
1353+ * ACL.
1354+ *
1355+ * @NL80211_ATTR_RADAR_EVENT: Type of radar event for notification to userspace,
1356+ * contains a value of enum nl80211_radar_event (u32).
1357+ *
1358+ * @NL80211_ATTR_EXT_CAPA: 802.11 extended capabilities that the kernel driver
1359+ * has and handles. The format is the same as the IE contents. See
1360+ * 802.11-2012 8.4.2.29 for more information.
1361+ * @NL80211_ATTR_EXT_CAPA_MASK: Extended capabilities that the kernel driver
1362+ * has set in the %NL80211_ATTR_EXT_CAPA value, for multibit fields.
1363+ *
1364+ * @NL80211_ATTR_STA_CAPABILITY: Station capabilities (u16) are advertised to
1365+ * the driver, e.g., to enable TDLS power save (PU-APSD).
1366+ *
1367+ * @NL80211_ATTR_STA_EXT_CAPABILITY: Station extended capabilities are
1368+ * advertised to the driver, e.g., to enable TDLS off channel operations
1369+ * and PU-APSD.
1370+ *
13131371 * @NL80211_ATTR_MAX: highest attribute number currently defined
13141372 * @__NL80211_ATTR_AFTER_LAST: internal use
13151373 */
@@ -1580,6 +1638,22 @@ enum nl80211_attrs { · 264 unmodified lines
15801638 NL80211_ATTR_P2P_CTWINDOW,
15811639 NL80211_ATTR_P2P_OPPPS,
15821640
1641+ NL80211_ATTR_LOCAL_MESH_POWER_MODE,
1642+
1643+ NL80211_ATTR_ACL_POLICY,
1644+
1645+ NL80211_ATTR_MAC_ADDRS,
1646+
1647+ NL80211_ATTR_MAC_ACL_MAX,
1648+
1649+ NL80211_ATTR_RADAR_EVENT,
1650+
1651+ NL80211_ATTR_EXT_CAPA,
1652+ NL80211_ATTR_EXT_CAPA_MASK,
1653+
1654+ NL80211_ATTR_STA_CAPABILITY,
1655+ NL80211_ATTR_STA_EXT_CAPABILITY,
1656+
15831657 /* add attributes here, update the policy in nl80211.c */
15841658
15851659 __NL80211_ATTR_AFTER_LAST,
@@ -1697,6 +1771,9 @@ enum nl80211_iftype { · 111 unmodified lines
16971771 * flag can't be changed, it is only valid while adding a station, and
16981772 * attempts to change it will silently be ignored (rather than rejected
16991773 * as errors.)
1774+ * @NL80211_STA_FLAG_ASSOCIATED: station is associated; used with drivers
1775+ * that support %NL80211_FEATURE_FULL_AP_CLIENT_STATE to transition a
1776+ * previously added station into associated state
17001777 * @NL80211_STA_FLAG_MAX: highest station flag number currently defined
17011778 * @__NL80211_STA_FLAG_AFTER_LAST: internal use
17021779 */
@@ -1708,6 +1785,7 @@ enum nl80211_sta_flags { · 5 unmodified lines
17081785 NL80211_STA_FLAG_MFP,
17091786 NL80211_STA_FLAG_AUTHENTICATED,
17101787 NL80211_STA_FLAG_TDLS_PEER,
1788+ NL80211_STA_FLAG_ASSOCIATED,
17111789
17121790 /* keep last */
17131791 __NL80211_STA_FLAG_AFTER_LAST,
@@ -1813,6 +1891,8 @@ enum nl80211_sta_bss_param { · 99 unmodified lines
18131891 * @NL80211_STA_INFO_INACTIVE_TIME: time since last activity (u32, msecs)
18141892 * @NL80211_STA_INFO_RX_BYTES: total received bytes (u32, from this station)
18151893 * @NL80211_STA_INFO_TX_BYTES: total transmitted bytes (u32, to this station)
1894+ * @NL80211_STA_INFO_RX_BYTES64: total received bytes (u64, from this station)
1895+ * @NL80211_STA_INFO_TX_BYTES64: total transmitted bytes (u64, to this station)
18161896 * @NL80211_STA_INFO_SIGNAL: signal strength of last received PPDU (u8, dBm)
18171897 * @NL80211_STA_INFO_TX_BITRATE: current unicast tx rate, nested attribute
18181898 * containing info as possible, see &enum nl80211_rate_info
@@ -1834,6 +1914,10 @@ enum nl80211_sta_bss_param { · 15 unmodified lines
18341914 * @NL80211_STA_INFO_STA_FLAGS: Contains a struct nl80211_sta_flag_update.
18351915 * @NL80211_STA_INFO_BEACON_LOSS: count of times beacon loss was detected (u32)
18361916 * @NL80211_STA_INFO_T_OFFSET: timing offset with respect to this STA (s64)
1917+ * @NL80211_STA_INFO_LOCAL_PM: local mesh STA link-specific power mode
1918+ * @NL80211_STA_INFO_PEER_PM: peer mesh STA link-specific power mode
1919+ * @NL80211_STA_INFO_NONPEER_PM: neighbor mesh STA power save mode towards
1920+ * non-peer STA
18371921 * @__NL80211_STA_INFO_AFTER_LAST: internal
18381922 * @NL80211_STA_INFO_MAX: highest possible station info attribute
18391923 */
@@ -1858,6 +1942,11 @@ enum nl80211_sta_info { · 18 unmodified lines
18581942 NL80211_STA_INFO_STA_FLAGS,
18591943 NL80211_STA_INFO_BEACON_LOSS,
18601944 NL80211_STA_INFO_T_OFFSET,
1945+ NL80211_STA_INFO_LOCAL_PM,
1946+ NL80211_STA_INFO_PEER_PM,
1947+ NL80211_STA_INFO_NONPEER_PM,
1948+ NL80211_STA_INFO_RX_BYTES64,
1949+ NL80211_STA_INFO_TX_BYTES64,
18611950
18621951 /* keep last */
18631952 __NL80211_STA_INFO_AFTER_LAST,
@@ -1967,6 +2056,20 @@ enum nl80211_band_attr { · 103 unmodified lines
19672056 * on this channel in current regulatory domain.
19682057 * @NL80211_FREQUENCY_ATTR_MAX_TX_POWER: Maximum transmission power in mBm
19692058 * (100 * dBm).
2059+ * @NL80211_FREQUENCY_ATTR_DFS_STATE: current state for DFS
2060+ * (enum nl80211_dfs_state)
2061+ * @NL80211_FREQUENCY_ATTR_DFS_TIME: time in miliseconds for how long
2062+ * this channel is in this DFS state.
2063+ * @NL80211_FREQUENCY_ATTR_NO_HT40_MINUS: HT40- isn't possible with this
2064+ * channel as the control channel
2065+ * @NL80211_FREQUENCY_ATTR_NO_HT40_PLUS: HT40+ isn't possible with this
2066+ * channel as the control channel
2067+ * @NL80211_FREQUENCY_ATTR_NO_80MHZ: any 80 MHz channel using this channel
2068+ * as the primary or any of the secondary channels isn't possible,
2069+ * this includes 80+80 channels
2070+ * @NL80211_FREQUENCY_ATTR_NO_160MHZ: any 160 MHz (but not 80+80) channel
2071+ * using this channel as the primary or any of the secondary channels
2072+ * isn't possible
19702073 * @NL80211_FREQUENCY_ATTR_MAX: highest frequency attribute number
19712074 * currently defined
19722075 * @__NL80211_FREQUENCY_ATTR_AFTER_LAST: internal use
@@ -1979,6 +2082,12 @@ enum nl80211_frequency_attr { · 6 unmodified lines
19792082 NL80211_FREQUENCY_ATTR_NO_IBSS,
19802083 NL80211_FREQUENCY_ATTR_RADAR,
19812084 NL80211_FREQUENCY_ATTR_MAX_TX_POWER,
2085+ NL80211_FREQUENCY_ATTR_DFS_STATE,
2086+ NL80211_FREQUENCY_ATTR_DFS_TIME,
2087+ NL80211_FREQUENCY_ATTR_NO_HT40_MINUS,
2088+ NL80211_FREQUENCY_ATTR_NO_HT40_PLUS,
2089+ NL80211_FREQUENCY_ATTR_NO_80MHZ,
2090+ NL80211_FREQUENCY_ATTR_NO_160MHZ,
19822091
19832092 /* keep last */
19842093 __NL80211_FREQUENCY_ATTR_AFTER_LAST,
@@ -2248,6 +2357,34 @@ enum nl80211_mntr_flags { · 263 unmodified lines
22482357 NL80211_MNTR_FLAG_MAX = __NL80211_MNTR_FLAG_AFTER_LAST - 1
22492358 };
22502359
2360+/**
2361+ * enum nl80211_mesh_power_mode - mesh power save modes
2362+ *
2363+ * @NL80211_MESH_POWER_UNKNOWN: The mesh power mode of the mesh STA is
2364+ * not known or has not been set yet.
2365+ * @NL80211_MESH_POWER_ACTIVE: Active mesh power mode. The mesh STA is
2366+ * in Awake state all the time.
2367+ * @NL80211_MESH_POWER_LIGHT_SLEEP: Light sleep mode. The mesh STA will
2368+ * alternate between Active and Doze states, but will wake up for
2369+ * neighbor's beacons.
2370+ * @NL80211_MESH_POWER_DEEP_SLEEP: Deep sleep mode. The mesh STA will
2371+ * alternate between Active and Doze states, but may not wake up
2372+ * for neighbor's beacons.
2373+ *
2374+ * @__NL80211_MESH_POWER_AFTER_LAST - internal use
2375+ * @NL80211_MESH_POWER_MAX - highest possible power save level
2376+ */
2377+
2378+enum nl80211_mesh_power_mode {
2379+ NL80211_MESH_POWER_UNKNOWN,
2380+ NL80211_MESH_POWER_ACTIVE,
2381+ NL80211_MESH_POWER_LIGHT_SLEEP,
2382+ NL80211_MESH_POWER_DEEP_SLEEP,
2383+
2384+ __NL80211_MESH_POWER_AFTER_LAST,
2385+ NL80211_MESH_POWER_MAX = __NL80211_MESH_POWER_AFTER_LAST - 1
2386+};
2387+
22512388 /**
22522389 * enum nl80211_meshconf_params - mesh configuration parameters
22532390 *
@@ -2342,6 +2479,11 @@ enum nl80211_mntr_flags { · 88 unmodified lines
23422479 * (in TUs) during which a mesh STA can send only one Action frame
23432480 * containing a PREQ element for root path confirmation.
23442481 *
2482+ * @NL80211_MESHCONF_POWER_MODE: Default mesh power mode for new peer links.
2483+ * type &enum nl80211_mesh_power_mode (u32)
2484+ *
2485+ * @NL80211_MESHCONF_AWAKE_WINDOW: awake window duration (in TUs)
2486+ *
23452487 * @__NL80211_MESHCONF_ATTR_AFTER_LAST: internal use
23462488 */
23472489 enum nl80211_meshconf_params {
@@ -2371,6 +2513,8 @@ enum nl80211_meshconf_params { · 23 unmodified lines
23712513 NL80211_MESHCONF_HWMP_PATH_TO_ROOT_TIMEOUT,
23722514 NL80211_MESHCONF_HWMP_ROOT_INTERVAL,
23732515 NL80211_MESHCONF_HWMP_CONFIRMATION_INTERVAL,
2516+ NL80211_MESHCONF_POWER_MODE,
2517+ NL80211_MESHCONF_AWAKE_WINDOW,
23742518
23752519 /* keep last */
23762520 __NL80211_MESHCONF_ATTR_AFTER_LAST,
@@ -2816,10 +2960,12 @@ enum nl80211_tx_power_setting { · 439 unmodified lines
28162960 * corresponds to the lowest-order bit in the second byte of the mask.
28172961 * For example: The match 00:xx:00:00:xx:00:00:00:00:xx:xx:xx (where
28182962 * xx indicates "don't care") would be represented by a pattern of
2819− * twelve zero bytes, and a mask of "0xed,0x07".
2963+ * twelve zero bytes, and a mask of "0xed,0x01".
28202964 * Note that the pattern matching is done as though frames were not
28212965 * 802.11 frames but 802.3 frames, i.e. the frame is fully unpacked
28222966 * first (including SNAP header unpacking) and then matched.
2967+ * @NL80211_WOWLAN_PKTPAT_OFFSET: packet offset, pattern is matched after
2968+ * these fixed number of bytes of received packet
28232969 * @NUM_NL80211_WOWLAN_PKTPAT: number of attributes
28242970 * @MAX_NL80211_WOWLAN_PKTPAT: max attribute number
28252971 */
@@ -2827,6 +2973,7 @@ enum nl80211_wowlan_packet_pattern_attr { · 1 unmodified line
28272973 __NL80211_WOWLAN_PKTPAT_INVALID,
28282974 NL80211_WOWLAN_PKTPAT_MASK,
28292975 NL80211_WOWLAN_PKTPAT_PATTERN,
2976+ NL80211_WOWLAN_PKTPAT_OFFSET,
28302977
28312978 NUM_NL80211_WOWLAN_PKTPAT,
28322979 MAX_NL80211_WOWLAN_PKTPAT = NUM_NL80211_WOWLAN_PKTPAT - 1,
@@ -2837,6 +2984,7 @@ enum nl80211_wowlan_packet_pattern_attr { · 4 unmodified lines
28372984 * @max_patterns: maximum number of patterns supported
28382985 * @min_pattern_len: minimum length of each pattern
28392986 * @max_pattern_len: maximum length of each pattern
2987+ * @max_pkt_offset: maximum Rx packet offset
28402988 *
28412989 * This struct is carried in %NL80211_WOWLAN_TRIG_PKT_PATTERN when
28422990 * that is part of %NL80211_ATTR_WOWLAN_TRIGGERS_SUPPORTED in the
@@ -2846,6 +2994,7 @@ struct nl80211_wowlan_pattern_support { · 3 unmodified lines
28462994 __u32 max_patterns;
28472995 __u32 min_pattern_len;
28482996 __u32 max_pattern_len;
2997+ __u32 max_pkt_offset;
28492998 } __attribute__((packed));
28502999
28513000 /**
@@ -2861,12 +3010,17 @@ struct nl80211_wowlan_pattern_support { · 9 unmodified lines
28613010 * @NL80211_WOWLAN_TRIG_PKT_PATTERN: wake up on the specified packet patterns
28623011 * which are passed in an array of nested attributes, each nested attribute
28633012 * defining a with attributes from &struct nl80211_wowlan_trig_pkt_pattern.
2864− * Each pattern defines a wakeup packet. The matching is done on the MSDU,
2865− * i.e. as though the packet was an 802.3 packet, so the pattern matching
2866− * is done after the packet is converted to the MSDU.
3013+ * Each pattern defines a wakeup packet. Packet offset is associated with
3014+ * each pattern which is used while matching the pattern. The matching is
3015+ * done on the MSDU, i.e. as though the packet was an 802.3 packet, so the
3016+ * pattern matching is done after the packet is converted to the MSDU.
28673017 *
28683018 * In %NL80211_ATTR_WOWLAN_TRIGGERS_SUPPORTED, it is a binary attribute
28693019 * carrying a &struct nl80211_wowlan_pattern_support.
3020+ *
3021+ * When reporting wakeup. it is a u32 attribute containing the 0-based
3022+ * index of the pattern that caused the wakeup, in the patterns passed
3023+ * to the kernel when configuring.
28703024 * @NL80211_WOWLAN_TRIG_GTK_REKEY_SUPPORTED: Not a real trigger, and cannot be
28713025 * used when setting, used only to indicate that GTK rekeying is supported
28723026 * by the device (flag)
@@ -2877,8 +3031,36 @@ struct nl80211_wowlan_pattern_support { · 4 unmodified lines
28773031 * @NL80211_WOWLAN_TRIG_4WAY_HANDSHAKE: wake up on 4-way handshake (flag)
28783032 * @NL80211_WOWLAN_TRIG_RFKILL_RELEASE: wake up when rfkill is released
28793033 * (on devices that have rfkill in the device) (flag)
3034+ * @NL80211_WOWLAN_TRIG_WAKEUP_PKT_80211: For wakeup reporting only, contains
3035+ * the 802.11 packet that caused the wakeup, e.g. a deauth frame. The frame
3036+ * may be truncated, the @NL80211_WOWLAN_TRIG_WAKEUP_PKT_80211_LEN
3037+ * attribute contains the original length.
3038+ * @NL80211_WOWLAN_TRIG_WAKEUP_PKT_80211_LEN: Original length of the 802.11
3039+ * packet, may be bigger than the @NL80211_WOWLAN_TRIG_WAKEUP_PKT_80211
3040+ * attribute if the packet was truncated somewhere.
3041+ * @NL80211_WOWLAN_TRIG_WAKEUP_PKT_8023: For wakeup reporting only, contains the
3042+ * 802.11 packet that caused the wakeup, e.g. a magic packet. The frame may
3043+ * be truncated, the @NL80211_WOWLAN_TRIG_WAKEUP_PKT_8023_LEN attribute
3044+ * contains the original length.
3045+ * @NL80211_WOWLAN_TRIG_WAKEUP_PKT_8023_LEN: Original length of the 802.3
3046+ * packet, may be bigger than the @NL80211_WOWLAN_TRIG_WAKEUP_PKT_8023
3047+ * attribute if the packet was truncated somewhere.
3048+ * @NL80211_WOWLAN_TRIG_TCP_CONNECTION: TCP connection wake, see DOC section
3049+ * "TCP connection wakeup" for more details. This is a nested attribute
3050+ * containing the exact information for establishing and keeping alive
3051+ * the TCP connection.
3052+ * @NL80211_WOWLAN_TRIG_TCP_WAKEUP_MATCH: For wakeup reporting only, the
3053+ * wakeup packet was received on the TCP connection
3054+ * @NL80211_WOWLAN_TRIG_WAKEUP_TCP_CONNLOST: For wakeup reporting only, the
3055+ * TCP connection was lost or failed to be established
3056+ * @NL80211_WOWLAN_TRIG_WAKEUP_TCP_NOMORETOKENS: For wakeup reporting only,
3057+ * the TCP connection ran out of tokens to use for data to send to the
3058+ * service
28803059 * @NUM_NL80211_WOWLAN_TRIG: number of wake on wireless triggers
28813060 * @MAX_NL80211_WOWLAN_TRIG: highest wowlan trigger attribute number
3061+ *
3062+ * These nested attributes are used to configure the wakeup triggers and
3063+ * to report the wakeup reason(s).
28823064 */
28833065 enum nl80211_wowlan_triggers {
28843066 __NL80211_WOWLAN_TRIG_INVALID,
@@ -2891,12 +3073,130 @@ enum nl80211_wowlan_triggers { · 6 unmodified lines
28913073 NL80211_WOWLAN_TRIG_EAP_IDENT_REQUEST,
28923074 NL80211_WOWLAN_TRIG_4WAY_HANDSHAKE,
28933075 NL80211_WOWLAN_TRIG_RFKILL_RELEASE,
3076+ NL80211_WOWLAN_TRIG_WAKEUP_PKT_80211,
3077+ NL80211_WOWLAN_TRIG_WAKEUP_PKT_80211_LEN,
3078+ NL80211_WOWLAN_TRIG_WAKEUP_PKT_8023,
3079+ NL80211_WOWLAN_TRIG_WAKEUP_PKT_8023_LEN,
3080+ NL80211_WOWLAN_TRIG_TCP_CONNECTION,
3081+ NL80211_WOWLAN_TRIG_WAKEUP_TCP_MATCH,
3082+ NL80211_WOWLAN_TRIG_WAKEUP_TCP_CONNLOST,
3083+ NL80211_WOWLAN_TRIG_WAKEUP_TCP_NOMORETOKENS,
28943084
28953085 /* keep last */
28963086 NUM_NL80211_WOWLAN_TRIG,
28973087 MAX_NL80211_WOWLAN_TRIG = NUM_NL80211_WOWLAN_TRIG - 1
28983088 };
28993089
3090+/**
3091+ * DOC: TCP connection wakeup
3092+ *
3093+ * Some devices can establish a TCP connection in order to be woken up by a
3094+ * packet coming in from outside their network segment, or behind NAT. If
3095+ * configured, the device will establish a TCP connection to the given
3096+ * service, and periodically send data to that service. The first data
3097+ * packet is usually transmitted after SYN/ACK, also ACKing the SYN/ACK.
3098+ * The data packets can optionally include a (little endian) sequence
3099+ * number (in the TCP payload!) that is generated by the device, and, also
3100+ * optionally, a token from a list of tokens. This serves as a keep-alive
3101+ * with the service, and for NATed connections, etc.
3102+ *
3103+ * During this keep-alive period, the server doesn't send any data to the
3104+ * client. When receiving data, it is compared against the wakeup pattern
3105+ * (and mask) and if it matches, the host is woken up. Similarly, if the
3106+ * connection breaks or cannot be established to start with, the host is
3107+ * also woken up.
3108+ *
3109+ * Developer's note: ARP offload is required for this, otherwise TCP
3110+ * response packets might not go through correctly.
3111+ */
3112+
3113+/**
3114+ * struct nl80211_wowlan_tcp_data_seq - WoWLAN TCP data sequence
3115+ * @start: starting value
3116+ * @offset: offset of sequence number in packet
3117+ * @len: length of the sequence value to write, 1 through 4
3118+ *
3119+ * Note: don't confuse with the TCP sequence number(s), this is for the
3120+ * keepalive packet payload. The actual value is written into the packet
3121+ * in little endian.
3122+ */
3123+struct nl80211_wowlan_tcp_data_seq {
3124+ __u32 start, offset, len;
3125+};
3126+
3127+/**
3128+ * struct nl80211_wowlan_tcp_data_token - WoWLAN TCP data token config
3129+ * @offset: offset of token in packet
3130+ * @len: length of each token
3131+ * @token_stream: stream of data to be used for the tokens, the length must
3132+ * be a multiple of @len for this to make sense
3133+ */
3134+struct nl80211_wowlan_tcp_data_token {
3135+ __u32 offset, len;
3136+ __u8 token_stream[];
3137+};
3138+
3139+/**
3140+ * struct nl80211_wowlan_tcp_data_token_feature - data token features
3141+ * @min_len: minimum token length
3142+ * @max_len: maximum token length
3143+ * @bufsize: total available token buffer size (max size of @token_stream)
3144+ */
3145+struct nl80211_wowlan_tcp_data_token_feature {
3146+ __u32 min_len, max_len, bufsize;
3147+};
3148+
3149+/**
3150+ * enum nl80211_wowlan_tcp_attrs - WoWLAN TCP connection parameters
3151+ * @__NL80211_WOWLAN_TCP_INVALID: invalid number for nested attributes
3152+ * @NL80211_WOWLAN_TCP_SRC_IPV4: source IPv4 address (in network byte order)
3153+ * @NL80211_WOWLAN_TCP_DST_IPV4: destination IPv4 address
3154+ * (in network byte order)
3155+ * @NL80211_WOWLAN_TCP_DST_MAC: destination MAC address, this is given because
3156+ * route lookup when configured might be invalid by the time we suspend,
3157+ * and doing a route lookup when suspending is no longer possible as it
3158+ * might require ARP querying.
3159+ * @NL80211_WOWLAN_TCP_SRC_PORT: source port (u16); optional, if not given a
3160+ * socket and port will be allocated
3161+ * @NL80211_WOWLAN_TCP_DST_PORT: destination port (u16)
3162+ * @NL80211_WOWLAN_TCP_DATA_PAYLOAD: data packet payload, at least one byte.
3163+ * For feature advertising, a u32 attribute holding the maximum length
3164+ * of the data payload.
3165+ * @NL80211_WOWLAN_TCP_DATA_PAYLOAD_SEQ: data packet sequence configuration
3166+ * (if desired), a &struct nl80211_wowlan_tcp_data_seq. For feature
3167+ * advertising it is just a flag
3168+ * @NL80211_WOWLAN_TCP_DATA_PAYLOAD_TOKEN: data packet token configuration,
3169+ * see &struct nl80211_wowlan_tcp_data_token and for advertising see
3170+ * &struct nl80211_wowlan_tcp_data_token_feature.
3171+ * @NL80211_WOWLAN_TCP_DATA_INTERVAL: data interval in seconds, maximum
3172+ * interval in feature advertising (u32)
3173+ * @NL80211_WOWLAN_TCP_WAKE_PAYLOAD: wake packet payload, for advertising a
3174+ * u32 attribute holding the maximum length
3175+ * @NL80211_WOWLAN_TCP_WAKE_MASK: Wake packet payload mask, not used for
3176+ * feature advertising. The mask works like @NL80211_WOWLAN_PKTPAT_MASK
3177+ * but on the TCP payload only.
3178+ * @NUM_NL80211_WOWLAN_TCP: number of TCP attributes
3179+ * @MAX_NL80211_WOWLAN_TCP: highest attribute number
3180+ */
3181+enum nl80211_wowlan_tcp_attrs {
3182+ __NL80211_WOWLAN_TCP_INVALID,
3183+ NL80211_WOWLAN_TCP_SRC_IPV4,
3184+ NL80211_WOWLAN_TCP_DST_IPV4,
3185+ NL80211_WOWLAN_TCP_DST_MAC,
3186+ NL80211_WOWLAN_TCP_SRC_PORT,
3187+ NL80211_WOWLAN_TCP_DST_PORT,
3188+ NL80211_WOWLAN_TCP_DATA_PAYLOAD,
3189+ NL80211_WOWLAN_TCP_DATA_PAYLOAD_SEQ,
3190+ NL80211_WOWLAN_TCP_DATA_PAYLOAD_TOKEN,
3191+ NL80211_WOWLAN_TCP_DATA_INTERVAL,
3192+ NL80211_WOWLAN_TCP_WAKE_PAYLOAD,
3193+ NL80211_WOWLAN_TCP_WAKE_MASK,
3194+
3195+ /* keep last */
3196+ NUM_NL80211_WOWLAN_TCP,
3197+ MAX_NL80211_WOWLAN_TCP = NUM_NL80211_WOWLAN_TCP - 1
3198+};
3199+
29003200 /**
29013201 * enum nl80211_iface_limit_attrs - limit attributes
29023202 * @NL80211_IFACE_LIMIT_UNSPEC: (reserved)
@@ -2933,6 +3233,8 @@ enum nl80211_iface_limit_attrs { · 30 unmodified lines
29333233 * the infrastructure network's beacon interval.
29343234 * @NL80211_IFACE_COMB_NUM_CHANNELS: u32 attribute specifying how many
29353235 * different channels may be used within this group.
3236+ * @NL80211_IFACE_COMB_RADAR_DETECT_WIDTHS: u32 attribute containing the bitmap
3237+ * of supported channel widths for radar detection.
29363238 * @NUM_NL80211_IFACE_COMB: number of attributes
29373239 * @MAX_NL80211_IFACE_COMB: highest attribute number
29383240 *
@@ -2965,6 +3267,7 @@ enum nl80211_if_combination_attrs { · 26 unmodified lines
29653267 NL80211_IFACE_COMB_MAXNUM,
29663268 NL80211_IFACE_COMB_STA_AP_BI_MATCH,
29673269 NL80211_IFACE_COMB_NUM_CHANNELS,
3270+ NL80211_IFACE_COMB_RADAR_DETECT_WIDTHS,
29683271
29693272 /* keep last */
29703273 NUM_NL80211_IFACE_COMB,
@@ -3140,6 +3443,19 @@ enum nl80211_ap_sme_features { · 169 unmodified lines
31403443 * setting
31413444 * @NL80211_FEATURE_P2P_GO_OPPPS: P2P GO implementation supports opportunistic
31423445 * powersave
3446+ * @NL80211_FEATURE_FULL_AP_CLIENT_STATE: The driver supports full state
3447+ * transitions for AP clients. Without this flag (and if the driver
3448+ * doesn't have the AP SME in the device) the driver supports adding
3449+ * stations only when they're associated and adds them in associated
3450+ * state (to later be transitioned into authorized), with this flag
3451+ * they should be added before even sending the authentication reply
3452+ * and then transitioned into authenticated, associated and authorized
3453+ * states using station flags.
3454+ * Note that even for drivers that support this, the default is to add
3455+ * stations in authenticated/associated state, so to add unauthenticated
3456+ * stations the authenticated/associated bits have to be set in the mask.
3457+ * @NL80211_FEATURE_ADVERTISE_CHAN_LIMITS: cfg80211 advertises channel limits
3458+ * (HT40, VHT 80/160 MHz) if this flag is set
31433459 */
31443460 enum nl80211_feature_flags {
31453461 NL80211_FEATURE_SK_TX_STATUS = 1 << 0,
@@ -3155,6 +3471,9 @@ enum nl80211_feature_flags { · 9 unmodified lines
31553471 NL80211_FEATURE_NEED_OBSS_SCAN = 1 << 10,
31563472 NL80211_FEATURE_P2P_GO_CTWIN = 1 << 11,
31573473 NL80211_FEATURE_P2P_GO_OPPPS = 1 << 12,
3474+ /* bit 13 is reserved */
3475+ NL80211_FEATURE_ADVERTISE_CHAN_LIMITS = 1 << 14,
3476+ NL80211_FEATURE_FULL_AP_CLIENT_STATE = 1 << 15,
31583477 };
31593478
31603479 /**
@@ -3182,7 +3501,7 @@ enum nl80211_probe_resp_offload_support_attr { · 21 unmodified lines
31823501 * enum nl80211_connect_failed_reason - connection request failed reasons
31833502 * @NL80211_CONN_FAIL_MAX_CLIENTS: Maximum number of clients that can be
31843503 * handled by the AP is reached.
3185− * @NL80211_CONN_FAIL_BLOCKED_CLIENT: Client's MAC is in the AP's blocklist.
3504+ * @NL80211_CONN_FAIL_BLOCKED_CLIENT: Connection request is rejected due to ACL.
31863505 */
31873506 enum nl80211_connect_failed_reason {
31883507 NL80211_CONN_FAIL_MAX_CLIENTS,
@@ -3210,4 +3529,62 @@ enum nl80211_scan_flags { · 21 unmodified lines
32103529 NL80211_SCAN_FLAG_AP = 1<<2,
32113530 };
32123531
3532+/**
3533+ * enum nl80211_acl_policy - access control policy
3534+ *
3535+ * Access control policy is applied on a MAC list set by
3536+ * %NL80211_CMD_START_AP and %NL80211_CMD_SET_MAC_ACL, to
3537+ * be used with %NL80211_ATTR_ACL_POLICY.
3538+ *
3539+ * @NL80211_ACL_POLICY_ACCEPT_UNLESS_LISTED: Deny stations which are
3540+ * listed in ACL, i.e. allow all the stations which are not listed
3541+ * in ACL to authenticate.
3542+ * @NL80211_ACL_POLICY_DENY_UNLESS_LISTED: Allow the stations which are listed
3543+ * in ACL, i.e. deny all the stations which are not listed in ACL.
3544+ */
3545+enum nl80211_acl_policy {
3546+ NL80211_ACL_POLICY_ACCEPT_UNLESS_LISTED,
3547+ NL80211_ACL_POLICY_DENY_UNLESS_LISTED,
3548+};
3549+
3550+/**
3551+ * enum nl80211_radar_event - type of radar event for DFS operation
3552+ *
3553+ * Type of event to be used with NL80211_ATTR_RADAR_EVENT to inform userspace
3554+ * about detected radars or success of the channel available check (CAC)
3555+ *
3556+ * @NL80211_RADAR_DETECTED: A radar pattern has been detected. The channel is
3557+ * now unusable.
3558+ * @NL80211_RADAR_CAC_FINISHED: Channel Availability Check has been finished,
3559+ * the channel is now available.
3560+ * @NL80211_RADAR_CAC_ABORTED: Channel Availability Check has been aborted, no
3561+ * change to the channel status.
3562+ * @NL80211_RADAR_NOP_FINISHED: The Non-Occupancy Period for this channel is
3563+ * over, channel becomes usable.
3564+ */
3565+enum nl80211_radar_event {
3566+ NL80211_RADAR_DETECTED,
3567+ NL80211_RADAR_CAC_FINISHED,
3568+ NL80211_RADAR_CAC_ABORTED,
3569+ NL80211_RADAR_NOP_FINISHED,
3570+};
3571+
3572+/**
3573+ * enum nl80211_dfs_state - DFS states for channels
3574+ *
3575+ * Channel states used by the DFS code.
3576+ *
3577+ * @IEEE80211_DFS_USABLE: The channel can be used, but channel availability
3578+ * check (CAC) must be performed before using it for AP or IBSS.
3579+ * @IEEE80211_DFS_UNAVAILABLE: A radar has been detected on this channel, it
3580+ * is therefore marked as not available.
3581+ * @IEEE80211_DFS_AVAILABLE: The channel has been CAC checked and is available.
3582+ */
3583+
3584+enum nl80211_dfs_state {
3585+ NL80211_DFS_USABLE,
3586+ NL80211_DFS_UNAVAILABLE,
3587+ NL80211_DFS_AVAILABLE,
3588+};
3589+
32133590 #endif /* __LINUX_NL80211_H */
include/uapi/linux/rtnetlink.h+1−0
@@ -630,6 +630,7 @@ struct tcamsg { · 629 unmodified lines
630630
631631 /* New extended info filters for IFLA_EXT_MASK */
632632 #define RTEXT_FILTER_VF (1 << 0)
633+#define RTEXT_FILTER_BRVLAN (1 << 1)
633634
634635 /* End of information exported to user level */
635636
include/uapi/linux/snmp.h+1−0
@@ -278,6 +278,7 @@ enum · 277 unmodified lines
278278 LINUX_MIB_XFRMOUTPOLDEAD, /* XfrmOutPolDead */
279279 LINUX_MIB_XFRMOUTPOLERROR, /* XfrmOutPolError */
280280 LINUX_MIB_XFRMFWDHDRERROR, /* XfrmFwdHdrError*/
281+ LINUX_MIB_XFRMOUTSTATEINVALID, /* XfrmOutStateInvalid */
281282 __LINUX_MIB_XFRMMAX
282283 };
283284
include/uapi/linux/tcp.h+1−0
@@ -111,6 +111,7 @@ enum { · 110 unmodified lines
111111 #define TCP_QUEUE_SEQ 21
112112 #define TCP_REPAIR_OPTIONS 22
113113 #define TCP_FASTOPEN 23 /* Enable FastOpen on listeners */
114+#define TCP_TIMESTAMP 24
114115
115116 struct tcp_repair_opt {
116117 __u32 opt_code;
include/uapi/linux/virtio_net.h+7−1
@@ -53,6 +53,7 @@ · 52 unmodified lines
5353 * network */
5454 #define VIRTIO_NET_F_MQ 22 /* Device supports Receive Flow
5555 * Steering */
56+#define VIRTIO_NET_F_CTRL_MAC_ADDR 23 /* Set MAC address */
5657
5758 #define VIRTIO_NET_S_LINK_UP 1 /* Link is up */
5859 #define VIRTIO_NET_S_ANNOUNCE 2 /* Announcement is needed */
@@ -127,7 +128,7 @@ typedef __u8 virtio_net_ctrl_ack; · 68 unmodified lines
127128 #define VIRTIO_NET_CTRL_RX_NOBCAST 5
128129
129130 /*
130− * Control the MAC filter table.
131+ * Control the MAC
131132 *
132133 * The MAC filter table is managed by the hypervisor, the guest should
133134 * assume the size is infinite. Filtering should be considered
@@ -140,6 +141,10 @@ typedef __u8 virtio_net_ctrl_ack; · 6 unmodified lines
140141 * first sg list contains unicast addresses, the second is for multicast.
141142 * This functionality is present if the VIRTIO_NET_F_CTRL_RX feature
142143 * is available.
144+ *
145+ * The ADDR_SET command requests one out scatterlist, it contains a
146+ * 6 bytes MAC address. This functionality is present if the
147+ * VIRTIO_NET_F_CTRL_MAC_ADDR feature is available.
143148 */
144149 struct virtio_net_ctrl_mac {
145150 __u32 entries;
@@ -148,6 +153,7 @@ struct virtio_net_ctrl_mac { · 2 unmodified lines
148153
149154 #define VIRTIO_NET_CTRL_MAC 1
150155 #define VIRTIO_NET_CTRL_MAC_TABLE_SET 0
156+ #define VIRTIO_NET_CTRL_MAC_ADDR_SET 1
151157
152158 /*
153159 * Control VLAN filtering
include/uapi/linux/vm_sockets.h+163−0
@@ -0,0 +1,163 @@
1+/*
2+ * VMware vSockets Driver
3+ *
4+ * Copyright (C) 2007-2013 VMware, Inc. All rights reserved.
5+ *
6+ * This program is free software; you can redistribute it and/or modify it
7+ * under the terms of the GNU General Public License as published by the Free
8+ * Software Foundation version 2 and no later version.
9+ *
10+ * This program is distributed in the hope that it will be useful, but WITHOUT
11+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13+ * more details.
14+ */
15+
16+#ifndef _VM_SOCKETS_H_
17+#define _VM_SOCKETS_H_
18+
19+#if !defined(__KERNEL__)
20+#include <sys/socket.h>
21+#endif
22+
23+/* 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
25+ * specifies the size of the buffer underlying a vSockets STREAM socket.
26+ * Value is clamped to the MIN and MAX.
27+ */
28+
29+#define SO_VM_SOCKETS_BUFFER_SIZE 0
30+
31+/* Option name for STREAM socket minimum buffer size. Use as the option name
32+ * in setsockopt(3) or getsockopt(3) to set or get an unsigned long long that
33+ * specifies the minimum size allowed for the buffer underlying a vSockets
34+ * STREAM socket.
35+ */
36+
37+#define SO_VM_SOCKETS_BUFFER_MIN_SIZE 1
38+
39+/* Option name for STREAM socket maximum buffer size. Use as the option name
40+ * in setsockopt(3) or getsockopt(3) to set or get an unsigned long long
41+ * that specifies the maximum size allowed for the buffer underlying a
42+ * vSockets STREAM socket.
43+ */
44+
45+#define SO_VM_SOCKETS_BUFFER_MAX_SIZE 2
46+
47+/* Option name for socket peer's host-specific VM ID. Use as the option name
48+ * in getsockopt(3) to get a host-specific identifier for the peer endpoint's
49+ * VM. The identifier is a signed integer.
50+ * Only available for hypervisor endpoints.
51+ */
52+
53+#define SO_VM_SOCKETS_PEER_HOST_VM_ID 3
54+
55+/* Option name for determining if a socket is trusted. Use as the option name
56+ * in getsockopt(3) to determine if a socket is trusted. The value is a
57+ * signed integer.
58+ */
59+
60+#define SO_VM_SOCKETS_TRUSTED 5
61+
62+/* Option name for STREAM socket connection timeout. Use as the option name
63+ * in setsockopt(3) or getsockopt(3) to set or get the connection
64+ * timeout for a STREAM socket.
65+ */
66+
67+#define SO_VM_SOCKETS_CONNECT_TIMEOUT 6
68+
69+/* Option name for using non-blocking send/receive. Use as the option name
70+ * for setsockopt(3) or getsockopt(3) to set or get the non-blocking
71+ * transmit/receive flag for a STREAM socket. This flag determines whether
72+ * send() and recv() can be called in non-blocking contexts for the given
73+ * socket. The value is a signed integer.
74+ *
75+ * This option is only relevant to kernel endpoints, where descheduling the
76+ * thread of execution is not allowed, for example, while holding a spinlock.
77+ * It is not to be confused with conventional non-blocking socket operations.
78+ *
79+ * Only available for hypervisor endpoints.
80+ */
81+
82+#define SO_VM_SOCKETS_NONBLOCK_TXRX 7
83+
84+/* The vSocket equivalent of INADDR_ANY. This works for the svm_cid field of
85+ * sockaddr_vm and indicates the context ID of the current endpoint.
86+ */
87+
88+#define VMADDR_CID_ANY -1U
89+
90+/* Bind to any available port. Works for the svm_port field of
91+ * sockaddr_vm.
92+ */
93+
94+#define VMADDR_PORT_ANY -1U
95+
96+/* Use this as the destination CID in an address when referring to the
97+ * hypervisor. VMCI relies on it being 0, but this would be useful for other
98+ * transports too.
99+ */
100+
101+#define VMADDR_CID_HYPERVISOR 0
102+
103+/* This CID is specific to VMCI and can be considered reserved (even VMCI
104+ * doesn't use it anymore, it's a legacy value from an older release).
105+ */
106+
107+#define VMADDR_CID_RESERVED 1
108+
109+/* Use this as the destination CID in an address when referring to the host
110+ * (any process other than the hypervisor). VMCI relies on it being 2, but
111+ * this would be useful for other transports too.
112+ */
113+
114+#define VMADDR_CID_HOST 2
115+
116+/* Invalid vSockets version. */
117+
118+#define VM_SOCKETS_INVALID_VERSION -1U
119+
120+/* The epoch (first) component of the vSockets version. A single byte
121+ * representing the epoch component of the vSockets version.
122+ */
123+
124+#define VM_SOCKETS_VERSION_EPOCH(_v) (((_v) & 0xFF000000) >> 24)
125+
126+/* The major (second) component of the vSockets version. A single byte
127+ * representing the major component of the vSockets version. Typically
128+ * changes for every major release of a product.
129+ */
130+
131+#define VM_SOCKETS_VERSION_MAJOR(_v) (((_v) & 0x00FF0000) >> 16)
132+
133+/* The minor (third) component of the vSockets version. Two bytes representing
134+ * the minor component of the vSockets version.
135+ */
136+
137+#define VM_SOCKETS_VERSION_MINOR(_v) (((_v) & 0x0000FFFF))
138+
139+/* Address structure for vSockets. The address family should be set to
140+ * whatever vmci_sock_get_af_value_fd() returns. The structure members should
141+ * all align on their natural boundaries without resorting to compiler packing
142+ * directives. The total size of this structure should be exactly the same as
143+ * that of struct sockaddr.
144+ */
145+
146+struct sockaddr_vm {
147+ sa_family_t svm_family;
148+ unsigned short svm_reserved1;
149+ unsigned int svm_port;
150+ unsigned int svm_cid;
151+ unsigned char svm_zero[sizeof(struct sockaddr) -
152+ sizeof(sa_family_t) -
153+ sizeof(unsigned short) -
154+ sizeof(unsigned int) - sizeof(unsigned int)];
155+};
156+
157+#define IOCTL_VM_SOCKETS_GET_LOCAL_CID _IO(7, 0xb9)
158+
159+#if defined(__KERNEL__)
160+int vm_sockets_get_local_cid(void);
161+#endif
162+
163+#endif
include/uapi/linux/wanrouter.h+4−439
@@ -1,363 +1,9 @@
1−/*****************************************************************************
2−* wanrouter.h Definitions for the WAN Multiprotocol Router Module.
3−* This module provides API and common services for WAN Link
4−* Drivers and is completely hardware-independent.
5−*
6−* Author: Nenad Corbic <ncorbic@sangoma.com>
7−* Gideon Hack
8−* Additions: Arnaldo Melo
9−*
10−* Copyright: (c) 1995-2000 Sangoma Technologies Inc.
11−*
12−* This program is free software; you can redistribute it and/or
13−* modify it under the terms of the GNU General Public License
14−* as published by the Free Software Foundation; either version
15−* 2 of the License, or (at your option) any later version.
16−* ============================================================================
17−* Jul 21, 2000 Nenad Corbic Added WAN_FT1_READY State
18−* Feb 24, 2000 Nenad Corbic Added support for socket based x25api
19−* Jan 28, 2000 Nenad Corbic Added support for the ASYNC protocol.
20−* Oct 04, 1999 Nenad Corbic Updated for 2.1.0 release
21−* Jun 02, 1999 Gideon Hack Added support for the S514 adapter.
22−* May 23, 1999 Arnaldo Melo Added local_addr to wanif_conf_t
23−* WAN_DISCONNECTING state added
24−* Jul 20, 1998 David Fong Added Inverse ARP options to 'wanif_conf_t'
25−* Jun 12, 1998 David Fong Added Cisco HDLC support.
26−* Dec 16, 1997 Jaspreet Singh Moved 'enable_IPX' and 'network_number' to
27−* 'wanif_conf_t'
28−* Dec 05, 1997 Jaspreet Singh Added 'pap', 'chap' to 'wanif_conf_t'
29−* Added 'authenticator' to 'wan_ppp_conf_t'
30−* Nov 06, 1997 Jaspreet Singh Changed Router Driver version to 1.1 from 1.0
31−* Oct 20, 1997 Jaspreet Singh Added 'cir','bc','be' and 'mc' to 'wanif_conf_t'
32−* Added 'enable_IPX' and 'network_number' to
33−* 'wan_device_t'. Also added defines for
34−* UDP PACKET TYPE, Interrupt test, critical values
35−* for RACE conditions.
36−* Oct 05, 1997 Jaspreet Singh Added 'dlci_num' and 'dlci[100]' to
37−* 'wan_fr_conf_t' to configure a list of dlci(s)
38−* for a NODE
39−* Jul 07, 1997 Jaspreet Singh Added 'ttl' to 'wandev_conf_t' & 'wan_device_t'
40−* May 29, 1997 Jaspreet Singh Added 'tx_int_enabled' to 'wan_device_t'
41−* May 21, 1997 Jaspreet Singh Added 'udp_port' to 'wan_device_t'
42−* Apr 25, 1997 Farhan Thawar Added 'udp_port' to 'wandev_conf_t'
43−* Jan 16, 1997 Gene Kozin router_devlist made public
44−* Jan 02, 1997 Gene Kozin Initial version (based on wanpipe.h).
45−*****************************************************************************/
46−
47−#ifndef _UAPI_ROUTER_H
48−#define _UAPI_ROUTER_H
49−
50−#define ROUTER_NAME "wanrouter" /* in case we ever change it */
51−#define ROUTER_VERSION 1 /* version number */
52−#define ROUTER_RELEASE 1 /* release (minor version) number */
53−#define ROUTER_IOCTL 'W' /* for IOCTL calls */
54−#define ROUTER_MAGIC 0x524D4157L /* signature: 'WANR' reversed */
55−
56−/* IOCTL codes for /proc/router/<device> entries (up to 255) */
57−enum router_ioctls
58−{
59− ROUTER_SETUP = ROUTER_IOCTL<<8, /* configure device */
60− ROUTER_DOWN, /* shut down device */
61− ROUTER_STAT, /* get device status */
62− ROUTER_IFNEW, /* add interface */
63− ROUTER_IFDEL, /* delete interface */
64− ROUTER_IFSTAT, /* get interface status */
65− ROUTER_USER = (ROUTER_IOCTL<<8)+16, /* driver-specific calls */
66− ROUTER_USER_MAX = (ROUTER_IOCTL<<8)+31
67−};
68−
69−/* identifiers for displaying proc file data for dual port adapters */
70−#define PROC_DATA_PORT_0 0x8000 /* the data is for port 0 */
71−#define PROC_DATA_PORT_1 0x8001 /* the data is for port 1 */
72−
73−/* NLPID for packet encapsulation (ISO/IEC TR 9577) */
74−#define NLPID_IP 0xCC /* Internet Protocol Datagram */
75−#define NLPID_SNAP 0x80 /* IEEE Subnetwork Access Protocol */
76−#define NLPID_CLNP 0x81 /* ISO/IEC 8473 */
77−#define NLPID_ESIS 0x82 /* ISO/IEC 9542 */
78−#define NLPID_ISIS 0x83 /* ISO/IEC ISIS */
79−#define NLPID_Q933 0x08 /* CCITT Q.933 */
80−
81−/* Miscellaneous */
82−#define WAN_IFNAME_SZ 15 /* max length of the interface name */
83−#define WAN_DRVNAME_SZ 15 /* max length of the link driver name */
84−#define WAN_ADDRESS_SZ 31 /* max length of the WAN media address */
85−#define USED_BY_FIELD 8 /* max length of the used by field */
86−
87−/* Defines for UDP PACKET TYPE */
88−#define UDP_PTPIPE_TYPE 0x01
89−#define UDP_FPIPE_TYPE 0x02
90−#define UDP_CPIPE_TYPE 0x03
91−#define UDP_DRVSTATS_TYPE 0x04
92−#define UDP_INVALID_TYPE 0x05
93−
94−/* Command return code */
95−#define CMD_OK 0 /* normal firmware return code */
96−#define CMD_TIMEOUT 0xFF /* firmware command timed out */
97−
98−/* UDP Packet Management */
99−#define UDP_PKT_FRM_STACK 0x00
100−#define UDP_PKT_FRM_NETWORK 0x01
101−
102−/* Maximum interrupt test counter */
103−#define MAX_INTR_TEST_COUNTER 100
104−
105−/* Critical Values for RACE conditions*/
106−#define CRITICAL_IN_ISR 0xA1
107−#define CRITICAL_INTR_HANDLED 0xB1
108−
109−/****** Data Types **********************************************************/
110−
111−/*----------------------------------------------------------------------------
112− * X.25-specific link-level configuration.
113− */
114−typedef struct wan_x25_conf
115−{
116− unsigned lo_pvc; /* lowest permanent circuit number */
117− unsigned hi_pvc; /* highest permanent circuit number */
118− unsigned lo_svc; /* lowest switched circuit number */
119− unsigned hi_svc; /* highest switched circuit number */
120− unsigned hdlc_window; /* HDLC window size (1..7) */
121− unsigned pkt_window; /* X.25 packet window size (1..7) */
122− unsigned t1; /* HDLC timer T1, sec (1..30) */
123− unsigned t2; /* HDLC timer T2, sec (0..29) */
124− unsigned t4; /* HDLC supervisory frame timer = T4 * T1 */
125− unsigned n2; /* HDLC retransmission limit (1..30) */
126− unsigned t10_t20; /* X.25 RESTART timeout, sec (1..255) */
127− unsigned t11_t21; /* X.25 CALL timeout, sec (1..255) */
128− unsigned t12_t22; /* X.25 RESET timeout, sec (1..255) */
129− unsigned t13_t23; /* X.25 CLEAR timeout, sec (1..255) */
130− unsigned t16_t26; /* X.25 INTERRUPT timeout, sec (1..255) */
131− unsigned t28; /* X.25 REGISTRATION timeout, sec (1..255) */
132− unsigned r10_r20; /* RESTART retransmission limit (0..250) */
133− unsigned r12_r22; /* RESET retransmission limit (0..250) */
134− unsigned r13_r23; /* CLEAR retransmission limit (0..250) */
135− unsigned ccitt_compat; /* compatibility mode: 1988/1984/1980 */
136− unsigned x25_conf_opt; /* User defined x25 config optoins */
137− unsigned char LAPB_hdlc_only; /* Run in HDLC only mode */
138− unsigned char logging; /* Control connection logging */
139− unsigned char oob_on_modem; /* Whether to send modem status to the user app */
140−} wan_x25_conf_t;
141−
142−/*----------------------------------------------------------------------------
143− * Frame relay specific link-level configuration.
144− */
145−typedef struct wan_fr_conf
146−{
147− unsigned signalling; /* local in-channel signalling type */
148− unsigned t391; /* link integrity verification timer */
149− unsigned t392; /* polling verification timer */
150− unsigned n391; /* full status polling cycle counter */
151− unsigned n392; /* error threshold counter */
152− unsigned n393; /* monitored events counter */
153− unsigned dlci_num; /* number of DLCs (access node) */
154− unsigned dlci[100]; /* List of all DLCIs */
155−} wan_fr_conf_t;
156−
157−/*----------------------------------------------------------------------------
158− * PPP-specific link-level configuration.
159− */
160−typedef struct wan_ppp_conf
161−{
162− unsigned restart_tmr; /* restart timer */
163− unsigned auth_rsrt_tmr; /* authentication timer */
164− unsigned auth_wait_tmr; /* authentication timer */
165− unsigned mdm_fail_tmr; /* modem failure timer */
166− unsigned dtr_drop_tmr; /* DTR drop timer */
167− unsigned connect_tmout; /* connection timeout */
168− unsigned conf_retry; /* max. retry */
169− unsigned term_retry; /* max. retry */
170− unsigned fail_retry; /* max. retry */
171− unsigned auth_retry; /* max. retry */
172− unsigned auth_options; /* authentication opt. */
173− unsigned ip_options; /* IP options */
174− char authenticator; /* AUTHENTICATOR or not */
175− char ip_mode; /* Static/Host/Peer */
176−} wan_ppp_conf_t;
177−
178−/*----------------------------------------------------------------------------
179− * CHDLC-specific link-level configuration.
180− */
181−typedef struct wan_chdlc_conf
182−{
183− unsigned char ignore_dcd; /* Protocol options: */
184− unsigned char ignore_cts; /* Ignore these to determine */
185− unsigned char ignore_keepalive; /* link status (Yes or No) */
186− unsigned char hdlc_streaming; /* hdlc_streaming mode (Y/N) */
187− unsigned char receive_only; /* no transmit buffering (Y/N) */
188− unsigned keepalive_tx_tmr; /* transmit keepalive timer */
189− unsigned keepalive_rx_tmr; /* receive keepalive timer */
190− unsigned keepalive_err_margin; /* keepalive_error_tolerance */
191− unsigned slarp_timer; /* SLARP request timer */
192−} wan_chdlc_conf_t;
193−
194−
195−/*----------------------------------------------------------------------------
196− * WAN device configuration. Passed to ROUTER_SETUP IOCTL.
197− */
198−typedef struct wandev_conf
199−{
200− unsigned magic; /* magic number (for verification) */
201− unsigned config_id; /* configuration structure identifier */
202− /****** hardware configuration ******/
203− unsigned ioport; /* adapter I/O port base */
204− unsigned long maddr; /* dual-port memory address */
205− unsigned msize; /* dual-port memory size */
206− int irq; /* interrupt request level */
207− int dma; /* DMA request level */
208− char S514_CPU_no[1]; /* S514 PCI adapter CPU number ('A' or 'B') */
209− unsigned PCI_slot_no; /* S514 PCI adapter slot number */
210− char auto_pci_cfg; /* S515 PCI automatic slot detection */
211− char comm_port; /* Communication Port (PRI=0, SEC=1) */
212− unsigned bps; /* data transfer rate */
213− unsigned mtu; /* maximum transmit unit size */
214− unsigned udp_port; /* UDP port for management */
215− unsigned char ttl; /* Time To Live for UDP security */
216− unsigned char ft1; /* FT1 Configurator Option */
217− char interface; /* RS-232/V.35, etc. */
218− char clocking; /* external/internal */
219− char line_coding; /* NRZ/NRZI/FM0/FM1, etc. */
220− char station; /* DTE/DCE, primary/secondary, etc. */
221− char connection; /* permanent/switched/on-demand */
222− char read_mode; /* read mode: Polling or interrupt */
223− char receive_only; /* disable tx buffers */
224− char tty; /* Create a fake tty device */
225− unsigned tty_major; /* Major number for wanpipe tty device */
226− unsigned tty_minor; /* Minor number for wanpipe tty device */
227− unsigned tty_mode; /* TTY operation mode SYNC or ASYNC */
228− char backup; /* Backup Mode */
229− unsigned hw_opt[4]; /* other hardware options */
230− unsigned reserved[4];
231− /****** arbitrary data ***************/
232− unsigned data_size; /* data buffer size */
233− void* data; /* data buffer, e.g. firmware */
234− union /****** protocol-specific ************/
235− {
236− wan_x25_conf_t x25; /* X.25 configuration */
237− wan_ppp_conf_t ppp; /* PPP configuration */
238− wan_fr_conf_t fr; /* frame relay configuration */
239− wan_chdlc_conf_t chdlc; /* Cisco HDLC configuration */
240− } u;
241−} wandev_conf_t;
242−
243−/* 'config_id' definitions */
244−#define WANCONFIG_X25 101 /* X.25 link */
245−#define WANCONFIG_FR 102 /* frame relay link */
246−#define WANCONFIG_PPP 103 /* synchronous PPP link */
247−#define WANCONFIG_CHDLC 104 /* Cisco HDLC Link */
248−#define WANCONFIG_BSC 105 /* BiSync Streaming */
249−#define WANCONFIG_HDLC 106 /* HDLC Support */
250−#define WANCONFIG_MPPP 107 /* Multi Port PPP over RAW CHDLC */
251−
2521 /*
253− * Configuration options defines.
2+ * wanrouter.h Legacy declarations kept around until X25 is removed
2543 */
255−/* general options */
256−#define WANOPT_OFF 0
257−#define WANOPT_ON 1
258−#define WANOPT_NO 0
259−#define WANOPT_YES 1
260−
261−/* intercace options */
262−#define WANOPT_RS232 0
263−#define WANOPT_V35 1
264−
265−/* data encoding options */
266−#define WANOPT_NRZ 0
267−#define WANOPT_NRZI 1
268−#define WANOPT_FM0 2
269−#define WANOPT_FM1 3
270−
271−/* link type options */
272−#define WANOPT_POINTTOPOINT 0 /* RTS always active */
273−#define WANOPT_MULTIDROP 1 /* RTS is active when transmitting */
274−
275−/* clocking options */
276−#define WANOPT_EXTERNAL 0
277−#define WANOPT_INTERNAL 1
278−
279−/* station options */
280−#define WANOPT_DTE 0
281−#define WANOPT_DCE 1
282−#define WANOPT_CPE 0
283−#define WANOPT_NODE 1
284−#define WANOPT_SECONDARY 0
285−#define WANOPT_PRIMARY 1
286−
287−/* connection options */
288−#define WANOPT_PERMANENT 0 /* DTR always active */
289−#define WANOPT_SWITCHED 1 /* use DTR to setup link (dial-up) */
290−#define WANOPT_ONDEMAND 2 /* activate DTR only before sending */
291−
292−/* frame relay in-channel signalling */
293−#define WANOPT_FR_ANSI 1 /* ANSI T1.617 Annex D */
294−#define WANOPT_FR_Q933 2 /* ITU Q.933A */
295−#define WANOPT_FR_LMI 3 /* LMI */
296−
297−/* PPP IP Mode Options */
298−#define WANOPT_PPP_STATIC 0
299−#define WANOPT_PPP_HOST 1
300−#define WANOPT_PPP_PEER 2
301−
302−/* ASY Mode Options */
303−#define WANOPT_ONE 1
304−#define WANOPT_TWO 2
305−#define WANOPT_ONE_AND_HALF 3
306−
307−#define WANOPT_NONE 0
308−#define WANOPT_ODD 1
309−#define WANOPT_EVEN 2
310−
311−/* CHDLC Protocol Options */
312−/* DF Commented out for now.
313−
314−#define WANOPT_CHDLC_NO_DCD IGNORE_DCD_FOR_LINK_STAT
315−#define WANOPT_CHDLC_NO_CTS IGNORE_CTS_FOR_LINK_STAT
316−#define WANOPT_CHDLC_NO_KEEPALIVE IGNORE_KPALV_FOR_LINK_STAT
317−*/
318−
319−/* Port options */
320−#define WANOPT_PRI 0
321−#define WANOPT_SEC 1
322−/* read mode */
323−#define WANOPT_INTR 0
324−#define WANOPT_POLL 1
3254
326−
327−#define WANOPT_TTY_SYNC 0
328−#define WANOPT_TTY_ASYNC 1
329−/*----------------------------------------------------------------------------
330− * WAN Link Status Info (for ROUTER_STAT IOCTL).
331− */
332−typedef struct wandev_stat
333−{
334− unsigned state; /* link state */
335− unsigned ndev; /* number of configured interfaces */
336−
337− /* link/interface configuration */
338− unsigned connection; /* permanent/switched/on-demand */
339− unsigned media_type; /* Frame relay/PPP/X.25/SDLC, etc. */
340− unsigned mtu; /* max. transmit unit for this device */
341−
342− /* physical level statistics */
343− unsigned modem_status; /* modem status */
344− unsigned rx_frames; /* received frames count */
345− unsigned rx_overruns; /* receiver overrun error count */
346− unsigned rx_crc_err; /* receive CRC error count */
347− unsigned rx_aborts; /* received aborted frames count */
348− unsigned rx_bad_length; /* unexpetedly long/short frames count */
349− unsigned rx_dropped; /* frames discarded at device level */
350− unsigned tx_frames; /* transmitted frames count */
351− unsigned tx_underruns; /* aborted transmissions (underruns) count */
352− unsigned tx_timeouts; /* transmission timeouts */
353− unsigned tx_rejects; /* other transmit errors */
354−
355− /* media level statistics */
356− unsigned rx_bad_format; /* frames with invalid format */
357− unsigned rx_bad_addr; /* frames with invalid media address */
358− unsigned tx_retries; /* frames re-transmitted */
359− unsigned reserved[16]; /* reserved for future use */
360−} wandev_stat_t;
5+#ifndef _UAPI_ROUTER_H
6+#define _UAPI_ROUTER_H
3617
3628 /* 'state' defines */
3639 enum wan_states
@@ -365,88 +11,7 @@ enum wan_states · 1 unmodified line
36511 WAN_UNCONFIGURED, /* link/channel is not configured */
36612 WAN_DISCONNECTED, /* link/channel is disconnected */
36713 WAN_CONNECTING, /* connection is in progress */
368− WAN_CONNECTED, /* link/channel is operational */
369− WAN_LIMIT, /* for verification only */
370− WAN_DUALPORT, /* for Dual Port cards */
371− WAN_DISCONNECTING,
372− WAN_FT1_READY /* FT1 Configurator Ready */
14+ WAN_CONNECTED /* link/channel is operational */
37315 };
37416
375−enum {
376− WAN_LOCAL_IP,
377− WAN_POINTOPOINT_IP,
378− WAN_NETMASK_IP,
379− WAN_BROADCAST_IP
380−};
381−
382−/* 'modem_status' masks */
383−#define WAN_MODEM_CTS 0x0001 /* CTS line active */
384−#define WAN_MODEM_DCD 0x0002 /* DCD line active */
385−#define WAN_MODEM_DTR 0x0010 /* DTR line active */
386−#define WAN_MODEM_RTS 0x0020 /* RTS line active */
387−
388−/*----------------------------------------------------------------------------
389− * WAN interface (logical channel) configuration (for ROUTER_IFNEW IOCTL).
390− */
391−typedef struct wanif_conf
392−{
393− unsigned magic; /* magic number */
394− unsigned config_id; /* configuration identifier */
395− char name[WAN_IFNAME_SZ+1]; /* interface name, ASCIIZ */
396− char addr[WAN_ADDRESS_SZ+1]; /* media address, ASCIIZ */
397− char usedby[USED_BY_FIELD]; /* used by API or WANPIPE */
398− unsigned idle_timeout; /* sec, before disconnecting */
399− unsigned hold_timeout; /* sec, before re-connecting */
400− unsigned cir; /* Committed Information Rate fwd,bwd*/
401− unsigned bc; /* Committed Burst Size fwd, bwd */
402− unsigned be; /* Excess Burst Size fwd, bwd */
403− unsigned char enable_IPX; /* Enable or Disable IPX */
404− unsigned char inarp; /* Send Inverse ARP requests Y/N */
405− unsigned inarp_interval; /* sec, between InARP requests */
406− unsigned long network_number; /* Network Number for IPX */
407− char mc; /* Multicast on or off */
408− char local_addr[WAN_ADDRESS_SZ+1];/* local media address, ASCIIZ */
409− unsigned char port; /* board port */
410− unsigned char protocol; /* prococol used in this channel (TCPOX25 or X25) */
411− char pap; /* PAP enabled or disabled */
412− char chap; /* CHAP enabled or disabled */
413− unsigned char userid[511]; /* List of User Id */
414− unsigned char passwd[511]; /* List of passwords */
415− unsigned char sysname[31]; /* Name of the system */
416− unsigned char ignore_dcd; /* Protocol options: */
417− unsigned char ignore_cts; /* Ignore these to determine */
418− unsigned char ignore_keepalive; /* link status (Yes or No) */
419− unsigned char hdlc_streaming; /* Hdlc streaming mode (Y/N) */
420− unsigned keepalive_tx_tmr; /* transmit keepalive timer */
421− unsigned keepalive_rx_tmr; /* receive keepalive timer */
422− unsigned keepalive_err_margin; /* keepalive_error_tolerance */
423− unsigned slarp_timer; /* SLARP request timer */
424− unsigned char ttl; /* Time To Live for UDP security */
425− char interface; /* RS-232/V.35, etc. */
426− char clocking; /* external/internal */
427− unsigned bps; /* data transfer rate */
428− unsigned mtu; /* maximum transmit unit size */
429− unsigned char if_down; /* brind down interface when disconnected */
430− unsigned char gateway; /* Is this interface a gateway */
431− unsigned char true_if_encoding; /* Set the dev->type to true board protocol */
432−
433− unsigned char asy_data_trans; /* async API options */
434− unsigned char rts_hs_for_receive; /* async Protocol options */
435− unsigned char xon_xoff_hs_for_receive;
436− unsigned char xon_xoff_hs_for_transmit;
437− unsigned char dcd_hs_for_transmit;
438− unsigned char cts_hs_for_transmit;
439− unsigned char async_mode;
440− unsigned tx_bits_per_char;
441− unsigned rx_bits_per_char;
442− unsigned stop_bits;
443− unsigned char parity;
444− unsigned break_timer;
445− unsigned inter_char_timer;
446− unsigned rx_complete_length;
447− unsigned xon_char;
448− unsigned xoff_char;
449− unsigned char receive_only; /* no transmit buffering (Y/N) */
450−} wanif_conf_t;
451−
45217 #endif /* _UAPI_ROUTER_H */