bglibs
resolve.h
1 #ifndef NET__RESOLVE__H__
2 #define NET__RESOLVE__H__
3 
4 #include "ipv4.h"
5 
10 #define RESOLVE_OK 0
11 
12 #define RESOLVE_NOTFOUND 1
13 
14 #define RESOLVE_NOADDR 2
15 
16 #define RESOLVE_NSERROR 3
17 
18 #define RESOLVE_TEMPFAIL 4
19 
20 extern const char* resolve_ipv4addr(const ipv4addr* addr);
21 extern int resolve_ipv4name_n(const char* name, ipv4addr* addr, int maxaddrs);
23 #define resolve_ipv4name(N,A) resolve_ipv4name_n((N),(A),1)
24 extern int __resolve_error;
26 #define resolve_error() (__resolve_error)
27 
28 struct dns_result;
29 extern int resolve_calldns(int (*dnsfn)(), struct dns_result* out, const void* param);
30 extern int resolve_qualdns(int (*dnsfn)(struct dns_transmit*, struct dns_result* out, const char*),
31  struct dns_result* out, const char* name);
32 
35 #endif
Definition: dns.h:79
const char * resolve_ipv4addr(const ipv4addr *addr)
Definition: resolve_ipv4addr.c:5
int resolve_ipv4name_n(const char *name, ipv4addr *addr, int maxaddrs)
Definition: resolve_ipv4name.c:5
int resolve_calldns(int(*dnsfn)(), struct dns_result *out, const void *param)
Definition: resolve_calldns.c:8
Definition: dns.h:137
Definition: ipv4.h:11
int resolve_qualdns(int(*dnsfn)(struct dns_transmit *, struct dns_result *out, const char *), struct dns_result *out, const char *name)
Definition: resolve_calldns.c:22
int __resolve_error
Definition: resolve_calldns.c:5