Classes | Macros | Typedefs | Functions | Variables
ares_private.h File Reference
#include "ares_ipv6.h"
#include "ares_llist.h"
#include "ares_getenv.h"
#include "ares_strdup.h"
#include "ares_strsplit.h"
#include "ares_strcasecmp.h"
#include "ares_writev.h"
Include dependency graph for ares_private.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  apattern
 
struct  ares_addr
 
struct  ares_channeldata
 
struct  query
 
struct  query_server_info
 
struct  rc4_key
 
struct  send_request
 
struct  server_state
 

Macros

#define addrV4   addr.addr4
 
#define addrV6   addr.addr6
 
#define ARES_ID_KEY_LEN   31
 
#define ARES_QID_TABLE_SIZE   2048
 
#define ARES_SWAP_BYTE(a, b)   { unsigned char swapByte = *(a); *(a) = *(b); *(b) = swapByte; }
 
#define ARES_TIMEOUT_TABLE_SIZE   1024
 
#define CARES_INADDR_CAST(type, var)   ((type)((void *)var))
 
#define DEFAULT_TIMEOUT   5000 /* milliseconds */
 
#define DEFAULT_TRIES   4
 
#define EDNSFIXEDSZ   11 /* Size of EDNS header */
 
#define EDNSPACKETSZ
 
#define getenv(ptr)   ares_getenv(ptr)
 
#define INADDR_NONE   0xffffffff
 
#define MAXENDSSZ   4096 /* Maximum (local) limit for edns packet size */
 
#define PATH_HOSTS   "/etc/hosts"
 
#define PATH_RESOLV_CONF   "/etc/resolv.conf"
 
#define PATTERN_CIDR   0x2
 
#define PATTERN_MASK   0x1
 
#define SOCK_STATE_CALLBACK(c, s, r, w)
 
#define STATIC_TESTABLE   static
 
#define strcasecmp(p1, p2)   ares_strcasecmp(p1,p2)
 
#define strncasecmp(p1, p2, n)   ares_strncasecmp(p1,p2,n)
 
#define writev(s, ptr, cnt)   ares_writev(s,ptr,cnt)
 

Typedefs

typedef struct rc4_key rc4_key
 

Functions

void ares__addrinfo_cat_cnames (struct ares_addrinfo_cname **head, struct ares_addrinfo_cname *tail)
 
void ares__addrinfo_cat_nodes (struct ares_addrinfo_node **head, struct ares_addrinfo_node *tail)
 
struct ares_addrinfo_cnameares__append_addrinfo_cname (struct ares_addrinfo_cname **ai_cname)
 
struct ares_addrinfo_nodeares__append_addrinfo_node (struct ares_addrinfo_node **ai_node)
 
int ares__cat_domain (const char *name, const char *domain, char **s)
 
void ares__close_socket (ares_channel, ares_socket_t)
 
void ares__close_sockets (ares_channel channel, struct server_state *server)
 
int ares__connect_socket (ares_channel channel, ares_socket_t sockfd, const struct sockaddr *addr, ares_socklen_t addrlen)
 
void ares__destroy_servers_state (ares_channel channel)
 
int ares__expand_name_for_response (const unsigned char *encoded, const unsigned char *abuf, int alen, char **s, long *enclen, int is_hostname)
 
int ares__expand_name_validated (const unsigned char *encoded, const unsigned char *abuf, int alen, char **s, long *enclen, int is_hostname)
 
void ares__free_query (struct query *query)
 
void ares__freeaddrinfo_cnames (struct ares_addrinfo_cname *ai_cname)
 
void ares__freeaddrinfo_nodes (struct ares_addrinfo_node *ai_node)
 
unsigned short ares__generate_new_id (rc4_key *key)
 
int ares__get_hostent (FILE *fp, int family, struct hostent **host)
 
void ares__init_servers_state (ares_channel channel)
 
int ares__is_onion_domain (const char *name)
 
struct ares_addrinfoares__malloc_addrinfo (void)
 
