Moep Library
2.0-nc
|
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_radiotap * | moep_frame_radiotap (moep_frame_t frame) |
radiotap header More... | |
enum moep80211_chan_width |
channel width definition
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.
devname | the device name; This can either be the physical device name e.g. 'phy0' or an interface name e.g. 'wlan1'. |
freq | the channel frequency in MHz |
chan_width | the channel width |
freq1 | the first center frequency in MHz; This value may be ignored depending on the channel width. |
freq2 | the second center frequency in MHz; This value may be ignored depending on the channel width. |
mtu | the MTU of the device; This includes all headers. |
l2_ops | frame header operations for layer 2 |
NULL | on error, errno is set appropriately. |
EINVAL | Invalid argument |
EMFILE | Too many open files; Some filedescriptors are too big for select. |
ENOMEM | Not 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.
l2_ops | frame header operations for layer 2 |
NULL | on error, errno is set appropriately. |
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.
frame | the frame |
NULL | on error, errno is set appropriately. |
EACCES | The frame is not a radio frame. |
ENOMEM | Not enough memory available. |