libwifi 0.0.3
An 802.11 Frame Parsing and Generation library in C
types.h File Reference

Go to the source code of this file.

Macros

#define libwifi_check_capabilities(x, cap)   (BYTESWAP16(x) & (1 << cap))
 

Enumerations

enum  libwifi_reason_codes {
  REASON_UNSPECIFIED_FAILURE = 1 , REASON_PREVIOUS_AUTH_INVALID = 2 , REASON_STA_LEAVING_ESS = 3 , REASON_INACTIVE = 4 ,
  REASON_TOO_MANY_STAS = 5 , REASON_CLASS_2_FRAME = 6 , REASON_CLASS_3_FRAME = 7 , REASON_STA_LEAVING_BSS = 8 ,
  REASON_STA_REQUESTING_REASSOC_NOT_AUTHED = 9 , REASON_UNNACCEPTABLE_POWER_CAPABILITY = 10 , REASON_UNNACCEPTABLE_CHANNELS = 11 , REASON_BSS_TRANSITION_MGMT = 12 ,
  REASON_INVALID_ELEMENT = 13 , REASON_MIC_FAILURE = 14 , REASON_FOURWAY_HANDSHAKE_TIMEOUT = 15 , REASON_GROUPKEY_HANDSHAKE_TIMEOUT = 16 ,
  REASON_INVALID_FOURWAY = 17 , REASON_INVALID_GROUP_CIPHER = 18 , REASON_INVALID_PAIRWISE_CIPHER = 19 , REASON_INVALID_AKMP = 20 ,
  REASON_UNSUPPORTED_RSNE_VERSION = 21 , REASON_INVALID_RSNE_CAPABILITIES = 22 , REASON_INVALID_8021X_AUTH = 23 , REASON_CIPHER_SUITE_REJECTED = 24 ,
  REASON_TDLS_DIRECT_LINK_TEARDOWN_UNREACHABLE = 25 , REASON_TDLS_DIRECT_LINK_TEARDOWN_UNSPECIFIED = 26 , REASON_SSP_REQUEST = 27 , REASON_LACKS_SSP_ROAMING = 28 ,
  REASON_CIPHER_OR_AKM_REQUIRED = 29 , REASON_SERVICE_NOT_AUTHORIZED = 30 , REASON_SERVICE_CHANGE_PRECLUDES_TS = 31 , REASON_UNSPECIFIED_QOS = 32 ,
  REASON_INSUFFICIENT_BANDWIDTH = 33 , REASON_EXCESSIVE_ACKS_REQUIRED = 34 , REASON_TXOPS_EXCEEDED = 35 , REASON_STA_LEAVING = 36 ,
  REASON_END_TS = 37 , REASON_UNKNOWN_TS_OR_BA = 38 , REASON_TIMEOUT = 39 , REASON_PEERKEY_MISMATCH = 45 ,
  REASON_PEER_INITIATED = 46 , REASON_AP_INITIATED = 47 , REASON_INVALID_FT_ACTION_FRAMECOUNT = 48 , REASON_INVALID_PMKI = 49 ,
  REASON_INVALID_MDE = 50 , REASON_INVALID_FTE = 51 , REASON_MESH_PEERING_CANCELED = 52 , REASON_MESH_MAX_PEERS = 53 ,
  REASON_MESH_CONFIGURATION_POLICY_VIOLATION = 54 , REASON_MESH_CLOSE_RCVD = 55 , REASON_MESH_MAX_RETRIES = 56 , REASON_MESH_CONFIRM_TIMEOUT = 57 ,
  REASON_MESH_INVALID_GTK = 58 , REASON_MESH_INCONSISTENT_PARAMETERS = 59 , REASON_MESH_INVALID_SECURITY_CAPABILITY = 60 , REASON_MESH_PATH_ERROR_NO_PROXY_INFORMATION = 61 ,
  REASON_MESH_PATH_ERROR_NO_FORWARDING_INFORMATION = 62 , REASON_MESH_PATH_ERROR_DESTINATION_UNREACHABLE = 63 , REASON_MAC_ADDRESS_ALREADY_EXISTS_IN_MBSS = 64 , REASON_MESH_CHANNEL_SWITCH_REGULATORY_REQUIREMENTS = 65 ,
  REASON_MESH_CHANNEL_SWITCH_UNSPECIFIED = 66
}
 
