-void adns_event(adns_state, fd_set *readfds_mod,
- fd_set *writefds_mod, fd_set *exceptfds_mod,
- int *maxfd_mod, struct timeval *tv_mod);
-/* You may call this with *_mod=0 to have a simple callback,
- or with *fds_mod=*maxfd_mod=0 but tv_mod!=0 if you are
- not going to sleep, or with all !=0 if you are going to sleep. */
+void adns_interest(adns_state, fd_set *readfds_mod,
+ fd_set *writefds_mod, fd_set *exceptfds_mod,
+ int *maxfd_mod, struct timeval **tv_mod, struct timeval *tv_buf);
+/* You may call this with *_mod=0 to allow adns to have flow-of-control
+ * briefly, or with *fds_mod=*maxfd_mod=0 but tv_mod!=0 if you are
+ * not going to sleep, or with all !=0 if you are going to sleep.
+ * If tv_mod!=0 and *tv_mod=0 then tv_buf must be !0 and *tv_buf is irrelevant
+ * and may be overwritten (and *tv_mod set to tv_buf); otherwise tv_buf is ignored.
+ */
+
+int adns_callback(adns_state, fd_set readfds, fd_set writefds,
+ fd_set exceptfds, int maxfd);
+/* For select-driven programs, this allows adns to know which fd's are relevant,
+ * so that it doesn't need to make syscalls on others of its fd's. It's a kind
+ * of limited flow-of-control allowance. It will return how many adns fd's were
+ * in the set, so you can tell if your select handling code is missing things.
+ */