|
Zephyr Project API 4.4.99
A Scalable Open Source RTOS
|
mDNS responder API More...
#include <stddef.h>#include <errno.h>#include <zephyr/net/dns_sd.h>#include <zephyr/net/net_if.h>Go to the source code of this file.
Functions | |
| int | mdns_responder_set_ext_records (const struct dns_sd_rec *records, size_t count) |
| Register continuous memory of dns_sd_rec records. | |
| int | mdns_responder_enable_iface (struct net_if *iface) |
| Enable the mDNS responder on a specific network interface at runtime. | |
| int | mdns_responder_disable_iface (struct net_if *iface) |
| Disable the mDNS responder on a specific network interface at runtime. | |
mDNS responder API
This file contains the mDNS responder API. These APIs are used by the to register mDNS records.
| int mdns_responder_disable_iface | ( | struct net_if * | iface | ) |
Disable the mDNS responder on a specific network interface at runtime.
The runtime setting overrides the build-time interface policy for the given interface. The listener socket bound to the interface is closed and its mDNS multicast group memberships are left, so no further queries are answered on that interface.
CONFIG_MDNS_RESPONDER_RUNTIME_IFACE_CONTROL.
| iface | Network interface to disable the responder on. |
iface is NULL; -ERANGE if the interface index is out of range; -ENOTSUP if runtime control is not enabled. | int mdns_responder_enable_iface | ( | struct net_if * | iface | ) |
Enable the mDNS responder on a specific network interface at runtime.
The runtime setting overrides the build-time interface policy (
CONFIG_MDNS_RESPONDER_IFACE_POLICY_ALL
and friends) for the given interface. The responder listener sockets and multicast group memberships are reconfigured so that queries arriving on the interface are answered.
CONFIG_MDNS_RESPONDER_RUNTIME_IFACE_CONTROL.
| iface | Network interface to enable the responder on. |
iface is NULL; -ERANGE if the interface index is out of range; -ENOTSUP if runtime control is not enabled. | int mdns_responder_set_ext_records | ( | const struct dns_sd_rec * | records, |
| size_t | count ) |
Register continuous memory of dns_sd_rec records.
mDNS responder will start with iteration over mDNS records registered using DNS_SD_REGISTER_SERVICE (if any) and then go over external records.
| records | A pointer to an array of mDNS records. It is stored internally without copying the content so it must be kept valid. It can be set to NULL, e.g. before freeing the memory block. |
| count | The number of elements |