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

Files

file  unix.h
 

Functions

moep_dev_t moep_dev_unix_open (const char *devname, int mtu, struct moep_frame_ops *l2_ops)
 open a unix device More...
 
moep_frame_t moep_frame_unix_create (struct moep_frame_ops *l2_ops)
 create a unix frame More...
 

Detailed Description

Function Documentation

moep_dev_t moep_dev_unix_open ( const char *  devname,
int  mtu,
struct moep_frame_ops l2_ops 
)

open a unix device

The function moep_dev_unix_open() is used to open a unix device.

Parameters
devnamethe device name; This must be the path of a unix domain socket.
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_unix_create ( struct moep_frame_ops l2_ops)

create a unix frame

The function moep_frame_unix_create() is used to create a unix 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().