Index: adns/GPL-vs-LGPL diff -u /dev/null adns/GPL-vs-LGPL:1.2 --- /dev/null Sun Sep 17 15:32:48 2000 +++ adns/GPL-vs-LGPL Sun Sep 17 01:45:54 2000 @@ -0,0 +1,122 @@ + GPL vs LGPL, in the context of adns + ----------------------------------- + +Several people have asked me to release GNU adns under the GNU Lesser +General Public Licence (LGPL, formerly the Library GPL) instead of the +`stronger' GPL. This file is intended to answer most of these +questions. If you still have questions or comments, please mail me at +. + +Typically there are two or three kinds of situation where people make +this request: the first is where someone is developing a proprietary +program and wishes to make use of adns but doesn't wish to make their +program free software. The second case is where a free software +project is currently using an MIT-like licence or the LGPL and fear +`GPL infection'. The third case, which often overlaps with the +second, is where another free software project currently using a +GPL-incompatible licence, wishes to use adns. + + +1. Proprietary applications of adns +----------------------------------- + +So, let me get this straight. You're writing a proprietary +program, by which I mean that you will not be distributing source code +and not allowing users to modify and share your software; most likely +you are doing this for your own (personal or corporate) financial +gain. + +However, you want to take advantage of adns, software which I have +spent my time and effort on, and which I release as free software so +that everyone can improve, share and use it. + +Don't you think that is a little hypocritical ? I'm sorry, but I +don't want you to just take my nice convenient software, without +giving something back to the free software community or giving the +same rights to your users as I do to you. + +If you really aren't the nasty kind of person I've described here, for +example if you have a good reason other than your own selfishness for +wanting to restrict distribution of your program, then perhaps you +should contact me to discuss it. + + +2. GPL-avoiding projects (MIT licence, et al) +--------------------------------------------- + +Some free software projects prefer to avoid the GPL and other licences +which force the software always to be free. Instead they use +something like the MIT X licence, which allows proprietary versions of +their software, or the in the case of some free libraries, the LGPL, +which allows proprietary applications. I have to say that I think +these people are misguided, but that doesn't mean that they don't have +a perfect right to do that. + +Some of these people think that merely writing to an interface +provided by GPL'd software will cause their program to become GPL'd +too, even if they don't distribute the GPL'd software. I don't think +this is the case. I'm perfectly happy for non-GPL'd but +GPL-compatible software to refer to adns in its source code. However, +I think that exectuables (or compiled libraries) which contain or are +dynamically linked against adns must be GPL'd; likewise executable +programs (whether compiled or in an interpreted language) which +require utilities from adns to function properly must be GPL'd. + +So, you can distribute your non-GPL'd program source which needs adns +to compile (provided it's under a GPL-compatible licence), but people +who wish to distribute binaries must do so under the terms of the GNU +GPL. This may make sense for some GPL-avoiding free software +projects; people can still make proprietary programs from your code, +provided that they make some provision to replace adns with something +whose copyright allows proprietary versions. + +However, this doesn't make much sense for the authors of LGPL'd +libraries. All I can say to them is to ask which is more important: +that their library be well-constructed and use all the best technology +available as free software, or whether it is worth degrading quality +of their library in order to allow proprietary programs to use it ! + +To help the case of LGPL'd libraries for which adns is not a vital +component - for example, a library which provides access to other +libraries so that programs which use it need only use certain parts, +I have released adns.h (just the public header file) under the LGPL as +well as the GPL. See the copyright notice in adns.h for details. +Note that this will not help you if it adns is essential to the +functioning of your library, because all programs using your library +must link against both your library and adns and so must be GPL'd. + + +For some information and views from the Free Software Foundation on +free software licensing, visit: + + Various licenses and comments about them + at http://www.fsf.org/philosophy/license-list.html + + Why you shouldn't use the Library GPL for your next library + at http://www.fsf.org/philosophy/why-not-lgpl.html + + +3. GPL-incompatible free software licences +------------------------------------------ + +Regrettably, there are a number of free software licences (and +semi-free licences) in existence which are not compatible with the +GPL. That is, they impose restrictions which are not present in the +GPL, and therefore distributing a whole work which contains both such +a program and a GPL'd program is not possible: either the combination +would have to be distributed under the GPL (violating the restrictions +made by the original author), or under the GPL-incompatible licence +(violating the GPL). + +I may be prepared to make exceptions for such a licence. Please +contact me at with the full text +of the GPL-incompatible licence. However, I would usually prefer it +if you could use a GPL-compatible licence for your project instead. + + +-- Ian Jackson 17.9.2000 + + +Local variables: +mode: text +End: Index: adns/INSTALL diff -u adns/INSTALL:1.10 adns/INSTALL:1.21 --- adns/INSTALL:1.10 Wed Aug 9 16:40:10 2000 +++ adns/INSTALL Sun Sep 17 03:05:53 2000 @@ -1,40 +1,80 @@ -INSTALLATION INSTRUCTIONS for ADNS +INSTALLATION INSTRUCTIONS for GNU ADNS 1. Read the security note below. 2. Standard GNU package build process: - $ ./configure + $ ./configure [--disable-dynamic] [--prefix=... ...] $ make # make install -Unfortunately, since this is a beta, there is no good documentation -yet. For now, use the comments in the public header file adns.h. +Unfortunately, there is no comprehensive documentation yet. For now, +use the comments in the public header file adns.h, and for the C +programs their usage messages. If you find this information +ambiguous, incomplete or wrong, please report it as a bug. + + +TESTED PLATFORMS + +The following platforms have been tested at at least some point and +should work - please report if they don't: + adns version OS + 1.0 Linux glibc 2.1 (actually tested on Debian 2.2) + 1.0 Solaris 2.6, 2.7, 2.8 [3] + 1.0 FreeBSD 3.2, 4.0 (no poll(2), so no adnsresfilter) +The following work, but only with --disable-dynamic: + 1.0 IRIX 6.5 *not* with GCC [1], [2] + 1.0 AIX 4.1.5 + 1.0 HP-UX 10.20, 11.00 +Later versions of the same OS should work too. Usually entries in +this table mean adns passes its own regression test, when compiled +with GCC, and appears to install and run correctly. If you have more +information for this table please let me know. + +Notes/known problems: + [1] IRIX 6.5 inet_ntoa seems to break with GCC. + [2] The SGI IRIX compiler produces many spurious warnings. + [3] Dynamically linked, needs some help to find libadns.so.1.0. + +The following platforms are known to be deficient and will not work: + Solaris 2.5 Lacks vsnprintf - install glibc ? + TruUnix64 (DEC UNIX 4.0f) Lacks vsnprintf - install glibc ? +Please don't report these problems unless you have a nice, +straightforward solution or workaround for them. (I don't consider +including a `vsnprintf' implementation nice, so don't send me one.) +PORTABILITY INFORMATION + You will find that adns requires a reasonably standard and up to date -system. +system. Systems which are neither GNU nor UNIX are not supported. -In particular, the build system assumes that you have ELF shared -libraries. If you don't then please don't send me patches to support -your kind of shared libraries, and don't send me patches to use -libtool. I'm not interested in supporting non-ELF shared libraries, -and I dislike libtool. If you do not have ELF shared libraries then -please use the --disable-shared configure option. +The build system assumes by default that you have ELF shared +libraries, and that the directory in which libadns.so.1 will be +installed is on your dynamic library search path. If your system +doesn't have ELF shared libraries then dynamic linking is not +supported by adns. Use the --disable-shared configure option. +Please don't send me patches to use libtool (which I dislike). + +Compilers other than GNU C should work, but are not well-tested. Feel +free to send me patches to improve the situation. However, the +Makefiles only know how to use GCC to make dynamic libraries. The adnsresfilter utility uses `tsearch' from the C library (a la SVID -and X/Open). If your C library doesn't have tsearch you will find -that configure arranges for adnsresfilter not to be built. To rectify -this, install a C library containing tsearch, such as the GNU C -library. It is best if tsearch uses an automatically-balancing tree -algorithm, like the glibc version does. Simple binary trees may -perform badly. +and X/Open). If you don't have tsearch configure will arranges for +adnsresfilter not to be built. To fix this, install a C library +containing tsearch, such as the GNU C library. It is best if tsearch +uses an automatically-balancing tree algorithm, like the glibc version +does. Simple binary trees may perform badly. + +If you change the m4 input files in regress/ you may need GNU m4. You will probably find that GNU Make is required. +Please do not report this as a bug; install GNU Make instead. SECURITY AND PERFORMANCE - AN IMPORTANT NOTE -adns is not a full-service resolver. It does no caching of responses +adns is not a `full-service resolver': it does no caching of responses at all, and has no defence against bad nameservers or fake packets which appear to come from your real nameservers. It relies on the full-service resolvers listed in resolv.conf to handle these tasks. @@ -61,7 +101,7 @@ adns is Copyright (C) 1997-2000 Ian Jackson - Copyright (C) 1999 Tony Finch [1] + Copyright (C) 1999-2000 Tony Finch [1] Copyright (C) 1991 Massachusetts Institute of Technology [2] adns is free software; you can redistribute it and/or modify it under @@ -79,10 +119,11 @@ above or write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -[1] Tony Finch holds the original copyright on - client/adnslogres.c and client/fanftest.c. +[1] Tony Finch holds the original copyright on client/adnslogres.c and + client/fanftest.c, and some modifications to those files. [2] MIT hold the original copyright on the included install-sh, which came via GNU autoconf. + # Local variables: # mode: text Index: adns/Makefile.in diff -u adns/Makefile.in:1.22 adns/Makefile.in:1.26 --- adns/Makefile.in:1.22 Wed Aug 9 16:55:49 2000 +++ adns/Makefile.in Sun Sep 17 15:10:57 2000 @@ -5,7 +5,7 @@ # # It is part of adns, which is # Copyright (C) 1997-2000 Ian Jackson -# Copyright (C) 1999 Tony Finch +# Copyright (C) 1999-2000 Tony Finch # # 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 @@ -21,7 +21,10 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -DISTVERSION= 0.9 +# Remember to change ADNS_VERSION_STRING in client/client.h too, and +# possibly library soname (MAJOR and MINOR in settings.make.in). +DISTVERSION= 1.0 + srcdir= @srcdir@ VPATH= @srcdir@ @@ -66,9 +69,8 @@ check: all $(MAKE) -C regress check -README README-update: - lynx -dump -number_links -cfg=/dev/null \ - http://www.chiark.greenend.org.uk/~ian/adns/ >README.tmp +README: README.html + lynx -dump -number_links -cfg=/dev/null ./README.html >README.tmp mv -f README.tmp README TAGS info dvi: Index: adns/README diff -u adns/README:1.8 adns/README:1.13 --- adns/README:1.8 Sun May 7 23:37:18 2000 +++ adns/README Sun Sep 17 15:09:22 2000 @@ -4,9 +4,13 @@ Advanced, easy to use, asynchronous-capable DNS client library and utilities. - adns is a resolver library for C (and C++) programs. In contrast with - the existing interfaces, gethostbyname et al and libresolv, it has the - following features: + adns is a resolver library for C (and C++) programs, and a collection + of useful DNS resolver utilities. + +C library + + In contrast with the standard interfaces, gethostbyname et al and + libresolv, it has the following features: * It is reasonably easy to use for simple programs which just want to translate names to addresses, look up MX records, etc. * It can be used in an asynchronous, non-blocking, manner. Many @@ -27,14 +31,16 @@ * Understands conventional resolv.conf, but this can overridden by environment variables. * Flexibility. For example, the application can tell adns to: ignore - environment variables (for setuid programs), disable sanity checks - eg to return arbitrary data, override or ignore resolv.conf in - favour of supplied configuration, etc. + environment variables (for setuid programs), disable hostname + syntax sanity checks to return arbitrary data, override or ignore + resolv.conf in favour of supplied configuration, etc. * Believed to be correct ! For example, will correctly back off to TCP in case of long replies or queries, or to other nameservers if several are available. It has sensible handling of bad responses etc. +DNS utility programs + adns also comes with a number of utility programs for use from the command line and in scripts: * adnslogres is a much faster version of Apache's logresolv program. @@ -43,34 +49,18 @@ delaying the output. For example, you can usefully pipe the output of netstat -n, tcpdump -ln, and the like, into it. * adnshost is a general-purpose DNS lookup utility which can be used - easily in shell scripts to do simple lookups. In a more advanced - mode it can be used as a general-purpose DNS helper program for - scripting languages which can invoke and communicate with - subprocesses. + easily in from the command line and from shell scripts to do + simple lookups. In a more advanced mode it can be used as a + general-purpose DNS helper program for scripting languages which + can invoke and communicate with subprocesses. See the [1]adnshost + usage message for a summary of its capabilities. -Forthcoming: - - A native Perl interface is in the works, thanks to Tony Finch. - - I hope that future versions may also have the following features: - * The library should be useable by threads in a multithreaded - program in a natural way. It should multiplex many threads' - queries through a single query socket. - * IPv6 support. - * Some kind of awareness of DNSSEC. - * Possibly some very limited caching behaviour. - - (Technical note: adns requires a real nameserver like [1]BIND or - [2]Dents running on the same system or a nearby one, which must be - willing to provide `recursive service'. I.e., adns is a `stub - resolver'. All properly configured UN*X and GNU systems will already - have such nameserver(s); they are usually listed in /etc/resolv.conf.) - Documentation I'm afraid there is no manual yet. However, competent C programmers - should be able to use the library based on the [3]commented adns.h - header file. + should be able to use the library based on the [2]commented adns.h + header file, and the usage messages for the programs should be + sufficient. Feedback @@ -81,39 +71,47 @@ bug reports, there; otherwise send mail to adns-bugreports@chiark.greenend.org.uk. If you'd prefer that your message wasn't forwarded to the adns-bugreports list, send it to - adns-maint@chiark.greendend.org.uk. + adns-maint@chiark.greenend.org.uk. Mailinglists I have set up mailinglists adns-announce and adns-discuss. The announcements list is moderated and will contain only announcements of - important bugs, new versions, &c. The bug reports address mentioned + important bugs, new versions, etc. The bug reports address mentioned above is also a mailing list; feel free to subscribe to it. - There are [4]archives and subscription web pages, or you can subscribe + There are [3]archives and subscription web pages, or you can subscribe by sending mail containing the word `subscribe' to adns-announce-REQUEST@chiark.greenend.org.uk or adns-discuss-REQUEST@chiark.greenend.org.uk. Download - Available for download from [5]chiark.greenend.org.uk are: - * The [6]current beta version as a gzipped tarfile. - * [7]adns.h API header file with comments (currently there is no - manual, sorry). + Available for download from [4]chiark.greenend.org.uk are: + * The [5]current release as a gzipped tarfile. + * [6]adns.h API header file with comments, and [7]usage message for + adnshost (currently there is no manual, sorry). * All versions released so far are also available via [8]anonymous - FTP. + FTP and [9]HTTP, * A mirror of my CVS repository is available via rsync from rsync.chiark.greenend.org.uk::ftp/users/ian/cvs-pub/adns (use FTP - first to find your way around), or via [9]cvsweb. + first to find your way around), or via [10]cvsweb. - adns is also available from the [10]GNU Project FTP servers and their - [11]mirrors. + adns is also available from the [11]GNU Project FTP servers and their + [12]mirrors. + +Technical note + + adns requires a real nameserver like [13]BIND or [14]Dents running on + the same system or a nearby one, which must be willing to provide + `recursive service'. I.e., adns is a `stub resolver'. All properly + configured UN*X and GNU systems will already have such nameserver(s); + they are usually listed in /etc/resolv.conf. Copyright and licensing - adns is Copyright 1997-2000 Ian Jackson, Copyright 1999 Tony Finch, - and Copyright (C) 1991 Massachusetts Institute of Technology. + adns is Copyright 1997-2000 Ian Jackson, Copyright 1999-2000 Tony + Finch, and Copyright (C) 1991 Massachusetts Institute of Technology. adns is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free @@ -123,44 +121,47 @@ This program and documentation is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. See the - [12]GNU General Public License for more details. + [15]GNU General Public License for more details. You should have received a copy of the GNU General Public License along with adns, or one should be available above; if not, write to - the [13]Free Software Foundation, 59 Temple Place - Suite 330, Boston, + the [16]Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA, or email adns-maint@chiark.greenend.org.uk. _________________________________________________________________ - [14]Ian Jackson / [15]adns-maint@chiark.greenend.org.uk; more [16]free + [17]Ian Jackson / [18]adns-maint@chiark.greenend.org.uk; more [19]free software by me. - [17]GNU home page; [18]chiark home page; [19]site or mirror home page + [20]GNU home page; [21]chiark home page; [22]site or mirror home page This web page is Copyright (C)1996-2000 Ian Jackson. See the - [20]Copyright/acknowledgements. + [23]Copyright/acknowledgements. - Use any browser - [21]Campaign for a non-browser-specific WWW + Use any browser - [24]Campaign for a non-browser-specific WWW References - 1. http://www.isc.org/view.cgi?/products/BIND/index.phtml - 2. http://www.dents.org/ - 3. http://www.chiark.greenend.org.uk/~ian/adns/adns.h.txt - 4. http://www.chiark.greenend.org.uk/mailman/listinfo - 5. http://www.chiark.greenend.org.uk/~ian/adns/ - 6. http://www.chiark.greenend.org.uk/~ian/adns/adns.tar.gz - 7. http://www.chiark.greenend.org.uk/~ian/adns/adns.h.txt + 1. http://www.chiark.greenend.org.uk/~ian/adns/adnshost.txt + 2. http://www.chiark.greenend.org.uk/~ian/adns/adns.h.txt + 3. http://www.chiark.greenend.org.uk/mailman/listinfo + 4. http://www.chiark.greenend.org.uk/~ian/adns/ + 5. http://www.chiark.greenend.org.uk/~ian/adns/adns.tar.gz + 6. http://www.chiark.greenend.org.uk/~ian/adns/adns.h.txt + 7. http://www.chiark.greenend.org.uk/~ian/adns/adnshost.txt 8. ftp://ftp.chiark.greenend.org.uk/users/ian/adns/ - 9. http://www.chiark.greenend.org.uk/ucgi/~ijackson/cvsweb/adns/ - 10. http://www.gnu.org/ - 11. http://www.gnu.org/order/ftp.html - 12. http://www.chiark.greenend.org.uk/~ian/COPYING.txt - 13. http://www.fsf.org/ - 14. http://www.chiark.greenend.org.uk/ - 15. mailto:adns-maint@chiark.greenend.org.uk - 16. http://www.chiark.greenend.org.uk/~ian/software/ - 17. http://www.gnu.org/ - 18. http://www.chiark.greenend.org.uk/ - 19. http://www.chiark.greenend.org.uk/ - 20. http://www.chiark.greenend.org.uk/~ian/sw-www-copy.html - 21. http://www.anybrowser.org/campaign/ + 9. http://www.chiark.greenend.org.uk/~ian/adns/ftp/ + 10. http://www.chiark.greenend.org.uk/ucgi/~ijackson/cvsweb/adns/ + 11. http://www.gnu.org/ + 12. http://www.gnu.org/order/ftp.html + 13. http://www.isc.org/view.cgi?/products/BIND/index.phtml + 14. http://www.dents.org/ + 15. http://www.chiark.greenend.org.uk/~ian/COPYING.txt + 16. http://www.fsf.org/ + 17. http://www.chiark.greenend.org.uk/ + 18. mailto:adns-maint@chiark.greenend.org.uk + 19. http://www.chiark.greenend.org.uk/~ian/software/ + 20. http://www.gnu.org/ + 21. http://www.chiark.greenend.org.uk/ + 22. file://localhost/ + 23. http://www.chiark.greenend.org.uk/~ian/sw-www-copy.html + 24. http://www.anybrowser.org/campaign/ Index: adns/README.html diff -u /dev/null adns/README.html:1.5 --- /dev/null Sun Sep 17 15:32:48 2000 +++ adns/README.html Sun Sep 17 15:09:22 2000 @@ -0,0 +1,222 @@ + + +adns - advanced, alternative, asynchronous resolver + + + +

GNU adns

+ +Advanced, easy to use, asynchronous-capable DNS client +library and utilities. + + + + + + + + + + +

+ +adns is a resolver library for C (and C++) programs, and a collection +of useful DNS resolver utilities. + + +

C library

+ +In contrast with the standard interfaces, gethostbyname et al and +libresolv, it has the following features: + +
    + +
  • It is reasonably easy to use for simple programs which just want +to translate names to addresses, look up MX records, etc. + +
  • It can be used in an asynchronous, non-blocking, manner. Many +queries can be handled simultaneously. + +
  • Responses are decoded automatically into a natural representation +for a C program - there is no need to deal with DNS packet formats. + +
  • Sanity checking (eg, name syntax checking, reverse/forward +correspondence, CNAME pointing to CNAME) is performed automatically. + +
  • Time-to-live, CNAME and other similar information is returned in +an easy-to-use form, without getting in the way. + +
  • There is no global state in the library; resolver state is an +opaque data structure which the client creates explicitly. A program +can have several instances of the resolver. + +
  • Errors are reported to the application in a way that distinguishes +the various causes of failure properly. + +
  • Understands conventional resolv.conf, but this can overridden by +environment variables. + +
  • Flexibility. For example, the application can tell adns to: +ignore environment variables (for setuid programs), disable hostname +syntax sanity checks to return arbitrary data, override or ignore +resolv.conf in favour of supplied configuration, etc. + +
  • Believed to be correct ! For example, will correctly back off to +TCP in case of long replies or queries, or to other nameservers if +several are available. It has sensible handling of bad responses etc. + +
+ +

DNS utility programs

+ +adns also comes with a number of utility programs for use from the +command line and in scripts: + +
    + +
  • adnslogres is a much faster version of Apache's +logresolv program. + +
  • adnsresfilter is a filter which copies its input to +its output, replacing IP addresses by the corresponding names, without +unduly delaying the output. For example, you can usefully pipe the +output of netstat -n, tcpdump -ln, and the like, into it. + +
  • adnshost is a general-purpose DNS lookup utility +which can be used easily in from the command line and from shell +scripts to do simple lookups. In a more advanced mode it can be used +as a general-purpose DNS helper program for scripting languages which +can invoke and communicate with subprocesses. See the +adnshost +usage message for a summary of its capabilities. + +
+ +

Documentation

+ +I'm afraid there is no manual yet. However, competent C programmers +should be able to use the library based on the +commented +adns.h header file, and the usage messages for the programs should +be sufficient. + +

Feedback

+ +I'd be pleased if you would let me know if you're using my library in +your project, and what you think of it. + +

+ +If you are subscribed to adns-discuss please send +feedback, including bug reports, there; otherwise send mail to +adns-bugreports@chiark.greenend.org.uk. If you'd prefer +that your message wasn't forwarded to the adns-bugreports +list, send it to adns-maint@chiark.greenend.org.uk. + +

Mailinglists

+ +I have set up mailinglists adns-announce and +adns-discuss. The announcements list is moderated and +will contain only announcements of important bugs, new versions, etc. +The bug reports address mentioned above is also a mailing list; feel +free to subscribe to it. + +

+ +There are +archives +and subscription web pages, or you can subscribe by sending mail +containing the word `subscribe' to +adns-announce-REQUEST@chiark.greenend.org.uk or +adns-discuss-REQUEST@chiark.greenend.org.uk. + +

Download

+ +Available for download from +chiark.greenend.org.uk +are: +
    +
  • The current + release as a gzipped tarfile. +
  • adns.h + API header file with comments, and + usage + message for adnshost (currently there is no manual, sorry). +
  • All versions released so far are also available via + anonymous + FTP and HTTP, +
  • A mirror of my CVS repository is available via rsync from + rsync.chiark.greenend.org.uk::ftp/users/ian/cvs-pub/adns + (use FTP first to find your way around), or via + cvsweb. +
+ +adns is also available from the +GNU Project FTP servers and their +mirrors. + +

Technical note

+ +adns requires a real nameserver like +BIND +or +Dents running on +the same system or a nearby one, which must be willing to provide +`recursive service'. I.e., adns is a `stub resolver'. All properly +configured UN*X and GNU systems will already have such nameserver(s); +they are usually listed in /etc/resolv.conf. + +

Copyright and licensing

+ +adns is Copyright 1997-2000 Ian Jackson, Copyright +1999-2000 Tony Finch, and Copyright (C) 1991 Massachusetts Institute +of Technology. + +

+ +adns is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or (at +your option) any later version. + +

+ +This program and documentation is distributed in the hope that it will +be useful, but without any warranty; without even the implied +warranty of merchantability or fitness for a particular +purpose. See the +GNU +General Public License for more details. + +

+ +You should have received a copy of the GNU General Public License +along with adns, or one should be available above; if not, +write to the +Free Software Foundation, +59 Temple Place - Suite 330, Boston, MA 02111-1307, USA, +or email adns-maint@chiark.greenend.org.uk. + +

+ +


+Ian Jackson / +adns-maint@chiark.greenend.org.uk; +more free +software by me. +

+ +GNU home page; +chiark home page; +site or mirror home page +

+ +This web page is Copyright (C)1996-2000 Ian Jackson. See the +Copyright/acknowledgements. +

