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

Go to the source code of this file.

Classes

struct  host_query
 

Functions

static void next_lookup (struct host_query *hquery)
 
static void host_callback (void *arg, int status, unsigned char *abuf, int alen)
 
static void end_hquery (struct host_query *hquery, int status, struct hostent *host)
 
static int fake_hostent (const char *name, ares_host_callback callback, void *arg)
 
static int file_lookup (const char *name, struct hostent **host)
 
static void sort_addresses (struct hostent *host, struct apattern *sortlist, int nsort)
 
static int get_address_index (struct in_addr *addr, struct apattern *sortlist, int nsort)
 
void ares_gethostbyname (ares_channel channel, const char *name, int family, ares_host_callback callback, void *arg)
 
int hostfile_lookup (const char *name, struct hostent **host)
 

Function Documentation

◆ ares_gethostbyname()

void ares_gethostbyname ( ares_channel  channel,
const char *  name,
int  family,
ares_host_callback  callback,
void *  arg 
)

Definition at line 64 of file ares_gethostbyname.c.

◆ end_hquery()

static void end_hquery ( struct host_query *  hquery,
int  status,
struct hostent *  host 
)
static

Definition at line 158 of file ares_gethostbyname.c.

◆ fake_hostent()

static int fake_hostent ( const char *  name,
ares_host_callback  callback,
void *  arg 
)
static

Definition at line 171 of file ares_gethostbyname.c.

◆ file_lookup()

static int file_lookup ( const char *  name,
struct hostent **  host 
)
static

Definition at line 232 of file ares_gethostbyname.c.

◆ get_address_index()

static int get_address_index ( struct in_addr *  addr,
struct apattern *  sortlist,
int  nsort 
)
static

Definition at line 297 of file ares_gethostbyname.c.

◆ host_callback()

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

Definition at line 139 of file ares_gethostbyname.c.

◆ hostfile_lookup()

int hostfile_lookup ( const char *  name,
struct hostent **  host 
)

Definition at line 227 of file ares_gethostbyname.c.

◆ next_lookup()

static void next_lookup ( struct host_query *  hquery)
static

Definition at line 108 of file ares_gethostbyname.c.

◆ sort_addresses()

static void sort_addresses ( struct hostent *  host,
struct apattern *  sortlist,
int  nsort 
)
static

Definition at line 267 of file ares_gethostbyname.c.