libwifi 0.0.3
An 802.11 Frame Parsing and Generation library in C
frame.c File Reference
#include "frame.h"
#include "../../parse/misc/radiotap.h"
#include "../misc/byteswap.h"
#include "../radiotap/radiotap.h"
#include <errno.h>
#include <stdlib.h>
#include <string.h>

Go to the source code of this file.

Functions

int libwifi_get_wifi_frame (struct libwifi_frame *fi, const unsigned char *frame, size_t frame_len, int radiotap)
 Convert a sniffed 802.11 frame into a libwifi_frame. More...
 
void libwifi_free_wifi_frame (struct libwifi_frame *fi)
 Free any dynamically allocated data inside a libwifi_frame. More...
 

Function Documentation

◆ libwifi_free_wifi_frame()

void libwifi_free_wifi_frame ( struct libwifi_frame fi)

Free any dynamically allocated data inside a libwifi_frame.

Parameters
fiA libwifi_frame struct

Definition at line 144 of file frame.c.

◆ libwifi_get_wifi_frame()

int libwifi_get_wifi_frame ( struct libwifi_frame fi,
const unsigned char *  frame,
size_t  frame_len,
int  radiotap 
)

Convert a sniffed 802.11 frame into a libwifi_frame.

Parameters
fiA libwifi_frame struct
frameAn 802.11 frame
frame_lenLength of the sniffed 802.11 frame
Returns

Definition at line 35 of file frame.c.