-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. */
+int adns_callback(adns_state, int maxfd, const fd_set *readfds, const fd_set *writefds,
+ const fd_set *exceptfds);
+/* Gives adns flow-of-control for a bit. This will never block.
+ * If maxfd == -1 then adns will check (make nonblocking system calls on)
+ * all of its own filedescriptors; otherwise it will only use those
+ * < maxfd and specified in the fd_set's, as if select had returned them.
+ * Other fd's may be in the fd_sets, and will be ignored.
+ * _callback returns how many adns fd's were in the various sets, so
+ * you can tell if your select handling code has missed something and is going awol.
+ *
+ * May also return -1 if a critical syscall failed, setting errno.
+ */
+
+void adns_interest(adns_state, int *maxfd_io, fd_set *readfds_io,
+ fd_set *writefds_io, fd_set *exceptfds_io,
+ struct timeval **tv_mod, struct timeval *tv_buf);
+/* Find out file descriptors adns is interested in, and when it
+ * would like the opportunity to time something out. If you do not plan to
+ * block then tv_mod may be 0. Otherwise, tv_mod may point to 0 meaning
+ * you have no timeout of your own, in which case tv_buf must be non-null and
+ * _interest may fill it in and set *tv_mod=tv_buf.
+ * readfds, writefds, exceptfds and maxfd may not be 0.
+ */