Network Interfaces
[Network Interface Configurator]


Typedefs

typedef nic_sNIC_t
typedef void(*) NIC_handler_t (NLH_t nh, NIC_t, void *)

Functions

NIC_t nic_by_name (NLH_t, char *)
NIC_t nic_by_index (NLH_t, int16_t)
void nic_foreach (NLH_t nh, NIC_handler_t handler, void *arg)
char * nic_get_name (NIC_t)
int16_t nic_get_index (NIC_t)
ip_addr_t nic_get_link_addr (NIC_t)
ip_addr_t nic_get_link_broadcast (NIC_t)
NIC_Res_t nic_update (NIC_t nic)
uint32_t nic_get_flags (NIC_t)
void nic_set_flags (NIC_t, uint32_t)
uint32_t nic_get_mtu (NIC_t)
void nic_set_mtu (NIC_t, uint32_t)
char * nic_get_qdisc (NIC_t)
void nic_set_qdisc (NIC_t, char *)
uint32_t nic_get_txqlen (NIC_t)
void nic_set_txqlen (NIC_t, uint32_t)
uint32_t nic_get_link (NIC_t)
void nic_set_link (NIC_t, uint32_t)
uint32_t nic_get_weight (NIC_t)
void nic_set_weight (NIC_t, uint32_t)
uint32_t nic_get_master (NIC_t)
void nic_set_master (NIC_t, uint32_t)
uint32_t nic_get_cost (NIC_t)
void nic_set_cost (NIC_t, uint32_t)
uint32_t nic_get_priority (NIC_t)
void nic_set_priority (NIC_t, uint32_t)
uint32_t nic_get_protinfo (NIC_t)
void nic_set_protinfo (NIC_t, uint32_t)
rtnl_link_stats nic_get_stats (NIC_t)
rtnl_link_ifmap nic_get_ifmap (NIC_t)

Detailed Description

Provides facilities for configuring network interface devices.

Function Documentation

NIC_t nic_by_name ( NLH_t  ,
char *   
)

Interface NIC (Link / IF) functions:

Definition at line 630 of file nic.c.

References nic_s::l, nic_s::nic_link::name, nic_s::nh, NIC_ERR, NIC_FATAL, and nlh_s::nic_name_tree.

Referenced by dhcpv4_control_va(), and do_dhcpv6().

void nic_foreach ( NLH_t  nh,
NIC_handler_t  handler,
void *  arg 
)

Calls handler with nic of each interface currently configured in the kernel and user void* arg arguments.

Warning:
: the callback MUST NOT free(nic) ! Also, only ONE thread can do a nic foreach at a time - this is enforced.

Definition at line 711 of file nic.c.

References nic_cbarg::cb, nic_s::nic_link::ifi, nic_s::l, nic_s::nh, nlh_s::nic_foreach_arg, and nlh_s::nic_name_tree.

struct rtnl_link_ifmap nic_get_ifmap ( NIC_t   ) 

include linux/rtnetlink for this

Definition at line 998 of file nic.c.

struct rtnl_link_stats nic_get_stats ( NIC_t   ) 

include linux/rtnetlink for this

Definition at line 989 of file nic.c.

NIC_Res_t nic_update ( NIC_t  nic  ) 

call nic_update(nic) after you've made all your nic_set_*(nic,...) calls to actually update the link with netlink.

Definition at line 772 of file nic.c.

References nic_s::nic_link::change, nic_s::nic_link::cost, nlh_s::eh, nic_s::nic_link::have, nic_s::nic_link::hdr, nic_s::nic_link::ifi, nic_s::l, nic_s::nic_link::link, nic_s::nic_link::mtu, nic_s::nic_link::name, nic_s::nh, NIC_ERR, NIC_FAIL, NIC_OK, nlh_s::nl, nic_s::nic_link::priority, nic_s::nic_link::protinfo, nic_s::nic_link::qdisc, nic_s::nic_link::txqlen, and nic_s::nic_link::weight.


Generated on Thu Aug 10 21:26:26 2006 for libdhcp by  doxygen 1.4.7