libwifi 0.0.3
An 802.11 Frame Parsing and Generation library in C
tag.c
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#include "tag.h"
17#include "tag_iterator.h"
18
19#include <errno.h>
20#include <stdint.h>
21#include <stdlib.h>
22#include <string.h>
23#include <sys/types.h>
24
26 // Calculate the total length of the new tag
27 size_t parameter_len = sizeof(struct libwifi_tag_header) + tag->header.tag_len;
28
29 // Initalise the supplied tagged parameters list, if not already done.
30 // Otherwise, extend the allocation to fit the new tag.
31 if (tags->length == 0) {
32 tags->parameters = malloc(parameter_len);
33 if (tags->parameters == NULL) {
34 return -ENOMEM;
35 }
36 } else {
37 void *buf = realloc(tags->parameters, tags->length + parameter_len);
38 if (buf == NULL) {
39 return -ENOMEM;
40 }
41 tags->parameters = buf;
42 }
43
44 // Append the new tag to the list
45 memcpy(tags->parameters + tags->length, &tag->header, sizeof(struct libwifi_tag_header));
46 memcpy(tags->parameters + tags->length + sizeof(struct libwifi_tag_header), tag->body,
47 tag->header.tag_len);
48
49 // Update total tagged parameters length
50 tags->length += parameter_len;
51
52 return 0;
53}
54
56 // Initalise a tag iterator
57 struct libwifi_tag_iterator it = {0};
59 return -EINVAL;
60 }
61
62 // Loop through the tagged parameters list until landing on the supplied tag number
63 do {
64 if (it.tag_header->tag_num == tag_number) {
65 // Calculate the length of the tag we're removing, so that we know
66 // how many bytes to shrink the tagged parameter list by
67 size_t copy_len = tags->length -
68 (it.tag_data - tags->parameters) -
69 (it.tag_header->tag_len + sizeof(struct libwifi_tag_header));
70 memcpy(tags->parameters, it.tag_data + it.tag_header->tag_len, copy_len);
71 size_t new_len = tags->length - it.tag_header->tag_len - sizeof(struct libwifi_tag_header);
72 tags->parameters = realloc(tags->parameters, new_len);
73 tags->length = new_len;
74 break;
75 }
76 } while (libwifi_tag_iterator_next(&it) != -1);
77
78 return 0;
79}
80
81size_t libwifi_create_tag(struct libwifi_tagged_parameter *tagged_parameter, int tag_number,
82 const unsigned char *tag_data, size_t tag_length) {
83 // Initalise the supplied tagged parameter struct
84 memset(tagged_parameter, 0, sizeof(struct libwifi_tagged_parameter));
85 tagged_parameter->header.tag_len = tag_length;
86 tagged_parameter->header.tag_num = tag_number;
87 tagged_parameter->body = malloc(tag_length);
88 if (tagged_parameter->body == NULL) {
89 return -ENOMEM;
90 }
91 memset(tagged_parameter->body, 0, tag_length);
92
93 // Copy the supplied data into the new tag body
94 memcpy(tagged_parameter->body, tag_data, tag_length);
95
96 return sizeof(struct libwifi_tag_header) + tag_length;
97}
98
99void libwifi_free_tag(struct libwifi_tagged_parameter *tagged_parameter) {
100 free(tagged_parameter->body);
101}
102
103size_t libwifi_dump_tag(struct libwifi_tagged_parameter *tag, unsigned char *buf, size_t buf_len) {
104 if (tag->header.tag_len > buf_len) {
105 return -EINVAL;
106 }
107
108 size_t offset = 0;
109
110 memcpy(buf, &tag->header, sizeof(struct libwifi_tag_header));
111 offset += sizeof(struct libwifi_tag_header);
112 memcpy(buf + offset, tag->body, tag->header.tag_len);
113 offset += tag->header.tag_len;
114
115 return sizeof(struct libwifi_tag_header) + tag->header.tag_len;
116}
117
119 const unsigned char *tag_data, size_t tag_length) {
120 struct libwifi_tagged_parameter tagged_parameter = {0};
121
122 size_t ret = libwifi_create_tag(&tagged_parameter, tag_number, tag_data, tag_length);
123 if (ret <= 0) {
124 return ret;
125 }
126
127 libwifi_add_tag(tags, &tagged_parameter);
128 libwifi_free_tag(&tagged_parameter);
129
130 return 0;
131}
132
134 int tag_count = 0;
135 struct libwifi_tag_iterator it = {0};
137 return -EINVAL;
138 }
139
140 do {
141 if (it.tag_header->tag_num == tag_number) {
142 tag_count++;
143 }
144 } while (libwifi_tag_iterator_next(&it) != -1);
145
146 return tag_count;
147}
148
149char* libwifi_get_tag_name(int tag_number) {
150 switch (tag_number) {
151 case TAG_SSID:
152 return "TAG_SSID";
153 case TAG_SUPP_RATES:
154 return "TAG_SUPP_RATES";
155 case TAG_DS_PARAMETER:
156 return "TAG_DS_PARAMETER";
157 case TAG_CF_PARAMETER:
158 return "TAG_CF_PARAMETER";
159 case TAG_TIM:
160 return "TAG_TIM";
162 return "TAG_BSS_PARAMETERS";
163 case TAG_COUNTRY:
164 return "TAG_COUNTRY";
165 case TAG_REQUEST:
166 return "TAG_REQUEST";
167 case TAG_BSS_LOAD:
168 return "TAG_BSS_LOAD";
170 return "TAG_EDCA_PARAMETERS";
171 case TAG_TSPEC:
172 return "TAG_TSPEC";
173 case TAG_TCLAS:
174 return "TAG_TCLAS";
175 case TAG_SCHEDULE:
176 return "TAG_SCHEDULE";
178 return "TAG_CHALLENGE_TEXT";
180 return "TAG_POWER_CONSTRAINT";
182 return "TAG_POWER_CAPABILITY";
183 case TAG_TPC_REQUEST:
184 return "TAG_TPC_REQUEST";
185 case TAG_TPC_REPORT:
186 return "TAG_TPC_REPORT";
188 return "TAG_SUPPORTED_CHANNELS";
190 return "TAG_CHANNEL_SWITCH_ANNOUNCEMENT";
192 return "TAG_MEASUREMENT_REQUEST";
194 return "TAG_MEASUREMENT_REPORT";
195 case TAG_QUIET:
196 return "TAG_QUIET";
197 case TAG_IBSS_DFS:
198 return "TAG_IBSS_DFS";
199 case TAG_ERP:
200 return "TAG_ERP";
201 case TAG_TS_DELAY:
202 return "TAG_TS_DELAY";
204 return "TAG_TCLAS_PROCESSING";
206 return "TAG_HT_CAPABILITIES";
208 return "TAG_QOS_CAPABILITY";
209 case TAG_RSN:
210 return "TAG_RSN";
212 return "TAG_EXTENDED_SUPPORTED_RATES";
214 return "TAG_AP_CHANNEL_REPORT";
216 return "TAG_NEIGHBOR_REPORT";
217 case TAG_RCPI:
218 return "TAG_RCPI";
220 return "TAG_MOBILITY_DOMAIN";
222 return "TAG_FAST_BSS_TRANSITION";
224 return "TAG_TIMEOUT_INTERVAL";
225 case TAG_RIC_DATA:
226 return "TAG_RIC_DATA";
228 return "TAG_DSE_REGISTERED_LOCATION";
230 return "TAG_SUPPORTED_OPERATING_CLASSES";
232 return "TAG_EXTENDED_CHANNEL_SWITCH_ANNOUNCEMENT";
233 case TAG_HT_OPERATION:
234 return "TAG_HT_OPERATION";
236 return "TAG_SECONDARY_CHANNEL_OFFSET";
238 return "TAG_BSS_AVERAGE_ACCESS_DELAY";
239 case TAG_ANTENNA:
240 return "TAG_ANTENNA";
241 case TAG_RSNI:
242 return "TAG_RSNI";
244 return "TAG_MEASUREMENT_PILOT_TRANSMISSION";
246 return "TAG_BSS_AVAILABLE_ADMISSION_CAPACITY";
248 return "TAG_BSS_AC_ACCESS_DELAY";
250 return "TAG_TIME_ADVERTISEMENT";
252 return "TAG_RM_ENABLED_CAPABILITIES";
254 return "TAG_MULTIPLE_BSSID";
256 return "TAG_BSS_COEXISTENCE";
258 return "TAG_BSS_INTOLERANT_CHANNEL_REPORT";
260 return "TAG_OVERLAPPING_BSS_PARAMETERS";
262 return "TAG_RIC_DESCRIPTOR";
264 return "TAG_MANAGEMENT_MIC";
266 return "TAG_EVENT_REQUEST";
267 case TAG_EVENT_REPORT:
268 return "TAG_EVENT_REPORT";
270 return "TAG_DIAGNOSTIC_REQUEST";
272 return "TAG_DIAGNOSTIC_REPORT";
274 return "TAG_LOCATION_PARAMTERS";
276 return "TAG_NONTRANSMITTED_BSSID_CAPABILITY";
277 case TAG_SSID_LIST:
278 return "TAG_SSID_LIST";
280 return "TAG_MULTIPLE_BSSID_INDEX";
282 return "TAG_FMS_DESCRIPTOR";
283 case TAG_FMS_REQUEST:
284 return "TAG_FMS_REQUEST";
285 case TAG_FMS_RESPONSE:
286 return "TAG_FMS_RESPONSE";
288 return "TAG_QOS_TRAFFIC_CAPABILITY";
290 return "TAG_BSS_MAX_IDLE_PERIOD";
291 case TAG_TFS_REQUEST:
292 return "TAG_TFS_REQUEST";
293 case TAG_TFS_RESPONSE:
294 return "TAG_TFS_RESPONSE";
296 return "TAG_WNM_SLEEP_MODE";
298 return "TAG_TIM_BROADCAST_REQUEST";
300 return "TAG_TIM_BROADCAST_RESPONSE";
302 return "TAG_COLLOCATED_INTERFERENCE_REPORT";
304 return "TAG_CHANNEL_USAGE";
305 case TAG_TIME_ZONE:
306 return "TAG_TIME_ZONE";
307 case TAG_DMS_REQUEST:
308 return "TAG_DMS_REQUEST";
309 case TAG_DMS_RESPONSE:
310 return "TAG_DMS_RESPONSE";
312 return "TAG_LINK_IDENTIFIER";
314 return "TAG_WAKEUP_SCHEDULE";
316 return "TAG_CHANNEL_SWITCH_TIMING";
317 case TAG_PTI_CONTROL:
318 return "TAG_PTI_CONTROL";
320 return "TAG_TPU_BUFFER_STATUS";
321 case TAG_INTERWORKING:
322 return "TAG_INTERWORKING";
324 return "TAG_ADVERTISEMENT_PROTOCOL";
326 return "TAG_EXPEDITED_BANDWIDTH_REQUEST";
327 case TAG_QOS_MAP:
328 return "TAG_QOS_MAP";
330 return "TAG_ROAMING_CONSORTIUM";
332 return "TAG_EMERGENCY_ALERT_IDENTIFIER";
334 return "TAG_MESH_CONFIGURATION";
335 case TAG_MESH_ID:
336 return "TAG_MESH_ID";
338 return "TAG_MESH_LINK_METRIC_REPORT";
340 return "TAG_CONGESTION_NOTIFICATION";
342 return "TAG_MESH_PEERING_MANAGEMENT";
344 return "TAG_MESH_CHANNEL_SWITCH_PARAMETERS";
346 return "TAG_MESH_AWAKE_WINDOW";
348 return "TAG_BEACON_TIMING";
350 return "TAG_MCCAOP_SETUP_REQUEST";
352 return "TAG_MCCAOP_SETUP_REPLY";
354 return "TAG_MCCAOP_ADVERTISEMENT";
356 return "TAG_MCCAOP_TEARDOWN";
357 case TAG_GANN:
358 return "TAG_GANN";
359 case TAG_RANN:
360 return "TAG_RANN";
362 return "TAG_EXTENDED_CAPABILITIES";
363 case TAG_PREQ:
364 return "TAG_PREQ";
365 case TAG_PREP:
366 return "TAG_PREP";
367 case TAG_PERR:
368 return "TAG_PERR";
369 case TAG_PXU:
370 return "TAG_PXU";
371 case TAG_PXUC:
372 return "TAG_PXUC";
374 return "TAG_AUTHENTICATED_MESH_PEERING_EXCHANGE";
375 case TAG_MIC:
376 return "TAG_MIC";
378 return "TAG_DESTINATION_URI";
380 return "TAG_U_APSD_COEXISTENCE";
382 return "TAG_DMG_WAKEUP_SCHEDULE";
384 return "TAG_EXTENDED_SCHEDULE";
386 return "TAG_STA_AVAILABILITY";
387 case TAG_DMG_TSPEC:
388 return "TAG_DMG_TSPEC";
389 case TAG_NEXT_DMG_ATI:
390 return "TAG_NEXT_DMG_ATI";
392 return "TAG_DMG_OPERATION";
394 return "TAG_DMG_BSS_PARAMETER_CHANGE";
396 return "TAG_DMG_BEAM_REFINEMENT";
398 return "TAG_CHANNEL_MEASUREMENT_FEEDBACK";
399 case TAG_AWAKE_WINDOW:
400 return "TAG_AWAKE_WINDOW";
401 case TAG_MULTI_BAND:
402 return "TAG_MULTI_BAND";
404 return "TAG_ADDBA_EXTENSION";
405 case TAG_NEXTPCP_LIST:
406 return "TAG_NEXTPCP_LIST";
407 case TAG_PCP_HANDOVER:
408 return "TAG_PCP_HANDOVER";
410 return "TAG_DMG_LINK_MARGIN";
412 return "TAG_SWITCHING_STREAM";
414 return "TAG_SESSION_TRANSITION";
416 return "TAG_DYNAMIC_TONE_PAIRING_REPORT";
418 return "TAG_CLUSTER_REPORT";
420 return "TAG_RELAY_CAPABILITIES";
422 return "TAG_RELAY_TRANSFER_PARAMETER_SET";
424 return "TAG_BEAMLINK_MAINTENANCE";
426 return "TAG_MULTIPLE_MAC_SUBLAYERS";
427 case TAG_U_PID:
428 return "TAG_U_PID";
430 return "TAG_DMG_LINK_ADAPTATION_ACKNOWLEDGEMENT";
432 return "TAG_MCCAOP_ADVERTISEMENT_OVERVIEW";
434 return "TAG_QUIET_PERIOD_REQUEST";
436 return "TAG_QUIET_PERIOD_RESPONSE";
437 case TAG_QMF_POLICY:
438 return "TAG_QMF_POLICY";
439 case TAG_ECAPC_POLICY:
440 return "TAG_ECAPC_POLICY";
442 return "TAG_CLUSTER_TIME_OFFSET";
444 return "TAG_INTRA_ACCESS_CATEGORY_PRIORITY";
446 return "TAG_SCS_DESCRIPTOR";
447 case TAG_QLOAD_REPORT:
448 return "TAG_QLOAD_REPORT";
450 return "TAG_HCCA_TXOP_UPDATE_COUNT";
452 return "TAG_HIGHER_LAYER_STREAM_ID";
454 return "TAG_GCR_GROUP_ADDRESS";
456 return "TAG_ANTENNA_SECTOR_ID_PATTERN";
458 return "TAG_VHT_CAPABILITIES";
460 return "TAG_VHT_OPERATION";
462 return "TAG_EXTENDED_BSS_LOAD";
464 return "TAG_WIDE_BANDWIDTH_CHANNEL_SWITCH";
466 return "TAG_TRANSMIT_POWER_ENVELOPE";
468 return "TAG_CHANNEL_SWITCH_WRAPPER";
469 case TAG_AID:
470 return "TAG_AID";
472 return "TAG_QUIET_CHANNEL";
473 case TAG_UPSIM:
474 return "TAG_UPSIM";
476 return "TAG_REDUCED_NEIGHBOR_REPORT";
478 return "TAG_TVHT_OPERATION";
480 return "TAG_DEVICE_LOCATION";
482 return "TAG_WHITE_SPACE_MAP";
484 return "TAG_FINE_TIMING_MEASUREMENT_PARAMETERS";
486 return "TAG_VENDOR_SPECIFIC";
488 return "TAG_ELEMENT_EXTENSION";
489 default:
490 return "Unknown Tag";
491 }
492}
struct libwifi_tagged_parameters tags
Definition: assoc_request.h:2
A tagged parameter always consists of a tag number and length.
Definition: tag.h:215
uint8_t tag_num
Definition: tag.h:216
uint8_t tag_len
Definition: tag.h:217
A libwifi_tag_iterator is used to iterate through a list of tagged parameters in a wifi frame.
Definition: tag_iterator.h:28
struct libwifi_tag_header * tag_header
Definition: tag_iterator.h:29
const unsigned char * tag_data
Definition: tag_iterator.h:30
unsigned char * body
Definition: tag.h:227
struct libwifi_tag_header header
Definition: tag.h:226
unsigned char * parameters
Definition: tag.h:235
char * libwifi_get_tag_name(int tag_number)
Get the name of a tagged parameter via a supplied tag number.
Definition: tag.c:149
int libwifi_add_tag(struct libwifi_tagged_parameters *tags, struct libwifi_tagged_parameter *tag)
Add a tagged parameter to a list of frame tagged parameters.
Definition: tag.c:25
void libwifi_free_tag(struct libwifi_tagged_parameter *tagged_parameter)
Free a tagged parameters body.
Definition: tag.c:99
int libwifi_quick_add_tag(struct libwifi_tagged_parameters *tags, int tag_number, const unsigned char *tag_data, size_t tag_length)
Add a tagged parameter via tag number and data to a management frame.
Definition: tag.c:118
int libwifi_remove_tag(struct libwifi_tagged_parameters *tags, int tag_number)
Remove a tagged parameter from a list of frame tagged parameters.
Definition: tag.c:55
int libwifi_check_tag(struct libwifi_tagged_parameters *tags, int tag_number)
Check if a tagged parameter is present via tag number.
Definition: tag.c:133
size_t libwifi_create_tag(struct libwifi_tagged_parameter *tagged_parameter, int tag_number, const unsigned char *tag_data, size_t tag_length)
Create a tagged parameter from a tag number, length and data.
Definition: tag.c:81
size_t libwifi_dump_tag(struct libwifi_tagged_parameter *tag, unsigned char *buf, size_t buf_len)
Dump a tagged parameter into a raw buffer, for use with other buffers or injection.
Definition: tag.c:103
uint8_t tag_len
Definition: tag.h:1
struct libwifi_tag_header header
Definition: tag.h:0
@ TAG_ADDBA_EXTENSION
Definition: tag.h:161
@ TAG_EXTENDED_BSS_LOAD
Definition: tag.h:193
@ TAG_CHANNEL_SWITCH_TIMING
Definition: tag.h:113
@ TAG_MCCAOP_TEARDOWN
Definition: tag.h:133
@ TAG_RANN
Definition: tag.h:135
@ TAG_ADVERTISEMENT_PROTOCOL
Definition: tag.h:117
@ TAG_IBSS_DFS
Definition: tag.h:50
@ TAG_TSPEC
Definition: tag.h:36
@ TAG_DESTINATION_URI
Definition: tag.h:146
@ TAG_EXPEDITED_BANDWIDTH_REQUEST
Definition: tag.h:118
@ TAG_FMS_REQUEST
Definition: tag.h:96
@ TAG_DMG_OPERATION
Definition: tag.h:154
@ TAG_DIAGNOSTIC_REPORT
Definition: tag.h:90
@ TAG_CONGESTION_NOTIFICATION
Definition: tag.h:125
@ TAG_BSS_PARAMETERS
Definition: tag.h:30
@ TAG_MULTIPLE_BSSID
Definition: tag.h:80
@ TAG_HT_CAPABILITIES
Definition: tag.h:54
@ TAG_U_APSD_COEXISTENCE
Definition: tag.h:147
@ TAG_TVHT_OPERATION
Definition: tag.h:201
@ TAG_ERP
Definition: tag.h:51
@ TAG_AWAKE_WINDOW
Definition: tag.h:159
@ TAG_MULTIPLE_MAC_SUBLAYERS
Definition: tag.h:172
@ TAG_RIC_DESCRIPTOR
Definition: tag.h:84
@ TAG_EXTENDED_CAPABILITIES
Definition: tag.h:136
@ TAG_SSID_LIST
Definition: tag.h:93
@ TAG_EXTENDED_CHANNEL_SWITCH_ANNOUNCEMENT
Definition: tag.h:69
@ TAG_TIME_ZONE
Definition: tag.h:107
@ TAG_CHALLENGE_TEXT
Definition: tag.h:39
@ TAG_SWITCHING_STREAM
Definition: tag.h:165
@ TAG_HCCA_TXOP_UPDATE_COUNT
Definition: tag.h:187
@ TAG_WAKEUP_SCHEDULE
Definition: tag.h:111
@ TAG_MESH_PEERING_MANAGEMENT
Definition: tag.h:126
@ TAG_DYNAMIC_TONE_PAIRING_REPORT
Definition: tag.h:167
@ TAG_MEASUREMENT_PILOT_TRANSMISSION
Definition: tag.h:75
@ TAG_RELAY_TRANSFER_PARAMETER_SET
Definition: tag.h:170
@ TAG_RM_ENABLED_CAPABILITIES
Definition: tag.h:79
@ TAG_AUTHENTICATED_MESH_PEERING_EXCHANGE
Definition: tag.h:144
@ TAG_EVENT_REPORT
Definition: tag.h:88
@ TAG_SUPPORTED_OPERATING_CLASSES
Definition: tag.h:68
@ TAG_RSN
Definition: tag.h:57
@ TAG_DMG_BSS_PARAMETER_CHANGE
Definition: tag.h:155
@ TAG_QOS_CAPABILITY
Definition: tag.h:55
@ TAG_WNM_SLEEP_MODE
Definition: tag.h:102
@ TAG_DMG_TSPEC
Definition: tag.h:151
@ TAG_DEVICE_LOCATION
Definition: tag.h:203
@ TAG_TPU_BUFFER_STATUS
Definition: tag.h:115
@ TAG_MANAGEMENT_MIC
Definition: tag.h:85
@ TAG_CHANNEL_SWITCH_WRAPPER
Definition: tag.h:196
@ TAG_BSS_AC_ACCESS_DELAY
Definition: tag.h:77
@ TAG_EVENT_REQUEST
Definition: tag.h:87
@ TAG_OVERLAPPING_BSS_PARAMETERS
Definition: tag.h:83
@ TAG_MCCAOP_ADVERTISEMENT_OVERVIEW
Definition: tag.h:176
@ TAG_STA_AVAILABILITY
Definition: tag.h:150
@ TAG_PTI_CONTROL
Definition: tag.h:114
@ TAG_DSE_REGISTERED_LOCATION
Definition: tag.h:67
@ TAG_QOS_MAP
Definition: tag.h:119
@ TAG_NONTRANSMITTED_BSSID_CAPABILITY
Definition: tag.h:92
@ TAG_QLOAD_REPORT
Definition: tag.h:186
@ TAG_BSS_AVAILABLE_ADMISSION_CAPACITY
Definition: tag.h:76
@ TAG_SCHEDULE
Definition: tag.h:38
@ TAG_BSS_AVERAGE_ACCESS_DELAY
Definition: tag.h:72
@ TAG_SCS_DESCRIPTOR
Definition: tag.h:185
@ TAG_TIMEOUT_INTERVAL
Definition: tag.h:65
@ TAG_QUIET_PERIOD_RESPONSE
Definition: tag.h:179
@ TAG_TCLAS_PROCESSING
Definition: tag.h:53
@ TAG_DMG_LINK_MARGIN
Definition: tag.h:164
@ TAG_DMG_LINK_ADAPTATION_ACKNOWLEDGEMENT
Definition: tag.h:174
@ TAG_FMS_RESPONSE
Definition: tag.h:97
@ TAG_QUIET_CHANNEL
Definition: tag.h:198
@ TAG_MULTIPLE_BSSID_INDEX
Definition: tag.h:94
@ TAG_UPSIM
Definition: tag.h:199
@ TAG_CHANNEL_USAGE
Definition: tag.h:106
@ TAG_BEAMLINK_MAINTENANCE
Definition: tag.h:171
@ TAG_POWER_CAPABILITY
Definition: tag.h:42
@ TAG_FMS_DESCRIPTOR
Definition: tag.h:95
@ TAG_PERR
Definition: tag.h:140
@ TAG_LOCATION_PARAMTERS
Definition: tag.h:91
@ TAG_MIC
Definition: tag.h:145
@ TAG_SSID
Definition: tag.h:24
@ TAG_INTRA_ACCESS_CATEGORY_PRIORITY
Definition: tag.h:184
@ TAG_VENDOR_SPECIFIC
Definition: tag.h:207
@ TAG_PREQ
Definition: tag.h:138
@ TAG_BSS_LOAD
Definition: tag.h:34
@ TAG_ANTENNA
Definition: tag.h:73
@ TAG_TIME_ADVERTISEMENT
Definition: tag.h:78
@ TAG_VHT_CAPABILITIES
Definition: tag.h:191
@ TAG_SUPPORTED_CHANNELS
Definition: tag.h:45
@ TAG_INTERWORKING
Definition: tag.h:116
@ TAG_PXU
Definition: tag.h:142
@ TAG_MEASUREMENT_REPORT
Definition: tag.h:48
@ TAG_MOBILITY_DOMAIN
Definition: tag.h:63
@ TAG_SUPP_RATES
Definition: tag.h:25
@ TAG_MCCAOP_SETUP_REPLY
Definition: tag.h:131
@ TAG_CLUSTER_TIME_OFFSET
Definition: tag.h:183
@ TAG_EDCA_PARAMETERS
Definition: tag.h:35
@ TAG_BEACON_TIMING
Definition: tag.h:129
@ TAG_CF_PARAMETER
Definition: tag.h:28
@ TAG_TFS_RESPONSE
Definition: tag.h:101
@ TAG_NEIGHBOR_REPORT
Definition: tag.h:61
@ TAG_U_PID
Definition: tag.h:173
@ TAG_MESH_LINK_METRIC_REPORT
Definition: tag.h:124
@ TAG_DMS_REQUEST
Definition: tag.h:108
@ TAG_WIDE_BANDWIDTH_CHANNEL_SWITCH
Definition: tag.h:194
@ TAG_TIM
Definition: tag.h:29
@ TAG_EMERGENCY_ALERT_IDENTIFIER
Definition: tag.h:121
@ TAG_TPC_REQUEST
Definition: tag.h:43
@ TAG_QUIET_PERIOD_REQUEST
Definition: tag.h:177
@ TAG_TS_DELAY
Definition: tag.h:52
@ TAG_MESH_AWAKE_WINDOW
Definition: tag.h:128
@ TAG_ANTENNA_SECTOR_ID_PATTERN
Definition: tag.h:190
@ TAG_TCLAS
Definition: tag.h:37
@ TAG_EXTENDED_SUPPORTED_RATES
Definition: tag.h:59
@ TAG_HT_OPERATION
Definition: tag.h:70
@ TAG_COUNTRY
Definition: tag.h:31
@ TAG_NEXT_DMG_ATI
Definition: tag.h:152
@ TAG_VHT_OPERATION
Definition: tag.h:192
@ TAG_QOS_TRAFFIC_CAPABILITY
Definition: tag.h:98
@ TAG_AID
Definition: tag.h:197
@ TAG_TPC_REPORT
Definition: tag.h:44
@ TAG_MESH_CHANNEL_SWITCH_PARAMETERS
Definition: tag.h:127
@ TAG_SECONDARY_CHANNEL_OFFSET
Definition: tag.h:71
@ TAG_DMS_RESPONSE
Definition: tag.h:109
@ TAG_TFS_REQUEST
Definition: tag.h:100
@ TAG_BSS_COEXISTENCE
Definition: tag.h:81
@ TAG_HIGHER_LAYER_STREAM_ID
Definition: tag.h:188
@ TAG_ROAMING_CONSORTIUM
Definition: tag.h:120
@ TAG_MESH_CONFIGURATION
Definition: tag.h:122
@ TAG_QUIET
Definition: tag.h:49
@ TAG_TRANSMIT_POWER_ENVELOPE
Definition: tag.h:195
@ TAG_ECAPC_POLICY
Definition: tag.h:182
@ TAG_CHANNEL_SWITCH_ANNOUNCEMENT
Definition: tag.h:46
@ TAG_COLLOCATED_INTERFERENCE_REPORT
Definition: tag.h:105
@ TAG_MULTI_BAND
Definition: tag.h:160
@ TAG_PXUC
Definition: tag.h:143
@ TAG_EXTENDED_SCHEDULE
Definition: tag.h:149
@ TAG_CHANNEL_MEASUREMENT_FEEDBACK
Definition: tag.h:157
@ TAG_NEXTPCP_LIST
Definition: tag.h:162
@ TAG_MESH_ID
Definition: tag.h:123
@ TAG_PCP_HANDOVER
Definition: tag.h:163
@ TAG_MCCAOP_SETUP_REQUEST
Definition: tag.h:130
@ TAG_WHITE_SPACE_MAP
Definition: tag.h:204
@ TAG_RIC_DATA
Definition: tag.h:66
@ TAG_AP_CHANNEL_REPORT
Definition: tag.h:60
@ TAG_TIM_BROADCAST_RESPONSE
Definition: tag.h:104
@ TAG_ELEMENT_EXTENSION
Definition: tag.h:209
@ TAG_DMG_WAKEUP_SCHEDULE
Definition: tag.h:148
@ TAG_SESSION_TRANSITION
Definition: tag.h:166
@ TAG_RCPI
Definition: tag.h:62
@ TAG_BSS_MAX_IDLE_PERIOD
Definition: tag.h:99
@ TAG_LINK_IDENTIFIER
Definition: tag.h:110
@ TAG_REDUCED_NEIGHBOR_REPORT
Definition: tag.h:200
@ TAG_DIAGNOSTIC_REQUEST
Definition: tag.h:89
@ TAG_FINE_TIMING_MEASUREMENT_PARAMETERS
Definition: tag.h:205
@ TAG_DMG_BEAM_REFINEMENT
Definition: tag.h:156
@ TAG_QMF_POLICY
Definition: tag.h:181
@ TAG_FAST_BSS_TRANSITION
Definition: tag.h:64
@ TAG_CLUSTER_REPORT
Definition: tag.h:168
@ TAG_MCCAOP_ADVERTISEMENT
Definition: tag.h:132
@ TAG_REQUEST
Definition: tag.h:33
@ TAG_PREP
Definition: tag.h:139
@ TAG_POWER_CONSTRAINT
Definition: tag.h:41
@ TAG_TIM_BROADCAST_REQUEST
Definition: tag.h:103
@ TAG_RELAY_CAPABILITIES
Definition: tag.h:169
@ TAG_RSNI
Definition: tag.h:74
@ TAG_GCR_GROUP_ADDRESS
Definition: tag.h:189
@ TAG_DS_PARAMETER
Definition: tag.h:27
@ TAG_GANN
Definition: tag.h:134
@ TAG_MEASUREMENT_REQUEST
Definition: tag.h:47
@ TAG_BSS_INTOLERANT_CHANNEL_REPORT
Definition: tag.h:82
int libwifi_tag_iterator_next(struct libwifi_tag_iterator *it)
Iterate towards the next tagged parameter in a libwifi tag iterator.
Definition: tag_iterator.c:31
int libwifi_tag_iterator_init(struct libwifi_tag_iterator *it, const void *tags_start, size_t data_len)
Initialise a libwifi frame tag iterator.
Definition: tag_iterator.c:21