zephyr/samples/net/dns_client/README
Flavio Santes 13a75b7e42 dns: Remove deprecated functionality
This commit removes deprecated APIs and replaces them with routines
that provide similar functionality without the flexibility originally
offered by the deprecated APIs.

Removing deprecated routines will help us to be prepared once the
new IP stack is ready (ZEP-793). Furthermore, this commit will also
help us to move our current DNS Client implementation to the lib/iot
directory, as specified by ZEP-847.

This commit removes the netz library from the DNS client sample
application. UDP functionality is replaced by primitive routines.
Specifically, the following changes are applied by this patch:

- Remove netz routines
- Remove app_buf data structure
- Introduce primitive data types in the DNS client code
- Introduce primitive network routines
- Add a header file containing configurable parameters

Jira: ZEP-793
Jira: ZEP-847

Change-Id: I0302133da77308f0cdd9ace2c0265e6b77673ff0
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-09-12 02:15:44 +00:00

140 lines
3.2 KiB
Plaintext

DNS Client Application
Requirements
------------
* Ethernet LAN for testing purposes.
* Galileo Gen 2 Development Board.
* USB-UART cable: CH340, FTDI 6-pin or equivalent for debugging.
* dnsmasq application. The dnsmasq version used in this sample is:
dnsmasq -v
Dnsmasq version 2.75 Copyright (c) 2000-2015 Simon Kelley
Building instructions
---------------------
* Read src/tcp_config.h, change the IP addresses according to the LAN
environment.
* make pristine && make are enough to build this sample.
* Follow the steps indicated here:
https://www.zephyrproject.org/doc/board/galileo.html
to load the binary into the Galileo Dev Board.
Usage
-----
* Open a terminal window and type:
dnsmasq -d
* Connect the USB-UART cable to the Galileo. Open a terminal and run:
screen /dev/ttyUSB0 115200
* Connect Galileo to the LAN, Turn on the board.
* The screen terminal window will show:
-----------------------------------------
Domain name: not_a_real_domain_name
[fiber:89] DNS Query: OK, ID: 0
[fiber:92] TX: OK
[fiber:97] RX: OK
[fiber:102] DNS Response: ERROR <- :)
-----------------------------------------
Domain name: linuxfoundation.org
[fiber:89] DNS Query: OK, ID: 1
[fiber:92] TX: OK
[fiber:97] RX: OK
****** DNS ANSWER: 0 ******
Response: IP address Size: 4: 140 211 169 4
[fiber:102] DNS Response: OK
-----------------------------------------
Domain name: www.linuxfoundation.org
[fiber:89] DNS Query: OK, ID: 2
[fiber:92] TX: OK
[fiber:97] RX: OK
****** DNS ANSWER: 0 ******
Response: IP address Size: 4: 140 211 169 4
[fiber:102] DNS Response: OK
-----------------------------------------
Domain name: gnu.org
[fiber:89] DNS Query: OK, ID: 3
[fiber:92] TX: OK
[fiber:97] RX: OK
****** DNS ANSWER: 0 ******
Response: IP address Size: 4: 208 118 235 148
[fiber:102] DNS Response: OK
-----------------------------------------
Domain name: www.gnu.org
[fiber:89] DNS Query: OK, ID: 4
[fiber:92] TX: OK
[fiber:97] RX: OK
****** DNS ANSWER: 0 ******
Response: CNAME NO IP address
CNAME: wildebeest.gnu.org
****** DNS ANSWER: 1 ******
Response: IP address Size: 4: 208 118 235 148
[fiber:102] DNS Response: OK
-----------------------------------------
Domain name: npr.org
[fiber:89] DNS Query: OK, ID: 5
[fiber:92] TX: OK
[fiber:97] RX: OK
****** DNS ANSWER: 0 ******
Response: IP address Size: 4: 216 35 221 76
[fiber:102] DNS Response: OK
-----------------------------------------
Domain name: www.npr.org
[fiber:89] DNS Query: OK, ID: 6
[fiber:92] TX: OK
[fiber:97] RX: OK
****** DNS ANSWER: 0 ******
Response: CNAME NO IP address
CNAME: www-cdn.npr.org.edgesuite.net
****** DNS ANSWER: 1 ******
Response: CNAME NO IP address
CNAME: a1723.g.akamai.net
****** DNS ANSWER: 2 ******
Response: IP address Size: 4: 63 80 4 192
****** DNS ANSWER: 3 ******
Response: IP address Size: 4: 63 80 4 161
[fiber:102] DNS Response: OK