25 #if defined(LWS_WITH_UDP)
27 typedef enum dns_query_type {
28 LWS_ADNS_RECORD_A = 0x01,
29 LWS_ADNS_RECORD_CNAME = 0x05,
30 LWS_ADNS_RECORD_MX = 0x0f,
31 LWS_ADNS_RECORD_AAAA = 0x1c,
35 LADNS_RET_FAILED_WSI_CLOSED = -4,
36 LADNS_RET_NXDOMAIN = -3,
37 LADNS_RET_TIMEDOUT = -2,
38 LADNS_RET_FAILED = -1,
41 } lws_async_dns_retcode_t;
45 typedef struct lws * (*lws_async_dns_cb_t)(
struct lws *wsi,
const char *ads,
46 const struct addrinfo *result,
int n,
void *opaque);
68 LWS_VISIBLE LWS_EXTERN lws_async_dns_retcode_t
69 lws_async_dns_query(
struct lws_context *context,
int tsi,
const char *name,
70 adns_query_type_t qtype, lws_async_dns_cb_t cb,
71 struct lws *wsi,
void *opaque);
83 LWS_VISIBLE LWS_EXTERN
void
84 lws_async_dns_freeaddrinfo(
const struct addrinfo **ai);