Home |
DHCP Client |
DHCP ClientUsing the DHCP Client API, an application can obtain an IP address, network configuration parameters, or both. The DHCP Client is an optional add-on for RTIP-32 and must be purchased in addition to RTIP-32 to be available. Clients using DHCP to obtain network configuration parameters may not be able to get all the parameters they desire. Some DHCP servers will only be able to supply clients with partial configuration information. Since a DHCP client may receive responses from multiple servers, it is possible that there will be several servers, each supplying a different set of configuration parameters, from which the client has to choose. To facilitate this, the DHCP client API allows the assignment of priorities to various parameters and implements a scoring system to determine the best offer. If the scoring system is not acceptable, the user can implement their own offer selection routine through a callback set by xn_set_dhcp_callback. The DHCP client will automatically extend its lease (referred to as renewing lease) by calling xn_extend_dhcp_lease when one half of the lease time has expired. It will send the extend request directly to the DHCP server it received the original lease from. When 87.5% of the lease time has expired, the client will extend its lease (referred to as rebinding lease). It will broadcast the rebind request. The DHCP client will retry extend requests at 1/2 intervals during renew and rebind stages. Most applications will use the standard DHCP client configuration set through xn_init_dhcp_conf and then calling xn_dhcp. Setting up a custom configuration is described in section struct DHCP_conf. Applications requiring the DHCP Client must link library Dhcp.lib (DHCP Client/Server library) or Dhcpc.lib (DHCP Client library). XN_REGISTER_DHCP_CLI must be called before xn_rtip_init. The complete API documentation is included in the RTIP-32 Reference Manual. Most Demo programs can optionally be configured to use the DHCP Client.
|