Moep Library  2.0-nc
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups
ieee80211

Files

file  ieee80211.h
 

Data Structures

struct  ieee80211_hdr_gen
 

Functions

moep_dev_t moep_dev_ieee80211_open (const char *devname, u32 freq, enum moep80211_chan_width chan_width, u32 freq1, u32 freq2, int mtu)
 open an ieee80211 device More...
 
moep_frame_t moep_frame_ieee80211_create (void)
 create a ieee80211 frame More...
 
struct ieee80211_hdr_genmoep_frame_ieee80211_hdr (moep_frame_t frame)
 ieee80211 header More...
 

Detailed Description

Function Documentation

moep_dev_t moep_dev_ieee80211_open ( const char *  devname,
u32  freq,
enum moep80211_chan_width  chan_width,
u32  freq1,
u32  freq2,
int  mtu 
)

open an ieee80211 device

The function moep_dev_ieee80211_open() is used to open an ieee80211 device.

Parameters
devnamethe device name; This can either be the physical device name e.g. 'phy0' or an interface name e.g. 'wlan1'.
freqthe channel frequency in MHz
chan_widththe channel width
freq1the first center frequency in MHz; This value may be ignored depending on the channel width.
freq2the second center frequency in MHz; This value may be ignored depending on the channel width.
mtuthe MTU of the device; This includes all headers.
Returns
This function returns a moep device.
Return values
NULLon error, errno is set appropriately.
Errors
These are some standard errors generated and returned by this function. Additional errors may be generated and returned from the underlying system calls.
EINVALInvalid argument
EMFILEToo many open files; Some filedescriptors are too big for select.
ENOMEMNot enough memory available
moep_frame_t moep_frame_ieee80211_create ( void  )

create a ieee80211 frame

The function moep_frame_ieee80211_create() is used to create a ieee80211 frame.

Returns
This function returns a moep frame.
Return values
NULLon error, errno is set appropriately.
Errors
The error values are the same as for moep_frame_create().
struct ieee80211_hdr_gen* moep_frame_ieee80211_hdr ( moep_frame_t  frame)

ieee80211 header

The function moep_frame_ieee80211_hdr() is used to get the ieee80211 header of a frame.

Parameters
framethe frame
Returns
This function returns the ieee80211 header.
Return values
NULLon error, errno is set appropriately.
Errors
EACCESThe frame is not an ieee80211 frame.
ENOMEMNot enough memory available