libwifi 0.0.3
An 802.11 Frame Parsing and Generation library in C
|
#include "deauthentication.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_deauth_length (struct libwifi_deauth *deauth) |
The length of a deauth frame is the sum of the header length, the fixed parameters length, and the tagged parameters length. More... | |
int | libwifi_create_deauth (struct libwifi_deauth *deauth, const unsigned char receiver[6], const unsigned char transmitter[6], const unsigned char address3[6], uint16_t reason_code) |
The generated deauthentication frame contains only the supplied receiver, transmitter and reason_code by default. More... | |
size_t | libwifi_dump_deauth (struct libwifi_deauth *deauth, unsigned char *buf, size_t buf_len) |
Copy a libwifi_deauth into a regular unsigned char buffer. More... | |
void | libwifi_free_deauth (struct libwifi_deauth *deauth) |
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_deauth | ( | struct libwifi_deauth * | deauth, |
const unsigned char | receiver[6], | ||
const unsigned char | transmitter[6], | ||
const unsigned char | address3[6], | ||
uint16_t | reason_code | ||
) |
The generated deauthentication frame contains only the supplied receiver, transmitter and reason_code by default.
Generate a populated libwifi deauth.
Definition at line 36 of file deauthentication.c.
size_t libwifi_dump_deauth | ( | struct libwifi_deauth * | deauth, |
unsigned char * | buf, | ||
size_t | buf_len | ||
) |
Copy a libwifi_deauth into a regular unsigned char buffer.
Dump a libwifi_deauth into a raw format for packet injection.
This is useful when injecting generated libwifi frames.
Definition at line 60 of file deauthentication.c.
void libwifi_free_deauth | ( | struct libwifi_deauth * | deauth | ) |
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_deauth back to the system.
Definition at line 83 of file deauthentication.c.
size_t libwifi_get_deauth_length | ( | struct libwifi_deauth * | deauth | ) |
The length of a deauth frame is the sum of the header length, the fixed parameters length, and the tagged parameters length.
Calculate the length of a given libwifi_deauth.
Definition at line 27 of file deauthentication.c.