enum  libwifi_status_codes {
  STATUS_SUCCESS = 0 , STATUS_REFUSED = 1 , STATUS_TDLS_REJECTED_ALTERNATIVE_PROVIDED = 2 , STATUS_SECURITY_DISABLED = 5 ,
  STATUS_UNACCEPTABLE_LIFETIME = 6 , STATUS_NOT_IN_SAME_BSS = 7 , STATUS_REFUSED_CAPABILITIES_MISMATCH = 10 , STATUS_DENIED_NO_ASSOCIATION_EXISTS = 11 ,
  STATUS_DENIED_OTHER_REASON = 12 , STATUS_UNSUPPORTED_AUTH_ALGORITHM = 13 , STATUS_TRANSACTION_SEQUENCE_ERROR = 14 , STATUS_CHALLENGE_FAILURE = 15 ,
  STATUS_REJECTED_SEQUENCE_TIMEOUT = 16 , STATUS_DENIED_NO_MORE_STAS = 17 , STATUS_REFUSED_BASIC_RATES_MISMATCH = 18 , STATUS_DENIED_NO_SHORT_PREAMBLE_SUPPORT = 19 ,
  STATUS_REJECTED_SPECTRUM_MANAGEMENT_REQUIRED = 22 , STATUS_REJECTED_BAD_POWER_CAPABILITY = 23 , STATUS_REJECTED_BAD_SUPPORTED_CHANNELS = 24 , STATUS_DENIED_NO_SHORT_SLOT_TIME_SUPPORT = 25 ,
  STATUS_DENIED_NO_HT_SUPPORT = 27 , STATUS_R0KH_UNREACHABLE = 28 , STATUS_DENIED_PCO_TIME_NOT_SUPPORTED = 29 , STATUS_REFUSED_TEMPORARILY = 30 ,
  STATUS_ROBUST_MANAGEMENT_POLICY_VIOLATION = 31 , STATUS_UNSPECIFIED_QOS_FAILURE = 32 , STATUS_DENIED_INSUFFICIENT_BANDWIDTH = 33 , STATUS_DENIED_POOR_CHANNEL_CONDITIONS = 34 ,
  STATUS_DENIED_QOS_NOT_SUPPORTED = 35 , STATUS_REQUEST_DECLINED = 37 , STATUS_INVALID_PARAMETERS = 38 , STATUS_REJECTED_WITH_SUGGESTED_CHANGES = 39 ,
  STATUS_STATUS_INVALID_ELEMENT = 40 , STATUS_STATUS_INVALID_GROUP_CIPHER = 41 , STATUS_STATUS_INVALID_PAIRWISE_CIPHER = 42 , STATUS_STATUS_INVALID_AKMP = 43 ,
  STATUS_UNSUPPORTED_RSNE_VERSION = 44 , STATUS_INVALID_RSNE_CAPABILITIES = 45 , STATUS_STATUS_CIPHER_OUT_OF_POLICY = 46 , STATUS_REJECTED_FOR_DELAY_PERIOD = 47 ,
  STATUS_DLS_NOT_ALLOWED = 48 , STATUS_NOT_PRESENT = 49 , STATUS_NOT_QOS_STA = 50 , STATUS_DENIED_LISTEN_INTERVAL_TOO_LARGE = 51 ,
  STATUS_STATUS_INVALID_FT_ACTION_FRAME_COUNT = 52 , STATUS_STATUS_INVALID_PMKID = 53 , STATUS_STATUS_INVALID_MDE = 54 , STATUS_STATUS_INVALID_FTE = 55 ,
  STATUS_REQUESTED_TCLAS_NOT_SUPPORTED = 56 , STATUS_INSUFFICIENT_TCLAS_PROCESSING_RESOURCES = 57 , STATUS_TRY_ANOTHER_BSS = 58 , STATUS_GAS_ADVERTISEMENT_PROTOCOL_NOT_SUPPORTED = 59 ,
  STATUS_NO_OUTSTANDING_GAS_REQUEST = 60 , STATUS_GAS_RESPONSE_NOT_RECEIVED_FROM = 61 , STATUS_GAS_QUERY_TIMEOUT = 62 , STATUS_GAS_QUERY_RESPONSE_TOO_ = 63 ,
  STATUS_REJECTED_HOME_WITH_SUGGESTED_CHANGES = 64 , STATUS_SERVER_UNREACHABLE = 65 , STATUS_REJECTED_FOR_SSP_PERMISSIONS = 67 , STATUS_REFUSED_UNAUTHENTICATED_ACCESS_NOT_SUPPORTED = 68 ,
  STATUS_INVALID_RSNE = 72 , STATUS_U_APSD_COEXISTANCE_NOT_SUPPORTED = 73 , STATUS_U_APSD_COEX_MODE_NOT_SUPPORTED = 74 , STATUS_BAD_INTERVAL_WITH_U_APSD_COEX = 75 ,
  STATUS_ANTI_CLOGGING_TOKEN_REQUIRED = 76 , STATUS_UNSUPPORTED_FINITE_CYCLIC_GROUP = 77 , STATUS_CANNOT_FIND_ALTERNATIVE_TBTT = 78 , STATUS_TRANSMISSION_FAILURE = 79 ,
  STATUS_REQUESTED_TCLAS_NOT_SUPPORTED_2 = 80 , STATUS_TCLAS_RESOURCES_EXHAUSTED = 81 , STATUS_REJECTED_WITH_SUGGESTED_BSS_TRANSITION = 82 , STATUS_REJECT_WITH_SCHEDULE = 83 ,
  STATUS_REJECT_NO_WAKEUP_SPECIFIED = 84 , STATUS_SUCCESS_POWER_SAVE_MODE = 85 , STATUS_PENDING_ADMITTING_FST_SESSION = 86 , STATUS_PERFORMING_FST_NOW = 87 ,
  STATUS_PENDING_GAP_IN_BA_WINDOW = 88 , STATUS_REJECT_U_PID_SETTING = 89 , STATUS_REFUSED_EXTERNAL_REASON = 92 , STATUS_REFUSED_AP_OUT_OF_MEMORY = 93 ,
  STATUS_REJECTED_EMERGENCY_SERVICES_NOT_SUPPORTED = 94 , STATUS_QUERY_RESPONSE_OUTSTANDING = 95 , STATUS_REJECT_DSE_BAND = 96 , STATUS_TCLAS_PROCESSING_TERMINATED = 97 ,
  STATUS_TS_SCHEDULE_CONFLICT = 98 , STATUS_DENIED_WITH_SUGGESTED_BAND_AND_CHANNEL = 99 , STATUS_MCCAOP_RESERVATION_CONFLICT = 100 , STATUS_MAF_LIMIT_EXCEEDED = 101 ,
  STATUS_MCCA_TRACK_LIMIT_EXCEEDED = 102 , STATUS_DENIED_DUE_TO_SPECTRUM_MANAGEMENT = 103 , STATUS_DENIED_VHT_NOT_SUPPORTED = 104 , STATUS_ENABLEMENT_DENIED = 105 ,
  STATUS_RESTRICTION_FROM_AUTHORIZED_GDB = 106 , STATUS_AUTHORIZATION_DEENABLED = 107
}
 
