Back to index

citadel  8.12
Functions | Variables
serv_c-ares-dns.c File Reference
#include "sysdep.h"
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
#include <termios.h>
#include <fcntl.h>
#include <signal.h>
#include <pwd.h>
#include <errno.h>
#include <sys/types.h>
#include <syslog.h>
#include <time.h>
#include <sys/wait.h>
#include <ctype.h>
#include <string.h>
#include <limits.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <libcitadel.h>
#include "citadel.h"
#include "server.h"
#include "citserver.h"
#include "support.h"
#include "ctdl_module.h"
#include "event_client.h"

Go to the source code of this file.

Functions

void SockStateCb (void *data, int sock, int read, int write)
static void HostByAddrCb (void *data, int status, int timeouts, struct hostent *hostent)
static void ParseAnswerA (AsyncIO *IO, unsigned char *abuf, int alen)
static void ParseAnswerAAAA (AsyncIO *IO, unsigned char *abuf, int alen)
static void ParseAnswerCNAME (AsyncIO *IO, unsigned char *abuf, int alen)
static void ParseAnswerMX (AsyncIO *IO, unsigned char *abuf, int alen)
static void ParseAnswerNS (AsyncIO *IO, unsigned char *abuf, int alen)
static void ParseAnswerSRV (AsyncIO *IO, unsigned char *abuf, int alen)
static void ParseAnswerTXT (AsyncIO *IO, unsigned char *abuf, int alen)
void QueryCb (void *arg, int status, int timeouts, unsigned char *abuf, int alen)
void QueryCbDone (AsyncIO *IO)
void DestructCAres (AsyncIO *IO)
void InitC_ares_dns (AsyncIO *IO)
static void DNStimeouttrigger_callback (struct ev_loop *loop, ev_timer *watcher, int revents)
void QueueGetHostByNameDone (void *Ctx, int status, int timeouts, struct hostent *hostent)
void QueueGetHostByName (AsyncIO *IO, const char *Hostname, DNSQueryParts *QueryParts, IO_CallBack PostDNS)
int QueueQuery (ns_type Type, const char *name, AsyncIO *IO, DNSQueryParts *QueryParts, IO_CallBack PostDNS)
static void DNS_send_callback (struct ev_loop *loop, ev_io *watcher, int revents)
static void DNS_recv_callback (struct ev_loop *loop, ev_io *watcher, int revents)
void EnableDebugCAres (const int n)
 CTDL_MODULE_INIT (c_ares_client)

Variables

int DebugCAres = 0
struct ev_loop * event_base

Function Documentation

CTDL_MODULE_INIT ( c_ares_client  )

Definition at line 607 of file serv_c-ares-dns.c.

{
       if (!threading)
       {
              CtdlRegisterDebugFlagHook(HKEY("cares"), EnableDebugCAres, &DebugCAres);
              int r = ares_library_init(ARES_LIB_INIT_ALL);
              if (0 != r) {
                     
              }
       }
       return "c-ares";
}

Here is the call graph for this function:

void DestructCAres ( AsyncIO IO)

Definition at line 306 of file serv_c-ares-dns.c.

{
       EV_DNS_syslog(LOG_DEBUG, "C-ARES: %s\n", __FUNCTION__);

       EV_DNS_LOG_STOP(DNS.recv_event);
       ev_io_stop(event_base, &IO->DNS.recv_event);

       EV_DNS_LOG_STOP(DNS.send_event);
       ev_io_stop(event_base, &IO->DNS.send_event);

       EV_DNS_LOGT_STOP(DNS.timeout);
       ev_timer_stop (event_base, &IO->DNS.timeout);

       EV_DNS_LOGT_STOP(unwind_stack);
       ev_idle_stop(event_base, &IO->unwind_stack);
       ares_destroy_options(&IO->DNS.Options);
}

Here is the caller graph for this function:

static void DNS_recv_callback ( struct ev_loop *  loop,
ev_io *  watcher,
int  revents 
) [static]

Definition at line 526 of file serv_c-ares-dns.c.

{
       AsyncIO *IO = watcher->data;

       IO->Now = ev_now(event_base);

       EV_DNS_syslog(LOG_DEBUG, "C-ARES: %s\n", __FUNCTION__);

       ares_process_fd(IO->DNS.Channel,
                     IO->DNS.recv_event.fd,
                     ARES_SOCKET_BAD);
}

