X-Git-Url: https://git.distorted.org.uk/~mdw/adns/blobdiff_plain/86e7b8d96483d2f55561aa76ac96e7663840b796..828d89bd4196ad8ef825cdf2db26afe2eb797b69:/src/general.c?ds=sidebyside diff --git a/src/general.c b/src/general.c index 37edfa3..8311dd7 100644 --- a/src/general.c +++ b/src/general.c @@ -46,7 +46,7 @@ void adns__vdiag(adns_state ads, const char *pfx, adns_initflags prevent, adns__vbuf_init(&vb); fprintf(stderr,"%sQNAME=%s, QTYPE=%s", bef, - adns__diag_domain(qu->ads,-1,0, &vb,qu->flags, + adns__diag_domain(qu->ads,-1,0, &vb, qu->query_dgram,qu->query_dglen,DNS_HDRSIZE), qu->typei ? qu->typei->rrtname : ""); if (qu->typei && qu->typei->fmtname) @@ -138,11 +138,11 @@ void adns__vbuf_free(vbuf *vb) { /* Additional diagnostic functions */ -const char *adns__diag_domain(adns_state ads, int serv, adns_query qu, vbuf *vb, - int flags, const byte *dgram, int dglen, int cbyte) { +const char *adns__diag_domain(adns_state ads, int serv, adns_query qu, + vbuf *vb, const byte *dgram, int dglen, int cbyte) { adns_status st; - st= adns__parse_domain(ads,serv,qu,vb, flags,dgram,dglen,&cbyte,dglen); + st= adns__parse_domain(ads,serv,qu,vb, pdf_quoteok, dgram,dglen,&cbyte,dglen); if (st == adns_s_nolocalmem) { return ""; } @@ -199,24 +199,25 @@ static const struct sinfo { adns_status st; const char *string; } sinfos[]= { - SINFO( ok, "OK" ), - SINFO( timeout, "Timed out" ), - SINFO( nolocalmem, "Out of memory" ), - SINFO( allservfail, "No working nameservers" ), - SINFO( servfail, "Nameserver failure" ), - SINFO( notimplemented, "Query not implemented" ), - SINFO( refused, "Refused by nameserver" ), - SINFO( reasonunknown, "Reason unknown" ), - SINFO( norecurse, "Recursion denied by nameserver" ), - SINFO( serverfaulty, "Nameserver sent bad data" ), - SINFO( unknownreply, "Reply from nameserver not understood" ), - SINFO( invaliddata, "Invalid data" ), - SINFO( inconsistent, "Inconsistent data" ), - SINFO( cname, "RR refers to an alias" ), - SINFO( nxdomain, "No such domain" ), - SINFO( nodata, "No such data" ), - SINFO( invaliddomain, "Domain syntactically invalid" ), - SINFO( domaintoolong, "Domain name too long" ) + SINFO( ok, "OK" ), + SINFO( timeout, "Timed out" ), + SINFO( nolocalmem, "Out of memory" ), + SINFO( allservfail, "No working nameservers" ), + SINFO( servfail, "Nameserver failure" ), + SINFO( notimplemented, "Query not implemented" ), + SINFO( refused, "Refused by nameserver" ), + SINFO( reasonunknown, "Reason unknown" ), + SINFO( norecurse, "Recursion denied by nameserver" ), + SINFO( serverfaulty, "Nameserver sent bad data" ), + SINFO( unknownreply, "Reply from nameserver not understood" ), + SINFO( invaliddata, "Invalid data" ), + SINFO( inconsistent, "Inconsistent data" ), + SINFO( cname, "RR refers to an alias" ), + SINFO( invalidanswerdomain, "Received syntactically invalid domain" ), + SINFO( nxdomain, "No such domain" ), + SINFO( nodata, "No such data" ), + SINFO( invalidquerydomain, "Domain syntactically invalid" ), + SINFO( domaintoolong, "Domain name too long" ) }; static int si_compar(const void *key, const void *elem) {