libwifi 0.0.3
An 802.11 Frame Parsing and Generation library in C
|
#include "../../core/frame/management/assoc_response.h"
Go to the source code of this file.
Functions | |
int | libwifi_set_assoc_resp_channel (struct libwifi_assoc_resp *assoc_resp, uint8_t channel) |
Set the channel of a libwifi_assoc_resp. More... | |
size_t | libwifi_get_assoc_resp_length (struct libwifi_assoc_resp *assoc_resp) |
Calculate the length of a given libwifi_assoc_resp. More... | |
int | libwifi_create_assoc_resp (struct libwifi_assoc_resp *assoc_resp, const unsigned char receiver[6], const unsigned char transmitter[6], const unsigned char address3[6], uint8_t channel) |
Generate a populated libwifi assoc_resp. More... | |
size_t | libwifi_dump_assoc_resp (struct libwifi_assoc_resp *assoc_resp, unsigned char *buf, size_t buf_len) |
Dump a libwifi_assoc_resp into a raw format for packet injection. More... | |
void | libwifi_free_assoc_resp (struct libwifi_assoc_resp *assoc_resp) |
Free any memory claimed by a libwifi_assoc_resp back to the system. More... | |
int libwifi_create_assoc_resp | ( | struct libwifi_assoc_resp * | assoc_resp, |
const unsigned char | receiver[6], | ||
const unsigned char | transmitter[6], | ||
const unsigned char | address3[6], | ||
uint8_t | channel | ||
) |
Generate a populated libwifi assoc_resp.
A generated libwifi assoc_resp can be "dumped" into a buffer for packet injection via the libwifi_dump_assoc_resp.
assoc_resp | A libwifi_assoc_resp |
receiver | The receiver MAC address, aka address 1 |
transmitter | The source MAC address, aka address 2 |
address3 | The address 3 frame field value, typically the BSSID |
channel | The desired channel of the assoc_resp |
Generate a populated libwifi assoc_resp.
Two tagged parameters are also added to the association response: Channel and Supported Rates.
Definition at line 65 of file assoc_response.c.
size_t libwifi_dump_assoc_resp | ( | struct libwifi_assoc_resp * | assoc_resp, |
unsigned char * | buf, | ||
size_t | buf_len | ||
) |
Dump a libwifi_assoc_resp into a raw format for packet injection.
assoc_resp | A libwifi_assoc_resp |
buf | The output buffer for the frame data |
buf_len | The length of the output buffer |
Dump a libwifi_assoc_resp into a raw format for packet injection.
This is useful when injecting generated libwifi frames.
Definition at line 94 of file assoc_response.c.
void libwifi_free_assoc_resp | ( | struct libwifi_assoc_resp * | assoc_resp | ) |
Free any memory claimed by a libwifi_assoc_resp back to the system.
assoc_resp | A libwifi_assoc_resp |
Free any memory claimed by a libwifi_assoc_resp back to the system.
Definition at line 117 of file assoc_response.c.
size_t libwifi_get_assoc_resp_length | ( | struct libwifi_assoc_resp * | assoc_resp | ) |
Calculate the length of a given libwifi_assoc_resp.
assoc_resp | A libwifi_assoc_resp |
Calculate the length of a given libwifi_assoc_resp.
Definition at line 34 of file assoc_response.c.
int libwifi_set_assoc_resp_channel | ( | struct libwifi_assoc_resp * | assoc_resp, |
uint8_t | channel | ||
) |
Set the channel of a libwifi_assoc_resp.
assoc_resp | A libwifi_assoc_resp |
channel | The new channel |
Set the channel of a libwifi_assoc_resp.
Definition at line 44 of file assoc_response.c.