enum  libwifi_capabilities {
  CAPABILITIES_ESS = 0 , CAPABILITIES_IBSS = 1 , CAPABILITIES_POLL = 2 , CAPABILITIES_POLL_REQ = 3 ,
  CAPABILITIES_PRIVACY = 4 , CAPABILITIES_SHORT_PREAMBLE = 5 , CAPABILITIES_PBCC = 6 , CAPABILITIES_CHAN_AGILITY = 7 ,
  CAPABILITIES_SPECTRUM_AGILITY = 8 & (8 >> 1) , CAPABILITIES_SHORT_SLOT = 10 , CAPABILITIES_POWER_SAVE = 11 , CAPABILITIES_MEASUREMENT = 12 ,
  CAPABILITIES_DSSS_OFDM = 13 , CAPABILITIES_DELAYED_ACK = 14 , CAPABILITIES_IMMEDIATE_ACK = 15
}
 

Macro Definition Documentation

◆ libwifi_check_capabilities

#define libwifi_check_capabilities (   x,
  cap 
)    (BYTESWAP16(x) & (1 << cap))

Definition at line 199 of file types.h.

Enumeration Type Documentation

◆ libwifi_capabilities

Enumerator
CAPABILITIES_ESS 
CAPABILITIES_IBSS 
CAPABILITIES_POLL 
CAPABILITIES_POLL_REQ 
CAPABILITIES_PRIVACY 
CAPABILITIES_SHORT_PREAMBLE 
CAPABILITIES_PBCC 
CAPABILITIES_CHAN_AGILITY 
CAPABILITIES_SPECTRUM_AGILITY 
CAPABILITIES_SHORT_SLOT 
CAPABILITIES_POWER_SAVE 
CAPABILITIES_MEASUREMENT 
CAPABILITIES_DSSS_OFDM 
CAPABILITIES_DELAYED_ACK 
CAPABILITIES_IMMEDIATE_ACK 

