diff options
Diffstat (limited to 'include/uapi')
26 files changed, 659 insertions, 481 deletions
diff --git a/include/uapi/asm-generic/socket.h b/include/uapi/asm-generic/socket.h index 2d32d073a6f9..4ef3acbba5da 100644 --- a/include/uapi/asm-generic/socket.h +++ b/include/uapi/asm-generic/socket.h | |||
@@ -22,8 +22,7 @@ | |||
22 | #define SO_PRIORITY 12 | 22 | #define SO_PRIORITY 12 |
23 | #define SO_LINGER 13 | 23 | #define SO_LINGER 13 |
24 | #define SO_BSDCOMPAT 14 | 24 | #define SO_BSDCOMPAT 14 |
25 | /* To add :#define SO_REUSEPORT 15 */ | 25 | #define SO_REUSEPORT 15 |
26 | |||
27 | #ifndef SO_PASSCRED /* powerpc only differs in these */ | 26 | #ifndef SO_PASSCRED /* powerpc only differs in these */ |
28 | #define SO_PASSCRED 16 | 27 | #define SO_PASSCRED 16 |
29 | #define SO_PEERCRED 17 | 28 | #define SO_PEERCRED 17 |
@@ -73,4 +72,6 @@ | |||
73 | /* Instruct lower device to use last 4-bytes of skb data as FCS */ | 72 | /* Instruct lower device to use last 4-bytes of skb data as FCS */ |
74 | #define SO_NOFCS 43 | 73 | #define SO_NOFCS 43 |
75 | 74 | ||
75 | #define SO_LOCK_FILTER 44 | ||
76 | |||
76 | #endif /* __ASM_GENERIC_SOCKET_H */ | 77 | #endif /* __ASM_GENERIC_SOCKET_H */ |
diff --git a/include/uapi/linux/can/gw.h b/include/uapi/linux/can/gw.h index 8e1db18c3cb6..ae07bec74f4b 100644 --- a/include/uapi/linux/can/gw.h +++ b/include/uapi/linux/can/gw.h | |||
@@ -44,6 +44,7 @@ enum { | |||
44 | CGW_SRC_IF, /* ifindex of source network interface */ | 44 | CGW_SRC_IF, /* ifindex of source network interface */ |
45 | CGW_DST_IF, /* ifindex of destination network interface */ | 45 | CGW_DST_IF, /* ifindex of destination network interface */ |
46 | CGW_FILTER, /* specify struct can_filter on source CAN device */ | 46 | CGW_FILTER, /* specify struct can_filter on source CAN device */ |
47 | CGW_DELETED, /* number of deleted CAN frames (see max_hops param) */ | ||
47 | __CGW_MAX | 48 | __CGW_MAX |
48 | }; | 49 | }; |
49 | 50 | ||
@@ -51,6 +52,7 @@ enum { | |||
51 | 52 | ||
52 | #define CGW_FLAGS_CAN_ECHO 0x01 | 53 | #define CGW_FLAGS_CAN_ECHO 0x01 |
53 | #define CGW_FLAGS_CAN_SRC_TSTAMP 0x02 | 54 | #define CGW_FLAGS_CAN_SRC_TSTAMP 0x02 |
55 | #define CGW_FLAGS_CAN_IIF_TX_OK 0x04 | ||
54 | 56 | ||
55 | #define CGW_MOD_FUNCS 4 /* AND OR XOR SET */ | 57 | #define CGW_MOD_FUNCS 4 /* AND OR XOR SET */ |
56 | 58 | ||
diff --git a/include/uapi/linux/if_bridge.h b/include/uapi/linux/if_bridge.h index 5db297514aec..2d70d79ce2fd 100644 --- a/include/uapi/linux/if_bridge.h +++ b/include/uapi/linux/if_bridge.h | |||
@@ -108,15 +108,26 @@ struct __fdb_entry { | |||
108 | * [IFLA_AF_SPEC] = { | 108 | * [IFLA_AF_SPEC] = { |
109 | * [IFLA_BRIDGE_FLAGS] | 109 | * [IFLA_BRIDGE_FLAGS] |
110 | * [IFLA_BRIDGE_MODE] | 110 | * [IFLA_BRIDGE_MODE] |
111 | * [IFLA_BRIDGE_VLAN_INFO] | ||
111 | * } | 112 | * } |
112 | */ | 113 | */ |
113 | enum { | 114 | enum { |
114 | IFLA_BRIDGE_FLAGS, | 115 | IFLA_BRIDGE_FLAGS, |
115 | IFLA_BRIDGE_MODE, | 116 | IFLA_BRIDGE_MODE, |
117 | IFLA_BRIDGE_VLAN_INFO, | ||
116 | __IFLA_BRIDGE_MAX, | 118 | __IFLA_BRIDGE_MAX, |
117 | }; | 119 | }; |
118 | #define IFLA_BRIDGE_MAX (__IFLA_BRIDGE_MAX - 1) | 120 | #define IFLA_BRIDGE_MAX (__IFLA_BRIDGE_MAX - 1) |
119 | 121 | ||
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 | |||
120 | /* Bridge multicast database attributes | 131 | /* Bridge multicast database attributes |
121 | * [MDBA_MDB] = { | 132 | * [MDBA_MDB] = { |
122 | * [MDBA_MDB_ENTRY] = { | 133 | * [MDBA_MDB_ENTRY] = { |
diff --git a/include/uapi/linux/if_ether.h b/include/uapi/linux/if_ether.h index 67fb87ca1094..798032d01112 100644 --- a/include/uapi/linux/if_ether.h +++ b/include/uapi/linux/if_ether.h | |||
@@ -83,6 +83,7 @@ | |||
83 | #define ETH_P_802_EX1 0x88B5 /* 802.1 Local Experimental 1. */ | 83 | #define ETH_P_802_EX1 0x88B5 /* 802.1 Local Experimental 1. */ |
84 | #define ETH_P_TIPC 0x88CA /* TIPC */ | 84 | #define ETH_P_TIPC 0x88CA /* TIPC */ |
85 | #define ETH_P_8021AH 0x88E7 /* 802.1ah Backbone Service Tag */ | 85 | #define ETH_P_8021AH 0x88E7 /* 802.1ah Backbone Service Tag */ |
86 | #define ETH_P_MVRP 0x88F5 /* 802.1Q MVRP */ | ||
86 | #define ETH_P_1588 0x88F7 /* IEEE 1588 Timesync */ | 87 | #define ETH_P_1588 0x88F7 /* IEEE 1588 Timesync */ |
87 | #define ETH_P_FCOE 0x8906 /* Fibre Channel over Ethernet */ | 88 | #define ETH_P_FCOE 0x8906 /* Fibre Channel over Ethernet */ |
88 | #define ETH_P_TDLS 0x890D /* TDLS */ | 89 | #define ETH_P_TDLS 0x890D /* TDLS */ |
diff --git a/include/uapi/linux/if_link.h b/include/uapi/linux/if_link.h index 60f3b6b90602..c4edfe11f1f7 100644 --- a/include/uapi/linux/if_link.h +++ b/include/uapi/linux/if_link.h | |||
@@ -142,6 +142,7 @@ enum { | |||
142 | #define IFLA_PROMISCUITY IFLA_PROMISCUITY | 142 | #define IFLA_PROMISCUITY IFLA_PROMISCUITY |
143 | IFLA_NUM_TX_QUEUES, | 143 | IFLA_NUM_TX_QUEUES, |
144 | IFLA_NUM_RX_QUEUES, | 144 | IFLA_NUM_RX_QUEUES, |
145 | IFLA_CARRIER, | ||
145 | __IFLA_MAX | 146 | __IFLA_MAX |
146 | }; | 147 | }; |
147 | 148 | ||
diff --git a/include/uapi/linux/if_vlan.h b/include/uapi/linux/if_vlan.h index 0744f8e65d15..7e5e6b397332 100644 --- a/include/uapi/linux/if_vlan.h +++ b/include/uapi/linux/if_vlan.h | |||
@@ -34,6 +34,7 @@ enum vlan_flags { | |||
34 | VLAN_FLAG_REORDER_HDR = 0x1, | 34 | VLAN_FLAG_REORDER_HDR = 0x1, |
35 | VLAN_FLAG_GVRP = 0x2, | 35 | VLAN_FLAG_GVRP = 0x2, |
36 | VLAN_FLAG_LOOSE_BINDING = 0x4, | 36 | VLAN_FLAG_LOOSE_BINDING = 0x4, |
37 | VLAN_FLAG_MVRP = 0x8, | ||
37 | }; | 38 | }; |
38 | 39 | ||
39 | enum vlan_name_types { | 40 | enum vlan_name_types { |
diff --git a/include/uapi/linux/in6.h b/include/uapi/linux/in6.h index f79c3721da6e..53b1d56a6e7f 100644 --- a/include/uapi/linux/in6.h +++ b/include/uapi/linux/in6.h | |||
@@ -38,11 +38,6 @@ struct in6_addr { | |||
38 | #define s6_addr32 in6_u.u6_addr32 | 38 | #define s6_addr32 in6_u.u6_addr32 |
39 | }; | 39 | }; |
40 | 40 | ||
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 | |||
46 | struct sockaddr_in6 { | 41 | struct sockaddr_in6 { |
47 | unsigned short int sin6_family; /* AF_INET6 */ | 42 | unsigned short int sin6_family; /* AF_INET6 */ |
48 | __be16 sin6_port; /* Transport layer port # */ | 43 | __be16 sin6_port; /* Transport layer port # */ |
@@ -264,17 +259,10 @@ struct in6_flowlabel_req { | |||
264 | 259 | ||
265 | /* | 260 | /* |
266 | * Multicast Routing: | 261 | * Multicast Routing: |
267 | * see include/linux/mroute6.h. | 262 | * see include/uapi/linux/mroute6.h. |
268 | * | 263 | * |
269 | * MRT6_INIT 200 | 264 | * MRT6_BASE 200 |
270 | * MRT6_DONE 201 | 265 | * ... |
271 | * MRT6_ADD_MIF 202 | 266 | * MRT6_MAX |
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 | ||
279 | */ | 267 | */ |
280 | #endif /* _UAPI_LINUX_IN6_H */ | 268 | #endif /* _UAPI_LINUX_IN6_H */ |
diff --git a/include/uapi/linux/ipv6.h b/include/uapi/linux/ipv6.h index 5a2991cf0251..4bda4cf5b0f5 100644 --- a/include/uapi/linux/ipv6.h +++ b/include/uapi/linux/ipv6.h | |||
@@ -63,6 +63,8 @@ struct ipv6_opt_hdr { | |||
63 | #define ipv6_destopt_hdr ipv6_opt_hdr | 63 | #define ipv6_destopt_hdr ipv6_opt_hdr |
64 | #define ipv6_hopopt_hdr ipv6_opt_hdr | 64 | #define ipv6_hopopt_hdr ipv6_opt_hdr |
65 | 65 | ||
66 | /* Router Alert option values (RFC2711) */ | ||
67 | #define IPV6_OPT_ROUTERALERT_MLD 0x0000 /* MLD(RFC2710) */ | ||
66 | 68 | ||
67 | /* | 69 | /* |
68 | * routing header type 0 (used in cmsghdr struct) | 70 | * routing header type 0 (used in cmsghdr struct) |
diff --git a/include/uapi/linux/mroute.h b/include/uapi/linux/mroute.h index 16929993acc4..a382d2c04a42 100644 --- a/include/uapi/linux/mroute.h +++ b/include/uapi/linux/mroute.h | |||
@@ -26,6 +26,9 @@ | |||
26 | #define MRT_ASSERT (MRT_BASE+7) /* Activate PIM assert mode */ | 26 | #define MRT_ASSERT (MRT_BASE+7) /* Activate PIM assert mode */ |
27 | #define MRT_PIM (MRT_BASE+8) /* enable PIM code */ | 27 | #define MRT_PIM (MRT_BASE+8) /* enable PIM code */ |
28 | #define MRT_TABLE (MRT_BASE+9) /* Specify mroute table ID */ | 28 | #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) | ||
29 | 32 | ||
30 | #define SIOCGETVIFCNT SIOCPROTOPRIVATE /* IP protocol privates */ | 33 | #define SIOCGETVIFCNT SIOCPROTOPRIVATE /* IP protocol privates */ |
31 | #define SIOCGETSGCNT (SIOCPROTOPRIVATE+1) | 34 | #define SIOCGETSGCNT (SIOCPROTOPRIVATE+1) |
diff --git a/include/uapi/linux/mroute6.h b/include/uapi/linux/mroute6.h index 3e89b5e7f9e3..ce91215cf7e6 100644 --- a/include/uapi/linux/mroute6.h +++ b/include/uapi/linux/mroute6.h | |||
@@ -26,6 +26,9 @@ | |||
26 | #define MRT6_ASSERT (MRT6_BASE+7) /* Activate PIM assert mode */ | 26 | #define MRT6_ASSERT (MRT6_BASE+7) /* Activate PIM assert mode */ |
27 | #define MRT6_PIM (MRT6_BASE+8) /* enable PIM code */ | 27 | #define MRT6_PIM (MRT6_BASE+8) /* enable PIM code */ |
28 | #define MRT6_TABLE (MRT6_BASE+9) /* Specify mroute table ID */ | 28 | #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) | ||
29 | 32 | ||
30 | #define SIOCGETMIFCNT_IN6 SIOCPROTOPRIVATE /* IP protocol privates */ | 33 | #define SIOCGETMIFCNT_IN6 SIOCPROTOPRIVATE /* IP protocol privates */ |
31 | #define SIOCGETSGCNT_IN6 (SIOCPROTOPRIVATE+1) | 34 | #define SIOCGETSGCNT_IN6 (SIOCPROTOPRIVATE+1) |
diff --git a/include/uapi/linux/neighbour.h b/include/uapi/linux/neighbour.h index 275e5d65dcb2..adb068c53c4e 100644 --- a/include/uapi/linux/neighbour.h +++ b/include/uapi/linux/neighbour.h | |||
@@ -20,6 +20,7 @@ enum { | |||
20 | NDA_LLADDR, | 20 | NDA_LLADDR, |
21 | NDA_CACHEINFO, | 21 | NDA_CACHEINFO, |
22 | NDA_PROBES, | 22 | NDA_PROBES, |
23 | NDA_VLAN, | ||
23 | __NDA_MAX | 24 | __NDA_MAX |
24 | }; | 25 | }; |
25 | 26 | ||
diff --git a/include/uapi/linux/netfilter/Kbuild b/include/uapi/linux/netfilter/Kbuild index 08f555fef13f..41115776d76f 100644 --- a/include/uapi/linux/netfilter/Kbuild +++ b/include/uapi/linux/netfilter/Kbuild | |||
@@ -35,9 +35,11 @@ header-y += xt_TCPOPTSTRIP.h | |||
35 | header-y += xt_TEE.h | 35 | header-y += xt_TEE.h |
36 | header-y += xt_TPROXY.h | 36 | header-y += xt_TPROXY.h |
37 | header-y += xt_addrtype.h | 37 | header-y += xt_addrtype.h |
38 | header-y += xt_bpf.h | ||
38 | header-y += xt_cluster.h | 39 | header-y += xt_cluster.h |
39 | header-y += xt_comment.h | 40 | header-y += xt_comment.h |
40 | header-y += xt_connbytes.h | 41 | header-y += xt_connbytes.h |
42 | header-y += xt_connlabel.h | ||
41 | header-y += xt_connlimit.h | 43 | header-y += xt_connlimit.h |
42 | header-y += xt_connmark.h | 44 | header-y += xt_connmark.h |
43 | header-y += xt_conntrack.h | 45 | header-y += xt_conntrack.h |
diff --git a/include/uapi/linux/netfilter/nf_conntrack_common.h b/include/uapi/linux/netfilter/nf_conntrack_common.h index 1644cdd8be91..d69483fb3825 100644 --- a/include/uapi/linux/netfilter/nf_conntrack_common.h +++ b/include/uapi/linux/netfilter/nf_conntrack_common.h | |||
@@ -101,6 +101,7 @@ enum ip_conntrack_events { | |||
101 | IPCT_MARK, /* new mark has been set */ | 101 | IPCT_MARK, /* new mark has been set */ |
102 | IPCT_NATSEQADJ, /* NAT is doing sequence adjustment */ | 102 | IPCT_NATSEQADJ, /* NAT is doing sequence adjustment */ |
103 | IPCT_SECMARK, /* new security mark has been set */ | 103 | IPCT_SECMARK, /* new security mark has been set */ |
104 | IPCT_LABEL, /* new connlabel has been set */ | ||
104 | }; | 105 | }; |
105 | 106 | ||
106 | enum ip_conntrack_expect_events { | 107 | enum ip_conntrack_expect_events { |
diff --git a/include/uapi/linux/netfilter/nfnetlink_conntrack.h b/include/uapi/linux/netfilter/nfnetlink_conntrack.h index 86e930cf3dfb..08fabc6c93f3 100644 --- a/include/uapi/linux/netfilter/nfnetlink_conntrack.h +++ b/include/uapi/linux/netfilter/nfnetlink_conntrack.h | |||
@@ -49,6 +49,8 @@ enum ctattr_type { | |||
49 | CTA_SECCTX, | 49 | CTA_SECCTX, |
50 | CTA_TIMESTAMP, | 50 | CTA_TIMESTAMP, |
51 | CTA_MARK_MASK, | 51 | CTA_MARK_MASK, |
52 | CTA_LABELS, | ||
53 | CTA_LABELS_MASK, | ||
52 | __CTA_MAX | 54 | __CTA_MAX |
53 | }; | 55 | }; |
54 | #define CTA_MAX (__CTA_MAX - 1) | 56 | #define CTA_MAX (__CTA_MAX - 1) |
diff --git a/include/uapi/linux/netfilter/xt_CT.h b/include/uapi/linux/netfilter/xt_CT.h index a064b8af360c..5a688c1ca4d7 100644 --- a/include/uapi/linux/netfilter/xt_CT.h +++ b/include/uapi/linux/netfilter/xt_CT.h | |||
@@ -3,7 +3,11 @@ | |||
3 | 3 | ||
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | 5 | ||
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 | }; | ||
7 | 11 | ||
8 | struct xt_ct_target_info { | 12 | struct xt_ct_target_info { |
9 | __u16 flags; | 13 | __u16 flags; |
diff --git a/include/uapi/linux/netfilter/xt_bpf.h b/include/uapi/linux/netfilter/xt_bpf.h new file mode 100644 index 000000000000..5dda450eb55b --- /dev/null +++ b/include/uapi/linux/netfilter/xt_bpf.h | |||
@@ -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 */ | ||
diff --git a/include/uapi/linux/netfilter/xt_connlabel.h b/include/uapi/linux/netfilter/xt_connlabel.h new file mode 100644 index 000000000000..c4bc9ee9b330 --- /dev/null +++ b/include/uapi/linux/netfilter/xt_connlabel.h | |||
@@ -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 | }; | ||
diff --git a/include/uapi/linux/netfilter/xt_conntrack.h b/include/uapi/linux/netfilter/xt_conntrack.h index e3c041d54020..e5bd3083a843 100644 --- a/include/uapi/linux/netfilter/xt_conntrack.h +++ b/include/uapi/linux/netfilter/xt_conntrack.h | |||
@@ -31,6 +31,7 @@ enum { | |||
31 | XT_CONNTRACK_REPLSRC_PORT = 1 << 10, | 31 | XT_CONNTRACK_REPLSRC_PORT = 1 << 10, |
32 | XT_CONNTRACK_REPLDST_PORT = 1 << 11, | 32 | XT_CONNTRACK_REPLDST_PORT = 1 << 11, |
33 | XT_CONNTRACK_DIRECTION = 1 << 12, | 33 | XT_CONNTRACK_DIRECTION = 1 << 12, |
34 | XT_CONNTRACK_STATE_ALIAS = 1 << 13, | ||
34 | }; | 35 | }; |
35 | 36 | ||
36 | struct xt_conntrack_mtinfo1 { | 37 | struct xt_conntrack_mtinfo1 { |
diff --git a/include/uapi/linux/nfc.h b/include/uapi/linux/nfc.h index 0e63cee8d810..7969f46f1bb3 100644 --- a/include/uapi/linux/nfc.h +++ b/include/uapi/linux/nfc.h | |||
@@ -5,20 +5,17 @@ | |||
5 | * Lauro Ramos Venancio <lauro.venancio@openbossa.org> | 5 | * Lauro Ramos Venancio <lauro.venancio@openbossa.org> |
6 | * Aloisio Almeida Jr <aloisio.almeida@openbossa.org> | 6 | * Aloisio Almeida Jr <aloisio.almeida@openbossa.org> |
7 | * | 7 | * |
8 | * This program is free software; you can redistribute it and/or modify | 8 | * Permission to use, copy, modify, and/or distribute this software for any |
9 | * it under the terms of the GNU General Public License as published by | 9 | * purpose with or without fee is hereby granted, provided that the above |
10 | * the Free Software Foundation; either version 2 of the License, or | 10 | * copyright notice and this permission notice appear in all copies. |
11 | * (at your option) any later version. | ||
12 | * | 11 | * |
13 | * This program is distributed in the hope that it will be useful, | 12 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR |
16 | * GNU General Public License for more details. | 15 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
17 | * | 16 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
18 | * You should have received a copy of the GNU General Public License | 17 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
19 | * along with this program; if not, write to the | 18 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
20 | * Free Software Foundation, Inc., | ||
21 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
22 | */ | 19 | */ |
23 | 20 | ||
24 | #ifndef __LINUX_NFC_H | 21 | #ifndef __LINUX_NFC_H |
@@ -67,6 +64,11 @@ | |||
67 | * subsequent CONNECT and CC messages. | 64 | * subsequent CONNECT and CC messages. |
68 | * If one of the passed parameters is wrong none is set and -EINVAL is | 65 | * If one of the passed parameters is wrong none is set and -EINVAL is |
69 | * returned. | 66 | * 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. | ||
70 | */ | 72 | */ |
71 | enum nfc_commands { | 73 | enum nfc_commands { |
72 | NFC_CMD_UNSPEC, | 74 | NFC_CMD_UNSPEC, |
@@ -86,6 +88,8 @@ enum nfc_commands { | |||
86 | NFC_EVENT_TM_DEACTIVATED, | 88 | NFC_EVENT_TM_DEACTIVATED, |
87 | NFC_CMD_LLC_GET_PARAMS, | 89 | NFC_CMD_LLC_GET_PARAMS, |
88 | NFC_CMD_LLC_SET_PARAMS, | 90 | NFC_CMD_LLC_SET_PARAMS, |
91 | NFC_CMD_ENABLE_SE, | ||
92 | NFC_CMD_DISABLE_SE, | ||
89 | /* private: internal use only */ | 93 | /* private: internal use only */ |
90 | __NFC_CMD_AFTER_LAST | 94 | __NFC_CMD_AFTER_LAST |
91 | }; | 95 | }; |
@@ -114,6 +118,7 @@ enum nfc_commands { | |||
114 | * @NFC_ATTR_LLC_PARAM_LTO: Link TimeOut parameter | 118 | * @NFC_ATTR_LLC_PARAM_LTO: Link TimeOut parameter |
115 | * @NFC_ATTR_LLC_PARAM_RW: Receive Window size parameter | 119 | * @NFC_ATTR_LLC_PARAM_RW: Receive Window size parameter |
116 | * @NFC_ATTR_LLC_PARAM_MIUX: MIU eXtension parameter | 120 | * @NFC_ATTR_LLC_PARAM_MIUX: MIU eXtension parameter |
121 | * @NFC_ATTR_SE: Available Secure Elements | ||
117 | */ | 122 | */ |
118 | enum nfc_attrs { | 123 | enum nfc_attrs { |
119 | NFC_ATTR_UNSPEC, | 124 | NFC_ATTR_UNSPEC, |
@@ -134,6 +139,7 @@ enum nfc_attrs { | |||
134 | NFC_ATTR_LLC_PARAM_LTO, | 139 | NFC_ATTR_LLC_PARAM_LTO, |
135 | NFC_ATTR_LLC_PARAM_RW, | 140 | NFC_ATTR_LLC_PARAM_RW, |
136 | NFC_ATTR_LLC_PARAM_MIUX, | 141 | NFC_ATTR_LLC_PARAM_MIUX, |
142 | NFC_ATTR_SE, | ||
137 | /* private: internal use only */ | 143 | /* private: internal use only */ |
138 | __NFC_ATTR_AFTER_LAST | 144 | __NFC_ATTR_AFTER_LAST |
139 | }; | 145 | }; |
@@ -172,6 +178,11 @@ enum nfc_attrs { | |||
172 | #define NFC_PROTO_NFC_DEP_MASK (1 << NFC_PROTO_NFC_DEP) | 178 | #define NFC_PROTO_NFC_DEP_MASK (1 << NFC_PROTO_NFC_DEP) |
173 | #define NFC_PROTO_ISO14443_B_MASK (1 << NFC_PROTO_ISO14443_B) | 179 | #define NFC_PROTO_ISO14443_B_MASK (1 << NFC_PROTO_ISO14443_B) |
174 | 180 | ||
181 | /* NFC Secure Elements */ | ||
182 | #define NFC_SE_NONE 0x0 | ||
183 | #define NFC_SE_UICC 0x1 | ||
184 | #define NFC_SE_EMBEDDED 0x2 | ||
185 | |||
175 | struct sockaddr_nfc { | 186 | struct sockaddr_nfc { |
176 | sa_family_t sa_family; | 187 | sa_family_t sa_family; |
177 | __u32 dev_idx; | 188 | __u32 dev_idx; |
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h index e3e19f8b16f2..c46bb016f4e4 100644 --- a/include/uapi/linux/nl80211.h +++ b/include/uapi/linux/nl80211.h | |||
@@ -170,7 +170,8 @@ | |||
170 | * %NL80211_ATTR_HIDDEN_SSID, %NL80211_ATTR_CIPHERS_PAIRWISE, | 170 | * %NL80211_ATTR_HIDDEN_SSID, %NL80211_ATTR_CIPHERS_PAIRWISE, |
171 | * %NL80211_ATTR_CIPHER_GROUP, %NL80211_ATTR_WPA_VERSIONS, | 171 | * %NL80211_ATTR_CIPHER_GROUP, %NL80211_ATTR_WPA_VERSIONS, |
172 | * %NL80211_ATTR_AKM_SUITES, %NL80211_ATTR_PRIVACY, | 172 | * %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. | ||
174 | * The channel to use can be set on the interface or be given using the | 175 | * The channel to use can be set on the interface or be given using the |
175 | * %NL80211_ATTR_WIPHY_FREQ and the attributes determining channel width. | 176 | * %NL80211_ATTR_WIPHY_FREQ and the attributes determining channel width. |
176 | * @NL80211_CMD_NEW_BEACON: old alias for %NL80211_CMD_START_AP | 177 | * @NL80211_CMD_NEW_BEACON: old alias for %NL80211_CMD_START_AP |
@@ -374,8 +375,8 @@ | |||
374 | * requests to connect to a specified network but without separating | 375 | * requests to connect to a specified network but without separating |
375 | * auth and assoc steps. For this, you need to specify the SSID in a | 376 | * auth and assoc steps. For this, you need to specify the SSID in a |
376 | * %NL80211_ATTR_SSID attribute, and can optionally specify the association | 377 | * %NL80211_ATTR_SSID attribute, and can optionally specify the association |
377 | * IEs in %NL80211_ATTR_IE, %NL80211_ATTR_AUTH_TYPE, %NL80211_ATTR_MAC, | 378 | * IEs in %NL80211_ATTR_IE, %NL80211_ATTR_AUTH_TYPE, %NL80211_ATTR_USE_MFP, |
378 | * %NL80211_ATTR_WIPHY_FREQ, %NL80211_ATTR_CONTROL_PORT, | 379 | * %NL80211_ATTR_MAC, %NL80211_ATTR_WIPHY_FREQ, %NL80211_ATTR_CONTROL_PORT, |
379 | * %NL80211_ATTR_CONTROL_PORT_ETHERTYPE and | 380 | * %NL80211_ATTR_CONTROL_PORT_ETHERTYPE and |
380 | * %NL80211_ATTR_CONTROL_PORT_NO_ENCRYPT. | 381 | * %NL80211_ATTR_CONTROL_PORT_NO_ENCRYPT. |
381 | * Background scan period can optionally be | 382 | * Background scan period can optionally be |
@@ -512,6 +513,12 @@ | |||
512 | * command with the %NL80211_ATTR_WOWLAN_TRIGGERS attribute. For | 513 | * command with the %NL80211_ATTR_WOWLAN_TRIGGERS attribute. For |
513 | * more background information, see | 514 | * more background information, see |
514 | * http://wireless.kernel.org/en/users/Documentation/WoWLAN. | 515 | * 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. | ||
515 | * | 522 | * |
516 | * @NL80211_CMD_SET_REKEY_OFFLOAD: This command is used give the driver | 523 | * @NL80211_CMD_SET_REKEY_OFFLOAD: This command is used give the driver |
517 | * the necessary information for supporting GTK rekey offload. This | 524 | * the necessary information for supporting GTK rekey offload. This |
@@ -586,6 +593,24 @@ | |||
586 | * @NL80211_CMD_SET_MCAST_RATE: Change the rate used to send multicast frames | 593 | * @NL80211_CMD_SET_MCAST_RATE: Change the rate used to send multicast frames |
587 | * for IBSS or MESH vif. | 594 | * for IBSS or MESH vif. |
588 | * | 595 | * |
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 | * | ||
589 | * @NL80211_CMD_MAX: highest used command number | 614 | * @NL80211_CMD_MAX: highest used command number |
590 | * @__NL80211_CMD_AFTER_LAST: internal use | 615 | * @__NL80211_CMD_AFTER_LAST: internal use |
591 | */ | 616 | */ |
@@ -736,6 +761,10 @@ enum nl80211_commands { | |||
736 | 761 | ||
737 | NL80211_CMD_SET_MCAST_RATE, | 762 | NL80211_CMD_SET_MCAST_RATE, |
738 | 763 | ||
764 | NL80211_CMD_SET_MAC_ACL, | ||
765 | |||
766 | NL80211_CMD_RADAR_DETECT, | ||
767 | |||
739 | /* add new commands above here */ | 768 | /* add new commands above here */ |
740 | 769 | ||
741 | /* used to define NL80211_CMD_MAX below */ | 770 | /* used to define NL80211_CMD_MAX below */ |
@@ -958,7 +987,7 @@ enum nl80211_commands { | |||
958 | * @NL80211_ATTR_USE_MFP: Whether management frame protection (IEEE 802.11w) is | 987 | * @NL80211_ATTR_USE_MFP: Whether management frame protection (IEEE 802.11w) is |
959 | * used for the association (&enum nl80211_mfp, represented as a u32); | 988 | * used for the association (&enum nl80211_mfp, represented as a u32); |
960 | * this attribute can be used | 989 | * this attribute can be used |
961 | * with %NL80211_CMD_ASSOCIATE request | 990 | * with %NL80211_CMD_ASSOCIATE and %NL80211_CMD_CONNECT requests |
962 | * | 991 | * |
963 | * @NL80211_ATTR_STA_FLAGS2: Attribute containing a | 992 | * @NL80211_ATTR_STA_FLAGS2: Attribute containing a |
964 | * &struct nl80211_sta_flag_update. | 993 | * &struct nl80211_sta_flag_update. |
@@ -1310,6 +1339,35 @@ enum nl80211_commands { | |||
1310 | * if not given in START_AP 0 is assumed, if not given in SET_BSS | 1339 | * if not given in START_AP 0 is assumed, if not given in SET_BSS |
1311 | * no change is made. | 1340 | * no change is made. |
1312 | * | 1341 | * |
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 | * | ||
1313 | * @NL80211_ATTR_MAX: highest attribute number currently defined | 1371 | * @NL80211_ATTR_MAX: highest attribute number currently defined |
1314 | * @__NL80211_ATTR_AFTER_LAST: internal use | 1372 | * @__NL80211_ATTR_AFTER_LAST: internal use |
1315 | */ | 1373 | */ |
@@ -1580,6 +1638,22 @@ enum nl80211_attrs { | |||
1580 | NL80211_ATTR_P2P_CTWINDOW, | 1638 | NL80211_ATTR_P2P_CTWINDOW, |
1581 | NL80211_ATTR_P2P_OPPPS, | 1639 | NL80211_ATTR_P2P_OPPPS, |
1582 | 1640 | ||
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 | |||
1583 | /* add attributes here, update the policy in nl80211.c */ | 1657 | /* add attributes here, update the policy in nl80211.c */ |
1584 | 1658 | ||
1585 | __NL80211_ATTR_AFTER_LAST, | 1659 | __NL80211_ATTR_AFTER_LAST, |
@@ -1697,6 +1771,9 @@ enum nl80211_iftype { | |||
1697 | * flag can't be changed, it is only valid while adding a station, and | 1771 | * flag can't be changed, it is only valid while adding a station, and |
1698 | * attempts to change it will silently be ignored (rather than rejected | 1772 | * attempts to change it will silently be ignored (rather than rejected |
1699 | * as errors.) | 1773 | * 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 | ||
1700 | * @NL80211_STA_FLAG_MAX: highest station flag number currently defined | 1777 | * @NL80211_STA_FLAG_MAX: highest station flag number currently defined |
1701 | * @__NL80211_STA_FLAG_AFTER_LAST: internal use | 1778 | * @__NL80211_STA_FLAG_AFTER_LAST: internal use |
1702 | */ | 1779 | */ |
@@ -1708,6 +1785,7 @@ enum nl80211_sta_flags { | |||
1708 | NL80211_STA_FLAG_MFP, | 1785 | NL80211_STA_FLAG_MFP, |
1709 | NL80211_STA_FLAG_AUTHENTICATED, | 1786 | NL80211_STA_FLAG_AUTHENTICATED, |
1710 | NL80211_STA_FLAG_TDLS_PEER, | 1787 | NL80211_STA_FLAG_TDLS_PEER, |
1788 | NL80211_STA_FLAG_ASSOCIATED, | ||
1711 | 1789 | ||
1712 | /* keep last */ | 1790 | /* keep last */ |
1713 | __NL80211_STA_FLAG_AFTER_LAST, | 1791 | __NL80211_STA_FLAG_AFTER_LAST, |
@@ -1813,6 +1891,8 @@ enum nl80211_sta_bss_param { | |||
1813 | * @NL80211_STA_INFO_INACTIVE_TIME: time since last activity (u32, msecs) | 1891 | * @NL80211_STA_INFO_INACTIVE_TIME: time since last activity (u32, msecs) |
1814 | * @NL80211_STA_INFO_RX_BYTES: total received bytes (u32, from this station) | 1892 | * @NL80211_STA_INFO_RX_BYTES: total received bytes (u32, from this station) |
1815 | * @NL80211_STA_INFO_TX_BYTES: total transmitted bytes (u32, to this station) | 1893 | * @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) | ||
1816 | * @NL80211_STA_INFO_SIGNAL: signal strength of last received PPDU (u8, dBm) | 1896 | * @NL80211_STA_INFO_SIGNAL: signal strength of last received PPDU (u8, dBm) |
1817 | * @NL80211_STA_INFO_TX_BITRATE: current unicast tx rate, nested attribute | 1897 | * @NL80211_STA_INFO_TX_BITRATE: current unicast tx rate, nested attribute |
1818 | * containing info as possible, see &enum nl80211_rate_info | 1898 | * containing info as possible, see &enum nl80211_rate_info |
@@ -1834,6 +1914,10 @@ enum nl80211_sta_bss_param { | |||
1834 | * @NL80211_STA_INFO_STA_FLAGS: Contains a struct nl80211_sta_flag_update. | 1914 | * @NL80211_STA_INFO_STA_FLAGS: Contains a struct nl80211_sta_flag_update. |
1835 | * @NL80211_STA_INFO_BEACON_LOSS: count of times beacon loss was detected (u32) | 1915 | * @NL80211_STA_INFO_BEACON_LOSS: count of times beacon loss was detected (u32) |
1836 | * @NL80211_STA_INFO_T_OFFSET: timing offset with respect to this STA (s64) | 1916 | * @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 | ||
1837 | * @__NL80211_STA_INFO_AFTER_LAST: internal | 1921 | * @__NL80211_STA_INFO_AFTER_LAST: internal |
1838 | * @NL80211_STA_INFO_MAX: highest possible station info attribute | 1922 | * @NL80211_STA_INFO_MAX: highest possible station info attribute |
1839 | */ | 1923 | */ |
@@ -1858,6 +1942,11 @@ enum nl80211_sta_info { | |||
1858 | NL80211_STA_INFO_STA_FLAGS, | 1942 | NL80211_STA_INFO_STA_FLAGS, |
1859 | NL80211_STA_INFO_BEACON_LOSS, | 1943 | NL80211_STA_INFO_BEACON_LOSS, |
1860 | NL80211_STA_INFO_T_OFFSET, | 1944 | 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, | ||
1861 | 1950 | ||
1862 | /* keep last */ | 1951 | /* keep last */ |
1863 | __NL80211_STA_INFO_AFTER_LAST, | 1952 | __NL80211_STA_INFO_AFTER_LAST, |
@@ -1967,6 +2056,20 @@ enum nl80211_band_attr { | |||
1967 | * on this channel in current regulatory domain. | 2056 | * on this channel in current regulatory domain. |
1968 | * @NL80211_FREQUENCY_ATTR_MAX_TX_POWER: Maximum transmission power in mBm | 2057 | * @NL80211_FREQUENCY_ATTR_MAX_TX_POWER: Maximum transmission power in mBm |
1969 | * (100 * dBm). | 2058 | * (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 | ||
1970 | * @NL80211_FREQUENCY_ATTR_MAX: highest frequency attribute number | 2073 | * @NL80211_FREQUENCY_ATTR_MAX: highest frequency attribute number |
1971 | * currently defined | 2074 | * currently defined |
1972 | * @__NL80211_FREQUENCY_ATTR_AFTER_LAST: internal use | 2075 | * @__NL80211_FREQUENCY_ATTR_AFTER_LAST: internal use |
@@ -1979,6 +2082,12 @@ enum nl80211_frequency_attr { | |||
1979 | NL80211_FREQUENCY_ATTR_NO_IBSS, | 2082 | NL80211_FREQUENCY_ATTR_NO_IBSS, |
1980 | NL80211_FREQUENCY_ATTR_RADAR, | 2083 | NL80211_FREQUENCY_ATTR_RADAR, |
1981 | NL80211_FREQUENCY_ATTR_MAX_TX_POWER, | 2084 | 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, | ||
1982 | 2091 | ||
1983 | /* keep last */ | 2092 | /* keep last */ |
1984 | __NL80211_FREQUENCY_ATTR_AFTER_LAST, | 2093 | __NL80211_FREQUENCY_ATTR_AFTER_LAST, |
@@ -2249,6 +2358,34 @@ enum nl80211_mntr_flags { | |||
2249 | }; | 2358 | }; |
2250 | 2359 | ||
2251 | /** | 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 | |||
2388 | /** | ||
2252 | * enum nl80211_meshconf_params - mesh configuration parameters | 2389 | * enum nl80211_meshconf_params - mesh configuration parameters |
2253 | * | 2390 | * |
2254 | * Mesh configuration parameters. These can be changed while the mesh is | 2391 | * Mesh configuration parameters. These can be changed while the mesh is |
@@ -2342,6 +2479,11 @@ enum nl80211_mntr_flags { | |||
2342 | * (in TUs) during which a mesh STA can send only one Action frame | 2479 | * (in TUs) during which a mesh STA can send only one Action frame |
2343 | * containing a PREQ element for root path confirmation. | 2480 | * containing a PREQ element for root path confirmation. |
2344 | * | 2481 | * |
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 | * | ||
2345 | * @__NL80211_MESHCONF_ATTR_AFTER_LAST: internal use | 2487 | * @__NL80211_MESHCONF_ATTR_AFTER_LAST: internal use |
2346 | */ | 2488 | */ |
2347 | enum nl80211_meshconf_params { | 2489 | enum nl80211_meshconf_params { |
@@ -2371,6 +2513,8 @@ enum nl80211_meshconf_params { | |||
2371 | NL80211_MESHCONF_HWMP_PATH_TO_ROOT_TIMEOUT, | 2513 | NL80211_MESHCONF_HWMP_PATH_TO_ROOT_TIMEOUT, |
2372 | NL80211_MESHCONF_HWMP_ROOT_INTERVAL, | 2514 | NL80211_MESHCONF_HWMP_ROOT_INTERVAL, |
2373 | NL80211_MESHCONF_HWMP_CONFIRMATION_INTERVAL, | 2515 | NL80211_MESHCONF_HWMP_CONFIRMATION_INTERVAL, |
2516 | NL80211_MESHCONF_POWER_MODE, | ||
2517 | NL80211_MESHCONF_AWAKE_WINDOW, | ||
2374 | 2518 | ||
2375 | /* keep last */ | 2519 | /* keep last */ |
2376 | __NL80211_MESHCONF_ATTR_AFTER_LAST, | 2520 | __NL80211_MESHCONF_ATTR_AFTER_LAST, |
@@ -2816,10 +2960,12 @@ enum nl80211_tx_power_setting { | |||
2816 | * corresponds to the lowest-order bit in the second byte of the mask. | 2960 | * corresponds to the lowest-order bit in the second byte of the mask. |
2817 | * For example: The match 00:xx:00:00:xx:00:00:00:00:xx:xx:xx (where | 2961 | * For example: The match 00:xx:00:00:xx:00:00:00:00:xx:xx:xx (where |
2818 | * xx indicates "don't care") would be represented by a pattern of | 2962 | * 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". |
2820 | * Note that the pattern matching is done as though frames were not | 2964 | * Note that the pattern matching is done as though frames were not |
2821 | * 802.11 frames but 802.3 frames, i.e. the frame is fully unpacked | 2965 | * 802.11 frames but 802.3 frames, i.e. the frame is fully unpacked |
2822 | * first (including SNAP header unpacking) and then matched. | 2966 | * 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 | ||
2823 | * @NUM_NL80211_WOWLAN_PKTPAT: number of attributes | 2969 | * @NUM_NL80211_WOWLAN_PKTPAT: number of attributes |
2824 | * @MAX_NL80211_WOWLAN_PKTPAT: max attribute number | 2970 | * @MAX_NL80211_WOWLAN_PKTPAT: max attribute number |
2825 | */ | 2971 | */ |
@@ -2827,6 +2973,7 @@ enum nl80211_wowlan_packet_pattern_attr { | |||
2827 | __NL80211_WOWLAN_PKTPAT_INVALID, | 2973 | __NL80211_WOWLAN_PKTPAT_INVALID, |
2828 | NL80211_WOWLAN_PKTPAT_MASK, | 2974 | NL80211_WOWLAN_PKTPAT_MASK, |
2829 | NL80211_WOWLAN_PKTPAT_PATTERN, | 2975 | NL80211_WOWLAN_PKTPAT_PATTERN, |
2976 | NL80211_WOWLAN_PKTPAT_OFFSET, | ||
2830 | 2977 | ||
2831 | NUM_NL80211_WOWLAN_PKTPAT, | 2978 | NUM_NL80211_WOWLAN_PKTPAT, |
2832 | MAX_NL80211_WOWLAN_PKTPAT = NUM_NL80211_WOWLAN_PKTPAT - 1, | 2979 | MAX_NL80211_WOWLAN_PKTPAT = NUM_NL80211_WOWLAN_PKTPAT - 1, |
@@ -2837,6 +2984,7 @@ enum nl80211_wowlan_packet_pattern_attr { | |||
2837 | * @max_patterns: maximum number of patterns supported | 2984 | * @max_patterns: maximum number of patterns supported |
2838 | * @min_pattern_len: minimum length of each pattern | 2985 | * @min_pattern_len: minimum length of each pattern |
2839 | * @max_pattern_len: maximum length of each pattern | 2986 | * @max_pattern_len: maximum length of each pattern |
2987 | * @max_pkt_offset: maximum Rx packet offset | ||
2840 | * | 2988 | * |
2841 | * This struct is carried in %NL80211_WOWLAN_TRIG_PKT_PATTERN when | 2989 | * This struct is carried in %NL80211_WOWLAN_TRIG_PKT_PATTERN when |
2842 | * that is part of %NL80211_ATTR_WOWLAN_TRIGGERS_SUPPORTED in the | 2990 | * that is part of %NL80211_ATTR_WOWLAN_TRIGGERS_SUPPORTED in the |
@@ -2846,6 +2994,7 @@ struct nl80211_wowlan_pattern_support { | |||
2846 | __u32 max_patterns; | 2994 | __u32 max_patterns; |
2847 | __u32 min_pattern_len; | 2995 | __u32 min_pattern_len; |
2848 | __u32 max_pattern_len; | 2996 | __u32 max_pattern_len; |
2997 | __u32 max_pkt_offset; | ||
2849 | } __attribute__((packed)); | 2998 | } __attribute__((packed)); |
2850 | 2999 | ||
2851 | /** | 3000 | /** |
@@ -2861,12 +3010,17 @@ struct nl80211_wowlan_pattern_support { | |||
2861 | * @NL80211_WOWLAN_TRIG_PKT_PATTERN: wake up on the specified packet patterns | 3010 | * @NL80211_WOWLAN_TRIG_PKT_PATTERN: wake up on the specified packet patterns |
2862 | * which are passed in an array of nested attributes, each nested attribute | 3011 | * which are passed in an array of nested attributes, each nested attribute |
2863 | * defining a with attributes from &struct nl80211_wowlan_trig_pkt_pattern. | 3012 | * 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, | 3013 | * Each pattern defines a wakeup packet. Packet offset is associated with |
2865 | * i.e. as though the packet was an 802.3 packet, so the pattern matching | 3014 | * each pattern which is used while matching the pattern. The matching is |
2866 | * is done after the packet is converted to the MSDU. | 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. | ||
2867 | * | 3017 | * |
2868 | * In %NL80211_ATTR_WOWLAN_TRIGGERS_SUPPORTED, it is a binary attribute | 3018 | * In %NL80211_ATTR_WOWLAN_TRIGGERS_SUPPORTED, it is a binary attribute |
2869 | * carrying a &struct nl80211_wowlan_pattern_support. | 3019 | * 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. | ||
2870 | * @NL80211_WOWLAN_TRIG_GTK_REKEY_SUPPORTED: Not a real trigger, and cannot be | 3024 | * @NL80211_WOWLAN_TRIG_GTK_REKEY_SUPPORTED: Not a real trigger, and cannot be |
2871 | * used when setting, used only to indicate that GTK rekeying is supported | 3025 | * used when setting, used only to indicate that GTK rekeying is supported |
2872 | * by the device (flag) | 3026 | * by the device (flag) |
@@ -2877,8 +3031,36 @@ struct nl80211_wowlan_pattern_support { | |||
2877 | * @NL80211_WOWLAN_TRIG_4WAY_HANDSHAKE: wake up on 4-way handshake (flag) | 3031 | * @NL80211_WOWLAN_TRIG_4WAY_HANDSHAKE: wake up on 4-way handshake (flag) |
2878 | * @NL80211_WOWLAN_TRIG_RFKILL_RELEASE: wake up when rfkill is released | 3032 | * @NL80211_WOWLAN_TRIG_RFKILL_RELEASE: wake up when rfkill is released |
2879 | * (on devices that have rfkill in the device) (flag) | 3033 | * (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 | ||
2880 | * @NUM_NL80211_WOWLAN_TRIG: number of wake on wireless triggers | 3059 | * @NUM_NL80211_WOWLAN_TRIG: number of wake on wireless triggers |
2881 | * @MAX_NL80211_WOWLAN_TRIG: highest wowlan trigger attribute number | 3060 | * @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). | ||
2882 | */ | 3064 | */ |
2883 | enum nl80211_wowlan_triggers { | 3065 | enum nl80211_wowlan_triggers { |
2884 | __NL80211_WOWLAN_TRIG_INVALID, | 3066 | __NL80211_WOWLAN_TRIG_INVALID, |
@@ -2891,6 +3073,14 @@ enum nl80211_wowlan_triggers { | |||
2891 | NL80211_WOWLAN_TRIG_EAP_IDENT_REQUEST, | 3073 | NL80211_WOWLAN_TRIG_EAP_IDENT_REQUEST, |
2892 | NL80211_WOWLAN_TRIG_4WAY_HANDSHAKE, | 3074 | NL80211_WOWLAN_TRIG_4WAY_HANDSHAKE, |
2893 | NL80211_WOWLAN_TRIG_RFKILL_RELEASE, | 3075 | 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, | ||
2894 | 3084 | ||
2895 | /* keep last */ | 3085 | /* keep last */ |
2896 | NUM_NL80211_WOWLAN_TRIG, | 3086 | NUM_NL80211_WOWLAN_TRIG, |
@@ -2898,6 +3088,116 @@ enum nl80211_wowlan_triggers { | |||
2898 | }; | 3088 | }; |
2899 | 3089 | ||
2900 | /** | 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 | |||
3200 | /** | ||
2901 | * enum nl80211_iface_limit_attrs - limit attributes | 3201 | * enum nl80211_iface_limit_attrs - limit attributes |
2902 | * @NL80211_IFACE_LIMIT_UNSPEC: (reserved) | 3202 | * @NL80211_IFACE_LIMIT_UNSPEC: (reserved) |
2903 | * @NL80211_IFACE_LIMIT_MAX: maximum number of interfaces that | 3203 | * @NL80211_IFACE_LIMIT_MAX: maximum number of interfaces that |
@@ -2933,6 +3233,8 @@ enum nl80211_iface_limit_attrs { | |||
2933 | * the infrastructure network's beacon interval. | 3233 | * the infrastructure network's beacon interval. |
2934 | * @NL80211_IFACE_COMB_NUM_CHANNELS: u32 attribute specifying how many | 3234 | * @NL80211_IFACE_COMB_NUM_CHANNELS: u32 attribute specifying how many |
2935 | * different channels may be used within this group. | 3235 | * 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. | ||
2936 | * @NUM_NL80211_IFACE_COMB: number of attributes | 3238 | * @NUM_NL80211_IFACE_COMB: number of attributes |
2937 | * @MAX_NL80211_IFACE_COMB: highest attribute number | 3239 | * @MAX_NL80211_IFACE_COMB: highest attribute number |
2938 | * | 3240 | * |
@@ -2965,6 +3267,7 @@ enum nl80211_if_combination_attrs { | |||
2965 | NL80211_IFACE_COMB_MAXNUM, | 3267 | NL80211_IFACE_COMB_MAXNUM, |
2966 | NL80211_IFACE_COMB_STA_AP_BI_MATCH, | 3268 | NL80211_IFACE_COMB_STA_AP_BI_MATCH, |
2967 | NL80211_IFACE_COMB_NUM_CHANNELS, | 3269 | NL80211_IFACE_COMB_NUM_CHANNELS, |
3270 | NL80211_IFACE_COMB_RADAR_DETECT_WIDTHS, | ||
2968 | 3271 | ||
2969 | /* keep last */ | 3272 | /* keep last */ |
2970 | NUM_NL80211_IFACE_COMB, | 3273 | NUM_NL80211_IFACE_COMB, |
@@ -3140,6 +3443,19 @@ enum nl80211_ap_sme_features { | |||
3140 | * setting | 3443 | * setting |
3141 | * @NL80211_FEATURE_P2P_GO_OPPPS: P2P GO implementation supports opportunistic | 3444 | * @NL80211_FEATURE_P2P_GO_OPPPS: P2P GO implementation supports opportunistic |
3142 | * powersave | 3445 | * 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 | ||
3143 | */ | 3459 | */ |
3144 | enum nl80211_feature_flags { | 3460 | enum nl80211_feature_flags { |
3145 | NL80211_FEATURE_SK_TX_STATUS = 1 << 0, | 3461 | NL80211_FEATURE_SK_TX_STATUS = 1 << 0, |
@@ -3155,6 +3471,9 @@ enum nl80211_feature_flags { | |||
3155 | NL80211_FEATURE_NEED_OBSS_SCAN = 1 << 10, | 3471 | NL80211_FEATURE_NEED_OBSS_SCAN = 1 << 10, |
3156 | NL80211_FEATURE_P2P_GO_CTWIN = 1 << 11, | 3472 | NL80211_FEATURE_P2P_GO_CTWIN = 1 << 11, |
3157 | NL80211_FEATURE_P2P_GO_OPPPS = 1 << 12, | 3473 | 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, | ||
3158 | }; | 3477 | }; |
3159 | 3478 | ||
3160 | /** | 3479 | /** |
@@ -3182,7 +3501,7 @@ enum nl80211_probe_resp_offload_support_attr { | |||
3182 | * enum nl80211_connect_failed_reason - connection request failed reasons | 3501 | * enum nl80211_connect_failed_reason - connection request failed reasons |
3183 | * @NL80211_CONN_FAIL_MAX_CLIENTS: Maximum number of clients that can be | 3502 | * @NL80211_CONN_FAIL_MAX_CLIENTS: Maximum number of clients that can be |
3184 | * handled by the AP is reached. | 3503 | * 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. |
3186 | */ | 3505 | */ |
3187 | enum nl80211_connect_failed_reason { | 3506 | enum nl80211_connect_failed_reason { |
3188 | NL80211_CONN_FAIL_MAX_CLIENTS, | 3507 | NL80211_CONN_FAIL_MAX_CLIENTS, |
@@ -3210,4 +3529,62 @@ enum nl80211_scan_flags { | |||
3210 | NL80211_SCAN_FLAG_AP = 1<<2, | 3529 | NL80211_SCAN_FLAG_AP = 1<<2, |
3211 | }; | 3530 | }; |
3212 | 3531 | ||
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 | |||
3213 | #endif /* __LINUX_NL80211_H */ | 3590 | #endif /* __LINUX_NL80211_H */ |
diff --git a/include/uapi/linux/rtnetlink.h b/include/uapi/linux/rtnetlink.h index 7a5eb196ade9..7a2144e1afae 100644 --- a/include/uapi/linux/rtnetlink.h +++ b/include/uapi/linux/rtnetlink.h | |||
@@ -630,6 +630,7 @@ struct tcamsg { | |||
630 | 630 | ||
631 | /* New extended info filters for IFLA_EXT_MASK */ | 631 | /* New extended info filters for IFLA_EXT_MASK */ |
632 | #define RTEXT_FILTER_VF (1 << 0) | 632 | #define RTEXT_FILTER_VF (1 << 0) |
633 | #define RTEXT_FILTER_BRVLAN (1 << 1) | ||
633 | 634 | ||
634 | /* End of information exported to user level */ | 635 | /* End of information exported to user level */ |
635 | 636 | ||
diff --git a/include/uapi/linux/snmp.h b/include/uapi/linux/snmp.h index fdfba235f9f1..b49eab89c9fd 100644 --- a/include/uapi/linux/snmp.h +++ b/include/uapi/linux/snmp.h | |||
@@ -278,6 +278,7 @@ enum | |||
278 | LINUX_MIB_XFRMOUTPOLDEAD, /* XfrmOutPolDead */ | 278 | LINUX_MIB_XFRMOUTPOLDEAD, /* XfrmOutPolDead */ |
279 | LINUX_MIB_XFRMOUTPOLERROR, /* XfrmOutPolError */ | 279 | LINUX_MIB_XFRMOUTPOLERROR, /* XfrmOutPolError */ |
280 | LINUX_MIB_XFRMFWDHDRERROR, /* XfrmFwdHdrError*/ | 280 | LINUX_MIB_XFRMFWDHDRERROR, /* XfrmFwdHdrError*/ |
281 | LINUX_MIB_XFRMOUTSTATEINVALID, /* XfrmOutStateInvalid */ | ||
281 | __LINUX_MIB_XFRMMAX | 282 | __LINUX_MIB_XFRMMAX |
282 | }; | 283 | }; |
283 | 284 | ||
diff --git a/include/uapi/linux/tcp.h b/include/uapi/linux/tcp.h index e962faa5ab0d..6b1ead0b0c9d 100644 --- a/include/uapi/linux/tcp.h +++ b/include/uapi/linux/tcp.h | |||
@@ -111,6 +111,7 @@ enum { | |||
111 | #define TCP_QUEUE_SEQ 21 | 111 | #define TCP_QUEUE_SEQ 21 |
112 | #define TCP_REPAIR_OPTIONS 22 | 112 | #define TCP_REPAIR_OPTIONS 22 |
113 | #define TCP_FASTOPEN 23 /* Enable FastOpen on listeners */ | 113 | #define TCP_FASTOPEN 23 /* Enable FastOpen on listeners */ |
114 | #define TCP_TIMESTAMP 24 | ||
114 | 115 | ||
115 | struct tcp_repair_opt { | 116 | struct tcp_repair_opt { |
116 | __u32 opt_code; | 117 | __u32 opt_code; |
diff --git a/include/uapi/linux/virtio_net.h b/include/uapi/linux/virtio_net.h index 848e3584d7c8..a5a8c88753b9 100644 --- a/include/uapi/linux/virtio_net.h +++ b/include/uapi/linux/virtio_net.h | |||
@@ -53,6 +53,7 @@ | |||
53 | * network */ | 53 | * network */ |
54 | #define VIRTIO_NET_F_MQ 22 /* Device supports Receive Flow | 54 | #define VIRTIO_NET_F_MQ 22 /* Device supports Receive Flow |
55 | * Steering */ | 55 | * Steering */ |
56 | #define VIRTIO_NET_F_CTRL_MAC_ADDR 23 /* Set MAC address */ | ||
56 | 57 | ||
57 | #define VIRTIO_NET_S_LINK_UP 1 /* Link is up */ | 58 | #define VIRTIO_NET_S_LINK_UP 1 /* Link is up */ |
58 | #define VIRTIO_NET_S_ANNOUNCE 2 /* Announcement is needed */ | 59 | #define VIRTIO_NET_S_ANNOUNCE 2 /* Announcement is needed */ |
@@ -127,7 +128,7 @@ typedef __u8 virtio_net_ctrl_ack; | |||
127 | #define VIRTIO_NET_CTRL_RX_NOBCAST 5 | 128 | #define VIRTIO_NET_CTRL_RX_NOBCAST 5 |
128 | 129 | ||
129 | /* | 130 | /* |
130 | * Control the MAC filter table. | 131 | * Control the MAC |
131 | * | 132 | * |
132 | * The MAC filter table is managed by the hypervisor, the guest should | 133 | * The MAC filter table is managed by the hypervisor, the guest should |
133 | * assume the size is infinite. Filtering should be considered | 134 | * assume the size is infinite. Filtering should be considered |
@@ -140,6 +141,10 @@ typedef __u8 virtio_net_ctrl_ack; | |||
140 | * first sg list contains unicast addresses, the second is for multicast. | 141 | * first sg list contains unicast addresses, the second is for multicast. |
141 | * This functionality is present if the VIRTIO_NET_F_CTRL_RX feature | 142 | * This functionality is present if the VIRTIO_NET_F_CTRL_RX feature |
142 | * is available. | 143 | * 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. | ||
143 | */ | 148 | */ |
144 | struct virtio_net_ctrl_mac { | 149 | struct virtio_net_ctrl_mac { |
145 | __u32 entries; | 150 | __u32 entries; |
@@ -148,6 +153,7 @@ struct virtio_net_ctrl_mac { | |||
148 | 153 | ||
149 | #define VIRTIO_NET_CTRL_MAC 1 | 154 | #define VIRTIO_NET_CTRL_MAC 1 |
150 | #define VIRTIO_NET_CTRL_MAC_TABLE_SET 0 | 155 | #define VIRTIO_NET_CTRL_MAC_TABLE_SET 0 |
156 | #define VIRTIO_NET_CTRL_MAC_ADDR_SET 1 | ||
151 | 157 | ||
152 | /* | 158 | /* |
153 | * Control VLAN filtering | 159 | * Control VLAN filtering |
diff --git a/include/uapi/linux/vm_sockets.h b/include/uapi/linux/vm_sockets.h new file mode 100644 index 000000000000..df91301847ec --- /dev/null +++ b/include/uapi/linux/vm_sockets.h | |||
@@ -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 | ||
diff --git a/include/uapi/linux/wanrouter.h b/include/uapi/linux/wanrouter.h index 7617df2833d5..498d6c12c666 100644 --- a/include/uapi/linux/wanrouter.h +++ b/include/uapi/linux/wanrouter.h | |||
@@ -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 | |||
252 | /* | 1 | /* |
253 | * Configuration options defines. | 2 | * wanrouter.h Legacy declarations kept around until X25 is removed |
254 | */ | 3 | */ |
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 | ||
325 | 4 | ||
326 | 5 | #ifndef _UAPI_ROUTER_H | |
327 | #define WANOPT_TTY_SYNC 0 | 6 | #define _UAPI_ROUTER_H |
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; | ||
361 | 7 | ||
362 | /* 'state' defines */ | 8 | /* 'state' defines */ |
363 | enum wan_states | 9 | enum wan_states |
@@ -365,88 +11,7 @@ enum wan_states | |||
365 | WAN_UNCONFIGURED, /* link/channel is not configured */ | 11 | WAN_UNCONFIGURED, /* link/channel is not configured */ |
366 | WAN_DISCONNECTED, /* link/channel is disconnected */ | 12 | WAN_DISCONNECTED, /* link/channel is disconnected */ |
367 | WAN_CONNECTING, /* connection is in progress */ | 13 | WAN_CONNECTING, /* connection is in progress */ |
368 | WAN_CONNECTED, /* link/channel is operational */ | 14 | 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 */ | ||
373 | }; | 15 | }; |
374 | 16 | ||
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 | |||
452 | #endif /* _UAPI_ROUTER_H */ | 17 | #endif /* _UAPI_ROUTER_H */ |