NIC Module Interface
[Network Interface Configurator]


Typedefs

typedef nlh_sNLH_t
typedef enum nic_error_level_e NIC_Error_Level_t
typedef enum nic_result_e NIC_Res_t
typedef void(*) NIC_Error_Handler_t (NLH_t, NIC_Error_Level_t, char *,...)
typedef int(*) NIC_VA_Error_Handler_t (void *, int priority, char *fmt, va_list va)

Enumerations

enum  nic_error_level_e { NIC_FATAL, NIC_ERR = 3, NIC_WARN = 4, NIC_DEBUG = 7 }
enum  nic_result_e { NIC_FAIL = -1, NIC_OK = 0, NIC_SUCCESS = 0 }

Functions

NLH_t nic_open (NIC_Error_Handler_t)
void nic_close (NLH_t *)
void nic_set_logger (NLH_t, NIC_Error_Handler_t)
void nic_set_va_logger (NLH_t, NIC_VA_Error_Handler_t handler, void *handler_arg)
void nic_sys_logger (NLH_t, NIC_Error_Level_t, char *fmt,...)
void nic_stderr_logger (NLH_t, NIC_Error_Level_t, char *fmt,...)
NIC_Res_t nic_set_loglevel (NLH_t, NIC_Error_Level_t)

Detailed Description

NIC Module initialisation / shutdown and error logging.

Typedef Documentation

typedef void(*) NIC_Error_Handler_t(NLH_t, NIC_Error_Level_t, char *,...)

Error handler / logger function type:

Definition at line 134 of file nic.h.

typedef enum nic_error_level_e NIC_Error_Level_t

Error level - functions will call error handler with priority set to one of these values.

typedef enum nic_result_e NIC_Res_t

Result code type

typedef struct nlh_s* NLH_t

Opaque NIC Library Handle - users must first obtain one to create any NIC object. Also records error handler and log level:

Definition at line 104 of file nic.h.


Enumeration Type Documentation

enum nic_error_level_e

Error level - functions will call error handler with priority set to one of these values.

Enumerator:
NIC_FATAL  cannot continue - unused!
NIC_ERR  operation failed
NIC_WARN  not all OK with operation
NIC_DEBUG  debugging

Definition at line 110 of file nic.h.

enum nic_result_e

Result code type

Enumerator:
NIC_FAIL  operation failed
NIC_OK  success
NIC_SUCCESS  success == NIC_OK

Definition at line 122 of file nic.h.


Function Documentation

void nic_close ( NLH_t  ) 

Call this when finished with NIC to free resources

NLH_t nic_open ( NIC_Error_Handler_t   ) 

First call this to obtain a NIC module "handle"

Definition at line 89 of file nic.c.

References nlh_s::eh, eprintf, nlh_s::ll, NIC_ERR, NIC_FATAL, and nlh_s::nl.

Referenced by do_dhcp().


Generated on Mon Aug 14 17:26:18 2006 for libdhcp by  doxygen 1.4.7