chiark / gitweb /
Makefile.am: Use $(mkdir_p) instead of $(mkinstalldirs).
[mLib] / bres.h
diff --git a/bres.h b/bres.h
index 451f0fd840cfdfc9f3416511c66c06b5e7c36096..c391644265c6a74ce863c76756529b560d0d9369 100644 (file)
--- a/bres.h
+++ b/bres.h
@@ -1,13 +1,13 @@
 /* -*-c-*-
  *
- * $Id: bres.h,v 1.1 1999/10/04 21:40:42 mdw Exp $
+ * $Id: bres.h,v 1.5 2004/04/08 01:36:11 mdw Exp $
  *
  * Background reverse name resolution
  *
  * (c) 1999 Straylight/Edgeware
  */
 
-/*----- Licensing notice --------------------------------------------------* 
+/*----- Licensing notice --------------------------------------------------*
  *
  * This file is part of the mLib utilities library.
  *
  * it under the terms of the GNU Library General Public License as
  * published by the Free Software Foundation; either version 2 of the
  * License, or (at your option) any later version.
- * 
+ *
  * mLib is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU Library General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU Library General Public
  * License along with mLib; if not, write to the Free
  * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
  * MA 02111-1307, USA.
  */
 
-/*----- Revision history --------------------------------------------------* 
- *
- * $Log: bres.h,v $
- * Revision 1.1  1999/10/04 21:40:42  mdw
- * Added background resolver from `fw'.
- *
- */
-
-#ifndef RES_H
-#define RES_H
+#ifndef MLIB_RES_H
+#define MLIB_RES_H
 
 #ifdef __cplusplus
   extern "C" {
 #include <arpa/inet.h>
 #include <netdb.h>
 
-#include <mLib/sel.h>
-#include <mLib/selbuf.h>
+#ifdef HAVE_ADNS
+#  include <adns.h>
+#endif
+
+#include "sel.h"
+#include "selbuf.h"
 
 /*----- Data structures ---------------------------------------------------*/
 
 /* --- Client allocated request block --- */
 
 typedef struct bres_client {
+#ifdef HAVE_ADNS
+  adns_query aq;                       /* ADNS query handle */
+  adns_answer *a;                      /* Answer for reverse resolution */
+  struct _unused *_pad1;               /* And a spare slot */
+#else
   struct bres_client *next, *prev;     /* Queue of waiting resolve jobs */
   struct bres_server *rs;              /* Pointer to attached server */
+#endif
   int q;                               /* Query type (name or address) */
   union {
     struct in_addr addr;               /* Address to resolve */