DNS-SD (DNS-Based Service Discovery) More...
#include <stdlib.h>#include "core/net.h"#include "mdns/mdns_responder.h"#include "dns_sd/dns_sd.h"#include "dns_sd/dns_sd_misc.h"#include "debug.h"Go to the source code of this file.
Macros | |
| #define | TRACE_LEVEL DNS_SD_TRACE_LEVEL |
Functions | |
| void | dnsSdGetDefaultSettings (DnsSdSettings *settings) |
| Initialize settings with default values. More... | |
| error_t | dnsSdInit (DnsSdContext *context, const DnsSdSettings *settings) |
| DNS-DS initialization. More... | |
| error_t | dnsSdStart (DnsSdContext *context) |
| Start mDNS responder. More... | |
| error_t | dnsSdStop (DnsSdContext *context) |
| Stop mDNS responder. More... | |
| MdnsState | dnsSdGetState (DnsSdContext *context) |
| Retrieve current state. More... | |
| error_t | dnsSdSetInstanceName (DnsSdContext *context, const char_t *instanceName) |
| Set service instance name. More... | |
| error_t | dnsSdRegisterService (DnsSdContext *context, const char_t *serviceName, uint16_t priority, uint16_t weight, uint16_t port, const char_t *metadata) |
| Register a DNS-SD service. More... | |
| error_t | dnsSdUnregisterService (DnsSdContext *context, const char_t *serviceName) |
| Unregister a DNS-SD service. More... | |
| uint_t | dnsSdGetNumServices (DnsSdContext *context) |
| Get the number of registered services. More... | |
| error_t | dnsSdStartProbing (DnsSdContext *context) |
| Restart probing process. More... | |
| void | dnsSdTick (DnsSdContext *context) |
| DNS-SD responder timer handler. More... | |
| void | dnsSdLinkChangeEvent (DnsSdContext *context) |
| Callback function for link change event. More... | |
Variables | |
| systime_t | dnsSdTickCounter |
Detailed Description
DNS-SD (DNS-Based Service Discovery)
License
SPDX-License-Identifier: GPL-2.0-or-later
Copyright (C) 2010-2024 Oryx Embedded SARL. All rights reserved.
This file is part of CycloneTCP Open.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Description
DNS-SD allows clients to discover a list of named instances of that desired service, using standard DNS queries. Refer to the following RFCs for complete details:
- RFC 6763: DNS-Based Service Discovery
- RFC 2782: A DNS RR for specifying the location of services (DNS SRV)
- Version
- 2.4.2
Definition in file dns_sd.c.
Macro Definition Documentation
◆ TRACE_LEVEL
Function Documentation
◆ dnsSdGetDefaultSettings()
| void dnsSdGetDefaultSettings | ( | DnsSdSettings * | settings | ) |
◆ dnsSdGetNumServices()
| uint_t dnsSdGetNumServices | ( | DnsSdContext * | context | ) |
◆ dnsSdGetState()
| MdnsState dnsSdGetState | ( | DnsSdContext * | context | ) |
◆ dnsSdInit()
| error_t dnsSdInit | ( | DnsSdContext * | context, |
| const DnsSdSettings * | settings | ||
| ) |
◆ dnsSdLinkChangeEvent()
| void dnsSdLinkChangeEvent | ( | DnsSdContext * | context | ) |
◆ dnsSdRegisterService()
| error_t dnsSdRegisterService | ( | DnsSdContext * | context, |
| const char_t * | serviceName, | ||
| uint16_t | priority, | ||
| uint16_t | weight, | ||
| uint16_t | port, | ||
| const char_t * | metadata | ||
| ) |
Register a DNS-SD service.
- Parameters
-
[in] context Pointer to the DNS-SD context [in] serviceName NULL-terminated string that contains the name of the service to be registered [in] priority Priority field [in] weight Weight field [in] port Port number [in] metadata NULL-terminated string that contains the discovery-time metadata (TXT record)
- Returns
- Error code
◆ dnsSdSetInstanceName()
| error_t dnsSdSetInstanceName | ( | DnsSdContext * | context, |
| const char_t * | instanceName | ||
| ) |
◆ dnsSdStart()
| error_t dnsSdStart | ( | DnsSdContext * | context | ) |
◆ dnsSdStartProbing()
| error_t dnsSdStartProbing | ( | DnsSdContext * | context | ) |
◆ dnsSdStop()
| error_t dnsSdStop | ( | DnsSdContext * | context | ) |
◆ dnsSdTick()
| void dnsSdTick | ( | DnsSdContext * | context | ) |
◆ dnsSdUnregisterService()
| error_t dnsSdUnregisterService | ( | DnsSdContext * | context, |
| const char_t * | serviceName | ||
| ) |
