dhcp.h File Reference

Go to the source code of this file.

DHCP Client States.

Applications can request the current state of the DHCP client by calling NutDhcpStatus().

#define DHCPST_IDLE   0
 DHCP state: Stopped.
#define DHCPST_INIT   1
 DHCP state: Starting.
#define DHCPST_SELECTING   2
 DHCP state: Selecting.
#define DHCPST_REQUESTING   3
 DHCP state: Requesting.
#define DHCPST_REBOOTING   4
 DHCP state: Rebooting.
#define DHCPST_BOUND   5
 DHCP state: Bound.
#define DHCPST_RENEWING   6
 DHCP state: Renewing.
#define DHCPST_REBINDING   7
 DHCP state: Rebinding.
#define DHCPST_INFORMING   8
 DHCP state: Informing.
#define DHCPST_RELEASING   9
 DHCP state: Releasing.

DHCP Error Codes

Applications can request the lastest error code of the DHCP client by calling NutDhcpError().

#define DHCPERR_TIMEOUT   1
 DHCP timeout error.
#define DHCPERR_NOMAC   2
 DHCP MAC error.
#define DHCPERR_STATE   3
 DHCP state error.
#define DHCPERR_BADDEV   17
 DHCP error: Bad device.
#define DHCPERR_SYSTEM   18
 DHCP system error.
#define DHCPERR_TRANSMIT   19
 DHCP transmit error.
#define DHCPERR_RECEIVE   20
 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.


© 2000-2007 by egnite Software GmbH - visit http://www.ethernut.de/