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

Go to the source code of this file.

Macros

#define NS_INT16SZ   2
 
#define NS_INADDRSZ   4
 
#define NS_IN6ADDRSZ   16
 

Functions

static int init_by_options (ares_channel channel, struct ares_options *options, int optmask)
 
static int init_by_environment (ares_channel channel)
 
static int init_by_resolv_conf (ares_channel channel)
 
static int init_by_defaults (ares_channel channel)
 
static int config_domain (ares_channel channel, char *str)
 
static int config_lookup (ares_channel channel, const char *str)
 
static int config_nameserver (struct server_state **servers, int *nservers, const char *str)
 
static int config_sortlist (struct apattern **sortlist, int *nsort, const char *str)
 
static int set_search (ares_channel channel, const char *str)
 
static int set_options (ares_channel channel, const char *str)
 
static char * try_config (char *s, char *opt)
 
static const char * try_option (const char *p, const char *q, const char *opt)
 
static int ip_addr (const char *s, int len, struct in_addr *addr)
 
static void natural_mask (struct apattern *pat)
 
static int inet_pton4 (const char *src, u_char *dst)
 
static int inet_pton6 (const char *src, u_char *dst)
 
int ares_capabilities (int capmask)
 
int ares_init (ares_channel *channelptr)
 
int ares_init_with_socket_function (ares_channel *channelptr, socket_function_ptr socketFunc)
 
int ares_init_options (ares_channel *channelptr, struct ares_options *options, int optmask)
 
int ares_init_options_with_socket_function (ares_channel *channelptr, struct ares_options *options, int optmask, socket_function_ptr socketFunc)
 

Macro Definition Documentation

◆ NS_IN6ADDRSZ

#define NS_IN6ADDRSZ   16

Definition at line 1261 of file ares_init.c.

◆ NS_INADDRSZ

#define NS_INADDRSZ   4

Definition at line 1260 of file ares_init.c.

◆ NS_INT16SZ

#define NS_INT16SZ   2

Definition at line 1259 of file ares_init.c.

Function Documentation

◆ ares_capabilities()

int ares_capabilities ( int  capmask)

Definition at line 94 of file ares_init.c.

◆ ares_init()

int ares_init ( ares_channel *  channelptr)

Definition at line 104 of file ares_init.c.

◆ ares_init_options()

int ares_init_options ( ares_channel *  channelptr,
struct ares_options *  options,
int  optmask 
)

Definition at line 114 of file ares_init.c.

◆ ares_init_options_with_socket_function()

int ares_init_options_with_socket_function ( ares_channel *  channelptr,
struct ares_options *  options,
int  optmask,
socket_function_ptr  socketFunc 
)

Definition at line 120 of file ares_init.c.

◆ ares_init_with_socket_function()

int ares_init_with_socket_function ( ares_channel *  channelptr,
socket_function_ptr  socketFunc 
)

Definition at line 109 of file ares_init.c.

◆ config_domain()

static int config_domain ( ares_channel  channel,
char *  str 
)
static

Definition at line 942 of file ares_init.c.

◆ config_lookup()

static int config_lookup ( ares_channel  channel,
const char *  str 
)
static

Definition at line 954 of file ares_init.c.

◆ config_nameserver()

static int config_nameserver ( struct server_state **  servers,
int *  nservers,
const char *  str 
)
static

Definition at line 979 of file ares_init.c.

◆ config_sortlist()

static int config_sortlist ( struct apattern **  sortlist,
int *  nsort,
const char *  str 
)
static

Definition at line 1024 of file ares_init.c.

◆ inet_pton4()

static int inet_pton4 ( const char *  src,
u_char *  dst 
)
static

Definition at line 1373 of file ares_init.c.

◆ inet_pton6()

static int inet_pton6 ( const char *  src,
u_char *  dst 
)
static

Definition at line 1278 of file ares_init.c.

◆ init_by_defaults()

static int init_by_defaults ( ares_channel  channel)
static

Definition at line 838 of file ares_init.c.

◆ init_by_environment()

static int init_by_environment ( ares_channel  channel)
static

Definition at line 313 of file ares_init.c.

◆ init_by_options()

static int init_by_options ( ares_channel  channel,
struct ares_options *  options,
int  optmask 
)
static

Definition at line 238 of file ares_init.c.

◆ init_by_resolv_conf()

static int init_by_resolv_conf ( ares_channel  channel)
static

Definition at line 353 of file ares_init.c.

◆ ip_addr()

static int ip_addr ( const char *  s,
int  len,
struct in_addr *  addr 
)
static

Definition at line 1164 of file ares_init.c.

◆ natural_mask()

static void natural_mask ( struct apattern *  pat)
static

Definition at line 1185 of file ares_init.c.

◆ set_options()

static int set_options ( ares_channel  channel,
const char *  str 
)
static

Definition at line 1116 of file ares_init.c.

◆ set_search()

static int set_search ( ares_channel  channel,
const char *  str 
)
static

Definition at line 1071 of file ares_init.c.

◆ try_config()

static char * try_config ( char *  s,
char *  opt 
)
static

Definition at line 1143 of file ares_init.c.

◆ try_option()

static const char * try_option ( const char *  p,
const char *  q,
const char *  opt 
)
static

Definition at line 1156 of file ares_init.c.