30#ifndef ADNS_INTERNAL_H_INCLUDED
31#define ADNS_INTERNAL_H_INCLUDED
35#ifndef ADNS_JGAA_WIN32
43#ifndef ADNS_JGAA_WIN32
50#ifndef ADNS_JGAA_WIN32
57#ifdef ADNS_REGRESS_TEST
58# include "hredirect.h"
65#define UDPMAXRETRIES 15
66#define UDPRETRYMS 2000
67#define TCPWAITMS 30000
68#define TCPCONNMS 14000
69#define TCPIDLEMS 30000
70#define MAXTTLBELIEVE (7*86400)
74#define DNS_MAXLABEL 63
75#define DNS_MAXDOMAIN 255
80#define DNS_INADDR_ARPA "in-addr", "arpa"
82#define MAX_POLLFDS ADNS_POLLFDS_RECOMMENDED
311#ifndef ADNS_JGAA_WIN32
383 const char *owner,
int ol,
389 const byte *qd_dgram,
int qd_dglen,
int qd_begin,
543 const byte *dgram,
int dglen,
int max,
544 int dmbegin,
int *dmend_rlater);
583 const byte *dgram,
int dglen,
int *cbyte_io,
int max);
602 const byte *dgram,
int dglen,
int *cbyte_io,
603 int *type_r,
int *class_r,
unsigned long *ttl_r,
604 int *rdlen_r,
int *rdstart_r,
605 int *ownermatchedquery_r);
631 const byte *dgram,
int dglen,
int *cbyte_io,
632 int *type_r,
int *class_r,
unsigned long *ttl_r,
633 int *rdlen_r,
int *rdstart_r,
634 const byte *eo_dgram,
int eo_dglen,
int eo_cbyte,
675 const struct pollfd *pollfds,
int npollfds,
676 int maxfd,
const fd_set *readfds,
700 return (
c >=
'a' &&
c <=
'z') || (
c >=
'A' &&
c <=
'Z');
711#define MEM_ROUND(sz) \
712 (( ((sz)+sizeof(union maxalign)-1) / sizeof(union maxalign) ) \
713 * sizeof(union maxalign) )
715#define GETIL_B(cb) (((dgram)[(cb)++]) & 0x0ff)
716#define GET_B(cb,tv) ((tv)= GETIL_B((cb)))
717#define GET_W(cb,tv) ((tv)=0, (tv)|=(GETIL_B((cb))<<8), (tv)|=GETIL_B(cb), (tv))
718#define GET_L(cb,tv) ( (tv)=0, \
719 (tv)|=(GETIL_B((cb))<<24), \
720 (tv)|=(GETIL_B((cb))<<16), \
721 (tv)|=(GETIL_B((cb))<<8), \
char * strchr(const char *String, int ch)
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
GLuint GLuint GLsizei GLenum type
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLboolean GLboolean GLboolean b
GLenum GLuint GLenum GLsizei const GLchar * buf
GLenum const GLvoid * addr
GLboolean GLboolean GLboolean GLboolean a
static IPrintDialogCallback callback
#define PRINTFFORMAT(si, tc)
void void void int adns__vbuf_ensure(vbuf *vb, int want)
void adns__timeouts(adns_state ads, int act, struct timeval **tv_io, struct timeval *tvbuf, struct timeval now)
void adns__transfer_interim(adns_query from, adns_query to, void *block, size_t sz)
void * adns__alloc_preserved(adns_query qu, size_t sz)
adns_status adns__findrr_anychk(adns_query qu, int serv, const byte *dgram, int dglen, int *cbyte_io, int *type_r, int *class_r, unsigned long *ttl_r, int *rdlen_r, int *rdstart_r, const byte *eo_dgram, int eo_dglen, int eo_cbyte, int *eo_matched_r)
adns_status adns__parse_domain_more(findlabel_state *fls, adns_state ads, adns_query qu, vbuf *vb, parsedomain_flags flags, const byte *dgram)
static int ctype_domainunquoted(int c)
const typeinfo * adns__findtype(adns_rrtype type)
static int ctype_822special(int c)
adns_status adns__internal_submit(adns_state ads, adns_query *query_r, const typeinfo *typei, vbuf *qumsg_vb, int id, adns_queryflags flags, struct timeval now, const qcontext *ctx)
void * adns__alloc_interim(adns_query qu, size_t sz)
int adns__vbuf_append(vbuf *vb, const byte *data, int len)
adns_status adns__findrr(adns_query qu, int serv, const byte *dgram, int dglen, int *cbyte_io, int *type_r, int *class_r, unsigned long *ttl_r, int *rdlen_r, int *rdstart_r, int *ownermatchedquery_r)
void adns__must_gettimeofday(adns_state ads, const struct timeval **now_io, struct timeval *tv_buf)
static int ctype_whitespace(int c)
adns_status adns__mkquery(adns_state ads, vbuf *vb, int *id_r, const char *owner, int ol, const typeinfo *typei, adns_queryflags flags)
void adns__fdevents(adns_state ads, const struct pollfd *pollfds, int npollfds, int maxfd, const fd_set *readfds, const fd_set *writefds, const fd_set *exceptfds, struct timeval now, int *r_r)
void adns__tcp_broken(adns_state ads, const char *what, const char *why)
void adns__querysend_tcp(adns_query qu, struct timeval now)
void adns__vbuf_appendq(vbuf *vb, const byte *data, int len)
void adns__vbuf_init(vbuf *vb)
static int errno_resources(int e)
void void adns__warn(adns_state ads, int serv, adns_query qu, const char *fmt,...) PRINTFFORMAT(4
static int ctype_alpha(int c)
void adns__query_fail(adns_query qu, adns_status stat)
void adns__debug(adns_state ads, int serv, adns_query qu, const char *fmt,...) PRINTFFORMAT(4
static int ctype_digit(int c)
int adns__setnonblock(adns_state ads, ADNS_SOCKET fd)
void * adns__alloc_mine(adns_query qu, size_t sz)
adns_status adns__parse_domain(adns_state ads, int serv, adns_query qu, vbuf *vb, adns_queryflags flags, const byte *dgram, int dglen, int *cbyte_io, int max)
void adns__autosys(adns_state ads, struct timeval now)
int vbuf__append_quoted1035(vbuf *vb, const byte *buf, int len)
void adns__vbuf_free(vbuf *vb)
void adns__search_next(adns_state ads, adns_query qu, struct timeval now)
void void void adns__diag(adns_state ads, int serv, adns_query qu, const char *fmt,...) PRINTFFORMAT(4
void adns__reset_preserved(adns_query qu)
void adns__sigpipe_protect(adns_state)
adns_status adns__findlabel_next(findlabel_state *fls, int *lablen_r, int *labstart_r)
void adns__findlabel_start(findlabel_state *fls, adns_state ads, int serv, adns_query qu, const byte *dgram, int dglen, int max, int dmbegin, int *dmend_rlater)
adns_status adns__mkquery_frdgram(adns_state ads, vbuf *vb, int *id_r, const byte *qd_dgram, int qd_dglen, int qd_begin, adns_rrtype type, adns_queryflags flags)
void adns__sigpipe_unprotect(adns_state)
void * adns__alloc_final(adns_query qu, size_t sz)
void adns__makefinal_str(adns_query qu, char **strp)
void adns__query_send(adns_query qu, struct timeval now)
void adns__makefinal_block(adns_query qu, void **blpp, size_t sz)
void adns__update_expires(adns_query qu, unsigned long ttl, struct timeval now)
int adns__pollfds(adns_state ads, struct pollfd pollfds_buf[MAX_POLLFDS])
void adns__tcp_tryconnect(adns_state ads, struct timeval now)
const char * adns__diag_domain(adns_state ads, int serv, adns_query qu, vbuf *vb, const byte *dgram, int dglen, int cbyte)
void adns__consistency(adns_state ads, adns_query qu, consistency_checks cc)
int adns__internal_check(adns_state ads, adns_query *query_io, adns_answer **answer, void **context_r)
void adns__vdiag(adns_state ads, const char *pfx, adns_initflags prevent, int serv, adns_query qu, const char *fmt, va_list al)
void adns__isort(void *array, int nobjs, int sz, void *tempbuf, int(*needswap)(void *context, const void *a, const void *b), void *context)
int adns__vbuf_appendstr(vbuf *vb, const char *data)
void adns__procdgram(adns_state ads, const byte *dgram, int len, int serv, int viatcp, struct timeval now)
void adns__query_done(adns_query qu)
struct adns__query::@4226 allocations
struct adns__query::@4225 siblings
enum adns__query::@4223 state
struct adns__query::@4224 children
enum adns__state::adns__tcpstate tcpstate
struct pollfd pollfds_buf[MAX_POLLFDS]
struct query_queue udpw tcpw childw output
struct timeval tcptimeout
struct adns__state::server servers[MAXSERVERS]
struct sigaction stdsigpipe
adns_rr_hostaddr * hostaddr
adns_rr_addr ptr_parent_addr
static unsigned int block