]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Added idnsPTRLookup()
authorwessels <>
Sun, 18 Apr 1999 11:30:56 +0000 (11:30 +0000)
committerwessels <>
Sun, 18 Apr 1999 11:30:56 +0000 (11:30 +0000)
src/dns_internal.cc
src/protos.h

index aeeb983ac5e26b9ff9562ae41343298cacd58bd3..5ca70f9c34727ab92fc4e9172ae77749fb27f553 100644 (file)
@@ -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);
+}
index 75937a2018c84b81375fddf84f5d2f23c2aef4a5..fbaebd9f4b72bddc9ce9d8a597a24c671510e893 100644 (file)
@@ -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);