ifconfig(8): Print more WPS attributes in verbose "list scan" output
[dragonfly.git] / sys / netproto / 802_11 / ieee80211_wps.h
1 /*-
2  * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
3  *
4  * Copyright (c) 2017 J.R. Oldroyd, Open Advisors Limited
5  * All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions
9  * are met:
10  * 1. Redistributions of source code must retain the above copyright
11  *    notice, this list of conditions and the following disclaimer.
12  * 2. Redistributions in binary form must reproduce the above copyright
13  *    notice, this list of conditions and the following disclaimer in the
14  *    documentation and/or other materials provided with the distribution.
15  *
16  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
17  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26  *
27  * $FreeBSD: head/sys/net80211/ieee80211_wps.h 343204 2019-01-20 00:45:44Z gonzo $
28  */
29 #ifndef _NET80211_IEEE80211_WPS_H_
30 #define _NET80211_IEEE80211_WPS_H_
31
32 /*
33  * 802.11 WPS implementation definitions.
34  */
35
36 #define IEEE80211_WPS_ATTR_AP_CHANNEL           0x1001
37 #define IEEE80211_WPS_ATTR_ASSOC_STATE          0x1002
38 #define IEEE80211_WPS_ATTR_AUTH_TYPE            0x1003
39 #define IEEE80211_WPS_ATTR_AUTH_TYPE_FLAGS      0x1004
40 #define IEEE80211_WPS_ATTR_AUTHENTICATOR        0x1005
41 #define IEEE80211_WPS_ATTR_CONFIG_METHODS       0x1008
42 #define IEEE80211_WPS_ATTR_CONFIG_ERROR         0x1009
43 #define IEEE80211_WPS_ATTR_CONFIRM_URL4         0x100a
44 #define IEEE80211_WPS_ATTR_CONFIRM_URL6         0x100b
45 #define IEEE80211_WPS_ATTR_CONN_TYPE            0x100c
46 #define IEEE80211_WPS_ATTR_CONN_TYPE_FLAGS      0x100d
47 #define IEEE80211_WPS_ATTR_CRED                 0x100e
48 #define IEEE80211_WPS_ATTR_ENCR_TYPE            0x100f
49 #define IEEE80211_WPS_ATTR_ENCR_TYPE_FLAGS      0x1010
50 #define IEEE80211_WPS_ATTR_DEV_NAME             0x1011
51 #define IEEE80211_WPS_ATTR_DEV_PASSWORD_ID      0x1012
52 #define IEEE80211_WPS_ATTR_E_HASH1              0x1014
53 #define IEEE80211_WPS_ATTR_E_HASH2              0x1015
54 #define IEEE80211_WPS_ATTR_E_SNONCE1            0x1016
55 #define IEEE80211_WPS_ATTR_E_SNONCE2            0x1017
56 #define IEEE80211_WPS_ATTR_ENCR_SETTINGS        0x1018
57 #define IEEE80211_WPS_ATTR_ENROLLEE_NONCE       0x101a
58 #define IEEE80211_WPS_ATTR_FEATURE_ID           0x101b
59 #define IEEE80211_WPS_ATTR_IDENTITY             0x101c
60 #define IEEE80211_WPS_ATTR_IDENTITY_PROOF       0x101d
61 #define IEEE80211_WPS_ATTR_KEY_WRAP_AUTH        0x101e
62 #define IEEE80211_WPS_ATTR_KEY_ID               0x101f
63 #define IEEE80211_WPS_ATTR_MAC_ADDR             0x1020
64 #define IEEE80211_WPS_ATTR_MANUFACTURER         0x1021
65 #define IEEE80211_WPS_ATTR_MSG_TYPE             0x1022
66 #define IEEE80211_WPS_ATTR_MODEL_NAME           0x1023
67 #define IEEE80211_WPS_ATTR_MODEL_NUMBER         0x1024
68 #define IEEE80211_WPS_ATTR_NETWORK_INDEX        0x1026
69 #define IEEE80211_WPS_ATTR_NETWORK_KEY          0x1027
70 #define IEEE80211_WPS_ATTR_NETWORK_KEY_INDEX    0x1028
71 #define IEEE80211_WPS_ATTR_NEW_DEVICE_NAME      0x1029
72 #define IEEE80211_WPS_ATTR_NEW_PASSWORD         0x102a
73 #define IEEE80211_WPS_ATTR_OOB_DEVICE_PASSWORD  0x102c
74 #define IEEE80211_WPS_ATTR_OS_VERSION           0x102d
75 #define IEEE80211_WPS_ATTR_POWER_LEVEL          0x102f
76 #define IEEE80211_WPS_ATTR_PSK_CURRENT          0x1030
77 #define IEEE80211_WPS_ATTR_PSK_MAX              0x1031
78 #define IEEE80211_WPS_ATTR_PUBLIC_KEY           0x1032
79 #define IEEE80211_WPS_ATTR_RADIO_ENABLE         0x1033
80 #define IEEE80211_WPS_ATTR_REBOOT               0x1034
81 #define IEEE80211_WPS_ATTR_REGISTRAR_CURRENT    0x1035
82 #define IEEE80211_WPS_ATTR_REGISTRAR_ESTBLSHD   0x1036
83 #define IEEE80211_WPS_ATTR_REGISTRAR_LIST       0x1037
84 #define IEEE80211_WPS_ATTR_REGISTRAR_MAX        0x1038
85 #define IEEE80211_WPS_ATTR_REGISTRAR_NONCE      0x1039
86 #define IEEE80211_WPS_ATTR_REQUEST_TYPE         0x103a
87 #define IEEE80211_WPS_ATTR_RESPONSE_TYPE        0x103b
88 #define IEEE80211_WPS_ATTR_RF_BANDS             0x103c
89 #define IEEE80211_WPS_ATTR_R_HASH1              0x103d
90 #define IEEE80211_WPS_ATTR_R_HASH2              0x103e
91 #define IEEE80211_WPS_ATTR_R_SNONCE1            0x103f
92 #define IEEE80211_WPS_ATTR_R_SNONCE2            0x1040
93 #define IEEE80211_WPS_ATTR_SELECTED_REGISTRAR   0x1041
94 #define IEEE80211_WPS_ATTR_SERIAL_NUMBER        0x1042
95 #define IEEE80211_WPS_ATTR_WPS_STATE            0x1044
96 #define IEEE80211_WPS_ATTR_SSID                 0x1045
97 #define IEEE80211_WPS_ATTR_TOTAL_NETWORKS       0x1046
98 #define IEEE80211_WPS_ATTR_UUID_E               0x1047
99 #define IEEE80211_WPS_ATTR_UUID_R               0x1048
100 #define IEEE80211_WPS_ATTR_VENDOR_EXT           0x1049
101 #define IEEE80211_WPS_ATTR_VERSION              0x104a
102 #define IEEE80211_WPS_ATTR_X509_CERT_REQ        0x104b
103 #define IEEE80211_WPS_ATTR_X509_CERT            0x104c
104 #define IEEE80211_WPS_ATTR_EAP_IDENTITY         0x104d
105 #define IEEE80211_WPS_ATTR_MSG_COUNTER          0x104e
106 #define IEEE80211_WPS_ATTR_PUBKEY_HASH          0x104f
107 #define IEEE80211_WPS_ATTR_REKEY_KEY            0x1050
108 #define IEEE80211_WPS_ATTR_KEY_LIFETIME         0x1051
109 #define IEEE80211_WPS_ATTR_PERMITTED_CONFIG_METHODS     0x1052
110 #define IEEE80211_WPS_ATTR_SELECTED_REGISTRAR_CONFIG_METHODS    0x1053
111 #define IEEE80211_WPS_ATTR_PRIMARY_DEV_TYPE     0x1054
112 #define IEEE80211_WPS_ATTR_SECONDARY_DEV_TYPE_LIST      0x1055
113 #define IEEE80211_WPS_ATTR_PORTABLE_DEV         0x1056
114 #define IEEE80211_WPS_ATTR_AP_SETUP_LOCKED      0x1057
115 #define IEEE80211_WPS_ATTR_APPLICATION_EXT      0x1058
116 #define IEEE80211_WPS_ATTR_EAP_TYPE             0x1059
117 #define IEEE80211_WPS_ATTR_IV                   0x1060
118 #define IEEE80211_WPS_ATTR_KEY_PROVIDED_AUTO    0x1061
119 #define IEEE80211_WPS_ATTR_802_1X_ENABLED       0x1062
120 #define IEEE80211_WPS_ATTR_AP_SESSION_KEY       0x1063
121 #define IEEE80211_WPS_ATTR_WEP_TRANSMIT_KEY     0x1064
122 #define IEEE80211_WPS_ATTR_REQUESTED_DEV_TYPE   0x106a
123 #define IEEE80211_WPS_ATTR_EXTENSIBILITY_TEST   0x10fa /* _NOT_ defined in the spec */
124
125 /* RF bands bitmask */
126 #define IEEE80211_WPS_RF_BAND_24GHZ             0x01
127 #define IEEE80211_WPS_RF_BAND_50GHZ             0x02
128 #define IEEE80211_WPS_RF_BAND_600GHZ            0x04
129
130 /* Config methods bitmask */
131 #define IEEE80211_WPS_CONFIG_USBA               0x0001
132 #define IEEE80211_WPS_CONFIG_ETHERNET           0x0002
133 #define IEEE80211_WPS_CONFIG_LABEL              0x0004
134 #define IEEE80211_WPS_CONFIG_DISPLAY            0x0008
135 #define IEEE80211_WPS_CONFIG_EXT_NFC_TOKEN      0x0010
136 #define IEEE80211_WPS_CONFIG_INT_NFC_TOKEN      0x0020
137 #define IEEE80211_WPS_CONFIG_NFC_INTERFACE      0x0040
138 #define IEEE80211_WPS_CONFIG_PUSHBUTTON         0x0080
139 #define IEEE80211_WPS_CONFIG_KEYPAD             0x0100
140 #define IEEE80211_WPS_CONFIG_VIRT_PUSHBUTTON    0x0200
141 #define IEEE80211_WPS_CONFIG_PHY_PUSHBUTTON     0x0400
142 #define IEEE80211_WPS_CONFIG_P2PS               0x1000
143 #define IEEE80211_WPS_CONFIG_VIRT_DISPLAY       0x2000
144 #define IEEE80211_WPS_CONFIG_PHY_DISPLAY        0x4000
145
146 /* Wi-Fi Protected Setup state */
147 #define IEEE80211_WPS_STATE_NOT_CONFIGURED      0x01
148 #define IEEE80211_WPS_STATE_CONFIGURED          0x02
149 #endif /* _NET80211_IEEE80211_WPS_H_ */