/* -*-c-*-
*
- * $Id: bres.h,v 1.3 1999/12/10 23:42:04 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.3 1999/12/10 23:42:04 mdw
- * Change header file guard names.
- *
- * Revision 1.2 1999/10/30 11:56:21 mdw
- * Fix include error, pointed out by Chris Rutter.
- *
- * Revision 1.1 1999/10/04 21:40:42 mdw
- * Added background resolver from `fw'.
- *
- */
-
#ifndef MLIB_RES_H
#define MLIB_RES_H
#include <arpa/inet.h>
#include <netdb.h>
+#ifdef HAVE_ADNS
+# include <adns.h>
+#endif
+
#include "sel.h"
#include "selbuf.h"
/* --- 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 */