chiark / gitweb /
Also check specific query where applicable.
[adns.git] / src / adns.h
index 9caf44f057454d1b87c764ac488081bb73163909..96eb0a5fd61073b66fcbf4290b717626237c46b8 100644 (file)
@@ -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,13 @@ 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, adns_query qu);
+/* Checks the consistency of adns's internal data structures.
+ * If any error is found, the program will abort().
+ * You may pass 0 for qu; if you pass non-null then additional checks
+ * are done to make sure that qu is a valid query.
+ */
+
 /*
  * Example expected/legal calling sequence for submit/check/wait:
  *  adns_init