diff options
author | Flavio Santes <flavio.santes@intel.com> | 2017-02-02 13:49:16 -0600 |
---|---|---|
committer | Jukka Rissanen <jukka.rissanen@linux.intel.com> | 2017-02-03 15:59:19 +0200 |
commit | 20bf36601bc4da65a34597ef38541b99b0b82396 (patch) | |
tree | 9c2d534dc626af9db9ed33376a29f979e6c67573 /samples | |
parent | 3c8000cca5a2098017286f1d9c3d8bc4a56fc5e3 (diff) |
samples/net/dns: Update README file
The DNS client sample application was updated to use IP addresses
from the prj_*.conf files. This patch updates the README file to
reflect those changes.
Change-Id: Ic72510be8da208aef19fb188560221e1c2386457
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
Diffstat (limited to 'samples')
-rw-r--r-- | samples/net/dns_client/README.rst | 38 |
1 files changed, 26 insertions, 12 deletions
diff --git a/samples/net/dns_client/README.rst b/samples/net/dns_client/README.rst index f78b6ee31..c626ed899 100644 --- a/samples/net/dns_client/README.rst +++ b/samples/net/dns_client/README.rst @@ -68,28 +68,42 @@ GDN GND (9) Building and Running ******************** -Read the :file:`samples/net/dns_client/src/config.h` file. -Change the IP addresses and DNS server port according to the -LAN environment. - Network Configuration ===================== -For example, if your LAN is 192.168.0.0/16, the IPv4 addresses must be -similar to: +Open the project configuration file for your platform, for example: +:file:`prj_frdm_k64f.conf` is the configuration file for the +:ref:`frdm_k64f` board. For IPv4 networks, set the following variables: -.. code-block:: c +.. code-block:: console + + CONFIG_NET_IPV4=y + CONFIG_NET_IPV6=n + +IPv6 is the preferred routing technology for this sample application, +if CONFIG_NET_IPV6=y is set, the value of CONFIG_NET_IPV4 is ignored. + +In this sample application, only static IP addresses are supported, +those addresses are specified in the project configuration file, +for example: + +.. code-block:: console + + CONFIG_NET_SAMPLES_MY_IPV6_ADDR="2001:db8::1" + CONFIG_NET_SAMPLES_PEER_IPV6_ADDR="2001:db8::2" - #define LOCAL_ADDR { { { 192, 168, 1, 101 } } } - #define REMOTE_ADDR { { { 192, 168, 1, 1 } } } +are the IPv6 addresses for the DNS client running Zephyr and the +DNS server, respectively. -where REMOTE_ADDR is the address of the DNS server. +Alternatively, the IP addresses may be specified in the +:file:`samples/net/dns_client/src/config.h` file. -The DNS server port must be specified also, for example: +Open the :file:`samples/net/dns_client/src/config.h` file and set the +server port to match the DNS server setup, for example: .. code-block:: c - #define PEER_PORT 5353 + #define REMOTE_PORT 5353 assumes that the DNS server is listening at UDP port 5353. |