chiark / gitweb /
New internal consistency checking with assert if right options set.
[adns] / src / adns.h
index 678dd0219b6259b1c599c6106a7cba11e9be8a77..59fb91e5458c6086d4a862c3fc277aafbf4f9a62 100644 (file)
@@ -19,7 +19,7 @@
  *  along with this program; if not, write to the Free Software Foundation,
  *  Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  *
- *  $Id: adns.h,v 1.57 1999/08/15 14:24:16 ian Exp $
+ *  $Id: adns.h,v 1.58 1999/09/25 15:46:39 ian Exp $
  */
 
 #ifndef ADNS_H_INCLUDED
@@ -49,6 +49,8 @@ typedef enum {
   adns_if_noautosys=    0x0010, /* do not make syscalls at every opportunity */
   adns_if_eintr=        0x0020, /* allow _wait and _synchronous to return EINTR */
   adns_if_nosigpipe=    0x0040, /* applic has SIGPIPE set to SIG_IGN, do not protect */
+  adns_if_checkc_entex= 0x0100, /* do consistency checks on entry/exit to adns funcs */
+  adns_if_checkc_freq=  0x0300, /* do consistency checks very frequently (slow!) */
 } adns_initflags;
 
 typedef enum {
@@ -379,6 +381,11 @@ adns_query adns_forallqueries_next(adns_state ads, void **context_r);
  * context_r may be 0.  *context_r may not be set when _next returns 0.
  */
 
+void adns_checkconsistency(adns_state ads);
+/* Checks the consistency of adns's internal data structures.
+ * If any error is found, the program will abort().
+ */
+
 /*
  * Example expected/legal calling sequence for submit/check/wait:
  *  adns_init