X-Git-Url: https://git.distorted.org.uk/~mdw/adns/blobdiff_plain/5617a135bdb8439f714c8f45de7d5b3c7d50b376..59258c2d3f3adb0789a568c1a547b6a678a4cf43:/src/adns-internal.h diff --git a/src/adns-internal.h b/src/adns-internal.h index 05dd29c..e3a0132 100644 --- a/src/adns-internal.h +++ b/src/adns-internal.h @@ -17,21 +17,30 @@ struct adns__query { adns_query parent, child; adns_rrtype type; adns_answer *answer; - int flags, udpretries, server; + int id, flags, udpretries, nextserver; + unsigned long sentudp, senttcp; /* bitmaps indexed by server */ struct timeval timeout; void *context; char owner[1]; + /* Possible states: + * Queue child answer nextserver sentudp senttcp + * input null null 0 all bits zero all bits zero + * timew null null any at least 1 bit set any + * childw set partial any any any + * output null set any any any + */ }; struct adns__state { adns_initflags iflags; struct { adns_query head, tail; } input, timew, childw, output; - int udpsocket; + int nextid, udpsocket; int qbufavail, tcpbufavail, tcpbufused, tcpbufdone; char *qbuf, *tcpbuf; int nservers; - struct { + struct server { struct in_addr addr; + enum { server_disc, server_connecting, server_ok } state; int tcpsocket; struct timeval timeout; struct { adns_query head, tail; } connw;