Defines | Functions | Variables

ink_res_mkquery.cc File Reference

#include "ink_config.h"
#include "ink_defs.h"
#include <sys/types.h>
#include <sys/param.h>
#include <netinet/in.h>
#include <arpa/nameser.h>
#include <arpa/nameser_compat.h>
#include <netdb.h>
#include <resolv.h>
#include <stdio.h>
#include <string.h>
#include "ink_error.h"
#include "ink_resolver.h"
Include dependency graph for ink_res_mkquery.cc:

Go to the source code of this file.

Defines

#define SPRINTF(x)   (sprintf x)

Functions

int ink_res_mkquery (ink_res_state statp, int op, const char *dname, int _class, int type, const u_char *data, int datalen, const u_char *, u_char *buf, int buflen)
static int printable (int ch)
static int labellen (const u_char *lp)
static int decode_bitstring (const unsigned char **cpp, char *dn, const char *eom)
static int special (int ch)
int ink_ns_name_ntop (const u_char *src, char *dst, size_t dstsiz)
int ns_name_ntop (const u_char *src, char *dst, size_t dstsiz)
HostResStyle ats_host_res_from (int family, HostResPreferenceOrder order)
 Caclulate the effective resolution preferences.
HostResStyle ats_host_res_match (sockaddr const *addr)
 Calculate the host resolution style to force a family match to addr.

Variables

static const char digits [] = "0123456789"

Define Documentation

#define SPRINTF (   x  )     (sprintf x)

Definition at line 87 of file ink_res_mkquery.cc.

Referenced by decode_bitstring().


Function Documentation

HostResStyle ats_host_res_from ( int  family,
HostResPreferenceOrder  order 
)

Caclulate the effective resolution preferences.

Parameters:
family Connection family
order Preference ordering.

Definition at line 505 of file ink_res_mkquery.cc.

References HOST_RES_PREFER_CLIENT, HOST_RES_PREFER_IPV4, HOST_RES_PREFER_IPV6, and N_HOST_RES_PREFERENCE_ORDER.

Referenced by HttpSessionAccept::accept().

HostResStyle ats_host_res_match ( sockaddr const *  addr  ) 

Calculate the host resolution style to force a family match to addr.

Definition at line 529 of file ink_res_mkquery.cc.

References ats_is_ip4(), and ats_is_ip6().

Referenced by HttpTransact::handle_response_from_server().

static int decode_bitstring ( const unsigned char **  cpp,
char *  dn,
const char *  eom 
) [static]

Definition at line 223 of file ink_res_mkquery.cc.

References SPRINTF.

Referenced by ink_ns_name_ntop(), and ns_name_ntop().

int ink_ns_name_ntop ( const u_char *  src,
char *  dst,
size_t  dstsiz 
)
int ink_res_mkquery ( ink_res_state  statp,
int  op,
const char *  dname,
int  _class,
int  type,
const u_char *  data,
int  datalen,
const u_char *  ,
u_char *  buf,
int  buflen 
)
Parameters:
op opcode of query
dname domain name
type _class and type of query
data resource record data
datalen length of data
buf buffer to put query
buflen size of buffer

Definition at line 94 of file ink_res_mkquery.cc.

References HFIXEDSZ, ts_imp_res_state::id, memcpy, NS_PUT16, NS_PUT32, ts_imp_res_state::options, and QFIXEDSZ.

Referenced by _ink_res_mkquery().

static int labellen ( const u_char *  lp  )  [static]

Definition at line 201 of file ink_res_mkquery.cc.

References INK_DNS_LABELTYPE_BITSTRING, and INK_NS_TYPE_ELT.

Referenced by ink_ns_name_ntop(), and ns_name_ntop().

int ns_name_ntop ( const u_char *  src,
char *  dst,
size_t  dstsiz 
)
static int printable ( int  ch  )  [static]

Definition at line 194 of file ink_res_mkquery.cc.

Referenced by ink_ns_name_ntop(), and ns_name_ntop().

static int special ( int  ch  )  [static]

Definition at line 278 of file ink_res_mkquery.cc.

Referenced by ink_ns_name_ntop(), and ns_name_ntop().


Variable Documentation

const char digits[] = "0123456789" [static]

Definition at line 198 of file ink_res_mkquery.cc.

Referenced by ink_ns_name_ntop(), and ns_name_ntop().