Functions
ares_process.c File Reference
#include "ares_setup.h"
#include <sys/uio.h>
#include "ares_nameser.h"
#include <assert.h>
#include <fcntl.h>
#include <limits.h>
#include "ares.h"
#include "ares_dns.h"
#include "ares_nowarn.h"
#include "ares_private.h"
Include dependency graph for ares_process.c:

Go to the source code of this file.

Functions

static void advance_tcp_send_queue (ares_channel channel, int whichserver, ares_ssize_t num_bytes)
 
void ares__close_socket (ares_channel channel, ares_socket_t s)
 
int ares__connect_socket (ares_channel channel, ares_socket_t sockfd, const struct sockaddr *addr, ares_socklen_t addrlen)
 
void ares__free_query (struct query *query)
 
ares_socket_t ares__open_socket (ares_channel channel, int af, int type, int protocol)
 
void ares__send_query (ares_channel channel, struct query *query, struct timeval *now)
 
int ares__timedout (struct timeval *now, struct timeval *check)
 
void ares_process (ares_channel channel, fd_set *read_fds, fd_set *write_fds)
 
void ares_process_fd (ares_channel channel, ares_socket_t read_fd, ares_socket_t write_fd)
 
static int configure_socket (ares_socket_t s, int family, ares_channel channel)
 
static void end_query (ares_channel channel, struct query *query, int status, unsigned char *abuf, int alen)
 
static void handle_error (ares_channel channel, int whichserver, struct timeval *now)
 
static int has_opt_rr (const unsigned char *abuf, int alen)
 
static void next_server (ares_channel channel, struct query *query, struct timeval *now)
 
static int open_tcp_socket (ares_channel channel, struct server_state *server)
 
static int open_udp_socket (ares_channel channel, struct server_state *server)
 
static void process_answer (ares_channel channel, unsigned char *abuf, int alen, int whichserver, int tcp, struct timeval *now)
 
static void process_broken_connections (ares_channel channel, struct timeval *now)
 
static void process_timeouts (ares_channel channel, struct timeval *now)
 
static void processfds (ares_channel channel, fd_set *read_fds, ares_socket_t read_fd, fd_set *write_fds, ares_socket_t write_fd)
 
static void read_tcp_data (ares_channel channel, fd_set *read_fds, ares_socket_t read_fd, struct timeval *now)
 
static void read_udp_packets (ares_channel channel, fd_set *read_fds, ares_socket_t read_fd, struct timeval *now)
 
static int same_address (struct sockaddr *sa, struct ares_addr *aa)
 
static int same_questions (const unsigned char *qbuf, int qlen, const unsigned char *abuf, int alen)
 
static int setsocknonblock (ares_socket_t sockfd, int nonblock)
 
static void skip_server (ares_channel channel, struct query *query, int whichserver)
 
static ares_ssize_t socket_recv (ares_channel channel, ares_socket_t s, void *data, size_t data_len)
 
static ares_ssize_t socket_recvfrom (ares_channel channel, ares_socket_t s, void *data, size_t data_len, int flags, struct sockaddr *from, ares_socklen_t *from_len)
 
static ares_ssize_t socket_write (ares_channel channel, ares_socket_t s, const void *data, size_t len)
 
static ares_ssize_t socket_writev (ares_channel channel, ares_socket_t s, const struct iovec *vec, int len)
 
static void swap_lists (struct list_node *head_a, struct list_node *head_b)
 
static void timeadd (struct timeval *now, int millisecs)
 
static int try_again (int errnum)
 
static void write_tcp_data (ares_channel channel, fd_set *write_fds, ares_socket_t write_fd, struct timeval *now)
 

Function Documentation

◆ advance_tcp_send_queue()

static void advance_tcp_send_queue ( ares_channel  channel,
int  whichserver,
ares_ssize_t  num_bytes 
)
static

Definition at line 292 of file ares_process.c.

◆ ares__close_socket()

void ares__close_socket ( ares_channel  channel,
ares_socket_t  s 
)

Definition at line 1542 of file ares_process.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__free_query()

void ares__free_query ( struct query query)

Definition at line 1500 of file ares_process.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__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__timedout()

int ares__timedout ( struct timeval now,
struct timeval check 
)

Definition at line 89 of file ares_process.c.

◆ ares_process()

void ares_process ( ares_channel  channel,
fd_set *  read_fds,
fd_set *  write_fds 
)

Definition at line 134 of file ares_process.c.

◆ ares_process_fd()

void ares_process_fd ( ares_channel  channel,
ares_socket_t  read_fd,
ares_socket_t  write_fd 
)

Definition at line 142 of file ares_process.c.