struct ares_addrinfo_cnameares__malloc_addrinfo_cname (void)
 
struct ares_addrinfo_nodeares__malloc_addrinfo_node (void)
 
ares_socket_t ares__open_socket (ares_channel channel, int af, int type, int protocol)
 
int ares__parse_into_addrinfo (const unsigned char *abuf, int alen, struct ares_addrinfo *ai)
 
int ares__parse_into_addrinfo2 (const unsigned char *abuf, int alen, char **question_hostname, struct ares_addrinfo *ai)
 
int ares__parse_qtype_reply (const unsigned char *abuf, int alen, int *qtype)
 
int ares__read_line (FILE *fp, char **buf, size_t *bufsize)
 
int ares__readaddrinfo (FILE *fp, const char *name, unsigned short port, const struct ares_addrinfo_hints *hints, struct ares_addrinfo *ai)
 
void ares__send_query (ares_channel channel, struct query *query, struct timeval *now)
 
int ares__single_domain (ares_channel channel, const char *name, char **s)
 
int ares__sortaddrinfo (ares_channel channel, struct ares_addrinfo_node *ai_node)
 
int ares__timedout (struct timeval *now, struct timeval *check)
 
struct timeval ares__tvnow (void)
 

Variables

void(* ares_free )(void *ptr)
 
void *(* ares_malloc )(size_t size)
 
void *(* ares_realloc )(void *ptr, size_t size)
 

Macro Definition Documentation

◆ addrV4

#define addrV4   addr.addr4

Definition at line 142 of file ares_private.h.

◆ addrV6

#define addrV6   addr.addr6

Definition at line 143 of file ares_private.h.

◆ ARES_ID_KEY_LEN

#define ARES_ID_KEY_LEN   31

Definition at line 99 of file ares_private.h.

◆ ARES_QID_TABLE_SIZE

#define ARES_QID_TABLE_SIZE   2048

Definition at line 316 of file ares_private.h.

◆ ARES_SWAP_BYTE

#define ARES_SWAP_BYTE (   a,
  b 
)    { unsigned char swapByte = *(a); *(a) = *(b); *(b) = swapByte; }

Definition at line 413 of file ares_private.h.

◆ ARES_TIMEOUT_TABLE_SIZE

#define ARES_TIMEOUT_TABLE_SIZE   1024

Definition at line 319 of file ares_private.h.

◆ CARES_INADDR_CAST

#define CARES_INADDR_CAST (   type,
  var 
)    ((type)((void *)var))

Definition at line 56 of file ares_private.h.

◆ DEFAULT_TIMEOUT

#define DEFAULT_TIMEOUT   5000 /* milliseconds */

Definition at line 40 of file ares_private.h.

◆ DEFAULT_TRIES

#define DEFAULT_TRIES   4

Definition at line 41 of file ares_private.h.

◆ EDNSFIXEDSZ

#define EDNSFIXEDSZ   11 /* Size of EDNS header */

Definition at line 130 of file ares_private.h.

◆ EDNSPACKETSZ

#define EDNSPACKETSZ
Value:
1280 /* Reasonable UDP payload size, as suggested
in RFC2671 */

Definition at line 128 of file ares_private.h.

◆ getenv

#define getenv (   ptr)    ares_getenv(ptr)

Definition at line 106 of file ares_private.h.

◆ INADDR_NONE

#define INADDR_NONE   0xffffffff

Definition at line 43 of file ares_private.h.

◆ MAXENDSSZ

#define MAXENDSSZ   4096 /* Maximum (local) limit for edns packet size */

Definition at line 129 of file ares_private.h.

◆ PATH_HOSTS

#define PATH_HOSTS   "/etc/hosts"

Definition at line 94 of file ares_private.h.

◆ PATH_RESOLV_CONF

#define PATH_RESOLV_CONF   "/etc/resolv.conf"

Definition at line 90 of file ares_private.h.

◆ PATTERN_CIDR

#define PATTERN_CIDR   0x2

