|
libwifi 0.0.3
An 802.11 Frame Parsing and Generation library in C
|
#include "reassoc_response.h"#include "../../core/frame/tag.h"#include "../../core/frame/tag_iterator.h"#include "../../core/misc/byteswap.h"#include "../../core/misc/epoch.h"#include "../../core/misc/types.h"#include "common.h"#include <errno.h>#include <stdint.h>#include <stdlib.h>#include <string.h>#include <sys/types.h>Go to the source code of this file.
Functions | |
| size_t | libwifi_get_reassoc_resp_length (struct libwifi_reassoc_resp *reassoc_resp) |
| The length of a reassociation response frame is the sum of the header length, the fixed parameters length, and the tagged parameters length. More... | |
| int | libwifi_set_reassoc_resp_channel (struct libwifi_reassoc_resp *reassoc_resp, uint8_t channel) |
| Simple helper to set the reassociation response DS tag by removing it and then adding it back with the new value. 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) |
| The generated reassoc_resp frame is made with sane defaults defined in common.h. More... | |
| size_t | libwifi_dump_reassoc_resp (struct libwifi_reassoc_resp *reassoc_resp, unsigned char *buf, size_t buf_len) |
| Copy a libwifi_reassoc_resp into a regular unsigned char buffer. More... | |
| void | libwifi_free_reassoc_resp (struct libwifi_reassoc_resp *reassoc_resp) |
| Because the tagged parameters memory is managed inside of the library, the library must be the one to free it, too. 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 | ||
| ) |
The generated reassoc_resp frame is made with sane defaults defined in common.h.
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.
| size_t libwifi_dump_reassoc_resp | ( | struct libwifi_reassoc_resp * | reassoc_resp, |
| unsigned char * | buf, | ||
| size_t | buf_len | ||
| ) |
Copy a libwifi_reassoc_resp into a regular unsigned char buffer.
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.
| void libwifi_free_reassoc_resp | ( | struct libwifi_reassoc_resp * | reassoc_resp | ) |
Because the tagged parameters memory is managed inside of the library, the library must be the one to free it, too.
Free any memory claimed by a libwifi_reassoc_resp back to the system.
Definition at line 115 of file reassoc_response.c.
| size_t libwifi_get_reassoc_resp_length | ( | struct libwifi_reassoc_resp * | reassoc_resp | ) |
The length of a reassociation response frame is the sum of the header length, the fixed parameters length, and the tagged parameters length.
Calculate the length of a given libwifi_reassoc_resp.
Definition at line 34 of file reassoc_response.c.
| int libwifi_set_reassoc_resp_channel | ( | struct libwifi_reassoc_resp * | reassoc_resp, |
| uint8_t | channel | ||
| ) |
Simple helper to set the reassociation response DS tag by removing it and then adding it back with the new value.
Set the channel of a libwifi_reassoc_resp.
Definition at line 44 of file reassoc_response.c.