libwifi 0.0.3
An 802.11 Frame Parsing and Generation library in C
|
#include "authentication.h"
#include "../../core/misc/byteswap.h"
#include <errno.h>
#include <stdlib.h>
#include <string.h>
Go to the source code of this file.
Functions | |
size_t | libwifi_get_auth_length (struct libwifi_auth *auth) |
The length of an authentication frame is the sum of the header length, the fixed parameters length, and the tagged parameters length. More... | |
int | libwifi_create_auth (struct libwifi_auth *auth, const unsigned char receiver[6], const unsigned char transmitter[6], const unsigned char address3[6], uint16_t algorithm_number, uint16_t transaction_sequence, uint16_t status_code) |
The generated authentication frame is made with sane defaults defined in common.h. More... | |
size_t | libwifi_dump_auth (struct libwifi_auth *auth, unsigned char *buf, size_t buf_len) |
Copy a libwifi_auth into a regular unsigned char buffer. More... | |
void | libwifi_free_auth (struct libwifi_auth *auth) |
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_auth | ( | struct libwifi_auth * | auth, |
const unsigned char | receiver[6], | ||
const unsigned char | transmitter[6], | ||
const unsigned char | address3[6], | ||
uint16_t | algorithm_number, | ||
uint16_t | transaction_sequence, | ||
uint16_t | status_code | ||
) |
The generated authentication frame is made with sane defaults defined in common.h.
Generate a populated libwifi auth.
Definition at line 35 of file authentication.c.
size_t libwifi_dump_auth | ( | struct libwifi_auth * | auth, |
unsigned char * | buf, | ||
size_t | buf_len | ||
) |
Copy a libwifi_auth into a regular unsigned char buffer.
Dump a libwifi_auth into a raw format for packet injection.
This is useful when injecting generated libwifi frames.
Definition at line 62 of file authentication.c.
void libwifi_free_auth | ( | struct libwifi_auth * | auth | ) |
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_auth back to the system.
Definition at line 85 of file authentication.c.
size_t libwifi_get_auth_length | ( | struct libwifi_auth * | auth | ) |
The length of an authentication frame is the sum of the header length, the fixed parameters length, and the tagged parameters length.
Calculate the length of a given libwifi_auth.
Definition at line 27 of file authentication.c.