GATE
netconfigs.h File Reference

Network configuration utilities. More...

Classes

struct  gate_netconfig_nif_t
 
struct  gate_netconfig_address_t
 

Macros

#define GATE_NETCONFIG_STATUS_UNKNOWN   0
 
#define GATE_NETCONFIG_STATUS_DISABLED   0x0001
 
#define GATE_NETCONFIG_STATUS_ENABLED   0x0002
 
#define GATE_NETCONFIG_STATUS_NONFUNCT   0x0004
 
#define GATE_NETCONFIG_STATUS_OPERATIONAL   0x0008
 
#define GATE_NETCONFIG_STATUS_CONNECTING   0x0010
 
#define GATE_NETCONFIG_STATUS_CONNECTED   0x0020
 
#define GATE_NETCONFIG_STATUS_DISCONNECTED   0x0040
 
#define GATE_NETCONFIG_STATUS_ERROR   0x8000
 
#define GATE_NETCONFIG_TYPE_UNKNOWN   0x0000
 
#define GATE_NETCONFIG_TYPE_ETHERNET   0x0001
 
#define GATE_NETCONFIG_TYPE_TOKENRING   0x0002
 
#define GATE_NETCONFIG_TYPE_FDDI   0x0003
 
#define GATE_NETCONFIG_TYPE_PPP   0x0004
 
#define GATE_NETCONFIG_TYPE_LOOPBACK   0x0005
 
#define GATE_NETCONFIG_TYPE_WLAN   0x0006
 
#define GATE_NETCONFIG_TYPE_SLIP   0x0007
 
#define GATE_NETCONFIG_TYPE_OTHER   0x00ff
 
#define GATE_NETCONFIG_ADDRTYPE_HOSTIP   0x0001
 
#define GATE_NETCONFIG_ADDRTYPE_GATEWAY   0x0002
 
#define GATE_NETCONFIG_ADDRTYPE_DNS   0x0003
 
#define GATE_NETCONFIG_ADDRTYPE_DHCP   0x0004
 

Typedefs

typedef gate_bool_t(* gate_netcfg_enum_nif_callback_t) (gate_netconfig_nif_t const *nif, void *userparam)
 
typedef gate_bool_t(* gate_netcfg_enum_addresses_callback_t) (gate_netconfig_address_t const *addr, void *userparam)
 

Functions

GATE_SYSTEM_API char const * gate_netconfig_print_status (unsigned status)
 
GATE_SYSTEM_API char const * gate_netconfig_print_type (unsigned tp)
 
GATE_SYSTEM_API gate_result_t gate_netconfig_enum_nifs (gate_netcfg_enum_nif_callback_t cb, void *userparam)
 
GATE_SYSTEM_API gate_result_t gate_netconfig_enum_addresses (gate_netconfig_nif_t const *nif, gate_netcfg_enum_addresses_callback_t cb, void *userparam)
 
GATE_SYSTEM_API gate_result_t gate_netconfig_enable_nif (gate_netconfig_nif_t const *nif, gate_bool_t enabled)
 
GATE_SYSTEM_API gate_result_t gate_netconfig_setup_nif_addresses (gate_netconfig_nif_t const *nif, gate_netconfig_address_t const *addresses, gate_size_t addresses_count)
 

Detailed Description

Network configuration utilities.

Macro Definition Documentation

◆ GATE_NETCONFIG_STATUS_CONNECTED

#define GATE_NETCONFIG_STATUS_CONNECTED   0x0020

NIF is connected to a network

◆ GATE_NETCONFIG_STATUS_CONNECTING

#define GATE_NETCONFIG_STATUS_CONNECTING   0x0010

NIF is currently connecting

◆ GATE_NETCONFIG_STATUS_DISABLED

#define GATE_NETCONFIG_STATUS_DISABLED   0x0001

NIF is disabled

◆ GATE_NETCONFIG_STATUS_DISCONNECTED

#define GATE_NETCONFIG_STATUS_DISCONNECTED   0x0040

NIF is disconnected

◆ GATE_NETCONFIG_STATUS_ENABLED

#define GATE_NETCONFIG_STATUS_ENABLED   0x0002

NIF is enabled

◆ GATE_NETCONFIG_STATUS_ERROR

#define GATE_NETCONFIG_STATUS_ERROR   0x8000

NIF is in error state

◆ GATE_NETCONFIG_STATUS_NONFUNCT

#define GATE_NETCONFIG_STATUS_NONFUNCT   0x0004

NIF is non-operational

◆ GATE_NETCONFIG_STATUS_OPERATIONAL

#define GATE_NETCONFIG_STATUS_OPERATIONAL   0x0008

NIF is operational