Moep Library
2.0-nc
|
Files | |
file | moep8023.h |
Data Structures | |
struct | moep8023_hdr |
Macros | |
#define | MOEP8023_FRAME_DISCRIMINATOR 0x88b5 |
Functions | |
moep_dev_t | moep_dev_moep8023_open (const char *devname, u8 *addr, const struct in_addr *ip, int prefixlen, int mtu) |
open a moep8023 device More... | |
moep_dev_t | moep_dev_moep8023_tap_open (u8 *addr, const struct in_addr *ip, int prefixlen, int mtu) |
open a moep8023 tap device More... | |
moep_dev_t | moep_dev_moep8023_unix_open (const char *devname, int mtu) |
open a moep8023 unix device More... | |
moep_frame_t | moep_frame_moep8023_create (void) |
create a moep8023 frame More... | |
moep_frame_t | moep_frame_moep8023_tap_create (void) |
create a moep8023 tap frame More... | |
moep_frame_t | moep_frame_moep8023_unix_create (void) |
create a moep8023 unix frame More... | |
struct moep8023_hdr * | moep_frame_moep8023_hdr (moep_frame_t frame) |
moep8023 header More... | |
moep_dev_t moep_dev_moep8023_open | ( | const char * | devname, |
u8 * | addr, | ||
const struct in_addr * | ip, | ||
int | prefixlen, | ||
int | mtu | ||
) |
open a moep8023 device
The function moep_dev_moep8023_open() is used to open a moep8023 device.
devname,the | device name, e.g. eth0 |
addr | the hardware address of the device; This can be NULL to be automatically set. |
ip | the IP address of the device; This can be NULL to set no IP address. |
prefixlen | the length of the IP prefix. |
mtu | the MTU of the device; This includes all headers. |
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_dev_t moep_dev_moep8023_tap_open | ( | u8 * | addr, |
const struct in_addr * | ip, | ||
int | prefixlen, | ||
int | mtu | ||
) |
open a moep8023 tap device
The function moep_dev_moep8023_tap_open() is used to open a moep8023 tap device.
addr | the hardware address of the device; This can be NULL to be automatically set. |
ip | the IP address of the device; This can be NULL to set no IP address. |
prefixlen | the length of the IP prefix. |
mtu | the MTU of the device; This includes all headers. |
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_dev_t moep_dev_moep8023_unix_open | ( | const char * | devname, |
int | mtu | ||
) |
open a moep8023 unix device
The function moep_dev_moep8023_unix_open() is used to open a moep8023 unix device.
devname | the device name; This must be the path of a unix domain socket. |
mtu | the MTU of the device; This includes all headers. |
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_moep8023_create | ( | void | ) |
create a moep8023 frame
The function moep_frame_moep8023_create() is used to create a moep8023 frame.
NULL | on error, errno is set appropriately. |
moep_frame_t moep_frame_moep8023_tap_create | ( | void | ) |
create a moep8023 tap frame
The function moep_frame_moep8023_tap_create() is used to create a moep8023 tap frame.
NULL | on error, errno is set appropriately. |
moep_frame_t moep_frame_moep8023_unix_create | ( | void | ) |
create a moep8023 unix frame
The function moep_frame_moep8023_unix_create() is used to create a moep8023 unix frame.
NULL | on error, errno is set appropriately. |
struct moep8023_hdr* moep_frame_moep8023_hdr | ( | moep_frame_t | frame | ) |
moep8023 header
The function moep_frame_moep8023_hdr() is used to get the moep8023 header of a frame.
frame | the frame |
NULL | on error, errno is set appropriately. |
EACCES | The frame is not a moep8023 frame. |
ENOMEM | Not enough memory available |