libwifi 0.0.3
An 802.11 Frame Parsing and Generation library in C
reassoc_response.h File Reference

Go to the source code of this file.

Functions

int libwifi_set_reassoc_resp_channel (struct libwifi_reassoc_resp *reassoc_resp, uint8_t channel)
 Set the channel of a libwifi_reassoc_resp. More...
 
size_t libwifi_get_reassoc_resp_length (struct libwifi_reassoc_resp *reassoc_resp)
 Calculate the length of a given libwifi_reassoc_resp. More...
 
int libwifi_create_reassoc_resp (struct libwifi_reassoc_resp *reassoc_resp, const unsigned char receiver[6], const unsigned char transmitter[6], const unsigned char address3[6], uint8_t channel)
 Generate a populated libwifi reassoc_resp. More...
 
size_t libwifi_dump_reassoc_resp (struct libwifi_reassoc_resp *reassoc_resp, unsigned char *buf, size_t buf_len)
 Dump a libwifi_reassoc_resp into a raw format for packet injection. More...
 
void libwifi_free_reassoc_resp (struct libwifi_reassoc_resp *reassoc_resp)
 Free any memory claimed by a libwifi_reassoc_resp back to the system. More...
 

Function Documentation

◆ libwifi_create_reassoc_resp()

int libwifi_create_reassoc_resp ( struct libwifi_reassoc_resp reassoc_resp,
const unsigned char  receiver[6],
const unsigned char  transmitter[6],
const unsigned char  address3[6],
uint8_t  channel 
)

Generate a populated libwifi reassoc_resp.

A generated libwifi reassoc_resp can be "dumped" into a buffer for packet injection via the libwifi_dump_reassoc_resp.

Parameters
reassoc_respA libwifi_reassoc_resp
receiverThe receiver MAC address, aka address 1
transmitterThe source MAC address, aka address 2
address3The address 3 frame field value, typically the BSSID
channelThe desired channel of the reassoc_resp
Returns
Zero on success, or negative error

Generate a populated libwifi reassoc_resp.

One tagged parameters is also added to the reassoc_resp: Channel.

Definition at line 64 of file reassoc_response.c.

◆ libwifi_dump_reassoc_resp()

size_t libwifi_dump_reassoc_resp ( struct libwifi_reassoc_resp reassoc_resp,
unsigned char *  buf,
size_t  buf_len 
)

Dump a libwifi_reassoc_resp into a raw format for packet injection.

Parameters
reassoc_respA libwifi_reassoc_resp
bufThe output buffer for the frame data
buf_lenThe length of the output buffer
Returns
The length of the dumped reassoc_resp, or negative error

Dump a libwifi_reassoc_resp into a raw format for packet injection.

This is useful when injecting generated libwifi frames.

Definition at line 90 of file reassoc_response.c.

◆ libwifi_free_reassoc_resp()

void libwifi_free_reassoc_resp ( struct libwifi_reassoc_resp reassoc_resp)

Free any memory claimed by a libwifi_reassoc_resp back to the system.

Parameters
reassoc_respA libwifi_reassoc_resp struct

Free any memory claimed by a libwifi_reassoc_resp back to the system.

Definition at line 115 of file reassoc_response.c.

◆ libwifi_get_reassoc_resp_length()

size_t libwifi_get_reassoc_resp_length ( struct libwifi_reassoc_resp reassoc_resp)

Calculate the length of a given libwifi_reassoc_resp.

Parameters
reassoc_respA libwifi_reassoc_resp
Returns
The length of the given reassoc_resp, or negative error

Calculate the length of a given libwifi_reassoc_resp.

Definition at line 34 of file reassoc_response.c.

◆ libwifi_set_reassoc_resp_channel()

int libwifi_set_reassoc_resp_channel ( struct libwifi_reassoc_resp reassoc_resp,
uint8_t  channel 
)

Set the channel of a libwifi_reassoc_resp.

Parameters
reassoc_respA libwifi_reassoc_resp
channelThe desired channel
Returns
Zero on success, or negative error

Set the channel of a libwifi_reassoc_resp.

Definition at line 44 of file reassoc_response.c.