Definition at line 241 of file ares_private.h.

◆ PATTERN_MASK

#define PATTERN_MASK   0x1

Definition at line 240 of file ares_private.h.

◆ SOCK_STATE_CALLBACK

#define SOCK_STATE_CALLBACK (   c,
  s,
  r,
 
)
Value:
do { \
if ((c)->sock_state_cb) \
(c)->sock_state_cb((c)->sock_state_cb_data, (s), (r), (w)); \

Definition at line 416 of file ares_private.h.

◆ STATIC_TESTABLE

#define STATIC_TESTABLE   static

Definition at line 50 of file ares_private.h.

◆ strcasecmp

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

Definition at line 114 of file ares_private.h.

◆ strncasecmp

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

Definition at line 119 of file ares_private.h.

◆ writev

#define writev (   s,
  ptr,
  cnt 
)    ares_writev(s,ptr,cnt)

Definition at line 124 of file ares_private.h.

Typedef Documentation

◆ rc4_key

typedef struct rc4_key rc4_key

Function Documentation

◆ ares__addrinfo_cat_cnames()

void ares__addrinfo_cat_cnames ( struct ares_addrinfo_cname **  head,
struct ares_addrinfo_cname tail 
)

Definition at line 142 of file ares_getaddrinfo.c.

◆ ares__addrinfo_cat_nodes()

void ares__addrinfo_cat_nodes ( struct ares_addrinfo_node **  head,
struct ares_addrinfo_node tail 
)

Definition at line 201 of file ares_getaddrinfo.c.

◆ ares__append_addrinfo_cname()

struct ares_addrinfo_cname* ares__append_addrinfo_cname ( struct ares_addrinfo_cname **  ai_cname)

Definition at line 123 of file ares_getaddrinfo.c.

◆ ares__append_addrinfo_node()

struct ares_addrinfo_node* ares__append_addrinfo_node ( struct ares_addrinfo_node **  ai_node)

Definition at line 182 of file ares_getaddrinfo.c.

◆ ares__cat_domain()

int ares__cat_domain ( const char *  name,
const char *  domain,
char **  s 
)

Definition at line 214 of file ares_search.c.

◆ ares__close_socket()

void ares__close_socket ( ares_channel  ,
ares_socket_t   
)

Definition at line 1542 of file ares_process.c.

◆ ares__close_sockets()

void ares__close_sockets ( ares_channel  channel,
struct server_state server 
)

Definition at line 22 of file ares__close_sockets.c.

◆ ares__connect_socket()

int ares__connect_socket ( ares_channel  channel,
ares_socket_t  sockfd,
const struct sockaddr *  addr,
ares_socklen_t  addrlen 
)

Definition at line 1528 of file ares_process.c.

◆ ares__destroy_servers_state()

void ares__destroy_servers_state ( ares_channel  channel)

Definition at line 96 of file ares_destroy.c.

◆ ares__expand_name_for_response()

int ares__expand_name_for_response ( const unsigned char *  encoded,
const unsigned char *  abuf,
int  alen,
char **  s,
long enclen,
int  is_hostname 
)

Definition at line 291 of file ares_expand_name.c.

◆ ares__expand_name_validated()

int ares__expand_name_validated ( const unsigned char *  encoded,
const unsigned char *  abuf,
int  alen,
char **  s,
long enclen,
int  is_hostname 
)

Definition at line 107 of file ares_expand_name.c.

◆ ares__free_query()

void ares__free_query ( struct query query)

Definition at line 1500 of file ares_process.c.

◆ ares__freeaddrinfo_cnames()

void ares__freeaddrinfo_cnames ( struct ares_addrinfo_cname ai_cname)

Definition at line 27 of file ares_freeaddrinfo.c.

◆ ares__freeaddrinfo_nodes()

void ares__freeaddrinfo_nodes ( struct ares_addrinfo_node ai_node)

Definition at line 40 of file ares_freeaddrinfo.c.

◆ ares__generate_new_id()

