40#ifndef PROTOCORE_DNS_RESOLVER_H
41#define PROTOCORE_DNS_RESOLVER_H
45#if PROTOCORE_ENABLE_DNS_RESOLVER
55typedef void (*protocore_net_dns_found_fn)(
const char *name,
const protocore_net_ip *addr,
void *arg);
60 PROTOCORE_IP_UNSPECIFIED = 0,
61 PROTOCORE_IP_LOOPBACK,
63 PROTOCORE_IP_LINKLOCAL,
64 PROTOCORE_IP_MULTICAST,
65 PROTOCORE_IP_BROADCAST,
72 PROTOCORE_DNS_READY = 0,
152 DnsAnswerArgs answer;
153 DnsServerArgs server;
157 protocore_ip_class cls;
158 protocore_dns_state state;
162extern ResolverVars ResolverV;
167 void (*
const classify)(uint8_t *work);
168 void (*
const verify)(uint8_t *work);
169 void (*
const query_build)(uint8_t *work);
170 void (*
const answer_parse)(uint8_t *work);
171 void (*
const resolve)(uint8_t *work);
172 void (*
const resolve_verified)(uint8_t *work);
173 void (*
const busy)(uint8_t *work);
174 void (*
const set_server)(uint8_t *work);
179void protocore_resolver_classify(uint8_t *work);
180void protocore_resolver_verify(uint8_t *work);
181void protocore_resolver_query_build(uint8_t *work);
182void protocore_resolver_answer_parse(uint8_t *work);
183void protocore_resolver_resolve(uint8_t *work);
184void protocore_resolver_resolve_verified(uint8_t *work);
185void protocore_resolver_busy(uint8_t *work);
186void protocore_resolver_set_server(uint8_t *work);
192static const ResolverNs Resolver __attribute__((unused)) = {
193 .classify = protocore_resolver_classify,
194 .verify = protocore_resolver_verify,
195 .query_build = protocore_resolver_query_build,
196 .answer_parse = protocore_resolver_answer_parse,
197 .resolve = protocore_resolver_resolve,
198 .resolve_verified = protocore_resolver_resolve_verified,
199 .busy = protocore_resolver_busy,
200 .set_server = protocore_resolver_set_server,
212uint8_t *protocore_dns_resolver_span(
void);
PROTO_ENUM_PACKED
Application protocol spoken on a listener port or connection slot.
#define PROTOCORE_BEGIN_DECLS
Give a header's declarations C linkage, so their symbol names carry no parameter types.
_Bool proto_bool
The truth value.
#define PROTOCORE_END_DECLS