Modules | |
| IPv4 DHCP Client Control and Configuration | |
| IPv6 DHCP Client Control and Configuration | |
Data Structures | |
| struct | dhcpc_nic_s |
| struct | dhcp_nic |
Typedefs | |
| typedef dhcpc_nic_s | DHCP_config |
| typedef dhcp_nic | DHCP_nic |
Enumerations | |
| enum | DHCP_Preference { DHCPv4_DISABLE = 1, DHCPv6_DISABLE = 2, IPv6_PREFERENCE = 4, DHCPv4_DISABLE_ADDRESSES = 8, DHCPv4_DISABLE_ROUTES = 16, DHCPv4_DISABLE_RESOLVER = 32, DHCPv6_DISABLE_ADDRESSES = 64, DHCPv6_DISABLE_RESOLVER = 128, DHCPv4_DISABLE_HOSTNAME_SET = 256, DHCP_ACCEPT_FIRST_LEASE = 512 } |
Functions | |
| DHCP_nic * | dhcp_nic (NLH_t nh, DHCP_Preference preference, char *eth_if_name, LIBDHCP_Capability dhc_cap, time_t timeout, LIBDHCP_Error_Handler error_handler, uint8_t log_level,...) |
| NIC_Res_t | dhcp_nic_configure (DHCP_nic *dhcp_nic) |
| void | dhcp_nic_free (DHCP_nic *) |
| NIC_Res_t | do_dhcp (DHCP_Preference preference, char *eth_if_name, LIBDHCP_Capability dhc_cap, time_t timeout, LIBDHCP_Error_Handler error_handler, uint8_t log_level,...) |
| typedef struct dhcpc_nic_s DHCP_config |
DHCP_config: The DHCP network interface configuration structure.
This structure encapsulates the network configuration information returned in a DHCP lease, and the lease itself.
DHCP_nic: The DHCP network interface control structure.
This structure encapsulates the control and configuration of both DHCP clients.
| enum DHCP_Preference |
The DHCP_Preference enumeration.
Controls which clients are to be run, and which configuration actions are to be enabled on receipt of a lease.
Definition at line 46 of file dhcp_nic.h.
| DHCP_nic* dhcp_nic | ( | NLH_t | nh, | |
| DHCP_Preference | preference, | |||
| char * | eth_if_name, | |||
| LIBDHCP_Capability | dhc_cap, | |||
| time_t | timeout, | |||
| LIBDHCP_Error_Handler | error_handler, | |||
| uint8_t | log_level, | |||
| ... | ||||
| ) |
dhcp_nic() : function which invokes the DHCP clients and returns a network interface configuration.
| nh | nic library handle - see Network Interface Configurator |
| preference |
DHCP_Preference -
|
| eth_if_name | network interface name - eg. 'eth0' |
| dhc_cap |
DHCP_Capability -
|
| timeout |
timeout -
|
| error_handler |
error handler -
|
| log_level |
log level -
|
Definition at line 417 of file dhcp_nic.c.
dhcp_nic_configure () : function to apply the DHCP configuration to the network interface .
| dhcp_nic |
|
Definition at line 524 of file dhcp_nic.c.
References nic_ip_address_list_node_s::addr, dhcp_nic::dhc6ctl, dhcp_nic::dhcpv4, dhcp_nic::dhcpv6, DHCPv6_DISABLE_RESOLVER, dhcpc_nic_s::dns_list, IPaddr_list_t, NIC_FAIL, dhcp_nic::preference, and dhcpc_nic_s::search_list.
Referenced by do_dhcp().
| void dhcp_nic_free | ( | DHCP_nic * | ) |
function dhcp_nic_free() : frees all resources associated with the DHCP_nic structure
Definition at line 446 of file dhcp_nic.c.
References dhcp_nic::dhc4ctl, dhcp_nic::dhc6ctl, dhcpv4_control_free(), dhcp_nic::dhcpv6, dhcpv6_nic_free(), dhcp_nic::nh, and nic_close().
Referenced by do_dhcp().
| NIC_Res_t do_dhcp | ( | DHCP_Preference | preference, | |
| char * | eth_if_name, | |||
| LIBDHCP_Capability | dhc_cap, | |||
| time_t | timeout, | |||
| LIBDHCP_Error_Handler | error_handler, | |||
| uint8_t | log_level, | |||
| ... | ||||
| ) |
do_dhcp(): function to run the clients and apply the DHCP configuration to the network interface
| preference |
DHCP_Preference -
|
| eth_if_name | interface name |
| dhc_cap |
DHCP_Capability -
|
| timeout |
timeout -
|
| error_handler |
error_handler
|
| log_level |
log_level -
|
Definition at line 469 of file dhcp_nic.c.
References dhcp_nic_configure(), dhcp_nic_free(), LOG_FATAL, nic_close(), NIC_FAIL, and nic_open().
1.4.7