Here is the caller graph for this function:

static void DNS_send_callback ( struct ev_loop *  loop,
ev_io *  watcher,
int  revents 
) [static]

Definition at line 514 of file serv_c-ares-dns.c.

{
       AsyncIO *IO = watcher->data;

       IO->Now = ev_now(event_base);

       EV_DNS_syslog(LOG_DEBUG, "C-ARES: %s\n", __FUNCTION__);

       ares_process_fd(IO->DNS.Channel,
                     ARES_SOCKET_BAD,
                     IO->DNS.send_event.fd);
}

Here is the caller graph for this function:

static void DNStimeouttrigger_callback ( struct ev_loop *  loop,
ev_timer *  watcher,
int  revents 
) [static]

Definition at line 341 of file serv_c-ares-dns.c.

{
       AsyncIO *IO = watcher->data;
       struct timeval tv, MaxTV;
       struct timeval *NextTV;

       memset(&MaxTV, 0, sizeof(MaxTV));
       memset(&tv, 0, sizeof(tv));
       MaxTV.tv_sec = 30;
       NextTV = ares_timeout(IO->DNS.Channel, &MaxTV, &tv);

       if ((NextTV->tv_sec != MaxTV.tv_sec) ||
           (NextTV->tv_usec != MaxTV.tv_usec))
       {
              fd_set readers, writers;
              EV_DNS_syslog(LOG_DEBUG, "C-ARES: %s Timeout!\n", __FUNCTION__);

              FD_ZERO(&readers);
              FD_ZERO(&writers);
              ares_fds(IO->DNS.Channel, &readers, &writers);
              ares_process(IO->DNS.Channel, &readers, &writers);
       }
}

Here is the caller graph for this function:

void EnableDebugCAres ( const int  n)

Definition at line 602 of file serv_c-ares-dns.c.

{
       DebugCAres = n;
}

Here is the caller graph for this function:

static void HostByAddrCb ( void *  data,
int  status,
int  timeouts,
struct hostent *  hostent 
) [static]

Definition at line 67 of file serv_c-ares-dns.c.

{
       AsyncIO *IO = data;

       EV_DNS_syslog(LOG_DEBUG, "C-ARES: %s\n", __FUNCTION__);

       EV_DNS_LOGT_STOP(DNS.timeout);
       ev_timer_stop (event_base, &IO->DNS.timeout);

       IO->DNS.Query->DNSStatus = status;
       if  (status != ARES_SUCCESS) {
              StrBufPlain(IO->ErrMsg, ares_strerror(status), -1);
              return;
       }
       IO->DNS.Query->Data = hostent;
}

Here is the caller graph for this function:

void InitC_ares_dns ( AsyncIO IO)

Definition at line 325 of file serv_c-ares-dns.c.

