* * $Log: dhcp.h,v $ * Revision 1.8 2005/08/02 17:46:49 haraldkipp * Major API documentation update. * * Revision 1.7 2005/02/03 14:34:05 haraldkipp * Several bug fixes and enhancements. The most important fix will * avoid hanging, when Ethernut is reset while ICMP pings are * received. A large number of changes make the client to follow * RFC 2131 more closely, like maintaining renewal and rebind time. * Two new API calls, NutDhcpStatus() and NutDhcpError(), allow * to query the current status of the DHCP client. The previously * introduced API call NutDhcpIsConfigured() has been marked * deprecated. Another problem was with timeout, because the client * continued negotiation with the server after the timeout time * given in the API called elapsed. Now all internal timeouts are * adjusted to the API timeout. Furthermore the previous version * let the client continue on fatal errors like UDP receive or UDP * broadcast failures. Now the client stops on such errors and * informs the caller. Finally the documentation has been enhanced. * * Revision 1.6 2004/12/31 10:52:18 drsung * Bugfixes from Michel Hendriks applied. * * Revision 1.5 2004/03/18 11:22:03 haraldkipp * Deprecated functions removed * * Revision 1.4 2004/02/25 16:24:13 haraldkipp * DHCP release added * * Revision 1.3 2004/01/14 17:51:05 drsung * Fix for Win2k DHCP server applied. Thanks to Damian Slee * * Revision 1.2 2003/08/05 20:20:36 haraldkipp * Comments added * * Revision 1.1.1.1 2003/05/09 14:41:18 haraldkipp * Initial using 3.2.1 * *
DHCP Client States. | |
Applications can request the current state of the DHCP client by calling NutDhcpStatus(). | |
#define | DHCPST_IDLE |
DHCP state: Stopped. | |
#define | DHCPST_INIT |
DHCP state: Starting. | |
#define | DHCPST_SELECTING |
DHCP state: Selecting. | |
#define | DHCPST_REQUESTING |
DHCP state: Requesting. | |
#define | DHCPST_REBOOTING |
DHCP state: Rebooting. | |
#define | DHCPST_BOUND |
DHCP state: Bound. | |
#define | DHCPST_RENEWING |
DHCP state: Renewing. | |
#define | DHCPST_REBINDING |
DHCP state: Rebinding. | |
#define | DHCPST_INFORMING |
DHCP state: Informing. | |
#define | DHCPST_RELEASING |
DHCP state: Releasing. | |
DHCP Error Codes | |
Applications can request the lastest error code of the DHCP client by calling NutDhcpError(). | |
#define | DHCPERR_TIMEOUT |
DHCP timeout error. | |
#define | DHCPERR_NOMAC |
DHCP MAC error. | |
#define | DHCPERR_STATE |
DHCP state error. | |
#define | DHCPERR_BADDEV |
DHCP error: Bad device. | |
#define | DHCPERR_SYSTEM |
DHCP system error. | |
#define | DHCPERR_TRANSMIT |
DHCP transmit error. | |
#define | DHCPERR_RECEIVE |
DHCP receive error. | |
Functions | |
int | NutDhcpIfConfig (CONST char *name, u_char *mac, u_long timeout) |
Automatically configure an Ethernet network interface. | |
int | NutDhcpRelease (CONST char *name, u_long timeout) |
Relinguish our DHCP lease. | |
int | NutDhcpInform (CONST char *name, u_long timeout) |
Inform DHCP about an allocated address. | |
int | NutDhcpStatus (CONST char *name) |
Return DHCP client status. | |
int | NutDhcpError (CONST char *name) |
Return DHCP error code. | |
int | NutDhcpIsConfigured (void) |
Check if DHCP has configured our interface. |