18#include "../../core/frame/management/timing_ad.h"
19#include "../../core/misc/epoch.h"
20#include "../../core/frame/tag.h"
27 const unsigned char destination[6],
28 const unsigned char transmitter[6],
29 const unsigned char address3[6],
55 if (adv_fields == NULL) {
60 unsigned char element_data[17] = {0};
61 size_t element_data_len = 0;
87 element_data_len = offset;
102 if (adv_len > buf_len) {
struct libwifi_tagged_parameters tags
unsigned long long libwifi_get_epoch(void)
Get the current system time in epoch.
#define LIBWIFI_DEFAULT_BEACON_INTERVAL
A sane default for a beacon_interval field.
#define LIBWIFI_DEFAULT_AP_CAPABS
A sane default for an AP-side capabilities information field.
unsigned int sequence_number
unsigned char * parameters
unsigned char time_value[10]
uint8_t timing_capabilities
unsigned char time_error[5]
unsigned char time_update[1]
uint8_t measurement_pilot_interval
uint16_t capabilities_information
struct libwifi_tagged_parameters tags
struct libwifi_timing_advert_fixed_params fixed_parameters
struct libwifi_mgmt_unordered_frame_header frame_header
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.
size_t libwifi_dump_timing_advert(struct libwifi_timing_advert *adv, unsigned char *buf, size_t buf_len)
Dump a libwifi_timing_advert into a raw format for packet injection.
void libwifi_free_timing_advert(struct libwifi_timing_advert *adv)
Free any memory claimed by a libwifi_timing_advert back to the system.
size_t libwifi_get_timing_advert_length(struct libwifi_timing_advert *adv)
Get the length of the specified libwifi_timing_advert struct.
int libwifi_create_timing_advert(struct libwifi_timing_advert *adv, const unsigned char destination[6], const unsigned char transmitter[6], const unsigned char address3[6], struct libwifi_timing_advert_fields *adv_fields, const char country[3], uint16_t max_reg_power, uint8_t max_tx_power, uint8_t tx_power_used, uint8_t noise_floor)
Create a populated libwifi_timing_advert struct.