DHCP
[TCP/IP User Protocols]


Files

file  dhcp.h
 DHCP client Module for Modtronix TCP/IP Stack.
file  dhcp.h
 DHCP client Module for Modtronix TCP/IP Stack.
file  dhcp.h
 DHCP client Module for Modtronix TCP/IP Stack.
file  dhcp.h
 DHCP client Module for Modtronix TCP/IP Stack.

Detailed Description

The DHCP layer of the Modtronix TCP/IP stack is implemented by the file "dhcp.c". The header file "dhcp.h" defines the services provided by the layer. DHCP is an active layer that broadcasts DHCP requests and automatically receives and decodes DHCP responses. Its main features include: The DHCP module is implemented as a cooperative task, performing automatic operations without the knowledge of the main application. The actual DHCP integration and control is done by the Stack Manager; it handles all required operations as part of its standard task, using the DHCP APIs to control the moduleÆs behavior. The user does not need to know about DHCP in order to use it.

A user application may also choose to call some of the APIs to directly control DHCP operation, such as whether DHCP is configured or not, and whether to permanently stop DHCP. Normally, the user's application should not need to directly interact with DHCP at all. To use the DHCP module, the user project files must be modified as follows:

When DHCP is implemented, the user application must not attempt network communications until DHCP is configured properly. Normally, if a user application contains one or more client applications that require communications on power-up or RESET, the application must check that DHCP is configured before transmitting any data using the lower layer modules. This can be done with the function DHCPIsBound()

The official DHCP specification (RFC1541) requires the DHCP client to renew its IP configuration before its lease time expires. To track lease time, the user application must make sure that TickUpdate() is called as required, and that reasonable time accuracy is maintained (refer to the source code file "websrvr.c" for a working example). The time resolution required is 15 minutes, plus or minus, which means that TickUpdate() may be called at a very low priority.

For the DHCP module to automatically configure the addresses and subnet mask, there must be at least one DHCP server on the network. It is the userÆs responsibility to implement some method for "publishing" the configurations back to potential users. Options range from manually reading the information from a display on each node, to storing the information in a central server. DHCP updates the values of MY_IP_BYTE?, MY_GATE_BYTE? and MY_MASK_BYTE? as a result of automatic configuration.

Configuration

For details on configuring this module, see Configuration section of dhcp.h file.

The DHCP layer of the Modtronix TCP/IP stack is implemented by the file "dhcp.c". The header file "dhcp.h" defines the services provided by the layer. DHCP is an active layer that broadcasts DHCP requests and automatically receives and decodes DHCP responses. Its main features include:

The DHCP module is implemented as a cooperative task, performing automatic operations without the knowledge of the main application. The actual DHCP integration and control is done by the Stack Manager; it handles all required operations as part of its standard task, using the DHCP APIs to control the moduleÆs behavior. The user does not need to know about DHCP in order to use it.

A user application may also choose to call some of the APIs to directly control DHCP operation, such as whether DHCP is configured or not, and whether to permanently stop DHCP. Normally, the user's application should not need to directly interact with DHCP at all. To use the DHCP module, the user project files must be modified as follows:

When DHCP is implemented, the user application must not attempt network communications until DHCP is configured properly. Normally, if a user application contains one or more client applications that require communications on power-up or RESET, the application must check that DHCP is configured before transmitting any data using the lower layer modules. This can be done with the function DHCPIsBound()

The official DHCP specification (RFC1541) requires the DHCP client to renew its IP configuration before its lease time expires. To track lease time, the user application must make sure that TickUpdate() is called as required, and that reasonable time accuracy is maintained (refer to the source code file "websrvr.c" for a working example). The time resolution required is 15 minutes, plus or minus, which means that TickUpdate() may be called at a very low priority.

For the DHCP module to automatically configure the addresses and subnet mask, there must be at least one DHCP server on the network. It is the userÆs responsibility to implement some method for "publishing" the configurations back to potential users. Options range from manually reading the information from a display on each node, to storing the information in a central server. DHCP updates the values of MY_IP_BYTE?, MY_GATE_BYTE? and MY_MASK_BYTE? as a result of automatic configuration.

Configuration

For details on configuring this module, see Configuration section of dhcp.h file.

Generated on Wed Feb 3 12:45:36 2010 for SBC65EC Web Server by  doxygen 1.5.8