From: wessels <> Date: Sun, 18 Apr 1999 11:30:56 +0000 (+0000) Subject: Added idnsPTRLookup() X-Git-Tag: SQUID_3_0_PRE1~2274 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8db7110741e4bfe3b36fdaee3ee6ee8b89d35d52;p=thirdparty%2Fsquid.git Added idnsPTRLookup() --- diff --git a/src/dns_internal.cc b/src/dns_internal.cc index aeeb983ac5..5ca70f9c34 100644 --- a/src/dns_internal.cc +++ b/src/dns_internal.cc @@ -1,6 +1,6 @@ /* - * $Id: dns_internal.cc,v 1.4 1999/04/16 01:00:51 wessels Exp $ + * $Id: dns_internal.cc,v 1.5 1999/04/18 05:30:56 wessels Exp $ * * DEBUG: section 78 DNS lookups; interacts with lib/rfc1035.c * AUTHOR: Duane Wessels @@ -352,3 +352,18 @@ idnsALookup(const char *name, IDNSCB * callback, void *data) q->start_t = current_time; idnsSendQuery(q); } + +void +idnsPTRLookup(const struct in_addr addr, IDNSCB * callback, void *data) +{ + idns_query *q = memAllocate(MEM_IDNS_QUERY); + q->sz = sizeof(q->buf); + q->id = rfc1035BuildPTRQuery(addr, q->buf, &q->sz); + debug(78, 3) ("idnsPTRLookup: buf is %d bytes for %s, id = %#hx\n", + (int) q->sz, inet_ntoa(addr), q->id); + q->callback = callback; + q->callback_data = data; + cbdataLock(q->callback_data); + q->start_t = current_time; + idnsSendQuery(q); +} diff --git a/src/protos.h b/src/protos.h index 75937a2018..fbaebd9f4b 100644 --- a/src/protos.h +++ b/src/protos.h @@ -1,6 +1,6 @@ /* - * $Id: protos.h,v 1.317 1999/04/15 06:16:06 wessels Exp $ + * $Id: protos.h,v 1.318 1999/04/18 05:30:56 wessels Exp $ * * * SQUID Internet Object Cache http://squid.nlanr.net/Squid/ @@ -217,6 +217,7 @@ extern void dnsSubmit(const char *lookup, HLPCB * callback, void *data); extern void idnsInit(void); extern void idnsShutdown(void); extern void idnsALookup(const char *, IDNSCB *, void *); +extern void idnsPTRLookup(const struct in_addr, IDNSCB *, void *); extern void eventAdd(const char *name, EVH * func, void *arg, double when, int); extern void eventAddIsh(const char *name, EVH * func, void *arg, double delta_ish, int);