◆ configure_socket()

static int configure_socket ( ares_socket_t  s,
int  family,
ares_channel  channel 
)
static

Definition at line 969 of file ares_process.c.

◆ end_query()

static void end_query ( ares_channel  channel,
struct query query,
int  status,
unsigned char *  abuf,
int  alen 
)
static

Definition at line 1430 of file ares_process.c.

◆ handle_error()

static void handle_error ( ares_channel  channel,
int  whichserver,
struct timeval now 
)
static

Definition at line 705 of file ares_process.c.

◆ has_opt_rr()

static int has_opt_rr ( const unsigned char *  abuf,
int  alen 
)
static

Definition at line 1352 of file ares_process.c.

◆ next_server()

static void next_server ( ares_channel  channel,
struct query query,
struct timeval now 
)
static

Definition at line 757 of file ares_process.c.

◆ open_tcp_socket()

static int open_tcp_socket ( ares_channel  channel,
struct server_state server 
)
static

Definition at line 1036 of file ares_process.c.

◆ open_udp_socket()

static int open_udp_socket ( ares_channel  channel,
struct server_state server 
)
static

Definition at line 1150 of file ares_process.c.

◆ process_answer()

static void process_answer ( ares_channel  channel,
unsigned char *  abuf,
int  alen,
int  whichserver,
int  tcp,
struct timeval now 
)
static

Definition at line 564 of file ares_process.c.

◆ process_broken_connections()

static void process_broken_connections ( ares_channel  channel,
struct timeval now 
)
static

Definition at line 666 of file ares_process.c.

◆ process_timeouts()

static void process_timeouts ( ares_channel  channel,
struct timeval now 
)
static

Definition at line 533 of file ares_process.c.

◆ processfds()

static void processfds ( ares_channel  channel,
fd_set *  read_fds,
ares_socket_t  read_fd,
fd_set *  write_fds,
ares_socket_t  write_fd 
)
static

Definition at line 118 of file ares_process.c.

◆ read_tcp_data()

static void read_tcp_data ( ares_channel  channel,
fd_set *  read_fds,
ares_socket_t  read_fd,
struct timeval now 
)
static

Definition at line 357 of file ares_process.c.

◆ read_udp_packets()

static void read_udp_packets ( ares_channel  channel,
fd_set *  read_fds,
ares_socket_t  read_fd,
struct timeval now 
)
static

Definition at line 455 of file ares_process.c.

◆ same_address()

static int same_address ( struct sockaddr *  sa,
struct ares_addr aa 
)
static

Definition at line 1323 of file ares_process.c.

◆ same_questions()

static int same_questions ( const unsigned char *  qbuf,
int  qlen,
const unsigned char *  abuf,
int  alen 
)
static

Definition at line 1244 of file ares_process.c.

◆ setsocknonblock()

static int setsocknonblock ( ares_socket_t  sockfd,
int  nonblock 
)
static

Definition at line 919 of file ares_process.c.

◆ skip_server()

static void skip_server ( ares_channel  channel,
struct query query,
int  whichserver 
)
static

Definition at line 740 of file ares_process.c.

◆ socket_recv()

static ares_ssize_t socket_recv ( ares_channel  channel,
ares_socket_t  s,
void *  data,
size_t  data_len 
)
static

Definition at line 341 of file ares_process.c.

◆ socket_recvfrom()

static ares_ssize_t socket_recvfrom ( ares_channel  channel,
ares_socket_t  s,
void *  data,
size_t  data_len,
int  flags,
struct sockaddr *  from,
ares_socklen_t *  from_len 
)
static

Definition at line 321 of file ares_process.c.

◆ socket_write()

static ares_ssize_t socket_write ( ares_channel  channel,
ares_socket_t  s,
const void *  data,
size_t  len 
)
static

Definition at line 185 of file ares_process.c.

◆ socket_writev()

static ares_ssize_t socket_writev ( ares_channel  channel,
ares_socket_t  s,
const struct iovec vec,
int  len 
)
static

Definition at line 177 of file ares_process.c.

◆ swap_lists()

static void swap_lists ( struct list_node head_a,
struct list_node head_b 
)
static

Definition at line 681 of file ares_process.c.

◆ timeadd()

static void timeadd ( struct timeval now,
int  millisecs 
)
static

Definition at line 104 of file ares_process.c.

◆ try_again()

static int try_again ( int  errnum)
static

Definition at line 158 of file ares_process.c.

◆ write_tcp_data()

static void write_tcp_data ( ares_channel  channel,
fd_set *  write_fds,
ares_socket_t  write_fd,
struct timeval now 
)
static

Definition at line 200 of file ares_process.c.



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