{
       int optmask = 0;

       EV_DNS_syslog(LOG_DEBUG, "C-ARES: %s %p\n", __FUNCTION__, IO->DNS.Channel);

       if (IO->DNS.Channel == NULL) {
              optmask |= ARES_OPT_SOCK_STATE_CB;
              IO->DNS.Options.sock_state_cb = SockStateCb;
              IO->DNS.Options.sock_state_cb_data = IO;
              ares_init_options(&IO->DNS.Channel, &IO->DNS.Options, optmask);
       }
       IO->DNS.Query->DNSStatus = 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void ParseAnswerA ( AsyncIO IO,
unsigned char *  abuf,
int  alen 
) [static]

Definition at line 87 of file serv_c-ares-dns.c.

{
       struct hostent* host = NULL;

       EV_DNS_syslog(LOG_DEBUG, "C-ARES: %s\n", __FUNCTION__);

       if (IO->DNS.Query->VParsedDNSReply != NULL)
              IO->DNS.Query->DNSReplyFree(IO->DNS.Query->VParsedDNSReply);
       IO->DNS.Query->VParsedDNSReply = NULL;

       IO->DNS.Query->DNSStatus = ares_parse_a_reply(abuf,
                                                alen,
                                                &host,
                                                NULL,
                                                NULL);
       if (IO->DNS.Query->DNSStatus != ARES_SUCCESS) {
              if (host != NULL)
                     ares_free_hostent(host);
              StrBufPlain(IO->ErrMsg,
                         ares_strerror(IO->DNS.Query->DNSStatus), -1);
              return;
       }
       IO->DNS.Query->VParsedDNSReply = host;
       IO->DNS.Query->DNSReplyFree = (FreeDNSReply) ares_free_hostent;
}

Here is the caller graph for this function:

static void ParseAnswerAAAA ( AsyncIO IO,
unsigned char *  abuf,
int  alen 
) [static]

Definition at line 114 of file serv_c-ares-dns.c.

{
       struct hostent* host = NULL;

       EV_DNS_syslog(LOG_DEBUG, "C-ARES: %s\n", __FUNCTION__);

       if (IO->DNS.Query->VParsedDNSReply != NULL)
              IO->DNS.Query->DNSReplyFree(IO->DNS.Query->VParsedDNSReply);
       IO->DNS.Query->VParsedDNSReply = NULL;

       IO->DNS.Query->DNSStatus = ares_parse_aaaa_reply(abuf,
                                                  alen,
                                                  &host,
                                                  NULL,
                                                  NULL);
       if (IO->DNS.Query->DNSStatus != ARES_SUCCESS) {
              if (host != NULL)
                     ares_free_hostent(host);
              StrBufPlain(IO->ErrMsg,
                         ares_strerror(IO->DNS.Query->DNSStatus), -1);
              return;
       }
       IO->DNS.Query->VParsedDNSReply = host;
       IO->DNS.Query->DNSReplyFree = (FreeDNSReply) ares_free_hostent;
}

Here is the caller graph for this function:

static void ParseAnswerCNAME ( AsyncIO IO,
unsigned char *  abuf,
int  alen 
) [static]

Definition at line 141 of file serv_c-ares-dns.c.

{
       struct hostent* host = NULL;

       EV_DNS_syslog(LOG_DEBUG, "C-ARES: %s\n", __FUNCTION__);

       if (IO->DNS.Query->VParsedDNSReply != NULL)
              IO->DNS.Query->DNSReplyFree(IO->DNS.Query->VParsedDNSReply);
       IO->DNS.Query->VParsedDNSReply = NULL;

       IO->DNS.Query->DNSStatus = ares_parse_a_reply(abuf,
                                                alen,
                                                &host,
                                                NULL,
                                                NULL);
       if (IO->DNS.Query->DNSStatus != ARES_SUCCESS) {
              if (host != NULL)
                     ares_free_hostent(host);
              StrBufPlain(IO->ErrMsg,
                         ares_strerror(IO->DNS.Query->DNSStatus), -1);
              return;
       }

       // a CNAME lookup always returns a single record but
       IO->DNS.Query->VParsedDNSReply = host;
       IO->DNS.Query->DNSReplyFree = (FreeDNSReply) ares_free_hostent;
}

Here is the caller graph for this function:

static void ParseAnswerMX ( AsyncIO IO,
unsigned char *  abuf,
int  alen 
) [static]

Definition at line 170 of file serv_c-ares-dns.c.

{
       struct ares_mx_reply *mx_out = NULL;

       EV_DNS_syslog(LOG_DEBUG, "C-ARES: %s\n", __FUNCTION__);

       if (IO->DNS.Query->VParsedDNSReply != NULL)
              IO->DNS.Query->DNSReplyFree(IO->DNS.Query->VParsedDNSReply);
       IO->DNS.Query->VParsedDNSReply = NULL;

       IO->DNS.Query->DNSStatus = ares_parse_mx_reply(abuf, alen, &mx_out);
       if (IO->DNS.Query->DNSStatus != ARES_SUCCESS) {
              if (mx_out != NULL)
                     ares_free_data(mx_out);
              StrBufPlain(IO->ErrMsg,
                         ares_strerror(IO->DNS.Query->DNSStatus), -1);
              return;
       }

       IO->DNS.Query->VParsedDNSReply = mx_out;
       IO->DNS.Query->DNSReplyFree = (FreeDNSReply) ares_free_data;
}

Here is the caller graph for this function:

static void ParseAnswerNS ( AsyncIO IO,
unsigned char *  abuf,
int  alen 
) [static]

Definition at line 194 of file serv_c-ares-dns.c.

{
       struct hostent* host = NULL;

       EV_DNS_syslog(LOG_DEBUG, "C-ARES: %s\n", __FUNCTION__);

       if (IO->DNS.Query->VParsedDNSReply != NULL)
              IO->DNS.Query->DNSReplyFree(IO->DNS.Query->VParsedDNSReply);
       IO->DNS.Query->VParsedDNSReply = NULL;

       IO->DNS.Query->DNSStatus = ares_parse_ns_reply(abuf, alen, &host);
       if (IO->DNS.Query->DNSStatus != ARES_SUCCESS) {
              if (host != NULL)
                     ares_free_hostent(host);
              StrBufPlain(IO->ErrMsg,
                         ares_strerror(IO->DNS.Query->DNSStatus), -1);
              return;
       }
       IO->DNS.Query->VParsedDNSReply = host;
       IO->DNS.Query->DNSReplyFree = (FreeDNSReply) ares_free_hostent;
}

Here is the caller graph for this function:

static void ParseAnswerSRV ( AsyncIO IO,
unsigned char *  abuf,
int  alen 
) [static]

Definition at line 217 of file serv_c-ares-dns.c.

{
       struct ares_srv_reply *srv_out = NULL;

       EV_DNS_syslog(LOG_DEBUG, "C-ARES: %s\n", __FUNCTION__);

       if (IO->DNS.Query->VParsedDNSReply != NULL)
              IO->DNS.Query->DNSReplyFree(IO->DNS.Query->VParsedDNSReply);
       IO->DNS.Query->VParsedDNSReply = NULL;

       IO->DNS.Query->DNSStatus = ares_parse_srv_reply(abuf, alen, &srv_out);
       if (IO->DNS.Query->DNSStatus != ARES_SUCCESS) {
              if (srv_out != NULL)
                     ares_free_data(srv_out);
              StrBufPlain(IO->ErrMsg,
                         ares_strerror(IO->DNS.Query->DNSStatus), -1);
              return;
       }

       IO->DNS.Query->VParsedDNSReply = srv_out;
       IO->DNS.Query->DNSReplyFree = (FreeDNSReply) ares_free_data;
}

Here is the caller graph for this function:

static void ParseAnswerTXT ( AsyncIO IO,
unsigned char *  abuf,
int  alen 
) [static]

Definition at line 241 of file serv_c-ares-dns.c.

{
       struct ares_txt_reply *txt_out;

       EV_DNS_syslog(LOG_DEBUG, "C-ARES: %s\n", __FUNCTION__);

       if (IO->DNS.Query->VParsedDNSReply != NULL)
              IO->DNS.Query->DNSReplyFree(IO->DNS.Query->VParsedDNSReply);
       IO->DNS.Query->VParsedDNSReply = NULL;

       IO->DNS.Query->DNSStatus = ares_parse_txt_reply(abuf, alen, &txt_out);
       if (IO->DNS.Query->DNSStatus != ARES_SUCCESS) {
              if (txt_out != NULL)
                     ares_free_data(txt_out);
              StrBufPlain(IO->ErrMsg,
                         ares_strerror(IO->DNS.Query->DNSStatus), -1);
              return;
       }
       IO->DNS.Query->VParsedDNSReply = txt_out;
       IO->DNS.Query->DNSReplyFree = (FreeDNSReply) ares_free_data;
}

Here is the caller graph for this function:

void QueryCb ( void *  arg,
int  status,
int  timeouts,
unsigned char *  abuf,
int  alen 
)

Definition at line 263 of file serv_c-ares-dns.c.

{
       AsyncIO *IO = arg;

       EV_DNS_syslog(LOG_DEBUG, "C-ARES: %s\n", __FUNCTION__);

       EV_DNS_LOGT_STOP(DNS.timeout);
       ev_timer_stop (event_base, &IO->DNS.timeout);

       IO->DNS.Query->DNSStatus = status;
       if (status == ARES_SUCCESS)
              IO->DNS.Query->DNS_CB(arg, abuf, alen);
       else {
              EV_DNS_syslog(LOG_DEBUG, "C-ARES: Failed by: %s error %s\n",
                           __FUNCTION__,
                           ares_strerror(status));
              StrBufPlain(IO->ErrMsg, ares_strerror(status), -1);
              IO->DNS.Query->DNSStatus = status;
       }

       ev_idle_init(&IO->unwind_stack,
                   IO_postdns_callback);
       IO->unwind_stack.data = IO;
       EV_DNS_LOGT_INIT(unwind_stack);
       EV_DNS_LOGT_START(unwind_stack);
       ev_idle_start(event_base, &IO->unwind_stack);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void QueryCbDone ( AsyncIO IO)

Definition at line 295 of file serv_c-ares-dns.c.

{
       EV_DNS_syslog(LOG_DEBUG, "C-ARES: %s\n", __FUNCTION__);

       EV_DNS_LOGT_STOP(DNS.timeout);
       ev_timer_stop (event_base, &IO->DNS.timeout);

       EV_DNS_LOGT_STOP(unwind_stack);
       ev_idle_stop(event_base, &IO->unwind_stack);
}

Here is the caller graph for this function:

void QueueGetHostByName ( AsyncIO IO,
const char *  Hostname,
DNSQueryParts QueryParts,
IO_CallBack  PostDNS 
)

Definition at line 391 of file serv_c-ares-dns.c.

{

       EV_DNS_syslog(LOG_DEBUG, "C-ARES: %s\n", __FUNCTION__);
       IO->DNS.SourcePort = 0;

       IO->DNS.Query = QueryParts;
       IO->DNS.Query->PostDNS = PostDNS;

       InitC_ares_dns(IO);

       ev_timer_init(&IO->DNS.timeout, DNStimeouttrigger_callback, 10, 1);
       EV_DNS_LOGT_INIT(DNS.timeout);
       IO->DNS.timeout.data = IO;
       ares_gethostbyname(IO->DNS.Channel,
                        Hostname,
                        AF_INET6, /* it falls back to ipv4 in doubt... */
                        QueueGetHostByNameDone,
                        IO);
       EV_DNS_LOGT_START(DNS.timeout);
       ev_timer_start(event_base, &IO->DNS.timeout);

}

Here is the call graph for this function:

void QueueGetHostByNameDone ( void *  Ctx,
int  status,
int  timeouts,
struct hostent *  hostent 
)

Definition at line 365 of file serv_c-ares-dns.c.

{
       AsyncIO *IO = (AsyncIO *) Ctx;

       EV_DNS_syslog(LOG_DEBUG, "C-ARES: %s\n", __FUNCTION__);


       IO->DNS.Query->DNSStatus = status;
       IO->DNS.Query->VParsedDNSReply = hostent;
       IO->DNS.Query->DNSReplyFree = (FreeDNSReply) ares_free_hostent;

       EV_DNS_LOGT_STOP(DNS.timeout);
       ev_timer_stop (event_base, &IO->DNS.timeout);

       ev_idle_init(&IO->unwind_stack,
                   IO_postdns_callback);
       IO->unwind_stack.data = IO;
       EV_DNS_LOGT_INIT(unwind_stack);
       EV_DNS_LOGT_START(unwind_stack);
       ev_idle_start(event_base, &IO->unwind_stack);

}

Here is the call graph for this function:

Here is the caller graph for this function:

int QueueQuery ( ns_type  Type,
const char *  name,
AsyncIO IO,
DNSQueryParts QueryParts,
IO_CallBack  PostDNS 
)

Definition at line 418 of file serv_c-ares-dns.c.

{
       int length, family;
       char address_b[sizeof(struct in6_addr)];

       IO->DNS.SourcePort = 0;

       IO->DNS.Query = QueryParts;
       IO->DNS.Query->PostDNS = PostDNS;
       IO->DNS.Start = IO->Now;

       InitC_ares_dns(IO);

       ev_timer_init(&IO->DNS.timeout, DNStimeouttrigger_callback, 10, 1);
       IO->DNS.timeout.data = IO;
       EV_DNS_LOGT_INIT(DNS.timeout);

       switch(Type) {
       case ns_t_a:
              IO->DNS.Query->DNS_CB = ParseAnswerA;
              break;

       case ns_t_aaaa:
              IO->DNS.Query->DNS_CB = ParseAnswerAAAA;
              break;

       case ns_t_mx:
              IO->DNS.Query->DNS_CB = ParseAnswerMX;
              break;

       case ns_t_ns:
              IO->DNS.Query->DNS_CB = ParseAnswerNS;
              break;

       case ns_t_txt:
              IO->DNS.Query->DNS_CB = ParseAnswerTXT;
              break;

       case ns_t_srv:
              IO->DNS.Query->DNS_CB = ParseAnswerSRV;
              break;

       case ns_t_cname:
              IO->DNS.Query->DNS_CB = ParseAnswerCNAME;
              break;

       case ns_t_ptr:


              if (inet_pton(AF_INET, name, &address_b) == 1) {
                     length = sizeof(struct in_addr);
                     family = AF_INET;
              } else if (inet_pton(AF_INET6, name, &address_b) == 1) {
                     length = sizeof(struct in6_addr);
                     family = AF_INET6;
              } else {
                     return -1;
              }

              ares_gethostbyaddr(IO->DNS.Channel,
                               address_b,
                               length,
                               family,
                               HostByAddrCb,
                               IO);
              EV_DNS_LOGT_START(DNS.timeout);
              ev_timer_start(event_base, &IO->DNS.timeout);

              EV_DNS_syslog(LOG_DEBUG, "C-ARES: %s X1\n", __FUNCTION__);

              return 1;

       default:

              EV_DNS_syslog(LOG_DEBUG, "C-ARES: %sX2\n", __FUNCTION__);
              return 0;
       }
       EV_DNS_syslog(LOG_DEBUG, "C-ARES: %s\n", __FUNCTION__);

       ares_query(IO->DNS.Channel, name, ns_c_in, Type, QueryCb, IO);
       EV_DNS_LOGT_START(DNS.timeout);
       ev_timer_start(event_base, &IO->DNS.timeout);
       return 1;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void SockStateCb ( void *  data,
int  sock,
int  read,
int  write 
)

Definition at line 539 of file serv_c-ares-dns.c.

{
       AsyncIO *IO = data;
/* already inside of the event queue. */
       if (DebugCAres)
       {
              struct sockaddr_in sin = {};
              socklen_t slen;
              slen = sizeof(sin);
              if ((IO->DNS.SourcePort == 0) &&
                  (getsockname(sock, &sin, &slen) == 0))
              {
                     IO->DNS.SourcePort = ntohs(sin.sin_port);
              }
              EV_DNS_syslog(LOG_DEBUG, "C-ARES: %s %d|%d Sock %d port %hu\n",
                           __FUNCTION__,
                           read,
                           write,
                           sock,
                           IO->DNS.SourcePort);
       }

       IO->Now = ev_now(event_base);

       if (read) {
              if ((IO->DNS.recv_event.fd != sock) &&
                  (IO->DNS.recv_event.fd != 0)) {
                     EV_DNS_LOG_STOP(DNS.recv_event);
                     ev_io_stop(event_base, &IO->DNS.recv_event);
              }
              IO->DNS.recv_event.fd = sock;
              ev_io_init(&IO->DNS.recv_event,
                        DNS_recv_callback,
                        IO->DNS.recv_event.fd,
                        EV_READ);
              EV_DNS_LOG_INIT(DNS.recv_event);
              IO->DNS.recv_event.data = IO;
              EV_DNS_LOG_START(DNS.recv_event);
              ev_io_start(event_base, &IO->DNS.recv_event);
       }
       if (write) {
              if ((IO->DNS.send_event.fd != sock) &&
                  (IO->DNS.send_event.fd != 0)) {
                     EV_DNS_LOG_STOP(DNS.send_event);
                     ev_io_stop(event_base, &IO->DNS.send_event);
              }
              IO->DNS.send_event.fd = sock;
              ev_io_init(&IO->DNS.send_event,
                        DNS_send_callback,
                        IO->DNS.send_event.fd,
                        EV_WRITE);
              IO->DNS.send_event.data = IO;
              EV_DNS_LOG_INIT(DNS.send_event);
              EV_DNS_LOG_START(DNS.send_event);
              ev_io_start(event_base, &IO->DNS.send_event);
       }
       if ((read == 0) && (write == 0)) {
              EV_DNS_LOG_STOP(DNS.recv_event);
              EV_DNS_LOG_STOP(DNS.send_event);
              ev_io_stop(event_base, &IO->DNS.recv_event);
              ev_io_stop(event_base, &IO->DNS.send_event);
       }
}

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

int DebugCAres = 0

Definition at line 60 of file serv_c-ares-dns.c.

struct ev_loop* event_base

Definition at line 62 of file serv_eventclient.c.