libwifi 0.0.3
An 802.11 Frame Parsing and Generation library in C
types.h
Go to the documentation of this file.
1/* Copyright 2021 The libwifi Authors
2 *
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16#ifndef LIBWIFI_CORE_TYPES_H
17#define LIBWIFI_CORE_TYPES_H
18
19#include "../../core/misc/byteswap.h"
20
21/* 802.11 Management Frame "reason code" fixed parameter values */
84};
85
86/* 802.11 Management Frame "status code" fixed parameter values */
91 // Reserved = 4,
95 // Reserved = 8,
96 // Reserved = 9,
107 // Reserved = 20,
108 // Reserved = 21,
113 // Reserved = 26,
123 // Reserved = 36,
153 // Reserved = 66,
156 // Reserved = 69,
157 // Reserved = 70,
158 // Reserved = 71,
177 // Reserved = 90,
178 // Reserved = 91,
195 // Reserved = 108–65535
196};
197
198/* Defined capabilities_information fixed parameter values */
199#define libwifi_check_capabilities(x, cap) (BYTESWAP16(x) & (1 << cap))
216};
217
218#endif /* LIBWIFI_CORE_TYPES_H */
libwifi_reason_codes
Definition: types.h:22
@ REASON_TOO_MANY_STAS
Definition: types.h:27
@ REASON_MESH_MAX_RETRIES
Definition: types.h:73
@ REASON_SERVICE_NOT_AUTHORIZED
Definition: types.h:52
@ REASON_MAC_ADDRESS_ALREADY_EXISTS_IN_MBSS
Definition: types.h:81
@ REASON_UNNACCEPTABLE_POWER_CAPABILITY
Definition: types.h:32
@ REASON_AP_INITIATED
Definition: types.h:64
@ REASON_MESH_PATH_ERROR_NO_FORWARDING_INFORMATION
Definition: types.h:79
@ REASON_MESH_CLOSE_RCVD
Definition: types.h:72
@ REASON_BSS_TRANSITION_MGMT
Definition: types.h:34
@ REASON_MESH_CHANNEL_SWITCH_REGULATORY_REQUIREMENTS
Definition: types.h:82
@ REASON_SSP_REQUEST
Definition: types.h:49
@ REASON_TXOPS_EXCEEDED
Definition: types.h:57
@ REASON_MESH_CONFIGURATION_POLICY_VIOLATION
Definition: types.h:71
@ REASON_STA_REQUESTING_REASSOC_NOT_AUTHED
Definition: types.h:31
@ REASON_TDLS_DIRECT_LINK_TEARDOWN_UNREACHABLE
Definition: types.h:47
@ REASON_MESH_INVALID_GTK
Definition: types.h:75
@ REASON_TIMEOUT
Definition: types.h:61
@ REASON_INVALID_FT_ACTION_FRAMECOUNT
Definition: types.h:65
@ REASON_INSUFFICIENT_BANDWIDTH
Definition: types.h:55
@ REASON_TDLS_DIRECT_LINK_TEARDOWN_UNSPECIFIED
Definition: types.h:48
@ REASON_LACKS_SSP_ROAMING
Definition: types.h:50
@ REASON_INVALID_AKMP
Definition: types.h:42
@ REASON_MIC_FAILURE
Definition: types.h:36
@ REASON_PEER_INITIATED
Definition: types.h:63
@ REASON_INVALID_FOURWAY
Definition: types.h:39
@ REASON_FOURWAY_HANDSHAKE_TIMEOUT
Definition: types.h:37
@ REASON_MESH_CHANNEL_SWITCH_UNSPECIFIED
Definition: types.h:83
@ REASON_STA_LEAVING_BSS
Definition: types.h:30
@ REASON_MESH_INCONSISTENT_PARAMETERS
Definition: types.h:76
@ REASON_INVALID_PMKI
Definition: types.h:66
@ REASON_MESH_INVALID_SECURITY_CAPABILITY
Definition: types.h:77
@ REASON_INVALID_RSNE_CAPABILITIES
Definition: types.h:44
@ REASON_MESH_PATH_ERROR_DESTINATION_UNREACHABLE
Definition: types.h:80
@ REASON_MESH_PATH_ERROR_NO_PROXY_INFORMATION
Definition: types.h:78
@ REASON_UNSPECIFIED_QOS
Definition: types.h:54
@ REASON_PEERKEY_MISMATCH
Definition: types.h:62
@ REASON_INACTIVE
Definition: types.h:26
@ REASON_INVALID_ELEMENT
Definition: types.h:35
@ REASON_UNKNOWN_TS_OR_BA
Definition: types.h:60
@ REASON_CIPHER_OR_AKM_REQUIRED
Definition: types.h:51
@ REASON_STA_LEAVING
Definition: types.h:58
@ REASON_INVALID_8021X_AUTH
Definition: types.h:45
@ REASON_MESH_PEERING_CANCELED
Definition: types.h:69
@ REASON_INVALID_MDE
Definition: types.h:67
@ REASON_CLASS_3_FRAME
Definition: types.h:29
@ REASON_EXCESSIVE_ACKS_REQUIRED
Definition: types.h:56
@ REASON_CIPHER_SUITE_REJECTED
Definition: types.h:46
@ REASON_UNNACCEPTABLE_CHANNELS
Definition: types.h:33
@ REASON_UNSUPPORTED_RSNE_VERSION
Definition: types.h:43
@ REASON_GROUPKEY_HANDSHAKE_TIMEOUT
Definition: types.h:38
@ REASON_INVALID_PAIRWISE_CIPHER
Definition: types.h:41
@ REASON_SERVICE_CHANGE_PRECLUDES_TS
Definition: types.h:53
@ REASON_INVALID_FTE
Definition: types.h:68
@ REASON_MESH_MAX_PEERS
Definition: types.h:70
@ REASON_MESH_CONFIRM_TIMEOUT
Definition: types.h:74
@ REASON_UNSPECIFIED_FAILURE
Definition: types.h:23
@ REASON_STA_LEAVING_ESS
Definition: types.h:25
@ REASON_CLASS_2_FRAME
Definition: types.h:28
@ REASON_END_TS
Definition: types.h:59
@ REASON_INVALID_GROUP_CIPHER
Definition: types.h:40
@ REASON_PREVIOUS_AUTH_INVALID
Definition: types.h:24
libwifi_status_codes
Definition: types.h:87
@ STATUS_NOT_PRESENT
Definition: types.h:136
@ STATUS_NO_OUTSTANDING_GAS_REQUEST
Definition: types.h:147
@ STATUS_TS_SCHEDULE_CONFLICT
Definition: types.h:185
@ STATUS_REFUSED_CAPABILITIES_MISMATCH
Definition: types.h:97
@ STATUS_NOT_IN_SAME_BSS
Definition: types.h:94
@ STATUS_REJECTED_HOME_WITH_SUGGESTED_CHANGES
Definition: types.h:151
@ STATUS_SUCCESS_POWER_SAVE_MODE
Definition: types.h:172
@ STATUS_REJECTED_EMERGENCY_SERVICES_NOT_SUPPORTED
Definition: types.h:181
@ STATUS_STATUS_INVALID_GROUP_CIPHER
Definition: types.h:128
@ STATUS_STATUS_INVALID_PAIRWISE_CIPHER
Definition: types.h:129
@ STATUS_AUTHORIZATION_DEENABLED
Definition: types.h:194
@ STATUS_REJECTED_FOR_DELAY_PERIOD
Definition: types.h:134
@ STATUS_STATUS_CIPHER_OUT_OF_POLICY
Definition: types.h:133
@ STATUS_REJECTED_WITH_SUGGESTED_BSS_TRANSITION
Definition: types.h:169
@ STATUS_MCCA_TRACK_LIMIT_EXCEEDED
Definition: types.h:189
@ STATUS_REJECT_DSE_BAND
Definition: types.h:183
@ STATUS_REFUSED_TEMPORARILY
Definition: types.h:117
@ STATUS_REJECTED_SPECTRUM_MANAGEMENT_REQUIRED
Definition: types.h:109
@ STATUS_REQUESTED_TCLAS_NOT_SUPPORTED
Definition: types.h:143
@ STATUS_TCLAS_RESOURCES_EXHAUSTED
Definition: types.h:168
@ STATUS_NOT_QOS_STA
Definition: types.h:137
@ STATUS_INVALID_RSNE_CAPABILITIES
Definition: types.h:132
@ STATUS_TRANSMISSION_FAILURE
Definition: types.h:166
@ STATUS_PENDING_ADMITTING_FST_SESSION
Definition: types.h:173
@ STATUS_DENIED_PCO_TIME_NOT_SUPPORTED
Definition: types.h:116
@ STATUS_CHALLENGE_FAILURE
Definition: types.h:102
@ STATUS_REJECTED_BAD_SUPPORTED_CHANNELS
Definition: types.h:111
@ STATUS_DENIED_DUE_TO_SPECTRUM_MANAGEMENT
Definition: types.h:190
@ STATUS_STATUS_INVALID_AKMP
Definition: types.h:130
@ STATUS_REFUSED_UNAUTHENTICATED_ACCESS_NOT_SUPPORTED
Definition: types.h:155
@ STATUS_DENIED_NO_ASSOCIATION_EXISTS
Definition: types.h:98
@ STATUS_UNSPECIFIED_QOS_FAILURE
Definition: types.h:119
@ STATUS_REJECT_NO_WAKEUP_SPECIFIED
Definition: types.h:171
@ STATUS_GAS_QUERY_RESPONSE_TOO_
Definition: types.h:150
@ STATUS_DENIED_LISTEN_INTERVAL_TOO_LARGE
Definition: types.h:138
@ STATUS_DENIED_POOR_CHANNEL_CONDITIONS
Definition: types.h:121
@ STATUS_SERVER_UNREACHABLE
Definition: types.h:152
@ STATUS_CANNOT_FIND_ALTERNATIVE_TBTT
Definition: types.h:165
@ STATUS_DLS_NOT_ALLOWED
Definition: types.h:135
@ STATUS_STATUS_INVALID_MDE
Definition: types.h:141
@ STATUS_QUERY_RESPONSE_OUTSTANDING
Definition: types.h:182
@ STATUS_UNSUPPORTED_FINITE_CYCLIC_GROUP
Definition: types.h:164
@ STATUS_SUCCESS
Definition: types.h:88
@ STATUS_DENIED_QOS_NOT_SUPPORTED
Definition: types.h:122
@ STATUS_RESTRICTION_FROM_AUTHORIZED_GDB
Definition: types.h:193
@ STATUS_UNSUPPORTED_AUTH_ALGORITHM
Definition: types.h:100
@ STATUS_DENIED_NO_SHORT_PREAMBLE_SUPPORT
Definition: types.h:106
@ STATUS_REJECTED_SEQUENCE_TIMEOUT
Definition: types.h:103
@ STATUS_TCLAS_PROCESSING_TERMINATED
Definition: types.h:184
@ STATUS_MAF_LIMIT_EXCEEDED
Definition: types.h:188
@ STATUS_BAD_INTERVAL_WITH_U_APSD_COEX
Definition: types.h:162
@ STATUS_TDLS_REJECTED_ALTERNATIVE_PROVIDED
Definition: types.h:90
@ STATUS_REJECTED_WITH_SUGGESTED_CHANGES
Definition: types.h:126
@ STATUS_STATUS_INVALID_ELEMENT
Definition: types.h:127
@ STATUS_REJECT_WITH_SCHEDULE
Definition: types.h:170
@ STATUS_INVALID_RSNE
Definition: types.h:159
@ STATUS_UNACCEPTABLE_LIFETIME
Definition: types.h:93
@ STATUS_U_APSD_COEX_MODE_NOT_SUPPORTED
Definition: types.h:161
@ STATUS_STATUS_INVALID_FT_ACTION_FRAME_COUNT
Definition: types.h:139
@ STATUS_ANTI_CLOGGING_TOKEN_REQUIRED
Definition: types.h:163
@ STATUS_INVALID_PARAMETERS
Definition: types.h:125
@ STATUS_DENIED_NO_MORE_STAS
Definition: types.h:104
@ STATUS_R0KH_UNREACHABLE
Definition: types.h:115
@ STATUS_INSUFFICIENT_TCLAS_PROCESSING_RESOURCES
Definition: types.h:144
@ STATUS_SECURITY_DISABLED
Definition: types.h:92
@ STATUS_REFUSED_AP_OUT_OF_MEMORY
Definition: types.h:180
@ STATUS_PERFORMING_FST_NOW
Definition: types.h:174
@ STATUS_REQUEST_DECLINED
Definition: types.h:124
@ STATUS_GAS_ADVERTISEMENT_PROTOCOL_NOT_SUPPORTED
Definition: types.h:146
@ STATUS_DENIED_OTHER_REASON
Definition: types.h:99
@ STATUS_REFUSED_EXTERNAL_REASON
Definition: types.h:179
@ STATUS_REJECT_U_PID_SETTING
Definition: types.h:176
@ STATUS_GAS_QUERY_TIMEOUT
Definition: types.h:149
@ STATUS_ROBUST_MANAGEMENT_POLICY_VIOLATION
Definition: types.h:118
@ STATUS_ENABLEMENT_DENIED
Definition: types.h:192
@ STATUS_DENIED_NO_HT_SUPPORT
Definition: types.h:114
@ STATUS_PENDING_GAP_IN_BA_WINDOW
Definition: types.h:175
@ STATUS_GAS_RESPONSE_NOT_RECEIVED_FROM
Definition: types.h:148
@ STATUS_REFUSED
Definition: types.h:89
@ STATUS_DENIED_NO_SHORT_SLOT_TIME_SUPPORT
Definition: types.h:112
@ STATUS_REJECTED_BAD_POWER_CAPABILITY
Definition: types.h:110
@ STATUS_MCCAOP_RESERVATION_CONFLICT
Definition: types.h:187
@ STATUS_STATUS_INVALID_FTE
Definition: types.h:142
@ STATUS_DENIED_INSUFFICIENT_BANDWIDTH
Definition: types.h:120
@ STATUS_STATUS_INVALID_PMKID
Definition: types.h:140
@ STATUS_TRY_ANOTHER_BSS
Definition: types.h:145
@ STATUS_TRANSACTION_SEQUENCE_ERROR
Definition: types.h:101
@ STATUS_REFUSED_BASIC_RATES_MISMATCH
Definition: types.h:105
@ STATUS_DENIED_WITH_SUGGESTED_BAND_AND_CHANNEL
Definition: types.h:186
@ STATUS_U_APSD_COEXISTANCE_NOT_SUPPORTED
Definition: types.h:160
@ STATUS_REJECTED_FOR_SSP_PERMISSIONS
Definition: types.h:154
@ STATUS_DENIED_VHT_NOT_SUPPORTED
Definition: types.h:191
@ STATUS_UNSUPPORTED_RSNE_VERSION
Definition: types.h:131
@ STATUS_REQUESTED_TCLAS_NOT_SUPPORTED_2
Definition: types.h:167
libwifi_capabilities
Definition: types.h:200
@ CAPABILITIES_IMMEDIATE_ACK
Definition: types.h:215
@ CAPABILITIES_CHAN_AGILITY
Definition: types.h:208
@ CAPABILITIES_MEASUREMENT
Definition: types.h:212
@ CAPABILITIES_DSSS_OFDM
Definition: types.h:213
@ CAPABILITIES_POLL_REQ
Definition: types.h:204
@ CAPABILITIES_PRIVACY
Definition: types.h:205
@ CAPABILITIES_SHORT_SLOT
Definition: types.h:210
@ CAPABILITIES_POWER_SAVE
Definition: types.h:211
@ CAPABILITIES_SHORT_PREAMBLE
Definition: types.h:206
@ CAPABILITIES_POLL
Definition: types.h:203
@ CAPABILITIES_DELAYED_ACK
Definition: types.h:214
@ CAPABILITIES_PBCC
Definition: types.h:207
@ CAPABILITIES_IBSS
Definition: types.h:202
@ CAPABILITIES_ESS
Definition: types.h:201
@ CAPABILITIES_SPECTRUM_AGILITY
Definition: types.h:209