mikroSDK Reference Manual
llmnr_responder.h
Go to the documentation of this file.
1
31#ifndef _LLMNR_RESPONDER_H
32#define _LLMNR_RESPONDER_H
33
34//Dependencies
35#include "core/net.h"
36#include "core/udp.h"
37#include "dns/dns_common.h"
38#include "llmnr/llmnr_common.h"
39
40//LLMNR responder support
41#ifndef LLMNR_RESPONDER_SUPPORT
42 #define LLMNR_RESPONDER_SUPPORT DISABLED
43#elif (LLMNR_RESPONDER_SUPPORT != ENABLED && LLMNR_RESPONDER_SUPPORT != DISABLED)
44 #error LLMNR_RESPONDER_SUPPORT parameter is not valid
45#endif
46
47//C++ guard
48#ifdef __cplusplus
49extern "C" {
50#endif
51
52//LLMNR related functions
53error_t llmnrResponderInit(NetInterface *interface);
54
55void llmnrProcessQuery(NetInterface *interface,
56 const IpPseudoHeader *pseudoHeader, const UdpHeader *udpHeader,
57 const NetBuffer *buffer, size_t offset, const NetRxAncillary *ancillary,
58 void *param);
59
60error_t llmnrSendResponse(NetInterface *interface, const IpAddr *destIpAddr,
61 uint16_t destPort, uint16_t id, uint16_t qtype, uint16_t qclass);
62
63error_t llmnrFormatIpv4AddrRecord(NetInterface *interface,
64 LlmnrHeader *message, size_t *length, Ipv4Addr ipv4Addr);
65
66error_t llmnrFormatIpv6AddrRecord(NetInterface *interface,
67 LlmnrHeader *message, size_t *length, const Ipv6Addr *ipv6Addr);
68
69//C++ guard
70#ifdef __cplusplus
71}
72#endif
73
74#endif
Common DNS routines.
error_t
Error codes.
Definition error.h:43
uint32_t Ipv4Addr
IPv4 network address.
Definition ipv4.h:267
Definitions common to LLMNR client and responder.
TCP/IP stack core.
IP network address.
Definition ip.h:72
IP pseudo header.
Definition ip.h:91
Structure describing a buffer that spans multiple chunks.
Definition net_mem.h:89
UDP (User Datagram Protocol)