unsigned short ares__generate_new_id ( rc4_key key)

Definition at line 98 of file ares_query.c.

◆ ares__get_hostent()

int ares__get_hostent ( FILE *  fp,
int  family,
struct hostent **  host 
)

Definition at line 34 of file ares__get_hostent.c.

◆ ares__init_servers_state()

void ares__init_servers_state ( ares_channel  channel)

Definition at line 2633 of file ares_init.c.

◆ ares__is_onion_domain()

int ares__is_onion_domain ( const char *  name)

Definition at line 438 of file ares_getnameinfo.c.

◆ ares__malloc_addrinfo()

struct ares_addrinfo* ares__malloc_addrinfo ( void  )

Definition at line 160 of file ares_getaddrinfo.c.

◆ ares__malloc_addrinfo_cname()

struct ares_addrinfo_cname* ares__malloc_addrinfo_cname ( void  )

Definition at line 113 of file ares_getaddrinfo.c.

◆ ares__malloc_addrinfo_node()

struct ares_addrinfo_node* ares__malloc_addrinfo_node ( void  )

Definition at line 170 of file ares_getaddrinfo.c.

◆ ares__open_socket()

ares_socket_t ares__open_socket ( ares_channel  channel,
int  af,
int  type,
int  protocol 
)

Definition at line 1516 of file ares_process.c.

◆ ares__parse_into_addrinfo()

int ares__parse_into_addrinfo ( const unsigned char *  abuf,
int  alen,
struct ares_addrinfo ai 
)

Definition at line 251 of file ares__parse_into_addrinfo.c.

◆ ares__parse_into_addrinfo2()

int ares__parse_into_addrinfo2 ( const unsigned char *  abuf,
int  alen,
char **  question_hostname,
struct ares_addrinfo ai 
)

Definition at line 42 of file ares__parse_into_addrinfo.c.

◆ ares__parse_qtype_reply()

int ares__parse_qtype_reply ( const unsigned char *  abuf,
int  alen,
int qtype 
)

◆ ares__read_line()

int ares__read_line ( FILE *  fp,
char **  buf,
size_t *  bufsize 
)

Definition at line 31 of file ares__read_line.c.

◆ ares__readaddrinfo()

int ares__readaddrinfo ( FILE *  fp,
const char *  name,
unsigned short  port,
const struct ares_addrinfo_hints hints,
struct ares_addrinfo ai 
)

Definition at line 35 of file ares__readaddrinfo.c.

◆ ares__send_query()

void ares__send_query ( ares_channel  channel,
struct query query,
struct timeval now 
)

Definition at line 799 of file ares_process.c.

◆ ares__single_domain()

int ares__single_domain ( ares_channel  channel,
const char *  name,
char **  s 
)

Definition at line 233 of file ares_search.c.

◆ ares__sortaddrinfo()

int ares__sortaddrinfo ( ares_channel  channel,
struct ares_addrinfo_node ai_node 
)

Definition at line 443 of file ares__sortaddrinfo.c.

◆ ares__timedout()

int ares__timedout ( struct timeval now,
struct timeval check 
)

Definition at line 89 of file ares_process.c.

◆ ares__tvnow()

struct timeval ares__tvnow ( void  )

Definition at line 85 of file ares__timeval.c.

Variable Documentation

◆ ares_free

void(* ares_free) (void *ptr)
default

Definition at line 60 of file ares_library_init.c.

◆ ares_malloc

void*(* ares_malloc) (size_t size)
default

Definition at line 58 of file ares_library_init.c.

◆ ares_realloc

void*(* ares_realloc) (void *ptr, size_t size)
default

Definition at line 59 of file ares_library_init.c.

absl::FormatConversionChar::s
@ s
c
void c(T a)
Definition: miscompile_with_no_unique_address_test.cc:40
fix_build_deps.r
r
Definition: fix_build_deps.py:491
WHILE_FALSE
#define WHILE_FALSE
Definition: setup_once.h:349


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