diff --git a/src/common.h b/src/common.h index 87cd8da..f3af88e 100644 --- a/src/common.h +++ b/src/common.h @@ -85,14 +85,12 @@ struct query { char name[QUERY_NAME_SIZE]; unsigned short type; unsigned short rcode; - unsigned short id; + int id; /* id < 0: unusued */ struct sockaddr_storage destination; socklen_t dest_len; struct sockaddr_storage from; socklen_t fromlen; - unsigned short id2; - struct sockaddr_storage from2; - socklen_t fromlen2; + struct timeval time_recv; }; enum connection { @@ -118,6 +116,8 @@ void read_password(char*, size_t); int check_topdomain(char *, char **); +extern double difftime(time_t, time_t); + #if defined(WINDOWS32) || defined(ANDROID) #ifndef ANDROID int inet_aton(const char *cp, struct in_addr *inp); diff --git a/src/dns.c b/src/dns.c index 6eecab2..b933a2d 100644 --- a/src/dns.c +++ b/src/dns.c @@ -411,7 +411,6 @@ dns_decode(char *buf, size_t buflen, struct query *q, qr_t qr, char *packet, siz int id; int rv; - q->id2 = 0; rv = 0; header = (HEADER*)packet;