17#include "../../core/frame/tag.h"
18#include "../../core/frame/tag_iterator.h"
19#include "../../core/misc/byteswap.h"
20#include "../../core/misc/epoch.h"
70 const unsigned char *chan = (
const unsigned char *) &
channel;
82 const unsigned char receiver[6],
83 const unsigned char transmitter[6],
84 const unsigned char address3[6],
116 if (beacon_len > buf_len) {
struct libwifi_tagged_parameters tags
struct libwifi_radiotap_channel channel
unsigned long long libwifi_get_epoch(void)
Get the current system time in epoch.
int libwifi_create_beacon(struct libwifi_beacon *beacon, const unsigned char receiver[6], const unsigned char transmitter[6], const unsigned char address3[6], const char *ssid, uint8_t channel)
The generated beacon frame is made with sane defaults defined in common.h.
size_t libwifi_dump_beacon(struct libwifi_beacon *beacon, unsigned char *buf, size_t buf_len)
Copy a libwifi_beacon into a regular unsigned char buffer.
int libwifi_set_beacon_channel(struct libwifi_beacon *beacon, uint8_t channel)
Simple helper to set the beacon DS tag by removing it and then adding it back with the new value.
int libwifi_set_beacon_ssid(struct libwifi_beacon *beacon, const char *ssid)
Simple helper to set the beacon SSID tag by removing it and then adding it back with the new value.
void libwifi_free_beacon(struct libwifi_beacon *beacon)
Because the tagged parameters memory is managed inside of the library, the library must be the one to...
size_t libwifi_get_beacon_length(struct libwifi_beacon *beacon)
The length of a beacon frame is the sum of the header length, the fixed parameters length,...
#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.
uint16_t capabilities_information
struct libwifi_tagged_parameters tags
struct libwifi_mgmt_unordered_frame_header frame_header
struct libwifi_beacon_fixed_parameters fixed_parameters
unsigned int sequence_number
unsigned char * parameters
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.