+ +Use any browser - +Campaign for a non-browser-specific WWW + + + Index: adns/TODO diff -u adns/TODO:1.10 adns/TODO:1.11 --- adns/TODO:1.10 Wed Jun 28 00:16:02 2000 +++ adns/TODO Sun Sep 17 01:24:24 2000 @@ -4,7 +4,8 @@ * `fake' forward queries (allow nnn.nnn.nnn.nnn -> A) * DNSSEC compatibility - be able to retreive KEY and SIG RRs * DNSSEC minimum functionality - ignore Additional when AD set. -* DNSSEC functionality - provide security ? -* Test cancellation in regression tests. * IPv6 name<->address translation - but which version ?? * IPv6 transport. +* Threadsafe version/mode. +* Caching in the library. +* SRV RRs. Index: adns/acconfig.h diff -u adns/acconfig.h:1.6 adns/acconfig.h:1.8 --- adns/acconfig.h:1.6 Sun May 7 23:37:18 2000 +++ adns/acconfig.h Sun Sep 17 01:24:24 2000 @@ -4,11 +4,11 @@ */ /* * This file is - * Copyright (C) 1997-1999 Ian Jackson + * Copyright (C) 1997-2000 Ian Jackson * * It is part of adns, which is * Copyright (C) 1997-2000 Ian Jackson - * Copyright (C) 1999 Tony Finch + * Copyright (C) 1999-2000 Tony Finch * * 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 @@ -25,6 +25,9 @@ * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/* Define if inline functions a la GCC are available. */ +#undef HAVE_INLINE + /* Define if function attributes a la GCC 2.5 and higher are available. */ #undef HAVE_GNUC25_ATTRIB @@ -44,6 +47,10 @@ /* Use the definitions: */ +#ifndef HAVE_INLINE +#define inline +#endif + #ifdef HAVE_POLL #include #else @@ -106,4 +113,8 @@ #ifdef HAVEUSE_RPCTYPES_H #include +#endif + +#ifdef HAVE_SYS_SELECT_H +#include #endif Index: adns/aclocal.m4 diff -u adns/aclocal.m4:1.3 adns/aclocal.m4:1.4 --- adns/aclocal.m4:1.3 Sun Oct 10 14:16:23 1999 +++ adns/aclocal.m4 Sun Sep 17 01:24:24 2000 @@ -5,7 +5,7 @@ # # It is part of adns, which is # Copyright (C) 1997-1999 Ian Jackson -# Copyright (C) 1999 Tony Finch +# Copyright (C) 1999-2000 Tony Finch # # This file is part of adns, which is Copyright (C) 1997-1999 Ian Jackson # Index: adns/changelog diff -u adns/changelog:1.116 adns/changelog:1.139 --- adns/changelog:1.116 Wed Aug 9 16:59:58 2000 +++ adns/changelog Sun Sep 17 15:16:22 2000 @@ -1,4 +1,44 @@ -adns (0.9) unstable; urgency=high +adns (1.0); urgency=medium + + Bugfixes: + * Treat 8-bit characters in email addrs as RFC822 `special' (=> quote). + * Fix incorrect `compressed datagram contains loop' error. + * Actually compile shared libraries by default ! + * Fix adnsresfilter usage message to include correct default timeout. + + General improvements: + * adnshost, adnslogres, adnsresfilter have options for config override. + * adnsresfilter has --debug option. + * Improvements to adnslogres (incl. new -c option) from Tony Finch. + * adnslogres has --help option, all utilities support --version. + * Documentation improved somewhat, including new GPL-vs-LGPL file. + + Changes for non-BETA release: + * Change shared library soname to 1.0. + * Do not install adnstest test utility. + + Regression test improvements: + * Tests now include adnshost, adnslogres and adnsresfilter. + * Test cancellation both before and after query completion. + + Portability fixes and cleanups: + * adnstest: setvbuf(stdout,...) before we do first output. + * Cope with compilers that don't do `inline'. + * Add and fix various missing system #includes. + * Find install-sh properly when we need to use it, and chmod it +x. + * Do not use variadic macro, use stdarg instead (adnslogres.c). + * Regression tests work even if some syscalls are already macros. + * #include "config.h" before "adns.h". + * Cast a sizeof(...) in src/event.c to unsigned long before printing. + * Add pre-generated versions of m4-generated files in regress/. + * Kill bogus warning, adh-main.c: `arg2' might be used uninitialized ... + * Add extra {...} near adnslogres.c:167 to kill spurious warning. + * Use `printf' instead of `echo -n'. + * Add list of tested platforms in INSTALL file. + + -- Ian Jackson Sun, 17 Sep 2000 15:15:58 +0100 + +adns (0.9) BETA; urgency=high Bug fixes: * Don't make _processany always kill the TCP connection with the message Index: adns/configure diff -u adns/configure:1.12 adns/configure:1.13 --- adns/configure:1.12 Wed Aug 9 16:26:54 2000 +++ adns/configure Thu Sep 14 02:23:39 2000 @@ -1,7 +1,7 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.12 +# Generated automatically using autoconf version 2.13 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # # This configure script is free software; the Free Software Foundation @@ -52,6 +52,7 @@ # Initialize some other variables. subdirs= MFLAGS= MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} # Maximum number of lines to put in a shell here document. ac_max_here_lines=12 @@ -335,7 +336,7 @@ verbose=yes ;; -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.12" + echo "configure generated by autoconf version 2.13" exit 0 ;; -with-* | --with-*) @@ -505,9 +506,11 @@ # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cc_cross +ac_exeext= +ac_objext=o if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then @@ -523,8 +526,10 @@ + + echo $ac_n "checking whether you requested dynamic linking""... $ac_c" 1>&6 -echo "configure:528: checking whether you requested dynamic linking" >&5 +echo "configure:533: checking whether you requested dynamic linking" >&5 # Check whether --enable-dynamic or --disable-dynamic was given. if test "${enable_dynamic+set}" = set; then @@ -543,7 +548,7 @@ else - ENABLE_DYNAMIC=yes + ENABLE_DYNAMIC=elf echo "$ac_t""yes, by default" 1>&6 fi @@ -552,15 +557,16 @@ # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:556: checking for $ac_word" >&5 +echo "configure:561: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_CC="gcc" @@ -581,16 +587,17 @@ # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:585: checking for $ac_word" >&5 +echo "configure:591: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_prog_rejected=no - for ac_dir in $PATH; do + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then @@ -625,25 +632,61 @@ echo "$ac_t""no" 1>&6 fi + if test -z "$CC"; then + case "`uname -s`" in + *win32* | *WIN32*) + # Extract the first word of "cl", so it can be a program name with args. +set dummy cl; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:642: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="cl" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + ;; + esac + fi test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:633: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:674: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cc_cross -cat > conftest.$ac_ext < conftest.$ac_ext << EOF + +#line 685 "configure" #include "confdefs.h" + main(){return(0);} EOF -if { (eval echo configure:647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -657,18 +700,24 @@ ac_cv_prog_cc_works=no fi rm -fr conftest* +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:667: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:716: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:672: checking whether we are using GNU C" >&5 +echo "configure:721: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -677,7 +726,7 @@ yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:681: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:730: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -688,11 +737,15 @@ if test $ac_cv_prog_gcc = yes; then GCC=yes - ac_test_CFLAGS="${CFLAGS+set}" - ac_save_CFLAGS="$CFLAGS" - CFLAGS= - echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:696: checking whether ${CC-cc} accepts -g" >&5 +else + GCC= +fi + +ac_test_CFLAGS="${CFLAGS+set}" +ac_save_CFLAGS="$CFLAGS" +CFLAGS= +echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 +echo "configure:749: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -707,20 +760,24 @@ fi echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 - if test "$ac_test_CFLAGS" = set; then - CFLAGS="$ac_save_CFLAGS" - elif test $ac_cv_prog_cc_g = yes; then +if test "$ac_test_CFLAGS" = set; then + CFLAGS="$ac_save_CFLAGS" +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then CFLAGS="-g -O2" else - CFLAGS="-O2" + CFLAGS="-g" fi else - GCC= - test "${CFLAGS+set}" = set || CFLAGS="-g" + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:724: checking how to run the C preprocessor" >&5 +echo "configure:781: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -735,14 +792,14 @@ # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:745: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:802: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : else @@ -751,15 +808,32 @@ cat conftest.$ac_ext >&5 rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" + cat > conftest.$ac_ext < +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:819: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:762: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:836: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : else @@ -772,6 +846,8 @@ rm -f conftest* fi rm -f conftest* +fi +rm -f conftest* ac_cv_prog_CPP="$CPP" fi CPP="$ac_cv_prog_CPP" @@ -783,15 +859,16 @@ # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:787: checking for $ac_word" >&5 +echo "configure:863: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_RANLIB="ranlib" @@ -835,28 +912,30 @@ # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:843: checking for a BSD compatible install" >&5 +echo "configure:921: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" + IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" for ac_dir in $PATH; do # Account for people who put trailing slashes in PATH elements. case "$ac_dir/" in /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. - for ac_prog in ginstall installbsd scoinst install; do + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do if test -f $ac_dir/$ac_prog; then if test $ac_prog = install && grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. - # OSF/1 installbsd also uses dspmsg, but is usable. : else ac_cv_path_install="$ac_dir/$ac_prog -c" @@ -886,18 +965,20 @@ # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' + test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' for ac_func in poll do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:896: checking for $ac_func" >&5 +echo "configure:977: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -946,12 +1027,12 @@ echo $ac_n "checking for socket""... $ac_c" 1>&6 -echo "configure:950: checking for socket" >&5 +echo "configure:1031: checking for socket" >&5 if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_socket=yes" else @@ -993,7 +1074,7 @@ echo "$ac_t""no" 1>&6 echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 -echo "configure:997: checking for socket in -lsocket" >&5 +echo "configure:1078: checking for socket in -lsocket" >&5 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1001,7 +1082,7 @@ ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1048,12 +1129,12 @@ echo $ac_n "checking for inet_ntoa""... $ac_c" 1>&6 -echo "configure:1052: checking for inet_ntoa" >&5 +echo "configure:1133: checking for inet_ntoa" >&5 if eval "test \"`echo '$''{'ac_cv_func_inet_ntoa'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_inet_ntoa=yes" else @@ -1095,7 +1176,7 @@ echo "$ac_t""no" 1>&6 echo $ac_n "checking for inet_ntoa in -lnsl""... $ac_c" 1>&6 -echo "configure:1099: checking for inet_ntoa in -lnsl" >&5 +echo "configure:1180: checking for inet_ntoa in -lnsl" >&5 ac_lib_var=`echo nsl'_'inet_ntoa | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1103,7 +1184,7 @@ ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1152,12 +1233,12 @@ PROGS_IF_TSEARCH=adnsresfilter echo $ac_n "checking for tsearch""... $ac_c" 1>&6 -echo "configure:1156: checking for tsearch" >&5 +echo "configure:1237: checking for tsearch" >&5 if eval "test \"`echo '$''{'ac_cv_func_tsearch'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_tsearch=yes" else @@ -1207,13 +1288,13 @@ echo $ac_n "checking for INADDR_LOOPBACK""... $ac_c" 1>&6 -echo "configure:1211: checking for INADDR_LOOPBACK" >&5 +echo "configure:1292: checking for INADDR_LOOPBACK" >&5 if eval "test \"`echo '$''{'adns_cv_decl_inaddrloopback'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -1226,7 +1307,7 @@ ; return 0; } EOF -if { (eval echo configure:1230: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1311: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* adns_cv_decl_inaddrloopback=yes else @@ -1244,18 +1325,18 @@ echo "$ac_t""not in standard headers, urgh..." 1>&6 ac_safe=`echo "rpc/types.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for rpc/types.h""... $ac_c" 1>&6 -echo "configure:1248: checking for rpc/types.h" >&5 +echo "configure:1329: checking for rpc/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1258: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:1339: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" @@ -1287,12 +1368,12 @@ echo $ac_n "checking for inet_aton""... $ac_c" 1>&6 -echo "configure:1291: checking for inet_aton" >&5 +echo "configure:1372: checking for inet_aton" >&5 if eval "test \"`echo '$''{'ac_cv_func_inet_aton'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_inet_aton=yes" else @@ -1334,7 +1415,7 @@ echo "$ac_t""no" 1>&6 echo $ac_n "checking for inet_aton in -lresolv""... $ac_c" 1>&6 -echo "configure:1338: checking for inet_aton in -lresolv" >&5 +echo "configure:1419: checking for inet_aton in -lresolv" >&5 ac_lib_var=`echo resolv'_'inet_aton | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1342,7 +1423,7 @@ ac_save_LIBS="$LIBS" LIBS="-lresolv $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1385,22 +1466,63 @@ + echo $ac_n "checking inlines""... $ac_c" 1>&6 +echo "configure:1471: checking inlines" >&5 + if eval "test \"`echo '$''{'dpkg_cv_c_inline'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + dpkg_cv_c_inline=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + dpkg_cv_c_inline=no +fi +rm -f conftest* + +fi + + if test "x$dpkg_cv_c_inline" = xyes; then + true + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_INLINE 1 +EOF + + else + true + echo "$ac_t""no" 1>&6 + fi + + + echo $ac_n "checking __attribute__((,,))""... $ac_c" 1>&6 -echo "configure:1391: checking __attribute__((,,))" >&5 +echo "configure:1513: checking __attribute__((,,))" >&5 if eval "test \"`echo '$''{'adns_cv_c_attribute_supported'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1526: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* adns_cv_c_attribute_supported=yes else @@ -1422,20 +1544,20 @@ echo $ac_n "checking __attribute__((noreturn))""... $ac_c" 1>&6 -echo "configure:1426: checking __attribute__((noreturn))" >&5 +echo "configure:1548: checking __attribute__((noreturn))" >&5 if eval "test \"`echo '$''{'adns_cv_c_attribute_noreturn'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1561: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* adns_cv_c_attribute_noreturn=yes else @@ -1462,20 +1584,20 @@ echo $ac_n "checking __attribute__((const))""... $ac_c" 1>&6 -echo "configure:1466: checking __attribute__((const))" >&5 +echo "configure:1588: checking __attribute__((const))" >&5 if eval "test \"`echo '$''{'adns_cv_c_attribute_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1601: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* adns_cv_c_attribute_const=yes else @@ -1502,20 +1624,20 @@ echo $ac_n "checking __attribute__((format...))""... $ac_c" 1>&6 -echo "configure:1506: checking __attribute__((format...))" >&5 +echo "configure:1628: checking __attribute__((format...))" >&5 if eval "test \"`echo '$''{'adns_cv_attribute_format'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1641: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* adns_cv_attribute_format=yes else @@ -1546,6 +1668,46 @@ fi +for ac_hdr in sys/select.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:1676: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1686: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + @@ -1596,7 +1758,7 @@ # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. (set) 2>&1 | - case `(ac_space=' '; set) 2>&1` in + case `(ac_space=' '; set | grep ac_space) 2>&1` in *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote substitution # turns \\\\ into \\, and sed turns \\ into \). @@ -1663,7 +1825,7 @@ echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.12" + echo "$CONFIG_STATUS generated by autoconf version 2.13" exit 0 ;; -help | --help | --hel | --he | --h) echo "\$ac_cs_usage"; exit 0 ;; @@ -1685,9 +1847,11 @@ s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF $ac_vpsub $extrasub +s%@SHELL@%$SHELL%g s%@CFLAGS@%$CFLAGS%g s%@CPPFLAGS@%$CPPFLAGS%g s%@CXXFLAGS@%$CXXFLAGS%g +s%@FFLAGS@%$FFLAGS%g s%@DEFS@%$DEFS%g s%@LDFLAGS@%$LDFLAGS%g s%@LIBS@%$LIBS%g @@ -1711,6 +1875,7 @@ s%@CPP@%$CPP%g s%@RANLIB@%$RANLIB%g s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g +s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g s%@INSTALL_DATA@%$INSTALL_DATA%g s%@PROGS_HAVE_TSEARCH@%$PROGS_HAVE_TSEARCH%g s%@WARNS@%$WARNS%g Index: adns/configure.in diff -u adns/configure.in:1.15 adns/configure.in:1.17 --- adns/configure.in:1.15 Wed Aug 9 16:55:49 2000 +++ adns/configure.in Sun Sep 17 01:24:24 2000 @@ -5,7 +5,7 @@ # # It is part of adns, which is # Copyright (C) 1997-2000 Ian Jackson -# Copyright (C) 1999 Tony Finch +# Copyright (C) 1999-2000 Tony Finch # # 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 @@ -24,6 +24,21 @@ AC_INIT(src/adns.h) AC_CONFIG_HEADER(src/config.h) +dnl DPKG_CACHED_TRY_COMPILE(,,,,,) +define(DPKG_CACHED_TRY_COMPILE,[ + AC_MSG_CHECKING($1) + AC_CACHE_VAL($2,[ + AC_TRY_COMPILE([$3],[$4],[$2=yes],[$2=no]) + ]) + if test "x$$2" = xyes; then + true + $5 + else + true + $6 + fi +]) + AC_MSG_CHECKING(whether you requested dynamic linking) AC_SUBST(ENABLE_DYNAMIC) AC_ARG_ENABLE(dynamic, @@ -42,7 +57,7 @@ ;; esac ],[ - ENABLE_DYNAMIC=yes + ENABLE_DYNAMIC=elf AC_MSG_RESULT([yes, by default]) ]) @@ -91,7 +106,14 @@ AC_MSG_WARN([inet_aton is in libresolv, urgh. Must use -lresolv.]) ]) +DPKG_CACHED_TRY_COMPILE(inlines,dpkg_cv_c_inline,, + [} inline int foo (int x) {], + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_INLINE), + AC_MSG_RESULT(no)) + ADNS_C_GCCATTRIB +AC_CHECK_HEADERS(sys/select.h) AC_SUBST(WARNS) Index: adns/settings.make.in diff -u adns/settings.make.in:1.16 adns/settings.make.in:1.20 --- adns/settings.make.in:1.16 Wed Aug 9 16:55:49 2000 +++ adns/settings.make.in Sun Sep 17 02:01:11 2000 @@ -6,7 +6,7 @@ # # It is part of adns, which is # Copyright (C) 1997-2000 Ian Jackson -# Copyright (C) 1999 Tony Finch +# Copyright (C) 1999-2000 Tony Finch # # 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 @@ -22,8 +22,8 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -MAJOR= 0 -MINOR= 1 +MAJOR= 1 +MINOR= 0 SHLIBFILE= @SHLIBFILE@ SHLIBSONAME= @SHLIBSONAME@ SHLIBFORLINK= @SHLIBFORLINK@ @@ -52,7 +52,13 @@ lib_dir= $(exec_prefix)/lib include_dir= $(prefix)/include -INSTALL= @INSTALL@ +AC_INSTALL= @INSTALL@ +ifeq ($(AC_INSTALL),./install-sh -c) +INSTALL= $(srcdir)/../$(AC_INSTALL) +else +INSTALL= $(AC_INSTALL) +endif + INSTALL_PROGRAM= $(INSTALL) -m 755 $(INSTALL_PROGRAM_FLAGS) INSTALL_DATA= $(INSTALL) -m 644 @@ -64,7 +70,7 @@ distclean: clean rm -f $(TARGETS) *~ ./#*# core *.orig *.rej Makefile -distprep: $(AUTOCSRCS) +distprep: $(AUTOCSRCS) $(AUTOCHDRS) maintainer-clean: distclean - -rm -f $(AUTOCSRCS) + -rm -f $(AUTOCSRCS) $(AUTOCHDRS) Index: adns/client/Makefile.in diff -u adns/client/Makefile.in:1.23 adns/client/Makefile.in:1.25 --- adns/client/Makefile.in:1.23 Wed Aug 9 16:55:49 2000 +++ adns/client/Makefile.in Sun Sep 17 01:43:10 2000 @@ -5,7 +5,7 @@ # # It is part of adns, which is # Copyright (C) 1997-2000 Ian Jackson -# Copyright (C) 1999 Tony Finch +# Copyright (C) 1999-2000 Tony Finch # # 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 @@ -27,8 +27,8 @@ PROGS_SYSDEP= @PROGS_HAVE_TSEARCH@ ENABLE_DYNAMIC= @ENABLE_DYNAMIC@ -PROGRAMS= adnstest adnslogres adnshost $(PROGS_SYSDEP) -PROGRAMS_LOCAL= fanftest +PROGRAMS= adnslogres adnshost $(PROGS_SYSDEP) +PROGRAMS_LOCAL= fanftest adnstest PROGRAMS_ALL= $(PROGRAMS) $(PROGRAMS_LOCAL) STATIC_LIB= $(ADNSDIR)/libadns.a @@ -80,4 +80,3 @@ %_s: %.o $(STATIC_LIB) $(CC) $(LDFLAGS) $< $(STATIC_LIB) -o $@ $(LDLIBS) - Index: adns/client/adh-main.c diff -u adns/client/adh-main.c:1.11 adns/client/adh-main.c:1.14 --- adns/client/adh-main.c:1.11 Sun May 7 23:37:18 2000 +++ adns/client/adh-main.c Sun Sep 17 01:24:24 2000 @@ -9,7 +9,7 @@ * * It is part of adns, which is * Copyright (C) 1997-2000 Ian Jackson - * Copyright (C) 1999 Tony Finch + * Copyright (C) 1999-2000 Tony Finch * * 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 @@ -28,9 +28,22 @@ #include "adnshost.h" +int rcode; +const char *config_text; + +static int used, avail; +static char *buf; + +void quitnow(int rc) { + if (ads) adns_finish(ads); + free(buf); + free(ov_id); + exit(rc); +} + void sysfail(const char *what, int errnoval) { fprintf(stderr,"adnshost failed: %s: %s\n",what,strerror(errnoval)); - exit(10); + quitnow(10); } void usageerr(const char *fmt, ...) { @@ -40,7 +53,7 @@ vfprintf(stderr,fmt,al); va_end(al); putc('\n',stderr); - exit(11); + quitnow(11); } void outerr(void) { @@ -62,6 +75,10 @@ return p; } +void of_config(const struct optioninfo *oi, const char *arg, const char *arg2) { + config_text= arg; +} + void of_type(const struct optioninfo *oi, const char *arg, const char *arg2) { static const struct typename { adns_rrtype type; @@ -100,8 +117,6 @@ ov_type= tnp->type; } -int rcode; - static void process_optarg(const char *arg, const char *const **argv_p, const char *value) { @@ -125,7 +140,7 @@ } else if (oip->type == ot_funcarg2) { assert(argv_p); arg= *++(*argv_p); - if (arg) arg2= *++(*argv_p); + arg2= arg ? *++(*argv_p) : 0; if (!arg || !arg2) usageerr("option --%s requires two more arguments", oip->lopt); } else { @@ -164,9 +179,6 @@ } static void read_stdin(void) { - static int used, avail; - static char *buf; - int anydone, r; char *newline, *space; @@ -248,5 +260,5 @@ } x_quit: if (fclose(stdout)) outerr(); - exit(rcode); + quitnow(rcode); } Index: adns/client/adh-opts.c diff -u adns/client/adh-opts.c:1.12 adns/client/adh-opts.c:1.15 --- adns/client/adh-opts.c:1.12 Sun May 7 23:37:18 2000 +++ adns/client/adh-opts.c Sun Sep 17 15:09:02 2000 @@ -9,7 +9,7 @@ * * It is part of adns, which is * Copyright (C) 1997-2000 Ian Jackson - * Copyright (C) 1999 Tony Finch + * Copyright (C) 1999-2000 Tony Finch * * 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 @@ -62,6 +62,10 @@ "Vd", "debug", &ov_verbose, adns_if_debug }, { ot_desconly, "other global options:" }, + { ot_funcarg, "Configuration to use instead of /etc/resolv.conf", + 0, "config", 0,0, of_config, "" }, + { ot_func, "Print version number", + 0, "version", 0,0, of_version }, { ot_func, "Print usage information", 0, "help", 0,0, of_help }, @@ -267,10 +271,14 @@ if (ferror(stdout)) sysfail("write usage message",errno); } +void of_version(const struct optioninfo *oi, const char *arg, const char *arg2) { + VERSION_PRINT_QUIT("adnshost"); +} + void of_help(const struct optioninfo *oi, const char *arg, const char *arg2) { printusage(); if (fclose(stdout)) sysfail("finish writing output",errno); - exit(0); + quitnow(0); } typedef int comparer_type(const char **optp, const struct optioninfo *entry); Index: adns/client/adh-query.c diff -u adns/client/adh-query.c:1.13 adns/client/adh-query.c:1.15 --- adns/client/adh-query.c:1.13 Sun May 7 23:37:18 2000 +++ adns/client/adh-query.c Sun Sep 17 01:24:24 2000 @@ -9,7 +9,7 @@ * * It is part of adns, which is * Copyright (C) 1997-2000 Ian Jackson - * Copyright (C) 1999 Tony Finch + * Copyright (C) 1999-2000 Tony Finch * * 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 @@ -34,16 +34,21 @@ static unsigned long idcounter; void ensure_adns_init(void) { + adns_initflags initflags; int r; if (ads) return; if (signal(SIGPIPE,SIG_IGN) == SIG_ERR) sysfail("ignore SIGPIPE",errno); - r= adns_init(&ads, - adns_if_noautosys|adns_if_nosigpipe | - (ov_env ? 0 : adns_if_noenv) | - ov_verbose, - 0); + + initflags= adns_if_noautosys|adns_if_nosigpipe|ov_verbose; + if (!ov_env) initflags |= adns_if_noenv; + + if (config_text) { + r= adns_init_strcfg(&ads, initflags, stderr, config_text); + } else { + r= adns_init(&ads, initflags, 0); + } if (r) sysfail("adns_init",r); if (ov_format == fmt_default) @@ -143,6 +148,7 @@ static void dequeue_query(struct query_node *qun) { LIST_UNLINK(outstanding,qun); free(qun->id); + free(qun->owner); free(qun); } Index: adns/client/adnshost.h diff -u adns/client/adnshost.h:1.12 adns/client/adnshost.h:1.16 --- adns/client/adnshost.h:1.12 Sun May 7 23:37:18 2000 +++ adns/client/adnshost.h Sun Sep 17 15:09:02 2000 @@ -8,7 +8,7 @@ * * It is part of adns, which is * Copyright (C) 1997-2000 Ian Jackson - * Copyright (C) 1999 Tony Finch + * Copyright (C) 1999-2000 Tony Finch * * 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 @@ -36,6 +36,7 @@ #include #include #include +#include #include #include @@ -45,7 +46,12 @@ #include "config.h" #include "adns.h" #include "dlist.h" +#include "client.h" +#ifdef ADNS_REGRESS_TEST +# include "hredirect.h" +#endif + /* declarations related to option processing */ struct optioninfo; @@ -79,7 +85,8 @@ extern char *ov_id; extern struct perqueryflags_remember ov_pqfr; -extern optfunc of_help, of_type, of_ptr, of_reverse, of_asynch_id, of_cancel_id; +extern optfunc of_config, of_version, of_help, of_type, of_ptr, of_reverse; +extern optfunc of_asynch_id, of_cancel_id; const struct optioninfo *opt_findl(const char *opt); const struct optioninfo *opt_finds(const char **optp); @@ -111,5 +118,6 @@ char *xstrsave(const char *str); extern int rcode; +extern const char *config_text; /* 0 => use defaults */ #endif Index: adns/client/adnslogres.c diff -u adns/client/adnslogres.c:1.10 adns/client/adnslogres.c:1.20 --- adns/client/adnslogres.c:1.10 Tue Apr 11 22:15:39 2000 +++ adns/client/adnslogres.c Sun Sep 17 15:09:02 2000 @@ -4,12 +4,12 @@ */ /* * This file is - * Copyright (C) 1999 Tony Finch + * Copyright (C) 1999-2000 Tony Finch * Copyright (C) 1999-2000 Ian Jackson * * It is part of adns, which is * Copyright (C) 1997-2000 Ian Jackson - * Copyright (C) 1999 Tony Finch + * Copyright (C) 1999-2000 Tony Finch * * 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 @@ -31,7 +31,7 @@ */ static const char * const cvsid = - "$Id: adnslogres.c,v 1.10 2000/04/11 21:15:39 ian Exp $"; + "$Id: adnslogres.c,v 1.20 2000/09/17 14:09:02 ian Exp $"; #include #include @@ -42,11 +42,19 @@ #include #include #include +#include +#include "config.h" #include "adns.h" +#include "client.h" +#ifdef ADNS_REGRESS_TEST +# include "hredirect.h" +#endif + /* maximum number of concurrent DNS queries */ -#define MAXPENDING 1000 +#define MAXMAXPENDING 64000 +#define DEFMAXPENDING 2000 /* maximum length of a line */ #define MAXLINE 1024 @@ -55,14 +63,24 @@ #define OPT_DEBUG 1 #define OPT_POLL 2 -static const char *progname; +static const char *const progname= "adnslogres"; +static const char *config_text; -#define msg(fmt, args...) fprintf(stderr, "%s: " fmt "\n", progname, ##args) #define guard_null(str) ((str) ? (str) : "") #define sensible_ctype(type,ch) (type((unsigned char)(ch))) /* isfoo() functions from ctype.h can't safely be fed char - blech ! */ +static void msg(const char *fmt, ...) { + va_list al; + + fprintf(stderr, "%s: ", progname); + va_start(al,fmt); + vfprintf(stderr, fmt, al); + va_end(al); + fputc('\n',stderr); +} + static void aargh(const char *cause) { const char *why = strerror(errno); if (!why) why = "Unknown error"; @@ -146,69 +164,107 @@ return NULL; } -static void proclog(FILE *inf, FILE *outf, int opts) { +static void proclog(FILE *inf, FILE *outf, int maxpending, int opts) { int eof, err, len; adns_state adns; adns_answer *answer; logline *head, *tail, *line; + adns_initflags initflags; - errno= adns_init(&adns, (opts & OPT_DEBUG) ? adns_if_debug : 0, 0); + initflags= (opts & OPT_DEBUG) ? adns_if_debug : 0; + if (config_text) { + errno= adns_init_strcfg(&adns, initflags, stderr, config_text); + } else { + errno= adns_init(&adns, initflags, 0); + } if (errno) aargh("adns_init"); head= tail= readline(inf, adns, opts); len= 1; eof= 0; while (head) { - if (opts & OPT_DEBUG) - msg("%d in queue; checking %.*s", len, - head->rest-head->addr, guard_null(head->addr)); - if (eof || len > MAXPENDING) - if (opts & OPT_POLL) - err= adns_wait_poll(adns, &head->query, &answer, NULL); - else - err= adns_wait(adns, &head->query, &answer, NULL); - else - err= adns_check(adns, &head->query, &answer, NULL); - if (err != EAGAIN) { + while (head) { + if (opts & OPT_DEBUG) + msg("%d in queue; checking %.*s", len, + head->rest-head->addr, guard_null(head->addr)); + if (eof || len >= maxpending) { + if (opts & OPT_POLL) + err= adns_wait_poll(adns, &head->query, &answer, NULL); + else + err= adns_wait(adns, &head->query, &answer, NULL); + } else { + err= adns_check(adns, &head->query, &answer, NULL); + } + if (err == EAGAIN) break; + if (err) { + fprintf(stderr, "%s: adns_wait/check: %s", progname, strerror(err)); + exit(1); + } printline(outf, head->start, head->addr, head->rest, answer->status == adns_s_ok ? *answer->rrs.str : NULL); line= head; head= head->next; - free(line); free(answer); + free(line); + free(answer); len--; } if (!eof) { line= readline(inf, adns, opts); - if (!line) + if (line) { + if (!head) head= line; + else tail->next= line; + tail= line; len++; + } else { eof= 1; - else { - if (!head) - head= line; - else - tail->next= line; - tail= line; - len++; } } } adns_finish(adns); } +static void printhelp(FILE *file) { + fputs("usage: adnslogres [] []\n" + " adnslogres --version|--help\n" + "options: -c set max number of outstanding queries\n" + " -p use poll(2) instead of select(2)\n" + " -d turn on debugging\n" + " -C use instead of contents of resolv.conf\n", + stdout); +} + static void usage(void) { - fprintf(stderr, "usage: %s [-d] [-p] [logfile]\n", progname); + printhelp(stderr); exit(1); } int main(int argc, char *argv[]) { - int c, opts; + int c, opts, maxpending; + extern char *optarg; FILE *inf; - progname= strrchr(*argv, '/'); - if (progname) - progname++; - else - progname= *argv; - opts= 0; + if (argv[1] && !strncmp(argv[1],"--",2)) { + if (!strcmp(argv[1],"--help")) { + printhelp(stdout); + } else if (!strcmp(argv[1],"--version")) { + fputs(VERSION_MESSAGE("adnslogres"),stdout); + } else { + usage(); + } + if (ferror(stdout) || fclose(stdout)) { perror("stdout"); exit(1); } + exit(0); + } - while ((c= getopt(argc, argv, "dp")) != -1) + maxpending= DEFMAXPENDING; + opts= 0; + while ((c= getopt(argc, argv, "c:C:dp")) != -1) switch (c) { + case 'c': + maxpending= atoi(optarg); + if (maxpending < 1 || maxpending > MAXMAXPENDING) { + fprintf(stderr, "%s: unfeasible concurrency %d\n", progname, maxpending); + exit(1); + } + break; + case 'C': + config_text= optarg; + break; case 'd': opts|= OPT_DEBUG; break; @@ -233,7 +289,7 @@ if (!inf) aargh("couldn't open input"); - proclog(inf, stdout, opts); + proclog(inf, stdout, maxpending, opts); if (fclose(inf)) aargh("fclose input"); Index: adns/client/adnsresfilter.c diff -u adns/client/adnsresfilter.c:1.8 adns/client/adnsresfilter.c:1.15 --- adns/client/adnsresfilter.c:1.8 Sun May 21 19:34:18 2000 +++ adns/client/adnsresfilter.c Sun Sep 17 15:09:02 2000 @@ -4,11 +4,11 @@ */ /* * This file is - * Copyright (C) 1999 Ian Jackson + * Copyright (C) 1999-2000 Ian Jackson * * It is part of adns, which is * Copyright (C) 1997-2000 Ian Jackson - * Copyright (C) 1999 Tony Finch + * Copyright (C) 1999-2000 Tony Finch * * 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 @@ -33,12 +33,19 @@ #include #include -#include +#include +#include +#include -#include "adns.h" #include "config.h" +#include "adns.h" #include "dlist.h" #include "tvarith.h" +#include "client.h" + +#ifdef ADNS_REGRESS_TEST +# include "hredirect.h" +#endif struct outqueuenode { struct outqueuenode *next, *back; @@ -52,6 +59,8 @@ static int bracket, forever, address; static unsigned long timeout= 1000; static adns_rrtype rrt= adns_r_ptr; +static adns_initflags initflags= 0; +static const char *config_text; static int outblocked, inputeof; static struct { struct outqueuenode *head, *tail; } outqueue; @@ -84,8 +93,7 @@ return 0; } -static void quit(int exitstatus) NONRETURNING; -static void quit(int exitstatus) { +void quitnow(int exitstatus) { nonblock(0,0); nonblock(1,0); exit(exitstatus); @@ -94,7 +102,7 @@ static void sysfail(const char *what) NONRETURNING; static void sysfail(const char *what) { fprintf(stderr,"adnsresfilter: system call failed: %s: %s\n",what,strerror(errno)); - quit(2); + quitnow(2); } static void *xmalloc(size_t sz) { @@ -108,28 +116,31 @@ static void usage(void) { if (printf("usage: adnsresfilter []\n" - " adnsresfilter -h|--help\n" + " adnsresfilter -h|--help | --version\n" "options: -t|--timeout \n" " -w|--wait (always wait for queries to time out or fail)\n" " -b|--brackets (require [...] around IP addresses)\n" " -a|--address (always include [address] in output)\n" " -u|--unchecked (do not forward map for checking)\n" + " --config (use this instead of resolv.conf)\n" + " --debug (turn on adns resolver debugging)\n" "Timeout is the maximum amount to delay any particular bit of output for.\n" - "Lookups will go on in the background. Default timeout = 100 (ms).\n") + "Lookups will go on in the background. Default timeout = 1000 (ms).\n") == EOF) outputerr(); + if (fflush(stdout)) sysfail("flush stdout"); } static void usageerr(const char *why) NONRETURNING; static void usageerr(const char *why) { fprintf(stderr,"adnsresfilter: bad usage: %s\n",why); usage(); - quit(1); + quitnow(1); } static void adnsfail(const char *what, int e) NONRETURNING; static void adnsfail(const char *what, int e) { fprintf(stderr,"adnsresfilter: adns call failed: %s: %s\n",what,strerror(e)); - quit(2); + quitnow(2); } static void settimeout(const char *arg) { @@ -145,48 +156,55 @@ while ((arg= *++argv)) { if (arg[0] != '-') usageerr("no non-option arguments are allowed"); if (arg[1] == '-') { - if (!strcmp(arg,"--brackets")) { - bracket= 1; - } else if (!strcmp(arg,"--unchecked")) { - rrt= adns_r_ptr_raw; + if (!strcmp(arg,"--timeout")) { + if (!(arg= *++argv)) usageerr("--timeout needs a value"); + settimeout(arg); + forever= 0; } else if (!strcmp(arg,"--wait")) { forever= 1; + } else if (!strcmp(arg,"--brackets")) { + bracket= 1; } else if (!strcmp(arg,"--address")) { address= 1; + } else if (!strcmp(arg,"--unchecked")) { + rrt= adns_r_ptr_raw; + } else if (!strcmp(arg,"--config")) { + if (!(arg= *++argv)) usageerr("--config needs a value"); + config_text= arg; + } else if (!strcmp(arg,"--debug")) { + initflags |= adns_if_debug; } else if (!strcmp(arg,"--help")) { - usage(); quit(0); - } else if (!strcmp(arg,"--timeout")) { - if (!(arg= *++argv)) usageerr("--timeout needs a value"); - settimeout(arg); - forever= 0; + usage(); quitnow(0); + } else if (!strcmp(arg,"--version")) { + VERSION_PRINT_QUIT("adnsresfilter"); quitnow(0); } else { usageerr("unknown long option"); } } else { while ((c= *++arg)) { switch (c) { - case 'b': - bracket= 1; - break; - case 'u': - rrt= adns_r_ptr_raw; + case 't': + if (*++arg) settimeout(arg); + else if ((arg= *++argv)) settimeout(arg); + else usageerr("-t needs a value"); + forever= 0; + arg= "\0"; break; case 'w': forever= 1; break; + case 'b': + bracket= 1; + break; case 'a': address= 1; break; + case 'u': + rrt= adns_r_ptr_raw; + break; case 'h': usage(); - quit(0); - case 't': - if (*++arg) settimeout(arg); - else if ((arg= *++argv)) settimeout(arg); - else usageerr("-t needs a value"); - forever= 0; - arg= "\0"; - break; + quitnow(0); default: usageerr("unknown short option"); } @@ -378,7 +396,12 @@ if (nonblock(1,1)) sysfail("set stdout to nonblocking mode"); memset(&sa,0,sizeof(sa)); sa.sin_family= AF_INET; - r= adns_init(&ads,0,0); if (r) adnsfail("init",r); + if (config_text) { + r= adns_init_strcfg(&ads,initflags,stderr,config_text); + } else { + r= adns_init(&ads,initflags,0); + } + if (r) adnsfail("init",r); cbyte= -1; inbyte= -1; inbuf= 0; @@ -447,7 +470,6 @@ } if (nonblock(0,0)) sysfail("un-nonblock stdin"); if (nonblock(1,0)) sysfail("un-nonblock stdout"); - if (ferror(stdin) || fclose(stdin)) sysfail("read stdin"); - if (fclose(stdout)) sysfail("close stdout"); + adns_finish(ads); exit(0); } Index: adns/client/adnstest.c diff -u adns/client/adnstest.c:1.41 adns/client/adnstest.c:1.44 --- adns/client/adnstest.c:1.41 Wed Jun 28 00:01:42 2000 +++ adns/client/adnstest.c Sun Sep 17 01:24:24 2000 @@ -4,11 +4,11 @@ */ /* * This file is - * Copyright (C) 1997-1999 Ian Jackson + * Copyright (C) 1997-2000 Ian Jackson * * It is part of adns, which is * Copyright (C) 1997-2000 Ian Jackson - * Copyright (C) 1999 Tony Finch + * Copyright (C) 1999-2000 Tony Finch * * 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 @@ -33,12 +33,11 @@ #include #include -#include "adns.h" - #include "config.h" +#include "adns.h" -#ifndef OUTPUTSTREAM -# define OUTPUTSTREAM stdout +#ifdef ADNS_REGRESS_TEST +# include "hredirect.h" #endif struct myctx { @@ -220,6 +219,8 @@ mcs= malloc(tc ? sizeof(*mcs)*qc*tc : 1); if (!mcs) { perror("malloc mcs"); quitnow(3); } + setvbuf(stdout,0,_IOLBF,0); + if (initstring) { r= adns_init_strcfg(&ads, (adns_if_debug|adns_if_noautosys|adns_if_checkc_freq) @@ -232,8 +233,6 @@ } if (r) failure_errno("init",r); - setvbuf(stdout,0,_IOLBF,0); - for (qi=0; qi + * + * It is part of adns, which is + * Copyright (C) 1997-2000 Ian Jackson + * Copyright (C) 1999-2000 Tony Finch + * + * 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 + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * 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. + */ + +#ifndef CLIENT_H_INCLUDED +#define CLIENT_H_INCLUDED + +#define ADNS_VERSION_STRING "1.0" + +#define COPYRIGHT_MESSAGE \ + "Copyright (C) 1997-2000 Ian Jackson \n" \ + "Copyright (C) 1999-2000 Tony Finch \n" \ + "This is free software; see the source for copying conditions. There is NO\n" \ + "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n" + +#define VERSION_MESSAGE(program) \ + program " (GNU adns) " ADNS_VERSION_STRING "\n\n" COPYRIGHT_MESSAGE + +#define VERSION_PRINT_QUIT(program) \ + if (fputs(VERSION_MESSAGE(program),stdout) == EOF || \ + fclose(stdout)) { \ + perror(program ": write version message"); \ + quitnow(-1); \ + } \ + quitnow(0); + +void quitnow(int rc) NONRETURNING; + +#endif Index: adns/client/fanftest.c diff -u adns/client/fanftest.c:1.3 adns/client/fanftest.c:1.5 --- adns/client/fanftest.c:1.3 Sun May 7 23:37:18 2000 +++ adns/client/fanftest.c Sun Sep 17 01:24:24 2000 @@ -5,11 +5,11 @@ /* * This file is * Copyright (C) 1999 Tony Finch - * Copyright (C) 1999 Ian Jackson + * Copyright (C) 1999-2000 Ian Jackson * * It is part of adns, which is * Copyright (C) 1997-2000 Ian Jackson - * Copyright (C) 1999 Tony Finch + * Copyright (C) 1999-2000 Tony Finch * * 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 @@ -30,7 +30,7 @@ */ static const char * const cvsid = - "$Id: fanftest.c,v 1.3 2000/05/07 22:37:18 ian Exp $"; + "$Id: fanftest.c,v 1.5 2000/09/17 00:24:24 ian Exp $"; #include #include @@ -40,6 +40,7 @@ #include #include +#include "config.h" #include "adns.h" static const char *progname; Index: adns/dynamic/Makefile.in diff -u adns/dynamic/Makefile.in:1.11 adns/dynamic/Makefile.in:1.12 --- adns/dynamic/Makefile.in:1.11 Sun May 7 23:37:18 2000 +++ adns/dynamic/Makefile.in Sun Sep 17 01:24:24 2000 @@ -5,7 +5,7 @@ # # It is part of adns, which is # Copyright (C) 1997-2000 Ian Jackson -# Copyright (C) 1999 Tony Finch +# Copyright (C) 1999-2000 Tony Finch # # 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 Index: adns/regress/.cvsignore diff -u adns/regress/.cvsignore:1.7 adns/regress/.cvsignore:1.9 --- adns/regress/.cvsignore:1.7 Sun Mar 28 21:17:56 1999 +++ adns/regress/.cvsignore Sat Sep 16 23:12:31 2000 @@ -1,8 +1,6 @@ Makefile -harness.h -hcommon.c -hrecord -hrecord.c -hplayback -hplayback.c +*_record +*_playback output-*.* +pipe.out +pipe.err Index: adns/regress/Makefile.in diff -u adns/regress/Makefile.in:1.13 adns/regress/Makefile.in:1.19 --- adns/regress/Makefile.in:1.13 Sun May 7 23:37:18 2000 +++ adns/regress/Makefile.in Sun Sep 17 15:16:22 2000 @@ -1,11 +1,11 @@ # regress/Makefile - regression test Makefile # # This file is -# Copyright (C) 1997-1999 Ian Jackson +# Copyright (C) 1997-2000 Ian Jackson # # It is part of adns, which is # Copyright (C) 1997-2000 Ian Jackson -# Copyright (C) 1999 Tony Finch +# Copyright (C) 1999-2000 Tony Finch # # 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 @@ -23,41 +23,52 @@ srcdir= @srcdir@ VPATH= @srcdir@ + +PROGS_SYSDEP= @PROGS_HAVE_TSEARCH@ -TARGETS= hplayback hrecord -AUTOCSRCS= harness.h hrecord.c hplayback.c hcommon.c +CLIENTS= adnstest adnshost adnslogres $(PROGS_SYSDEP) +AUTOCHDRS= harness.h hsyscalls.h hredirect.h +AUTOCSRCS= hrecord.c hplayback.c hcommon.c include $(srcdir)/../settings.make include $(srcdir)/../src/adns.make DIRCFLAGS= -I$(srcdir)/../src + +HCPPFLAGS= -DADNS_REGRESS_TEST -I. -HCPPFLAGS:= $(foreach F, \ - gettimeofday select poll \ - socket fcntl connect close \ - sendto recvfrom read write writev \ - malloc realloc free exit \ -, -D$F=H$F) +REDIRLIBOBJS= $(addsuffix _d.o, $(basename $(LIBOBJS))) +HARNLOBJS= hcommon.o $(REDIRLIBOBJS) +TARGETS= $(addsuffix _record, $(CLIENTS)) $(addsuffix _playback, $(CLIENTS)) +ADH_OBJS= adh-main_c.o adh-opts_c.o adh-query_c.o +ALL_OBJS= $(HARNLOBJS) dtest.o hrecord.o hplayback.o -HARNLOBJS= $(addsuffix _d.o, $(basename $(LIBOBJS))) -ALLOBJS= $(HARNLOBJS) dtest.o hrecord.o hplayback.o hcommon.o +.PRECIOUS: $(AUTOCSRCS) $(AUTOCHDRS) -.PRECIOUS: $(AUTOCSRCS) +all install uninstall: $(TARGETS) check: $(TARGETS) ./checkall + +LINK_CMD= $(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@ + +%_record: %_c.o hrecord.o $(HARNLOBJS) + $(LINK_CMD) -all install uninstall: +%_playback: %_c.o hplayback.o $(HARNLOBJS) + $(LINK_CMD) -hrecord: adnstest_c.o hrecord.o hcommon.o $(HARNLOBJS) -hplayback: adnstest_c.o hplayback.o hcommon.o $(HARNLOBJS) +adnshost_%: $(ADH_OBJS) h%.o $(HARNLOBJS) + $(LINK_CMD) -%_d.o: $(srcdir)/../src/%.c - $(CC) $(HCPPFLAGS) -c -g -o $@ $< +%_d.o: $(srcdir)/../src/%.c hredirect.h + $(CC) $(CFLAGS) $(HCPPFLAGS) -c -g -o $@ $< -%_c.o: $(srcdir)/../client/%.c - $(CC) $(HCPPFLAGS) -I $(srcdir)/../src -c -g -o $@ $< +%_c.o: $(srcdir)/../client/%.c hredirect.h + $(CC) $(CFLAGS) $(HCPPFLAGS) -I $(srcdir)/../src -c -g -o $@ $< -$(ALLOBJS): $(srcdir)/../src/adns.h $(srcdir)/../src/internal.h harness.h +$(ALL_OBJS): $(srcdir)/../src/adns.h $(srcdir)/../src/internal.h +$(ALL_OBJS): harness.h hsyscalls.h +$(ADH_OBJS): $(srcdir)/../client/adnshost.h %:: %.m4 hmacros.i4 hsyscalls.i4 $(M4) -P $< >$@-a.new Index: adns/regress/addcases diff -u adns/regress/addcases:1.5 adns/regress/addcases:1.6 --- adns/regress/addcases:1.5 Sun May 7 23:37:18 2000 +++ adns/regress/addcases Sun Sep 17 01:24:24 2000 @@ -6,7 +6,7 @@ # # It is part of adns, which is # Copyright (C) 1997-2000 Ian Jackson -# Copyright (C) 1999 Tony Finch +# Copyright (C) 1999-2000 Tony Finch # # 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 Index: adns/regress/adnshost-xinitflags.text diff -u /dev/null adns/regress/adnshost-xinitflags.text:1.2 --- /dev/null Sun Sep 17 15:32:49 2000 +++ adns/regress/adnshost-xinitflags.text Sat Sep 16 20:11:43 2000 @@ -0,0 +1 @@ +--debug --config Index: adns/regress/adnslogres-xinitflags.text diff -u /dev/null adns/regress/adnslogres-xinitflags.text:1.1 --- /dev/null Sun Sep 17 15:32:49 2000 +++ adns/regress/adnslogres-xinitflags.text Sat Sep 16 22:48:13 2000 @@ -0,0 +1 @@ +-d -C Index: adns/regress/adnsresfilter-xinitflags.text diff -u /dev/null adns/regress/adnsresfilter-xinitflags.text:1.1 --- /dev/null Sun Sep 17 15:32:49 2000 +++ adns/regress/adnsresfilter-xinitflags.text Sat Sep 16 22:48:13 2000 @@ -0,0 +1 @@ +--debug --config Index: adns/regress/case-1stservbroken.sys diff -u adns/regress/case-1stservbroken.sys:1.3 adns/regress/case-1stservbroken.sys:1.4 --- adns/regress/case-1stservbroken.sys:1.3 Sun May 7 16:30:18 2000 +++ adns/regress/case-1stservbroken.sys Sat Sep 16 18:35:01 2000 @@ -1,4 +1,4 @@ -1stservbroken +adnstest 1stservbroken :12 trunc.test.iwj.relativity.greenend.org.uk start 940102940.701451 socket type=SOCK_DGRAM Index: adns/regress/case-1stservtotcp.sys diff -u adns/regress/case-1stservtotcp.sys:1.1 adns/regress/case-1stservtotcp.sys:1.2 --- adns/regress/case-1stservtotcp.sys:1.1 Sat Oct 16 20:04:06 1999 +++ adns/regress/case-1stservtotcp.sys Sat Sep 16 18:35:01 2000 @@ -1,4 +1,4 @@ -1stservto +adnstest 1stservto :12 trunc.test.iwj.relativity.greenend.org.uk start 940100259.965940 socket type=SOCK_DGRAM Index: adns/regress/case-2ndservok.sys diff -u adns/regress/case-2ndservok.sys:1.1 adns/regress/case-2ndservok.sys:1.2 --- adns/regress/case-2ndservok.sys:1.1 Sat Oct 16 20:04:06 1999 +++ adns/regress/case-2ndservok.sys Sat Sep 16 18:35:01 2000 @@ -1,4 +1,4 @@ -2ndserver +adnstest 2ndserver :1 davenant.relativity.greenend.org.uk start 940100095.012145 socket type=SOCK_DGRAM Index: adns/regress/case-2ndservtcp.sys diff -u adns/regress/case-2ndservtcp.sys:1.2 adns/regress/case-2ndservtcp.sys:1.3 --- adns/regress/case-2ndservtcp.sys:1.2 Sun May 7 16:30:18 2000 +++ adns/regress/case-2ndservtcp.sys Sat Sep 16 18:35:01 2000 @@ -1,4 +1,4 @@ -2ndserver +adnstest 2ndserver :12 trunc.test.iwj.relativity.greenend.org.uk start 940100083.268555 socket type=SOCK_DGRAM Index: adns/regress/case-abbrev.sys diff -u adns/regress/case-abbrev.sys:1.1 adns/regress/case-abbrev.sys:1.2 --- adns/regress/case-abbrev.sys:1.1 Thu Jun 17 01:53:59 1999 +++ adns/regress/case-abbrev.sys Sat Sep 16 18:35:01 2000 @@ -1,4 +1,4 @@ -default +adnstest default ,a/greenend.org.uk start 929580078.542974 socket type=SOCK_DGRAM Index: adns/regress/case-abbrevto.sys diff -u adns/regress/case-abbrevto.sys:1.2 adns/regress/case-abbrevto.sys:1.3 --- adns/regress/case-abbrevto.sys:1.2 Sun May 7 16:30:18 2000 +++ adns/regress/case-abbrevto.sys Sat Sep 16 18:35:01 2000 @@ -1,4 +1,4 @@ -noserver +adnstest noserver ,a/greenend.org.uk start 929580082.699581 socket type=SOCK_DGRAM Index: adns/regress/case-adh-cancel.err diff -u /dev/null adns/regress/case-adh-cancel.err:1.2 --- /dev/null Sun Sep 17 15:32:49 2000 +++ adns/regress/case-adh-cancel.err Sat Sep 16 20:11:43 2000 @@ -0,0 +1,2 @@ +adns debug: using nameserver 172.18.45.6 +adns debug: reply not found, id 311f, query owner chiark.greenend.org.uk (NS=172.18.45.6) Index: adns/regress/case-adh-cancel.out diff -u /dev/null adns/regress/case-adh-cancel.out:1.1 --- /dev/null Sun Sep 17 15:32:50 2000 +++ adns/regress/case-adh-cancel.out Sat Sep 16 18:35:01 2000 @@ -0,0 +1,2 @@ +davenant.relativity.greenend.org.uk A INET 172.18.45.6 +rc=0 Index: adns/regress/case-adh-cancel.sys diff -u /dev/null adns/regress/case-adh-cancel.sys:1.1 --- /dev/null Sun Sep 17 15:32:50 2000 +++ adns/regress/case-adh-cancel.sys Sat Sep 16 18:35:01 2000 @@ -0,0 +1,73 @@ +./adnshost default -f + + start 969124425.922896 + socket type=SOCK_DGRAM + socket=6 + +0.000162 + fcntl fd=6 cmd=F_GETFL + fcntl=~O_NONBLOCK&... + +0.000058 + fcntl fd=6 cmd=F_SETFL O_NONBLOCK|... + fcntl=OK + +0.000035 + select max=7 rfds=[0,6] wfds=[] efds=[] to=null + select=1 rfds=[0] wfds=[] efds=[] + +0.000135 + read fd=0 buflen=40 + read=OK + 2d2d6173 796e6368 2d696420 34320a63 68696172 6b2e6772 65656e65 6e642e6f + 72672e75 6b0a2d2d. + +0.000254 + sendto fd=6 addr=172.18.45.6:53 + 311f0100 00010000 00000000 06636869 61726b08 67726565 6e656e64 036f7267 + 02756b00 00010001. + sendto=40 + +0.000825 + read fd=0 buflen=38 + read=OK + 6173796e 63682d69 64203433 0a646176 656e616e 742e7265 6c617469 76697479 + 2e677265 656e. + +0.000184 + read fd=0 buflen=15 + read=OK + 656e642e 6f72672e 756b0a2d 2d6361. + +0.000106 + sendto fd=6 addr=172.18.45.6:53 + 31200100 00010000 00000000 08646176 656e616e 740a7265 6c617469 76697479 + 08677265 656e656e 64036f72 6702756b 00000100 01. + sendto=53 + +0.000624 + read fd=0 buflen=36 + read=OK + 6e63656c 2d696420 34320a. + +0.000145 + select max=7 rfds=[0,6] wfds=[] efds=[] to=1.999231 + select=2 rfds=[0,6] wfds=[] efds=[] + +0.000157 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=OK addr=172.18.45.6:53 + 311f8580 00010001 00020002 06636869 61726b08 67726565 6e656e64 036f7267 + 02756b00 00010001 c00c0001 00010001 51800004 c3e04c84 08677265 656e656e + 64036f72 6702756b 00000200 01000151 80001103 6e73300a 72656c61 74697669 + 7479c038 c0380002 00010001 51800006 036e7331 c057c053 00010001 00015180 + 0004ac12 2d06c070 00010001 00015180 0004ac12 2d01. + +0.000551 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=OK addr=172.18.45.6:53 + 31208580 00010001 00020002 08646176 656e616e 740a7265 6c617469 76697479 + 08677265 656e656e 64036f72 6702756b 00000100 01c00c00 01000100 01518000 + 04ac122d 060a7265 6c617469 76697479 08677265 656e656e 64036f72 6702756b + 00000200 01000151 80000603 6e7330c0 45c04500 02000100 01518000 06036e73 + 31c045c0 6b000100 01000151 800004ac 122d06c0 7d000100 01000151 800004ac + 122d01. + +0.000579 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=EAGAIN + +0.000151 + read fd=0 buflen=40 + read=OK + . + +0.000043 + close fd=6 + close=OK + +0.000961 Index: adns/regress/case-adh-cancel2.err diff -u /dev/null adns/regress/case-adh-cancel2.err:1.2 --- /dev/null Sun Sep 17 15:32:50 2000 +++ adns/regress/case-adh-cancel2.err Sat Sep 16 20:11:43 2000 @@ -0,0 +1 @@ +adns debug: using nameserver 172.18.45.6 Index: adns/regress/case-adh-cancel2.out diff -u /dev/null adns/regress/case-adh-cancel2.out:1.1 --- /dev/null Sun Sep 17 15:32:50 2000 +++ adns/regress/case-adh-cancel2.out Sat Sep 16 18:35:01 2000 @@ -0,0 +1 @@ +rc=0 Index: adns/regress/case-adh-cancel2.sys diff -u /dev/null adns/regress/case-adh-cancel2.sys:1.1 --- /dev/null Sun Sep 17 15:32:50 2000 +++ adns/regress/case-adh-cancel2.sys Sat Sep 16 18:35:01 2000 @@ -0,0 +1,59 @@ +./adnshost default -f + + start 969124594.885114 + socket type=SOCK_DGRAM + socket=6 + +0.000160 + fcntl fd=6 cmd=F_GETFL + fcntl=~O_NONBLOCK&... + +0.000057 + fcntl fd=6 cmd=F_SETFL O_NONBLOCK|... + fcntl=OK + +0.000035 + select max=7 rfds=[0,6] wfds=[] efds=[] to=null + select=1 rfds=[0] wfds=[] efds=[] + +6.-286734 + read fd=0 buflen=40 + read=OK + 2d2d6173 796e6368 2d696420 34320a. + +0.000727 + select max=7 rfds=[0,6] wfds=[] efds=[] to=null + select=1 rfds=[0] wfds=[] efds=[] + +0.000147 + read fd=0 buflen=40 + read=OK + 63686961 726b2e67 7265656e 656e642e 6f72672e 756b0a. + +0.000129 + sendto fd=6 addr=172.18.45.6:53 + 311f0100 00010000 00000000 06636869 61726b08 67726565 6e656e64 036f7267 + 02756b00 00010001. + sendto=40 + +0.000802 + select max=7 rfds=[0,6] wfds=[] efds=[] to=1.999198 + select=1 rfds=[0,6] wfds=[] efds=[] + +0.000135 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=OK addr=172.18.45.6:53 + 311f8580 00010001 00020002 06636869 61726b08 67726565 6e656e64 036f7267 + 02756b00 00010001 c00c0001 00010001 51800004 c3e04c84 08677265 656e656e + 64036f72 6702756b 00000200 01000151 80001103 6e73300a 72656c61 74697669 + 7479c038 c0380002 00010001 51800006 036e7331 c057c053 00010001 00015180 + 0004ac12 2d06c070 00010001 00015180 0004ac12 2d01. + +0.000553 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=EAGAIN + +0.000195 + read fd=0 buflen=40 + read=OK + 2d2d6361 6e63656c 2d696420 34320a. + +0.000688 + select max=7 rfds=[0,6] wfds=[] efds=[] to=null + select=1 rfds=[0] wfds=[] efds=[] + +2.-11588 + read fd=0 buflen=40 + read=OK + . + +0.000089 + close fd=6 + close=OK + +0.000149 Index: adns/regress/case-adh-cancel3.err diff -u /dev/null adns/regress/case-adh-cancel3.err:1.1 --- /dev/null Sun Sep 17 15:32:50 2000 +++ adns/regress/case-adh-cancel3.err Sat Sep 16 20:11:36 2000 @@ -0,0 +1,2 @@ +adns debug: using nameserver 172.18.45.6 +adns debug: server failure on unidentifiable query (NS=172.18.45.6) Index: adns/regress/case-adh-cancel3.out diff -u /dev/null adns/regress/case-adh-cancel3.out:1.1 --- /dev/null Sun Sep 17 15:32:50 2000 +++ adns/regress/case-adh-cancel3.out Sat Sep 16 20:11:36 2000 @@ -0,0 +1 @@ +rc=0 Index: adns/regress/case-adh-cancel3.sys diff -u /dev/null adns/regress/case-adh-cancel3.sys:1.1 --- /dev/null Sun Sep 17 15:32:50 2000 +++ adns/regress/case-adh-cancel3.sys Sat Sep 16 20:11:36 2000 @@ -0,0 +1,90 @@ +./adnshost default -f + + start 969129578.690081 + socket type=SOCK_DGRAM + socket=6 + +0.000809 + fcntl fd=6 cmd=F_GETFL + fcntl=~O_NONBLOCK&... + +0.000531 + fcntl fd=6 cmd=F_SETFL O_NONBLOCK|... + fcntl=OK + +0.000512 + select max=7 rfds=[0,6] wfds=[] efds=[] to=null + select=1 rfds=[0] wfds=[] efds=[] + +17.-461569 + read fd=0 buflen=40 + read=OK + 2d2d6173 796e6368 2d696420 34320a. + +0.000686 + select max=7 rfds=[0,6] wfds=[] efds=[] to=null + select=1 rfds=[0] wfds=[] efds=[] + +0.000915 + read fd=0 buflen=40 + read=OK + 2d692031 37322e33 302e3230 362e3134 0a. + +0.000583 + sendto fd=6 addr=172.18.45.6:53 + 311f0100 00010000 00000000 02313403 32303602 33300331 37320769 6e2d6164 + 64720461 72706100 000c0001. + sendto=44 + +0.001629 + select max=7 rfds=[0,6] wfds=[] efds=[] to=1.998371 + select=1 rfds=[6] wfds=[] efds=[] + +0.000910 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=OK addr=172.18.45.6:53 + 311f8580 00010001 00010001 02313403 32303602 33300331 37320769 6e2d6164 + 64720461 72706100 000c0001 c00c000c 00010000 003c002a 06323036 2d31340b + 62726f6b 656e2d7a 6f6e6504 74657374 0763756c 74757265 05646f74 61740261 + 74000332 30360233 30033137 3207696e 2d616464 72046172 70610000 02000100 + 00003c00 20036e73 300a7265 6c617469 76697479 08677265 656e656e 64036f72 + 6702756b 00c08500 01000100 01518000 04ac122d 06. + +0.001417 + sendto fd=6 addr=172.18.45.6:53 + 31200100 00010000 00000000 06323036 2d31340b 62726f6b 656e2d7a 6f6e6504 + 74657374 0763756c 74757265 05646f74 61740261 74000001 0001. + sendto=58 + +0.001988 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=EAGAIN + +0.000537 + select max=7 rfds=[0,6] wfds=[] efds=[] to=1.996058 + select=0 rfds=[] wfds=[] efds=[] + +2.-05146 + select max=7 rfds=[0,6] wfds=[] efds=[] to=0.001204 + select=0 rfds=[] wfds=[] efds=[] + +0.009951 + sendto fd=6 addr=172.18.45.6:53 + 31200100 00010000 00000000 06323036 2d31340b 62726f6b 656e2d7a 6f6e6504 + 74657374 0763756c 74757265 05646f74 61740261 74000001 0001. + sendto=58 + +0.001141 + select max=7 rfds=[0,6] wfds=[] efds=[] to=1.998859 + select=1 rfds=[0] wfds=[] efds=[] + +0.551215 + read fd=0 buflen=40 + read=OK + 2d2d6361 6e63656c 2d696420 34320a. + +0.000599 + select max=7 rfds=[0,6] wfds=[] efds=[] to=null + select=1 rfds=[6] wfds=[] efds=[] + +42.-794672 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=OK addr=172.18.45.6:53 + 31208182 00010000 00000000 06323036 2d31340b 62726f6b 656e2d7a 6f6e6504 + 74657374 0763756c 74757265 05646f74 61740261 74000001 0001. + +0.000986 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=EAGAIN + +0.003836 + select max=7 rfds=[0,6] wfds=[] efds=[] to=null + select=1 rfds=[0] wfds=[] efds=[] + +6.662470 + read fd=0 buflen=40 + read=OK + . + +0.000545 + close fd=6 + close=OK + +0.000686 Index: adns/regress/case-adh-norm.err diff -u /dev/null adns/regress/case-adh-norm.err:1.2 --- /dev/null Sun Sep 17 15:32:50 2000 +++ adns/regress/case-adh-norm.err Sat Sep 16 20:11:43 2000 @@ -0,0 +1 @@ +adns debug: using nameserver 172.18.45.6 Index: adns/regress/case-adh-norm.out diff -u /dev/null adns/regress/case-adh-norm.out:1.1 --- /dev/null Sun Sep 17 15:32:50 2000 +++ adns/regress/case-adh-norm.out Sat Sep 16 18:35:01 2000 @@ -0,0 +1,2 @@ +chiark.greenend.org.uk A INET 195.224.76.132 +rc=0 Index: adns/regress/case-adh-norm.sys diff -u /dev/null adns/regress/case-adh-norm.sys:1.1 --- /dev/null Sun Sep 17 15:32:50 2000 +++ adns/regress/case-adh-norm.sys Sat Sep 16 18:35:01 2000 @@ -0,0 +1,34 @@ +./adnshost default +chiark.greenend.org.uk + start 969122933.609498 + socket type=SOCK_DGRAM + socket=4 + +0.000155 + fcntl fd=4 cmd=F_GETFL + fcntl=~O_NONBLOCK&... + +0.000057 + fcntl fd=4 cmd=F_SETFL O_NONBLOCK|... + fcntl=OK + +0.000037 + sendto fd=4 addr=172.18.45.6:53 + 311f0100 00010000 00000000 06636869 61726b08 67726565 6e656e64 036f7267 + 02756b00 00010001. + sendto=40 + +0.000827 + select max=5 rfds=[4] wfds=[] efds=[] to=1.999173 + select=1 rfds=[4] wfds=[] efds=[] + +0.000158 + recvfrom fd=4 buflen=512 *addrlen=16 + recvfrom=OK addr=172.18.45.6:53 + 311f8580 00010001 00020002 06636869 61726b08 67726565 6e656e64 036f7267 + 02756b00 00010001 c00c0001 00010001 51800004 c3e04c84 08677265 656e656e + 64036f72 6702756b 00000200 01000151 80001103 6e73300a 72656c61 74697669 + 7479c038 c0380002 00010001 51800006 036e7331 c057c053 00010001 00015180 + 0004ac12 2d06c070 00010001 00015180 0004ac12 2d01. + +0.000895 + recvfrom fd=4 buflen=512 *addrlen=16 + recvfrom=EAGAIN + +0.000149 + close fd=4 + close=OK + +0.000290 Index: adns/regress/case-adh-pipe.err diff -u /dev/null adns/regress/case-adh-pipe.err:1.2 --- /dev/null Sun Sep 17 15:32:50 2000 +++ adns/regress/case-adh-pipe.err Sat Sep 16 20:11:43 2000 @@ -0,0 +1 @@ +adns debug: using nameserver 172.18.45.6 Index: adns/regress/case-adh-pipe.out diff -u /dev/null adns/regress/case-adh-pipe.out:1.1 --- /dev/null Sun Sep 17 15:32:50 2000 +++ adns/regress/case-adh-pipe.out Sat Sep 16 18:35:01 2000 @@ -0,0 +1,2 @@ +chiark.greenend.org.uk A INET 195.224.76.132 +rc=0 Index: adns/regress/case-adh-pipe.sys diff -u /dev/null adns/regress/case-adh-pipe.sys:1.1 --- /dev/null Sun Sep 17 15:32:50 2000 +++ adns/regress/case-adh-pipe.sys Sat Sep 16 18:35:01 2000 @@ -0,0 +1,48 @@ +./adnshost default -f + + start 969123801.904882 + socket type=SOCK_DGRAM + socket=6 + +0.000156 + fcntl fd=6 cmd=F_GETFL + fcntl=~O_NONBLOCK&... + +0.000057 + fcntl fd=6 cmd=F_SETFL O_NONBLOCK|... + fcntl=OK + +0.000035 + select max=7 rfds=[0,6] wfds=[] efds=[] to=null + select=1 rfds=[0] wfds=[] efds=[] + +4.-792858 + read fd=0 buflen=40 + read=OK + 63686961 726b2e67 7265656e 656e642e 6f72672e 756b0a. + +0.000235 + sendto fd=6 addr=172.18.45.6:53 + 311f0100 00010000 00000000 06636869 61726b08 67726565 6e656e64 036f7267 + 02756b00 00010001. + sendto=40 + +0.000847 + select max=7 rfds=[0,6] wfds=[] efds=[] to=1.999153 + select=1 rfds=[6] wfds=[] efds=[] + +0.000140 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=OK addr=172.18.45.6:53 + 311f8580 00010001 00020002 06636869 61726b08 67726565 6e656e64 036f7267 + 02756b00 00010001 c00c0001 00010001 51800004 c3e04c84 08677265 656e656e + 64036f72 6702756b 00000200 01000151 80001103 6e73300a 72656c61 74697669 + 7479c038 c0380002 00010001 51800006 036e7331 c057c053 00010001 00015180 + 0004ac12 2d06c070 00010001 00015180 0004ac12 2d01. + +0.000548 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=EAGAIN + +0.000184 + select max=7 rfds=[0,6] wfds=[] efds=[] to=null + select=1 rfds=[0] wfds=[] efds=[] + +0.715699 + read fd=0 buflen=40 + read=OK + . + +0.000090 + close fd=6 + close=OK + +0.000134 Index: adns/regress/case-alr-norm.err diff -u /dev/null adns/regress/case-alr-norm.err:1.1 --- /dev/null Sun Sep 17 15:32:50 2000 +++ adns/regress/case-alr-norm.err Sat Sep 16 22:48:13 2000 @@ -0,0 +1,29 @@ +adns debug: using nameserver 172.18.45.6 +adnslogres: submitting 172.18.45.1 -> 1.45.18.172.in-addr.arpa. +adnslogres: 1 in queue; checking 172.18.45.1 +adnslogres: submitting 127.0.0.1 -> 1.0.0.127.in-addr.arpa. +adnslogres: 1 in queue; checking 127.0.0.1 +adnslogres: submitting 172.30.206.14 -> 14.206.30.172.in-addr.arpa. +adnslogres: 1 in queue; checking 172.30.206.14 +adnslogres: submitting 127.0.0.1 -> 1.0.0.127.in-addr.arpa. +adnslogres: 2 in queue; checking 172.30.206.14 +adnslogres: submitting 172.18.45.3 -> 3.45.18.172.in-addr.arpa. +adnslogres: 3 in queue; checking 172.30.206.14 +adnslogres: submitting 172.18.45.1 -> 1.45.18.172.in-addr.arpa. +adnslogres: 4 in queue; checking 172.30.206.14 +adnslogres: submitting 172.18.45.8 -> 8.45.18.172.in-addr.arpa. +adnslogres: 5 in queue; checking 172.30.206.14 +adnslogres: submitting 172.18.45.1 -> 1.45.18.172.in-addr.arpa. +adnslogres: 6 in queue; checking 172.30.206.14 +adnslogres: submitting 172.18.45.1 -> 1.45.18.172.in-addr.arpa. +adnslogres: 7 in queue; checking 172.30.206.14 +adnslogres: submitting 172.18.45.6 -> 6.45.18.172.in-addr.arpa. +adnslogres: 8 in queue; checking 172.30.206.14 +adnslogres: 8 in queue; checking 172.30.206.14 +adnslogres: 7 in queue; checking 127.0.0.1 +adnslogres: 6 in queue; checking 172.18.45.3 +adnslogres: 5 in queue; checking 172.18.45.1 +adnslogres: 4 in queue; checking 172.18.45.8 +adnslogres: 3 in queue; checking 172.18.45.1 +adnslogres: 2 in queue; checking 172.18.45.1 +adnslogres: 1 in queue; checking 172.18.45.6 Index: adns/regress/case-alr-norm.in diff -u /dev/null adns/regress/case-alr-norm.in:1.1 --- /dev/null Sun Sep 17 15:32:50 2000 +++ adns/regress/case-alr-norm.in Sat Sep 16 22:48:13 2000 @@ -0,0 +1,10 @@ +172.18.45.1 - - [13/Sep/2000:23:00:26 +0100] "GET /mirror/debian-non-us/dists/stable/non-US/main/source/Release HTTP/1.0" 304 - +127.0.0.1 - - [13/Sep/2000:23:00:26 +0100] "GET /mirror/debian-non-us/dists/stable/non-US/contrib/source/Sources.gz HTTP/1.0" 304 - +172.30.206.14 - - [13/Sep/2000:23:00:26 +0100] "GET /mirror/debian-non-us/dists/stable/non-US/contrib/source/Release HTTP/1.0" 304 - +127.0.0.1 - - [13/Sep/2000:23:00:26 +0100] "GET /mirror/debian-non-us/dists/stable/non-US/non-free/source/Sources.gz HTTP/1.0" 304 - +172.18.45.3 - - [13/Sep/2000:23:00:26 +0100] "GET /mirror/debian-non-us/dists/stable/non-US/non-free/source/Release HTTP/1.0" 304 - +172.18.45.1 - - [13/Sep/2000:23:01:01 +0100] "GET /mirror/debian-ftp/dists/potato/main/source/devel/cvsweb_1.79-3potato1.dsc HTTP/1.0" 200 604 +172.18.45.8 - - [13/Sep/2000:23:01:01 +0100] "GET /mirror/debian-ftp/dists/potato/main/source/devel/cvsweb_1.79.orig.tar.gz HTTP/1.0" 200 34886 +172.18.45.1 - - [13/Sep/2000:23:01:01 +0100] "GET /mirror/debian-ftp/dists/potato/main/source/devel/cvsweb_1.79.orig.tar.gz HTTP/1.0" 200 34886 +172.18.45.1 - - [13/Sep/2000:23:01:01 +0100] "GET /mirror/debian-ftp/dists/potato/main/source/devel/cvsweb_1.79-3potato1.diff.gz HTTP/1.0" 200 7962 +172.18.45.6 - - [16/Sep/2000:18:35:15 +0100] "GET / HTTP/1.0" 304 - Index: adns/regress/case-alr-norm.out diff -u /dev/null adns/regress/case-alr-norm.out:1.1 --- /dev/null Sun Sep 17 15:32:50 2000 +++ adns/regress/case-alr-norm.out Sat Sep 16 22:48:13 2000 @@ -0,0 +1,11 @@ +sfere.relativity.greenend.org.uk - - [13/Sep/2000:23:00:26 +0100] "GET /mirror/debian-non-us/dists/stable/non-US/main/source/Release HTTP/1.0" 304 - +localhost - - [13/Sep/2000:23:00:26 +0100] "GET /mirror/debian-non-us/dists/stable/non-US/contrib/source/Sources.gz HTTP/1.0" 304 - +172.30.206.14 - - [13/Sep/2000:23:00:26 +0100] "GET /mirror/debian-non-us/dists/stable/non-US/contrib/source/Release HTTP/1.0" 304 - +localhost - - [13/Sep/2000:23:00:26 +0100] "GET /mirror/debian-non-us/dists/stable/non-US/non-free/source/Sources.gz HTTP/1.0" 304 - +172.18.45.3 - - [13/Sep/2000:23:00:26 +0100] "GET /mirror/debian-non-us/dists/stable/non-US/non-free/source/Release HTTP/1.0" 304 - +sfere.relativity.greenend.org.uk - - [13/Sep/2000:23:01:01 +0100] "GET /mirror/debian-ftp/dists/potato/main/source/devel/cvsweb_1.79-3potato1.dsc HTTP/1.0" 200 604 +kadath.relativity.greenend.org.uk - - [13/Sep/2000:23:01:01 +0100] "GET /mirror/debian-ftp/dists/potato/main/source/devel/cvsweb_1.79.orig.tar.gz HTTP/1.0" 200 34886 +sfere.relativity.greenend.org.uk - - [13/Sep/2000:23:01:01 +0100] "GET /mirror/debian-ftp/dists/potato/main/source/devel/cvsweb_1.79.orig.tar.gz HTTP/1.0" 200 34886 +sfere.relativity.greenend.org.uk - - [13/Sep/2000:23:01:01 +0100] "GET /mirror/debian-ftp/dists/potato/main/source/devel/cvsweb_1.79-3potato1.diff.gz HTTP/1.0" 200 7962 +davenant.relativity.greenend.org.uk - - [16/Sep/2000:18:35:15 +0100] "GET / HTTP/1.0" 304 - +rc=0 Index: adns/regress/case-alr-norm.sys diff -u /dev/null adns/regress/case-alr-norm.sys:1.1 --- /dev/null Sun Sep 17 15:32:50 2000 +++ adns/regress/case-alr-norm.sys Sat Sep 16 22:48:13 2000 @@ -0,0 +1,475 @@ +./adnslogres default + + start 969140608.116717 + socket type=SOCK_DGRAM + socket=6 + +0.000127 + fcntl fd=6 cmd=F_GETFL + fcntl=~O_NONBLOCK&... + +0.000061 + fcntl fd=6 cmd=F_SETFL O_NONBLOCK|... + fcntl=OK + +0.000037 + sendto fd=6 addr=172.18.45.6:53 + 311f0100 00010000 00000000 01310234 35023138 03313732 07696e2d 61646472 + 04617270 6100000c 0001. + sendto=42 + +0.001715 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=OK addr=172.18.45.6:53 + 311f8580 00010001 00020002 01310234 35023138 03313732 07696e2d 61646472 + 04617270 6100000c 0001c00c 000c0001 00015180 00220573 66657265 0a72656c + 61746976 69747908 67726565 6e656e64 036f7267 02756b00 02343502 31380331 + 37320769 6e2d6164 64720461 72706100 00020001 00015180 0006036e 7330c03c + c0580002 00010001 51800006 036e7331 c03cc07a 00010001 00015180 0004ac12 + 2d06c08c 00010001 00015180 0004ac12 2d01. + +0.000718 + sendto fd=6 addr=172.18.45.6:53 + 31200100 00010000 00000000 05736665 72650a72 656c6174 69766974 79086772 + 65656e65 6e64036f 72670275 6b000001 0001. + sendto=50 + +0.000790 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=OK addr=172.18.45.6:53 + 31208580 00010001 00020002 05736665 72650a72 656c6174 69766974 79086772 + 65656e65 6e64036f 72670275 6b000001 0001c00c 00010001 00015180 0004ac12 + 2d010a72 656c6174 69766974 79086772 65656e65 6e64036f 72670275 6b000002 + 00010001 51800006 036e7330 c042c042 00020001 00015180 0006036e 7331c042 + c0680001 00010001 51800004 ac122d06 c07a0001 00010001 51800004 ac122d01. + +0.000564 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=EAGAIN + +0.000109 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=EAGAIN + +0.000093 + sendto fd=6 addr=172.18.45.6:53 + 31210100 00010000 00000000 01310130 01300331 32370769 6e2d6164 64720461 + 72706100 000c0001. + sendto=40 + +0.000753 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=OK addr=172.18.45.6:53 + 31218580 00010001 00010001 01310130 01300331 32370769 6e2d6164 64720461 + 72706100 000c0001 c00c000c 00010009 3a80000b 096c6f63 616c686f 73740003 + 31323707 696e2d61 64647204 61727061 00000200 0100093a 800002c0 34c03400 + 01000100 093a8000 047f0000 01. + +0.000417 + sendto fd=6 addr=172.18.45.6:53 + 31220100 00010000 00000000 096c6f63 616c686f 73740000 010001. + sendto=27 + +0.000530 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=OK addr=172.18.45.6:53 + 31228580 00010001 00010001 096c6f63 616c686f 73740000 010001c0 0c000100 + 0100093a 8000047f 000001c0 0c000200 0100093a 800002c0 0cc00c00 01000100 + 093a8000 047f0000 01. + +0.000306 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=EAGAIN + +0.000089 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=EAGAIN + +0.000088 + sendto fd=6 addr=172.18.45.6:53 + 31230100 00010000 00000000 02313403 32303602 33300331 37320769 6e2d6164 + 64720461 72706100 000c0001. + sendto=44 + +0.000689 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=OK addr=172.18.45.6:53 + 31238580 00010001 00010001 02313403 32303602 33300331 37320769 6e2d6164 + 64720461 72706100 000c0001 c00c000c 00010000 003c002a 06323036 2d31340b + 62726f6b 656e2d7a 6f6e6504 74657374 0763756c 74757265 05646f74 61740261 + 74000332 30360233 30033137 3207696e 2d616464 72046172 70610000 02000100 + 00003c00 20036e73 300a7265 6c617469 76697479 08677265 656e656e 64036f72 + 6702756b 00c08500 01000100 01518000 04ac122d 06. + +0.000622 + sendto fd=6 addr=172.18.45.6:53 + 31240100 00010000 00000000 06323036 2d31340b 62726f6b 656e2d7a 6f6e6504 + 74657374 0763756c 74757265 05646f74 61740261 74000001 0001. + sendto=58 + +0.001722 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=EAGAIN + +0.000087 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=EAGAIN + +0.000205 + sendto fd=6 addr=172.18.45.6:53 + 31250100 00010000 00000000 01310130 01300331 32370769 6e2d6164 64720461 + 72706100 000c0001. + sendto=40 + +0.000699 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=OK addr=172.18.45.6:53 + 31258580 00010001 00010001 01310130 01300331 32370769 6e2d6164 64720461 + 72706100 000c0001 c00c000c 00010009 3a80000b 096c6f63 616c686f 73740003 + 31323707 696e2d61 64647204 61727061 00000200 0100093a 800002c0 34c03400 + 01000100 093a8000 047f0000 01. + +0.000420 + sendto fd=6 addr=172.18.45.6:53 + 31260100 00010000 00000000 096c6f63 616c686f 73740000 010001. + sendto=27 + +0.000532 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=OK addr=172.18.45.6:53 + 31268580 00010001 00010001 096c6f63 616c686f 73740000 010001c0 0c000100 + 0100093a 8000047f 000001c0 0c000200 0100093a 800002c0 0cc00c00 01000100 + 093a8000 047f0000 01. + +0.000307 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=EAGAIN + +0.000094 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=EAGAIN + +0.000187 + sendto fd=6 addr=172.18.45.6:53 + 31270100 00010000 00000000 01330234 35023138 03313732 07696e2d 61646472 + 04617270 6100000c 0001. + sendto=42 + +0.000634 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=OK addr=172.18.45.6:53 + 31278583 00010000 00010000 01330234 35023138 03313732 07696e2d 61646472 + 04617270 6100000c 00010234 35023138 03313732 07696e2d 61646472 04617270 + 61000006 00010001 51800041 036e7330 0a72656c 61746976 69747908 67726565 + 6e656e64 036f7267 02756b00 0a686f73 746d6173 746572c0 50000000 2800001c + 2000000e 1000093a 80000151 80. + +0.000506 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=EAGAIN + +0.000099 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=EAGAIN + +0.000184 + sendto fd=6 addr=172.18.45.6:53 + 31280100 00010000 00000000 01310234 35023138 03313732 07696e2d 61646472 + 04617270 6100000c 0001. + sendto=42 + +0.000711 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=OK addr=172.18.45.6:53 + 31288580 00010001 00020002 01310234 35023138 03313732 07696e2d 61646472 + 04617270 6100000c 0001c00c 000c0001 00015180 00220573 66657265 0a72656c + 61746976 69747908 67726565 6e656e64 036f7267 02756b00 02343502 31380331 + 37320769 6e2d6164 64720461 72706100 00020001 00015180 0006036e 7330c03c + c0580002 00010001 51800006 036e7331 c03cc07a 00010001 00015180 0004ac12 + 2d06c08c 00010001 00015180 0004ac12 2d01. + +0.000624 + sendto fd=6 addr=172.18.45.6:53 + 31290100 00010000 00000000 05736665 72650a72 656c6174 69766974 79086772 + 65656e65 6e64036f 72670275 6b000001 0001. + sendto=50 + +0.000748 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=OK addr=172.18.45.6:53 + 31298580 00010001 00020002 05736665 72650a72 656c6174 69766974 79086772 + 65656e65 6e64036f 72670275 6b000001 0001c00c 00010001 00015180 0004ac12 + 2d010a72 656c6174 69766974 79086772 65656e65 6e64036f 72670275 6b000002 + 00010001 51800006 036e7330 c042c042 00020001 00015180 0006036e 7331c042 + c0680001 00010001 51800004 ac122d06 c07a0001 00010001 51800004 ac122d01. + +0.000564 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=EAGAIN + +0.000106 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=EAGAIN + +0.000192 + sendto fd=6 addr=172.18.45.6:53 + 312a0100 00010000 00000000 01380234 35023138 03313732 07696e2d 61646472 + 04617270 6100000c 0001. + sendto=42 + +0.001229 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=OK addr=172.18.45.6:53 + 312a8580 00010001 00020002 01380234 35023138 03313732 07696e2d 61646472 + 04617270 6100000c 0001c00c 000c0001 00015180 0023066b 61646174 680a7265 + 6c617469 76697479 08677265 656e656e 64036f72 6702756b 00023435 02313803 + 31373207 696e2d61 64647204 61727061 00000200 01000151 80000603 6e7330c0 + 3dc05900 02000100 01518000 06036e73 31c03dc0 7b000100 01000151 800004ac + 122d06c0 8d000100 01000151 800004ac 122d01. + +0.000628 + sendto fd=6 addr=172.18.45.6:53 + 312b0100 00010000 00000000 066b6164 6174680a 72656c61 74697669 74790867 + 7265656e 656e6403 6f726702 756b0000 010001. + sendto=51 + +0.000678 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=OK addr=172.18.45.6:53 + 312b8580 00010001 00020002 066b6164 6174680a 72656c61 74697669 74790867 + 7265656e 656e6403 6f726702 756b0000 010001c0 0c000100 01000151 800004ac + 122d080a 72656c61 74697669 74790867 7265656e 656e6403 6f726702 756b0000 + 02000100 01518000 06036e73 30c043c0 43000200 01000151 80000603 6e7331c0 + 43c06900 01000100 01518000 04ac122d 06c07b00 01000100 01518000 04ac122d + 01. + +0.000565 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=EAGAIN + +0.000127 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=EAGAIN + +0.000202 + sendto fd=6 addr=172.18.45.6:53 + 312c0100 00010000 00000000 01310234 35023138 03313732 07696e2d 61646472 + 04617270 6100000c 0001. + sendto=42 + +0.001807 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=OK addr=172.18.45.6:53 + 312c8580 00010001 00020002 01310234 35023138 03313732 07696e2d 61646472 + 04617270 6100000c 0001c00c 000c0001 00015180 00220573 66657265 0a72656c + 61746976 69747908 67726565 6e656e64 036f7267 02756b00 02343502 31380331 + 37320769 6e2d6164 64720461 72706100 00020001 00015180 0006036e 7330c03c + c0580002 00010001 51800006 036e7331 c03cc07a 00010001 00015180 0004ac12 + 2d06c08c 00010001 00015180 0004ac12 2d01. + +0.000626 + sendto fd=6 addr=172.18.45.6:53 + 312d0100 00010000 00000000 05736665 72650a72 656c6174 69766974 79086772 + 65656e65 6e64036f 72670275 6b000001 0001. + sendto=50 + +0.000658 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=OK addr=172.18.45.6:53 + 312d8580 00010001 00020002 05736665 72650a72 656c6174 69766974 79086772 + 65656e65 6e64036f 72670275 6b000001 0001c00c 00010001 00015180 0004ac12 + 2d010a72 656c6174 69766974 79086772 65656e65 6e64036f 72670275 6b000002 + 00010001 51800006 036e7330 c042c042 00020001 00015180 0006036e 7331c042 + c0680001 00010001 51800004 ac122d06 c07a0001 00010001 51800004 ac122d01. + +0.000577 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=EAGAIN + +0.000107 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=EAGAIN + +0.000197 + sendto fd=6 addr=172.18.45.6:53 + 312e0100 00010000 00000000 01310234 35023138 03313732 07696e2d 61646472 + 04617270 6100000c 0001. + sendto=42 + +0.000710 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=OK addr=172.18.45.6:53 + 312e8580 00010001 00020002 01310234 35023138 03313732 07696e2d 61646472 + 04617270 6100000c 0001c00c 000c0001 00015180 00220573 66657265 0a72656c + 61746976 69747908 67726565 6e656e64 036f7267 02756b00 02343502 31380331 + 37320769 6e2d6164 64720461 72706100 00020001 00015180 0006036e 7330c03c + c0580002 00010001 51800006 036e7331 c03cc07a 00010001 00015180 0004ac12 + 2d06c08c 00010001 00015180 0004ac12 2d01. + +0.000620 + sendto fd=6 addr=172.18.45.6:53 + 312f0100 00010000 00000000 05736665 72650a72 656c6174 69766974 79086772 + 65656e65 6e64036f 72670275 6b000001 0001. + sendto=50 + +0.000670 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=OK addr=172.18.45.6:53 + 312f8580 00010001 00020002 05736665 72650a72 656c6174 69766974 79086772 + 65656e65 6e64036f 72670275 6b000001 0001c00c 00010001 00015180 0004ac12 + 2d010a72 656c6174 69766974 79086772 65656e65 6e64036f 72670275 6b000002 + 00010001 51800006 036e7330 c042c042 00020001 00015180 0006036e 7331c042 + c0680001 00010001 51800004 ac122d06 c07a0001 00010001 51800004 ac122d01. + +0.000559 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=EAGAIN + +0.000103 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=EAGAIN + +0.000233 + sendto fd=6 addr=172.18.45.6:53 + 31300100 00010000 00000000 01360234 35023138 03313732 07696e2d 61646472 + 04617270 6100000c 0001. + sendto=42 + +0.000750 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=OK addr=172.18.45.6:53 + 31308580 00010001 00020002 01360234 35023138 03313732 07696e2d 61646472 + 04617270 6100000c 0001c00c 000c0001 00015180 00250864 6176656e 616e740a + 72656c61 74697669 74790867 7265656e 656e6403 6f726702 756b0002 34350231 + 38033137 3207696e 2d616464 72046172 70610000 02000100 01518000 06036e73 + 30c03fc0 5b000200 01000151 80000603 6e7331c0 3fc07d00 01000100 01518000 + 04ac122d 06c08f00 01000100 01518000 04ac122d 01. + +0.000629 + sendto fd=6 addr=172.18.45.6:53 + 31310100 00010000 00000000 08646176 656e616e 740a7265 6c617469 76697479 + 08677265 656e656e 64036f72 6702756b 00000100 01. + sendto=53 + +0.000663 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=OK addr=172.18.45.6:53 + 31318580 00010001 00020002 08646176 656e616e 740a7265 6c617469 76697479 + 08677265 656e656e 64036f72 6702756b 00000100 01c00c00 01000100 01518000 + 04ac122d 060a7265 6c617469 76697479 08677265 656e656e 64036f72 6702756b + 00000200 01000151 80000603 6e7330c0 45c04500 02000100 01518000 06036e73 + 31c045c0 6b000100 01000151 800004ac 122d06c0 7d000100 01000151 800004ac + 122d01. + +0.000568 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=EAGAIN + +0.000135 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=EAGAIN + +0.000191 + select max=7 rfds=[6] wfds=[] efds=[] to=1.977525 + select=0 rfds=[] wfds=[] efds=[] + +2.-23059 + select max=7 rfds=[6] wfds=[] efds=[] to=0.000584 + select=0 rfds=[] wfds=[] efds=[] + +0.010000 + sendto fd=6 addr=172.18.45.6:53 + 31240100 00010000 00000000 06323036 2d31340b 62726f6b 656e2d7a 6f6e6504 + 74657374 0763756c 74757265 05646f74 61740261 74000001 0001. + sendto=58 + +0.000486 + select max=7 rfds=[6] wfds=[] efds=[] to=1.999514 + select=0 rfds=[] wfds=[] efds=[] + +2.-00572 + select max=7 rfds=[6] wfds=[] efds=[] to=0.000086 + select=0 rfds=[] wfds=[] efds=[] + +0.009958 + sendto fd=6 addr=172.18.45.6:53 + 31240100 00010000 00000000 06323036 2d31340b 62726f6b 656e2d7a 6f6e6504 + 74657374 0763756c 74757265 05646f74 61740261 74000001 0001. + sendto=58 + +0.000479 + select max=7 rfds=[6] wfds=[] efds=[] to=1.999521 + select=0 rfds=[] wfds=[] efds=[] + +2.-00545 + select max=7 rfds=[6] wfds=[] efds=[] to=0.000066 + select=0 rfds=[] wfds=[] efds=[] + +0.009996 + sendto fd=6 addr=172.18.45.6:53 + 31240100 00010000 00000000 06323036 2d31340b 62726f6b 656e2d7a 6f6e6504 + 74657374 0763756c 74757265 05646f74 61740261 74000001 0001. + sendto=58 + +0.000496 + select max=7 rfds=[6] wfds=[] efds=[] to=1.999504 + select=0 rfds=[] wfds=[] efds=[] + +2.-00576 + select max=7 rfds=[6] wfds=[] efds=[] to=0.000080 + select=0 rfds=[] wfds=[] efds=[] + +0.009954 + sendto fd=6 addr=172.18.45.6:53 + 31240100 00010000 00000000 06323036 2d31340b 62726f6b 656e2d7a 6f6e6504 + 74657374 0763756c 74757265 05646f74 61740261 74000001 0001. + sendto=58 + +0.000461 + select max=7 rfds=[6] wfds=[] efds=[] to=1.999539 + select=0 rfds=[] wfds=[] efds=[] + +2.-00527 + select max=7 rfds=[6] wfds=[] efds=[] to=0.000066 + select=0 rfds=[] wfds=[] efds=[] + +0.009999 + sendto fd=6 addr=172.18.45.6:53 + 31240100 00010000 00000000 06323036 2d31340b 62726f6b 656e2d7a 6f6e6504 + 74657374 0763756c 74757265 05646f74 61740261 74000001 0001. + sendto=58 + +0.000493 + select max=7 rfds=[6] wfds=[] efds=[] to=1.999507 + select=0 rfds=[] wfds=[] efds=[] + +2.-00574 + select max=7 rfds=[6] wfds=[] efds=[] to=0.000081 + select=0 rfds=[] wfds=[] efds=[] + +0.009952 + sendto fd=6 addr=172.18.45.6:53 + 31240100 00010000 00000000 06323036 2d31340b 62726f6b 656e2d7a 6f6e6504 + 74657374 0763756c 74757265 05646f74 61740261 74000001 0001. + sendto=58 + +0.000509 + select max=7 rfds=[6] wfds=[] efds=[] to=1.999491 + select=0 rfds=[] wfds=[] efds=[] + +2.-00575 + select max=7 rfds=[6] wfds=[] efds=[] to=0.000066 + select=0 rfds=[] wfds=[] efds=[] + +0.009998 + sendto fd=6 addr=172.18.45.6:53 + 31240100 00010000 00000000 06323036 2d31340b 62726f6b 656e2d7a 6f6e6504 + 74657374 0763756c 74757265 05646f74 61740261 74000001 0001. + sendto=58 + +0.000559 + select max=7 rfds=[6] wfds=[] efds=[] to=1.999441 + select=0 rfds=[] wfds=[] efds=[] + +2.-00607 + select max=7 rfds=[6] wfds=[] efds=[] to=0.000048 + select=0 rfds=[] wfds=[] efds=[] + +0.009927 + sendto fd=6 addr=172.18.45.6:53 + 31240100 00010000 00000000 06323036 2d31340b 62726f6b 656e2d7a 6f6e6504 + 74657374 0763756c 74757265 05646f74 61740261 74000001 0001. + sendto=58 + +0.000496 + select max=7 rfds=[6] wfds=[] efds=[] to=1.999504 + select=0 rfds=[] wfds=[] efds=[] + +2.-00576 + select max=7 rfds=[6] wfds=[] efds=[] to=0.000080 + select=0 rfds=[] wfds=[] efds=[] + +0.010004 + sendto fd=6 addr=172.18.45.6:53 + 31240100 00010000 00000000 06323036 2d31340b 62726f6b 656e2d7a 6f6e6504 + 74657374 0763756c 74757265 05646f74 61740261 74000001 0001. + sendto=58 + +0.000483 + select max=7 rfds=[6] wfds=[] efds=[] to=1.999517 + select=0 rfds=[] wfds=[] efds=[] + +2.-00587 + select max=7 rfds=[6] wfds=[] efds=[] to=0.000104 + select=0 rfds=[] wfds=[] efds=[] + +0.010011 + sendto fd=6 addr=172.18.45.6:53 + 31240100 00010000 00000000 06323036 2d31340b 62726f6b 656e2d7a 6f6e6504 + 74657374 0763756c 74757265 05646f74 61740261 74000001 0001. + sendto=58 + +0.000494 + select max=7 rfds=[6] wfds=[] efds=[] to=1.999506 + select=0 rfds=[] wfds=[] efds=[] + +2.-00549 + select max=7 rfds=[6] wfds=[] efds=[] to=0.000055 + select=0 rfds=[] wfds=[] efds=[] + +0.009922 + sendto fd=6 addr=172.18.45.6:53 + 31240100 00010000 00000000 06323036 2d31340b 62726f6b 656e2d7a 6f6e6504 + 74657374 0763756c 74757265 05646f74 61740261 74000001 0001. + sendto=58 + +0.000477 + select max=7 rfds=[6] wfds=[] efds=[] to=1.999523 + select=0 rfds=[] wfds=[] efds=[] + +2.-00552 + select max=7 rfds=[6] wfds=[] efds=[] to=0.000075 + select=0 rfds=[] wfds=[] efds=[] + +0.010061 + sendto fd=6 addr=172.18.45.6:53 + 31240100 00010000 00000000 06323036 2d31340b 62726f6b 656e2d7a 6f6e6504 + 74657374 0763756c 74757265 05646f74 61740261 74000001 0001. + sendto=58 + +0.000476 + select max=7 rfds=[6] wfds=[] efds=[] to=1.999524 + select=0 rfds=[] wfds=[] efds=[] + +2.-00617 + select max=7 rfds=[6] wfds=[] efds=[] to=0.000141 + select=0 rfds=[] wfds=[] efds=[] + +0.009958 + sendto fd=6 addr=172.18.45.6:53 + 31240100 00010000 00000000 06323036 2d31340b 62726f6b 656e2d7a 6f6e6504 + 74657374 0763756c 74757265 05646f74 61740261 74000001 0001. + sendto=58 + +0.000464 + select max=7 rfds=[6] wfds=[] efds=[] to=1.999536 + select=0 rfds=[] wfds=[] efds=[] + +2.-00542 + select max=7 rfds=[6] wfds=[] efds=[] to=0.000078 + select=0 rfds=[] wfds=[] efds=[] + +0.010010 + sendto fd=6 addr=172.18.45.6:53 + 31240100 00010000 00000000 06323036 2d31340b 62726f6b 656e2d7a 6f6e6504 + 74657374 0763756c 74757265 05646f74 61740261 74000001 0001. + sendto=58 + +0.000440 + select max=7 rfds=[6] wfds=[] efds=[] to=1.999560 + select=0 rfds=[] wfds=[] efds=[] + +2.-00527 + select max=7 rfds=[6] wfds=[] efds=[] to=0.000087 + select=0 rfds=[] wfds=[] efds=[] + +0.009959 + close fd=6 + close=OK + +0.002651 Index: adns/regress/case-alr-slow.err diff -u /dev/null adns/regress/case-alr-slow.err:1.1 --- /dev/null Sun Sep 17 15:32:50 2000 +++ adns/regress/case-alr-slow.err Sat Sep 16 22:48:13 2000 @@ -0,0 +1,27 @@ +adns debug: using nameserver 172.18.45.6 +adnslogres: submitting 172.18.45.1 -> 1.45.18.172.in-addr.arpa. +adnslogres: 1 in queue; checking 172.18.45.1 +adnslogres: submitting 127.0.0.1 -> 1.0.0.127.in-addr.arpa. +adnslogres: 1 in queue; checking 127.0.0.1 +adnslogres: submitting 172.30.206.14 -> 14.206.30.172.in-addr.arpa. +adnslogres: 1 in queue; checking 172.30.206.14 +adnslogres: submitting 127.0.0.1 -> 1.0.0.127.in-addr.arpa. +adnslogres: 2 in queue; checking 172.30.206.14 +adnslogres: submitting 172.18.45.3 -> 3.45.18.172.in-addr.arpa. +adnslogres: 3 in queue; checking 172.30.206.14 +adnslogres: submitting 172.18.45.1 -> 1.45.18.172.in-addr.arpa. +adnslogres: 4 in queue; checking 172.30.206.14 +adnslogres: 3 in queue; checking 127.0.0.1 +adnslogres: 2 in queue; checking 172.18.45.3 +adnslogres: 1 in queue; checking 172.18.45.1 +adnslogres: submitting 172.18.45.8 -> 8.45.18.172.in-addr.arpa. +adnslogres: 1 in queue; checking 172.18.45.8 +adnslogres: submitting 172.18.45.1 -> 1.45.18.172.in-addr.arpa. +adnslogres: 2 in queue; checking 172.18.45.8 +adnslogres: submitting 172.18.45.1 -> 1.45.18.172.in-addr.arpa. +adnslogres: 3 in queue; checking 172.18.45.8 +adnslogres: submitting 172.18.45.6 -> 6.45.18.172.in-addr.arpa. +adnslogres: 4 in queue; checking 172.18.45.8 +adnslogres: 3 in queue; checking 172.18.45.1 +adnslogres: 2 in queue; checking 172.18.45.1 +adnslogres: 1 in queue; checking 172.18.45.6 Index: adns/regress/case-alr-slow.in diff -u /dev/null adns/regress/case-alr-slow.in:1.1 --- /dev/null Sun Sep 17 15:32:50 2000 +++ adns/regress/case-alr-slow.in Sat Sep 16 22:48:13 2000 @@ -0,0 +1,10 @@ +172.18.45.1 - - [13/Sep/2000:23:00:26 +0100] "GET /mirror/debian-non-us/dists/stable/non-US/main/source/Release HTTP/1.0" 304 - +127.0.0.1 - - [13/Sep/2000:23:00:26 +0100] "GET /mirror/debian-non-us/dists/stable/non-US/contrib/source/Sources.gz HTTP/1.0" 304 - +172.30.206.14 - - [13/Sep/2000:23:00:26 +0100] "GET /mirror/debian-non-us/dists/stable/non-US/contrib/source/Release HTTP/1.0" 304 - +127.0.0.1 - - [13/Sep/2000:23:00:26 +0100] "GET /mirror/debian-non-us/dists/stable/non-US/non-free/source/Sources.gz HTTP/1.0" 304 - +172.18.45.3 - - [13/Sep/2000:23:00:26 +0100] "GET /mirror/debian-non-us/dists/stable/non-US/non-free/source/Release HTTP/1.0" 304 - +172.18.45.1 - - [13/Sep/2000:23:01:01 +0100] "GET /mirror/debian-ftp/dists/potato/main/source/devel/cvsweb_1.79-3potato1.dsc HTTP/1.0" 200 604 +172.18.45.8 - - [13/Sep/2000:23:01:01 +0100] "GET /mirror/debian-ftp/dists/potato/main/source/devel/cvsweb_1.79.orig.tar.gz HTTP/1.0" 200 34886 +172.18.45.1 - - [13/Sep/2000:23:01:01 +0100] "GET /mirror/debian-ftp/dists/potato/main/source/devel/cvsweb_1.79.orig.tar.gz HTTP/1.0" 200 34886 +172.18.45.1 - - [13/Sep/2000:23:01:01 +0100] "GET /mirror/debian-ftp/dists/potato/main/source/devel/cvsweb_1.79-3potato1.diff.gz HTTP/1.0" 200 7962 +172.18.45.6 - - [16/Sep/2000:18:35:15 +0100] "GET / HTTP/1.0" 304 - Index: adns/regress/case-alr-slow.out diff -u /dev/null adns/regress/case-alr-slow.out:1.1 --- /dev/null Sun Sep 17 15:32:50 2000 +++ adns/regress/case-alr-slow.out Sat Sep 16 22:48:13 2000 @@ -0,0 +1,11 @@ +sfere.relativity.greenend.org.uk - - [13/Sep/2000:23:00:26 +0100] "GET /mirror/debian-non-us/dists/stable/non-US/main/source/Release HTTP/1.0" 304 - +localhost - - [13/Sep/2000:23:00:26 +0100] "GET /mirror/debian-non-us/dists/stable/non-US/contrib/source/Sources.gz HTTP/1.0" 304 - +172.30.206.14 - - [13/Sep/2000:23:00:26 +0100] "GET /mirror/debian-non-us/dists/stable/non-US/contrib/source/Release HTTP/1.0" 304 - +localhost - - [13/Sep/2000:23:00:26 +0100] "GET /mirror/debian-non-us/dists/stable/non-US/non-free/source/Sources.gz HTTP/1.0" 304 - +172.18.45.3 - - [13/Sep/2000:23:00:26 +0100] "GET /mirror/debian-non-us/dists/stable/non-US/non-free/source/Release HTTP/1.0" 304 - +sfere.relativity.greenend.org.uk - - [13/Sep/2000:23:01:01 +0100] "GET /mirror/debian-ftp/dists/potato/main/source/devel/cvsweb_1.79-3potato1.dsc HTTP/1.0" 200 604 +kadath.relativity.greenend.org.uk - - [13/Sep/2000:23:01:01 +0100] "GET /mirror/debian-ftp/dists/potato/main/source/devel/cvsweb_1.79.orig.tar.gz HTTP/1.0" 200 34886 +sfere.relativity.greenend.org.uk - - [13/Sep/2000:23:01:01 +0100] "GET /mirror/debian-ftp/dists/potato/main/source/devel/cvsweb_1.79.orig.tar.gz HTTP/1.0" 200 34886 +sfere.relativity.greenend.org.uk - - [13/Sep/2000:23:01:01 +0100] "GET /mirror/debian-ftp/dists/potato/main/source/devel/cvsweb_1.79-3potato1.diff.gz HTTP/1.0" 200 7962 +davenant.relativity.greenend.org.uk - - [16/Sep/2000:18:35:15 +0100] "GET / HTTP/1.0" 304 - +rc=0 Index: adns/regress/case-alr-slow.sys diff -u /dev/null adns/regress/case-alr-slow.sys:1.1 --- /dev/null Sun Sep 17 15:32:50 2000 +++ adns/regress/case-alr-slow.sys Sat Sep 16 22:48:13 2000 @@ -0,0 +1,490 @@ +./adnslogres default +-c4 + start 969140728.042464 + socket type=SOCK_DGRAM + socket=6 + +0.000132 + fcntl fd=6 cmd=F_GETFL + fcntl=~O_NONBLOCK&... + +0.000055 + fcntl fd=6 cmd=F_SETFL O_NONBLOCK|... + fcntl=OK + +0.000036 + sendto fd=6 addr=172.18.45.6:53 + 311f0100 00010000 00000000 01310234 35023138 03313732 07696e2d 61646472 + 04617270 6100000c 0001. + sendto=42 + +0.001699 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=OK addr=172.18.45.6:53 + 311f8580 00010001 00020002 01310234 35023138 03313732 07696e2d 61646472 + 04617270 6100000c 0001c00c 000c0001 00015180 00220573 66657265 0a72656c + 61746976 69747908 67726565 6e656e64 036f7267 02756b00 02343502 31380331 + 37320769 6e2d6164 64720461 72706100 00020001 00015180 0006036e 7330c03c + c0580002 00010001 51800006 036e7331 c03cc07a 00010001 00015180 0004ac12 + 2d06c08c 00010001 00015180 0004ac12 2d01. + +0.000712 + sendto fd=6 addr=172.18.45.6:53 + 31200100 00010000 00000000 05736665 72650a72 656c6174 69766974 79086772 + 65656e65 6e64036f 72670275 6b000001 0001. + sendto=50 + +0.000793 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=OK addr=172.18.45.6:53 + 31208580 00010001 00020002 05736665 72650a72 656c6174 69766974 79086772 + 65656e65 6e64036f 72670275 6b000001 0001c00c 00010001 00015180 0004ac12 + 2d010a72 656c6174 69766974 79086772 65656e65 6e64036f 72670275 6b000002 + 00010001 51800006 036e7330 c042c042 00020001 00015180 0006036e 7331c042 + c0680001 00010001 51800004 ac122d06 c07a0001 00010001 51800004 ac122d01. + +0.000563 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=EAGAIN + +0.000114 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=EAGAIN + +0.000088 + sendto fd=6 addr=172.18.45.6:53 + 31210100 00010000 00000000 01310130 01300331 32370769 6e2d6164 64720461 + 72706100 000c0001. + sendto=40 + +0.000861 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=OK addr=172.18.45.6:53 + 31218580 00010001 00010001 01310130 01300331 32370769 6e2d6164 64720461 + 72706100 000c0001 c00c000c 00010009 3a80000b 096c6f63 616c686f 73740003 + 31323707 696e2d61 64647204 61727061 00000200 0100093a 800002c0 34c03400 + 01000100 093a8000 047f0000 01. + +0.000418 + sendto fd=6 addr=172.18.45.6:53 + 31220100 00010000 00000000 096c6f63 616c686f 73740000 010001. + sendto=27 + +0.000544 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=OK addr=172.18.45.6:53 + 31228580 00010001 00010001 096c6f63 616c686f 73740000 010001c0 0c000100 + 0100093a 8000047f 000001c0 0c000200 0100093a 800002c0 0cc00c00 01000100 + 093a8000 047f0000 01. + +0.000304 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=EAGAIN + +0.000093 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=EAGAIN + +0.000085 + sendto fd=6 addr=172.18.45.6:53 + 31230100 00010000 00000000 02313403 32303602 33300331 37320769 6e2d6164 + 64720461 72706100 000c0001. + sendto=44 + +0.000662 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=OK addr=172.18.45.6:53 + 31238580 00010001 00010001 02313403 32303602 33300331 37320769 6e2d6164 + 64720461 72706100 000c0001 c00c000c 00010000 003c002a 06323036 2d31340b + 62726f6b 656e2d7a 6f6e6504 74657374 0763756c 74757265 05646f74 61740261 + 74000332 30360233 30033137 3207696e 2d616464 72046172 70610000 02000100 + 00003c00 20036e73 300a7265 6c617469 76697479 08677265 656e656e 64036f72 + 6702756b 00c08500 01000100 01518000 04ac122d 06. + +0.000619 + sendto fd=6 addr=172.18.45.6:53 + 31240100 00010000 00000000 06323036 2d31340b 62726f6b 656e2d7a 6f6e6504 + 74657374 0763756c 74757265 05646f74 61740261 74000001 0001. + sendto=58 + +0.000988 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=EAGAIN + +0.000073 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=EAGAIN + +0.000105 + sendto fd=6 addr=172.18.45.6:53 + 31250100 00010000 00000000 01310130 01300331 32370769 6e2d6164 64720461 + 72706100 000c0001. + sendto=40 + +0.001370 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=OK addr=172.18.45.6:53 + 31258580 00010001 00010001 01310130 01300331 32370769 6e2d6164 64720461 + 72706100 000c0001 c00c000c 00010009 3a80000b 096c6f63 616c686f 73740003 + 31323707 696e2d61 64647204 61727061 00000200 0100093a 800002c0 34c03400 + 01000100 093a8000 047f0000 01. + +0.000427 + sendto fd=6 addr=172.18.45.6:53 + 31260100 00010000 00000000 096c6f63 616c686f 73740000 010001. + sendto=27 + +0.000576 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=OK addr=172.18.45.6:53 + 31268580 00010001 00010001 096c6f63 616c686f 73740000 010001c0 0c000100 + 0100093a 8000047f 000001c0 0c000200 0100093a 800002c0 0cc00c00 01000100 + 093a8000 047f0000 01. + +0.000307 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=EAGAIN + +0.000094 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=EAGAIN + +0.000085 + sendto fd=6 addr=172.18.45.6:53 + 31270100 00010000 00000000 01330234 35023138 03313732 07696e2d 61646472 + 04617270 6100000c 0001. + sendto=42 + +0.000604 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=OK addr=172.18.45.6:53 + 31278583 00010000 00010000 01330234 35023138 03313732 07696e2d 61646472 + 04617270 6100000c 00010234 35023138 03313732 07696e2d 61646472 04617270 + 61000006 00010001 51800041 036e7330 0a72656c 61746976 69747908 67726565 + 6e656e64 036f7267 02756b00 0a686f73 746d6173 746572c0 50000000 2800001c + 2000000e 1000093a 80000151 80. + +0.000502 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=EAGAIN + +0.000088 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=EAGAIN + +0.000077 + sendto fd=6 addr=172.18.45.6:53 + 31280100 00010000 00000000 01310234 35023138 03313732 07696e2d 61646472 + 04617270 6100000c 0001. + sendto=42 + +0.000682 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=OK addr=172.18.45.6:53 + 31288580 00010001 00020002 01310234 35023138 03313732 07696e2d 61646472 + 04617270 6100000c 0001c00c 000c0001 00015180 00220573 66657265 0a72656c + 61746976 69747908 67726565 6e656e64 036f7267 02756b00 02343502 31380331 + 37320769 6e2d6164 64720461 72706100 00020001 00015180 0006036e 7330c03c + c0580002 00010001 51800006 036e7331 c03cc07a 00010001 00015180 0004ac12 + 2d06c08c 00010001 00015180 0004ac12 2d01. + +0.000618 + sendto fd=6 addr=172.18.45.6:53 + 31290100 00010000 00000000 05736665 72650a72 656c6174 69766974 79086772 + 65656e65 6e64036f 72670275 6b000001 0001. + sendto=50 + +0.000791 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=OK addr=172.18.45.6:53 + 31298580 00010001 00020002 05736665 72650a72 656c6174 69766974 79086772 + 65656e65 6e64036f 72670275 6b000001 0001c00c 00010001 00015180 0004ac12 + 2d010a72 656c6174 69766974 79086772 65656e65 6e64036f 72670275 6b000002 + 00010001 51800006 036e7330 c042c042 00020001 00015180 0006036e 7331c042 + c0680001 00010001 51800004 ac122d06 c07a0001 00010001 51800004 ac122d01. + +0.000561 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=EAGAIN + +0.000108 + select max=7 rfds=[6] wfds=[] efds=[] to=1.991325 + select=0 rfds=[] wfds=[] efds=[] + +2.-00943 + sendto fd=6 addr=172.18.45.6:53 + 31240100 00010000 00000000 06323036 2d31340b 62726f6b 656e2d7a 6f6e6504 + 74657374 0763756c 74757265 05646f74 61740261 74000001 0001. + sendto=58 + +0.000465 + select max=7 rfds=[6] wfds=[] efds=[] to=1.999535 + select=0 rfds=[] wfds=[] efds=[] + +2.-00565 + select max=7 rfds=[6] wfds=[] efds=[] to=0.000100 + select=0 rfds=[] wfds=[] efds=[] + +0.010007 + sendto fd=6 addr=172.18.45.6:53 + 31240100 00010000 00000000 06323036 2d31340b 62726f6b 656e2d7a 6f6e6504 + 74657374 0763756c 74757265 05646f74 61740261 74000001 0001. + sendto=58 + +0.000452 + select max=7 rfds=[6] wfds=[] efds=[] to=1.999548 + select=0 rfds=[] wfds=[] efds=[] + +2.-00527 + select max=7 rfds=[6] wfds=[] efds=[] to=0.000075 + select=0 rfds=[] wfds=[] efds=[] + +0.009951 + sendto fd=6 addr=172.18.45.6:53 + 31240100 00010000 00000000 06323036 2d31340b 62726f6b 656e2d7a 6f6e6504 + 74657374 0763756c 74757265 05646f74 61740261 74000001 0001. + sendto=58 + +0.000482 + select max=7 rfds=[6] wfds=[] efds=[] to=1.999518 + select=0 rfds=[] wfds=[] efds=[] + +2.-00551 + select max=7 rfds=[6] wfds=[] efds=[] to=0.000069 + select=0 rfds=[] wfds=[] efds=[] + +0.009997 + sendto fd=6 addr=172.18.45.6:53 + 31240100 00010000 00000000 06323036 2d31340b 62726f6b 656e2d7a 6f6e6504 + 74657374 0763756c 74757265 05646f74 61740261 74000001 0001. + sendto=58 + +0.000470 + select max=7 rfds=[6] wfds=[] efds=[] to=1.999530 + select=0 rfds=[] wfds=[] efds=[] + +2.-00493 + select max=7 rfds=[6] wfds=[] efds=[] to=0.000023 + select=0 rfds=[] wfds=[] efds=[] + +0.009900 + sendto fd=6 addr=172.18.45.6:53 + 31240100 00010000 00000000 06323036 2d31340b 62726f6b 656e2d7a 6f6e6504 + 74657374 0763756c 74757265 05646f74 61740261 74000001 0001. + sendto=58 + +0.000440 + select max=7 rfds=[6] wfds=[] efds=[] to=1.999560 + select=0 rfds=[] wfds=[] efds=[] + +2.-00521 + select max=7 rfds=[6] wfds=[] efds=[] to=0.000081 + select=0 rfds=[] wfds=[] efds=[] + +0.010009 + sendto fd=6 addr=172.18.45.6:53 + 31240100 00010000 00000000 06323036 2d31340b 62726f6b 656e2d7a 6f6e6504 + 74657374 0763756c 74757265 05646f74 61740261 74000001 0001. + sendto=58 + +0.000453 + select max=7 rfds=[6] wfds=[] efds=[] to=1.999547 + select=0 rfds=[] wfds=[] efds=[] + +2.-00538 + select max=7 rfds=[6] wfds=[] efds=[] to=0.000085 + select=0 rfds=[] wfds=[] efds=[] + +0.009962 + sendto fd=6 addr=172.18.45.6:53 + 31240100 00010000 00000000 06323036 2d31340b 62726f6b 656e2d7a 6f6e6504 + 74657374 0763756c 74757265 05646f74 61740261 74000001 0001. + sendto=58 + +0.000465 + select max=7 rfds=[6] wfds=[] efds=[] to=1.999535 + select=0 rfds=[] wfds=[] efds=[] + +2.-00544 + select max=7 rfds=[6] wfds=[] efds=[] to=0.000079 + select=0 rfds=[] wfds=[] efds=[] + +0.010006 + sendto fd=6 addr=172.18.45.6:53 + 31240100 00010000 00000000 06323036 2d31340b 62726f6b 656e2d7a 6f6e6504 + 74657374 0763756c 74757265 05646f74 61740261 74000001 0001. + sendto=58 + +0.000434 + select max=7 rfds=[6] wfds=[] efds=[] to=1.999566 + select=0 rfds=[] wfds=[] efds=[] + +2.-00522 + select max=7 rfds=[6] wfds=[] efds=[] to=0.000088 + select=0 rfds=[] wfds=[] efds=[] + +0.009963 + sendto fd=6 addr=172.18.45.6:53 + 31240100 00010000 00000000 06323036 2d31340b 62726f6b 656e2d7a 6f6e6504 + 74657374 0763756c 74757265 05646f74 61740261 74000001 0001. + sendto=58 + +0.000449 + select max=7 rfds=[6] wfds=[] efds=[] to=1.999551 + select=0 rfds=[] wfds=[] efds=[] + +2.-00525 + select max=7 rfds=[6] wfds=[] efds=[] to=0.000076 + select=0 rfds=[] wfds=[] efds=[] + +0.010006 + sendto fd=6 addr=172.18.45.6:53 + 31240100 00010000 00000000 06323036 2d31340b 62726f6b 656e2d7a 6f6e6504 + 74657374 0763756c 74757265 05646f74 61740261 74000001 0001. + sendto=58 + +0.000443 + select max=7 rfds=[6] wfds=[] efds=[] to=1.999557 + select=0 rfds=[] wfds=[] efds=[] + +2.-00530 + select max=7 rfds=[6] wfds=[] efds=[] to=0.000087 + select=0 rfds=[] wfds=[] efds=[] + +0.009961 + sendto fd=6 addr=172.18.45.6:53 + 31240100 00010000 00000000 06323036 2d31340b 62726f6b 656e2d7a 6f6e6504 + 74657374 0763756c 74757265 05646f74 61740261 74000001 0001. + sendto=58 + +0.000461 + select max=7 rfds=[6] wfds=[] efds=[] to=1.999539 + select=0 rfds=[] wfds=[] efds=[] + +2.-00539 + select max=7 rfds=[6] wfds=[] efds=[] to=0.000078 + select=0 rfds=[] wfds=[] efds=[] + +0.010006 + sendto fd=6 addr=172.18.45.6:53 + 31240100 00010000 00000000 06323036 2d31340b 62726f6b 656e2d7a 6f6e6504 + 74657374 0763756c 74757265 05646f74 61740261 74000001 0001. + sendto=58 + +0.000485 + select max=7 rfds=[6] wfds=[] efds=[] to=1.999515 + select=0 rfds=[] wfds=[] efds=[] + +2.-00404 + sendto fd=6 addr=172.18.45.6:53 + 31240100 00010000 00000000 06323036 2d31340b 62726f6b 656e2d7a 6f6e6504 + 74657374 0763756c 74757265 05646f74 61740261 74000001 0001. + sendto=58 + +0.000584 + select max=7 rfds=[6] wfds=[] efds=[] to=1.999416 + select=0 rfds=[] wfds=[] efds=[] + +2.019228 + sendto fd=6 addr=172.18.45.6:53 + 31240100 00010000 00000000 06323036 2d31340b 62726f6b 656e2d7a 6f6e6504 + 74657374 0763756c 74757265 05646f74 61740261 74000001 0001. + sendto=58 + +0.000586 + select max=7 rfds=[6] wfds=[] efds=[] to=1.999414 + select=0 rfds=[] wfds=[] efds=[] + +2.-00751 + select max=7 rfds=[6] wfds=[] efds=[] to=0.000165 + select=0 rfds=[] wfds=[] efds=[] + +0.009979 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=EAGAIN + +0.000185 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=EAGAIN + +0.000085 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=EAGAIN + +0.000118 + sendto fd=6 addr=172.18.45.6:53 + 312a0100 00010000 00000000 01380234 35023138 03313732 07696e2d 61646472 + 04617270 6100000c 0001. + sendto=42 + +0.000517 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=EAGAIN + +0.000061 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=EAGAIN + +0.000075 + sendto fd=6 addr=172.18.45.6:53 + 312b0100 00010000 00000000 01310234 35023138 03313732 07696e2d 61646472 + 04617270 6100000c 0001. + sendto=42 + +0.000277 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=EAGAIN + +0.000056 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=EAGAIN + +0.000071 + sendto fd=6 addr=172.18.45.6:53 + 312c0100 00010000 00000000 01310234 35023138 03313732 07696e2d 61646472 + 04617270 6100000c 0001. + sendto=42 + +0.000277 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=EAGAIN + +0.000057 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=EAGAIN + +0.000244 + sendto fd=6 addr=172.18.45.6:53 + 312d0100 00010000 00000000 01360234 35023138 03313732 07696e2d 61646472 + 04617270 6100000c 0001. + sendto=42 + +0.000290 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=EAGAIN + +0.000058 + select max=7 rfds=[6] wfds=[] efds=[] to=1.998017 + select=1 rfds=[6] wfds=[] efds=[] + +0.001322 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=OK addr=172.18.45.6:53 + 312a8580 00010001 00020002 01380234 35023138 03313732 07696e2d 61646472 + 04617270 6100000c 0001c00c 000c0001 00015180 0023066b 61646174 680a7265 + 6c617469 76697479 08677265 656e656e 64036f72 6702756b 00023435 02313803 + 31373207 696e2d61 64647204 61727061 00000200 01000151 80000603 6e7330c0 + 3dc05900 02000100 01518000 06036e73 31c03dc0 7b000100 01000151 800004ac + 122d06c0 8d000100 01000151 800004ac 122d01. + +0.000775 + sendto fd=6 addr=172.18.45.6:53 + 312e0100 00010000 00000000 066b6164 6174680a 72656c61 74697669 74790867 + 7265656e 656e6403 6f726702 756b0000 010001. + sendto=51 + +0.000366 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=OK addr=172.18.45.6:53 + 312b8580 00010001 00020002 01310234 35023138 03313732 07696e2d 61646472 + 04617270 6100000c 0001c00c 000c0001 00015180 00220573 66657265 0a72656c + 61746976 69747908 67726565 6e656e64 036f7267 02756b00 02343502 31380331 + 37320769 6e2d6164 64720461 72706100 00020001 00015180 0006036e 7330c03c + c0580002 00010001 51800006 036e7331 c03cc07a 00010001 00015180 0004ac12 + 2d06c08c 00010001 00015180 0004ac12 2d01. + +0.000770 + sendto fd=6 addr=172.18.45.6:53 + 312f0100 00010000 00000000 05736665 72650a72 656c6174 69766974 79086772 + 65656e65 6e64036f 72670275 6b000001 0001. + sendto=50 + +0.000328 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=OK addr=172.18.45.6:53 + 312c8580 00010001 00020002 01310234 35023138 03313732 07696e2d 61646472 + 04617270 6100000c 0001c00c 000c0001 00015180 00220573 66657265 0a72656c + 61746976 69747908 67726565 6e656e64 036f7267 02756b00 02343502 31380331 + 37320769 6e2d6164 64720461 72706100 00020001 00015180 0006036e 7330c03c + c0580002 00010001 51800006 036e7331 c03cc07a 00010001 00015180 0004ac12 + 2d06c08c 00010001 00015180 0004ac12 2d01. + +0.000766 + sendto fd=6 addr=172.18.45.6:53 + 31300100 00010000 00000000 05736665 72650a72 656c6174 69766974 79086772 + 65656e65 6e64036f 72670275 6b000001 0001. + sendto=50 + +0.000326 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=OK addr=172.18.45.6:53 + 312d8580 00010001 00020002 01360234 35023138 03313732 07696e2d 61646472 + 04617270 6100000c 0001c00c 000c0001 00015180 00250864 6176656e 616e740a + 72656c61 74697669 74790867 7265656e 656e6403 6f726702 756b0002 34350231 + 38033137 3207696e 2d616464 72046172 70610000 02000100 01518000 06036e73 + 30c03fc0 5b000200 01000151 80000603 6e7331c0 3fc07d00 01000100 01518000 + 04ac122d 06c08f00 01000100 01518000 04ac122d 01. + +0.000605 + sendto fd=6 addr=172.18.45.6:53 + 31310100 00010000 00000000 08646176 656e616e 740a7265 6c617469 76697479 + 08677265 656e656e 64036f72 6702756b 00000100 01. + sendto=53 + +0.000473 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=EAGAIN + +0.000073 + select max=7 rfds=[6] wfds=[] efds=[] to=1.995518 + select=1 rfds=[6] wfds=[] efds=[] + +0.001210 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=OK addr=172.18.45.6:53 + 312e8580 00010001 00020002 066b6164 6174680a 72656c61 74697669 74790867 + 7265656e 656e6403 6f726702 756b0000 010001c0 0c000100 01000151 800004ac + 122d080a 72656c61 74697669 74790867 7265656e 656e6403 6f726702 756b0000 + 02000100 01518000 06036e73 30c043c0 43000200 01000151 80000603 6e7331c0 + 43c06900 01000100 01518000 04ac122d 06c07b00 01000100 01518000 04ac122d + 01. + +0.000754 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=OK addr=172.18.45.6:53 + 312f8580 00010001 00020002 05736665 72650a72 656c6174 69766974 79086772 + 65656e65 6e64036f 72670275 6b000001 0001c00c 00010001 00015180 0004ac12 + 2d010a72 656c6174 69766974 79086772 65656e65 6e64036f 72670275 6b000002 + 00010001 51800006 036e7330 c042c042 00020001 00015180 0006036e 7331c042 + c0680001 00010001 51800004 ac122d06 c07a0001 00010001 51800004 ac122d01. + +0.000613 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=OK addr=172.18.45.6:53 + 31308580 00010001 00020002 05736665 72650a72 656c6174 69766974 79086772 + 65656e65 6e64036f 72670275 6b000001 0001c00c 00010001 00015180 0004ac12 + 2d010a72 656c6174 69766974 79086772 65656e65 6e64036f 72670275 6b000002 + 00010001 51800006 036e7330 c042c042 00020001 00015180 0006036e 7331c042 + c0680001 00010001 51800004 ac122d06 c07a0001 00010001 51800004 ac122d01. + +0.000633 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=OK addr=172.18.45.6:53 + 31318580 00010001 00020002 08646176 656e616e 740a7265 6c617469 76697479 + 08677265 656e656e 64036f72 6702756b 00000100 01c00c00 01000100 01518000 + 04ac122d 060a7265 6c617469 76697479 08677265 656e656e 64036f72 6702756b + 00000200 01000151 80000603 6e7330c0 45c04500 02000100 01518000 06036e73 + 31c045c0 6b000100 01000151 800004ac 122d06c0 7d000100 01000151 800004ac + 122d01. + +0.000596 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=EAGAIN + +0.000128 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=EAGAIN + +0.000108 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=EAGAIN + +0.000082 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=EAGAIN + +0.000080 + close fd=6 + close=OK + +0.000176 Index: adns/regress/case-arf-norm.err diff -u /dev/null adns/regress/case-arf-norm.err:1.1 --- /dev/null Sun Sep 17 15:32:50 2000 +++ adns/regress/case-arf-norm.err Sat Sep 16 22:48:13 2000 @@ -0,0 +1,2 @@ +adns debug: using nameserver 172.18.45.6 +adns test harness: memory leaked: 11(12) 24(76) 31(12) 43(48) 48(12) 60(72) 65(12) 77(72) Index: adns/regress/case-arf-norm.out diff -u /dev/null adns/regress/case-arf-norm.out:1.1 --- /dev/null Sun Sep 17 15:32:50 2000 +++ adns/regress/case-arf-norm.out Sat Sep 16 22:48:13 2000 @@ -0,0 +1 @@ +rc=0 Index: adns/regress/case-arf-norm.sys diff -u /dev/null adns/regress/case-arf-norm.sys:1.1 --- /dev/null Sun Sep 17 15:32:50 2000 +++ adns/regress/case-arf-norm.sys Sat Sep 16 22:48:13 2000 @@ -0,0 +1,324 @@ +./adnsresfilter default + + start 969138236.380176 + fcntl fd=0 cmd=F_GETFL + fcntl=~O_NONBLOCK&... + +0.000136 + fcntl fd=0 cmd=F_SETFL O_NONBLOCK|... + fcntl=OK + +0.000047 + fcntl fd=1 cmd=F_GETFL + fcntl=~O_NONBLOCK&... + +0.000034 + fcntl fd=1 cmd=F_SETFL O_NONBLOCK|... + fcntl=OK + +0.000034 + socket type=SOCK_DGRAM + socket=6 + +0.004723 + fcntl fd=6 cmd=F_GETFL + fcntl=~O_NONBLOCK&... + +0.000048 + fcntl fd=6 cmd=F_SETFL O_NONBLOCK|... + fcntl=OK + +0.000041 + select max=2 rfds=[0] wfds=[] efds=[] to=null + select=1 rfds=[0] wfds=[] efds=[] + +3.476363 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=EAGAIN + +0.000178 + read fd=0 buflen=512 + read=OK + 736f6d65 206f7264 696e6172 79207465 78740a. + +0.000149 + write fd=1 + 736f6d65 206f7264 696e6172 79207465 78740a. + write=19 + +0.000594 + select max=2 rfds=[0] wfds=[] efds=[] to=null + select=1 rfds=[0] wfds=[] efds=[] + +1.-12312 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=EAGAIN + +0.000119 + read fd=0 buflen=512 + read=OK + 616e2069 70206164 64726573 73206174 20656f6c 20313732 2e31382e 34352e36 + 0a. + +0.000185 + sendto fd=6 addr=172.18.45.6:53 + 311f0100 00010000 00000000 01360234 35023138 03313732 07696e2d 61646472 + 04617270 6100000c 0001. + sendto=42 + +0.000902 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=OK addr=172.18.45.6:53 + 311f8580 00010001 00020002 01360234 35023138 03313732 07696e2d 61646472 + 04617270 6100000c 0001c00c 000c0001 00015180 00250864 6176656e 616e740a + 72656c61 74697669 74790867 7265656e 656e6403 6f726702 756b0002 34350231 + 38033137 3207696e 2d616464 72046172 70610000 02000100 01518000 06036e73 + 30c03fc0 5b000200 01000151 80000603 6e7331c0 3fc07d00 01000100 01518000 + 04ac122d 06c08f00 01000100 01518000 04ac122d 01. + +0.000707 + sendto fd=6 addr=172.18.45.6:53 + 31200100 00010000 00000000 08646176 656e616e 740a7265 6c617469 76697479 + 08677265 656e656e 64036f72 6702756b 00000100 01. + sendto=53 + +0.000758 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=OK addr=172.18.45.6:53 + 31208580 00010001 00020002 08646176 656e616e 740a7265 6c617469 76697479 + 08677265 656e656e 64036f72 6702756b 00000100 01c00c00 01000100 01518000 + 04ac122d 060a7265 6c617469 76697479 08677265 656e656e 64036f72 6702756b + 00000200 01000151 80000603 6e7330c0 45c04500 02000100 01518000 06036e73 + 31c045c0 6b000100 01000151 800004ac 122d06c0 7d000100 01000151 800004ac + 122d01. + +0.000572 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=EAGAIN + +0.000146 + write fd=1 + 616e2069 70206164 64726573 73206174 20656f6c 20. + write=21 + +0.000426 + select max=7 rfds=[0,6] wfds=[] efds=[] to=0.996185 + select=0 rfds=[] wfds=[] efds=[] + +1.-05562 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=EAGAIN + +0.000093 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=EAGAIN + +0.000061 + write fd=1 + 64617665 6e616e74 2e72656c 61746976 6974792e 67726565 6e656e64 2e6f7267 + 2e756b. + write=35 + +0.000473 + write fd=1 + 0a. + write=1 + +0.000500 + select max=2 rfds=[0] wfds=[] efds=[] to=null + select=1 rfds=[0] wfds=[] efds=[] + +1.-31596 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=EAGAIN + +0.000127 + read fd=0 buflen=512 + read=OK + 616e2069 70206164 64726573 73203132 372e302e 302e3120 696e206d 6964646c + 650a. + +0.000190 + sendto fd=6 addr=172.18.45.6:53 + 31210100 00010000 00000000 01310130 01300331 32370769 6e2d6164 64720461 + 72706100 000c0001. + sendto=40 + +0.000787 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=OK addr=172.18.45.6:53 + 31218580 00010001 00010001 01310130 01300331 32370769 6e2d6164 64720461 + 72706100 000c0001 c00c000c 00010009 3a80000b 096c6f63 616c686f 73740003 + 31323707 696e2d61 64647204 61727061 00000200 0100093a 800002c0 34c03400 + 01000100 093a8000 047f0000 01. + +0.000417 + sendto fd=6 addr=172.18.45.6:53 + 31220100 00010000 00000000 096c6f63 616c686f 73740000 010001. + sendto=27 + +0.000523 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=OK addr=172.18.45.6:53 + 31228580 00010001 00010001 096c6f63 616c686f 73740000 010001c0 0c000100 + 0100093a 8000047f 000001c0 0c000200 0100093a 800002c0 0cc00c00 01000100 + 093a8000 047f0000 01. + +0.000310 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=EAGAIN + +0.000120 + write fd=1 + 616e2069 70206164 64726573 7320. + write=14 + +0.000394 + select max=7 rfds=[0,6] wfds=[] efds=[] to=0.997132 + select=0 rfds=[] wfds=[] efds=[] + +1.-02556 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=EAGAIN + +0.000082 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=EAGAIN + +0.000054 + write fd=1 + 6c6f6361 6c686f73 74. + write=9 + +0.000354 + write fd=1 + 20696e20 6d696464 6c650a. + write=11 + +0.000538 + select max=2 rfds=[0] wfds=[] efds=[] to=null + select=1 rfds=[0] wfds=[] efds=[] + +5.-307533 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=EAGAIN + +0.000115 + read fd=0 buflen=512 + read=OK + 3137322e 31382e34 352e3120 616e2061 64647265 73732061 74206265 67696e0a. + +0.000165 + sendto fd=6 addr=172.18.45.6:53 + 31230100 00010000 00000000 01310234 35023138 03313732 07696e2d 61646472 + 04617270 6100000c 0001. + sendto=42 + +0.000691 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=OK addr=172.18.45.6:53 + 31238580 00010001 00020002 01310234 35023138 03313732 07696e2d 61646472 + 04617270 6100000c 0001c00c 000c0001 00015180 00220573 66657265 0a72656c + 61746976 69747908 67726565 6e656e64 036f7267 02756b00 02343502 31380331 + 37320769 6e2d6164 64720461 72706100 00020001 00015180 0006036e 7330c03c + c0580002 00010001 51800006 036e7331 c03cc07a 00010001 00015180 0004ac12 + 2d06c08c 00010001 00015180 0004ac12 2d01. + +0.000621 + sendto fd=6 addr=172.18.45.6:53 + 31240100 00010000 00000000 05736665 72650a72 656c6174 69766974 79086772 + 65656e65 6e64036f 72670275 6b000001 0001. + sendto=50 + +0.000716 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=OK addr=172.18.45.6:53 + 31248580 00010001 00020002 05736665 72650a72 656c6174 69766974 79086772 + 65656e65 6e64036f 72670275 6b000001 0001c00c 00010001 00015180 0004ac12 + 2d010a72 656c6174 69766974 79086772 65656e65 6e64036f 72670275 6b000002 + 00010001 51800006 036e7330 c042c042 00020001 00015180 0006036e 7331c042 + c0680001 00010001 51800004 ac122d06 c07a0001 00010001 51800004 ac122d01. + +0.000562 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=EAGAIN + +0.000137 + select max=7 rfds=[0,6] wfds=[] efds=[] to=0.996993 + select=0 rfds=[] wfds=[] efds=[] + +1.-06724 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=EAGAIN + +0.000083 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=EAGAIN + +0.000055 + write fd=1 + 73666572 652e7265 6c617469 76697479 2e677265 656e656e 642e6f72 672e756b. + write=32 + +0.000440 + write fd=1 + 20616e20 61646472 65737320 61742062 6567696e 0a. + write=21 + +0.000570 + select max=2 rfds=[0] wfds=[] efds=[] to=null + select=1 rfds=[0] wfds=[] efds=[] + +4.-137179 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=EAGAIN + +0.000103 + read fd=0 buflen=512 + read=OK + 3137322e 31382e34 352e34. + +0.000101 + select max=2 rfds=[0] wfds=[] efds=[] to=null + select=1 rfds=[0] wfds=[] efds=[] + +4.-28658 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=EAGAIN + +0.000121 + read fd=0 buflen=512 + read=OK + 3020736f 6d652073 74756666 0a. + +0.000112 + sendto fd=6 addr=172.18.45.6:53 + 31250100 00010000 00000000 02343002 34350231 38033137 3207696e 2d616464 + 72046172 70610000 0c0001. + sendto=43 + +0.000747 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=OK addr=172.18.45.6:53 + 31258580 00010001 00020002 02343002 34350231 38033137 3207696e 2d616464 + 72046172 70610000 0c0001c0 0c000c00 01000151 80002306 6e6f7277 61790a72 + 656c6174 69766974 79086772 65656e65 6e64036f 72670275 6b000234 35023138 + 03313732 07696e2d 61646472 04617270 61000002 00010001 51800006 036e7330 + c03ec05a 00020001 00015180 0006036e 7331c03e c07c0001 00010001 51800004 + ac122d06 c08e0001 00010001 51800004 ac122d01. + +0.000628 + sendto fd=6 addr=172.18.45.6:53 + 31260100 00010000 00000000 066e6f72 7761790a 72656c61 74697669 74790867 + 7265656e 656e6403 6f726702 756b0000 010001. + sendto=51 + +0.000678 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=OK addr=172.18.45.6:53 + 31268580 00010001 00020002 066e6f72 7761790a 72656c61 74697669 74790867 + 7265656e 656e6403 6f726702 756b0000 010001c0 0c000100 01000151 800004ac + 122d280a 72656c61 74697669 74790867 7265656e 656e6403 6f726702 756b0000 + 02000100 01518000 06036e73 30c043c0 43000200 01000151 80000603 6e7331c0 + 43c06900 01000100 01518000 04ac122d 06c07b00 01000100 01518000 04ac122d + 01. + +0.000566 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=EAGAIN + +0.000135 + select max=7 rfds=[0,6] wfds=[] efds=[] to=0.997013 + select=0 rfds=[] wfds=[] efds=[] + +1.-08851 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=EAGAIN + +0.000087 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=EAGAIN + +0.000057 + write fd=1 + 6e6f7277 61792e72 656c6174 69766974 792e6772 65656e65 6e642e6f 72672e75 + 6b. + write=33 + +0.000466 + write fd=1 + 20736f6d 65207374 7566660a. + write=12 + +0.000545 + select max=2 rfds=[0] wfds=[] efds=[] to=null + select=1 rfds=[0] wfds=[] efds=[] + +2.-184099 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=EAGAIN + +0.000114 + read fd=0 buflen=512 + read=OK + 28627261 636b6574 73290a. + +0.000107 + write fd=1 + 28627261 636b6574 73290a. + write=11 + +0.000495 + select max=2 rfds=[0] wfds=[] efds=[] to=null + select=1 rfds=[0] wfds=[] efds=[] + +0.323183 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=EAGAIN + +0.000084 + read fd=0 buflen=512 + read=OK + . + +0.000063 + fcntl fd=0 cmd=F_GETFL + fcntl=O_NONBLOCK|... + +0.000041 + fcntl fd=0 cmd=F_SETFL ~O_NONBLOCK&... + fcntl=OK + +0.000033 + fcntl fd=1 cmd=F_GETFL + fcntl=O_NONBLOCK|... + +0.000034 + fcntl fd=1 cmd=F_SETFL ~O_NONBLOCK&... + fcntl=OK + +0.000033 + close fd=6 + close=OK + +0.000090 Index: adns/regress/case-arf-text.err diff -u /dev/null adns/regress/case-arf-text.err:1.1 --- /dev/null Sun Sep 17 15:32:50 2000 +++ adns/regress/case-arf-text.err Sat Sep 16 22:48:13 2000 @@ -0,0 +1 @@ +adns debug: using nameserver 172.18.45.6 Index: adns/regress/case-arf-text.out diff -u /dev/null adns/regress/case-arf-text.out:1.1 --- /dev/null Sun Sep 17 15:32:50 2000 +++ adns/regress/case-arf-text.out Sat Sep 16 22:48:13 2000 @@ -0,0 +1 @@ +rc=0 Index: adns/regress/case-arf-text.sys diff -u /dev/null adns/regress/case-arf-text.sys:1.1 --- /dev/null Sun Sep 17 15:32:50 2000 +++ adns/regress/case-arf-text.sys Sat Sep 16 22:48:13 2000 @@ -0,0 +1,63 @@ +./adnsresfilter default + + start 969137967.465922 + fcntl fd=0 cmd=F_GETFL + fcntl=~O_NONBLOCK&... + +0.000132 + fcntl fd=0 cmd=F_SETFL O_NONBLOCK|... + fcntl=OK + +0.000049 + fcntl fd=1 cmd=F_GETFL + fcntl=~O_NONBLOCK&... + +0.000034 + fcntl fd=1 cmd=F_SETFL O_NONBLOCK|... + fcntl=OK + +0.000033 + socket type=SOCK_DGRAM + socket=6 + +0.004099 + fcntl fd=6 cmd=F_GETFL + fcntl=~O_NONBLOCK&... + +0.000057 + fcntl fd=6 cmd=F_SETFL O_NONBLOCK|... + fcntl=OK + +0.000034 + select max=2 rfds=[0] wfds=[] efds=[] to=null + select=1 rfds=[0] wfds=[] efds=[] + +2.095986 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=EAGAIN + +0.000177 + read fd=0 buflen=512 + read=OK + 74657874 206f6e6c 790a. + +0.000121 + write fd=1 + 74657874 206f6e6c 790a. + write=10 + +0.000636 + select max=2 rfds=[0] wfds=[] efds=[] to=null + select=1 rfds=[0] wfds=[] efds=[] + +0.349329 + recvfrom fd=6 buflen=512 *addrlen=16 + recvfrom=EAGAIN + +0.000085 + read fd=0 buflen=512 + read=OK + . + +0.000064 + fcntl fd=0 cmd=F_GETFL + fcntl=O_NONBLOCK|... + +0.000043 + fcntl fd=0 cmd=F_SETFL ~O_NONBLOCK&... + fcntl=OK + +0.000065 + fcntl fd=1 cmd=F_GETFL + fcntl=O_NONBLOCK|... + +0.000036 + fcntl fd=1 cmd=F_SETFL ~O_NONBLOCK&... + fcntl=OK + +0.000032 + close fd=6 + close=OK + +0.000117 Index: adns/regress/case-brokenmail.sys diff -u adns/regress/case-brokenmail.sys:1.1 adns/regress/case-brokenmail.sys:1.2 --- adns/regress/case-brokenmail.sys:1.1 Sun Aug 15 15:24:15 1999 +++ adns/regress/case-brokenmail.sys Sat Sep 16 18:35:01 2000 @@ -1,4 +1,4 @@ -default +adnstest default :15,65551 broken-mail.test.iwj.relativity.greenend.org.uk. 256/broken-mail.test.iwj.relativity.greenend.org.uk. 0x104/broken-mail.test.iwj.relativity.greenend.org.uk. start 934726868.117908 socket type=SOCK_DGRAM Index: adns/regress/case-child.sys diff -u adns/regress/case-child.sys:1.1 adns/regress/case-child.sys:1.2 --- adns/regress/case-child.sys:1.1 Thu Jun 17 00:16:25 1999 +++ adns/regress/case-child.sys Sat Sep 16 18:35:01 2000 @@ -1,4 +1,4 @@ -default +adnstest default :65548 134.76.224.195.in-addr.arpa start 929574747.401802 socket type=SOCK_DGRAM Index: adns/regress/case-cnametocname.sys diff -u adns/regress/case-cnametocname.sys:1.1 adns/regress/case-cnametocname.sys:1.2 --- adns/regress/case-cnametocname.sys:1.1 Sun Sep 26 19:22:44 1999 +++ adns/regress/case-cnametocname.sys Sat Sep 16 18:35:01 2000 @@ -1,4 +1,4 @@ -default +adnstest default :1 intel.ugcs.caltech.edu. start 938369896.279735 socket type=SOCK_DGRAM Index: adns/regress/case-comprinf.sys diff -u adns/regress/case-comprinf.sys:1.1 adns/regress/case-comprinf.sys:1.2 --- adns/regress/case-comprinf.sys:1.1 Thu Mar 2 01:45:37 2000 +++ adns/regress/case-comprinf.sys Sat Sep 16 18:35:01 2000 @@ -1,4 +1,4 @@ -default +adnstest default :12 37.45.18.172.in-addr.arpa. start 951961094.184850 socket type=SOCK_DGRAM Index: adns/regress/case-datapluscname.sys diff -u adns/regress/case-datapluscname.sys:1.1 adns/regress/case-datapluscname.sys:1.2 --- adns/regress/case-datapluscname.sys:1.1 Thu Aug 5 01:03:20 1999 +++ adns/regress/case-datapluscname.sys Sat Sep 16 18:35:01 2000 @@ -1,4 +1,4 @@ -default +adnstest default 292/170.99.219.194.in-addr.arpa start 933809668.543946 socket type=SOCK_DGRAM Index: adns/regress/case-datapluscnamewait.sys diff -u adns/regress/case-datapluscnamewait.sys:1.2 adns/regress/case-datapluscnamewait.sys:1.3 --- adns/regress/case-datapluscnamewait.sys:1.2 Sun May 7 16:30:18 2000 +++ adns/regress/case-datapluscnamewait.sys Sat Sep 16 18:35:01 2000 @@ -1,4 +1,4 @@ -default +adnstest default 292/170.99.219.194.in-addr.arpa start 933809632.795174 socket type=SOCK_DGRAM Index: adns/regress/case-flags10.sys diff -u adns/regress/case-flags10.sys:1.2 adns/regress/case-flags10.sys:1.3 --- adns/regress/case-flags10.sys:1.2 Tue Nov 2 23:40:14 1999 +++ adns/regress/case-flags10.sys Sat Sep 16 18:35:01 2000 @@ -1,4 +1,4 @@ -default +adnstest default :1 ,aaaaaaaaaa/chiark.greenend.org.uk start 929580072.670441 socket type=SOCK_DGRAM Index: adns/regress/case-flags9.sys diff -u adns/regress/case-flags9.sys:1.1 adns/regress/case-flags9.sys:1.2 --- adns/regress/case-flags9.sys:1.1 Thu Jun 17 01:54:03 1999 +++ adns/regress/case-flags9.sys Sat Sep 16 18:35:01 2000 @@ -1,4 +1,4 @@ -default +adnstest default :1 ,aaaaaaaaa/chiark.greenend.org.uk start 929580075.263215 socket type=SOCK_DGRAM Index: adns/regress/case-formerr.sys diff -u adns/regress/case-formerr.sys:1.1 adns/regress/case-formerr.sys:1.2 --- adns/regress/case-formerr.sys:1.1 Thu Mar 2 00:22:39 2000 +++ adns/regress/case-formerr.sys Sat Sep 16 18:35:01 2000 @@ -1,4 +1,4 @@ -default +adnstest default :1 1/h.rndrobwlxxxxxxxxxxlllantysiliogogllanfairpwllgwyngyllgogerychw.relativity.greenend.org.uk. start 951956380.814815 socket type=SOCK_DGRAM Index: adns/regress/case-lockup.sys diff -u adns/regress/case-lockup.sys:1.1 adns/regress/case-lockup.sys:1.2 --- adns/regress/case-lockup.sys:1.1 Sun May 7 16:30:18 2000 +++ adns/regress/case-lockup.sys Sat Sep 16 18:35:01 2000 @@ -1,4 +1,4 @@ -noserver +adnstest noserver :1 chiark.greenend.org.uk start 912889153.349504 socket type=SOCK_DGRAM Index: adns/regress/case-longdom0.sys diff -u adns/regress/case-longdom0.sys:1.1 adns/regress/case-longdom0.sys:1.2 --- adns/regress/case-longdom0.sys:1.1 Thu Mar 2 00:08:50 2000 +++ adns/regress/case-longdom0.sys Sat Sep 16 18:35:01 2000 @@ -1,4 +1,4 @@ -default +adnstest default :1 1/0rndrobwlxxxxxxxxxxlllantysiliogog.llanfairpwllgwyngyllgogerychwyrndrobwlxxxxxxxxxxlllantysiliogog.llanfairpwllgwyngyllgogerychwyrndrobwlxxxxxxxxxxlllantysiliogog.llanfairpwllgwyngyllgogerychwyrndrobwlxxxxxxxxxxlllantysiliogog.relativity.greenend.org.uk. start 951955651.857473 socket type=SOCK_DGRAM Index: adns/regress/case-longdom1.sys diff -u adns/regress/case-longdom1.sys:1.1 adns/regress/case-longdom1.sys:1.2 --- adns/regress/case-longdom1.sys:1.1 Thu Mar 2 00:08:50 2000 +++ adns/regress/case-longdom1.sys Sat Sep 16 18:35:01 2000 @@ -1,4 +1,4 @@ -default +adnstest default :1 1/10rndrobwlxxxxxxxxxxlllantysiliogog.llanfairpwllgwyngyllgogerychwyrndrobwlxxxxxxxxxxlllantysiliogog.llanfairpwllgwyngyllgogerychwyrndrobwlxxxxxxxxxxlllantysiliogog.llanfairpwllgwyngyllgogerychwyrndrobwlxxxxxxxxxxlllantysiliogog.relativity.greenend.org.uk. start 951955690.505811 socket type=SOCK_DGRAM Index: adns/regress/case-longdomsrch0.sys diff -u adns/regress/case-longdomsrch0.sys:1.1 adns/regress/case-longdomsrch0.sys:1.2 --- adns/regress/case-longdomsrch0.sys:1.1 Thu Mar 2 00:16:37 2000 +++ adns/regress/case-longdomsrch0.sys Sat Sep 16 18:35:01 2000 @@ -1,4 +1,4 @@ -ndots100 +adnstest ndots100 :1 1/10rndrobwlxxxxxxxxxxlllantysiliogog.llanfairpwllgwyngyllgogerychwyrndrobwlxxxxxxxxxxlllantysiliogog.llanfairpwllgwyngyllgogerychwyrndrobwlxxxxxxxxxxlllantysiliogog.llanfairpwllgwyngyllgogerychwyrndrobwlxxxxxxxxxxlllantysiliogog.relativity.greenend.org.uk start 951956073.321566 socket type=SOCK_DGRAM Index: adns/regress/case-longdomsrch1.sys diff -u adns/regress/case-longdomsrch1.sys:1.1 adns/regress/case-longdomsrch1.sys:1.2 --- adns/regress/case-longdomsrch1.sys:1.1 Thu Mar 2 00:16:37 2000 +++ adns/regress/case-longdomsrch1.sys Sat Sep 16 18:35:01 2000 @@ -1,4 +1,4 @@ -ndots100 +adnstest ndots100 :1 1/0rndrobwlxxxxxxxxxxlllantysiliogog.llanfairpwllgwyngyllgogerychwyrndrobwlxxxxxxxxxxlllantysiliogog.llanfairpwllgwyngyllgogerychwyrndrobwlxxxxxxxxxxlllantysiliogog.llanfairpwllgwyngyllgogerychwyrndrobwlxxxxxxxxxxlllantysiliogog.relativity.greenend.org.uk start 951956087.269350 socket type=SOCK_DGRAM Index: adns/regress/case-longdomsrch1b.sys diff -u adns/regress/case-longdomsrch1b.sys:1.1 adns/regress/case-longdomsrch1b.sys:1.2 --- adns/regress/case-longdomsrch1b.sys:1.1 Thu Mar 2 00:16:37 2000 +++ adns/regress/case-longdomsrch1b.sys Sat Sep 16 18:35:01 2000 @@ -1,4 +1,4 @@ -ndots100 +adnstest ndots100 :1 1/1xxxlllantysiliogog.llanfairpwllgwyngyllgogerychwyrndrobwlxxxxxxxxxxlllantysiliogog.llanfairpwllgwyngyllgogerychwyrndrobwlxxxxxxxxxxlllantysiliogog.llanfairpwllgwyngyllgogerychwyrndrobwlxxxxxxxxxxlllantysiliogog.relativity.greenend.org.uk start 951956136.566877 socket type=SOCK_DGRAM Index: adns/regress/case-longdomsrch2.sys diff -u adns/regress/case-longdomsrch2.sys:1.1 adns/regress/case-longdomsrch2.sys:1.2 --- adns/regress/case-longdomsrch2.sys:1.1 Thu Mar 2 00:16:37 2000 +++ adns/regress/case-longdomsrch2.sys Sat Sep 16 18:35:01 2000 @@ -1,4 +1,4 @@ -ndots100 +adnstest ndots100 :1 1/xxxlllantysiliogog.llanfairpwllgwyngyllgogerychwyrndrobwlxxxxxxxxxxlllantysiliogog.llanfairpwllgwyngyllgogerychwyrndrobwlxxxxxxxxxxlllantysiliogog.llanfairpwllgwyngyllgogerychwyrndrobwlxxxxxxxxxxlllantysiliogog.relativity.greenend.org.uk start 951956143.624786 socket type=SOCK_DGRAM Index: adns/regress/case-longlab0.sys diff -u adns/regress/case-longlab0.sys:1.1 adns/regress/case-longlab0.sys:1.2 --- adns/regress/case-longlab0.sys:1.1 Thu Mar 2 00:08:50 2000 +++ adns/regress/case-longlab0.sys Sat Sep 16 18:35:01 2000 @@ -1,4 +1,4 @@ -default +adnstest default :1 1/yrndrobwlxxxxxxxxxxlllantysiliogogllanfairpwllgwyngyllgogerychw.relativity.greenend.org.uk. start 951955250.786132 socket type=SOCK_DGRAM Index: adns/regress/case-longlab1.sys diff -u adns/regress/case-longlab1.sys:1.1 adns/regress/case-longlab1.sys:1.2 --- adns/regress/case-longlab1.sys:1.1 Thu Mar 2 00:08:50 2000 +++ adns/regress/case-longlab1.sys Sat Sep 16 18:35:01 2000 @@ -1,4 +1,4 @@ -default +adnstest default :1 1/hyrndrobwlxxxxxxxxxxlllantysiliogogllanfairpwllgwyngyllgogerychw.relativity.greenend.org.uk. start 951955261.286712 socket type=SOCK_DGRAM Index: adns/regress/case-mailboxes.sys diff -u adns/regress/case-mailboxes.sys:1.2 adns/regress/case-mailboxes.sys:1.3 --- adns/regress/case-mailboxes.sys:1.2 Wed May 12 22:33:18 1999 +++ adns/regress/case-mailboxes.sys Sat Sep 16 18:35:01 2000 @@ -1,4 +1,4 @@ -default +adnstest default :131089 silly-rp.test.iwj.relativity.greenend.org.uk start 923859567.899146 socket type=SOCK_DGRAM Index: adns/regress/case-manya.sys diff -u adns/regress/case-manya.sys:1.3 adns/regress/case-manya.sys:1.4 --- adns/regress/case-manya.sys:1.3 Wed May 12 22:33:19 1999 +++ adns/regress/case-manya.sys Sat Sep 16 18:35:01 2000 @@ -1,4 +1,4 @@ -default +adnstest default :1 manyaddrs.test.iwj.relativity.greenend.org.uk start 912888920.123769 socket type=SOCK_DGRAM Index: adns/regress/case-manyptrwrong.sys diff -u adns/regress/case-manyptrwrong.sys:1.1 adns/regress/case-manyptrwrong.sys:1.2 --- adns/regress/case-manyptrwrong.sys:1.1 Thu Jul 29 22:34:39 1999 +++ adns/regress/case-manyptrwrong.sys Sat Sep 16 18:35:01 2000 @@ -1,4 +1,4 @@ -ncipher +adnstest ncipher 254.0.99.203.in-addr.arpa start 933269010.293417 socket type=SOCK_DGRAM Index: adns/regress/case-manyptrwrongrem.sys diff -u adns/regress/case-manyptrwrongrem.sys:1.2 adns/regress/case-manyptrwrongrem.sys:1.3 --- adns/regress/case-manyptrwrongrem.sys:1.2 Sat Oct 16 20:04:06 1999 +++ adns/regress/case-manyptrwrongrem.sys Sat Sep 16 18:35:01 2000 @@ -1,4 +1,4 @@ -manyptrwrong +adnstest manyptrwrong 292/254.0.99.203.in-addr.arpa start 933286859.476326 socket type=SOCK_DGRAM Index: adns/regress/case-manyptrwrongrst.sys diff -u adns/regress/case-manyptrwrongrst.sys:1.4 adns/regress/case-manyptrwrongrst.sys:1.5 --- adns/regress/case-manyptrwrongrst.sys:1.4 Sun May 7 16:30:18 2000 +++ adns/regress/case-manyptrwrongrst.sys Sat Sep 16 18:35:01 2000 @@ -1,4 +1,4 @@ -default +adnstest default 292/254.0.99.203.in-addr.arpa start 933289772.727140 socket type=SOCK_DGRAM Index: adns/regress/case-manyptrwrongrty.sys diff -u adns/regress/case-manyptrwrongrty.sys:1.1 adns/regress/case-manyptrwrongrty.sys:1.2 --- adns/regress/case-manyptrwrongrty.sys:1.1 Thu Jul 29 23:21:55 1999 +++ adns/regress/case-manyptrwrongrty.sys Sat Sep 16 18:35:01 2000 @@ -1,4 +1,4 @@ -default +adnstest default 292/254.0.99.203.in-addr.arpa start 933286845.072950 socket type=SOCK_DGRAM Index: adns/regress/case-ndots-as.sys diff -u adns/regress/case-ndots-as.sys:1.1 adns/regress/case-ndots-as.sys:1.2 --- adns/regress/case-ndots-as.sys:1.1 Wed Jul 14 23:45:04 1999 +++ adns/regress/case-ndots-as.sys Sat Sep 16 18:35:01 2000 @@ -1,4 +1,4 @@ -default +adnstest default :1 5/newsx.davenant 5/news.davenant 5/news.davenant.greenend.org.uk 5/trunc.test.iwj.relativity 5/trunx.test.iwj.relativity 5/test.iwj.relativity start 931992163.221752 socket type=SOCK_DGRAM Index: adns/regress/case-ndots.sys diff -u adns/regress/case-ndots.sys:1.3 adns/regress/case-ndots.sys:1.4 --- adns/regress/case-ndots.sys:1.3 Wed Jul 14 23:45:04 1999 +++ adns/regress/case-ndots.sys Sat Sep 16 18:35:01 2000 @@ -1,4 +1,4 @@ -ndots -,s +adnstest ndots -,s :1 5/newsx.davenant 5/news.davenant 5/news.davenant.greenend.org.uk 5/trunc.test.iwj.relativity 5/trunx.test.iwj.relativity 5/test.iwj.relativity start 924365863.351594 socket type=SOCK_DGRAM Index: adns/regress/case-ndotsbad.sys diff -u adns/regress/case-ndotsbad.sys:1.1 adns/regress/case-ndotsbad.sys:1.2 --- adns/regress/case-ndotsbad.sys:1.1 Sat Apr 17 17:23:15 1999 +++ adns/regress/case-ndotsbad.sys Sat Sep 16 18:35:01 2000 @@ -1,2 +1,2 @@ -ndotsbad +adnstest ndotsbad :1 5/news.davenant.greenend.org.uk Index: adns/regress/case-noinfto.sys diff -u adns/regress/case-noinfto.sys:1.1 adns/regress/case-noinfto.sys:1.2 --- adns/regress/case-noinfto.sys:1.1 Fri Oct 15 19:20:57 1999 +++ adns/regress/case-noinfto.sys Sat Sep 16 18:35:01 2000 @@ -1,4 +1,4 @@ -noserver -,p +adnstest noserver -,p :1 a.b.c.d start 940011574.766962 socket type=SOCK_DGRAM Index: adns/regress/case-norecurse.sys diff -u adns/regress/case-norecurse.sys:1.6 adns/regress/case-norecurse.sys:1.7 --- adns/regress/case-norecurse.sys:1.6 Sun May 21 18:02:54 2000 +++ adns/regress/case-norecurse.sys Sat Sep 16 18:35:01 2000 @@ -1,4 +1,4 @@ -default -0x16 +adnstest default -0x16 4.204.50.158.in-addr.arpa start 939764098.821612 socket type=SOCK_DGRAM Index: adns/regress/case-norecurse2.sys diff -u adns/regress/case-norecurse2.sys:1.6 adns/regress/case-norecurse2.sys:1.7 --- adns/regress/case-norecurse2.sys:1.6 Sun May 7 16:30:18 2000 +++ adns/regress/case-norecurse2.sys Sat Sep 16 18:35:01 2000 @@ -1,4 +1,4 @@ -default -0x16 +adnstest default -0x16 4.204.50.158.in-addr.arpa start 939764277.018636 socket type=SOCK_DGRAM Index: adns/regress/case-norecurse3.sys diff -u adns/regress/case-norecurse3.sys:1.5 adns/regress/case-norecurse3.sys:1.6 --- adns/regress/case-norecurse3.sys:1.5 Sun May 7 16:30:18 2000 +++ adns/regress/case-norecurse3.sys Sat Sep 16 18:35:01 2000 @@ -1,4 +1,4 @@ -default -0x16 +adnstest default -0x16 2.203.156.195.in-addr.arpa1 start 939764258.086555 socket type=SOCK_DGRAM Index: adns/regress/case-norm.sys diff -u adns/regress/case-norm.sys:1.3 adns/regress/case-norm.sys:1.4 --- adns/regress/case-norm.sys:1.3 Wed May 12 22:33:22 1999 +++ adns/regress/case-norm.sys Sat Sep 16 18:35:01 2000 @@ -1,4 +1,4 @@ -default +adnstest default :1 chiark.greenend.org.uk start 912888966.802483 socket type=SOCK_DGRAM Index: adns/regress/case-owner.sys diff -u adns/regress/case-owner.sys:1.3 adns/regress/case-owner.sys:1.4 --- adns/regress/case-owner.sys:1.3 Thu Jul 29 00:59:32 1999 +++ adns/regress/case-owner.sys Sat Sep 16 18:35:01 2000 @@ -1,4 +1,4 @@ -default +adnstest default 4/chiark.greenend.org.uk start 933206012.504679 socket type=SOCK_DGRAM Index: adns/regress/case-poll.sys diff -u adns/regress/case-poll.sys:1.1 adns/regress/case-poll.sys:1.2 --- adns/regress/case-poll.sys:1.1 Sun Jul 11 20:11:05 1999 +++ adns/regress/case-poll.sys Sat Sep 16 18:35:01 2000 @@ -1,4 +1,4 @@ -default -,p +adnstest default -,p :1 chiark.greenend.org.uk start 931719947.391142 socket type=SOCK_DGRAM Index: adns/regress/case-polltimeout.sys diff -u adns/regress/case-polltimeout.sys:1.1 adns/regress/case-polltimeout.sys:1.2 --- adns/regress/case-polltimeout.sys:1.1 Sun Jul 11 20:11:06 1999 +++ adns/regress/case-polltimeout.sys Sat Sep 16 18:35:01 2000 @@ -1,4 +1,4 @@ -noserver -,p +adnstest noserver -,p :1 chiark.greenend.org.uk start 931719968.733439 socket type=SOCK_DGRAM Index: adns/regress/case-ptrbaddom.sys diff -u adns/regress/case-ptrbaddom.sys:1.1 adns/regress/case-ptrbaddom.sys:1.2 --- adns/regress/case-ptrbaddom.sys:1.1 Thu Mar 2 01:34:04 2000 +++ adns/regress/case-ptrbaddom.sys Sat Sep 16 18:35:01 2000 @@ -1,4 +1,4 @@ -default +adnstest default :12,65548 37.45.18.172.in-addr.arpa.test.iwj.relativity.greenend.org.uk. start 951960654.608219 socket type=SOCK_DGRAM Index: adns/regress/case-quote.sys diff -u adns/regress/case-quote.sys:1.1 adns/regress/case-quote.sys:1.2 --- adns/regress/case-quote.sys:1.1 Thu Mar 2 00:58:07 2000 +++ adns/regress/case-quote.sys Sat Sep 16 18:35:01 2000 @@ -1,4 +1,4 @@ -default +adnstest default :1 hyphen.cname.test.iwj.relativity.greenend.org.uk dot.cname.test.iwj.relativity.greenend.org.uk plus.cname.test.iwj.relativity.greenend.org.uk slash.cname.test.iwj.relativity.greenend.org.uk underscore.cname.test.iwj.relativity.greenend.org.uk quote.cname.test.iwj.relativity.greenend.org.uk backslash.cname.test.iwj.relativity.greenend.org.uk null.cname.test.iwj.relativity.greenend.org.uk space.cname.test.iwj.relativity.greenend.org.uk hash.cname.test.iwj.relativity.greenend.org.uk del.cname.test.iwj.relativity.greenend.org.uk meta-null.cname.test.iwj.relativity.greenend.org.uk meta-del.cname.test.iwj.relativity.greenend.org.uk start 951958420.936685 socket type=SOCK_DGRAM Index: adns/regress/case-rootquery.sys diff -u adns/regress/case-rootquery.sys:1.2 adns/regress/case-rootquery.sys:1.3 --- adns/regress/case-rootquery.sys:1.2 Wed May 12 22:33:24 1999 +++ adns/regress/case-rootquery.sys Sat Sep 16 18:35:01 2000 @@ -1,4 +1,4 @@ -default +adnstest default :131078 . 1/. start 924364442.672925 socket type=SOCK_DGRAM Index: adns/regress/case-rootqueryall-as.sys diff -u adns/regress/case-rootqueryall-as.sys:1.1 adns/regress/case-rootqueryall-as.sys:1.2 --- adns/regress/case-rootqueryall-as.sys:1.1 Wed Jul 14 23:45:05 1999 +++ adns/regress/case-rootqueryall-as.sys Sat Sep 16 18:35:01 2000 @@ -1,4 +1,4 @@ -default +adnstest default . 1/. start 931992019.753022 socket type=SOCK_DGRAM Index: adns/regress/case-rootqueryall.sys diff -u adns/regress/case-rootqueryall.sys:1.4 adns/regress/case-rootqueryall.sys:1.5 --- adns/regress/case-rootqueryall.sys:1.4 Sun May 7 16:30:19 2000 +++ adns/regress/case-rootqueryall.sys Sat Sep 16 18:35:01 2000 @@ -1,4 +1,4 @@ -default -,s +adnstest default -,s . 1/. start 924364450.165424 socket type=SOCK_DGRAM Index: adns/regress/case-search-as.sys diff -u adns/regress/case-search-as.sys:1.1 adns/regress/case-search-as.sys:1.2 --- adns/regress/case-search-as.sys:1.1 Wed Jul 14 23:45:07 1999 +++ adns/regress/case-search-as.sys Sat Sep 16 18:35:02 2000 @@ -1,4 +1,4 @@ -default +adnstest default :1 0x5/news 0x5/chiark 1/news 1/chiark start 931992052.232208 socket type=SOCK_DGRAM Index: adns/regress/case-search.sys diff -u adns/regress/case-search.sys:1.3 adns/regress/case-search.sys:1.4 --- adns/regress/case-search.sys:1.3 Wed Jul 14 23:45:07 1999 +++ adns/regress/case-search.sys Sat Sep 16 18:35:02 2000 @@ -1,4 +1,4 @@ -default -,s +adnstest default -,s :1 0x5/news 0x5/chiark 1/news 1/chiark start 924360470.478357 socket type=SOCK_DGRAM Index: adns/regress/case-searchabs.sys diff -u adns/regress/case-searchabs.sys:1.2 adns/regress/case-searchabs.sys:1.3 --- adns/regress/case-searchabs.sys:1.2 Wed May 12 22:33:29 1999 +++ adns/regress/case-searchabs.sys Sat Sep 16 18:35:02 2000 @@ -1,4 +1,4 @@ -default +adnstest default :1 1/news.davenant start 924363451.882765 socket type=SOCK_DGRAM Index: adns/regress/case-sillyrp.sys diff -u adns/regress/case-sillyrp.sys:1.1 adns/regress/case-sillyrp.sys:1.2 --- adns/regress/case-sillyrp.sys:1.1 Thu Jun 17 01:54:05 1999 +++ adns/regress/case-sillyrp.sys Sat Sep 16 18:35:02 2000 @@ -1,4 +1,4 @@ -default +adnstest default :17,131089 0x70/silly-rp-dm.test.iwj.relativity.greenend.org.uk 0x70/silly-rp-lp.test.iwj.relativity.greenend.org.uk silly-rp-lp.test.iwj.relativity.greenend.org.uk silly-rp-dm.test.iwj.relativity.greenend.org.uk start 929580348.131048 socket type=SOCK_DGRAM Index: adns/regress/case-tcpallfail.sys diff -u adns/regress/case-tcpallfail.sys:1.1 adns/regress/case-tcpallfail.sys:1.2 --- adns/regress/case-tcpallfail.sys:1.1 Wed Jun 28 00:01:42 2000 +++ adns/regress/case-tcpallfail.sys Sat Sep 16 18:35:02 2000 @@ -1,4 +1,4 @@ -anarres +adnstest anarres 2/test.iwj.relativity.greenend.org.uk. start 962142174.403028 socket type=SOCK_DGRAM Index: adns/regress/case-tcpblock.sys diff -u adns/regress/case-tcpblock.sys:1.1 adns/regress/case-tcpblock.sys:1.2 --- adns/regress/case-tcpblock.sys:1.1 Wed Jun 28 00:01:42 2000 +++ adns/regress/case-tcpblock.sys Sat Sep 16 18:35:02 2000 @@ -1,4 +1,4 @@ -anarres +adnstest anarres 2/test.iwj.relativity.greenend.org.uk. start 962142246.340485 socket type=SOCK_DGRAM Index: adns/regress/case-tcpblockbrk.sys diff -u adns/regress/case-tcpblockbrk.sys:1.1 adns/regress/case-tcpblockbrk.sys:1.2 --- adns/regress/case-tcpblockbrk.sys:1.1 Wed Jun 28 00:01:42 2000 +++ adns/regress/case-tcpblockbrk.sys Sat Sep 16 18:35:02 2000 @@ -1,4 +1,4 @@ -anarres -0x300 +adnstest anarres -0x300 2/test.iwj.relativity.greenend.org.uk. start 962143388.709150 socket type=SOCK_DGRAM Index: adns/regress/case-tcpblockwr.sys diff -u adns/regress/case-tcpblockwr.sys:1.1 adns/regress/case-tcpblockwr.sys:1.2 --- adns/regress/case-tcpblockwr.sys:1.1 Wed Jun 28 00:01:42 2000 +++ adns/regress/case-tcpblockwr.sys Sat Sep 16 18:35:02 2000 @@ -1,4 +1,4 @@ -anarres -0x300 +adnstest anarres -0x300 2/test.iwj.relativity.greenend.org.uk. 2/test.iwj.relativity.greenend.org.uk. 2/test.iwj.relativity.greenend.org.uk. start 962143438.172669 socket type=SOCK_DGRAM Index: adns/regress/case-tcpbreakin.sys diff -u adns/regress/case-tcpbreakin.sys:1.1 adns/regress/case-tcpbreakin.sys:1.2 --- adns/regress/case-tcpbreakin.sys:1.1 Sun May 7 18:26:06 2000 +++ adns/regress/case-tcpbreakin.sys Sat Sep 16 18:35:02 2000 @@ -1,4 +1,4 @@ -default +adnstest default :65548 2/6.45.18.172.in-addr.arpa start 957718868.938329 socket type=SOCK_DGRAM Index: adns/regress/case-tcpmultipart.sys diff -u adns/regress/case-tcpmultipart.sys:1.2 adns/regress/case-tcpmultipart.sys:1.3 --- adns/regress/case-tcpmultipart.sys:1.2 Sat Oct 16 20:04:07 1999 +++ adns/regress/case-tcpmultipart.sys Sat Sep 16 18:35:02 2000 @@ -1,4 +1,4 @@ -tunnel +adnstest tunnel :12 2/132.76.224.195.in-addr.arpa 2/manymorerrs.test.culture.dotat.at. 2/132.76.224.195.in-addr.arpa start 938365454.994875 socket type=SOCK_DGRAM Index: adns/regress/case-tcpptr.sys diff -u adns/regress/case-tcpptr.sys:1.1 adns/regress/case-tcpptr.sys:1.2 --- adns/regress/case-tcpptr.sys:1.1 Sun May 7 18:26:06 2000 +++ adns/regress/case-tcpptr.sys Sat Sep 16 18:35:02 2000 @@ -1,4 +1,4 @@ -default +adnstest default :65548 2/6.45.18.172.in-addr.arpa start 957718868.938329 socket type=SOCK_DGRAM Index: adns/regress/case-timeout.sys diff -u adns/regress/case-timeout.sys:1.2 adns/regress/case-timeout.sys:1.3 --- adns/regress/case-timeout.sys:1.2 Wed May 12 22:33:30 1999 +++ adns/regress/case-timeout.sys Sat Sep 16 18:35:02 2000 @@ -1,4 +1,4 @@ -noserver +adnstest noserver :1 chiark.greenend.org.uk start 912889153.349504 socket type=SOCK_DGRAM Index: adns/regress/case-trunc.sys diff -u adns/regress/case-trunc.sys:1.3 adns/regress/case-trunc.sys:1.4 --- adns/regress/case-trunc.sys:1.3 Wed May 12 22:33:31 1999 +++ adns/regress/case-trunc.sys Sat Sep 16 18:35:02 2000 @@ -1,4 +1,4 @@ -default +adnstest default :1 trunc.test.iwj.relativity.greenend.org.uk start 912888921.274801 socket type=SOCK_DGRAM Index: adns/regress/case-unknownq.sys diff -u adns/regress/case-unknownq.sys:1.1 adns/regress/case-unknownq.sys:1.2 --- adns/regress/case-unknownq.sys:1.1 Thu Aug 5 01:03:24 1999 +++ adns/regress/case-unknownq.sys Sat Sep 16 18:35:02 2000 @@ -1,4 +1,4 @@ -default +adnstest default :32767 davenant.relativity.greenend.org.uk. start 933811310.565828 socket type=SOCK_DGRAM Index: adns/regress/checkall diff -u adns/regress/checkall:1.5 adns/regress/checkall:1.6 --- adns/regress/checkall:1.5 Sun May 7 23:37:18 2000 +++ adns/regress/checkall Sun Sep 17 01:24:24 2000 @@ -7,7 +7,7 @@ # # It is part of adns, which is # Copyright (C) 1997-2000 Ian Jackson -# Copyright (C) 1999 Tony Finch +# Copyright (C) 1999-2000 Tony Finch # # 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 Index: adns/regress/harness.h diff -u /dev/null adns/regress/harness.h:1.1 --- /dev/null Sun Sep 17 15:32:51 2000 +++ adns/regress/harness.h Sat Sep 16 23:12:31 2000 @@ -0,0 +1,42 @@ +#ifndef HARNESS_H_INCLUDED +#define HARNESS_H_INCLUDED +#include "internal.h" +#include "hsyscalls.h" +/* There is a Q function (Q for Question) for each such syscall; + * it constructs a string representing the call, and calls Q_str + * on it, or constructs it in vb and calls Q_vb; + */ +void Qselect( int max , const fd_set *rfds , const fd_set *wfds , const fd_set *efds , struct timeval *to ); +#ifdef HAVE_POLL +void Qpoll( const struct pollfd *fds , int nfds , int timeout ); +#endif +void Qsocket( int type ); +void Qfcntl( int fd , int cmd , long arg ); +void Qconnect( int fd , const struct sockaddr *addr , int addrlen ); +void Qclose( int fd ); +void Qsendto( int fd , const void *msg , int msglen , const struct sockaddr *addr , int addrlen ); +void Qrecvfrom( int fd , int buflen , int addrlen ); +void Qread( int fd , size_t buflen ); +void Qwrite( int fd , const void *buf , size_t len ); +void Q_vb(void); +extern void Tshutdown(void); +/* General help functions */ +void Tfailed(const char *why); +void Toutputerr(void); +void Tnomem(void); +void Tfsyscallr(const char *fmt, ...) PRINTFFORMAT(1,2); +void Tensureoutputfile(void); +void Tmust(const char *call, const char *arg, int cond); +void Tvbf(const char *fmt, ...) PRINTFFORMAT(1,2); +void Tvbvf(const char *fmt, va_list al); +void Tvbfdset(int max, const fd_set *set); +void Tvbpollfds(const struct pollfd *fds, int nfds); +void Tvbaddr(const struct sockaddr *addr, int addrlen); +void Tvbbytes(const void *buf, int len); +void Tvberrno(int e); +void Tvba(const char *str); +/* Shared globals */ +extern vbuf vb; +extern struct timeval currenttime; +extern const struct Terrno { const char *n; int v; } Terrnos[]; +#endif Index: adns/regress/harness.h.m4 diff -u adns/regress/harness.h.m4:1.9 adns/regress/harness.h.m4:1.11 --- adns/regress/harness.h.m4:1.9 Sun May 7 23:37:18 2000 +++ adns/regress/harness.h.m4 Sun Sep 17 01:24:24 2000 @@ -3,11 +3,11 @@ m4_dnl - function and other declarations m4_dnl This file is -m4_dnl Copyright (C) 1997-1999 Ian Jackson +m4_dnl Copyright (C) 1997-2000 Ian Jackson m4_dnl m4_dnl It is part of adns, which is m4_dnl Copyright (C) 1997-2000 Ian Jackson -m4_dnl Copyright (C) 1999 Tony Finch +m4_dnl Copyright (C) 1999-2000 Tony Finch m4_dnl m4_dnl This program is free software; you can redistribute it and/or modify m4_dnl it under the terms of the GNU General Public License as published by @@ -28,30 +28,8 @@ #ifndef HARNESS_H_INCLUDED #define HARNESS_H_INCLUDED -#include -#include -#include -#include - #include "internal.h" - -#ifdef HAVE_POLL -#include -#endif - -/* We override several system calls with #define's */ - -hm_create_proto_h -m4_define(`hm_syscall', `int H$1(hm_args_massage($3,void));') -m4_include(`hsyscalls.i4') - -int Hwritev(int fd, const struct iovec *vector, size_t count); -int Hgettimeofday(struct timeval *tv, struct timezone *tz); - -void *Hmalloc(size_t sz); -void Hfree(void *ptr); -void *Hrealloc(void *op, size_t nsz); -void Hexit(int rv); +#include "hsyscalls.h" /* There is a Q function (Q for Question) for each such syscall; * it constructs a string representing the call, and calls Q_str @@ -60,6 +38,7 @@ hm_create_proto_q m4_define(`hm_syscall', `void Q$1(hm_args_massage($3,void));') +m4_define(`hm_specsyscall', `') m4_include(`hsyscalls.i4') void Q_vb(void); Index: adns/regress/hcommon.c diff -u /dev/null adns/regress/hcommon.c:1.2 --- /dev/null Sun Sep 17 15:32:51 2000 +++ adns/regress/hcommon.c Sat Sep 16 23:34:16 2000 @@ -0,0 +1,281 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "harness.h" +#include "internal.h" +vbuf vb; +FILE *Toutputfile= 0; +struct timeval currenttime; +const struct Terrno Terrnos[]= { + { "EBADF", EBADF }, + { "EAGAIN", EAGAIN }, + { "EINPROGRESS", EINPROGRESS }, + { "EINTR", EINTR }, + { "EINVAL", EINVAL }, + { "EMSGSIZE", EMSGSIZE }, + { "ENOBUFS", ENOBUFS }, + { "ENOENT", ENOENT }, + { "ENOPROTOOPT", ENOPROTOOPT }, + { "ENOSPC", ENOSPC }, + { "EWOULDBLOCK", EWOULDBLOCK }, + { "EHOSTUNREACH", EHOSTUNREACH }, + { "ECONNRESET", ECONNRESET }, + { "ECONNREFUSED", ECONNREFUSED }, + { "EPIPE", EPIPE }, + { 0, 0 } +}; +static vbuf vbw; +int Hgettimeofday(struct timeval *tv, struct timezone *tz) { + Tmust("gettimeofday","tz",!tz); + *tv= currenttime; + return 0; +} +int Hwritev(int fd, const struct iovec *vector, size_t count) { + size_t i; + vbw.used= 0; + for (i=0; iiov_base,vector->iov_len)) Tnomem(); + } + return Hwrite(fd,vbw.buf,vbw.used); +} +void Qselect( int max , const fd_set *rfds , const fd_set *wfds , const fd_set *efds , struct timeval *to ) { + vb.used= 0; + Tvba("select"); + Tvbf(" max=%d",max); + Tvbf(" rfds="); Tvbfdset(max,rfds); + Tvbf(" wfds="); Tvbfdset(max,wfds); + Tvbf(" efds="); Tvbfdset(max,efds); + if (to) Tvbf(" to=%ld.%06ld",(long)to->tv_sec,(long)to->tv_usec); + else Tvba(" to=null"); + Q_vb(); +} +#ifdef HAVE_POLL +void Qpoll( const struct pollfd *fds , int nfds , int timeout ) { + vb.used= 0; + Tvba("poll"); + Tvbf(" fds="); Tvbpollfds(fds,nfds); + Tvbf(" timeout=%d",timeout); + Q_vb(); +} +#endif +void Qsocket( int type ) { + vb.used= 0; + Tvba("socket"); + Tvbf(type==SOCK_STREAM ? " type=SOCK_STREAM" : " type=SOCK_DGRAM"); + Q_vb(); +} +void Qfcntl( int fd , int cmd , long arg ) { + vb.used= 0; + Tvba("fcntl"); + Tvbf(" fd=%d",fd); + if (cmd == F_SETFL) { + Tvbf(" cmd=F_SETFL %s",arg & O_NONBLOCK ? "O_NONBLOCK|..." : "~O_NONBLOCK&..."); + } else if (cmd == F_GETFL) { + Tvba(" cmd=F_GETFL"); + } else { + Tmust("cmd","F_GETFL/F_SETFL",0); + } + Q_vb(); +} +void Qconnect( int fd , const struct sockaddr *addr , int addrlen ) { + vb.used= 0; + Tvba("connect"); + Tvbf(" fd=%d",fd); + Tvba(" addr="); Tvbaddr(addr,addrlen); + Q_vb(); +} +void Qclose( int fd ) { + vb.used= 0; + Tvba("close"); + Tvbf(" fd=%d",fd); + Q_vb(); +} +void Qsendto( int fd , const void *msg , int msglen , const struct sockaddr *addr , int addrlen ) { + vb.used= 0; + Tvba("sendto"); + Tvbf(" fd=%d",fd); + Tvba(" addr="); Tvbaddr(addr,addrlen); + Tvbbytes(msg,msglen); + Q_vb(); +} +void Qrecvfrom( int fd , int buflen , int addrlen ) { + vb.used= 0; + Tvba("recvfrom"); + Tvbf(" fd=%d",fd); + Tvbf(" buflen=%lu",(unsigned long)buflen); + Tvbf(" *addrlen=%d",addrlen); + Q_vb(); +} +void Qread( int fd , size_t buflen ) { + vb.used= 0; + Tvba("read"); + Tvbf(" fd=%d",fd); + Tvbf(" buflen=%lu",(unsigned long)buflen); + Q_vb(); +} +void Qwrite( int fd , const void *buf , size_t len ) { + vb.used= 0; + Tvba("write"); + Tvbf(" fd=%d",fd); + Tvbbytes(buf,len); + Q_vb(); +} +void Tvbaddr(const struct sockaddr *addr, int len) { + const struct sockaddr_in *ai= (const struct sockaddr_in*)addr; + assert(len==sizeof(struct sockaddr_in)); + assert(ai->sin_family==AF_INET); + Tvbf("%s:%u",inet_ntoa(ai->sin_addr),htons(ai->sin_port)); +} +void Tvbbytes(const void *buf, int len) { + const byte *bp; + int i; + if (!len) { Tvba("\n ."); return; } + for (i=0, bp=buf; i0) { + Tvba(comma); + Tvbf("{fd=%d, events=",fds->fd); + Tvbpollevents(fds->events); + Tvba(", revents="); + Tvbpollevents(fds->revents); + Tvba("}"); + comma= ", "; + nfds--; fds++; + } + Tvba("]"); +} +void Tvberrno(int e) { + const struct Terrno *te; + for (te= Terrnos; te->n && te->v != e; te++); + assert(te->n); + Tvba(te->n); +} +void Tvba(const char *str) { + if (!adns__vbuf_appendstr(&vb,str)) Tnomem(); +} +void Tvbvf(const char *fmt, va_list al) { + char buf[1000]; + buf[sizeof(buf)-2]= '\t'; + vsnprintf(buf,sizeof(buf),fmt,al); + assert(buf[sizeof(buf)-2] == '\t'); + Tvba(buf); +} +void Tvbf(const char *fmt, ...) { + va_list al; + va_start(al,fmt); + Tvbvf(fmt,al); + va_end(al); +} +void Tmust(const char *call, const char *arg, int cond) { + if (cond) return; + fprintf(stderr,"adns test harness: case not handled: system call %s, arg %s",call,arg); + exit(-1); +} +void Tfailed(const char *why) { + fprintf(stderr,"adns test harness: failure: %s: %s\n",why,strerror(errno)); + exit(-1); +} +void Tnomem(void) { + Tfailed("unable to malloc/realloc"); +} +void Toutputerr(void) { + Tfailed("write error on test harness output"); +} +struct malloced { + struct malloced *next, *back; + size_t sz; + unsigned long count; + struct { double d; long ul; void *p; void (*fp)(void); } data; +}; +static unsigned long malloccount, mallocfailat; +static struct { struct malloced *head, *tail; } mallocedlist; +#define MALLOCHSZ ((char*)&mallocedlist.head->data - (char*)mallocedlist.head) +void *Hmalloc(size_t sz) { + struct malloced *newnode; + const char *mfavar; + char *ep; + assert(sz); + newnode= malloc(MALLOCHSZ + sz); if (!newnode) Tnomem(); + LIST_LINK_TAIL(mallocedlist,newnode); + newnode->sz= sz; + newnode->count= ++malloccount; + if (!mallocfailat) { + mfavar= getenv("ADNS_REGRESS_MALLOCFAILAT"); + if (mfavar) { + mallocfailat= strtoul(mfavar,&ep,10); + if (!mallocfailat || *ep) Tfailed("ADNS_REGRESS_MALLOCFAILAT bad value"); + } else { + mallocfailat= ~0UL; + } + } + assert(newnode->count != mallocfailat); + memset(&newnode->data,0xc7,sz); + return &newnode->data; +} +void Hfree(void *ptr) { + struct malloced *oldnode; + if (!ptr) return; + oldnode= (void*)((char*)ptr - MALLOCHSZ); + LIST_UNLINK(mallocedlist,oldnode); + memset(&oldnode->data,0x38,oldnode->sz); + free(oldnode); +} +void *Hrealloc(void *op, size_t nsz) { + struct malloced *oldnode; + void *np; + size_t osz; + if (op) { oldnode= (void*)((char*)op - MALLOCHSZ); osz= oldnode->sz; } else { osz= 0; } + np= Hmalloc(nsz); + memcpy(np,op, osz>nsz ? nsz : osz); + Hfree(op); + return np; +} +void Hexit(int rv) { + struct malloced *loopnode; + Tshutdown(); + adns__vbuf_free(&vb); + adns__vbuf_free(&vbw); + if (mallocedlist.head) { + fprintf(stderr,"adns test harness: memory leaked:"); + for (loopnode=mallocedlist.head; loopnode; loopnode=loopnode->next) + fprintf(stderr," %lu(%lu)",loopnode->count,(unsigned long)loopnode->sz); + putc('\n',stderr); + if (ferror(stderr)) exit(-1); + } + exit(rv); +} Index: adns/regress/hcommon.c.m4 diff -u adns/regress/hcommon.c.m4:1.15 adns/regress/hcommon.c.m4:1.19 --- adns/regress/hcommon.c.m4:1.15 Wed Jun 28 00:01:42 2000 +++ adns/regress/hcommon.c.m4 Sun Sep 17 01:24:24 2000 @@ -7,7 +7,7 @@ m4_dnl m4_dnl It is part of adns, which is m4_dnl Copyright (C) 1997-2000 Ian Jackson -m4_dnl Copyright (C) 1999 Tony Finch +m4_dnl Copyright (C) 1999-2000 Tony Finch m4_dnl m4_dnl This program is free software; you can redistribute it and/or modify m4_dnl it under the terms of the GNU General Public License as published by @@ -25,15 +25,19 @@ m4_include(hmacros.i4) -#include #include #include #include +#include +#include #include #include #include +#include +#include + #include "harness.h" #include "internal.h" @@ -119,8 +123,9 @@ } ') -m4_include(`hsyscalls.i4') +m4_define(`hm_specsyscall', `') +m4_include(`hsyscalls.i4') void Tvbaddr(const struct sockaddr *addr, int len) { const struct sockaddr_in *ai= (const struct sockaddr_in*)addr; Index: adns/regress/hmacros.i4 diff -u adns/regress/hmacros.i4:1.7 adns/regress/hmacros.i4:1.9 --- adns/regress/hmacros.i4:1.7 Sun May 7 23:37:18 2000 +++ adns/regress/hmacros.i4 Sat Sep 16 18:37:11 2000 @@ -3,7 +3,7 @@ m4_dnl - common macros m4_dnl This file is -m4_dnl Copyright (C) 1997-1999 Ian Jackson +m4_dnl Copyright (C) 1997-2000 Ian Jackson m4_dnl m4_dnl It is part of adns, which is m4_dnl Copyright (C) 1997-2000 Ian Jackson @@ -32,10 +32,10 @@ `'), `', `$2', - ` + `m4_dnl m4_patsubst(m4_patsubst(m4_patsubst(m4_translit($1, ` ',` '), `\(hm_comma *\)*$', `'), `^\( *hm_comma\)*', `'), - `\( *hm_comma *\)+',` hm_comma ') + `\( *hm_comma *\)+',` hm_comma ')m4_dnl ')') m4_define(`hm_create_nothing', ` Index: adns/regress/hplayback.c diff -u /dev/null adns/regress/hplayback.c:1.2 --- /dev/null Sun Sep 17 15:32:51 2000 +++ adns/regress/hplayback.c Sat Sep 16 23:28:50 2000 @@ -0,0 +1,530 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "harness.h" +static FILE *Tinputfile, *Treportfile; +static vbuf vb2; +extern void Tshutdown(void) { + adns__vbuf_free(&vb2); +} +static void Tensurereportfile(void) { + const char *fdstr; + int fd; + if (Treportfile) return; + Treportfile= stderr; + fdstr= getenv("ADNS_TEST_REPORT_FD"); if (!fdstr) return; + fd= atoi(fdstr); + Treportfile= fdopen(fd,"a"); if (!Treportfile) Tfailed("fdopen ADNS_TEST_REPORT_FD"); +} +static void Psyntax(const char *where) { + fprintf(stderr,"adns test harness: syntax error in test log input file: %s\n",where); + exit(-1); +} +static void Pcheckinput(void) { + if (ferror(Tinputfile)) Tfailed("read test log input file"); + if (feof(Tinputfile)) Psyntax("eof at syscall reply"); +} +static void Tensureinputfile(void) { + const char *fdstr; + int fd; + int chars; + unsigned long sec, usec; + if (Tinputfile) return; + Tinputfile= stdin; + fdstr= getenv("ADNS_TEST_IN_FD"); + if (fdstr) { + fd= atoi(fdstr); + Tinputfile= fdopen(fd,"r"); if (!Tinputfile) Tfailed("fdopen ADNS_TEST_IN_FD"); + } + setvbuf(Tinputfile,0,_IONBF,0); + if (!adns__vbuf_ensure(&vb2,1000)) Tnomem(); + fgets(vb2.buf,vb2.avail,Tinputfile); Pcheckinput(); + chars= -1; + sscanf(vb2.buf," start %lu.%lu%n",&sec,&usec,&chars); + if (chars==-1) Psyntax("start time invalid"); + currenttime.tv_sec= sec; + currenttime.tv_usec= usec; + if (vb2.buf[chars] != '\n') Psyntax("not newline after start time"); +} +static void Parg(const char *argname) { + int l; + if (vb2.buf[vb2.used++] != ' ') Psyntax("not a space before argument"); + l= strlen(argname); + if (memcmp(vb2.buf+vb2.used,argname,l)) Psyntax("argument name wrong"); + vb2.used+= l; + if (vb2.buf[vb2.used++] != '=') Psyntax("not = after argument name"); +} +static int Pstring_maybe(const char *string) { + int l; + l= strlen(string); + if (memcmp(vb2.buf+vb2.used,string,l)) return 0; + vb2.used+= l; + return 1; +} +static void Pstring(const char *string, const char *emsg) { + if (Pstring_maybe(string)) return; + Psyntax(emsg); +} +static int Perrno(const char *stuff) { + const struct Terrno *te; + int r; + char *ep; + for (te= Terrnos; te->n && strcmp(te->n,stuff); te++); + if (te->n) return te->v; + r= strtoul(stuff+2,&ep,10); + if (*ep) Psyntax("errno value not recognised, not numeric"); + return r; +} +static void P_updatetime(void) { + int chars; + unsigned long sec, usec; + if (!adns__vbuf_ensure(&vb2,1000)) Tnomem(); + fgets(vb2.buf,vb2.avail,Tinputfile); Pcheckinput(); + chars= -1; + sscanf(vb2.buf," +%lu.%lu%n",&sec,&usec,&chars); + if (chars==-1) Psyntax("update time invalid"); + currenttime.tv_sec+= sec; + currenttime.tv_usec+= usec; + if (currenttime.tv_usec > 1000000) { + currenttime.tv_sec++; + currenttime.tv_usec -= 1000000; + } + if (vb2.buf[chars] != '\n') Psyntax("not newline after update time"); +} +static void Pfdset(fd_set *set, int max) { + int r, c; + char *ep; + if (vb2.buf[vb2.used++] != '[') Psyntax("fd set start not ["); + FD_ZERO(set); + if (vb2.buf[vb2.used] == ']') { vb2.used++; return; } + for (;;) { + r= strtoul(vb2.buf+vb2.used,&ep,10); + if (r>=max) Psyntax("fd set member > max"); + if (ep == (char*)vb2.buf+vb2.used) Psyntax("empty entry in fd set"); + FD_SET(r,set); + vb2.used= ep - (char*)vb2.buf; + c= vb2.buf[vb2.used++]; + if (c == ']') break; + if (c != ',') Psyntax("fd set separator not ,"); + } +} +#ifdef HAVE_POLL +static int Ppollfdevents(void) { + int events; + if (Pstring_maybe("0")) return 0; + events= 0; + if (Pstring_maybe("POLLIN")) { + events |= POLLIN; + if (!Pstring_maybe("|")) return events; + } + if (Pstring_maybe("POLLOUT")) { + events |= POLLOUT; + if (!Pstring_maybe("|")) return events; + } + Pstring("POLLPRI","pollfdevents PRI?"); + return events; +} +static void Ppollfds(struct pollfd *fds, int nfds) { + int i; + char *ep; + const char *comma= ""; + if (vb2.buf[vb2.used++] != '[') Psyntax("pollfds start not ["); + for (i=0; ifd= strtoul(vb2.buf+vb2.used,&ep,10); + vb2.used= ep - (char*)vb2.buf; + Pstring(", events=",", events= in pollfds"); + fds->events= Ppollfdevents(); + Pstring(", revents=",", revents= in pollfds"); + fds->revents= Ppollfdevents(); + Pstring("}","} in pollfds"); + Pstring(comma,"separator in pollfds"); + comma= ", "; + } + if (vb2.buf[vb2.used++] != ']') Psyntax("pollfds end not ]"); +} +#endif +static void Paddr(struct sockaddr *addr, int *lenr) { + struct sockaddr_in *sa= (struct sockaddr_in*)addr; + char *p, *ep; + long ul; + assert(*lenr >= sizeof(*sa)); + p= strchr(vb2.buf+vb2.used,':'); + if (!p) Psyntax("no port on address"); + *p++= 0; + memset(sa,0,sizeof(*sa)); + sa->sin_family= AF_INET; + if (!inet_aton(vb2.buf+vb2.used,&sa->sin_addr)) Psyntax("invalid address"); + ul= strtoul(p,&ep,10); + if (*ep && *ep != ' ') Psyntax("invalid port (bad syntax)"); + if (ul >= 65536) Psyntax("port too large"); + sa->sin_port= htons(ul); + *lenr= sizeof(*sa); + vb2.used= ep - (char*)vb2.buf; +} +static int Pbytes(byte *buf, int maxlen) { + static const char hexdigits[]= "0123456789abcdef"; + int c, v, done; + const char *pf; + done= 0; + for (;;) { + c= getc(Tinputfile); Pcheckinput(); + if (c=='\n' || c==' ' || c=='\t') continue; + if (c=='.') break; + pf= strchr(hexdigits,c); if (!pf) Psyntax("invalid first hex digit"); + v= (pf-hexdigits)<<4; + c= getc(Tinputfile); Pcheckinput(); + pf= strchr(hexdigits,c); if (!pf) Psyntax("invalid second hex digit"); + v |= (pf-hexdigits); + if (maxlen<=0) Psyntax("buffer overflow in bytes"); + *buf++= v; + maxlen--; done++; + } + for (;;) { + c= getc(Tinputfile); Pcheckinput(); + if (c=='\n') return done; + } +} +void Q_vb(void) { + int r; + const char *nl; + Tensureinputfile(); + if (!adns__vbuf_ensure(&vb2,vb.used+2)) Tnomem(); + r= fread(vb2.buf,1,vb.used+2,Tinputfile); + if (feof(Tinputfile)) { + fprintf(stderr,"adns test harness: input ends prematurely; program did:\n %.*s\n", + vb.used,vb.buf); + exit(-1); + } + Pcheckinput(); + if (vb2.buf[0] != ' ') Psyntax("not space before call"); + if (memcmp(vb.buf,vb2.buf+1,vb.used) || + vb2.buf[vb.used+1] != '\n') { + fprintf(stderr, + "adns test harness: program did unexpected:\n %.*s\n" + "was expecting:\n %.*s\n", + vb.used,vb.buf, vb.used,vb2.buf+1); + exit(1); + } + Tensurereportfile(); + nl= memchr(vb.buf,'\n',vb.used); + fprintf(Treportfile," %.*s\n", (int)(nl ? nl - (const char*)vb.buf : vb.used), vb.buf); +} +int Hselect( int max , fd_set *rfds , fd_set *wfds , fd_set *efds , struct timeval *to ) { + int r, amtread; + char *ep; + Qselect( max , rfds , wfds , efds , to ); + if (!adns__vbuf_ensure(&vb2,1000)) Tnomem(); + fgets(vb2.buf,vb2.avail,Tinputfile); Pcheckinput(); + Tensurereportfile(); + fprintf(Treportfile,"%s",vb2.buf); + amtread= strlen(vb2.buf); + if (amtread<=0 || vb2.buf[--amtread]!='\n') + Psyntax("badly formed line"); + vb2.buf[amtread]= 0; + if (memcmp(vb2.buf," select=",8)) Psyntax("syscall reply mismatch"); + if (vb2.buf[8] == 'E') { + int e; + e= Perrno(vb2.buf+8); + P_updatetime(); + errno= e; + return -1; + } + r= strtoul(vb2.buf+8,&ep,10); + if (*ep && *ep!=' ') Psyntax("return value not E* or positive number"); + vb2.used= ep - (char*)vb2.buf; + Parg("rfds"); Pfdset(rfds,max); + Parg("wfds"); Pfdset(wfds,max); + Parg("efds"); Pfdset(efds,max); + assert(vb2.used <= amtread); + if (vb2.used != amtread) Psyntax("junk at end of line"); + P_updatetime(); + return r; +} +#ifdef HAVE_POLL +int Hpoll( struct pollfd *fds , int nfds , int timeout ) { + int r, amtread; + char *ep; + Qpoll( fds , nfds , timeout ); + if (!adns__vbuf_ensure(&vb2,1000)) Tnomem(); + fgets(vb2.buf,vb2.avail,Tinputfile); Pcheckinput(); + Tensurereportfile(); + fprintf(Treportfile,"%s",vb2.buf); + amtread= strlen(vb2.buf); + if (amtread<=0 || vb2.buf[--amtread]!='\n') + Psyntax("badly formed line"); + vb2.buf[amtread]= 0; + if (memcmp(vb2.buf," poll=",6)) Psyntax("syscall reply mismatch"); + if (vb2.buf[6] == 'E') { + int e; + e= Perrno(vb2.buf+6); + P_updatetime(); + errno= e; + return -1; + } + r= strtoul(vb2.buf+6,&ep,10); + if (*ep && *ep!=' ') Psyntax("return value not E* or positive number"); + vb2.used= ep - (char*)vb2.buf; + Parg("fds"); Ppollfds(fds,nfds); + assert(vb2.used <= amtread); + if (vb2.used != amtread) Psyntax("junk at end of line"); + P_updatetime(); + return r; +} +#endif +int Hsocket( int domain , int type , int protocol ) { + int r, amtread; + char *ep; + Tmust("socket","domain",domain==AF_INET); + Tmust("socket","type",type==SOCK_STREAM || type==SOCK_DGRAM); + Qsocket( type ); + if (!adns__vbuf_ensure(&vb2,1000)) Tnomem(); + fgets(vb2.buf,vb2.avail,Tinputfile); Pcheckinput(); + Tensurereportfile(); + fprintf(Treportfile,"%s",vb2.buf); + amtread= strlen(vb2.buf); + if (amtread<=0 || vb2.buf[--amtread]!='\n') + Psyntax("badly formed line"); + vb2.buf[amtread]= 0; + if (memcmp(vb2.buf," socket=",8)) Psyntax("syscall reply mismatch"); + if (vb2.buf[8] == 'E') { + int e; + e= Perrno(vb2.buf+8); + P_updatetime(); + errno= e; + return -1; + } + r= strtoul(vb2.buf+8,&ep,10); + if (*ep && *ep!=' ') Psyntax("return value not E* or positive number"); + vb2.used= ep - (char*)vb2.buf; + assert(vb2.used <= amtread); + if (vb2.used != amtread) Psyntax("junk at end of line"); + P_updatetime(); + return r; +} +int Hfcntl( int fd , int cmd , ... ) { + int r, amtread; + va_list al; long arg; + Tmust("fcntl","cmd",cmd==F_SETFL || cmd==F_GETFL); + if (cmd == F_SETFL) { + va_start(al,cmd); arg= va_arg(al,long); va_end(al); + } else { + arg= 0; + } + Qfcntl( fd , cmd , arg ); + if (!adns__vbuf_ensure(&vb2,1000)) Tnomem(); + fgets(vb2.buf,vb2.avail,Tinputfile); Pcheckinput(); + Tensurereportfile(); + fprintf(Treportfile,"%s",vb2.buf); + amtread= strlen(vb2.buf); + if (amtread<=0 || vb2.buf[--amtread]!='\n') + Psyntax("badly formed line"); + vb2.buf[amtread]= 0; + if (memcmp(vb2.buf," fcntl=",7)) Psyntax("syscall reply mismatch"); + if (vb2.buf[7] == 'E') { + int e; + e= Perrno(vb2.buf+7); + P_updatetime(); + errno= e; + return -1; + } + r= 0; + if (cmd == F_GETFL) { + if (!memcmp(vb2.buf+7,"O_NONBLOCK|...",14)) { + r= O_NONBLOCK; + vb2.used= 7+14; + } else if (!memcmp(vb2.buf+7,"~O_NONBLOCK&...",15)) { + vb2.used= 7+15; + } else { + Psyntax("fcntl flags not O_NONBLOCK|... or ~O_NONBLOCK&..."); + } + } else if (cmd == F_SETFL) { + if (memcmp(vb2.buf+7,"OK",2)) Psyntax("success/fail not E* or OK"); + vb2.used= 7+2; + r= 0; + } else { + Psyntax("fcntl not F_GETFL or F_SETFL"); + } + assert(vb2.used <= amtread); + if (vb2.used != amtread) Psyntax("junk at end of line"); + P_updatetime(); + return r; +} +int Hconnect( int fd , const struct sockaddr *addr , int addrlen ) { + int r, amtread; + Qconnect( fd , addr , addrlen ); + if (!adns__vbuf_ensure(&vb2,1000)) Tnomem(); + fgets(vb2.buf,vb2.avail,Tinputfile); Pcheckinput(); + Tensurereportfile(); + fprintf(Treportfile,"%s",vb2.buf); + amtread= strlen(vb2.buf); + if (amtread<=0 || vb2.buf[--amtread]!='\n') + Psyntax("badly formed line"); + vb2.buf[amtread]= 0; + if (memcmp(vb2.buf," connect=",9)) Psyntax("syscall reply mismatch"); + if (vb2.buf[9] == 'E') { + int e; + e= Perrno(vb2.buf+9); + P_updatetime(); + errno= e; + return -1; + } + if (memcmp(vb2.buf+9,"OK",2)) Psyntax("success/fail not E* or OK"); + vb2.used= 9+2; + r= 0; + assert(vb2.used <= amtread); + if (vb2.used != amtread) Psyntax("junk at end of line"); + P_updatetime(); + return r; +} +int Hclose( int fd ) { + int r, amtread; + Qclose( fd ); + if (!adns__vbuf_ensure(&vb2,1000)) Tnomem(); + fgets(vb2.buf,vb2.avail,Tinputfile); Pcheckinput(); + Tensurereportfile(); + fprintf(Treportfile,"%s",vb2.buf); + amtread= strlen(vb2.buf); + if (amtread<=0 || vb2.buf[--amtread]!='\n') + Psyntax("badly formed line"); + vb2.buf[amtread]= 0; + if (memcmp(vb2.buf," close=",7)) Psyntax("syscall reply mismatch"); + if (vb2.buf[7] == 'E') { + int e; + e= Perrno(vb2.buf+7); + P_updatetime(); + errno= e; + return -1; + } + if (memcmp(vb2.buf+7,"OK",2)) Psyntax("success/fail not E* or OK"); + vb2.used= 7+2; + r= 0; + assert(vb2.used <= amtread); + if (vb2.used != amtread) Psyntax("junk at end of line"); + P_updatetime(); + return r; +} +int Hsendto( int fd , const void *msg , int msglen , unsigned int flags , const struct sockaddr *addr , int addrlen ) { + int r, amtread; + char *ep; + Tmust("sendto","flags",flags==0); + Qsendto( fd , msg , msglen , addr , addrlen ); + if (!adns__vbuf_ensure(&vb2,1000)) Tnomem(); + fgets(vb2.buf,vb2.avail,Tinputfile); Pcheckinput(); + Tensurereportfile(); + fprintf(Treportfile,"%s",vb2.buf); + amtread= strlen(vb2.buf); + if (amtread<=0 || vb2.buf[--amtread]!='\n') + Psyntax("badly formed line"); + vb2.buf[amtread]= 0; + if (memcmp(vb2.buf," sendto=",8)) Psyntax("syscall reply mismatch"); + if (vb2.buf[8] == 'E') { + int e; + e= Perrno(vb2.buf+8); + P_updatetime(); + errno= e; + return -1; + } + r= strtoul(vb2.buf+8,&ep,10); + if (*ep && *ep!=' ') Psyntax("return value not E* or positive number"); + vb2.used= ep - (char*)vb2.buf; + assert(vb2.used <= amtread); + if (vb2.used != amtread) Psyntax("junk at end of line"); + P_updatetime(); + return r; +} +int Hrecvfrom( int fd , void *buf , int buflen , unsigned int flags , struct sockaddr *addr , int *addrlen ) { + int r, amtread; + Tmust("recvfrom","flags",flags==0); + Tmust("recvfrom","*addrlen",*addrlen>=sizeof(struct sockaddr_in)); + Qrecvfrom( fd , buflen , *addrlen ); + if (!adns__vbuf_ensure(&vb2,1000)) Tnomem(); + fgets(vb2.buf,vb2.avail,Tinputfile); Pcheckinput(); + Tensurereportfile(); + fprintf(Treportfile,"%s",vb2.buf); + amtread= strlen(vb2.buf); + if (amtread<=0 || vb2.buf[--amtread]!='\n') + Psyntax("badly formed line"); + vb2.buf[amtread]= 0; + if (memcmp(vb2.buf," recvfrom=",10)) Psyntax("syscall reply mismatch"); + if (vb2.buf[10] == 'E') { + int e; + e= Perrno(vb2.buf+10); + P_updatetime(); + errno= e; + return -1; + } + if (memcmp(vb2.buf+10,"OK",2)) Psyntax("success/fail not E* or OK"); + vb2.used= 10+2; + r= 0; + Parg("addr"); Paddr(addr,addrlen); + assert(vb2.used <= amtread); + if (vb2.used != amtread) Psyntax("junk at end of line"); + r= Pbytes(buf,buflen); + P_updatetime(); + return r; +} +int Hread( int fd , void *buf , size_t buflen ) { + int r, amtread; + Qread( fd , buflen ); + if (!adns__vbuf_ensure(&vb2,1000)) Tnomem(); + fgets(vb2.buf,vb2.avail,Tinputfile); Pcheckinput(); + Tensurereportfile(); + fprintf(Treportfile,"%s",vb2.buf); + amtread= strlen(vb2.buf); + if (amtread<=0 || vb2.buf[--amtread]!='\n') + Psyntax("badly formed line"); + vb2.buf[amtread]= 0; + if (memcmp(vb2.buf," read=",6)) Psyntax("syscall reply mismatch"); + if (vb2.buf[6] == 'E') { + int e; + e= Perrno(vb2.buf+6); + P_updatetime(); + errno= e; + return -1; + } + if (memcmp(vb2.buf+6,"OK",2)) Psyntax("success/fail not E* or OK"); + vb2.used= 6+2; + r= 0; + assert(vb2.used <= amtread); + if (vb2.used != amtread) Psyntax("junk at end of line"); + r= Pbytes(buf,buflen); + P_updatetime(); + return r; +} +int Hwrite( int fd , const void *buf , size_t len ) { + int r, amtread; + char *ep; + Qwrite( fd , buf , len ); + if (!adns__vbuf_ensure(&vb2,1000)) Tnomem(); + fgets(vb2.buf,vb2.avail,Tinputfile); Pcheckinput(); + Tensurereportfile(); + fprintf(Treportfile,"%s",vb2.buf); + amtread= strlen(vb2.buf); + if (amtread<=0 || vb2.buf[--amtread]!='\n') + Psyntax("badly formed line"); + vb2.buf[amtread]= 0; + if (memcmp(vb2.buf," write=",7)) Psyntax("syscall reply mismatch"); + if (vb2.buf[7] == 'E') { + int e; + e= Perrno(vb2.buf+7); + P_updatetime(); + errno= e; + return -1; + } + r= strtoul(vb2.buf+7,&ep,10); + if (*ep && *ep!=' ') Psyntax("return value not E* or positive number"); + vb2.used= ep - (char*)vb2.buf; + assert(vb2.used <= amtread); + if (vb2.used != amtread) Psyntax("junk at end of line"); + P_updatetime(); + return r; +} Index: adns/regress/hplayback.c.m4 diff -u adns/regress/hplayback.c.m4:1.14 adns/regress/hplayback.c.m4:1.19 --- adns/regress/hplayback.c.m4:1.14 Tue Jun 27 23:58:20 2000 +++ adns/regress/hplayback.c.m4 Sun Sep 17 01:24:24 2000 @@ -7,7 +7,7 @@ m4_dnl m4_dnl It is part of adns, which is m4_dnl Copyright (C) 1997-2000 Ian Jackson -m4_dnl Copyright (C) 1999 Tony Finch +m4_dnl Copyright (C) 1999-2000 Tony Finch m4_dnl m4_dnl This program is free software; you can redistribute it and/or modify m4_dnl it under the terms of the GNU General Public License as published by @@ -27,13 +27,17 @@ #include #include -#include #include #include +#include #include #include #include +#include + +#include +#include #include "harness.h" @@ -150,9 +154,11 @@ if (vb2.buf[vb2.used++] != hm_squote[hm_squote) Psyntax("fd set start not ["); FD_ZERO(set); + if (vb2.buf[vb2.used] == hm_squote]hm_squote) { vb2.used++; return; } for (;;) { r= strtoul(vb2.buf+vb2.used,&ep,10); if (r>=max) Psyntax("fd set member > max"); + if (ep == (char*)vb2.buf+vb2.used) Psyntax("empty entry in fd set"); FD_SET(r,set); vb2.used= ep - (char*)vb2.buf; c= vb2.buf[vb2.used++]; @@ -367,5 +373,7 @@ return r; } ') + +m4_define(`hm_specsyscall', `') m4_include(`hsyscalls.i4') Index: adns/regress/hrecord.c diff -u /dev/null adns/regress/hrecord.c:1.1 --- /dev/null Sun Sep 17 15:32:51 2000 +++ adns/regress/hrecord.c Sat Sep 16 23:12:31 2000 @@ -0,0 +1,227 @@ +#include +#include +#include +#include +#include +#include +#include +#include "harness.h" +static FILE *Toutputfile; +void Tshutdown(void) { +} +static void R_recordtime(void) { + int r; + struct timeval tv, tvrel; + Tensureoutputfile(); + r= gettimeofday(&tv,0); if (r) Tfailed("gettimeofday syscallbegin"); + tvrel.tv_sec= tv.tv_sec - currenttime.tv_sec; + tvrel.tv_usec= tv.tv_usec - currenttime.tv_usec; + if (tv.tv_usec < 0) { tvrel.tv_usec += 1000000; tvrel.tv_sec--; } + Tvbf("\n +%ld.%06ld",(long)tvrel.tv_sec,(long)tvrel.tv_usec); + currenttime= tv; +} +void Tensureoutputfile(void) { + const char *fdstr; + int fd, r; + if (Toutputfile) return; + Toutputfile= stdout; + fdstr= getenv("ADNS_TEST_OUT_FD"); + if (fdstr) { + fd= atoi(fdstr); + Toutputfile= fdopen(fd,"a"); if (!Toutputfile) Tfailed("fdopen ADNS_TEST_OUT_FD"); + } + r= gettimeofday(¤ttime,0); if (r) Tfailed("gettimeofday syscallbegin"); + if (fprintf(Toutputfile," start %ld.%06ld\n", + (long)currenttime.tv_sec,(long)currenttime.tv_usec) == EOF) Toutputerr(); +} +void Q_vb(void) { + if (!adns__vbuf_append(&vb,"",1)) Tnomem(); + Tensureoutputfile(); + if (fprintf(Toutputfile," %s\n",vb.buf) == EOF) Toutputerr(); + if (fflush(Toutputfile)) Toutputerr(); +} +static void R_vb(void) { + Q_vb(); +} +int Hselect( int max , fd_set *rfds , fd_set *wfds , fd_set *efds , struct timeval *to ) { + int r, e; + Qselect( max , rfds , wfds , efds , to ); + r= select( max , rfds , wfds , efds , to ); + e= errno; + vb.used= 0; + Tvba("select="); + if (r==-1) { Tvberrno(e); goto x_error; } + Tvbf("%d",r); + Tvba(" rfds="); Tvbfdset(max,rfds); + Tvba(" wfds="); Tvbfdset(max,wfds); + Tvba(" efds="); Tvbfdset(max,efds); + x_error: + R_recordtime(); + R_vb(); + errno= e; + return r; +} +#ifdef HAVE_POLL +int Hpoll( struct pollfd *fds , int nfds , int timeout ) { + int r, e; + Qpoll( fds , nfds , timeout ); + r= poll( fds , nfds , timeout ); + e= errno; + vb.used= 0; + Tvba("poll="); + if (r==-1) { Tvberrno(e); goto x_error; } + Tvbf("%d",r); + Tvba(" fds="); Tvbpollfds(fds,nfds); + x_error: + R_recordtime(); + R_vb(); + errno= e; + return r; +} +#endif +int Hsocket( int domain , int type , int protocol ) { + int r, e; + Tmust("socket","domain",domain==AF_INET); + Tmust("socket","type",type==SOCK_STREAM || type==SOCK_DGRAM); + Qsocket( type ); + r= socket( domain , type , protocol ); + e= errno; + vb.used= 0; + Tvba("socket="); + if (r==-1) { Tvberrno(e); goto x_error; } + Tvbf("%d",r); + x_error: + R_recordtime(); + R_vb(); + errno= e; + return r; +} +int Hfcntl( int fd , int cmd , ... ) { + int r, e; + va_list al; long arg; + Tmust("fcntl","cmd",cmd==F_SETFL || cmd==F_GETFL); + if (cmd == F_SETFL) { + va_start(al,cmd); arg= va_arg(al,long); va_end(al); + } else { + arg= 0; + } + Qfcntl( fd , cmd , arg ); + r= fcntl( fd , cmd , arg ); + e= errno; + vb.used= 0; + Tvba("fcntl="); + if (r==-1) { Tvberrno(e); goto x_error; } + if (cmd == F_GETFL) { + Tvbf(r & O_NONBLOCK ? "O_NONBLOCK|..." : "~O_NONBLOCK&..."); + } else { + if (cmd == F_SETFL) { + Tmust("fcntl","return",!r); + } else { + Tmust("cmd","F_GETFL/F_SETFL",0); + } + Tvba("OK"); + } + x_error: + R_recordtime(); + R_vb(); + errno= e; + return r; +} +int Hconnect( int fd , const struct sockaddr *addr , int addrlen ) { + int r, e; + Qconnect( fd , addr , addrlen ); + r= connect( fd , addr , addrlen ); + e= errno; + vb.used= 0; + Tvba("connect="); + if (r) { Tvberrno(e); goto x_error; } + Tvba("OK"); + x_error: + R_recordtime(); + R_vb(); + errno= e; + return r; +} +int Hclose( int fd ) { + int r, e; + Qclose( fd ); + r= close( fd ); + e= errno; + vb.used= 0; + Tvba("close="); + if (r) { Tvberrno(e); goto x_error; } + Tvba("OK"); + x_error: + R_recordtime(); + R_vb(); + errno= e; + return r; +} +int Hsendto( int fd , const void *msg , int msglen , unsigned int flags , const struct sockaddr *addr , int addrlen ) { + int r, e; + Tmust("sendto","flags",flags==0); + Qsendto( fd , msg , msglen , addr , addrlen ); + r= sendto( fd , msg , msglen , flags , addr , addrlen ); + e= errno; + vb.used= 0; + Tvba("sendto="); + if (r==-1) { Tvberrno(e); goto x_error; } + Tvbf("%d",r); + x_error: + R_recordtime(); + R_vb(); + errno= e; + return r; +} +int Hrecvfrom( int fd , void *buf , int buflen , unsigned int flags , struct sockaddr *addr , int *addrlen ) { + int r, e; + Tmust("recvfrom","flags",flags==0); + Tmust("recvfrom","*addrlen",*addrlen>=sizeof(struct sockaddr_in)); + Qrecvfrom( fd , buflen , *addrlen ); + r= recvfrom( fd , buf , buflen , flags , addr , addrlen ); + e= errno; + vb.used= 0; + Tvba("recvfrom="); + if (r==-1) { Tvberrno(e); goto x_error; } + Tmust("recvfrom","return",r<=buflen); + Tvba("OK"); + Tvba(" addr="); Tvbaddr(addr,*addrlen); + Tvbbytes(buf,r); + x_error: + R_recordtime(); + R_vb(); + errno= e; + return r; +} +int Hread( int fd , void *buf , size_t buflen ) { + int r, e; + Qread( fd , buflen ); + r= read( fd , buf , buflen ); + e= errno; + vb.used= 0; + Tvba("read="); + if (r==-1) { Tvberrno(e); goto x_error; } + Tmust("read","return",r<=buflen); + Tvba("OK"); + Tvbbytes(buf,r); + x_error: + R_recordtime(); + R_vb(); + errno= e; + return r; +} +int Hwrite( int fd , const void *buf , size_t len ) { + int r, e; + Qwrite( fd , buf , len ); + r= write( fd , buf , len ); + e= errno; + vb.used= 0; + Tvba("write="); + if (r==-1) { Tvberrno(e); goto x_error; } + Tvbf("%d",r); + x_error: + R_recordtime(); + R_vb(); + errno= e; + return r; +} Index: adns/regress/hrecord.c.m4 diff -u adns/regress/hrecord.c.m4:1.12 adns/regress/hrecord.c.m4:1.16 --- adns/regress/hrecord.c.m4:1.12 Sun May 7 23:37:18 2000 +++ adns/regress/hrecord.c.m4 Sun Sep 17 01:24:24 2000 @@ -3,11 +3,11 @@ m4_dnl - recording routines m4_dnl This file is -m4_dnl Copyright (C) 1997-1999 Ian Jackson +m4_dnl Copyright (C) 1997-2000 Ian Jackson m4_dnl m4_dnl It is part of adns, which is m4_dnl Copyright (C) 1997-2000 Ian Jackson -m4_dnl Copyright (C) 1999 Tony Finch +m4_dnl Copyright (C) 1999-2000 Tony Finch m4_dnl m4_dnl This program is free software; you can redistribute it and/or modify m4_dnl it under the terms of the GNU General Public License as published by @@ -27,10 +27,13 @@ #include #include -#include #include #include +#include +#include +#include + #include "harness.h" static FILE *Toutputfile; @@ -150,5 +153,7 @@ return r; } ') + +m4_define(`hm_specsyscall', `') m4_include(`hsyscalls.i4') Index: adns/regress/hredirect.h diff -u /dev/null adns/regress/hredirect.h:1.1 --- /dev/null Sun Sep 17 15:32:51 2000 +++ adns/regress/hredirect.h Sat Sep 16 23:12:31 2000 @@ -0,0 +1,38 @@ +#ifndef HREDIRECT_H_INCLUDED +#define HREDIRECT_H_INCLUDED +#include "hsyscalls.h" +#undef select +#define select Hselect +#ifdef HAVE_POLL +#undef poll +#define poll Hpoll +#endif +#undef socket +#define socket Hsocket +#undef fcntl +#define fcntl Hfcntl +#undef connect +#define connect Hconnect +#undef close +#define close Hclose +#undef sendto +#define sendto Hsendto +#undef recvfrom +#define recvfrom Hrecvfrom +#undef read +#define read Hread +#undef write +#define write Hwrite +#undef int +#define writev Hwritev +#undef int +#define gettimeofday Hgettimeofday +#undef void* +#define malloc Hmalloc +#undef void +#define free Hfree +#undef void* +#define realloc Hrealloc +#undef void +#define exit Hexit +#endif Index: adns/regress/hredirect.h.m4 diff -u /dev/null adns/regress/hredirect.h.m4:1.2 --- /dev/null Sun Sep 17 15:32:51 2000 +++ adns/regress/hredirect.h.m4 Sun Sep 17 01:24:24 2000 @@ -0,0 +1,40 @@ +m4_dnl hredirect.h.m4 +m4_dnl (part of complex test harness, not of the library) +m4_dnl - redefinitions of system calls + +m4_dnl This file is +m4_dnl Copyright (C) 2000 Ian Jackson +m4_dnl +m4_dnl It is part of adns, which is +m4_dnl Copyright (C) 1997-2000 Ian Jackson +m4_dnl Copyright (C) 1999-2000 Tony Finch +m4_dnl +m4_dnl This program is free software; you can redistribute it and/or modify +m4_dnl it under the terms of the GNU General Public License as published by +m4_dnl the Free Software Foundation; either version 2, or (at your option) +m4_dnl any later version. +m4_dnl +m4_dnl This program is distributed in the hope that it will be useful, +m4_dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +m4_dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +m4_dnl GNU General Public License for more details. +m4_dnl +m4_dnl You should have received a copy of the GNU General Public License +m4_dnl along with this program; if not, write to the Free Software Foundation, +m4_dnl Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +m4_include(hmacros.i4) + +#ifndef HREDIRECT_H_INCLUDED +#define HREDIRECT_H_INCLUDED + +#include "hsyscalls.h" + +hm_create_nothing +m4_define(`hm_syscall', `#undef $1 +#define $1 H$1') +m4_define(`hm_specsyscall',`#undef $1 +#define $2 H$2') +m4_include(`hsyscalls.i4') + +#endif Index: adns/regress/hsyscalls.h diff -u /dev/null adns/regress/hsyscalls.h:1.1 --- /dev/null Sun Sep 17 15:32:51 2000 +++ adns/regress/hsyscalls.h Sat Sep 16 23:12:31 2000 @@ -0,0 +1,28 @@ +#ifndef HSYSCALLS_H_INCLUDED +#define HSYSCALLS_H_INCLUDED +#include +#include +#include +#include +#ifdef HAVE_POLL +#include +#endif +int Hselect( int max , fd_set *rfds , fd_set *wfds , fd_set *efds , struct timeval *to ); +#ifdef HAVE_POLL +int Hpoll( struct pollfd *fds , int nfds , int timeout ); +#endif +int Hsocket( int domain , int type , int protocol ); +int Hfcntl( int fd , int cmd , ... ); +int Hconnect( int fd , const struct sockaddr *addr , int addrlen ); +int Hclose( int fd ); +int Hsendto( int fd , const void *msg , int msglen , unsigned int flags , const struct sockaddr *addr , int addrlen ); +int Hrecvfrom( int fd , void *buf , int buflen , unsigned int flags , struct sockaddr *addr , int *addrlen ); +int Hread( int fd , void *buf , size_t buflen ); +int Hwrite( int fd , const void *buf , size_t len ); +int Hwritev(int fd, const struct iovec *vector, size_t count); +int Hgettimeofday(struct timeval *tv, struct timezone *tz); +void* Hmalloc(size_t sz); +void Hfree(void *ptr); +void* Hrealloc(void *op, size_t nsz); +void Hexit(int rv)NONRETURNING; +#endif Index: adns/regress/hsyscalls.h.m4 diff -u /dev/null adns/regress/hsyscalls.h.m4:1.2 --- /dev/null Sun Sep 17 15:32:51 2000 +++ adns/regress/hsyscalls.h.m4 Sun Sep 17 01:24:24 2000 @@ -0,0 +1,45 @@ +m4_dnl hsyscalls.h.m4 +m4_dnl (part of complex test harness, not of the library) +m4_dnl - prototypes of redefinitions of system calls + +m4_dnl This file is +m4_dnl Copyright (C) 2000 Ian Jackson +m4_dnl +m4_dnl It is part of adns, which is +m4_dnl Copyright (C) 1997-2000 Ian Jackson +m4_dnl Copyright (C) 1999-2000 Tony Finch +m4_dnl +m4_dnl This program is free software; you can redistribute it and/or modify +m4_dnl it under the terms of the GNU General Public License as published by +m4_dnl the Free Software Foundation; either version 2, or (at your option) +m4_dnl any later version. +m4_dnl +m4_dnl This program is distributed in the hope that it will be useful, +m4_dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +m4_dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +m4_dnl GNU General Public License for more details. +m4_dnl +m4_dnl You should have received a copy of the GNU General Public License +m4_dnl along with this program; if not, write to the Free Software Foundation, +m4_dnl Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +m4_include(hmacros.i4) + +#ifndef HSYSCALLS_H_INCLUDED +#define HSYSCALLS_H_INCLUDED + +#include +#include +#include +#include + +#ifdef HAVE_POLL +#include +#endif + +hm_create_proto_h +m4_define(`hm_syscall', `int H$1(hm_args_massage($3,void));') +m4_define(`hm_specsyscall', `$1 H$2($3)$4;') +m4_include(`hsyscalls.i4') + +#endif Index: adns/regress/hsyscalls.i4 diff -u adns/regress/hsyscalls.i4:1.8 adns/regress/hsyscalls.i4:1.11 --- adns/regress/hsyscalls.i4:1.8 Sun May 7 23:37:18 2000 +++ adns/regress/hsyscalls.i4 Sun Sep 17 01:24:24 2000 @@ -3,11 +3,11 @@ m4_dnl - list of syscalls to override/log and their args m4_dnl This file is -m4_dnl Copyright (C) 1997-1999 Ian Jackson +m4_dnl Copyright (C) 1997-2000 Ian Jackson m4_dnl m4_dnl It is part of adns, which is m4_dnl Copyright (C) 1997-2000 Ian Jackson -m4_dnl Copyright (C) 1999 Tony Finch +m4_dnl Copyright (C) 1999-2000 Tony Finch m4_dnl m4_dnl This program is free software; you can redistribute it and/or modify m4_dnl it under the terms of the GNU General Public License as published by @@ -120,3 +120,11 @@ hm_arg_fd(fd) hm_na hm_arg_bytes_in(void,buf,size_t,len) hm_na ') + +hm_specsyscall(int, writev, `int fd, const struct iovec *vector, size_t count') +hm_specsyscall(int, gettimeofday, `struct timeval *tv, struct timezone *tz') + +hm_specsyscall(void*, malloc, `size_t sz') +hm_specsyscall(void, free, `void *ptr') +hm_specsyscall(void*, realloc, `void *op, size_t nsz') +hm_specsyscall(void, exit, `int rv', NONRETURNING) Index: adns/regress/m1test diff -u adns/regress/m1test:1.9 adns/regress/m1test:1.12 --- adns/regress/m1test:1.9 Tue Jun 27 23:07:33 2000 +++ adns/regress/m1test Sun Sep 17 01:24:24 2000 @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # usage: m1test [] ' # test recording script # @@ -7,7 +7,7 @@ # # It is part of adns, which is # Copyright (C) 1997-2000 Ian Jackson -# Copyright (C) 1999 Tony Finch +# Copyright (C) 1999-2000 Tony Finch # # 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 @@ -28,42 +28,80 @@ if [ $# -lt 3 ] then echo >&2 \ -'usage: m1test [] [=] - ' +'usage: m1test [-] ["<"] + [=] +("<" means read input from case-.in)' exit 1 fi case="case-$1"; shift initfile="$1"; shift -hrecord="./hrecord" +hrecord="./adnstest_record" case "$1" in -*) initflags="$1"; shift esac +if test "x$1" = "x<" +then + shift; exec <"$case.in" +fi + case "$1" in =*) hrecord="`echo \"$1\" | sed -e 's/^=//'`"; shift esac +if test ! -f "$hrecord" -a -f "${hrecord}_record" +then + case "$hrecord" in + /*) program="$hrecord" ;; + *) program="./$hrecord" ;; + esac + hrecord="${program}_record" +else + program="$(echo "$hrecord" | sed -e 's/ .*//; s/_record$//')" +fi + queryargs="$*" initstring="`cat init-$initfile.text`" +xinitflagsf=$program-xinitflags.text +if test -f $xinitflagsf +then + useinitflags="$initflags $(cat $xinitflagsf)"; +else + useinitflags="$initflags /" +fi -echo $initfile $initflags >"$case.sys" +echo $program $initfile $initflags >"$case.sys" echo "$queryargs" >>"$case.sys" EF_DISABLE_BANNER=1 export EF_DISABLE_BANNER -echo running hrecord $initflags "/... $queryargs" +rm -f pipe.out pipe.err +mknod pipe.out p +mknod pipe.err p +tee pipe.out +exec 5>pipe.err + +echo running hrecord $initflags "... $queryargs" set +e -ADNS_TEST_OUT_FD=3 3>>"$case.sys" >"$case.out" 2>"$case.err" >"$case.sys" >&4 2>&5 \ + $hrecord $useinitflags"$initstring" $queryargs rc=$? set -e + +echo "rc=$rc" >&4 +exec 4>&- +exec 5>&- -echo "rc=$rc" >>$case.out +wait $tee_out +wait $tee_err -egrep . -- "$case.err" "$case.out" echo "exit status: $rc" Index: adns/regress/r1test diff -u adns/regress/r1test:1.11 adns/regress/r1test:1.18 --- adns/regress/r1test:1.11 Sun May 7 23:37:18 2000 +++ adns/regress/r1test Sun Sep 17 01:24:24 2000 @@ -7,7 +7,7 @@ # # It is part of adns, which is # Copyright (C) 1997-2000 Ian Jackson -# Copyright (C) 1999 Tony Finch +# Copyright (C) 1999-2000 Tony Finch # # 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 @@ -31,26 +31,49 @@ case="case-$casename" ocase="output-$casename" -exec <"$case.sys" -read initfile initflags -read queryargs +exec 4<"$case.sys" +read <&4 program initfile initflags +read <&4 queryargs initstring="`cat init-$initfile.text`" +xinitflagsf=$program-xinitflags.text +if test -f $xinitflagsf +then + initflags="$initflags `cat $xinitflagsf`"; +else + initflags="$initflags /" +fi rm -f $ocase.* EF_DISABLE_BANNER=1 export EF_DISABLE_BANNER +if test -f "$case.in" +then + exec <"$case.in" +else + exec >"$ocase.report" >"$ocase.out" 2>"$ocase.err" \ - ./hplayback $initflags "/$initstring" $queryargs +ADNS_TEST_REPORT_FD=3 ADNS_TEST_IN_FD=4 \ + 3>>"$ocase.report" 4<&4 >"$ocase.out" 2>"$ocase.err" \ + $playback $initflags"$initstring" $queryargs rc=$? set -e if [ "$rc" = 5 ] then - echo -n "SKIPPED-$casename " + printf "SKIPPED-$casename " mrc=5 exit fi @@ -68,7 +91,7 @@ fi done -cat >"$ocase.leftover" +cat <&4 >"$ocase.leftover" if egrep . /dev/null "$ocase.leftover" then failwhy="$failwhy EXITED EARLY" @@ -82,5 +105,5 @@ exit fi -echo -n "$casename " +printf "$casename " mrc=0 Index: adns/src/Makefile.in diff -u adns/src/Makefile.in:1.21 adns/src/Makefile.in:1.22 --- adns/src/Makefile.in:1.21 Sun May 7 23:37:18 2000 +++ adns/src/Makefile.in Sun Sep 17 01:24:24 2000 @@ -5,7 +5,7 @@ # # It is part of adns, which is # Copyright (C) 1997-2000 Ian Jackson -# Copyright (C) 1999 Tony Finch +# Copyright (C) 1999-2000 Tony Finch # # 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 Index: adns/src/adns.h diff -u adns/src/adns.h:1.80 adns/src/adns.h:1.83 --- adns/src/adns.h:1.80 Tue May 9 22:50:50 2000 +++ adns/src/adns.h Sun Sep 17 02:56:18 2000 @@ -5,11 +5,11 @@ /* * * This file is - * Copyright (C) 1997-1999 Ian Jackson + * Copyright (C) 1997-2000 Ian Jackson * * It is part of adns, which is * Copyright (C) 1997-2000 Ian Jackson - * Copyright (C) 1999 Tony Finch + * Copyright (C) 1999-2000 Tony Finch * * 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 @@ -22,13 +22,13 @@ * GNU General Public License for more details. * * - * For the benefit of certain LGPL'd `omnibus' software which provides - * a uniform interface to various things including adns, I make the - * following additional licence. I do this because the GPL would - * otherwise force either the omnibus software to be GPL'd or for the - * adns-using part to be distributed separately. + * For the benefit of certain LGPL'd `omnibus' software which + * provides a uniform interface to various things including adns, I + * make the following additional licence. I do this because the GPL + * would otherwise force either the omnibus software to be GPL'd or + * the adns-using part to be distributed separately. * - * So, you may also redistribute and/or modify adns.h (but only the + * So: you may also redistribute and/or modify adns.h (but only the * public header file adns.h and not any other part of adns) under the * terms of the GNU Library General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at @@ -39,10 +39,10 @@ * applications where the whole distribution is not GPL'd, are still * likely to be in violation of the GPL. Anyone who wants to do this * should contact Ian Jackson. Please note that to avoid encouraging - * people to infringe the GPL as it applies the body of adns, Ian thinks - * that if you take advantage of the special exception to redistribute - * just adns.h under the LGPL, you should retain this paragraph in its - * place in the appropriate copyright statements. + * people to infringe the GPL as it applies to the body of adns, Ian + * thinks that if you take advantage of the special exception to + * redistribute just adns.h under the LGPL, you should retain this + * paragraph in its place in the appropriate copyright statements. * * * You should have received a copy of the GNU General Public License, @@ -51,7 +51,7 @@ * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * - * $Id: adns.h,v 1.80 2000/05/09 21:50:50 ian Exp $ + * $Id: adns.h,v 1.83 2000/09/17 01:56:18 ian Exp $ */ #ifndef ADNS_H_INCLUDED @@ -151,12 +151,6 @@ * names) will be quoted, as \X if it is a printing ASCII character or * \DDD otherwise. * - * (The characters which will be unquoted are the printing 7-bit ASCII - * characters except the punctuation characters " ( ) @ ; $ \ - - * I.e. unquoted characters are alphanumerics, and the following - * punctuation characters: ! # % ^ & * - _ = + [ ] { } - * * If the query goes via a CNAME then the canonical name (ie, the * thing that the CNAME record refers to) is usually allowed to * contain any characters, which will be quoted as above. With @@ -179,20 +173,33 @@ * header field. The particular format used is that if the mailbox * requires quoting according to the rules in RFC822 then the * local-part is quoted in double quotes, which end at the next - * unescaped double quote. (\ is the escape char, and is doubled, and - * is used to escape only \ and ".) Otherwise the local-part is - * presented as-is. In any case this is followed by an @ and the - * domain. The domain will not contain any characters not legal in - * hostnames. adns will protect the application from local parts - * containing control characters - these appear to be legal according - * to RFC822 but are clearly a bad idea. + * unescaped double quote (\ is the escape char, and is doubled, and + * is used to escape only \ and "). If the local-part is legal + * without quoting according to RFC822, it is presented as-is. In any + * case the local-part is followed by an @ and the domain. The domain + * will not contain any characters not legal in hostnames. + * + * Unquoted local-parts may contain any printing 7-bit ASCII + * except the punctuation characters ( ) < > @ , ; : \ " [ ] + * I.e. they may contain alphanumerics, and the following + * punctuation characters: ! # % ^ & * - _ = + { } . + * + * adns will reject local parts containing control characters (byte + * values 0-31, 127-159, and 255) - these appear to be legal according + * to RFC822 (at least 0-127) but are clearly a bad idea. RFC1035 + * syntax does not make any distinction between a single RFC822 + * quoted-string containing full stops, and a series of quoted-strings + * separated by full stops; adns will return anything that isn't all + * valid atoms as a single quoted-string. RFC822 does not allow + * high-bit-set characters at all, but adns does allow them in + * local-parts, treating them as needing quoting. * * If you ask for the domain with _raw then _no_ checking is done * (even on the host part, regardless of adns_qf_quoteok_anshost), and * you just get the domain name in master file format. * * If no mailbox is supplied the returned string will be `.' in either - * caswe. + * case. */ typedef enum { Index: adns/src/adns.make diff -u adns/src/adns.make:1.6 adns/src/adns.make:1.7 --- adns/src/adns.make:1.6 Sun May 7 23:37:18 2000 +++ adns/src/adns.make Sun Sep 17 01:24:24 2000 @@ -5,7 +5,7 @@ # # It is part of adns, which is # Copyright (C) 1997-2000 Ian Jackson -# Copyright (C) 1999 Tony Finch +# Copyright (C) 1999-2000 Tony Finch # # 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 Index: adns/src/check.c diff -u adns/src/check.c:1.7 adns/src/check.c:1.8 --- adns/src/check.c:1.7 Sun May 7 23:37:18 2000 +++ adns/src/check.c Sun Sep 17 01:24:24 2000 @@ -8,7 +8,7 @@ * * It is part of adns, which is * Copyright (C) 1997-2000 Ian Jackson - * Copyright (C) 1999 Tony Finch + * Copyright (C) 1999-2000 Tony Finch * * 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 Index: adns/src/config.h.in diff -u adns/src/config.h.in:1.5 adns/src/config.h.in:1.6 --- adns/src/config.h.in:1.5 Thu Aug 5 22:38:34 1999 +++ adns/src/config.h.in Thu Sep 14 02:23:39 2000 @@ -1,5 +1,8 @@ /* src/config.h.in. Generated automatically from configure.in by autoheader. */ +/* Define if inline functions a la GCC are available. */ +#undef HAVE_INLINE + /* Define if function attributes a la GCC 2.5 and higher are available. */ #undef HAVE_GNUC25_ATTRIB @@ -18,6 +21,9 @@ /* Define if you have the poll function. */ #undef HAVE_POLL +/* Define if you have the header file. */ +#undef HAVE_SYS_SELECT_H + /* Define if you have the nsl library (-lnsl). */ #undef HAVE_LIBNSL @@ -26,6 +32,10 @@ /* Use the definitions: */ +#ifndef HAVE_INLINE +#define inline +#endif + #ifdef HAVE_POLL #include #else @@ -88,4 +98,8 @@ #ifdef HAVEUSE_RPCTYPES_H #include +#endif + +#ifdef HAVE_SYS_SELECT_H +#include #endif Index: adns/src/event.c diff -u adns/src/event.c:1.54 adns/src/event.c:1.56 --- adns/src/event.c:1.54 Wed Jun 28 00:01:42 2000 +++ adns/src/event.c Sun Sep 17 01:24:24 2000 @@ -10,7 +10,7 @@ * * It is part of adns, which is * Copyright (C) 1997-2000 Ian Jackson - * Copyright (C) 1999 Tony Finch + * Copyright (C) 1999-2000 Tony Finch * * 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 @@ -395,7 +395,8 @@ } if (udpaddrlen != sizeof(udpaddr)) { adns__diag(ads,-1,0,"datagram received with wrong address length %d" - " (expected %d)", udpaddrlen,sizeof(udpaddr)); + " (expected %lu)", udpaddrlen, + (unsigned long)sizeof(udpaddr)); continue; } if (udpaddr.sin_family != AF_INET) { Index: adns/src/general.c diff -u adns/src/general.c:1.27 adns/src/general.c:1.28 --- adns/src/general.c:1.27 Sun May 7 23:37:18 2000 +++ adns/src/general.c Sun Sep 17 01:24:24 2000 @@ -9,7 +9,7 @@ * * It is part of adns, which is * Copyright (C) 1997-2000 Ian Jackson - * Copyright (C) 1999 Tony Finch + * Copyright (C) 1999-2000 Tony Finch * * 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 Index: adns/src/internal.h diff -u adns/src/internal.h:1.60 adns/src/internal.h:1.62 --- adns/src/internal.h:1.60 Sun May 7 23:37:18 2000 +++ adns/src/internal.h Sun Sep 17 01:24:24 2000 @@ -10,7 +10,7 @@ * * It is part of adns, which is * Copyright (C) 1997-2000 Ian Jackson - * Copyright (C) 1999 Tony Finch + * Copyright (C) 1999-2000 Tony Finch * * 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 @@ -44,6 +44,10 @@ #include "adns.h" #include "dlist.h" + +#ifdef ADNS_REGRESS_TEST +# include "hredirect.h" +#endif /* Configuration and constants */ Index: adns/src/parse.c diff -u adns/src/parse.c:1.19 adns/src/parse.c:1.21 --- adns/src/parse.c:1.19 Sun May 7 23:37:18 2000 +++ adns/src/parse.c Sun Sep 17 01:24:24 2000 @@ -8,7 +8,7 @@ * * It is part of adns, which is * Copyright (C) 1997-2000 Ian Jackson - * Copyright (C) 1999 Tony Finch + * Copyright (C) 1999-2000 Tony Finch * * 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 @@ -69,10 +69,9 @@ adns_status adns__findlabel_next(findlabel_state *fls, int *lablen_r, int *labstart_r) { - int lablen, jumped, jumpto; + int lablen, jumpto; const char *dgram; - jumped= 0; dgram= fls->dgram; for (;;) { if (fls->cbyte >= fls->dglen) goto x_truncated; @@ -80,10 +79,6 @@ GET_B(fls->cbyte,lablen); if (!(lablen & 0x0c0)) break; if ((lablen & 0x0c0) != 0x0c0) return adns_s_unknownformat; - if (jumped++) { - adns__diag(fls->ads,fls->serv,fls->qu,"compressed datagram contains loop"); - return adns_s_invalidresponse; - } if (fls->cbyte >= fls->dglen) goto x_truncated; if (fls->cbyte >= fls->max) goto x_badresponse; GET_B(fls->cbyte,jumpto); @@ -104,7 +99,6 @@ if (fls->dmend_r) *(fls->dmend_r)= fls->cbyte; } *lablen_r= lablen; -/*if (labstart_r) fprintf(stderr,"label %d >%.*s<\n",lablen,lablen,fls->dgram+*labstart_r);*/ return adns_s_ok; x_truncated: Index: adns/src/poll.c diff -u adns/src/poll.c:1.8 adns/src/poll.c:1.9 --- adns/src/poll.c:1.8 Sun May 7 23:37:18 2000 +++ adns/src/poll.c Sun Sep 17 01:24:24 2000 @@ -8,7 +8,7 @@ * * It is part of adns, which is * Copyright (C) 1997-2000 Ian Jackson - * Copyright (C) 1999 Tony Finch + * Copyright (C) 1999-2000 Tony Finch * * 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 Index: adns/src/query.c diff -u adns/src/query.c:1.61 adns/src/query.c:1.62 --- adns/src/query.c:1.61 Wed Jun 28 00:16:48 2000 +++ adns/src/query.c Sun Sep 17 01:24:24 2000 @@ -10,7 +10,7 @@ * * It is part of adns, which is * Copyright (C) 1997-2000 Ian Jackson - * Copyright (C) 1999 Tony Finch + * Copyright (C) 1999-2000 Tony Finch * * 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 Index: adns/src/reply.c diff -u adns/src/reply.c:1.40 adns/src/reply.c:1.41 --- adns/src/reply.c:1.40 Wed Jun 28 01:02:40 2000 +++ adns/src/reply.c Sun Sep 17 01:24:24 2000 @@ -8,7 +8,7 @@ * * It is part of adns, which is * Copyright (C) 1997-2000 Ian Jackson - * Copyright (C) 1999 Tony Finch + * Copyright (C) 1999-2000 Tony Finch * * 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 Index: adns/src/setup.c diff -u adns/src/setup.c:1.38 adns/src/setup.c:1.39 --- adns/src/setup.c:1.38 Sun May 7 23:37:18 2000 +++ adns/src/setup.c Sun Sep 17 01:24:24 2000 @@ -9,7 +9,7 @@ * * It is part of adns, which is * Copyright (C) 1997-2000 Ian Jackson - * Copyright (C) 1999 Tony Finch + * Copyright (C) 1999-2000 Tony Finch * * 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 Index: adns/src/transmit.c diff -u adns/src/transmit.c:1.21 adns/src/transmit.c:1.22 --- adns/src/transmit.c:1.21 Sun May 21 18:21:58 2000 +++ adns/src/transmit.c Sun Sep 17 01:24:24 2000 @@ -9,7 +9,7 @@ * * It is part of adns, which is * Copyright (C) 1997-2000 Ian Jackson - * Copyright (C) 1999 Tony Finch + * Copyright (C) 1999-2000 Tony Finch * * 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 Index: adns/src/tvarith.h diff -u adns/src/tvarith.h:1.3 adns/src/tvarith.h:1.4 --- adns/src/tvarith.h:1.3 Sun May 7 23:37:19 2000 +++ adns/src/tvarith.h Sun Sep 17 01:24:24 2000 @@ -8,7 +8,7 @@ * * It is part of adns, which is * Copyright (C) 1997-2000 Ian Jackson - * Copyright (C) 1999 Tony Finch + * Copyright (C) 1999-2000 Tony Finch * * 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 Index: adns/src/types.c diff -u adns/src/types.c:1.36 adns/src/types.c:1.38 --- adns/src/types.c:1.36 Sun May 7 23:37:19 2000 +++ adns/src/types.c Sun Sep 17 02:52:39 2000 @@ -8,7 +8,7 @@ * * It is part of adns, which is * Copyright (C) 1997-2000 Ian Jackson - * Copyright (C) 1999 Tony Finch + * Copyright (C) 1999-2000 Tony Finch * * 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 @@ -851,7 +851,7 @@ c= *p++; if ((c&~128) < 32 || (c&~128) == 127) return adns_s_invaliddata; if (c == '.' && !neednorm) neednorm= 1; - else if (c==' ' || ctype_822special(c)) needquote++; + else if (c==' ' || c>=127 || ctype_822special(c)) needquote++; else neednorm= 0; }