By using this protocol, system administration workload greatly decreases, and devices can be added to the network with minimal or no manual configurations (Source: Wikipedia).
Files | |
file | DHCP.c |
Dynamic Host Configuration Protocol (DHCP) Client Module for Microchip TCP/IP Stack. | |
file | DHCP.h |
DHCP Defs for Microchip TCP/IP Stack. | |
Defines | |
#define | DHCPIsBound() (DHCPFlags.bits.bIsBound) |
Determines if the DHCP server is currently bound. | |
Functions | |
void | DHCPReset (void) |
Resets the DHCP Client. | |
void | DHCPTask (void) |
Performs periodic DHCP tasks. | |
void | DHCPDisable (void) |
Disables the DHCP client. | |
void | DHCPEnable (void) |
Enables the DHCP client. | |
BOOL | DHCPHasBoundStateChanged (void) |
This function checks whether the internal address bound state of thze DHCP client has changed. | |
void | DHCPGetIPParameterFromServer (IPConfig_t *pIPConfig) |
If DHCP client is bound this function fills the given IP structure with the current IP parameters obtained from DHCP server. | |
BOOL | DHCPIsEnabled (void) |
This function returns the enable state of the DHCP client. | |
BOOL | DHCPHasFailed (void) |
This function returns the failed state of the DHCP client. |
#define DHCPIsBound | ( | ) | (DHCPFlags.bits.bIsBound) |
Determines if the DHCP server is currently bound.
TRUE | DHCP is bound to given configuration. | |
FALSE | DHCP has not yet been bound. |
void DHCPDisable | ( | void | ) |
Disables the DHCP client.
Disables the DHCP client by sending the state machine to "SM_DHCP_DISABLED". If the board was previously configured by DHCP, the configuration will continue to be used but the module will no longer preform any renewals.
void DHCPEnable | ( | void | ) |
Enables the DHCP client.
Enables the DHCP client if it is disabled. If it is already enabled, nothing is done.
void DHCPGetIPParameterFromServer | ( | IPConfig_t * | pIPConfig | ) |
If DHCP client is bound this function fills the given IP structure with the current IP parameters obtained from DHCP server.
Those parameters which are not obtained by server stay zero. If the client is not bound then the structure is cleared only.
pIPConfig | Pointer to IP structure field. |
BOOL DHCPHasBoundStateChanged | ( | void | ) |
This function checks whether the internal address bound state of thze DHCP client has changed.
The bound state change is a semaphore and clears automatically with this function call (if set).
TRUE | State has changed (either got an IP address or lost the current IP due elapsed lease time. Check DHCPIsBound for more details. | |
FALSE | State has not changed since last call. |
BOOL DHCPHasFailed | ( | void | ) |
This function returns the failed state of the DHCP client.
TRUE | Obtaining has failed for the first time - client tries later automatically. | |
FALSE | The client has successfully obtained IP data or obtianing is currently in progress. |
BOOL DHCPIsEnabled | ( | void | ) |
This function returns the enable state of the DHCP client.
TRUE | The client is enabled. | |
FALSE | The client is disabled. |
void DHCPReset | ( | void | ) |
Resets the DHCP Client.
Resets the DHCP Client, giving up any current lease, knowledge of DHCP servers, etc.
void DHCPTask | ( | void | ) |
Performs periodic DHCP tasks.
This function performs any periodic tasks requied by the DHCP module, such as sending and receiving messages involved with obtaining and maintaining a lease.