mdns_responder.c File Reference

mDNS responder (Multicast DNS) More...

#include <stdlib.h>
#include "core/net.h"
#include "dns/dns_debug.h"
#include "mdns/mdns_responder.h"
#include "mdns/mdns_responder_misc.h"
#include "dns_sd/dns_sd_misc.h"
#include "debug.h"

Go to the source code of this file.

Macros

#define TRACE_LEVEL   MDNS_TRACE_LEVEL
 

Functions

void mdnsResponderGetDefaultSettings (MdnsResponderSettings *settings)
 Initialize settings with default values. More...
 
error_t mdnsResponderInit (MdnsResponderContext *context, const MdnsResponderSettings *settings)
 mDNS responder initialization More...
 
error_t mdnsResponderStart (MdnsResponderContext *context)
 Start mDNS responder. More...
 
error_t mdnsResponderStop (MdnsResponderContext *context)
 Stop mDNS responder. More...
 
MdnsState mdnsResponderGetState (MdnsResponderContext *context)
 Retrieve current state. More...
 
error_t mdnsResponderSetHostname (MdnsResponderContext *context, const char_t *hostname)
 Set host name. More...
 
error_t mdnsResponderStartProbing (MdnsResponderContext *context)
 Restart probing process. More...
 
void mdnsResponderTick (MdnsResponderContext *context)
 mDNS responder timer handler More...
 
void mdnsResponderLinkChangeEvent (MdnsResponderContext *context)
 Callback function for link change event. More...
 

Variables

systime_t mdnsResponderTickCounter
 

Detailed Description

mDNS responder (Multicast DNS)

License

SPDX-License-Identifier: GPL-2.0-or-later

Copyright (C) 2010-2023 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.

Author
Oryx Embedded SARL (www.oryx-embedded.com)
Version
2.2.2

Definition in file mdns_responder.c.

Macro Definition Documentation

◆ TRACE_LEVEL

#define TRACE_LEVEL   MDNS_TRACE_LEVEL

Definition at line 32 of file mdns_responder.c.

Function Documentation

◆ mdnsResponderGetDefaultSettings()

void mdnsResponderGetDefaultSettings ( MdnsResponderSettings settings)

Initialize settings with default values.

Parameters
[out]settingsStructure that contains mDNS responder settings

Definition at line 55 of file mdns_responder.c.

◆ mdnsResponderGetState()

MdnsState mdnsResponderGetState ( MdnsResponderContext context)

Retrieve current state.

Parameters
[in]contextPointer to the mDNS responder context
Returns
Current mDNS responder state

Definition at line 181 of file mdns_responder.c.

◆ mdnsResponderInit()

error_t mdnsResponderInit ( MdnsResponderContext context,
const MdnsResponderSettings settings 
)

mDNS responder initialization

Parameters
[in]contextPointer to the mDNS responder context
[in]settingsmDNS responder specific settings
Returns
Error code

Definition at line 76 of file mdns_responder.c.

◆ mdnsResponderLinkChangeEvent()

void mdnsResponderLinkChangeEvent ( MdnsResponderContext context)

Callback function for link change event.

Parameters
[in]contextPointer to the mDNS responder context

Definition at line 609 of file mdns_responder.c.

◆ mdnsResponderSetHostname()

error_t mdnsResponderSetHostname ( MdnsResponderContext context,
const char_t hostname 
)

Set host name.

Parameters
[in]contextPointer to the mDNS responder context
[in]hostnameNULL-terminated string that contains the host name
Returns
Error code

Definition at line 204 of file mdns_responder.c.

◆ mdnsResponderStart()

error_t mdnsResponderStart ( MdnsResponderContext context)

Start mDNS responder.

Parameters
[in]contextPointer to the mDNS responder context
Returns
Error code

Definition at line 119 of file mdns_responder.c.

◆ mdnsResponderStartProbing()

error_t mdnsResponderStartProbing ( MdnsResponderContext context)

Restart probing process.

Parameters
[in]contextPointer to the mDNS responder context
Returns
Error code

Definition at line 254 of file mdns_responder.c.

◆ mdnsResponderStop()

error_t mdnsResponderStop ( MdnsResponderContext context)

Stop mDNS responder.

Parameters
[in]contextPointer to the mDNS responder context
Returns
Error code

Definition at line 150 of file mdns_responder.c.

◆ mdnsResponderTick()

void mdnsResponderTick ( MdnsResponderContext context)

mDNS responder timer handler

This routine must be periodically called by the TCP/IP stack to manage mDNS operation

Parameters
[in]contextPointer to the mDNS responder context

Definition at line 371 of file mdns_responder.c.

Variable Documentation

◆ mdnsResponderTickCounter

systime_t mdnsResponderTickCounter

Definition at line 47 of file mdns_responder.c.