libwifi 0.0.3
An 802.11 Frame Parsing and Generation library in C
|
#include "reassoc_request.h"
#include "common.h"
#include <errno.h>
#include <stdlib.h>
#include <string.h>
Go to the source code of this file.
Functions | |
size_t | libwifi_get_reassoc_req_length (struct libwifi_reassoc_req *reassoc_req) |
The length of a reassociation request frame is the sum of the header length, the fixed parameters length, and the tagged parameters length. More... | |
int | libwifi_create_reassoc_req (struct libwifi_reassoc_req *reassoc_req, const unsigned char receiver[6], const unsigned char transmitter[6], const unsigned char address3[6], const unsigned char current_ap[6], const char *ssid, uint8_t channel) |
The generated reassociation request frame is made with sane defaults defined in common.h. More... | |
size_t | libwifi_dump_reassoc_req (struct libwifi_reassoc_req *reassoc_req, unsigned char *buf, size_t buf_len) |
Copy a libwifi_reassoc_req into a regular unsigned char buffer. More... | |
void | libwifi_free_reassoc_req (struct libwifi_reassoc_req *reassoc_req) |
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_req | ( | struct libwifi_reassoc_req * | reassoc_req, |
const unsigned char | receiver[6], | ||
const unsigned char | transmitter[6], | ||
const unsigned char | address3[6], | ||
const unsigned char | current_ap[6], | ||
const char * | ssid, | ||
uint8_t | channel | ||
) |
The generated reassociation request frame is made with sane defaults defined in common.h.
Create a new libwifi reassociation request.
Two tagged parameters are also added to the reassociation frame: SSID and Channel
Definition at line 37 of file reassoc_request.c.
size_t libwifi_dump_reassoc_req | ( | struct libwifi_reassoc_req * | reassoc_req, |
unsigned char * | buf, | ||
size_t | buf_len | ||
) |
Copy a libwifi_reassoc_req into a regular unsigned char buffer.
Dump a libwifi_reassoc_req into a raw format for packet injection.
This is useful when injecting generated libwifi frames.
Definition at line 71 of file reassoc_request.c.
void libwifi_free_reassoc_req | ( | struct libwifi_reassoc_req * | reassoc_req | ) |
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_req back to the system.
Definition at line 94 of file reassoc_request.c.
size_t libwifi_get_reassoc_req_length | ( | struct libwifi_reassoc_req * | reassoc_req | ) |
The length of a reassociation request frame is the sum of the header length, the fixed parameters length, and the tagged parameters length.
Get the length of a given libwifi_reassoc_req.
Definition at line 27 of file reassoc_request.c.