Classes | Macros | Functions | Variables
adig.c File Reference
#include "ares_setup.h"
#include "ares_nameser.h"
#include "ares.h"
#include "ares_dns.h"
#include "ares_getopt.h"
#include "ares_nowarn.h"
#include "ares_strdup.h"
#include "ares_strcasecmp.h"
Include dependency graph for adig.c:

Go to the source code of this file.

Classes

struct  nv
 

Macros

#define ACCEPTED_RETVAL4   32
 
#define ACCEPTED_RETVAL6   128
 
#define MAX_IP6_RR   (16*sizeof(".x.x") + sizeof(".IP6.ARPA") + 1)
 
#define strcasecmp(p1, p2)   ares_strcasecmp(p1,p2)
 
#define strdup(ptr)   ares_strdup(ptr)
 
#define strncasecmp(p1, p2, n)   ares_strncasecmp(p1,p2,n)
 

Functions

static void append_addr_list (struct ares_addr_node **head, struct ares_addr_node *node)
 
static void callback (void *arg, int status, int timeouts, unsigned char *abuf, int alen)
 
static const char * class_name (int dnsclass)
 
static int convert_query (char **name, int use_bitstring)
 
static void destroy_addr_list (struct ares_addr_node *head)
 
static const unsigned char * display_question (const unsigned char *aptr, const unsigned char *abuf, int alen)
 
static const unsigned char * display_rr (const unsigned char *aptr, const unsigned char *abuf, int alen)
 
int main (int argc, char **argv)
 
static void print_help_info_adig (void)
 
static const char * type_name (int type)
 
static void usage (void)
 

Variables

static const struct nv classes []
 
static const struct nv flags []
 
static const int nclasses = sizeof(classes) / sizeof(classes[0])
 
static const int nflags = sizeof(flags) / sizeof(flags[0])
 
static const int ntypes = sizeof(types) / sizeof(types[0])
 
static const char * opcodes []
 
static const char * rcodes []
 
static const struct nv types []
 

Macro Definition Documentation

◆ ACCEPTED_RETVAL4

#define ACCEPTED_RETVAL4   32

◆ ACCEPTED_RETVAL6

#define ACCEPTED_RETVAL6   128

◆ MAX_IP6_RR

#define MAX_IP6_RR   (16*sizeof(".x.x") + sizeof(".IP6.ARPA") + 1)

◆ strcasecmp

#define strcasecmp (   p1,
  p2 
)    ares_strcasecmp(p1,p2)

Definition at line 47 of file adig.c.

◆ strdup

#define strdup (   ptr)    ares_strdup(ptr)

Definition at line 42 of file adig.c.

◆ strncasecmp

#define strncasecmp (   p1,
  p2,
  n 
)    ares_strncasecmp(p1,p2,n)

Definition at line 52 of file adig.c.

Function Documentation

◆ append_addr_list()

static void append_addr_list ( struct ares_addr_node **  head,
struct ares_addr_node node 
)
static

Definition at line 930 of file adig.c.

◆ callback()

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

Definition at line 385 of file adig.c.

◆ class_name()

static const char * class_name ( int  dnsclass)
static

Definition at line 901 of file adig.c.

◆ convert_query()

static int convert_query ( char **  name,
int  use_bitstring 
)
static

Definition at line 810 of file adig.c.

◆ destroy_addr_list()

static void destroy_addr_list ( struct ares_addr_node head)
static

Definition at line 920 of file adig.c.

◆ display_question()

static const unsigned char * display_question ( const unsigned char *  aptr,
const unsigned char *  abuf,
int  alen 
)
static

Definition at line 476 of file adig.c.

◆ display_rr()

static const unsigned char * display_rr ( const unsigned char *  aptr,
const unsigned char *  abuf,
int  alen 
)
static

Definition at line 515 of file adig.c.

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 157 of file adig.c.

◆ print_help_info_adig()

static void print_help_info_adig ( void  )
static

Definition at line 948 of file adig.c.

◆ type_name()

static const char * type_name ( int  type)
static

Definition at line 889 of file adig.c.

◆ usage()

static void usage ( void  )
static

Definition at line 913 of file adig.c.

Variable Documentation

◆ classes

const struct nv classes[]
static
Initial value:
= {
{ "IN", C_IN },
{ "CHAOS", C_CHAOS },
{ "HS", C_HS },
{ "ANY", C_ANY }
}

Definition at line 75 of file adig.c.

◆ flags

const struct nv flags[]
static
Initial value:
= {
{ "usevc", ARES_FLAG_USEVC },
{ "primary", ARES_FLAG_PRIMARY },
{ "igntc", ARES_FLAG_IGNTC },
{ "norecurse", ARES_FLAG_NORECURSE },
{ "stayopen", ARES_FLAG_STAYOPEN },
{ "noaliases", ARES_FLAG_NOALIASES }
}

Definition at line 65 of file adig.c.

◆ nclasses

const int nclasses = sizeof(classes) / sizeof(classes[0])
static

Definition at line 81 of file adig.c.

◆ nflags

const int nflags = sizeof(flags) / sizeof(flags[0])
static

Definition at line 73 of file adig.c.

◆ ntypes

const int ntypes = sizeof(types) / sizeof(types[0])
static

Definition at line 126 of file adig.c.

◆ opcodes

const char* opcodes[]
static
Initial value:
= {
"QUERY", "IQUERY", "STATUS", "(reserved)", "NOTIFY",
"(unknown)", "(unknown)", "(unknown)", "(unknown)",
"UPDATEA", "UPDATED", "UPDATEDA", "UPDATEM", "UPDATEMA",
"ZONEINIT", "ZONEREF"
}

Definition at line 128 of file adig.c.

◆ rcodes

const char* rcodes[]
static
Initial value:
= {
"NOERROR", "FORMERR", "SERVFAIL", "NXDOMAIN", "NOTIMP", "REFUSED",
"(unknown)", "(unknown)", "(unknown)", "(unknown)", "(unknown)",
"(unknown)", "(unknown)", "(unknown)", "(unknown)", "NOCHANGE"
}

Definition at line 135 of file adig.c.

◆ types

const struct nv types[]
static

Definition at line 83 of file adig.c.

ARES_FLAG_USEVC
#define ARES_FLAG_USEVC
Definition: ares.h:142
ARES_FLAG_IGNTC
#define ARES_FLAG_IGNTC
Definition: ares.h:144
ARES_FLAG_STAYOPEN
#define ARES_FLAG_STAYOPEN
Definition: ares.h:146
C_CHAOS
#define C_CHAOS
Definition: ares_nameser.h:295
ARES_FLAG_PRIMARY
#define ARES_FLAG_PRIMARY
Definition: ares.h:143
C_HS
#define C_HS
Definition: ares_nameser.h:298
C_IN
#define C_IN
Definition: ares_nameser.h:292
ARES_FLAG_NORECURSE
#define ARES_FLAG_NORECURSE
Definition: ares.h:145
C_ANY
#define C_ANY
Definition: ares_nameser.h:304
ARES_FLAG_NOALIASES
#define ARES_FLAG_NOALIASES
Definition: ares.h:148


grpc
Author(s):
autogenerated on Fri May 16 2025 03:01:02