zephyr/samples/net/mdns_responder
Robert Lubos c4803752a8 net: Deprecate CONFIG_NET_SOCKETS_POLL_MAX
CONFIG_ZVFS_POLL_MAX is now used to control the maximum number of poll()
entires. Thereby, CONFIG_NET_SOCKETS_POLL_MAX is redundant and shall
be deprecated.

Modify the defaults for NET_SOCKETS_POLL_MAX and ZVS_POLL_MAX so that
the deprecation actually makes sense instead of symbol removal. In case
the application still sets the old config, it will modify the
ZVS_POLL_MAX default.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-10-14 13:01:51 +02:00
..
src samples: net: Add Wi-Fi snippet support for networking samples 2024-10-08 16:58:20 +02:00
CMakeLists.txt
Kconfig
README.rst samples: net: Add Wi-Fi snippet support for networking samples 2024-10-08 16:58:20 +02:00
overlay-802154.conf
overlay-e1000.conf
overlay-qemu_cortex_m3_eth.conf
overlay-vlan.conf samples: net: mdns_responder: Fix the VLAN support 2024-03-28 09:41:38 +00:00
prj.conf net: Deprecate CONFIG_NET_SOCKETS_POLL_MAX 2024-10-14 13:01:51 +02:00
sample.yaml samples: net: Add Wi-Fi snippet support for networking samples 2024-10-08 16:58:20 +02:00

README.rst

.. zephyr:code-sample:: mdns-responder
   :name: mDNS responder
   :relevant-api: net_core dns_sd bsd_sockets

   Listen and respond to mDNS queries.

Overview
********

This application will wait mDNS queries for a pre-defined hostname and
respond to them. The default hostname is **zephyr** and it is set in the
:file:`prj.conf` file.

Requirements
************

- :ref:`networking_with_host`

- avahi or similar mDNS capable application that is able to query mDNS
  information.

Building and Running
********************

Build and run the mdns-responder sample application like this:

.. zephyr-app-commands::
   :zephyr-app: samples/net/mdns_responder
   :board: <board to use>
   :conf: <config file to use>
   :goals: build
   :compact:

After the mdns-responder sample application is started, it will await queries
from the network.

Open a terminal window in your host and type:

.. code-block:: console

    $ avahi-resolve -4 -n zephyr.local

If the query is successful, then following information is printed:

.. code-block:: console

    zephyr.local	192.0.2.1

For a IPv6 query, type this:

.. code-block:: console

    $ avahi-resolve -6 -n zephyr.local

If the query is successful, then following information is printed:

.. code-block:: console

    zephyr.local	2001:db8::1

Lastly, resolve services using DNS Service Discovery:

.. code-block:: console

    $ avahi-browse -t -r _zephyr._tcp

If the query is successful, then the following information is printed:

.. code-block:: console

    +   zeth IPv6 zephyr                                        _zephyr._tcp         local
    =   zeth IPv6 zephyr                                        _zephyr._tcp         local
       hostname = [zephyr.local]
       address = [192.0.2.1]
       port = [4242]
       txt = []

Wi-Fi
=====

The IPv4 Wi-Fi support can be enabled in the sample with
:ref:`Wi-Fi snippet <snippet-wifi-ipv4>`.