mikroSDK Reference Manual
llmnr_client.h
Go to the documentation of this file.
1
31#ifndef _LLMNR_CLIENT_H
32#define _LLMNR_CLIENT_H
33
34//Dependencies
35#include "core/net.h"
36#include "core/socket.h"
37#include "core/udp.h"
38#include "dns/dns_cache.h"
39#include "dns/dns_common.h"
40#include "llmnr/llmnr_common.h"
41
42//LLMNR client support
43#ifndef LLMNR_CLIENT_SUPPORT
44 #define LLMNR_CLIENT_SUPPORT DISABLED
45#elif (LLMNR_CLIENT_SUPPORT != ENABLED && LLMNR_CLIENT_SUPPORT != DISABLED)
46 #error LLMNR_CLIENT_SUPPORT parameter is not valid
47#endif
48
49//Maximum number of retransmissions of LLMNR queries
50#ifndef LLMNR_CLIENT_MAX_RETRIES
51 #define LLMNR_CLIENT_MAX_RETRIES 3
52#elif (LLMNR_CLIENT_MAX_RETRIES < 1)
53 #error LLMNR_CLIENT_MAX_RETRIES parameter is not valid
54#endif
55
56//Initial retransmission timeout
57#ifndef LLMNR_CLIENT_INIT_TIMEOUT
58 #define LLMNR_CLIENT_INIT_TIMEOUT 1000
59#elif (LLMNR_CLIENT_INIT_TIMEOUT < 1000)
60 #error LLMNR_CLIENT_INIT_TIMEOUT parameter is not valid
61#endif
62
63//Maximum retransmission timeout
64#ifndef LLMNR_CLIENT_MAX_TIMEOUT
65 #define LLMNR_CLIENT_MAX_TIMEOUT 1000
66#elif (LLMNR_CLIENT_MAX_TIMEOUT < 1000)
67 #error LLMNR_CLIENT_MAX_TIMEOUT parameter is not valid
68#endif
69
70//Maximum cache lifetime for LLMNR entries
71#ifndef LLMNR_MAX_LIFETIME
72 #define LLMNR_MAX_LIFETIME 60000
73#elif (LLMNR_MAX_LIFETIME < 1000)
74 #error LLMNR_MAX_LIFETIME parameter is not valid
75#endif
76
77//C++ guard
78#ifdef __cplusplus
79extern "C" {
80#endif
81
82//LLMNR related functions
83error_t llmnrResolve(NetInterface *interface, const char_t *name,
84 HostType type, IpAddr *ipAddr);
85
86error_t llmnrSendQuery(DnsCacheEntry *entry);
87
88void llmnrProcessResponse(NetInterface *interface,
89 const IpPseudoHeader *pseudoHeader, const UdpHeader *udpHeader,
90 const NetBuffer *buffer, size_t offset, const NetRxAncillary *ancillary,
91 void *param);
92
93//C++ guard
94#ifdef __cplusplus
95}
96#endif
97
98#endif
DNS cache management.
Common DNS routines.
error_t
Error codes.
Definition error.h:43
Definitions common to LLMNR client and responder.
TCP/IP stack core.
Socket API.
HostType
Host types.
Definition socket.h:202
DNS cache entry.
Definition dns_cache.h:97
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)