Main Page   Modules   Data Structures   File List   Data Fields   Globals   Related Pages   Examples  

DHCP Client.

Dynamic host configuration protocol. More...

Data Structures

struct  DYNCFG

Functions

int NutDhcpParse (DYNCFG *cfgp, struct bootp *bp, int len)
int NutDhcpReceive (UDPSOCKET *sock, struct bootp *rxbuf, u_long wsecs)
int NutDhcpDiscover (UDPSOCKET *sock, u_long daddr, u_short dport, struct bootp *bp, DYNCFG *cfgp)
 Broadcast a DHCP discover telegram. More...

int NutDhcpRequest (UDPSOCKET *sock, u_long daddr, u_short dport, struct bootp *bp, DYNCFG *cfgp)
int NutDhcpRelease (UDPSOCKET *sock, u_long daddr, u_short dport, struct bootp *bp, DYNCFG *cfgp)
 NutDhcpClient (void *arg)
 DHCP client thread.

int NutDhcpClientStart (NUTDEVICE *dev)
 Start DHCP Client. More...


Detailed Description

Dynamic host configuration protocol.


Function Documentation

int NutDhcpClientStart ( NUTDEVICE * dev )
 

Start DHCP Client.

Note:
Applications typically do not call this function. It's automatically called by NutNetIfConfig(), if the IP address parameter is set to zero.

Bug:
The client doesn't send update information to the server. To avoid loosing the assignment while Ethernut is down, addresses can be fixed in the DHCP server tables.

int NutDhcpDiscover ( UDPSOCKET * sock,
u_long daddr,
u_short dport,
struct bootp * bp,
DYNCFG * cfgp )
 

Broadcast a DHCP discover telegram.

Returns:
0 on success, -1 if send failed.

int NutDhcpParse ( DYNCFG * cfgp,
struct bootp * bp,
int len )
 

Parse a DHCP reply telegram.

Parameters:
rp   Pointer to the reply telegram.
len   Number of valid bytes in the reply telegram.

Returns:
0 on success, -1 otherwise.

int NutDhcpReceive ( UDPSOCKET * sock,
struct bootp * rxbuf,
u_long wsecs )
 

Collect offer responses.

Parameters:
sock   Handle of the listening socket.
wsecs   Maximum seconds to wait for a telegram.

Returns:
Number of bytes received, zero on timeout or -1 on error.

int NutDhcpRelease ( UDPSOCKET * sock,
u_long daddr,
u_short dport,
struct bootp * bp,
DYNCFG * cfgp )
 

Release our ip address.

int NutDhcpRequest ( UDPSOCKET * sock,
u_long daddr,
u_short dport,
struct bootp * bp,
DYNCFG * cfgp )
 

Broadcast the offered settings.


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