39#ifndef MDNS_MESSAGE_MAX_SIZE
40 #define MDNS_MESSAGE_MAX_SIZE 1024
41#elif (MDNS_MESSAGE_MAX_SIZE < 1)
42 #error MDNS_MESSAGE_MAX_SIZE parameter is not valid
46#ifndef MDNS_DEFAULT_RR_TTL
47 #define MDNS_DEFAULT_RR_TTL 120
48#elif (MDNS_DEFAULT_RR_TTL < 1)
49 #error MDNS_DEFAULT_RR_TTL parameter is not valid
55#define MDNS_DEFAULT_IP_TTL 255
57#define MDNS_LEGACY_UNICAST_RR_TTL 10
60#define MDNS_QCLASS_QU 0x8000
62#define MDNS_RCLASS_CACHE_FLUSH 0x8000
65#define MDNS_IPV4_MULTICAST_ADDR IPV4_ADDR(224, 0, 0, 251)
83 const UdpHeader *udpHeader;
87 uint_t sharedRecordCount;
92extern const Ipv6Addr MDNS_IPV6_MULTICAST_ADDR;
95error_t mdnsInit(NetInterface *interface);
97void mdnsProcessMessage(NetInterface *interface,
99 const NetBuffer *buffer,
size_t offset,
const NetRxAncillary *ancillary,
102void mdnsProcessResponse(NetInterface *interface,
MdnsMessage *response);
104bool_t mdnsCheckSourceAddr(NetInterface *interface,
111 const IpAddr *destIpAddr, uint_t destPort);
113size_t mdnsEncodeName(
const char_t *instance,
const char_t *service,
114 const char_t *domain, uint8_t *dest);
116int_t mdnsCompareName(
const DnsHeader *message,
size_t length,
size_t pos,
117 const char_t *instance,
const char_t *service,
const char_t *domain, uint_t level);
119int_t mdnsCompareRecord(
const MdnsMessage *message1,
120 const DnsResourceRecord *record1,
const MdnsMessage *message2,
121 const DnsResourceRecord *record2);
123bool_t mdnsCheckDuplicateRecord(
const MdnsMessage *message,
124 const char_t *instance,
const char_t *service,
const char_t *domain,
125 uint16_t rtype,
const uint8_t *rdata,
size_t rdlength);
error_t
Error codes.
Definition error.h:43
uint32_t systime_t
System time.
Definition os_port_none.h:90
IP network address.
Definition ip.h:72
mDNS message
Definition mdns_common.h:78
Structure describing a buffer that spans multiple chunks.
Definition net_mem.h:89