X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/mLib/blobdiff_plain/a759efa6dcc67b035726a4428157c35627653966..a0150d8deebfda4b52190738dd65c3d0f27d5756:/bres.h diff --git a/bres.h b/bres.h index 451f0fd..c391644 100644 --- 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. * @@ -15,28 +15,20 @@ * 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" { @@ -51,16 +43,26 @@ #include #include -#include -#include +#ifdef HAVE_ADNS +# include +#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 */