reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
adig.c File Reference
#include <sys/types.h>
#include <sys/time.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include "ares_nameser.h"
#include <unistd.h>
#include <netdb.h>
#include "rutil/ResipAssert.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <errno.h>
#include "ares.h"
#include "ares_dns.h"
#include "ares_compat.h"

Go to the source code of this file.

Classes

struct  nv
 

Macros

#define INADDR_NONE   0xffffffff
 

Functions

static void callback (void *arg, int status, unsigned char *abuf, int alen)
 
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)
 
static const char * type_name (int type)
 
static const char * class_name (int dnsclass)
 
static void usage (void)
 
int main (int argc, char **argv)
 

Variables

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

Macro Definition Documentation

◆ INADDR_NONE

#define INADDR_NONE   0xffffffff

Definition at line 51 of file adig.c.

Function Documentation

◆ callback()

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

Definition at line 388 of file adig.c.

◆ class_name()

static const char * class_name ( int  dnsclass)
static

Definition at line 743 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 514 of file adig.c.

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 209 of file adig.c.

◆ type_name()

static const char * type_name ( int  type)
static

Definition at line 731 of file adig.c.

◆ usage()

static void usage ( void  )
static

Variable Documentation

◆ classes

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

Definition at line 72 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 }
}
#define ARES_FLAG_NOALIASES
Definition ares.h:108
#define ARES_FLAG_IGNTC
Definition ares.h:104
#define ARES_FLAG_PRIMARY
Definition ares.h:103
#define ARES_FLAG_NORECURSE
Definition ares.h:105
#define ARES_FLAG_STAYOPEN
Definition ares.h:106
#define ARES_FLAG_USEVC
Definition ares.h:102

Definition at line 62 of file adig.c.

◆ nclasses

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

Definition at line 78 of file adig.c.

◆ nflags

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

Definition at line 70 of file adig.c.

◆ ntypes

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

Definition at line 117 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 119 of file adig.c.

◆ optarg

char* optarg
extern

◆ optind

int optind
extern

◆ 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 126 of file adig.c.

◆ types

const struct nv types[]
static

Definition at line 80 of file adig.c.