Definition at line 200 of file types.h.

◆ libwifi_reason_codes

Enumerator
REASON_UNSPECIFIED_FAILURE 
REASON_PREVIOUS_AUTH_INVALID 
REASON_STA_LEAVING_ESS 
REASON_INACTIVE 
REASON_TOO_MANY_STAS 
REASON_CLASS_2_FRAME 
REASON_CLASS_3_FRAME 
REASON_STA_LEAVING_BSS 
REASON_STA_REQUESTING_REASSOC_NOT_AUTHED 
REASON_UNNACCEPTABLE_POWER_CAPABILITY 
REASON_UNNACCEPTABLE_CHANNELS 
REASON_BSS_TRANSITION_MGMT 
REASON_INVALID_ELEMENT 
REASON_MIC_FAILURE 
REASON_FOURWAY_HANDSHAKE_TIMEOUT 
REASON_GROUPKEY_HANDSHAKE_TIMEOUT 
REASON_INVALID_FOURWAY 
REASON_INVALID_GROUP_CIPHER 
REASON_INVALID_PAIRWISE_CIPHER 
REASON_INVALID_AKMP 
REASON_UNSUPPORTED_RSNE_VERSION 
REASON_INVALID_RSNE_CAPABILITIES 
REASON_INVALID_8021X_AUTH 
REASON_CIPHER_SUITE_REJECTED 
REASON_TDLS_DIRECT_LINK_TEARDOWN_UNREACHABLE 
REASON_TDLS_DIRECT_LINK_TEARDOWN_UNSPECIFIED 
REASON_SSP_REQUEST 
REASON_LACKS_SSP_ROAMING 
REASON_CIPHER_OR_AKM_REQUIRED 
REASON_SERVICE_NOT_AUTHORIZED 
REASON_SERVICE_CHANGE_PRECLUDES_TS 
REASON_UNSPECIFIED_QOS 
REASON_INSUFFICIENT_BANDWIDTH 
REASON_EXCESSIVE_ACKS_REQUIRED 
REASON_TXOPS_EXCEEDED 
REASON_STA_LEAVING 
REASON_END_TS 
REASON_UNKNOWN_TS_OR_BA 
REASON_TIMEOUT 
REASON_PEERKEY_MISMATCH 
REASON_PEER_INITIATED 
REASON_AP_INITIATED 
REASON_INVALID_FT_ACTION_FRAMECOUNT 
REASON_INVALID_PMKI 
REASON_INVALID_MDE 
REASON_INVALID_FTE 
REASON_MESH_PEERING_CANCELED 
REASON_MESH_MAX_PEERS 
REASON_MESH_CONFIGURATION_POLICY_VIOLATION 
REASON_MESH_CLOSE_RCVD 
REASON_MESH_MAX_RETRIES 
REASON_MESH_CONFIRM_TIMEOUT 
REASON_MESH_INVALID_GTK 
REASON_MESH_INCONSISTENT_PARAMETERS 
REASON_MESH_INVALID_SECURITY_CAPABILITY 
REASON_MESH_PATH_ERROR_NO_PROXY_INFORMATION 
REASON_MESH_PATH_ERROR_NO_FORWARDING_INFORMATION 
REASON_MESH_PATH_ERROR_DESTINATION_UNREACHABLE 
REASON_MAC_ADDRESS_ALREADY_EXISTS_IN_MBSS 
REASON_MESH_CHANNEL_SWITCH_REGULATORY_REQUIREMENTS 
REASON_MESH_CHANNEL_SWITCH_UNSPECIFIED 

