chiark / gitweb /
Update wishlist items and add purpose comment to adns.h.
[adns.git] / src / adns.h
index 6a9e1b385afbba5f87098a0485d55f23ca5c1b07..ce12fc239757399de0aba67905618927ac889fd0 100644 (file)
@@ -1,11 +1,9 @@
 /*
- * Copyright (C)1998 Ian Jackson.
- * This version provided for review and comment only.
- *
- * $Id$
+ * adns.h
+ * - adns user-visible API (single-threaded, without any locking)
  */
 /*
- *  This file is part of adns, which is Copyright (C) 1997, 1998 Ian Jackson
+ *  This file is part of adns, which is Copyright (C) 1997-1999 Ian Jackson
  *  
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -19,7 +17,9 @@
  *  
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, write to the Free Software Foundation,
- *  Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 
+ *  Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ *  $Id$
  */
 
 #ifndef ADNS_H_INCLUDED
@@ -30,6 +30,8 @@
 #include <sys/socket.h>
 #include <netinet/in.h>
 
+/* All struct in_addr anywhere in adns are in NETWORK byte order. */
+
 typedef struct adns__state *adns_state;
 typedef struct adns__query *adns_query;
 
@@ -133,8 +135,6 @@ typedef enum {
   
   adns_s_max_misconfig= 199,
 
-  /* fixme: implement _s_cname */
-
   /* permanent problems with the query */
   adns_s_querydomainwrong,
   adns_s_querydomaininvalid,
@@ -235,8 +235,11 @@ typedef struct {
  *  If no (appropriate) requests are outstanding adns_query and adns_wait return ESRCH;
  */
 
-/* fixme: separate parsing from instantiation */
-int adns_init(adns_state *newstate_r, adns_initflags flags, FILE *diagfile/*0=>stderr*/);
+int adns_init(adns_state *newstate_r, adns_initflags flags,
+             FILE *diagfile /*0=>stderr*/);
+
+int adns_init_strcfg(adns_state *newstate_r, adns_initflags flags,
+                    FILE *diagfile /*0=>discard*/, const char *configtext);
 
 int adns_synchronous(adns_state ads,
                     const char *owner,
@@ -265,6 +268,10 @@ int adns_wait(adns_state ads,
              adns_query *query_io,
              adns_answer **answer_r,
              void **context_r);
+/* fixme: include TTL in answer somehow */
+/* fixme: multithreading/locking */
+/* fixme: easy way to get lists of fd's */
+/* fixme: IPv6 */
 
 void adns_cancel(adns_query query);