mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-22 13:02:44 +01:00
wsc: Add initial enum definitions from the spec
This commit is contained in:
parent
94aba17968
commit
0389c60066
@ -59,6 +59,7 @@ src_iwd_SOURCES = src/main.c linux/nl80211.h linux/kdbus.h \
|
|||||||
src/agent.h src/agent.c \
|
src/agent.h src/agent.c \
|
||||||
src/storage.h src/storage.c \
|
src/storage.h src/storage.c \
|
||||||
src/network.h src/network.c \
|
src/network.h src/network.c \
|
||||||
|
src/wsc.h \
|
||||||
iwd.h
|
iwd.h
|
||||||
src_iwd_LDADD = ell/libell-internal.la
|
src_iwd_LDADD = ell/libell-internal.la
|
||||||
|
|
||||||
|
258
src/wsc.h
Normal file
258
src/wsc.h
Normal file
@ -0,0 +1,258 @@
|
|||||||
|
/*
|
||||||
|
*
|
||||||
|
* Wireless daemon for Linux
|
||||||
|
*
|
||||||
|
* Copyright (C) 2015 Intel Corporation. All rights reserved.
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Wi-Fi Simple Configuration Technical Specification v2.0.5, Section 12 */
|
||||||
|
enum wsc_attr {
|
||||||
|
WSC_ATTR_8021X_ENABLED = 0x1062,
|
||||||
|
WSC_ATTR_AP_CHANNEL = 0x1001,
|
||||||
|
WSC_ATTR_AP_SETUP_LOCKED = 0x1057,
|
||||||
|
WSC_ATTR_APPLICATION_EXTENTION = 0x1058,
|
||||||
|
WSC_ATTR_APP_SESSION_KEY = 0x1063,
|
||||||
|
WSC_ATTR_ASSOCIATION_STATE = 0x1002,
|
||||||
|
WSC_ATTR_AUTHENTICATION_TYPE = 0x1003,
|
||||||
|
WSC_ATTR_AUTHENTICATION_TYPE_FLAGS = 0x1004,
|
||||||
|
WSC_ATTR_AUTHENTICATOR = 0x1005,
|
||||||
|
WSC_ATTR_CONFIGURATION_ERROR = 0x1009,
|
||||||
|
WSC_ATTR_CONFIGURATION_METHODS = 0x1008,
|
||||||
|
WSC_ATTR_CONFIRMATION_URL4 = 0x100A,
|
||||||
|
WSC_ATTR_CONFIRMATION_URL6 = 0x100B,
|
||||||
|
WSC_ATTR_CONNECTION_TYPE = 0x100C,
|
||||||
|
WSC_ATTR_CONNECTION_TYPE_FLAGS = 0x100D,
|
||||||
|
WSC_ATTR_CREDENTIAL = 0x100E,
|
||||||
|
WSC_ATTR_DEVICE_NAME = 0x1011,
|
||||||
|
WSC_ATTR_DEVICE_PASSWORD_ID = 0x1012,
|
||||||
|
WSC_ATTR_EAP_IDENTITY = 0x104D,
|
||||||
|
WSC_ATTR_EAP_TYPE = 0x1059,
|
||||||
|
WSC_ATTR_E_HASH1 = 0x1014,
|
||||||
|
WSC_ATTR_E_HASH2 = 0x1015,
|
||||||
|
WSC_ATTR_ENCRYPTED_SETTINGS = 0x1018,
|
||||||
|
WSC_ATTR_ENCRYPTION_TYPE = 0x100F,
|
||||||
|
WSC_ATTR_ENCRYPTION_TYPE_FLAGS = 0x1010,
|
||||||
|
WSC_ATTR_ENROLLEE_NONCE = 0x101A,
|
||||||
|
WSC_ATTR_E_SNONCE1 = 0x1016,
|
||||||
|
WSC_ATTR_E_SNONCE2 = 0x1017,
|
||||||
|
WSC_ATTR_FEATURE_ID = 0x101B,
|
||||||
|
WSC_ATTR_IDENTITY = 0x101C,
|
||||||
|
WSC_ATTR_IDENTITY_PROOF = 0x101D,
|
||||||
|
WSC_ATTR_INITIALIZATION_VECTOR = 0x1060,
|
||||||
|
WSC_ATTR_KEY_IDENTIFIER = 0x101F,
|
||||||
|
WSC_ATTR_KEY_LIFETIME = 0x1051,
|
||||||
|
WSC_ATTR_KEY_PROVIDED_AUTOMATICALLY = 0x1061,
|
||||||
|
WSC_ATTR_KEY_WRAP_AUTHENTICATOR = 0x101E,
|
||||||
|
WSC_ATTR_MAC_ADDRESS = 0x1020,
|
||||||
|
WSC_ATTR_MANUFACTURER = 0x1021,
|
||||||
|
WSC_ATTR_MESSAGE_COUNTER = 0x104E,
|
||||||
|
WSC_ATTR_MESSAGE_TYPE = 0x1022,
|
||||||
|
WSC_ATTR_MODEL_NAME = 0x1023,
|
||||||
|
WSC_ATTR_MODEL_NUMBER = 0x1024,
|
||||||
|
WSC_ATTR_NETWORK_INDEX = 0x1026,
|
||||||
|
WSC_ATTR_NETWORK_KEY = 0x1027,
|
||||||
|
WSC_ATTR_NETWORK_KEY_INDEX = 0x1028,
|
||||||
|
WSC_ATTR_NEW_DEVICE_NAME = 0x1029,
|
||||||
|
WSC_ATTR_NEW_PASSWORD = 0x102A,
|
||||||
|
WSC_ATTR_OOB_DEVICE_PASSWORD = 0x102C,
|
||||||
|
WSC_ATTR_OS_VERSION = 0x102D,
|
||||||
|
WSC_ATTR_PERMITTED_CONFIGURATION_METHODS = 0x1052,
|
||||||
|
WSC_ATTR_PORTABLE_DEVICE = 0x1056,
|
||||||
|
WSC_ATTR_POWER_LEVEL = 0x102F,
|
||||||
|
WSC_ATTR_PRIMARY_DEVICE_TYPE = 0x1054,
|
||||||
|
WSC_ATTR_PSK_CURRENT = 0x1030,
|
||||||
|
WSC_ATTR_PSK_MAX = 0x1031,
|
||||||
|
WSC_ATTR_PUBLIC_KEY = 0x1032,
|
||||||
|
WSC_ATTR_PUBLIC_KEY_HASH = 0x104F,
|
||||||
|
WSC_ATTR_RADIO_ENABLED = 0x1033,
|
||||||
|
WSC_ATTR_REBOOT = 0x1034,
|
||||||
|
WSC_ATTR_REGISTRAR_CURRENT = 0x1035,
|
||||||
|
WSC_ATTR_REGISTRAR_ESTABLISHED = 0x1036,
|
||||||
|
WSC_ATTR_REGISTRAR_LIST = 0x1037,
|
||||||
|
WSC_ATTR_REGISTRAR_MAX = 0x1038,
|
||||||
|
WSC_ATTR_REGISTRAR_NONCE = 0x1039,
|
||||||
|
WSC_ATTR_REKEY_KEY = 0x1050,
|
||||||
|
WSC_ATTR_REQUEST_TYPE = 0x103A,
|
||||||
|
WSC_ATTR_REQUESTED_DEVICE_TYPE = 0x106A,
|
||||||
|
WSC_ATTR_RESPONSE_TYPE = 0x103B,
|
||||||
|
WSC_ATTR_RF_BANDS = 0x103C,
|
||||||
|
WSC_ATTR_R_HASH1 = 0x103D,
|
||||||
|
WSC_ATTR_R_HASH2 = 0x103E,
|
||||||
|
WSC_ATTR_R_SNONCE1 = 0x103F,
|
||||||
|
WSC_ATTR_R_SNONCE2 = 0x1040,
|
||||||
|
WSC_ATTR_SECONDARY_DEVICE_TYPE_LIST = 0x1055,
|
||||||
|
WSC_ATTR_SELECTED_REGISTRAR = 0x1041,
|
||||||
|
WSC_ATTR_SELECTED_REGISTRAR_CONFIGURATION_METHODS = 0x1053,
|
||||||
|
WSC_ATTR_SERIAL_NUMBER = 0x1042,
|
||||||
|
WSC_ATTR_SSID = 0x1045,
|
||||||
|
WSC_ATTR_TOTAL_NETWORKS = 0x1046,
|
||||||
|
WSC_ATTR_UUID_E = 0x1047,
|
||||||
|
WSC_ATTR_UUID_R = 0x1048,
|
||||||
|
WSC_ATTR_VENDOR_EXTENSION = 0x1049,
|
||||||
|
WSC_ATTR_VERSION = 0x104A,
|
||||||
|
WSC_ATTR_WEP_TRANSMIT_KEY = 0x1064,
|
||||||
|
WSC_ATTR_WSC_STATE = 0x1044,
|
||||||
|
WSC_ATTR_X509_CERTIFICATE_REQUEST = 0x104B,
|
||||||
|
WSC_ATTR_X509_CERTIFICATE = 0x104C,
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Table 29 */
|
||||||
|
enum wsc_wfa_extension {
|
||||||
|
WSC_WFA_EXTENSION_VERSION2 = 0x00,
|
||||||
|
WSC_WFA_EXTENSION_AUTHORIZED_MACS = 0x01,
|
||||||
|
WSC_WFA_EXTENSION_NETWORK_KEY_SHAREABLE = 0x02,
|
||||||
|
WSC_WFA_EXTENSION_REQUEST_TO_ENROLL = 0x03,
|
||||||
|
WSC_WFA_EXTENSION_SETTINGS_DELAY_TIME = 0x04,
|
||||||
|
WSC_WFA_EXTENSION_REGISTRAR_CONFIGRATION_METHODS = 0x05,
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Table 31 */
|
||||||
|
enum wsc_association_state {
|
||||||
|
WSC_ASSOCIATION_STATE_NOT_ASSOCIATED = 0,
|
||||||
|
WSC_ASSOCIATION_STATE_CONNECTION_SUCCESS = 1,
|
||||||
|
WSC_ASSOCIATION_STATE_CONFIGURATION_FAILURE = 2,
|
||||||
|
WSC_ASSOCIATION_STATE_ASSOCIATION_FAILURE = 3,
|
||||||
|
WSC_ASSOCIATION_STATE_IP_FAILURE = 4,
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Table 32 */
|
||||||
|
enum wsc_authentication_type {
|
||||||
|
WSC_AUTHENTICATION_TYPE_OPEN = 0x0001,
|
||||||
|
WSC_AUTHENTICATION_TYPE_WPA_PERSONAL = 0x0002,
|
||||||
|
WSC_AUTHENTICATION_TYPE_SHARED = 0x0004,
|
||||||
|
WSC_AUTHENTICATION_TYPE_WPA_ENTERPRISE = 0x0008,
|
||||||
|
WSC_AUTHENTICATION_TYPE_WPA2_ENTERPRISE = 0x0010,
|
||||||
|
WSC_AUTHENTICATION_TYPE_WPA2_PERSONAL = 0x0020,
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Table 33 */
|
||||||
|
enum wsc_configration_method {
|
||||||
|
WSC_CONFIGURATION_METHOD_USBA = 0x0001,
|
||||||
|
WSC_CONFIGURATION_METHOD_ETHERNET = 0x0002,
|
||||||
|
WSC_CONFIGURATION_METHOD_LABEL = 0x0004,
|
||||||
|
WSC_CONFIGURATION_METHOD_DISPLAY = 0x0008,
|
||||||
|
WSC_CONFIGURATION_METHOD_EXTERNAL_NFC_TOKEN = 0x0010,
|
||||||
|
WSC_CONFIGURATION_METHOD_INTEGRATED_NFC_TOKEN = 0x0020,
|
||||||
|
WSC_CONFIGURATION_METHOD_NFC_INTERFACE = 0x0040,
|
||||||
|
WSC_CONFIGURATION_METHOD_PUSH_BUTTON = 0x0080,
|
||||||
|
WSC_CONFIGURATION_METHOD_KEYPAD = 0x0100,
|
||||||
|
WSC_CONFIGURATION_METHOD_VIRTUAL_PUSH_BUTTON = 0x0280,
|
||||||
|
WSC_CONFIGURATION_METHOD_PHYSICAL_PUSH_BUTTON = 0x0480,
|
||||||
|
WSC_CONFIGURATION_METHOD_P2P = 0x1000,
|
||||||
|
WSC_CONFIGURATION_METHOD_VIRTUAL_DISPLAY_PIN = 0x2008,
|
||||||
|
WSC_CONFIGURATION_METHOD_PHYSICAL_DISPLAY_PIN = 0x4008,
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Table 34 */
|
||||||
|
enum wsc_configuration_error {
|
||||||
|
WSC_CONFIGURATION_ERROR_NO_ERROR = 0,
|
||||||
|
WSC_CONFIGURATION_ERROR_OOB_INTERFACE_READ_ERROR = 1,
|
||||||
|
WSC_CONFIGURATION_ERROR_DECRYPTION_CRC_FAILURE = 2,
|
||||||
|
WSC_CONFIGURATION_ERROR_2_4_CHANNEL_NOT_SUPPORTED = 3,
|
||||||
|
WSC_CONFIGURATION_ERROR_5_0_CHANNEL_NOT_SUPPORTED = 4,
|
||||||
|
WSC_CONFIGURATION_ERROR_SIGNAL_TOO_WEAK = 5,
|
||||||
|
WSC_CONFIGURATION_ERROR_NETWORK_AUTH_FAILURE = 6,
|
||||||
|
WSC_CONFIGURATION_ERROR_NETWORK_ASSOCIATION_FAILURE = 7,
|
||||||
|
WSC_CONFIGURATION_ERROR_NO_DHCP_RESPONSE = 8,
|
||||||
|
WSC_CONFIGURATION_ERROR_FAILED_DHCP_CONFIG = 9,
|
||||||
|
WSC_CONFIGURATION_ERROR_IP_ADDRESS_CONFILICT = 10,
|
||||||
|
WSC_CONFIGURATION_ERROR_COULD_NOT_CONNECT_TO_REGISTRAR = 11,
|
||||||
|
WSC_CONFIGURATION_ERROR_MULTIPLE_PBC_SESSIONS_DETECTED = 12,
|
||||||
|
WSC_CONFIGURATION_ERROR_ROGUE_ACTIVITY_SUSPECTED = 13,
|
||||||
|
WSC_CONFIGURATION_ERROR_DEVICE_BUSY = 14,
|
||||||
|
WSC_CONFIGURATION_ERROR_SETUP_LOCKED = 15,
|
||||||
|
WSC_CONFIGURATION_ERROR_MESSAGE_TIMEOUT = 16,
|
||||||
|
WSC_CONFIGURATION_ERROR_REGISTRATION_SESSION_TIMEOUT = 17,
|
||||||
|
WSC_CONFIGURATION_ERROR_DEVICE_PASSWORD_AUTH_FAILURE = 18,
|
||||||
|
WSC_CONFIGURATION_ERROR_60_GHZ_CHANNEL_NOT_SUPPORTED = 19,
|
||||||
|
WSC_CONFIGURATION_ERROR_PUBLIC_KEY_HASH_MISMATCH = 20,
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Table 35 */
|
||||||
|
enum wsc_connection_type {
|
||||||
|
WSC_CONNECTION_TYPE_ESS = 0x1,
|
||||||
|
WSC_CONNECTION_TYPE_IBSS = 0x2,
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Table 37 */
|
||||||
|
enum wsc_device_password_id {
|
||||||
|
WSC_DEVICE_PASSWORD_ID_DEFAULT = 0x0000,
|
||||||
|
WSC_DEVICE_PASSWORD_ID_USER_SPECIFIED = 0x0001,
|
||||||
|
WSC_DEVICE_PASSWORD_ID_MACHINE_SPECIFIED = 0x0002,
|
||||||
|
WSC_DEVICE_PASSWORD_ID_REKEY = 0x0003,
|
||||||
|
WSC_DEVICE_PASSWORD_ID_PUSH_BUTTON = 0x0004,
|
||||||
|
WSC_DEVICE_PASSWORD_ID_REGISTRAR_SPECIFIED = 0x0005,
|
||||||
|
WSC_DEVICE_PASSWORD_ID_NFC_CONNECTION_HANDOVER = 0x0007,
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Table 38 */
|
||||||
|
enum wsc_encryption_type {
|
||||||
|
WSC_ENCRYPTION_TYPE_NONE = 0x0001,
|
||||||
|
WSC_ENCRYPTION_TYPE_WEP = 0x0002,
|
||||||
|
WSC_ENCRYPTION_TYPE_TKIP = 0x0004,
|
||||||
|
WSC_ENCRYPTION_TYPE_AES = 0x0008,
|
||||||
|
WSC_ENCRYPTION_TYPE_AES_TKIP = 0x000C,
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Table 39 */
|
||||||
|
enum wsc_message_type {
|
||||||
|
WSC_MESSAGE_TYPE_BEACON = 0x01,
|
||||||
|
WSC_MESSAGE_TYPE_PROBE_REQUEST = 0x02,
|
||||||
|
WSC_MESSAGE_TYPE_PROBE_RESPONSE = 0x03,
|
||||||
|
WSC_MESSAGE_TYPE_M1 = 0x04,
|
||||||
|
WSC_MESSAGE_TYPE_M2 = 0x05,
|
||||||
|
WSC_MESSAGE_TYPE_M2D = 0x06,
|
||||||
|
WSC_MESSAGE_TYPE_M3 = 0x07,
|
||||||
|
WSC_MESSAGE_TYPE_M4 = 0x08,
|
||||||
|
WSC_MESSAGE_TYPE_M5 = 0x09,
|
||||||
|
WSC_MESSAGE_TYPE_M6 = 0x0A,
|
||||||
|
WSC_MESSAGE_TYPE_M7 = 0x0B,
|
||||||
|
WSC_MESSAGE_TYPE_M8 = 0x0C,
|
||||||
|
WSC_MESSAGE_TYPE_WSC_ACK = 0x0D,
|
||||||
|
WSC_MESSAGE_TYPE_WSC_NACK = 0x0E,
|
||||||
|
WSC_MESSAGE_TYPE_WSC_DONE = 0x0F,
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Table 42 */
|
||||||
|
enum wsc_request_type {
|
||||||
|
WSC_REQUEST_TYPE_ENROLLEE_INFO = 0x00,
|
||||||
|
WSC_REQUEST_TYPE_ENROLLEE_OPEN_8021X = 0x01,
|
||||||
|
WSC_REQUEST_TYPE_REGISTRAR = 0x02,
|
||||||
|
WSC_REQUEST_TYPE_WLAN_MANAGER_REGISTRAR = 0x03,
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Table 43 */
|
||||||
|
enum wsc_response_type {
|
||||||
|
WSC_RESPONSE_TYPE_ENROLLEE_INFO = 0x00,
|
||||||
|
WSC_RESPONSE_TYPE_ENROLLEE_OPEN_8021X = 0x01,
|
||||||
|
WSC_RESPONSE_TYPE_REGISTRAR = 0x02,
|
||||||
|
WSC_RESPONSE_TYPE_AP = 0x03,
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Table 44 */
|
||||||
|
enum wsc_rf_band {
|
||||||
|
WSC_RF_BAND_2_4_GHZ = 0x01,
|
||||||
|
WSC_RF_BAND_5_0_GHZ = 0x02,
|
||||||
|
WSC_RF_BAND_60_GHZ = 0x04,
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Table 45 */
|
||||||
|
enum wsc_config_state {
|
||||||
|
WSC_CONFIG_STATE_NOT_CONFIGURED = 0x01,
|
||||||
|
WSC_CONFIG_STATE_CONFIGURED = 0x02,
|
||||||
|
};
|
Loading…
Reference in New Issue
Block a user