82 const unsigned char *tag_data,
size_t tag_length) {
87 tagged_parameter->
body = malloc(tag_length);
88 if (tagged_parameter->
body == NULL) {
91 memset(tagged_parameter->
body, 0, tag_length);
94 memcpy(tagged_parameter->
body, tag_data, tag_length);
100 free(tagged_parameter->
body);
119 const unsigned char *tag_data,
size_t tag_length) {
150 switch (tag_number) {
154 return "TAG_SUPP_RATES";
156 return "TAG_DS_PARAMETER";
158 return "TAG_CF_PARAMETER";
162 return "TAG_BSS_PARAMETERS";
164 return "TAG_COUNTRY";
166 return "TAG_REQUEST";
168 return "TAG_BSS_LOAD";
170 return "TAG_EDCA_PARAMETERS";
176 return "TAG_SCHEDULE";
178 return "TAG_CHALLENGE_TEXT";
180 return "TAG_POWER_CONSTRAINT";
182 return "TAG_POWER_CAPABILITY";
184 return "TAG_TPC_REQUEST";
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";
198 return "TAG_IBSS_DFS";
202 return "TAG_TS_DELAY";
204 return "TAG_TCLAS_PROCESSING";
206 return "TAG_HT_CAPABILITIES";
208 return "TAG_QOS_CAPABILITY";
212 return "TAG_EXTENDED_SUPPORTED_RATES";
214 return "TAG_AP_CHANNEL_REPORT";
216 return "TAG_NEIGHBOR_REPORT";
220 return "TAG_MOBILITY_DOMAIN";
222 return "TAG_FAST_BSS_TRANSITION";
224 return "TAG_TIMEOUT_INTERVAL";
226 return "TAG_RIC_DATA";
228 return "TAG_DSE_REGISTERED_LOCATION";
230 return "TAG_SUPPORTED_OPERATING_CLASSES";
232 return "TAG_EXTENDED_CHANNEL_SWITCH_ANNOUNCEMENT";
234 return "TAG_HT_OPERATION";
236 return "TAG_SECONDARY_CHANNEL_OFFSET";
238 return "TAG_BSS_AVERAGE_ACCESS_DELAY";
240 return "TAG_ANTENNA";
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";
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";
278 return "TAG_SSID_LIST";
280 return "TAG_MULTIPLE_BSSID_INDEX";
282 return "TAG_FMS_DESCRIPTOR";
284 return "TAG_FMS_REQUEST";
286 return "TAG_FMS_RESPONSE";
288 return "TAG_QOS_TRAFFIC_CAPABILITY";
290 return "TAG_BSS_MAX_IDLE_PERIOD";
292 return "TAG_TFS_REQUEST";
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";
306 return "TAG_TIME_ZONE";
308 return "TAG_DMS_REQUEST";
310 return "TAG_DMS_RESPONSE";
312 return "TAG_LINK_IDENTIFIER";
314 return "TAG_WAKEUP_SCHEDULE";
316 return "TAG_CHANNEL_SWITCH_TIMING";
318 return "TAG_PTI_CONTROL";
320 return "TAG_TPU_BUFFER_STATUS";
322 return "TAG_INTERWORKING";
324 return "TAG_ADVERTISEMENT_PROTOCOL";
326 return "TAG_EXPEDITED_BANDWIDTH_REQUEST";
328 return "TAG_QOS_MAP";
330 return "TAG_ROAMING_CONSORTIUM";
332 return "TAG_EMERGENCY_ALERT_IDENTIFIER";
334 return "TAG_MESH_CONFIGURATION";
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";
362 return "TAG_EXTENDED_CAPABILITIES";
374 return "TAG_AUTHENTICATED_MESH_PEERING_EXCHANGE";
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";
388 return "TAG_DMG_TSPEC";
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";
400 return "TAG_AWAKE_WINDOW";
402 return "TAG_MULTI_BAND";
404 return "TAG_ADDBA_EXTENSION";
406 return "TAG_NEXTPCP_LIST";
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";
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";
438 return "TAG_QMF_POLICY";
440 return "TAG_ECAPC_POLICY";
442 return "TAG_CLUSTER_TIME_OFFSET";
444 return "TAG_INTRA_ACCESS_CATEGORY_PRIORITY";
446 return "TAG_SCS_DESCRIPTOR";
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";
472 return "TAG_QUIET_CHANNEL";
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";
490 return "Unknown Tag";
struct libwifi_tagged_parameters tags
A libwifi_tag_iterator is used to iterate through a list of tagged parameters in a wifi frame.
struct libwifi_tag_header * tag_header
const unsigned char * tag_data
struct libwifi_tag_header header
unsigned char * parameters
char * libwifi_get_tag_name(int tag_number)
Get the name of a tagged parameter via a supplied tag number.
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.
void libwifi_free_tag(struct libwifi_tagged_parameter *tagged_parameter)
Free a tagged parameters body.
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.
int libwifi_remove_tag(struct libwifi_tagged_parameters *tags, int tag_number)
Remove a tagged parameter from a list of frame tagged parameters.
int libwifi_check_tag(struct libwifi_tagged_parameters *tags, int tag_number)
Check if a tagged parameter is present via tag number.
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.
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.
struct libwifi_tag_header header
@ TAG_CHANNEL_SWITCH_TIMING
@ TAG_ADVERTISEMENT_PROTOCOL
@ TAG_EXPEDITED_BANDWIDTH_REQUEST
@ TAG_CONGESTION_NOTIFICATION
@ TAG_MULTIPLE_MAC_SUBLAYERS
@ TAG_EXTENDED_CAPABILITIES
@ TAG_EXTENDED_CHANNEL_SWITCH_ANNOUNCEMENT
@ TAG_HCCA_TXOP_UPDATE_COUNT
@ TAG_MESH_PEERING_MANAGEMENT
@ TAG_DYNAMIC_TONE_PAIRING_REPORT
@ TAG_MEASUREMENT_PILOT_TRANSMISSION
@ TAG_RELAY_TRANSFER_PARAMETER_SET
@ TAG_RM_ENABLED_CAPABILITIES
@ TAG_AUTHENTICATED_MESH_PEERING_EXCHANGE
@ TAG_SUPPORTED_OPERATING_CLASSES
@ TAG_DMG_BSS_PARAMETER_CHANGE
@ TAG_CHANNEL_SWITCH_WRAPPER
@ TAG_BSS_AC_ACCESS_DELAY
@ TAG_OVERLAPPING_BSS_PARAMETERS
@ TAG_MCCAOP_ADVERTISEMENT_OVERVIEW
@ TAG_DSE_REGISTERED_LOCATION
@ TAG_NONTRANSMITTED_BSSID_CAPABILITY
@ TAG_BSS_AVAILABLE_ADMISSION_CAPACITY
@ TAG_BSS_AVERAGE_ACCESS_DELAY
@ TAG_QUIET_PERIOD_RESPONSE
@ TAG_DMG_LINK_ADAPTATION_ACKNOWLEDGEMENT
@ TAG_MULTIPLE_BSSID_INDEX
@ TAG_BEAMLINK_MAINTENANCE
@ TAG_INTRA_ACCESS_CATEGORY_PRIORITY
@ TAG_CLUSTER_TIME_OFFSET
@ TAG_MESH_LINK_METRIC_REPORT
@ TAG_WIDE_BANDWIDTH_CHANNEL_SWITCH
@ TAG_EMERGENCY_ALERT_IDENTIFIER
@ TAG_QUIET_PERIOD_REQUEST
@ TAG_ANTENNA_SECTOR_ID_PATTERN
@ TAG_EXTENDED_SUPPORTED_RATES
@ TAG_QOS_TRAFFIC_CAPABILITY
@ TAG_MESH_CHANNEL_SWITCH_PARAMETERS
@ TAG_SECONDARY_CHANNEL_OFFSET
@ TAG_HIGHER_LAYER_STREAM_ID
@ TAG_TRANSMIT_POWER_ENVELOPE
@ TAG_CHANNEL_SWITCH_ANNOUNCEMENT
@ TAG_COLLOCATED_INTERFERENCE_REPORT
@ TAG_CHANNEL_MEASUREMENT_FEEDBACK
@ TAG_MCCAOP_SETUP_REQUEST
@ TAG_TIM_BROADCAST_RESPONSE
@ TAG_DMG_WAKEUP_SCHEDULE
@ TAG_BSS_MAX_IDLE_PERIOD
@ TAG_REDUCED_NEIGHBOR_REPORT
@ TAG_FINE_TIMING_MEASUREMENT_PARAMETERS
@ TAG_DMG_BEAM_REFINEMENT
@ TAG_FAST_BSS_TRANSITION
@ TAG_MCCAOP_ADVERTISEMENT
@ TAG_TIM_BROADCAST_REQUEST
@ TAG_MEASUREMENT_REQUEST
@ TAG_BSS_INTOLERANT_CHANNEL_REPORT
int libwifi_tag_iterator_next(struct libwifi_tag_iterator *it)
Iterate towards the next tagged parameter in a libwifi tag iterator.
int libwifi_tag_iterator_init(struct libwifi_tag_iterator *it, const void *tags_start, size_t data_len)
Initialise a libwifi frame tag iterator.