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

Files

file  radio.h
 

Enumerations

enum  moep80211_chan_width {
  MOEP80211_CHAN_WIDTH_20_NOHT, MOEP80211_CHAN_WIDTH_20, MOEP80211_CHAN_WIDTH_40, MOEP80211_CHAN_WIDTH_80,
  MOEP80211_CHAN_WIDTH_80P80, MOEP80211_CHAN_WIDTH_160
}
 channel width definition More...
 

Functions

moep_dev_t moep_dev_radio_open (const char *devname, u32 freq, enum moep80211_chan_width chan_width, u32 freq1, u32 freq2, int mtu, struct moep_frame_ops *l2_ops)
 open a radio device More...
 
moep_frame_t moep_frame_radio_create (struct moep_frame_ops *l2_ops)
 create a radio frame More...
 
struct moep80211_radiotapmoep_frame_radiotap (moep_frame_t frame)
 radiotap header More...
 

Detailed Description

Enumeration Type Documentation

channel width definition

Enumerator
MOEP80211_CHAN_WIDTH_20_NOHT 

20 MHz, non-HT channel

MOEP80211_CHAN_WIDTH_20 

20 MHz, HT channel

MOEP80211_CHAN_WIDTH_40 

40 MHz channel

This channel type requires the parameter freq1 to be specified.

MOEP80211_CHAN_WIDTH_80 

80 MHz channel

This channel type requires the parameter freq1 to be specified.

MOEP80211_CHAN_WIDTH_80P80 

80+80 MHz channel

This channel type requires the parameters freq1 and freq2 to be specified.

MOEP80211_CHAN_WIDTH_160 

160 MHz channel

This channel type requires the parameter freq1 to be specified.

Function Documentation

moep_dev_t moep_dev_radio_open ( const char *  devname,
u32  freq,
enum moep80211_chan_width  chan_width,
u32  freq1,
u32  freq2,
int  mtu,
struct moep_frame_ops l2_ops 
)

open a radio device

The function moep_dev_radio_open() is used to open a radio device. This function is only useful, if you want to create a new layer 2 module based on the radio module.

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.
l2_opsframe header operations for layer 2
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_radio_create ( struct moep_frame_ops l2_ops)

create a radio frame

The function moep_frame_radio_create() is used to create a radio frame with the given frame header operations for layer 2.

Parameters
l2_opsframe header operations for layer 2
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 moep80211_radiotap* moep_frame_radiotap ( moep_frame_t  frame)

radiotap header

The function moep_frame_radiotap() is used to get the radiotap header of a frame.

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