Embedded Xinu Operating System
An ongoing research project and educational operating system.
 All Data Structures Files Functions Variables Typedefs Enumerations Macros Groups Pages
Functions
DHCP client

Client for Dynamic Host Configuration Protocol (IPv4 version) More...

Functions

syscall dhcpClient (int descrp, uint timeout, struct dhcpData *data)
 

Detailed Description

Client for Dynamic Host Configuration Protocol (IPv4 version)

Function Documentation

syscall dhcpClient ( int  descrp,
uint  timeout,
struct dhcpData *  data 
)

DHCP (Dynamic Host Configuration Protocol) client for IPv4 autoconfiguration.

TODO: This function returns immediately once the IP address has been assigned. It does not handle renewing leases.

Parameters
[in]descrpDevice descriptor for the network device on which to open the DHCP client on. This must be a network device that is open but has no network interface brought up on it.
[in]timeoutSeconds to wait before timing out (must be a positive integer).
[out]dataOn success, this structure is filled in with the information about the IPv4 configuration. At least the ip and mask members will be valid. The gateway, bootfile, and next_server members are optional and will be left as all 0's if not provided.
Returns
::OK if successful; ::SYSERR if sending a DHCPDISCOVER packet failed or if a parameter was invalid; ::TIMEOUT if timed out.