Definition at line 22 of file types.h.

◆ libwifi_status_codes

Enumerator
STATUS_SUCCESS 
STATUS_REFUSED 
STATUS_TDLS_REJECTED_ALTERNATIVE_PROVIDED 
STATUS_SECURITY_DISABLED 
STATUS_UNACCEPTABLE_LIFETIME 
STATUS_NOT_IN_SAME_BSS 
STATUS_REFUSED_CAPABILITIES_MISMATCH 
STATUS_DENIED_NO_ASSOCIATION_EXISTS 
STATUS_DENIED_OTHER_REASON 
STATUS_UNSUPPORTED_AUTH_ALGORITHM 
STATUS_TRANSACTION_SEQUENCE_ERROR 
STATUS_CHALLENGE_FAILURE 
STATUS_REJECTED_SEQUENCE_TIMEOUT 
STATUS_DENIED_NO_MORE_STAS 
STATUS_REFUSED_BASIC_RATES_MISMATCH 
STATUS_DENIED_NO_SHORT_PREAMBLE_SUPPORT 
STATUS_REJECTED_SPECTRUM_MANAGEMENT_REQUIRED 
STATUS_REJECTED_BAD_POWER_CAPABILITY 
STATUS_REJECTED_BAD_SUPPORTED_CHANNELS 
STATUS_DENIED_NO_SHORT_SLOT_TIME_SUPPORT 
STATUS_DENIED_NO_HT_SUPPORT 
STATUS_R0KH_UNREACHABLE 
STATUS_DENIED_PCO_TIME_NOT_SUPPORTED 
STATUS_REFUSED_TEMPORARILY 
STATUS_ROBUST_MANAGEMENT_POLICY_VIOLATION 
STATUS_UNSPECIFIED_QOS_FAILURE 
STATUS_DENIED_INSUFFICIENT_BANDWIDTH 
STATUS_DENIED_POOR_CHANNEL_CONDITIONS 
STATUS_DENIED_QOS_NOT_SUPPORTED 
STATUS_REQUEST_DECLINED 
STATUS_INVALID_PARAMETERS 
STATUS_REJECTED_WITH_SUGGESTED_CHANGES 
STATUS_STATUS_INVALID_ELEMENT 
STATUS_STATUS_INVALID_GROUP_CIPHER 
STATUS_STATUS_INVALID_PAIRWISE_CIPHER 
STATUS_STATUS_INVALID_AKMP 
STATUS_UNSUPPORTED_RSNE_VERSION 
STATUS_INVALID_RSNE_CAPABILITIES 
STATUS_STATUS_CIPHER_OUT_OF_POLICY 
STATUS_REJECTED_FOR_DELAY_PERIOD 
STATUS_DLS_NOT_ALLOWED 
STATUS_NOT_PRESENT 
STATUS_NOT_QOS_STA 
STATUS_DENIED_LISTEN_INTERVAL_TOO_LARGE 
STATUS_STATUS_INVALID_FT_ACTION_FRAME_COUNT 
STATUS_STATUS_INVALID_PMKID 
STATUS_STATUS_INVALID_MDE 
STATUS_STATUS_INVALID_FTE 
STATUS_REQUESTED_TCLAS_NOT_SUPPORTED 
STATUS_INSUFFICIENT_TCLAS_PROCESSING_RESOURCES 
STATUS_TRY_ANOTHER_BSS 
STATUS_GAS_ADVERTISEMENT_PROTOCOL_NOT_SUPPORTED 
STATUS_NO_OUTSTANDING_GAS_REQUEST 
STATUS_GAS_RESPONSE_NOT_RECEIVED_FROM 
STATUS_GAS_QUERY_TIMEOUT 
STATUS_GAS_QUERY_RESPONSE_TOO_ 
STATUS_REJECTED_HOME_WITH_SUGGESTED_CHANGES 
STATUS_SERVER_UNREACHABLE 
STATUS_REJECTED_FOR_SSP_PERMISSIONS 
STATUS_REFUSED_UNAUTHENTICATED_ACCESS_NOT_SUPPORTED 
STATUS_INVALID_RSNE 
STATUS_U_APSD_COEXISTANCE_NOT_SUPPORTED 
STATUS_U_APSD_COEX_MODE_NOT_SUPPORTED 
STATUS_BAD_INTERVAL_WITH_U_APSD_COEX 
STATUS_ANTI_CLOGGING_TOKEN_REQUIRED 
STATUS_UNSUPPORTED_FINITE_CYCLIC_GROUP 
STATUS_CANNOT_FIND_ALTERNATIVE_TBTT 
STATUS_TRANSMISSION_FAILURE 
STATUS_REQUESTED_TCLAS_NOT_SUPPORTED_2 
STATUS_TCLAS_RESOURCES_EXHAUSTED 
STATUS_REJECTED_WITH_SUGGESTED_BSS_TRANSITION 
STATUS_REJECT_WITH_SCHEDULE 
STATUS_REJECT_NO_WAKEUP_SPECIFIED 
STATUS_SUCCESS_POWER_SAVE_MODE 
STATUS_PENDING_ADMITTING_FST_SESSION 
STATUS_PERFORMING_FST_NOW 
STATUS_PENDING_GAP_IN_BA_WINDOW 
STATUS_REJECT_U_PID_SETTING 
STATUS_REFUSED_EXTERNAL_REASON 
STATUS_REFUSED_AP_OUT_OF_MEMORY 
STATUS_REJECTED_EMERGENCY_SERVICES_NOT_SUPPORTED 
STATUS_QUERY_RESPONSE_OUTSTANDING 
STATUS_REJECT_DSE_BAND 
STATUS_TCLAS_PROCESSING_TERMINATED 
STATUS_TS_SCHEDULE_CONFLICT 
STATUS_DENIED_WITH_SUGGESTED_BAND_AND_CHANNEL 
STATUS_MCCAOP_RESERVATION_CONFLICT 
STATUS_MAF_LIMIT_EXCEEDED 
STATUS_MCCA_TRACK_LIMIT_EXCEEDED 
STATUS_DENIED_DUE_TO_SPECTRUM_MANAGEMENT 
STATUS_DENIED_VHT_NOT_SUPPORTED 
STATUS_ENABLEMENT_DENIED 
STATUS_RESTRICTION_FROM_AUTHORIZED_GDB 
STATUS_AUTHORIZATION_DEENABLED 

Definition at line 87 of file types.h.