46 qu=
malloc(
sizeof(*qu));
if (!qu)
return 0;
50 qu->
state= query_tosend;
128 const char *owner,
int ol,
152 const char *nextentry;
220 if (!typei)
return ENOSYS;
227 memset(&qu->ctx.info,0,
sizeof(qu->ctx.info));
235 if (ol>=1 && owner[ol-1]==
'.' && (ol<2 || owner[ol-2]!=
'\\')) {
236 flags &= ~adns_qf_search;
245 for (ndots=0,
p=owner; (
p=
strchr(
p,
'.'));
p++, ndots++);
247 qu->search_origlen= ol;
278 const unsigned char *
iaddr;
279 char *
buf, *buf_free;
283 flags &= ~adns_qf_search;
289 if (lreq > (
int)
sizeof(shortbuf)) {
339 return (
byte*)an +
MEM_ROUND(
sizeof(*an));
379 from->interim_allocd -= sz;
404 for (cqu= qu->
children.head; cqu; cqu= ncqu) {
475 if (!ans)
goto x_nomem;
486 for (rrn=0; rrn<ans->
nrrs; rrn++)
void adns__consistency(adns_state ads, adns_query qu, consistency_checks cc)
ACPI_SIZE strlen(const char *String)
char * strchr(const char *String, int ch)
void query_done(struct query_node *qun, adns_answer *answer)
ADNS_API int adns_synchronous(adns_state ads, const char *owner, adns_rrtype type, adns_queryflags flags, adns_answer **answer_r)
ADNS_API int adns_wait(adns_state ads, adns_query *query_io, adns_answer **answer_r, void **context_r)
@ adns_s_querydomaintoolong
@ adns_s_querydomaininvalid
#define gettimeofday(tv, tz)
GLuint GLuint GLsizei GLenum type
GLdouble GLdouble GLdouble r
GLenum GLuint GLenum GLsizei const GLchar * buf
GLenum const GLvoid * addr
#define memcpy(s1, s2, n)
#define sprintf(buf, format,...)
#define LIST_UNLINK_PART(list, node, part)
#define LIST_UNLINK(list, node)
#define LIST_LINK_TAIL(list, node)
void adns__autosys(adns_state ads, struct timeval now)
int adns__vbuf_append(vbuf *vb, const byte *data, int len)
void adns__vbuf_init(vbuf *vb)
void adns__vbuf_free(vbuf *vb)
int adns__vbuf_ensure(vbuf *vb, int want)
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)
const typeinfo * adns__findtype(adns_rrtype type)
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__query_send(adns_query qu, 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)
static void cancel_children(adns_query qu)
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)
static int save_owner(adns_query qu, const char *owner, int ol)
int adns_submit_reverse(adns_state ads, const struct sockaddr *addr, adns_rrtype type, adns_queryflags flags, void *context, adns_query *query_r)
static void makefinal_query(adns_query qu)
void adns__query_fail(adns_query qu, adns_status stat)
static void * alloc_common(adns_query qu, size_t sz)
void * adns__alloc_mine(adns_query qu, size_t sz)
void adns__search_next(adns_state ads, adns_query qu, struct timeval now)
static void query_submit(adns_state ads, adns_query qu, const typeinfo *typei, vbuf *qumsg_vb, int id, adns_queryflags flags, struct timeval now)
void adns__reset_preserved(adns_query qu)
static void query_simple(adns_state ads, adns_query qu, const char *owner, int ol, const typeinfo *typei, adns_queryflags flags, struct timeval now)
void adns_cancel(adns_query qu)
void * adns__alloc_final(adns_query qu, size_t sz)
void adns__makefinal_str(adns_query qu, char **strp)
static adns_query query_alloc(adns_state ads, const typeinfo *typei, adns_queryflags flags, struct timeval now)
void adns__makefinal_block(adns_query qu, void **blpp, size_t sz)
static void free_query_allocs(adns_query qu)
void adns__update_expires(adns_query qu, unsigned long ttl, struct timeval now)
int adns_submit(adns_state ads, const char *owner, adns_rrtype type, adns_queryflags flags, void *context, adns_query *query_r)
int adns_submit_reverse_any(adns_state ads, const struct sockaddr *addr, const char *zone, adns_rrtype type, adns_queryflags flags, void *context, adns_query *query_r)
void adns__query_done(adns_query qu)
struct adns__query::@4235 siblings
enum adns__query::@4233 state
struct adns__query::@4236 allocations
struct adns__query::@4234 children
struct query_queue udpw tcpw childw output
union adns_answer::@4231 rrs
void(* callback)(adns_query parent, adns_query child)
int(* diff_needswap)(adns_state ads, const void *datap_a, const void *datap_b)
void(* makefinal)(adns_query qu, void *data)
__inline int before(__u32 seq1, __u32 seq2)
__inline int after(__u32 seq1, __u32 seq2)
static unsigned int block