Moep Library
2.0-nc
|
Files | |
file | ieee8023.h |
Functions | |
moep_dev_t | moep_dev_ieee8023_open (const char *devname, u8 *addr, const struct in_addr *ip, int prefixlen, int mtu) |
open an ieee8023 device More... | |
moep_dev_t | moep_dev_ieee8023_tap_open (u8 *addr, const struct in_addr *ip, int prefixlen, int mtu) |
open an ieee8023 tap device More... | |
moep_dev_t | moep_dev_ieee8023_unix_open (const char *devname, int mtu) |
open an ieee8023 unix device More... | |
moep_frame_t | moep_frame_ieee8023_create (void) |
create an ieee8023 frame More... | |
moep_frame_t | moep_frame_ieee8023_tap_create (void) |
create an ieee8023 tap frame More... | |
moep_frame_t | moep_frame_ieee8023_unix_create (void) |
create an ieee8023 unix frame More... | |
struct ether_header * | moep_frame_ieee8023_hdr (moep_frame_t frame) |
ieee8023 header More... | |
moep_dev_t moep_dev_ieee8023_open | ( | const char * | devname, |
u8 * | addr, | ||
const struct in_addr * | ip, | ||
int | prefixlen, | ||
int | mtu | ||
) |
open an ieee8023 device
The function moep_dev_ieee8023_open() is used to open an ieee8023 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_ieee8023_tap_open | ( | u8 * | addr, |
const struct in_addr * | ip, | ||
int | prefixlen, | ||
int | mtu | ||
) |
open an ieee8023 tap device
The function moep_dev_ieee8023_tap_open() is used to open an ieee8023 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_ieee8023_unix_open | ( | const char * | devname, |
int | mtu | ||
) |
open an ieee8023 unix device
The function moep_dev_ieee8023_unix_open() is used to open an ieee8023 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_ieee8023_create | ( | void | ) |
create an ieee8023 frame
The function moep_frame_ieee8023_create() is used to create an ieee8023 frame.
NULL | on error, errno is set appropriately. |
moep_frame_t moep_frame_ieee8023_tap_create | ( | void | ) |
create an ieee8023 tap frame
The function moep_frame_ieee8023_tap_create() is used to create an ieee8023 tap frame.
NULL | on error, errno is set appropriately. |
moep_frame_t moep_frame_ieee8023_unix_create | ( | void | ) |
create an ieee8023 unix frame
The function moep_frame_ieee8023_unix_create() is used to create an ieee8023 unix frame.
NULL | on error, errno is set appropriately. |
struct ether_header* moep_frame_ieee8023_hdr | ( | moep_frame_t | frame | ) |
ieee8023 header
The function moep_frame_ieee8023_hdr() is used to get the ieee8023 header of a frame.
frame | the frame |
NULL | on error, errno is set appropriately. |
EACCES | The frame is not an ieee8023 frame. |
ENOMEM | Not enough memory available. |