IP Address example
Introduction
This is a simple application that demonstrates how to use different
ethernet address resolvers.
Configuring the example
Edit the config.xml file to select the address resolver
to use. The address resolver is used by the transport to resolve the IP
address for the interface to use. The following address resolvers are
available.
dhcp - requests the IP address and configuration
from a DHCP server. This is typically used for a development system as
the board will need to co-exist on a network with additional devices.
In this case, the DHCP server will assign a unique address for the
board.
bootp - requests the IP address and configuration
from a BOOTP server. This should be used if there is a bootp server
that can provide the IP address for the ethernet address on the board.
monitor - uses the IP address given to the monitor.
This does not support DNS or a default gateway. This is only supported
if the monitor version is supported by the BSP (check the BSP release
notes for confirmation of this).
custom - uses preprocessor constants in the config.xml
file to set the IP address. This is likely to be the technique to use
in a deployed environment where the config.xml file
contains a system default that can be overridden by settings stored in
flash.
Monitor address resolver
The SDK supports a special
address resolver, called the monitor resolver. This uses the IP address
the the monitor uses and relies on the your BSP supporting your
development board. The monitor gets its IP address when the lfdownload
tool is used to download an application to the board. The address it
uses is the address specified by the DCT_DEV_CARD
environment variable or the address passed in on the command line (-a)
option.
Building the example
Change directory to the ipaddress example
cd %LF_HOME%\examples\ipaddress
Rebuild the application
lfmake clean all
Running the example
To run the example on the board
lfdownload ipaddress.bin
Features
This example demonstrates the following SDK features.