X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=adns.git;a=blobdiff_plain;f=src%2Fadns-internal.h;h=f47fc966c7f9677a9821c587098cdb527227c92c;hp=8666614456e5cd0d8db594f4864a7c20e26dee9e;hb=9d95094ce421414fade949831eeb9dd3090328a7;hpb=964344fc6da09bb76aff991cbda338fe9c919d21 diff --git a/src/adns-internal.h b/src/adns-internal.h index 8666614..f47fc96 100644 --- a/src/adns-internal.h +++ b/src/adns-internal.h @@ -16,22 +16,33 @@ struct adns__query { adns_query next, back; adns_query parent, child; adns_rrtype type; - struct adns_answer *answer; - int flags, udpretries, server; + adns_answer *answer; + int id, flags, udpretries, nextserver; + unsigned long sentudp, senttcp; /* bitmaps indexed by server */ struct timeval timeout; void *context; + unsigned char *querymsg; + int querylen; char owner[1]; + /* Possible states: + * Queue child id answer nextserver sentudp senttcp + * tosend null >=0 null any any any + * timew null >=0 null any at least 1 bit set any + * childw set >=0 partial any any any + * output null -1 set/null any any any + */ }; struct adns__state { adns_initflags iflags; - struct { adns_query head, tail; } input, timew, childw, output; - int udpsocket; + struct { adns_query head, tail; } tosend, timew, childw, output; + int nextid, udpsocket; int qbufavail, tcpbufavail, tcpbufused, tcpbufdone; - char *qbuf, *tcpbuf; + unsigned 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;