41 #define DNS_SD_SUPPORT DISABLED
42#elif (DNS_SD_SUPPORT != ENABLED && DNS_SD_SUPPORT != DISABLED)
43 #error DNS_SD_SUPPORT parameter is not valid
47#ifndef DNS_SD_TICK_INTERVAL
48 #define DNS_SD_TICK_INTERVAL 250
49#elif (DNS_SD_TICK_INTERVAL < 10)
50 #error DNS_SD_TICK_INTERVAL parameter is not valid
54#ifndef DNS_SD_SERVICE_LIST_SIZE
55 #define DNS_SD_SERVICE_LIST_SIZE 2
56#elif (DNS_SD_SERVICE_LIST_SIZE < 1)
57 #error DNS_SD_SERVICE_LIST_SIZE parameter is not valid
61#ifndef DNS_SD_MAX_SERVICE_NAME_LEN
62 #define DNS_SD_MAX_SERVICE_NAME_LEN 16
63#elif (DNS_SD_MAX_SERVICE_NAME_LEN < 1)
64 #error DNS_SD_MAX_SERVICE_NAME_LEN parameter is not valid
68#ifndef DNS_SD_MAX_INSTANCE_NAME_LEN
69 #define DNS_SD_MAX_INSTANCE_NAME_LEN 32
70#elif (DNS_SD_MAX_INSTANCE_NAME_LEN < 1)
71 #error DNS_SD_MAX_INSTANCE_NAME_LEN parameter is not valid
75#ifndef DNS_SD_MAX_METADATA_LEN
76 #define DNS_SD_MAX_METADATA_LEN 128
77#elif (DNS_SD_MAX_METADATA_LEN < 1)
78 #error DNS_SD_MAX_METADATA_LEN parameter is not valid
82#ifndef DNS_SD_DEFAULT_RR_TTL
83 #define DNS_SD_DEFAULT_RR_TTL 120
84#elif (DNS_SD_DEFAULT_RR_TTL < 1)
85 #error DNS_SD_DEFAULT_RR_TTL parameter is not valid
90#define DnsSdContext struct _DnsSdContext
125 char_t name[DNS_SD_MAX_SERVICE_NAME_LEN + 1];
129 uint8_t metadata[DNS_SD_MAX_METADATA_LEN];
159error_t dnsSdStart(DnsSdContext *context);
160error_t dnsSdStop(DnsSdContext *context);
161MdnsState dnsSdGetState(DnsSdContext *context);
163error_t dnsSdSetInstanceName(DnsSdContext *context,
const char_t *instanceName);
165error_t dnsSdRegisterService(DnsSdContext *context,
const char_t *serviceName,
166 uint16_t priority, uint16_t weight, uint16_t port,
const char_t *metadata);
168error_t dnsSdUnregisterService(DnsSdContext *context,
const char_t *serviceName);
170uint_t dnsSdGetNumServices(DnsSdContext *context);
171error_t dnsSdStartProbing(DnsSdContext *context);
173void dnsSdTick(DnsSdContext *interface);
174void dnsSdLinkChangeEvent(DnsSdContext *interface);
void(* DnsSdStateChangeCallback)(DnsSdContext *context, NetInterface *interface, MdnsState state)
FSM state change callback.
Definition dns_sd.h:102
error_t
Error codes.
Definition error.h:43
Definitions common to mDNS client and mDNS responder.
MdnsState
mDNS responder states
Definition mdns_responder.h:139
uint32_t systime_t
System time.
Definition os_port_none.h:90
DNS-SD service descriptor.
Definition dns_sd.h:124
size_t metadataLength
Length of the metadata.
Definition dns_sd.h:130
uint16_t weight
Server selection mechanism.
Definition dns_sd.h:127
uint16_t port
Port on the target host of this service.
Definition dns_sd.h:128
uint16_t priority
Priority of the target host.
Definition dns_sd.h:126
DNS-SD settings.
Definition dns_sd.h:111
uint_t numAnnouncements
Number of announcement packets.
Definition dns_sd.h:113
NetInterface * interface
Underlying network interface.
Definition dns_sd.h:112
DnsSdStateChangeCallback stateChangeEvent
FSM state change event.
Definition dns_sd.h:115
uint32_t ttl
TTL resource record.
Definition dns_sd.h:114
DNS-SD context.
Definition dns_sd.h:139
char_t instanceName[DNS_SD_MAX_INSTANCE_NAME_LEN+1]
Service instance name.
Definition dns_sd.h:148
bool_t tieBreakLost
Tie-break lost.
Definition dns_sd.h:144
bool_t running
DNS-SD is currently running.
Definition dns_sd.h:141
DnsSdSettings settings
DNS-SD settings.
Definition dns_sd.h:140
uint_t retransmitCount
Retransmission counter.
Definition dns_sd.h:147
DnsSdService serviceList[DNS_SD_SERVICE_LIST_SIZE]
List of registered services.
Definition dns_sd.h:149
systime_t timeout
Timeout value.
Definition dns_sd.h:146
bool_t conflict
Conflict detected.
Definition dns_sd.h:143
systime_t timestamp
Timestamp to manage retransmissions.
Definition dns_sd.h:145
MdnsState state
FSM state.
Definition dns_sd.h:142