DHCP
[TCP/IP Stack from Microchip Version 4.50 (Modified)]


Detailed Description

Dynamic Host Configuration Protocol (DHCP) is a protocol used by networked devices (clients) to obtain various parameters necessary for the clients to operate in an Internet Protocol (IP) network.

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 (BOOL bNoAutoIP)
 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.
IP_ADDR GenerateAutoIP (IP_ADDR *lastIP)
 Generates an IPv4 address from the 169.254.X.X auto IP pool.


Define Documentation

 
#define DHCPIsBound (  )     (DHCPFlags.bits.bIsBound)

Determines if the DHCP server is currently bound.

Return values:
TRUE DHCP is bound to given configuration.
FALSE DHCP has not yet been bound.
Remarks:
This function is a MACRO to DHCPFlags.bits.bIsBound.

Definition at line 279 of file DHCP.h.


Function Documentation

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.

Precondition:
None
Returns:
None
Remarks:
Since the board continues using its old configuration, it is possible that the lease may expire and the DHCP server provide the IP to another client. The application should replace the current IP address and other configuration with static information following a call to this function.

Definition at line 233 of file DHCP.c.

void DHCPEnable ( void   ) 

Enables the DHCP client.

Enables the DHCP client if it is disabled. If it is already enabled, nothing is done.

Precondition:
None
Returns:
None

Definition at line 269 of file DHCP.c.

void DHCPReset ( BOOL  bNoAutoIP  ) 

Resets the DHCP Client.

Resets the DHCP Client, giving up any current lease, knowledge of DHCP servers, etc.

Precondition:
None
Parameters:
bNoAutoIP Enables or disables the Auto IP service.
Returns:
None
MODIFIX: Added AutoIP support.

Definition at line 172 of file DHCP.c.

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.

Precondition:
None
Returns:
None
MODIFIX: Added AutoIP support.

Todo:
Save the probed auto IP-Address in EEPROM

Definition at line 307 of file DHCP.c.

IP_ADDR GenerateAutoIP ( IP_ADDR *  lastIP  ) 

Generates an IPv4 address from the 169.254.X.X auto IP pool.

This function was added for the eWicht project. The new IP address must be checked for there uniqueness in the network before using!

Parameters:
lastIP This parameter can point to a IP address used before. The function than constructs the new address based on the last one.
Returns:
Returns the new IP address.

Definition at line 1017 of file DHCP.c.


Generated on Sun Nov 27 20:02:40 2011 for eWicht by  doxygen 1.5.5