libwifi 0.0.3
An 802.11 Frame Parsing and Generation library in C
|
#include "../../core/frame/management/probe_response.h"
Go to the source code of this file.
Functions | |
int | libwifi_set_probe_resp_ssid (struct libwifi_probe_resp *probe_resp, const char *ssid) |
Set the SSID of a libwifi_probe_resp. More... | |
int | libwifi_set_probe_resp_channel (struct libwifi_probe_resp *probe_resp, uint8_t channel) |
Set the channel of a libwifi_probe_resp. More... | |
size_t | libwifi_get_probe_resp_length (struct libwifi_probe_resp *probe_resp) |
Calculate the length of a given libwifi_probe_resp. More... | |
int | libwifi_create_probe_resp (struct libwifi_probe_resp *probe_resp, const unsigned char receiver[6], const unsigned char transmitter[6], const unsigned char address3[6], const char *ssid, uint8_t channel) |
Generate a populated libwifi probe_resp. More... | |
size_t | libwifi_dump_probe_resp (struct libwifi_probe_resp *probe_resp, unsigned char *buf, size_t buf_len) |
Dump a libwifi_probe_resp into a raw format for packet injection. More... | |
void | libwifi_free_probe_resp (struct libwifi_probe_resp *probe_resp) |
Free any memory claimed by a libwifi_probe_resp back to the system. More... | |
int libwifi_create_probe_resp | ( | struct libwifi_probe_resp * | probe_resp, |
const unsigned char | receiver[6], | ||
const unsigned char | transmitter[6], | ||
const unsigned char | address3[6], | ||
const char * | ssid, | ||
uint8_t | channel | ||
) |
Generate a populated libwifi probe_resp.
A generated libwifi probe_resp can be "dumped" into a buffer for packet injection via the libwifi_dump_probe_resp.
probe_resp | A libwifi_probe_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 |
ssid | The SSID of the probe_resp. Maximum length is 32 characters |
channel | The desired channel of the probe_resp |
Generate a populated libwifi probe_resp.
Two tagged parameters are also added to the probe response: SSID and Channel.
Definition at line 81 of file probe_response.c.
size_t libwifi_dump_probe_resp | ( | struct libwifi_probe_resp * | probe_resp, |
unsigned char * | buf, | ||
size_t | buf_len | ||
) |
Dump a libwifi_probe_resp into a raw format for packet injection.
probe_resp | A libwifi_probe_resp |
buf | The output buffer for the frame data |
buf_len | The length of the output buffer |
Dump a libwifi_probe_resp into a raw format for packet injection.
This is useful when injecting generated libwifi frames.
Definition at line 115 of file probe_response.c.
void libwifi_free_probe_resp | ( | struct libwifi_probe_resp * | probe_resp | ) |
Free any memory claimed by a libwifi_probe_resp back to the system.
probe_resp | A libwifi_probe_resp |
Free any memory claimed by a libwifi_probe_resp back to the system.
Definition at line 138 of file probe_response.c.
size_t libwifi_get_probe_resp_length | ( | struct libwifi_probe_resp * | probe_resp | ) |
Calculate the length of a given libwifi_probe_resp.
probe_resp | A libwifi_probe_resp struct |
Calculate the length of a given libwifi_probe_resp.
Definition at line 33 of file probe_response.c.
int libwifi_set_probe_resp_channel | ( | struct libwifi_probe_resp * | probe_resp, |
uint8_t | channel | ||
) |
Set the channel of a libwifi_probe_resp.
probe_resp | A libwifi_probe_resp struct |
channel | The new channel |
Set the channel of a libwifi_probe_resp.
Definition at line 60 of file probe_response.c.
int libwifi_set_probe_resp_ssid | ( | struct libwifi_probe_resp * | probe_resp, |
const char * | ssid | ||
) |
Set the SSID of a libwifi_probe_resp.
probe_resp | A libwifi_probe_resp struct |
ssid | The new SSID |
Set the SSID of a libwifi_probe_resp.
Definition at line 42 of file probe_response.c.