llmnr_responder.c
size_t dnsParseName(const DnsHeader *message, size_t length, size_t pos, char_t *dest, uint_t level)
Decode a domain name that uses the DNS name encoding.
Definition: dns_common.c:132
error_t llmnrFormatIpv4AddrRecord(NetInterface *interface, LlmnrHeader *message, size_t *length, Ipv4Addr ipv4Addr)
Format A resource record.
Definition: llmnr_responder.c:415
IPv4 multicast filtering.
IPv6 multicast filtering.
error_t ipv6JoinMulticastGroup(NetInterface *interface, const Ipv6Addr *groupAddr)
Join an IPv6 multicast group.
Definition: ipv6_multicast.c:127
error_t udpAttachRxCallback(NetInterface *interface, uint16_t port, UdpRxCallback callback, void *param)
Register user callback.
Definition: udp.c:1021
error_t udpSendBuffer(NetInterface *interface, const IpAddr *srcIpAddr, uint16_t srcPort, const IpAddr *destIpAddr, uint16_t destPort, NetBuffer *buffer, size_t offset, NetTxAncillary *ancillary)
Send a UDP datagram.
Definition: udp.c:658
size_t netBufferGetLength(const NetBuffer *buffer)
Get the actual length of a multi-part buffer.
Definition: net_mem.c:297
void dnsDumpMessage(const DnsHeader *message, size_t length)
Dump DNS message for debugging purpose.
Definition: dns_debug.c:52
error_t ipv4JoinMulticastGroup(NetInterface *interface, Ipv4Addr groupAddr)
Join the specified host group.
Definition: ipv4_multicast.c:127
error_t llmnrSendResponse(NetInterface *interface, const IpAddr *destIpAddr, uint16_t destPort, uint16_t id, uint16_t qtype, uint16_t qclass)
Send LLMNR response message.
Definition: llmnr_responder.c:236
NetBuffer * udpAllocBuffer(size_t length, size_t *offset)
Allocate a buffer to hold a UDP packet.
Definition: udp.c:948
size_t dnsEncodeName(const char_t *src, uint8_t *dest)
Encode a domain name using the DNS name notation.
Definition: dns_common.c:58
#define LLMNR_DEFAULT_RESOURCE_RECORD_TTL
Definition: llmnr_common.h:47
error_t netBufferSetLength(NetBuffer *buffer, size_t length)
Adjust the length of a multi-part buffer.
Definition: net_mem.c:322
void llmnrProcessQuery(NetInterface *interface, const IpPseudoHeader *pseudoHeader, const UdpHeader *udpHeader, const NetBuffer *buffer, size_t offset, const NetRxAncillary *ancillary, void *param)
Process LLMNR query message.
Definition: llmnr_responder.c:96
bool_t ipIsLinkLocalAddr(const IpAddr *ipAddr)
Determine whether an IP address is a link-local address.
Definition: ip.c:212
void * netBufferAt(const NetBuffer *buffer, size_t offset, size_t length)
Returns a pointer to a data segment.
Definition: net_mem.c:418
LLMNR responder (Link-Local Multicast Name Resolution)
@ IPV4_ADDR_STATE_VALID
An address assigned to an interface whose use is unrestricted.
Definition: ipv4.h:204
@ IPV6_ADDR_STATE_PREFERRED
An address assigned to an interface whose use is unrestricted.
Definition: ipv6.h:175
TCP/IP stack core.
@ IPV6_ADDR_STATE_DEPRECATED
An address assigned to an interface whose use is discouraged.
Definition: ipv6.h:176
Data logging functions for debugging purpose (DNS)
error_t llmnrFormatIpv6AddrRecord(NetInterface *interface, LlmnrHeader *message, size_t *length, const Ipv6Addr *ipv6Addr)
Format AAAA resource record.
Definition: llmnr_responder.c:475
int_t dnsCompareName(const DnsHeader *message, size_t length, size_t pos, const char_t *name, uint_t level)
Compare domain names.
Definition: dns_common.c:242
error_t llmnrResponderInit(NetInterface *interface)
LLMNR responder initialization.
Definition: llmnr_responder.c:52
Debugging facilities.