samples: net: dns: Add mDNS client support to DNS resolver sample
The DNS resolver example enables mDNS client support and then queries zephyr.local hostname. The net-tools project has example avahi-daemon script that will response these .local queries and can be used in testing. Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit is contained in:
parent
1865b91f97
commit
af63ae28ec
3 changed files with 181 additions and 86 deletions
|
@ -3,19 +3,19 @@ CONFIG_NET_UDP=y
|
|||
CONFIG_RANDOM_GENERATOR=y
|
||||
CONFIG_TEST_RANDOM_GENERATOR=y
|
||||
CONFIG_INIT_STACKS=y
|
||||
CONFIG_NET_PKT_RX_COUNT=4
|
||||
CONFIG_NET_PKT_TX_COUNT=4
|
||||
CONFIG_NET_BUF_RX_COUNT=14
|
||||
CONFIG_NET_BUF_TX_COUNT=14
|
||||
CONFIG_NET_PKT_RX_COUNT=10
|
||||
CONFIG_NET_PKT_TX_COUNT=10
|
||||
CONFIG_NET_BUF_RX_COUNT=10
|
||||
CONFIG_NET_BUF_TX_COUNT=10
|
||||
|
||||
CONFIG_NET_IF_UNICAST_IPV6_ADDR_COUNT=3
|
||||
CONFIG_NET_IF_MCAST_IPV6_ADDR_COUNT=5
|
||||
|
||||
CONFIG_NET_LOG=y
|
||||
CONFIG_SYS_LOG=y
|
||||
CONFIG_SYS_LOG_NET_LEVEL=4
|
||||
CONFIG_SYS_LOG_NET_LEVEL=2
|
||||
CONFIG_SYS_LOG_SHOW_COLOR=y
|
||||
#CONFIG_NET_DEBUG_NET_PKT=y
|
||||
CONFIG_NET_DEBUG_NET_PKT=y
|
||||
CONFIG_NET_DEBUG_DNS_RESOLVE=y
|
||||
#CONFIG_NET_DEBUG_CONTEXT=y
|
||||
#CONFIG_NET_DEBUG_CORE=y
|
||||
|
@ -24,27 +24,35 @@ CONFIG_NET_DEBUG_DNS_RESOLVE=y
|
|||
#CONFIG_NET_DEBUG_IPV6=y
|
||||
#CONFIG_NET_DEBUG_UDP=y
|
||||
#CONFIG_NET_DEBUG_DHCPV4=y
|
||||
#CONFIG_SLIP_DEBUG=y
|
||||
#CONFIG_NET_DEBUG_L2_ETHERNET=y
|
||||
|
||||
CONFIG_NET_IPV4=y
|
||||
CONFIG_NET_IPV6=y
|
||||
CONFIG_NET_IPV4=y
|
||||
CONFIG_NET_DHCPV4=n
|
||||
|
||||
# Enable the DNS resolver
|
||||
CONFIG_DNS_RESOLVER=y
|
||||
# Enable additional buffers
|
||||
CONFIG_DNS_RESOLVER_ADDITIONAL_BUF_CTR=2
|
||||
CONFIG_DNS_RESOLVER_ADDITIONAL_BUF_CTR=5
|
||||
# Enable additional queries
|
||||
CONFIG_DNS_RESOLVER_ADDITIONAL_QUERIES=2
|
||||
# Enable mDNS support
|
||||
CONFIG_MDNS_RESOLVER=y
|
||||
|
||||
CONFIG_DNS_RESOLVER_MAX_SERVERS=2
|
||||
CONFIG_DNS_SERVER_IP_ADDRESSES=y
|
||||
CONFIG_DNS_NUM_CONCUR_QUERIES=2
|
||||
CONFIG_DNS_NUM_CONCUR_QUERIES=5
|
||||
|
||||
# Use local dnsmasq server for testing
|
||||
CONFIG_DNS_SERVER1="[2001:db8::2]:15353"
|
||||
CONFIG_DNS_SERVER2="192.0.2.2:15353"
|
||||
|
||||
# Google DNS IPv4 and IPv6 servers
|
||||
CONFIG_DNS_SERVER1="8.8.8.8"
|
||||
CONFIG_DNS_SERVER2="2001:4860:4860::8888"
|
||||
#CONFIG_DNS_SERVER1="8.8.8.8"
|
||||
#CONFIG_DNS_SERVER2="2001:4860:4860::8888"
|
||||
|
||||
CONFIG_NET_DHCPV4=y
|
||||
# Router is needed when resolving using external DNS servers
|
||||
CONFIG_NET_APP_NEED_IPV6_ROUTER=n
|
||||
|
||||
CONFIG_NET_MGMT=y
|
||||
CONFIG_NET_MGMT_EVENT=y
|
||||
|
@ -52,7 +60,11 @@ CONFIG_NET_MGMT_EVENT=y
|
|||
CONFIG_NET_SHELL=y
|
||||
|
||||
CONFIG_NET_APP_SETTINGS=y
|
||||
CONFIG_NET_APP_NEED_IPV6=y
|
||||
CONFIG_NET_APP_NEED_IPV4=y
|
||||
CONFIG_NET_APP_MY_IPV6_ADDR="2001:db8::1"
|
||||
CONFIG_NET_APP_PEER_IPV6_ADDR="2001:db8::2"
|
||||
CONFIG_NET_APP_MY_IPV4_ADDR="192.0.2.1"
|
||||
CONFIG_NET_APP_PEER_IPV4_ADDR="192.0.2.2"
|
||||
|
||||
CONFIG_MAIN_STACK_SIZE=1504
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue