reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
ares_process.c File Reference
#include <sys/types.h>
#include "rutil/ResipAssert.h"
#include <sys/socket.h>
#include <sys/uio.h>
#include <netinet/in.h>
#include "ares_nameser.h"
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#include <fcntl.h>
#include <time.h>
#include <errno.h>
#include "ares.h"
#include "ares_dns.h"
#include "ares_private.h"
#include "ares_local.h"

Go to the source code of this file.

Macros

#define PORTABLE_INPROGRESS_ERR   EINPROGRESS
 

Functions

static int getErrno ()
 
static int would_block (void)
 
static void write_tcp_data_core (ares_channel channel, int server_idx, time_t now)
 
static void write_tcp_data (ares_channel channel, fd_set *write_fds, time_t now)
 
static void read_tcp_data (ares_channel channel, int server_idx, fd_set *read_fds, time_t now)
 
static void read_udp_packets (ares_channel channel, int server_idx, fd_set *read_fds, time_t now)
 
static void process_timeouts (ares_channel channel, time_t now)
 
static void process_answer (ares_channel channel, unsigned char *abuf, int alen, int whichserver, int tcp, time_t now)
 
static void handle_error (ares_channel channel, int whichserver, time_t now)
 
static void next_server (ares_channel channel, struct query *query, time_t now)
 
static int next_server_new_network (ares_channel channel, struct query *query, time_t 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 int same_questions (const unsigned char *qbuf, int qlen, const unsigned char *abuf, int alen)
 
static void end_query (ares_channel channel, struct query *query, int status, unsigned char *abuf, int alen)
 
static int make_socket_non_blocking (int s)
 
void ares_process (ares_channel channel, fd_set *read_fds, fd_set *write_fds)
 
void ares_process_poll (ares_channel channel, int server_idx, int rdFd, int wrFd, time_t now)
 
void ares__send_query (ares_channel channel, struct query *query, time_t now)
 
static int connect_udp_ipv4 (int s, ares_channel channel, struct server_state *server)
 
void ares__kill_socket (int s)
 
void ares_process_set_poll_cb (ares_channel channel, ares_poll_cb_func *cbf, void *cbd)
 

Macro Definition Documentation

◆ PORTABLE_INPROGRESS_ERR

#define PORTABLE_INPROGRESS_ERR   EINPROGRESS

Function Documentation

◆ ares__kill_socket()

void ares__kill_socket ( int  s)

Definition at line 981 of file ares_process.c.

◆ ares__send_query()

void ares__send_query ( ares_channel  channel,
struct query *  query,
time_t  now 
)

Definition at line 614 of file ares_process.c.

◆ ares_process()

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

Definition at line 87 of file ares_process.c.

◆ ares_process_poll()

void ares_process_poll ( ares_channel  channel,
int  server_idx,
int  rdFd,
int  wrFd,
time_t  now 
)

Definition at line 105 of file ares_process.c.

◆ ares_process_set_poll_cb()

void ares_process_set_poll_cb ( ares_channel  channel,
ares_poll_cb_func *  cbf,
void *  cbd 
)

Definition at line 1015 of file ares_process.c.

◆ connect_udp_ipv4()

static int connect_udp_ipv4 ( int  s,
ares_channel  channel,
struct server_state *  server 
)
static

Definition at line 782 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 950 of file ares_process.c.

◆ getErrno()

static int getErrno ( )
static

Definition at line 46 of file ares_process.c.

◆ handle_error()

static void handle_error ( ares_channel  channel,
int  whichserver,
time_t  now 
)
static

Definition at line 521 of file ares_process.c.

◆ make_socket_non_blocking()

int make_socket_non_blocking ( int  s)
static

Definition at line 990 of file ares_process.c.

◆ next_server()

static void next_server ( ares_channel  channel,
struct query *  query,
time_t  now 
)
static

Definition at line 547 of file ares_process.c.

◆ next_server_new_network()

static int next_server_new_network ( ares_channel  channel,
struct query *  query,
time_t  now 
)
static

Definition at line 580 of file ares_process.c.

◆ open_tcp_socket()

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

Definition at line 708 of file ares_process.c.

◆ open_udp_socket()

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

Definition at line 800 of file ares_process.c.

◆ process_answer()

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

Definition at line 443 of file ares_process.c.

◆ process_timeouts()

static void process_timeouts ( ares_channel  channel,
time_t  now 
)
static

Definition at line 426 of file ares_process.c.

◆ read_tcp_data()

static void read_tcp_data ( ares_channel  channel,
int  server_idx,
fd_set *  read_fds,
time_t  now 
)
static

Definition at line 277 of file ares_process.c.

◆ read_udp_packets()

static void read_udp_packets ( ares_channel  channel,
int  server_idx,
fd_set *  read_fds,
time_t  now 
)
static

Definition at line 370 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 871 of file ares_process.c.

◆ would_block()

static int would_block ( void  )
static

Definition at line 52 of file ares_process.c.

◆ write_tcp_data()

static void write_tcp_data ( ares_channel  channel,
fd_set *  write_fds,
time_t  now 
)
static

Definition at line 255 of file ares_process.c.

◆ write_tcp_data_core()

static void write_tcp_data_core ( ares_channel  channel,
int  server_idx,
time_t  now 
)
static

Definition at line 130 of file ares_process.c.