wps_defs.h
Go to the documentation of this file.
00001 /*
00002  * Wi-Fi Protected Setup - message definitions
00003  * Copyright (c) 2008, Jouni Malinen <j@w1.fi>
00004  *
00005  * This program is free software; you can redistribute it and/or modify
00006  * it under the terms of the GNU General Public License version 2 as
00007  * published by the Free Software Foundation.
00008  *
00009  * Alternatively, this software may be distributed under the terms of BSD
00010  * license.
00011  *
00012  * See README and COPYING for more details.
00013  */
00014 
00015 #ifndef WPS_DEFS_H
00016 #define WPS_DEFS_H
00017 
00018 #define WPS_VERSION 0x10
00019 
00020 /* Diffie-Hellman 1536-bit MODP Group; RFC 3526, Group 5 */
00021 #define WPS_DH_GROUP 5
00022 
00023 #define WPS_UUID_LEN 16
00024 #define WPS_NONCE_LEN 16
00025 #define WPS_AUTHENTICATOR_LEN 8
00026 #define WPS_AUTHKEY_LEN 32
00027 #define WPS_KEYWRAPKEY_LEN 16
00028 #define WPS_EMSK_LEN 32
00029 #define WPS_PSK_LEN 16
00030 #define WPS_SECRET_NONCE_LEN 16
00031 #define WPS_HASH_LEN 32
00032 #define WPS_KWA_LEN 8
00033 #define WPS_MGMTAUTHKEY_LEN 32
00034 #define WPS_MGMTENCKEY_LEN 16
00035 #define WPS_MGMT_KEY_ID_LEN 16
00036 #define WPS_OOB_DEVICE_PASSWORD_ATTR_LEN 54
00037 #define WPS_OOB_DEVICE_PASSWORD_LEN 32
00038 #define WPS_OOB_PUBKEY_HASH_LEN 20
00039 
00040 /* Attribute Types */
00041 enum wps_attribute {
00042         ATTR_AP_CHANNEL = 0x1001,
00043         ATTR_ASSOC_STATE = 0x1002,
00044         ATTR_AUTH_TYPE = 0x1003,
00045         ATTR_AUTH_TYPE_FLAGS = 0x1004,
00046         ATTR_AUTHENTICATOR = 0x1005,
00047         ATTR_CONFIG_METHODS = 0x1008,
00048         ATTR_CONFIG_ERROR = 0x1009,
00049         ATTR_CONFIRM_URL4 = 0x100a,
00050         ATTR_CONFIRM_URL6 = 0x100b,
00051         ATTR_CONN_TYPE = 0x100c,
00052         ATTR_CONN_TYPE_FLAGS = 0x100d,
00053         ATTR_CRED = 0x100e,
00054         ATTR_ENCR_TYPE = 0x100f,
00055         ATTR_ENCR_TYPE_FLAGS = 0x1010,
00056         ATTR_DEV_NAME = 0x1011,
00057         ATTR_DEV_PASSWORD_ID = 0x1012,
00058         ATTR_E_HASH1 = 0x1014,
00059         ATTR_E_HASH2 = 0x1015,
00060         ATTR_E_SNONCE1 = 0x1016,
00061         ATTR_E_SNONCE2 = 0x1017,
00062         ATTR_ENCR_SETTINGS = 0x1018,
00063         ATTR_ENROLLEE_NONCE = 0x101a,
00064         ATTR_FEATURE_ID = 0x101b,
00065         ATTR_IDENTITY = 0x101c,
00066         ATTR_IDENTITY_PROOF = 0x101d,
00067         ATTR_KEY_WRAP_AUTH = 0x101e,
00068         ATTR_KEY_ID = 0x101f,
00069         ATTR_MAC_ADDR = 0x1020,
00070         ATTR_MANUFACTURER = 0x1021,
00071         ATTR_MSG_TYPE = 0x1022,
00072         ATTR_MODEL_NAME = 0x1023,
00073         ATTR_MODEL_NUMBER = 0x1024,
00074         ATTR_NETWORK_INDEX = 0x1026,
00075         ATTR_NETWORK_KEY = 0x1027,
00076         ATTR_NETWORK_KEY_INDEX = 0x1028,
00077         ATTR_NEW_DEVICE_NAME = 0x1029,
00078         ATTR_NEW_PASSWORD = 0x102a,
00079         ATTR_OOB_DEVICE_PASSWORD = 0x102c,
00080         ATTR_OS_VERSION = 0x102d,
00081         ATTR_POWER_LEVEL = 0x102f,
00082         ATTR_PSK_CURRENT = 0x1030,
00083         ATTR_PSK_MAX = 0x1031,
00084         ATTR_PUBLIC_KEY = 0x1032,
00085         ATTR_RADIO_ENABLE = 0x1033,
00086         ATTR_REBOOT = 0x1034,
00087         ATTR_REGISTRAR_CURRENT = 0x1035,
00088         ATTR_REGISTRAR_ESTABLISHED = 0x1036,
00089         ATTR_REGISTRAR_LIST = 0x1037,
00090         ATTR_REGISTRAR_MAX = 0x1038,
00091         ATTR_REGISTRAR_NONCE = 0x1039,
00092         ATTR_REQUEST_TYPE = 0x103a,
00093         ATTR_RESPONSE_TYPE = 0x103b,
00094         ATTR_RF_BANDS = 0x103c,
00095         ATTR_R_HASH1 = 0x103d,
00096         ATTR_R_HASH2 = 0x103e,
00097         ATTR_R_SNONCE1 = 0x103f,
00098         ATTR_R_SNONCE2 = 0x1040,
00099         ATTR_SELECTED_REGISTRAR = 0x1041,
00100         ATTR_SERIAL_NUMBER = 0x1042,
00101         ATTR_WPS_STATE = 0x1044,
00102         ATTR_SSID = 0x1045,
00103         ATTR_TOTAL_NETWORKS = 0x1046,
00104         ATTR_UUID_E = 0x1047,
00105         ATTR_UUID_R = 0x1048,
00106         ATTR_VENDOR_EXT = 0x1049,
00107         ATTR_VERSION = 0x104a,
00108         ATTR_X509_CERT_REQ = 0x104b,
00109         ATTR_X509_CERT = 0x104c,
00110         ATTR_EAP_IDENTITY = 0x104d,
00111         ATTR_MSG_COUNTER = 0x104e,
00112         ATTR_PUBKEY_HASH = 0x104f,
00113         ATTR_REKEY_KEY = 0x1050,
00114         ATTR_KEY_LIFETIME = 0x1051,
00115         ATTR_PERMITTED_CFG_METHODS = 0x1052,
00116         ATTR_SELECTED_REGISTRAR_CONFIG_METHODS = 0x1053,
00117         ATTR_PRIMARY_DEV_TYPE = 0x1054,
00118         ATTR_SECONDARY_DEV_TYP_ELIST = 0x1055,
00119         ATTR_PORTABLE_DEV = 0x1056,
00120         ATTR_AP_SETUP_LOCKED = 0x1057,
00121         ATTR_APPLICATION_EXT = 0x1058,
00122         ATTR_EAP_TYPE = 0x1059,
00123         ATTR_IV = 0x1060,
00124         ATTR_KEY_PROVIDED_AUTO = 0x1061,
00125         ATTR_802_1X_ENABLED = 0x1062,
00126         ATTR_APPSESSIONKEY = 0x1063,
00127         ATTR_WEPTRANSMITKEY = 0x1064
00128 };
00129 
00130 /* Device Password ID */
00131 enum wps_dev_password_id {
00132         DEV_PW_DEFAULT = 0x0000,
00133         DEV_PW_USER_SPECIFIED = 0x0001,
00134         DEV_PW_MACHINE_SPECIFIED = 0x0002,
00135         DEV_PW_REKEY = 0x0003,
00136         DEV_PW_PUSHBUTTON = 0x0004,
00137         DEV_PW_REGISTRAR_SPECIFIED = 0x0005
00138 };
00139 
00140 /* Message Type */
00141 enum wps_msg_type {
00142         WPS_Beacon = 0x01,
00143         WPS_ProbeRequest = 0x02,
00144         WPS_ProbeResponse = 0x03,
00145         WPS_M1 = 0x04,
00146         WPS_M2 = 0x05,
00147         WPS_M2D = 0x06,
00148         WPS_M3 = 0x07,
00149         WPS_M4 = 0x08,
00150         WPS_M5 = 0x09,
00151         WPS_M6 = 0x0a,
00152         WPS_M7 = 0x0b,
00153         WPS_M8 = 0x0c,
00154         WPS_WSC_ACK = 0x0d,
00155         WPS_WSC_NACK = 0x0e,
00156         WPS_WSC_DONE = 0x0f
00157 };
00158 
00159 /* Authentication Type Flags */
00160 #define WPS_AUTH_OPEN 0x0001
00161 #define WPS_AUTH_WPAPSK 0x0002
00162 #define WPS_AUTH_SHARED 0x0004
00163 #define WPS_AUTH_WPA 0x0008
00164 #define WPS_AUTH_WPA2 0x0010
00165 #define WPS_AUTH_WPA2PSK 0x0020
00166 #define WPS_AUTH_TYPES (WPS_AUTH_OPEN | WPS_AUTH_WPAPSK | WPS_AUTH_SHARED | \
00167                         WPS_AUTH_WPA | WPS_AUTH_WPA2 | WPS_AUTH_WPA2PSK)
00168 
00169 /* Encryption Type Flags */
00170 #define WPS_ENCR_NONE 0x0001
00171 #define WPS_ENCR_WEP 0x0002
00172 #define WPS_ENCR_TKIP 0x0004
00173 #define WPS_ENCR_AES 0x0008
00174 #define WPS_ENCR_TYPES (WPS_ENCR_NONE | WPS_ENCR_WEP | WPS_ENCR_TKIP | \
00175                         WPS_ENCR_AES)
00176 
00177 /* Configuration Error */
00178 enum wps_config_error {
00179         WPS_CFG_NO_ERROR = 0,
00180         WPS_CFG_OOB_IFACE_READ_ERROR = 1,
00181         WPS_CFG_DECRYPTION_CRC_FAILURE = 2,
00182         WPS_CFG_24_CHAN_NOT_SUPPORTED = 3,
00183         WPS_CFG_50_CHAN_NOT_SUPPORTED = 4,
00184         WPS_CFG_SIGNAL_TOO_WEAK = 5,
00185         WPS_CFG_NETWORK_AUTH_FAILURE = 6,
00186         WPS_CFG_NETWORK_ASSOC_FAILURE = 7,
00187         WPS_CFG_NO_DHCP_RESPONSE = 8,
00188         WPS_CFG_FAILED_DHCP_CONFIG = 9,
00189         WPS_CFG_IP_ADDR_CONFLICT = 10,
00190         WPS_CFG_NO_CONN_TO_REGISTRAR = 11,
00191         WPS_CFG_MULTIPLE_PBC_DETECTED = 12,
00192         WPS_CFG_ROGUE_SUSPECTED = 13,
00193         WPS_CFG_DEVICE_BUSY = 14,
00194         WPS_CFG_SETUP_LOCKED = 15,
00195         WPS_CFG_MSG_TIMEOUT = 16,
00196         WPS_CFG_REG_SESS_TIMEOUT = 17,
00197         WPS_CFG_DEV_PASSWORD_AUTH_FAILURE = 18
00198 };
00199 
00200 /* RF Bands */
00201 #define WPS_RF_24GHZ 0x01
00202 #define WPS_RF_50GHZ 0x02
00203 
00204 /* Config Methods */
00205 #define WPS_CONFIG_USBA 0x0001
00206 #define WPS_CONFIG_ETHERNET 0x0002
00207 #define WPS_CONFIG_LABEL 0x0004
00208 #define WPS_CONFIG_DISPLAY 0x0008
00209 #define WPS_CONFIG_EXT_NFC_TOKEN 0x0010
00210 #define WPS_CONFIG_INT_NFC_TOKEN 0x0020
00211 #define WPS_CONFIG_NFC_INTERFACE 0x0040
00212 #define WPS_CONFIG_PUSHBUTTON 0x0080
00213 #define WPS_CONFIG_KEYPAD 0x0100
00214 
00215 /* Connection Type Flags */
00216 #define WPS_CONN_ESS 0x01
00217 #define WPS_CONN_IBSS 0x02
00218 
00219 /* Wi-Fi Protected Setup State */
00220 enum wps_state {
00221         WPS_STATE_NOT_CONFIGURED = 1,
00222         WPS_STATE_CONFIGURED = 2
00223 };
00224 
00225 /* Association State */
00226 enum wps_assoc_state {
00227         WPS_ASSOC_NOT_ASSOC = 0,
00228         WPS_ASSOC_CONN_SUCCESS = 1,
00229         WPS_ASSOC_CFG_FAILURE = 2,
00230         WPS_ASSOC_FAILURE = 3,
00231         WPS_ASSOC_IP_FAILURE = 4
00232 };
00233 
00234 
00235 #define WPS_DEV_OUI_WFA 0x0050f204
00236 
00237 enum wps_dev_categ {
00238         WPS_DEV_COMPUTER = 1,
00239         WPS_DEV_INPUT = 2,
00240         WPS_DEV_PRINTER = 3,
00241         WPS_DEV_CAMERA = 4,
00242         WPS_DEV_STORAGE = 5,
00243         WPS_DEV_NETWORK_INFRA = 6,
00244         WPS_DEV_DISPLAY = 7,
00245         WPS_DEV_MULTIMEDIA = 8,
00246         WPS_DEV_GAMING = 9,
00247         WPS_DEV_PHONE = 10
00248 };
00249 
00250 enum wps_dev_subcateg {
00251         WPS_DEV_COMPUTER_PC = 1,
00252         WPS_DEV_COMPUTER_SERVER = 2,
00253         WPS_DEV_COMPUTER_MEDIA_CENTER = 3,
00254         WPS_DEV_PRINTER_PRINTER = 1,
00255         WPS_DEV_PRINTER_SCANNER = 2,
00256         WPS_DEV_CAMERA_DIGITAL_STILL_CAMERA = 1,
00257         WPS_DEV_STORAGE_NAS = 1,
00258         WPS_DEV_NETWORK_INFRA_AP = 1,
00259         WPS_DEV_NETWORK_INFRA_ROUTER = 2,
00260         WPS_DEV_NETWORK_INFRA_SWITCH = 3,
00261         WPS_DEV_DISPLAY_TV = 1,
00262         WPS_DEV_DISPLAY_PICTURE_FRAME = 2,
00263         WPS_DEV_DISPLAY_PROJECTOR = 3,
00264         WPS_DEV_MULTIMEDIA_DAR = 1,
00265         WPS_DEV_MULTIMEDIA_PVR = 2,
00266         WPS_DEV_MULTIMEDIA_MCX = 3,
00267         WPS_DEV_GAMING_XBOX = 1,
00268         WPS_DEV_GAMING_XBOX360 = 2,
00269         WPS_DEV_GAMING_PLAYSTATION = 3,
00270         WPS_DEV_PHONE_WINDOWS_MOBILE = 1
00271 };
00272 
00273 
00274 /* Request Type */
00275 enum wps_request_type {
00276         WPS_REQ_ENROLLEE_INFO = 0,
00277         WPS_REQ_ENROLLEE = 1,
00278         WPS_REQ_REGISTRAR = 2,
00279         WPS_REQ_WLAN_MANAGER_REGISTRAR = 3
00280 };
00281 
00282 /* Response Type */
00283 enum wps_response_type {
00284         WPS_RESP_ENROLLEE_INFO = 0,
00285         WPS_RESP_ENROLLEE = 1,
00286         WPS_RESP_REGISTRAR = 2,
00287         WPS_RESP_AP = 3
00288 };
00289 
00290 /* Walk Time for push button configuration (in seconds) */
00291 #define WPS_PBC_WALK_TIME 120
00292 
00293 #endif /* WPS_DEFS_H */


wpa_supplicant_node
Author(s): Package maintained by Blaise Gassend
autogenerated on Thu Apr 24 2014 15:33:22