├── VERSION ├── regress ├── case-abbrev.err ├── case-child.err ├── case-flags9.err ├── case-lockup.err ├── case-manya.err ├── case-ndots.err ├── case-norm.err ├── case-owner.err ├── case-poll.err ├── case-quote.err ├── case-search.err ├── case-tcpptr.err ├── case-trunc.err ├── case-2ndservok.err ├── case-2ndservtcp.err ├── case-abbrevto.err ├── case-brokenmail.err ├── case-comprinf.err ├── case-connfail.err ├── case-formerr.err ├── case-longdom0.err ├── case-longdom1.err ├── case-longlab0.err ├── case-longlab1.err ├── case-mailboxes.err ├── case-ndots-as.err ├── case-noinfto.err ├── case-norecurse.err ├── case-norecurse2.err ├── case-norecurse3.err ├── case-polltimeout.err ├── case-ptrbaddom.err ├── case-rootquery.err ├── case-search-as.err ├── case-searchabs.err ├── case-sillyrp.err ├── case-tcpallfail.err ├── case-tcpblock.err ├── case-tcpblockbrk.err ├── case-tcpblockwr.err ├── case-tcpbreakin.err ├── case-timeout.err ├── case-unknownq.err ├── case-1stservbroken.err ├── case-1stservtotcp.err ├── case-cnametocname.err ├── case-datapluscname.err ├── case-longdomsrch0.err ├── case-longdomsrch1.err ├── case-longdomsrch1b.err ├── case-longdomsrch2.err ├── case-manyptrwrong.err ├── case-manyptrwrongrem.err ├── case-manyptrwrongrst.err ├── case-manyptrwrongrty.err ├── case-rootqueryall-as.err ├── case-rootqueryall.err ├── case-tcpmultipart.err ├── case-adh-cancel2.out ├── case-adh-cancel3.out ├── case-arf-norm.out ├── case-arf-text.out ├── case-datapluscnamewait.err ├── case-srvbaddom.out ├── case-srvqudom.out ├── case-flags10.err ├── adnslogres-xinitflags.text ├── adnshost-xinitflags.text ├── adnsresfilter-xinitflags.text ├── case-ndotsbad.err ├── init-manyptrwrong.text ├── case-srvha.err ├── case-srvok.err ├── case-adh-cancel2.err ├── case-adh-norm.err ├── case-adh-pipe.err ├── case-arf-text.err ├── case-srvsort.err ├── case-unknown2.err ├── case-unknown33.err ├── case-unknown5.err ├── case-flags10.out ├── case-adh-norm.out ├── case-adh-pipe.out ├── case-ndotsbad.sys ├── init-anarres.text ├── case-adh-cancel.out ├── case-unknown5.out ├── init-noserver.text ├── case-unknown33.out ├── case-arf-norm.err ├── init-1stservto.text ├── init-2ndserver.text ├── init-ncipher.text ├── init-1stservbroken.text ├── case-adh-cancel3.err ├── case-unknownq.out ├── init-default.text ├── init-tunnel.text ├── case-adh-cancel.err ├── case-ndotsbad.out ├── init-ndots.text ├── init-ndots100.text ├── init-ndotsbad.text ├── m4-to-c.rule ├── case-noinfto.out ├── case-unknown2.out ├── case-norm.out ├── case-poll.out ├── case-lockup.out ├── case-timeout.out ├── case-polltimeout.out ├── case-searchabs.out ├── case-flags9.out ├── case-trunc.out ├── case-srvqudom.err ├── case-child.out ├── case-2ndservok.out ├── case-comprinf.out ├── case-manya.out ├── case-tcpptr.out ├── case-longlab0.out ├── case-flags10.sys ├── case-unknownq.sys ├── case-longlab1.out ├── case-mailboxes.out ├── case-longlab1.sys ├── case-srvbaddom.err ├── case-tcpbreakin.out ├── case-cnametocname.out ├── case-rootquery.out ├── initfiles.list ├── case-srvok.out ├── case-longdom1.sys ├── case-longdomsrch0.sys ├── case-ptrbaddom.out ├── case-longdomsrch2.out ├── case-longdomsrch1b.out ├── case-connfail.out ├── case-longdom0.out ├── case-longdomsrch0.out ├── case-longdomsrch1.out ├── case-longdom1.out ├── case-search-as.out ├── case-search.out ├── case-srvha.out ├── case-adh-norm.sys ├── case-norm.sys ├── case-flags9.sys ├── case-ndots.out ├── case-ndots-as.out ├── case-poll.sys ├── case-trunc.sys ├── case-comprinf.sys ├── case-mailboxes.sys ├── case-alr-norm.in ├── case-alr-slow.in ├── case-manya.sys ├── case-unknown33.sys ├── case-alr-norm.out ├── case-alr-slow.out ├── case-arf-text.sys ├── case-longlab0.sys ├── case-alr-slow.err ├── case-adh-pipe.sys ├── case-tcpallfail.sys ├── case-cnametocname.sys ├── case-unknown5.sys ├── hredirect.h.m4 ├── case-alr-norm.err ├── case-formerr.out ├── case-connfail.sys ├── case-2ndservok.sys ├── hsyscalls.h.m4 ├── case-adh-cancel2.sys ├── case-sillyrp.out ├── case-srvbaddom.sys ├── checkall ├── case-ptrbaddom.sys ├── case-abbrevto.out ├── case-longdomsrch1b.sys ├── case-unknown2.sys ├── case-child.sys ├── case-longdom0.sys ├── case-longdomsrch1.sys ├── case-adh-cancel.sys ├── case-norecurse3.out ├── case-1stservtotcp.out ├── case-2ndservtcp.out ├── harness.h.m4 ├── case-1stservbroken.out ├── case-abbrev.out ├── case-srvsort.out ├── case-searchabs.sys ├── case-owner.out ├── case-tcpptr.sys ├── r1test ├── case-tcpblock.out ├── case-adh-cancel3.sys ├── case-brokenmail.out ├── case-tcpallfail.out ├── case-quote.out ├── case-tcpblockbrk.out ├── case-norecurse.out ├── case-norecurse2.out ├── case-rootquery.sys ├── case-tcpbreakin.sys ├── case-tcpblock.sys ├── case-datapluscname.out └── case-longdomsrch2.sys ├── m4 ├── Makefile.am └── ltversion.m4 ├── AUTHORS ├── TODO ├── .gitignore ├── src ├── tvarith.h ├── versioninfo.rc.in ├── libadns.vers ├── dlist.h ├── libadns.def ├── vbuf.c └── Makefile.am ├── LICENCE.WAIVERS ├── Makefile.am ├── client ├── client.h ├── Makefile.am └── fanftest.c └── NEWS /VERSION: -------------------------------------------------------------------------------- 1 | 1.4-g10-2 2 | -------------------------------------------------------------------------------- /regress/case-abbrev.err: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /regress/case-child.err: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /regress/case-flags9.err: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /regress/case-lockup.err: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /regress/case-manya.err: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /regress/case-ndots.err: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /regress/case-norm.err: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /regress/case-owner.err: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /regress/case-poll.err: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /regress/case-quote.err: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /regress/case-search.err: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /regress/case-tcpptr.err: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /regress/case-trunc.err: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /regress/case-2ndservok.err: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /regress/case-2ndservtcp.err: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /regress/case-abbrevto.err: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /regress/case-brokenmail.err: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /regress/case-comprinf.err: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /regress/case-connfail.err: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /regress/case-formerr.err: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /regress/case-longdom0.err: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /regress/case-longdom1.err: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /regress/case-longlab0.err: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /regress/case-longlab1.err: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /regress/case-mailboxes.err: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /regress/case-ndots-as.err: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /regress/case-noinfto.err: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /regress/case-norecurse.err: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /regress/case-norecurse2.err: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /regress/case-norecurse3.err: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /regress/case-polltimeout.err: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /regress/case-ptrbaddom.err: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /regress/case-rootquery.err: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /regress/case-search-as.err: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /regress/case-searchabs.err: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /regress/case-sillyrp.err: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /regress/case-tcpallfail.err: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /regress/case-tcpblock.err: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /regress/case-tcpblockbrk.err: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /regress/case-tcpblockwr.err: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /regress/case-tcpbreakin.err: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /regress/case-timeout.err: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /regress/case-unknownq.err: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /regress/case-1stservbroken.err: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /regress/case-1stservtotcp.err: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /regress/case-cnametocname.err: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /regress/case-datapluscname.err: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /regress/case-longdomsrch0.err: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /regress/case-longdomsrch1.err: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /regress/case-longdomsrch1b.err: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /regress/case-longdomsrch2.err: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /regress/case-manyptrwrong.err: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /regress/case-manyptrwrongrem.err: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /regress/case-manyptrwrongrst.err: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /regress/case-manyptrwrongrty.err: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /regress/case-rootqueryall-as.err: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /regress/case-rootqueryall.err: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /regress/case-tcpmultipart.err: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /regress/case-adh-cancel2.out: -------------------------------------------------------------------------------- 1 | rc=0 2 | -------------------------------------------------------------------------------- /regress/case-adh-cancel3.out: -------------------------------------------------------------------------------- 1 | rc=0 2 | -------------------------------------------------------------------------------- /regress/case-arf-norm.out: -------------------------------------------------------------------------------- 1 | rc=0 2 | -------------------------------------------------------------------------------- /regress/case-arf-text.out: -------------------------------------------------------------------------------- 1 | rc=0 2 | -------------------------------------------------------------------------------- /regress/case-datapluscnamewait.err: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /regress/case-srvbaddom.out: -------------------------------------------------------------------------------- 1 | rc=6 2 | -------------------------------------------------------------------------------- /regress/case-srvqudom.out: -------------------------------------------------------------------------------- 1 | rc=6 2 | -------------------------------------------------------------------------------- /m4/Makefile.am: -------------------------------------------------------------------------------- 1 | # m4/Makefile.am 2 | 3 | -------------------------------------------------------------------------------- /regress/case-flags10.err: -------------------------------------------------------------------------------- 1 | too many flags 2 | -------------------------------------------------------------------------------- /regress/adnslogres-xinitflags.text: -------------------------------------------------------------------------------- 1 | -d -C 2 | -------------------------------------------------------------------------------- /regress/adnshost-xinitflags.text: -------------------------------------------------------------------------------- 1 | --debug --config 2 | -------------------------------------------------------------------------------- /regress/adnsresfilter-xinitflags.text: -------------------------------------------------------------------------------- 1 | --debug --config 2 | -------------------------------------------------------------------------------- /regress/case-ndotsbad.err: -------------------------------------------------------------------------------- 1 | adns failure: init: errno=EINVAL 2 | -------------------------------------------------------------------------------- /regress/init-manyptrwrong.text: -------------------------------------------------------------------------------- 1 | nameserver 140.200.128.13 2 | -------------------------------------------------------------------------------- /regress/case-srvha.err: -------------------------------------------------------------------------------- 1 | adns debug: using nameserver 172.18.45.6 2 | -------------------------------------------------------------------------------- /regress/case-srvok.err: -------------------------------------------------------------------------------- 1 | adns debug: using nameserver 172.18.45.6 2 | -------------------------------------------------------------------------------- /regress/case-adh-cancel2.err: -------------------------------------------------------------------------------- 1 | adns debug: using nameserver 172.18.45.6 2 | -------------------------------------------------------------------------------- /regress/case-adh-norm.err: -------------------------------------------------------------------------------- 1 | adns debug: using nameserver 172.18.45.6 2 | -------------------------------------------------------------------------------- /regress/case-adh-pipe.err: -------------------------------------------------------------------------------- 1 | adns debug: using nameserver 172.18.45.6 2 | -------------------------------------------------------------------------------- /regress/case-arf-text.err: -------------------------------------------------------------------------------- 1 | adns debug: using nameserver 172.18.45.6 2 | -------------------------------------------------------------------------------- /regress/case-srvsort.err: -------------------------------------------------------------------------------- 1 | adns debug: using nameserver 172.18.45.6 2 | -------------------------------------------------------------------------------- /regress/case-unknown2.err: -------------------------------------------------------------------------------- 1 | adns debug: using nameserver 172.18.45.6 2 | -------------------------------------------------------------------------------- /regress/case-unknown33.err: -------------------------------------------------------------------------------- 1 | adns debug: using nameserver 172.18.45.6 2 | -------------------------------------------------------------------------------- /regress/case-unknown5.err: -------------------------------------------------------------------------------- 1 | adns debug: using nameserver 172.18.45.6 2 | -------------------------------------------------------------------------------- /regress/case-flags10.out: -------------------------------------------------------------------------------- 1 | adns debug: using nameserver 172.18.45.6 2 | rc=3 3 | -------------------------------------------------------------------------------- /regress/case-adh-norm.out: -------------------------------------------------------------------------------- 1 | chiark.greenend.org.uk A INET 195.224.76.132 2 | rc=0 3 | -------------------------------------------------------------------------------- /regress/case-adh-pipe.out: -------------------------------------------------------------------------------- 1 | chiark.greenend.org.uk A INET 195.224.76.132 2 | rc=0 3 | -------------------------------------------------------------------------------- /regress/case-ndotsbad.sys: -------------------------------------------------------------------------------- 1 | adnstest ndotsbad 2 | :1 5/news.davenant.greenend.org.uk 3 | -------------------------------------------------------------------------------- /regress/init-anarres.text: -------------------------------------------------------------------------------- 1 | nameserver 172.18.45.2 2 | search davenant.greenend.org.uk 3 | -------------------------------------------------------------------------------- /regress/case-adh-cancel.out: -------------------------------------------------------------------------------- 1 | davenant.relativity.greenend.org.uk A INET 172.18.45.6 2 | rc=0 3 | -------------------------------------------------------------------------------- /regress/case-unknown5.out: -------------------------------------------------------------------------------- 1 | pop.chiark.greenend.org.uk TYPE5 \# 15 0c736572 76696365 2d6e616d 65 c0 10 2 | rc=0 3 | -------------------------------------------------------------------------------- /regress/init-noserver.text: -------------------------------------------------------------------------------- 1 | nameserver 172.18.45.36 2 | sortlist 127.0.0.1/32 172.18.45.0/28 172.18.45.0/24 3 | -------------------------------------------------------------------------------- /regress/case-unknown33.out: -------------------------------------------------------------------------------- 1 | _jabber._tcp.jabber.org TYPE33 \# 18 001e001e 1495066a 61626265 72036f72 67 00 2 | rc=0 3 | -------------------------------------------------------------------------------- /regress/case-arf-norm.err: -------------------------------------------------------------------------------- 1 | adns debug: using nameserver 172.18.45.6 2 | adns test harness: memory leaked: 11 24 31 43 48 60 65 77 3 | -------------------------------------------------------------------------------- /regress/init-1stservto.text: -------------------------------------------------------------------------------- 1 | nameserver 10.0.0.1 2 | nameserver 172.18.45.6 3 | sortlist 127.0.0.1/32 172.18.45.0/28 172.18.45.0/24 4 | -------------------------------------------------------------------------------- /regress/init-2ndserver.text: -------------------------------------------------------------------------------- 1 | nameserver 172.18.45.36 2 | nameserver 172.18.45.6 3 | sortlist 127.0.0.1/32 172.18.45.0/28 172.18.45.0/24 4 | -------------------------------------------------------------------------------- /regress/init-ncipher.text: -------------------------------------------------------------------------------- 1 | nameserver 195.224.55.129 2 | sortlist 127.0.0.1/32 195.224.55.128/25 195.224.55.0/24 3 | search ncipher.com 4 | -------------------------------------------------------------------------------- /regress/init-1stservbroken.text: -------------------------------------------------------------------------------- 1 | nameserver 172.18.45.2 2 | nameserver 172.18.45.6 3 | sortlist 127.0.0.1/32 172.18.45.0/28 172.18.45.0/24 4 | -------------------------------------------------------------------------------- /regress/case-adh-cancel3.err: -------------------------------------------------------------------------------- 1 | adns debug: using nameserver 172.18.45.6 2 | adns debug: server failure on unidentifiable query (NS=172.18.45.6) 3 | -------------------------------------------------------------------------------- /regress/case-unknownq.out: -------------------------------------------------------------------------------- 1 | adns debug: using nameserver 172.18.45.6 2 | davenant.relativity.greenend.org.uk. flags 0 type 32767 not implemented 3 | rc=0 4 | -------------------------------------------------------------------------------- /regress/init-default.text: -------------------------------------------------------------------------------- 1 | nameserver 172.18.45.6 2 | sortlist 127.0.0.1/32 172.18.45.0/28 172.18.45.0/24 3 | search davenant.greenend.org.uk greenend.org.uk 4 | -------------------------------------------------------------------------------- /regress/init-tunnel.text: -------------------------------------------------------------------------------- 1 | nameserver 172.31.80.9 2 | sortlist 127.0.0.1/32 172.18.45.0/24 172.31.80.0/28 3 | search davenant.greenend.org.uk greenend.org.uk 4 | -------------------------------------------------------------------------------- /regress/case-adh-cancel.err: -------------------------------------------------------------------------------- 1 | adns debug: using nameserver 172.18.45.6 2 | adns debug: reply not found, id 311f, query owner chiark.greenend.org.uk (NS=172.18.45.6) 3 | -------------------------------------------------------------------------------- /regress/case-ndotsbad.out: -------------------------------------------------------------------------------- 1 | adns debug: using nameserver 172.18.45.6 2 | adns: :4: option `ndots:X' malformed or has bad value 3 | rc=2 4 | -------------------------------------------------------------------------------- /regress/init-ndots.text: -------------------------------------------------------------------------------- 1 | nameserver 172.18.45.6 2 | sortlist 127.0.0.1/32 172.18.45.0/28 172.18.45.0/24 3 | search davenant.greenend.org.uk greenend.org.uk 4 | options ndots:3 5 | -------------------------------------------------------------------------------- /regress/init-ndots100.text: -------------------------------------------------------------------------------- 1 | nameserver 172.18.45.6 2 | sortlist 127.0.0.1/32 172.18.45.0/28 172.18.45.0/24 3 | search davenant.greenend.org.uk greenend.org.uk 4 | options ndots:100 5 | -------------------------------------------------------------------------------- /regress/init-ndotsbad.text: -------------------------------------------------------------------------------- 1 | nameserver 172.18.45.6 2 | sortlist 127.0.0.1/32 172.18.45.0/28 172.18.45.0/24 3 | search davenant.greenend.org.uk greenend.org.uk 4 | options ndots:X 5 | -------------------------------------------------------------------------------- /regress/m4-to-c.rule: -------------------------------------------------------------------------------- 1 | $(M4) -P -I$(srcdir) $< >$@-a.new 2 | sed -e 's/hm_comma/,/g; s/hm_squote/'\''/g; /^[ ]*$$/d' \ 3 | <$@-a.new >$@-b.new 4 | @mv -f $@-b.new $@; rm -f $@-a.new 5 | -------------------------------------------------------------------------------- /regress/case-noinfto.out: -------------------------------------------------------------------------------- 1 | adns debug: using nameserver 172.18.45.36 2 | a.b.c.d flags 0 type 1 A(-) submitted 3 | a.b.c.d flags 0 type A(-): DNS query timed out; nrrs=0; cname=$; owner=$; ttl=604744 4 | rc=0 5 | -------------------------------------------------------------------------------- /regress/case-unknown2.out: -------------------------------------------------------------------------------- 1 | ucam.org TYPE2 \# 12 06636869 61726b02 6e73c01a 2 | ucam.org TYPE2 \# 11 08636869 6d616572 61 c0 35 3 | ucam.org TYPE2 \# 8 05726170 756ec035 4 | ucam.org TYPE2 \# 9 06626563 6b6574c0 35 5 | rc=0 6 | -------------------------------------------------------------------------------- /regress/case-norm.out: -------------------------------------------------------------------------------- 1 | adns debug: using nameserver 172.18.45.6 2 | chiark.greenend.org.uk flags 0 type 1 A(-) submitted 3 | chiark.greenend.org.uk flags 0 type A(-): OK; nrrs=1; cname=$; owner=$; ttl=86400 4 | 195.224.76.132 5 | rc=0 6 | -------------------------------------------------------------------------------- /regress/case-poll.out: -------------------------------------------------------------------------------- 1 | adns debug: using nameserver 172.18.45.6 2 | chiark.greenend.org.uk flags 0 type 1 A(-) submitted 3 | chiark.greenend.org.uk flags 0 type A(-): OK; nrrs=1; cname=$; owner=$; ttl=86400 4 | 195.224.76.132 5 | rc=0 6 | -------------------------------------------------------------------------------- /regress/case-lockup.out: -------------------------------------------------------------------------------- 1 | adns debug: using nameserver 172.18.45.36 2 | chiark.greenend.org.uk flags 0 type 1 A(-) submitted 3 | chiark.greenend.org.uk flags 0 type A(-): DNS query timed out; nrrs=0; cname=$; owner=$; ttl=604770 4 | rc=0 5 | -------------------------------------------------------------------------------- /regress/case-timeout.out: -------------------------------------------------------------------------------- 1 | adns debug: using nameserver 172.18.45.36 2 | chiark.greenend.org.uk flags 0 type 1 A(-) submitted 3 | chiark.greenend.org.uk flags 0 type A(-): DNS query timed out; nrrs=0; cname=$; owner=$; ttl=604770 4 | rc=0 5 | -------------------------------------------------------------------------------- /regress/case-polltimeout.out: -------------------------------------------------------------------------------- 1 | adns debug: using nameserver 172.18.45.36 2 | chiark.greenend.org.uk flags 0 type 1 A(-) submitted 3 | chiark.greenend.org.uk flags 0 type A(-): DNS query timed out; nrrs=0; cname=$; owner=$; ttl=604770 4 | rc=0 5 | -------------------------------------------------------------------------------- /regress/case-searchabs.out: -------------------------------------------------------------------------------- 1 | adns debug: using nameserver 172.18.45.6 2 | news.davenant flags 1 type 1 A(-) submitted 3 | news.davenant flags 1 type A(-): OK; nrrs=1; cname=davenant.relativity.greenend.org.uk; owner=$; ttl=584 4 | 172.18.45.6 5 | rc=0 6 | -------------------------------------------------------------------------------- /regress/case-flags9.out: -------------------------------------------------------------------------------- 1 | adns debug: using nameserver 172.18.45.6 2 | chiark.greenend.org.uk flags 0 type 1 A(-) submitted 3 | chiark.greenend.org.uk flags 0 type A(-) ownflags=aaaaaaaaa: ok; nrrs=1; cname=$; owner=$; ttl=86400 4 | 195.224.76.132 5 | rc=0 6 | -------------------------------------------------------------------------------- /regress/case-trunc.out: -------------------------------------------------------------------------------- 1 | adns debug: using nameserver 172.18.45.6 2 | trunc.test.iwj.relativity.greenend.org.uk flags 0 type 1 A(-) submitted 3 | trunc.test.iwj.relativity.greenend.org.uk flags 0 type A(-): No such data; nrrs=0; cname=$; owner=$; ttl=60 4 | rc=0 5 | -------------------------------------------------------------------------------- /regress/case-srvqudom.err: -------------------------------------------------------------------------------- 1 | adns debug: using nameserver 172.18.45.6 2 | srv.tcp.test.iwj.relativity.greenend.org.uk does not exist 3 | spong does not exist 4 | _foo._bar does not exist 5 | _s*a._tcp.ucam.org does not exist 6 | _s*a._tcp.pi&ckle.ucam.org does not exist 7 | -------------------------------------------------------------------------------- /regress/case-child.out: -------------------------------------------------------------------------------- 1 | adns debug: using nameserver 172.18.45.6 2 | 134.76.224.195.in-addr.arpa flags 0 type 65548 PTR(checked) submitted 3 | 134.76.224.195.in-addr.arpa flags 0 type PTR(checked): OK; nrrs=1; cname=$; owner=$; ttl=78694 4 | permutation-city.greenend.org.uk 5 | rc=0 6 | -------------------------------------------------------------------------------- /regress/case-2ndservok.out: -------------------------------------------------------------------------------- 1 | adns debug: using nameserver 172.18.45.36 2 | adns debug: using nameserver 172.18.45.6 3 | davenant.relativity.greenend.org.uk flags 0 type 1 A(-) submitted 4 | davenant.relativity.greenend.org.uk flags 0 type A(-): OK; nrrs=1; cname=$; owner=$; ttl=86400 5 | 172.18.45.6 6 | rc=0 7 | -------------------------------------------------------------------------------- /regress/case-comprinf.out: -------------------------------------------------------------------------------- 1 | adns debug: using nameserver 172.18.45.6 2 | 37.45.18.172.in-addr.arpa. flags 0 type 12 PTR(raw) submitted 3 | 37.45.18.172.in-addr.arpa. flags 0 type PTR(raw): Found overly-long domain name; nrrs=0; cname=37.45.18.172.in-addr.arpa.test.iwj.relativity.greenend.org.uk; owner=$; ttl=60 4 | rc=0 5 | -------------------------------------------------------------------------------- /regress/case-manya.out: -------------------------------------------------------------------------------- 1 | adns debug: using nameserver 172.18.45.6 2 | manyaddrs.test.iwj.relativity.greenend.org.uk flags 0 type 1 A(-) submitted 3 | manyaddrs.test.iwj.relativity.greenend.org.uk flags 0 type A(-): OK; nrrs=4; cname=$; owner=$; ttl=60 4 | 127.0.0.1 5 | 172.18.45.6 6 | 172.18.45.1 7 | 172.18.45.35 8 | rc=0 9 | -------------------------------------------------------------------------------- /regress/case-tcpptr.out: -------------------------------------------------------------------------------- 1 | adns debug: using nameserver 172.18.45.6 2 | 6.45.18.172.in-addr.arpa flags 2 type 65548 PTR(checked) submitted 3 | adns debug: TCP connected (NS=172.18.45.6) 4 | 6.45.18.172.in-addr.arpa flags 2 type PTR(checked): OK; nrrs=1; cname=$; owner=$; ttl=86400 5 | davenant.relativity.greenend.org.uk 6 | rc=0 7 | -------------------------------------------------------------------------------- /regress/case-longlab0.out: -------------------------------------------------------------------------------- 1 | adns debug: using nameserver 172.18.45.6 2 | yrndrobwlxxxxxxxxxxlllantysiliogogllanfairpwllgwyngyllgogerychw.relativity.greenend.org.uk. flags 1 type 1 A(-) submitted 3 | yrndrobwlxxxxxxxxxxlllantysiliogogllanfairpwllgwyngyllgogerychw.relativity.greenend.org.uk. flags 1 type A(-): No such domain; nrrs=0; cname=$; owner=$; ttl=86400 4 | rc=0 5 | -------------------------------------------------------------------------------- /regress/case-flags10.sys: -------------------------------------------------------------------------------- 1 | adnstest default 2 | :1 ,aaaaaaaaaa/chiark.greenend.org.uk 3 | start 929580072.670441 4 | socket type=SOCK_DGRAM 5 | socket=4 6 | +0.000191 7 | fcntl fd=4 cmd=F_GETFL 8 | fcntl=~O_NONBLOCK&... 9 | +0.000084 10 | fcntl fd=4 cmd=F_SETFL O_NONBLOCK|... 11 | fcntl=OK 12 | +0.000061 13 | close fd=4 14 | close=OK 15 | +0.000001 16 | -------------------------------------------------------------------------------- /regress/case-unknownq.sys: -------------------------------------------------------------------------------- 1 | adnstest default 2 | :32767 davenant.relativity.greenend.org.uk. 3 | start 933811310.565828 4 | socket type=SOCK_DGRAM 5 | socket=4 6 | +0.000264 7 | fcntl fd=4 cmd=F_GETFL 8 | fcntl=~O_NONBLOCK&... 9 | +0.000087 10 | fcntl fd=4 cmd=F_SETFL O_NONBLOCK|... 11 | fcntl=OK 12 | +0.000067 13 | close fd=4 14 | close=OK 15 | +0.000307 16 | -------------------------------------------------------------------------------- /regress/case-longlab1.out: -------------------------------------------------------------------------------- 1 | adns debug: using nameserver 172.18.45.6 2 | hyrndrobwlxxxxxxxxxxlllantysiliogogllanfairpwllgwyngyllgogerychw.relativity.greenend.org.uk. flags 1 type 1 A(-) submitted 3 | hyrndrobwlxxxxxxxxxxlllantysiliogogllanfairpwllgwyngyllgogerychw.relativity.greenend.org.uk. flags 1 type A(-): Domain name or component is too long; nrrs=0; cname=$; owner=$; ttl=604800 4 | rc=0 5 | -------------------------------------------------------------------------------- /regress/case-mailboxes.out: -------------------------------------------------------------------------------- 1 | adns debug: using nameserver 172.18.45.6 2 | silly-rp.test.iwj.relativity.greenend.org.uk flags 0 type 131089 RP(822) submitted 3 | silly-rp.test.iwj.relativity.greenend.org.uk flags 0 type RP(822): OK; nrrs=6; cname=$; owner=$; ttl=60 4 | . . 5 | i@ucam.org . 6 | i.j@ucam.org . 7 | "i..j"@ucam.org . 8 | ".i"@ucam.org . 9 | "i."@ucam.org . 10 | rc=0 11 | -------------------------------------------------------------------------------- /regress/case-longlab1.sys: -------------------------------------------------------------------------------- 1 | adnstest default 2 | :1 1/hyrndrobwlxxxxxxxxxxlllantysiliogogllanfairpwllgwyngyllgogerychw.relativity.greenend.org.uk. 3 | start 951955261.286712 4 | socket type=SOCK_DGRAM 5 | socket=4 6 | +0.000128 7 | fcntl fd=4 cmd=F_GETFL 8 | fcntl=~O_NONBLOCK&... 9 | +0.000053 10 | fcntl fd=4 cmd=F_SETFL O_NONBLOCK|... 11 | fcntl=OK 12 | +0.000033 13 | close fd=4 14 | close=OK 15 | +0.000238 16 | -------------------------------------------------------------------------------- /regress/case-srvbaddom.err: -------------------------------------------------------------------------------- 1 | adns debug: using nameserver 172.18.45.6 2 | Error during DNS SRV lookup for srv.tcp.test.iwj.relativity.greenend.org.uk: Domain name is syntactically invalid 3 | Error during DNS SRV lookup for spong: Domain name is syntactically invalid 4 | _foo._bar does not exist 5 | _s*a._tcp.ucam.org does not exist 6 | Error during DNS SRV lookup for _s*a._tcp.pi&ckle.ucam.org: Domain name is syntactically invalid 7 | -------------------------------------------------------------------------------- /regress/case-tcpbreakin.out: -------------------------------------------------------------------------------- 1 | adns debug: using nameserver 172.18.45.6 2 | 6.45.18.172.in-addr.arpa flags 2 type 65548 PTR(checked) submitted 3 | adns debug: TCP connected (NS=172.18.45.6) 4 | adns warning: TCP connection failed: write: Broken pipe (NS=172.18.45.6) 5 | adns debug: TCP connected (NS=172.18.45.6) 6 | 6.45.18.172.in-addr.arpa flags 2 type PTR(checked): OK; nrrs=1; cname=$; owner=$; ttl=86400 7 | davenant.relativity.greenend.org.uk 8 | rc=0 9 | -------------------------------------------------------------------------------- /regress/case-cnametocname.out: -------------------------------------------------------------------------------- 1 | adns debug: using nameserver 172.18.45.6 2 | intel.ugcs.caltech.edu. flags 0 type 1 A(-) submitted 3 | adns debug: allegedly canonical name ugintel.best.ugcs.caltech.edu is actually alias for drachma.ugcs.caltech.edu (QNAME=intel.ugcs.caltech.edu, QTYPE=A, NS=172.18.45.6) 4 | intel.ugcs.caltech.edu. flags 0 type A(-): DNS alias found where canonical name wanted; nrrs=0; cname=ugintel.best.ugcs.caltech.edu; owner=$; ttl=497758 5 | rc=0 6 | -------------------------------------------------------------------------------- /regress/case-rootquery.out: -------------------------------------------------------------------------------- 1 | adns debug: using nameserver 172.18.45.6 2 | . flags 0 type 131078 SOA(822) submitted 3 | . flags 1 type 131078 SOA(822) submitted 4 | . flags 0 type SOA(822): OK; nrrs=1; cname=$; owner=$; ttl=60222 5 | A.ROOT-SERVERS.NET hostmaster@INTERNIC.NET 1999041600 1800 900 604800 86400 6 | . flags 1 type SOA(822): OK; nrrs=1; cname=$; owner=$; ttl=57210 7 | A.ROOT-SERVERS.NET hostmaster@INTERNIC.NET 1999041600 1800 900 604800 86400 8 | rc=0 9 | -------------------------------------------------------------------------------- /regress/initfiles.list: -------------------------------------------------------------------------------- 1 | initfiles = init-1stservbroken.text 2 | initfiles += init-1stservto.text 3 | initfiles += init-2ndserver.text 4 | initfiles += init-anarres.text 5 | initfiles += init-default.text 6 | initfiles += init-manyptrwrong.text 7 | initfiles += init-ncipher.text 8 | initfiles += init-ndots.text 9 | initfiles += init-ndots100.text 10 | initfiles += init-ndotsbad.text 11 | initfiles += init-noserver.text 12 | initfiles += init-tunnel.text 13 | -------------------------------------------------------------------------------- /regress/case-srvok.out: -------------------------------------------------------------------------------- 1 | _srv._tcp.test.iwj.relativity.greenend.org.uk SRV 10 66 10066 davenant.relativity.greenend.org.uk 2 | _srv._tcp.test.iwj.relativity.greenend.org.uk SRV 20 200 20200 norway.relativity.greenend.org.uk 3 | _srv._tcp.test.iwj.relativity.greenend.org.uk SRV 20 400 20400 anarres.relativity.greenend.org.uk 4 | _srv._tcp.test.iwj.relativity.greenend.org.uk SRV 20 100 20100 nxdomain.relativity.greenend.org.uk 5 | _jabber._tcp.jabber.org SRV 30 30 5269 jabber.org 6 | _sip._udp.voip.net.cam.ac.uk SRV 10 1 5060 sip.voip.net.cam.ac.uk 7 | rc=0 8 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | Library: adns 2 | Maintainer: Werner Koch 3 | Bug reports: 4 | Security related bug reports: 5 | 6 | NOTE: This version has been modified by g10 Code and thus the 7 | original author should not be bothered with problems 8 | introduced with this version. We took the step of 9 | distributing our own version due to a lack of response by the 10 | original author. We hope to solve this problem asap. 11 | 12 | 13 | See INSTALL for more. 14 | 15 | 16 | -------------------------------------------------------------------------------- /regress/case-longdom1.sys: -------------------------------------------------------------------------------- 1 | adnstest default 2 | :1 1/10rndrobwlxxxxxxxxxxlllantysiliogog.llanfairpwllgwyngyllgogerychwyrndrobwlxxxxxxxxxxlllantysiliogog.llanfairpwllgwyngyllgogerychwyrndrobwlxxxxxxxxxxlllantysiliogog.llanfairpwllgwyngyllgogerychwyrndrobwlxxxxxxxxxxlllantysiliogog.relativity.greenend.org.uk. 3 | start 951955690.505811 4 | socket type=SOCK_DGRAM 5 | socket=4 6 | +0.000126 7 | fcntl fd=4 cmd=F_GETFL 8 | fcntl=~O_NONBLOCK&... 9 | +0.000058 10 | fcntl fd=4 cmd=F_SETFL O_NONBLOCK|... 11 | fcntl=OK 12 | +0.000035 13 | close fd=4 14 | close=OK 15 | +0.000269 16 | -------------------------------------------------------------------------------- /regress/case-longdomsrch0.sys: -------------------------------------------------------------------------------- 1 | adnstest ndots100 2 | :1 1/10rndrobwlxxxxxxxxxxlllantysiliogog.llanfairpwllgwyngyllgogerychwyrndrobwlxxxxxxxxxxlllantysiliogog.llanfairpwllgwyngyllgogerychwyrndrobwlxxxxxxxxxxlllantysiliogog.llanfairpwllgwyngyllgogerychwyrndrobwlxxxxxxxxxxlllantysiliogog.relativity.greenend.org.uk 3 | start 951956073.321566 4 | socket type=SOCK_DGRAM 5 | socket=4 6 | +0.000131 7 | fcntl fd=4 cmd=F_GETFL 8 | fcntl=~O_NONBLOCK&... 9 | +0.000056 10 | fcntl fd=4 cmd=F_SETFL O_NONBLOCK|... 11 | fcntl=OK 12 | +0.000034 13 | close fd=4 14 | close=OK 15 | +0.000340 16 | -------------------------------------------------------------------------------- /regress/case-ptrbaddom.out: -------------------------------------------------------------------------------- 1 | adns debug: using nameserver 172.18.45.6 2 | 37.45.18.172.in-addr.arpa.test.iwj.relativity.greenend.org.uk. flags 0 type 12 PTR(raw) submitted 3 | 37.45.18.172.in-addr.arpa.test.iwj.relativity.greenend.org.uk. flags 0 type 65548 PTR(checked) submitted 4 | 37.45.18.172.in-addr.arpa.test.iwj.relativity.greenend.org.uk. flags 0 type PTR(raw): OK; nrrs=1; cname=$; owner=$; ttl=60 5 | ptr.test.iwj.relativity.greenend.org.uk 6 | 37.45.18.172.in-addr.arpa.test.iwj.relativity.greenend.org.uk. flags 0 type PTR(checked): Domain invalid for particular DNS query type; nrrs=0; cname=$; owner=$; ttl=60 7 | rc=0 8 | -------------------------------------------------------------------------------- /regress/case-longdomsrch2.out: -------------------------------------------------------------------------------- 1 | adns debug: using nameserver 172.18.45.6 2 | xxxlllantysiliogog.llanfairpwllgwyngyllgogerychwyrndrobwlxxxxxxxxxxlllantysiliogog.llanfairpwllgwyngyllgogerychwyrndrobwlxxxxxxxxxxlllantysiliogog.llanfairpwllgwyngyllgogerychwyrndrobwlxxxxxxxxxxlllantysiliogog.relativity.greenend.org.uk flags 1 type 1 A(-) submitted 3 | xxxlllantysiliogog.llanfairpwllgwyngyllgogerychwyrndrobwlxxxxxxxxxxlllantysiliogog.llanfairpwllgwyngyllgogerychwyrndrobwlxxxxxxxxxxlllantysiliogog.llanfairpwllgwyngyllgogerychwyrndrobwlxxxxxxxxxxlllantysiliogog.relativity.greenend.org.uk flags 1 type A(-): No such domain; nrrs=0; cname=$; owner=$; ttl=86400 4 | rc=0 5 | -------------------------------------------------------------------------------- /regress/case-longdomsrch1b.out: -------------------------------------------------------------------------------- 1 | adns debug: using nameserver 172.18.45.6 2 | 1xxxlllantysiliogog.llanfairpwllgwyngyllgogerychwyrndrobwlxxxxxxxxxxlllantysiliogog.llanfairpwllgwyngyllgogerychwyrndrobwlxxxxxxxxxxlllantysiliogog.llanfairpwllgwyngyllgogerychwyrndrobwlxxxxxxxxxxlllantysiliogog.relativity.greenend.org.uk flags 1 type 1 A(-) submitted 3 | 1xxxlllantysiliogog.llanfairpwllgwyngyllgogerychwyrndrobwlxxxxxxxxxxlllantysiliogog.llanfairpwllgwyngyllgogerychwyrndrobwlxxxxxxxxxxlllantysiliogog.llanfairpwllgwyngyllgogerychwyrndrobwlxxxxxxxxxxlllantysiliogog.relativity.greenend.org.uk flags 1 type A(-): No such domain; nrrs=0; cname=$; owner=$; ttl=86400 4 | rc=0 5 | -------------------------------------------------------------------------------- /regress/case-connfail.out: -------------------------------------------------------------------------------- 1 | adns debug: using nameserver 172.18.45.36 2 | adns debug: using nameserver 172.18.45.6 3 | davenant.greenend.org.uk flags 2 type 1adns warning: TCP connection failed: connect: Socket operation on non-socket (NS=172.18.45.36) 4 | adns warning: TCP connection failed: connect: Socket operation on non-socket (NS=172.18.45.6) 5 | A(-) submitted 6 | adns warning: TCP connection failed: connect: Socket operation on non-socket (NS=172.18.45.36) 7 | adns warning: TCP connection failed: connect: Socket operation on non-socket (NS=172.18.45.6) 8 | davenant.greenend.org.uk flags 2 type A(-): All nameservers failed; nrrs=0; cname=$; owner=$; ttl=604800 9 | rc=0 10 | -------------------------------------------------------------------------------- /regress/case-longdom0.out: -------------------------------------------------------------------------------- 1 | adns debug: using nameserver 172.18.45.6 2 | 0rndrobwlxxxxxxxxxxlllantysiliogog.llanfairpwllgwyngyllgogerychwyrndrobwlxxxxxxxxxxlllantysiliogog.llanfairpwllgwyngyllgogerychwyrndrobwlxxxxxxxxxxlllantysiliogog.llanfairpwllgwyngyllgogerychwyrndrobwlxxxxxxxxxxlllantysiliogog.relativity.greenend.org.uk. flags 1 type 1 A(-) submitted 3 | 0rndrobwlxxxxxxxxxxlllantysiliogog.llanfairpwllgwyngyllgogerychwyrndrobwlxxxxxxxxxxlllantysiliogog.llanfairpwllgwyngyllgogerychwyrndrobwlxxxxxxxxxxlllantysiliogog.llanfairpwllgwyngyllgogerychwyrndrobwlxxxxxxxxxxlllantysiliogog.relativity.greenend.org.uk. flags 1 type A(-): No such domain; nrrs=0; cname=$; owner=$; ttl=86400 4 | rc=0 5 | -------------------------------------------------------------------------------- /regress/case-longdomsrch0.out: -------------------------------------------------------------------------------- 1 | adns debug: using nameserver 172.18.45.6 2 | 10rndrobwlxxxxxxxxxxlllantysiliogog.llanfairpwllgwyngyllgogerychwyrndrobwlxxxxxxxxxxlllantysiliogog.llanfairpwllgwyngyllgogerychwyrndrobwlxxxxxxxxxxlllantysiliogog.llanfairpwllgwyngyllgogerychwyrndrobwlxxxxxxxxxxlllantysiliogog.relativity.greenend.org.uk flags 1 type 1 A(-) submitted 3 | 10rndrobwlxxxxxxxxxxlllantysiliogog.llanfairpwllgwyngyllgogerychwyrndrobwlxxxxxxxxxxlllantysiliogog.llanfairpwllgwyngyllgogerychwyrndrobwlxxxxxxxxxxlllantysiliogog.llanfairpwllgwyngyllgogerychwyrndrobwlxxxxxxxxxxlllantysiliogog.relativity.greenend.org.uk flags 1 type A(-): No such domain; nrrs=0; cname=$; owner=$; ttl=604800 4 | rc=0 5 | -------------------------------------------------------------------------------- /regress/case-longdomsrch1.out: -------------------------------------------------------------------------------- 1 | adns debug: using nameserver 172.18.45.6 2 | 0rndrobwlxxxxxxxxxxlllantysiliogog.llanfairpwllgwyngyllgogerychwyrndrobwlxxxxxxxxxxlllantysiliogog.llanfairpwllgwyngyllgogerychwyrndrobwlxxxxxxxxxxlllantysiliogog.llanfairpwllgwyngyllgogerychwyrndrobwlxxxxxxxxxxlllantysiliogog.relativity.greenend.org.uk flags 1 type 1 A(-) submitted 3 | 0rndrobwlxxxxxxxxxxlllantysiliogog.llanfairpwllgwyngyllgogerychwyrndrobwlxxxxxxxxxxlllantysiliogog.llanfairpwllgwyngyllgogerychwyrndrobwlxxxxxxxxxxlllantysiliogog.llanfairpwllgwyngyllgogerychwyrndrobwlxxxxxxxxxxlllantysiliogog.relativity.greenend.org.uk flags 1 type A(-): No such domain; nrrs=0; cname=$; owner=$; ttl=86400 4 | rc=0 5 | -------------------------------------------------------------------------------- /TODO: -------------------------------------------------------------------------------- 1 | WISHLIST: 2 | * Make timeouts configurable. 3 | * `fake' reverse queries (give nnn.nnn.nnn.nnn either always or on error) 4 | * `fake' forward queries (allow nnn.nnn.nnn.nnn -> A) 5 | * DNSSEC compatibility - be able to retreive KEY and SIG RRs 6 | * DNSSEC minimum functionality - ignore Additional when AD set. 7 | * IPv6 name<->address translation - but which version ?? 8 | * IPv6 transport. 9 | * Threadsafe version/mode. 10 | * Caching in the library. 11 | * Make port configurable in config file. 12 | * `Nameserver sent bad response' should produce a hexdump in the log 13 | (see eg mail to ian@davenant Mon, 25 Oct 2004 14:19:46 +0100 re 14 | `compressed datagram contains loop') 15 | -------------------------------------------------------------------------------- /regress/case-longdom1.out: -------------------------------------------------------------------------------- 1 | adns debug: using nameserver 172.18.45.6 2 | 10rndrobwlxxxxxxxxxxlllantysiliogog.llanfairpwllgwyngyllgogerychwyrndrobwlxxxxxxxxxxlllantysiliogog.llanfairpwllgwyngyllgogerychwyrndrobwlxxxxxxxxxxlllantysiliogog.llanfairpwllgwyngyllgogerychwyrndrobwlxxxxxxxxxxlllantysiliogog.relativity.greenend.org.uk. flags 1 type 1 A(-) submitted 3 | 10rndrobwlxxxxxxxxxxlllantysiliogog.llanfairpwllgwyngyllgogerychwyrndrobwlxxxxxxxxxxlllantysiliogog.llanfairpwllgwyngyllgogerychwyrndrobwlxxxxxxxxxxlllantysiliogog.llanfairpwllgwyngyllgogerychwyrndrobwlxxxxxxxxxxlllantysiliogog.relativity.greenend.org.uk. flags 1 type A(-): Domain name or component is too long; nrrs=0; cname=$; owner=$; ttl=604800 4 | rc=0 5 | -------------------------------------------------------------------------------- /regress/case-search-as.out: -------------------------------------------------------------------------------- 1 | adns debug: using nameserver 172.18.45.6 2 | news flags 5 type 1 A(-) submitted 3 | chiark flags 5 type 1 A(-) submitted 4 | news flags 1 type 1 A(-) submitted 5 | chiark flags 1 type 1 A(-) submitted 6 | news flags 5 type A(-): OK; nrrs=1; cname=davenant.relativity.greenend.org.uk; owner=news.davenant.greenend.org.uk; ttl=86400 7 | 172.18.45.6 8 | news flags 1 type A(-): OK; nrrs=1; cname=davenant.relativity.greenend.org.uk; owner=$; ttl=86400 9 | 172.18.45.6 10 | chiark flags 5 type A(-): OK; nrrs=1; cname=$; owner=chiark.greenend.org.uk; ttl=86400 11 | 195.224.76.132 12 | chiark flags 1 type A(-): OK; nrrs=1; cname=$; owner=$; ttl=86400 13 | 195.224.76.132 14 | rc=0 15 | -------------------------------------------------------------------------------- /regress/case-search.out: -------------------------------------------------------------------------------- 1 | adns debug: using nameserver 172.18.45.6 2 | news flags 5 type 1 A(-) submitted 3 | chiark flags 5 type 1 A(-) submitted 4 | news flags 1 type 1 A(-) submitted 5 | chiark flags 1 type 1 A(-) submitted 6 | news flags 5 type A(-): OK; nrrs=1; cname=davenant.relativity.greenend.org.uk; owner=news.davenant.greenend.org.uk; ttl=86400 7 | 172.18.45.6 8 | chiark flags 5 type A(-): OK; nrrs=1; cname=$; owner=chiark.greenend.org.uk; ttl=86400 9 | 195.224.76.132 10 | news flags 1 type A(-): OK; nrrs=1; cname=davenant.relativity.greenend.org.uk; owner=$; ttl=86400 11 | 172.18.45.6 12 | chiark flags 1 type A(-): OK; nrrs=1; cname=$; owner=$; ttl=86400 13 | 195.224.76.132 14 | rc=0 15 | -------------------------------------------------------------------------------- /regress/case-srvha.out: -------------------------------------------------------------------------------- 1 | _srv._tcp.test.iwj.relativity.greenend.org.uk SRV 10 66 10066 davenant.relativity.greenend.org.uk ok 0 ok "OK" ( INET 172.18.45.6 ) 2 | _srv._tcp.test.iwj.relativity.greenend.org.uk SRV 20 200 20200 norway.relativity.greenend.org.uk ok 0 ok "OK" ( INET 172.18.45.40 ) 3 | _srv._tcp.test.iwj.relativity.greenend.org.uk SRV 20 400 20400 anarres.relativity.greenend.org.uk ok 0 ok "OK" ( INET 172.18.45.2 ) 4 | _srv._tcp.test.iwj.relativity.greenend.org.uk SRV 20 100 20100 nxdomain.relativity.greenend.org.uk permfail 300 nxdomain "No such domain" ( ) 5 | _jabber._tcp.jabber.org SRV 30 30 5269 jabber.org ok 0 ok "OK" ( INET 208.245.212.98 ) 6 | _sip._udp.voip.net.cam.ac.uk SRV 10 1 5060 sip.voip.net.cam.ac.uk ok 0 ok "OK" ( INET 131.111.8.174 ) 7 | rc=0 8 | -------------------------------------------------------------------------------- /m4/ltversion.m4: -------------------------------------------------------------------------------- 1 | # ltversion.m4 -- version numbers -*- Autoconf -*- 2 | # 3 | # Copyright (C) 2004 Free Software Foundation, Inc. 4 | # Written by Scott James Remnant, 2004 5 | # 6 | # This file is free software; the Free Software Foundation gives 7 | # unlimited permission to copy and/or distribute it, with or without 8 | # modifications, as long as this notice is preserved. 9 | 10 | # @configure_input@ 11 | 12 | # serial 3337 ltversion.m4 13 | # This file is part of GNU Libtool 14 | 15 | m4_define([LT_PACKAGE_VERSION], [2.4.2]) 16 | m4_define([LT_PACKAGE_REVISION], [1.3337]) 17 | 18 | AC_DEFUN([LTVERSION_VERSION], 19 | [macro_version='2.4.2' 20 | macro_revision='1.3337' 21 | _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 22 | _LT_DECL(, macro_revision, 0) 23 | ]) 24 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | Makefile.in 2 | /aclocal.m4 3 | autom4te.cache/ 4 | /configure 5 | config.h.in 6 | config.h 7 | /config.log 8 | /config.status 9 | /libtool 10 | /stamp-h1 11 | Makefile 12 | .deps/ 13 | .libs/ 14 | *.o 15 | *.lo 16 | regress/adnsheloex_playback 17 | regress/adnsheloex_record 18 | regress/adnshost_playback 19 | regress/adnshost_record 20 | regress/adnslogres_playback 21 | regress/adnslogres_record 22 | regress/adnsresfilter_playback 23 | regress/adnsresfilter_record 24 | regress/adnstest_playback 25 | regress/adnstest_record 26 | regress/fanftest_playback 27 | regress/fanftest_record 28 | regress/harness.h 29 | regress/hredirect.h 30 | regress/hsyscalls.h 31 | regress/output-* 32 | src/stamp-h1 33 | src/adns-config 34 | src/libadns.la 35 | src/versioninfo.rc 36 | client/adnsheloex 37 | client/adnshost 38 | client/adnslogres 39 | client/adnsresfilter 40 | client/adnstest 41 | client/fanftest 42 | -------------------------------------------------------------------------------- /regress/case-adh-norm.sys: -------------------------------------------------------------------------------- 1 | ./adnshost default 2 | chiark.greenend.org.uk 3 | start 969122933.609498 4 | socket type=SOCK_DGRAM 5 | socket=4 6 | +0.000155 7 | fcntl fd=4 cmd=F_GETFL 8 | fcntl=~O_NONBLOCK&... 9 | +0.000057 10 | fcntl fd=4 cmd=F_SETFL O_NONBLOCK|... 11 | fcntl=OK 12 | +0.000037 13 | sendto fd=4 addr=172.18.45.6:53 14 | 311f0100 00010000 00000000 06636869 61726b08 67726565 6e656e64 036f7267 15 | 02756b00 00010001. 16 | sendto=40 17 | +0.000827 18 | select max=5 rfds=[4] wfds=[] efds=[] to=1.999173 19 | select=1 rfds=[4] wfds=[] efds=[] 20 | +0.000158 21 | recvfrom fd=4 buflen=512 *addrlen=16 22 | recvfrom=OK addr=172.18.45.6:53 23 | 311f8580 00010001 00020002 06636869 61726b08 67726565 6e656e64 036f7267 24 | 02756b00 00010001 c00c0001 00010001 51800004 c3e04c84 08677265 656e656e 25 | 64036f72 6702756b 00000200 01000151 80001103 6e73300a 72656c61 74697669 26 | 7479c038 c0380002 00010001 51800006 036e7331 c057c053 00010001 00015180 27 | 0004ac12 2d06c070 00010001 00015180 0004ac12 2d01. 28 | +0.000895 29 | recvfrom fd=4 buflen=512 *addrlen=16 30 | recvfrom=EAGAIN 31 | +0.000149 32 | close fd=4 33 | close=OK 34 | +0.000290 35 | -------------------------------------------------------------------------------- /regress/case-norm.sys: -------------------------------------------------------------------------------- 1 | adnstest default 2 | :1 chiark.greenend.org.uk 3 | start 912888966.802483 4 | socket type=SOCK_DGRAM 5 | socket=4 6 | +0.000204 7 | fcntl fd=4 cmd=F_GETFL 8 | fcntl=~O_NONBLOCK&... 9 | +0.000670 10 | fcntl fd=4 cmd=F_SETFL O_NONBLOCK|... 11 | fcntl=OK 12 | +0.000072 13 | sendto fd=4 addr=172.18.45.6:53 14 | 311f0100 00010000 00000000 06636869 61726b08 67726565 6e656e64 036f7267 15 | 02756b00 00010001. 16 | sendto=40 17 | +0.000579 18 | select max=5 rfds=[4] wfds=[] efds=[] to=1.999421 19 | select=1 rfds=[4] wfds=[] efds=[] 20 | +0.006414 21 | recvfrom fd=4 buflen=512 *addrlen=16 22 | recvfrom=OK addr=172.18.45.6:53 23 | 311f8580 00010001 00020002 06636869 61726b08 67726565 6e656e64 036f7267 24 | 02756b00 00010001 c00c0001 00010001 51800004 c3e04c84 08677265 656e656e 25 | 64036f72 6702756b 00000200 01000151 80001103 6e73300a 72656c61 74697669 26 | 7479c038 c0380002 00010001 51800006 036e7331 c057c053 00010001 00015180 27 | 0004ac12 2d06c070 00010001 00015180 0004ac12 2d41. 28 | +0.000874 29 | recvfrom fd=4 buflen=512 *addrlen=16 30 | recvfrom=EAGAIN 31 | +0.000179 32 | close fd=4 33 | close=OK 34 | +0.000184 35 | -------------------------------------------------------------------------------- /regress/case-flags9.sys: -------------------------------------------------------------------------------- 1 | adnstest default 2 | :1 ,aaaaaaaaa/chiark.greenend.org.uk 3 | start 929580075.263215 4 | socket type=SOCK_DGRAM 5 | socket=4 6 | +0.000212 7 | fcntl fd=4 cmd=F_GETFL 8 | fcntl=~O_NONBLOCK&... 9 | +0.000083 10 | fcntl fd=4 cmd=F_SETFL O_NONBLOCK|... 11 | fcntl=OK 12 | +0.000060 13 | sendto fd=4 addr=172.18.45.6:53 14 | 311f0100 00010000 00000000 06636869 61726b08 67726565 6e656e64 036f7267 15 | 02756b00 00010001. 16 | sendto=40 17 | +0.000625 18 | select max=5 rfds=[4] wfds=[] efds=[] to=1.999375 19 | select=1 rfds=[4] wfds=[] efds=[] 20 | +0.007374 21 | recvfrom fd=4 buflen=512 *addrlen=16 22 | recvfrom=OK addr=172.18.45.6:53 23 | 311f8580 00010001 00020002 06636869 61726b08 67726565 6e656e64 036f7267 24 | 02756b00 00010001 c00c0001 00010001 51800004 c3e04c84 08677265 656e656e 25 | 64036f72 6702756b 00000200 01000151 80001103 6e73300a 72656c61 74697669 26 | 7479c038 c0380002 00010001 51800006 036e7331 c057c053 00010001 00015180 27 | 0004ac12 2d06c070 00010001 00015180 0004ac12 2d41. 28 | +0.001238 29 | recvfrom fd=4 buflen=512 *addrlen=16 30 | recvfrom=EAGAIN 31 | +0.000228 32 | close fd=4 33 | close=OK 34 | +0.000205 35 | -------------------------------------------------------------------------------- /regress/case-ndots.out: -------------------------------------------------------------------------------- 1 | adns debug: using nameserver 172.18.45.6 2 | newsx.davenant flags 5 type 1 A(-) submitted 3 | news.davenant flags 5 type 1 A(-) submitted 4 | news.davenant.greenend.org.uk flags 5 type 1 A(-) submitted 5 | trunc.test.iwj.relativity flags 5 type 1 A(-) submitted 6 | trunx.test.iwj.relativity flags 5 type 1 A(-) submitted 7 | test.iwj.relativity flags 5 type 1 A(-) submitted 8 | newsx.davenant flags 5 type A(-): No such domain; nrrs=0; cname=$; owner=newsx.davenant; ttl=175 9 | news.davenant flags 5 type A(-): OK; nrrs=1; cname=davenant.relativity.greenend.org.uk; owner=news.davenant.greenend.org.uk; ttl=86400 10 | 172.18.45.6 11 | news.davenant.greenend.org.uk flags 5 type A(-): OK; nrrs=1; cname=davenant.relativity.greenend.org.uk; owner=news.davenant.greenend.org.uk; ttl=86400 12 | 172.18.45.6 13 | trunc.test.iwj.relativity flags 5 type A(-): No such data; nrrs=0; cname=$; owner=trunc.test.iwj.relativity.greenend.org.uk; ttl=60 14 | trunx.test.iwj.relativity flags 5 type A(-): No such domain; nrrs=0; cname=$; owner=trunx.test.iwj.relativity; ttl=60 15 | test.iwj.relativity flags 5 type A(-): No such data; nrrs=0; cname=$; owner=test.iwj.relativity.greenend.org.uk; ttl=60 16 | rc=0 17 | -------------------------------------------------------------------------------- /regress/case-ndots-as.out: -------------------------------------------------------------------------------- 1 | adns debug: using nameserver 172.18.45.6 2 | newsx.davenant flags 5 type 1 A(-) submitted 3 | news.davenant flags 5 type 1 A(-) submitted 4 | news.davenant.greenend.org.uk flags 5 type 1 A(-) submitted 5 | trunc.test.iwj.relativity flags 5 type 1 A(-) submitted 6 | trunx.test.iwj.relativity flags 5 type 1 A(-) submitted 7 | test.iwj.relativity flags 5 type 1 A(-) submitted 8 | news.davenant.greenend.org.uk flags 5 type A(-): OK; nrrs=1; cname=davenant.relativity.greenend.org.uk; owner=news.davenant.greenend.org.uk; ttl=86400 9 | 172.18.45.6 10 | newsx.davenant flags 5 type A(-): No such domain; nrrs=0; cname=$; owner=newsx.davenant; ttl=86400 11 | news.davenant flags 5 type A(-): OK; nrrs=1; cname=davenant.relativity.greenend.org.uk; owner=news.davenant.greenend.org.uk; ttl=86400 12 | 172.18.45.6 13 | trunc.test.iwj.relativity flags 5 type A(-): No such data; nrrs=0; cname=$; owner=trunc.test.iwj.relativity.greenend.org.uk; ttl=60 14 | trunx.test.iwj.relativity flags 5 type A(-): No such domain; nrrs=0; cname=$; owner=trunx.test.iwj.relativity; ttl=60 15 | test.iwj.relativity flags 5 type A(-): No such data; nrrs=0; cname=$; owner=test.iwj.relativity.greenend.org.uk; ttl=60 16 | rc=0 17 | -------------------------------------------------------------------------------- /regress/case-poll.sys: -------------------------------------------------------------------------------- 1 | adnstest default -,p 2 | :1 chiark.greenend.org.uk 3 | start 931719947.391142 4 | socket type=SOCK_DGRAM 5 | socket=4 6 | +0.000208 7 | fcntl fd=4 cmd=F_GETFL 8 | fcntl=~O_NONBLOCK&... 9 | +0.000087 10 | fcntl fd=4 cmd=F_SETFL O_NONBLOCK|... 11 | fcntl=OK 12 | +0.000066 13 | sendto fd=4 addr=172.18.45.6:53 14 | 311f0100 00010000 00000000 06636869 61726b08 67726565 6e656e64 036f7267 15 | 02756b00 00010001. 16 | sendto=40 17 | +0.000592 18 | poll fds=[{fd=4, events=POLLIN, revents=0}] timeout=2000 19 | poll=1 fds=[{fd=4, events=POLLIN, revents=POLLIN}] 20 | +0.006530 21 | recvfrom fd=4 buflen=512 *addrlen=16 22 | recvfrom=OK addr=172.18.45.6:53 23 | 311f8580 00010001 00020002 06636869 61726b08 67726565 6e656e64 036f7267 24 | 02756b00 00010001 c00c0001 00010001 51800004 c3e04c84 08677265 656e656e 25 | 64036f72 6702756b 00000200 01000151 80001103 6e73300a 72656c61 74697669 26 | 7479c038 c0380002 00010001 51800006 036e7331 c057c053 00010001 00015180 27 | 0004ac12 2d06c070 00010001 00015180 0004ac12 2d41. 28 | +0.001044 29 | recvfrom fd=4 buflen=512 *addrlen=16 30 | recvfrom=EAGAIN 31 | +0.000211 32 | close fd=4 33 | close=OK 34 | +0.000248 35 | -------------------------------------------------------------------------------- /regress/case-trunc.sys: -------------------------------------------------------------------------------- 1 | adnstest default 2 | :1 trunc.test.iwj.relativity.greenend.org.uk 3 | start 912888921.274801 4 | socket type=SOCK_DGRAM 5 | socket=4 6 | +0.000207 7 | fcntl fd=4 cmd=F_GETFL 8 | fcntl=~O_NONBLOCK&... 9 | +0.000321 10 | fcntl fd=4 cmd=F_SETFL O_NONBLOCK|... 11 | fcntl=OK 12 | +0.000443 13 | sendto fd=4 addr=172.18.45.6:53 14 | 311f0100 00010000 00000000 05747275 6e630474 65737403 69776a0a 72656c61 15 | 74697669 74790867 7265656e 656e6403 6f726702 756b0000 010001. 16 | sendto=59 17 | +0.000682 18 | select max=5 rfds=[4] wfds=[] efds=[] to=1.999318 19 | select=1 rfds=[4] wfds=[] efds=[] 20 | +0.006406 21 | recvfrom fd=4 buflen=512 *addrlen=16 22 | recvfrom=OK addr=172.18.45.6:53 23 | 311f8580 00010000 00010000 05747275 6e630474 65737403 69776a0a 72656c61 24 | 74697669 74790867 7265656e 656e6403 6f726702 756b0000 01000104 74657374 25 | 0369776a 0a72656c 61746976 69747908 67726565 6e656e64 036f7267 02756b00 26 | 00060001 0000003c 0027036e 7330c044 0a686f73 746d6173 746572c0 44000000 27 | 0e00000e 10000000 780064c8 00000000 3c. 28 | +0.000839 29 | recvfrom fd=4 buflen=512 *addrlen=16 30 | recvfrom=EAGAIN 31 | +0.000141 32 | close fd=4 33 | close=OK 34 | +0.000157 35 | -------------------------------------------------------------------------------- /regress/case-comprinf.sys: -------------------------------------------------------------------------------- 1 | adnstest default 2 | :12 37.45.18.172.in-addr.arpa. 3 | start 951961094.184850 4 | socket type=SOCK_DGRAM 5 | socket=4 6 | +0.000134 7 | fcntl fd=4 cmd=F_GETFL 8 | fcntl=~O_NONBLOCK&... 9 | +0.000053 10 | fcntl fd=4 cmd=F_SETFL O_NONBLOCK|... 11 | fcntl=OK 12 | +0.000035 13 | sendto fd=4 addr=172.18.45.6:53 14 | 311f0100 00010000 00000000 02333702 34350231 38033137 3207696e 2d616464 15 | 72046172 70610000 0c0001. 16 | sendto=43 17 | +0.000960 18 | select max=5 rfds=[4] wfds=[] efds=[] to=1.999040 19 | select=1 rfds=[4] wfds=[] efds=[] 20 | +0.000200 21 | recvfrom fd=4 buflen=512 *addrlen=16 22 | recvfrom=OK addr=172.18.45.6:53 23 | 311f8580 00010002 00010001 02333702 34350231 38033137 3207696e 2d616464 24 | 72046172 70610000 0c0001c0 0c000500 01000151 80003f02 33370234 35023138 25 | 03313732 07696e2d 61646472 04617270 61047465 73740369 776a0a72 656c6174 26 | 69766974 79086772 65656e65 6e64036f 72670275 6b00c037 000c0001 0000003c 27 | 00060370 7472c082 c0510002 00010000 003c0006 036e7330 c05ac094 00010001 28 | 00015180 0004ac12 2d06. 29 | +0.000624 30 | recvfrom fd=4 buflen=512 *addrlen=16 31 | recvfrom=EAGAIN 32 | +0.000222 33 | close fd=4 34 | close=OK 35 | +0.000197 36 | -------------------------------------------------------------------------------- /regress/case-mailboxes.sys: -------------------------------------------------------------------------------- 1 | adnstest default 2 | :131089 silly-rp.test.iwj.relativity.greenend.org.uk 3 | start 923859567.899146 4 | socket type=SOCK_DGRAM 5 | socket=4 6 | +0.000411 7 | fcntl fd=4 cmd=F_GETFL 8 | fcntl=~O_NONBLOCK&... 9 | +0.000094 10 | fcntl fd=4 cmd=F_SETFL O_NONBLOCK|... 11 | fcntl=OK 12 | +0.000073 13 | sendto fd=4 addr=172.18.45.6:53 14 | 311f0100 00010000 00000000 0873696c 6c792d72 70047465 73740369 776a0a72 15 | 656c6174 69766974 79086772 65656e65 6e64036f 72670275 6b000011 0001. 16 | sendto=62 17 | +0.000670 18 | select max=5 rfds=[4] wfds=[] efds=[] to=1.999330 19 | select=1 rfds=[4] wfds=[] efds=[] 20 | +0.008169 21 | recvfrom fd=4 buflen=512 *addrlen=16 22 | recvfrom=OK addr=172.18.45.6:53 23 | 311f8180 00010006 00000000 0873696c 6c792d72 70047465 73740369 776a0a72 24 | 656c6174 69766974 79086772 65656e65 6e64036f 72670275 6b000011 0001c00c 25 | 00110001 0000003c 00020000 c00c0011 00010000 003c000d 01690475 63616d03 26 | 6f726700 00c00c00 11000100 00003c00 0703692e 6ac05a00 c00c0011 00010000 27 | 003c0008 04692e2e 6ac05a00 c00c0011 00010000 003c0006 022e69c0 5a00c00c 28 | 00110001 0000003c 00060269 2ec05a00. 29 | +0.000992 30 | recvfrom fd=4 buflen=512 *addrlen=16 31 | recvfrom=EAGAIN 32 | +0.000604 33 | close fd=4 34 | close=OK 35 | +0.000359 36 | -------------------------------------------------------------------------------- /regress/case-alr-norm.in: -------------------------------------------------------------------------------- 1 | 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 - 2 | 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 - 3 | 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 - 4 | 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 - 5 | 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 - 6 | 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 7 | 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 8 | 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 9 | 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 10 | 172.18.45.6 - - [16/Sep/2000:18:35:15 +0100] "GET / HTTP/1.0" 304 - 11 | -------------------------------------------------------------------------------- /regress/case-alr-slow.in: -------------------------------------------------------------------------------- 1 | 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 - 2 | 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 - 3 | 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 - 4 | 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 - 5 | 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 - 6 | 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 7 | 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 8 | 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 9 | 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 10 | 172.18.45.6 - - [16/Sep/2000:18:35:15 +0100] "GET / HTTP/1.0" 304 - 11 | -------------------------------------------------------------------------------- /regress/case-manya.sys: -------------------------------------------------------------------------------- 1 | adnstest default 2 | :1 manyaddrs.test.iwj.relativity.greenend.org.uk 3 | start 912888920.123769 4 | socket type=SOCK_DGRAM 5 | socket=4 6 | +0.000245 7 | fcntl fd=4 cmd=F_GETFL 8 | fcntl=~O_NONBLOCK&... 9 | +0.000705 10 | fcntl fd=4 cmd=F_SETFL O_NONBLOCK|... 11 | fcntl=OK 12 | +0.000073 13 | sendto fd=4 addr=172.18.45.6:53 14 | 311f0100 00010000 00000000 096d616e 79616464 72730474 65737403 69776a0a 15 | 72656c61 74697669 74790867 7265656e 656e6403 6f726702 756b0000 010001. 16 | sendto=63 17 | +0.000698 18 | select max=5 rfds=[4] wfds=[] efds=[] to=1.999302 19 | select=1 rfds=[4] wfds=[] efds=[] 20 | +0.006236 21 | recvfrom fd=4 buflen=512 *addrlen=16 22 | recvfrom=OK addr=172.18.45.6:53 23 | 311f8580 00010004 00010001 096d616e 79616464 72730474 65737403 69776a0a 24 | 72656c61 74697669 74790867 7265656e 656e6403 6f726702 756b0000 010001c0 25 | 0c000100 01000000 3c0004ac 122d23c0 0c000100 01000000 3c0004ac 122d06c0 26 | 0c000100 01000000 3c0004ac 122d01c0 0c000100 01000000 3c00047f 00000104 27 | 74657374 0369776a 0a72656c 61746976 69747908 67726565 6e656e64 036f7267 28 | 02756b00 00020001 0000003c 0006036e 7330c088 c0ae0001 00010001 51800004 29 | ac122d06. 30 | +0.001078 31 | recvfrom fd=4 buflen=512 *addrlen=16 32 | recvfrom=EAGAIN 33 | +0.000329 34 | close fd=4 35 | close=OK 36 | +0.000240 37 | -------------------------------------------------------------------------------- /regress/case-unknown33.sys: -------------------------------------------------------------------------------- 1 | ./adnshost default 2 | -t type33 -Qq _jabber._tcp.jabber.org 3 | start 1144369693.043661 4 | socket type=SOCK_DGRAM 5 | socket=6 6 | +0.000080 7 | fcntl fd=6 cmd=F_GETFL 8 | fcntl=~O_NONBLOCK&... 9 | +0.000045 10 | fcntl fd=6 cmd=F_SETFL O_NONBLOCK|... 11 | fcntl=OK 12 | +0.000040 13 | sendto fd=6 addr=172.18.45.6:53 14 | 311f0100 00010000 00000000 075f6a61 62626572 045f7463 70066a61 62626572 15 | 036f7267 00002100 01. 16 | sendto=41 17 | +0.000316 18 | select max=7 rfds=[6] wfds=[] efds=[] to=1.999684 19 | select=1 rfds=[6] wfds=[] efds=[] 20 | +0.004580 21 | recvfrom fd=6 buflen=512 *addrlen=16 22 | recvfrom=OK addr=172.18.45.6:53 23 | 311f8180 00010001 00040005 075f6a61 62626572 045f7463 70066a61 62626572 24 | 036f7267 00002100 01c00c00 21000100 00031b00 12001e00 1e149506 6a616262 25 | 6572036f 726700c0 19000200 01000018 33001103 6e733107 6a657265 6d696503 26 | 636f6d00 c0190002 00010000 18330006 036e7332 c057c019 00020001 00001833 27 | 000c036e 73310562 6c616872 c05fc019 00020001 00001833 0010026e 73076f62 28 | 656c6973 6b036e65 7400c019 00010001 00000102 0004d0f5 d462c053 00010001 29 | 00029f11 0004d0f5 d41dc070 00010001 00029f11 0004d0f5 d41ec082 00010001 30 | 00029f13 00044051 6774c09a 00010001 00029f1d 00044761 e072. 31 | +0.000369 32 | recvfrom fd=6 buflen=512 *addrlen=16 33 | recvfrom=EAGAIN 34 | +0.000082 35 | close fd=6 36 | close=OK 37 | +0.002395 38 | -------------------------------------------------------------------------------- /regress/case-alr-norm.out: -------------------------------------------------------------------------------- 1 | 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 - 2 | 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 - 3 | 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 - 4 | 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 - 5 | 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 - 6 | 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 7 | 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 8 | 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 9 | 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 10 | davenant.relativity.greenend.org.uk - - [16/Sep/2000:18:35:15 +0100] "GET / HTTP/1.0" 304 - 11 | rc=0 12 | -------------------------------------------------------------------------------- /regress/case-alr-slow.out: -------------------------------------------------------------------------------- 1 | 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 - 2 | 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 - 3 | 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 - 4 | 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 - 5 | 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 - 6 | 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 7 | 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 8 | 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 9 | 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 10 | davenant.relativity.greenend.org.uk - - [16/Sep/2000:18:35:15 +0100] "GET / HTTP/1.0" 304 - 11 | rc=0 12 | -------------------------------------------------------------------------------- /regress/case-arf-text.sys: -------------------------------------------------------------------------------- 1 | ./adnsresfilter default 2 | 3 | start 969137967.465922 4 | fcntl fd=0 cmd=F_GETFL 5 | fcntl=~O_NONBLOCK&... 6 | +0.000132 7 | fcntl fd=0 cmd=F_SETFL O_NONBLOCK|... 8 | fcntl=OK 9 | +0.000049 10 | fcntl fd=1 cmd=F_GETFL 11 | fcntl=~O_NONBLOCK&... 12 | +0.000034 13 | fcntl fd=1 cmd=F_SETFL O_NONBLOCK|... 14 | fcntl=OK 15 | +0.000033 16 | socket type=SOCK_DGRAM 17 | socket=6 18 | +0.004099 19 | fcntl fd=6 cmd=F_GETFL 20 | fcntl=~O_NONBLOCK&... 21 | +0.000057 22 | fcntl fd=6 cmd=F_SETFL O_NONBLOCK|... 23 | fcntl=OK 24 | +0.000034 25 | select max=2 rfds=[0] wfds=[] efds=[] to=null 26 | select=1 rfds=[0] wfds=[] efds=[] 27 | +2.095986 28 | recvfrom fd=6 buflen=512 *addrlen=16 29 | recvfrom=EAGAIN 30 | +0.000177 31 | read fd=0 buflen=512 32 | read=OK 33 | 74657874 206f6e6c 790a. 34 | +0.000121 35 | write fd=1 36 | 74657874 206f6e6c 790a. 37 | write=10 38 | +0.000636 39 | select max=2 rfds=[0] wfds=[] efds=[] to=null 40 | select=1 rfds=[0] wfds=[] efds=[] 41 | +0.349329 42 | recvfrom fd=6 buflen=512 *addrlen=16 43 | recvfrom=EAGAIN 44 | +0.000085 45 | read fd=0 buflen=512 46 | read=OK 47 | . 48 | +0.000064 49 | fcntl fd=0 cmd=F_GETFL 50 | fcntl=O_NONBLOCK|... 51 | +0.000043 52 | fcntl fd=0 cmd=F_SETFL ~O_NONBLOCK&... 53 | fcntl=OK 54 | +0.000065 55 | fcntl fd=1 cmd=F_GETFL 56 | fcntl=O_NONBLOCK|... 57 | +0.000036 58 | fcntl fd=1 cmd=F_SETFL ~O_NONBLOCK&... 59 | fcntl=OK 60 | +0.000032 61 | close fd=6 62 | close=OK 63 | +0.000117 64 | -------------------------------------------------------------------------------- /regress/case-longlab0.sys: -------------------------------------------------------------------------------- 1 | adnstest default 2 | :1 1/yrndrobwlxxxxxxxxxxlllantysiliogogllanfairpwllgwyngyllgogerychw.relativity.greenend.org.uk. 3 | start 951955250.786132 4 | socket type=SOCK_DGRAM 5 | socket=4 6 | +0.000123 7 | fcntl fd=4 cmd=F_GETFL 8 | fcntl=~O_NONBLOCK&... 9 | +0.000055 10 | fcntl fd=4 cmd=F_SETFL O_NONBLOCK|... 11 | fcntl=OK 12 | +0.000034 13 | sendto fd=4 addr=172.18.45.6:53 14 | 311f0100 00010000 00000000 3f79726e 64726f62 776c7878 78787878 78787878 15 | 6c6c6c61 6e747973 696c696f 676f676c 6c616e66 61697270 776c6c67 77796e67 16 | 796c6c67 6f676572 79636877 0a72656c 61746976 69747908 67726565 6e656e64 17 | 036f7267 02756b00 00010001. 18 | sendto=108 19 | +0.003243 20 | select max=5 rfds=[4] wfds=[] efds=[] to=1.996757 21 | select=1 rfds=[4] wfds=[] efds=[] 22 | +0.000534 23 | recvfrom fd=4 buflen=512 *addrlen=16 24 | recvfrom=OK addr=172.18.45.6:53 25 | 311f8583 00010000 00010000 3f79726e 64726f62 776c7878 78787878 78787878 26 | 6c6c6c61 6e747973 696c696f 676f676c 6c616e66 61697270 776c6c67 77796e67 27 | 796c6c67 6f676572 79636877 0a72656c 61746976 69747908 67726565 6e656e64 28 | 036f7267 02756b00 00010001 0a72656c 61746976 69747908 67726565 6e656e64 29 | 036f7267 02756b00 00060001 00015180 0027036e 7330c06c 0a686f73 746d6173 30 | 746572c0 6c000000 2d00001c 2000000e 1000093a 80000151 80. 31 | +0.000686 32 | recvfrom fd=4 buflen=512 *addrlen=16 33 | recvfrom=EAGAIN 34 | +0.000147 35 | close fd=4 36 | close=OK 37 | +0.000151 38 | -------------------------------------------------------------------------------- /regress/case-alr-slow.err: -------------------------------------------------------------------------------- 1 | adns debug: using nameserver 172.18.45.6 2 | adnslogres: submitting 172.18.45.1 -> 1.45.18.172.in-addr.arpa. 3 | adnslogres: 1 in queue; checking 172.18.45.1 4 | adnslogres: submitting 127.0.0.1 -> 1.0.0.127.in-addr.arpa. 5 | adnslogres: 1 in queue; checking 127.0.0.1 6 | adnslogres: submitting 172.30.206.14 -> 14.206.30.172.in-addr.arpa. 7 | adnslogres: 1 in queue; checking 172.30.206.14 8 | adnslogres: submitting 127.0.0.1 -> 1.0.0.127.in-addr.arpa. 9 | adnslogres: 2 in queue; checking 172.30.206.14 10 | adnslogres: submitting 172.18.45.3 -> 3.45.18.172.in-addr.arpa. 11 | adnslogres: 3 in queue; checking 172.30.206.14 12 | adnslogres: submitting 172.18.45.1 -> 1.45.18.172.in-addr.arpa. 13 | adnslogres: 4 in queue; checking 172.30.206.14 14 | adnslogres: 3 in queue; checking 127.0.0.1 15 | adnslogres: 2 in queue; checking 172.18.45.3 16 | adnslogres: 1 in queue; checking 172.18.45.1 17 | adnslogres: submitting 172.18.45.8 -> 8.45.18.172.in-addr.arpa. 18 | adnslogres: 1 in queue; checking 172.18.45.8 19 | adnslogres: submitting 172.18.45.1 -> 1.45.18.172.in-addr.arpa. 20 | adnslogres: 2 in queue; checking 172.18.45.8 21 | adnslogres: submitting 172.18.45.1 -> 1.45.18.172.in-addr.arpa. 22 | adnslogres: 3 in queue; checking 172.18.45.8 23 | adnslogres: submitting 172.18.45.6 -> 6.45.18.172.in-addr.arpa. 24 | adnslogres: 4 in queue; checking 172.18.45.8 25 | adnslogres: 3 in queue; checking 172.18.45.1 26 | adnslogres: 2 in queue; checking 172.18.45.1 27 | adnslogres: 1 in queue; checking 172.18.45.6 28 | -------------------------------------------------------------------------------- /src/tvarith.h: -------------------------------------------------------------------------------- 1 | /* 2 | * tvarith.h 3 | * - static inline functions for doing arithmetic on timevals 4 | */ 5 | /* 6 | * This file is part of adns, which is 7 | * Copyright (C) 1997-2000,2003,2006 Ian Jackson 8 | * Copyright (C) 1999-2000,2003,2006 Tony Finch 9 | * Copyright (C) 1991 Massachusetts Institute of Technology 10 | * (See the file INSTALL for full details.) 11 | * 12 | * This program is free software; you can redistribute it and/or modify 13 | * it under the terms of the GNU General Public License as published by 14 | * the Free Software Foundation; either version 2, or (at your option) 15 | * any later version. 16 | * 17 | * This program is distributed in the hope that it will be useful, 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | * GNU General Public License for more details. 21 | * 22 | * You should have received a copy of the GNU General Public License 23 | * along with this program; if not, write to the Free Software Foundation, 24 | * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 25 | */ 26 | 27 | #ifndef ADNS_TVARITH_H_INCLUDED 28 | #define ADNS_TVARITH_H_INCLUDED 29 | 30 | static inline void timevaladd(struct timeval *tv_io, long ms) { 31 | struct timeval tmp; 32 | assert(ms>=0); 33 | tmp= *tv_io; 34 | tmp.tv_usec += (ms%1000)*1000; 35 | tmp.tv_sec += ms/1000; 36 | if (tmp.tv_usec >= 1000000) { tmp.tv_sec++; tmp.tv_usec -= 1000000; } 37 | *tv_io= tmp; 38 | } 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /regress/case-adh-pipe.sys: -------------------------------------------------------------------------------- 1 | ./adnshost default -f 2 | 3 | start 969123801.904882 4 | socket type=SOCK_DGRAM 5 | socket=6 6 | +0.000156 7 | fcntl fd=6 cmd=F_GETFL 8 | fcntl=~O_NONBLOCK&... 9 | +0.000057 10 | fcntl fd=6 cmd=F_SETFL O_NONBLOCK|... 11 | fcntl=OK 12 | +0.000035 13 | select max=7 rfds=[0,6] wfds=[] efds=[] to=null 14 | select=1 rfds=[0] wfds=[] efds=[] 15 | +4.-792858 16 | read fd=0 buflen=40 17 | read=OK 18 | 63686961 726b2e67 7265656e 656e642e 6f72672e 756b0a. 19 | +0.000235 20 | sendto fd=6 addr=172.18.45.6:53 21 | 311f0100 00010000 00000000 06636869 61726b08 67726565 6e656e64 036f7267 22 | 02756b00 00010001. 23 | sendto=40 24 | +0.000847 25 | select max=7 rfds=[0,6] wfds=[] efds=[] to=1.999153 26 | select=1 rfds=[6] wfds=[] efds=[] 27 | +0.000140 28 | recvfrom fd=6 buflen=512 *addrlen=16 29 | recvfrom=OK addr=172.18.45.6:53 30 | 311f8580 00010001 00020002 06636869 61726b08 67726565 6e656e64 036f7267 31 | 02756b00 00010001 c00c0001 00010001 51800004 c3e04c84 08677265 656e656e 32 | 64036f72 6702756b 00000200 01000151 80001103 6e73300a 72656c61 74697669 33 | 7479c038 c0380002 00010001 51800006 036e7331 c057c053 00010001 00015180 34 | 0004ac12 2d06c070 00010001 00015180 0004ac12 2d01. 35 | +0.000548 36 | recvfrom fd=6 buflen=512 *addrlen=16 37 | recvfrom=EAGAIN 38 | +0.000184 39 | select max=7 rfds=[0,6] wfds=[] efds=[] to=null 40 | select=1 rfds=[0] wfds=[] efds=[] 41 | +0.715699 42 | read fd=0 buflen=40 43 | read=OK 44 | . 45 | +0.000090 46 | close fd=6 47 | close=OK 48 | +0.000134 49 | -------------------------------------------------------------------------------- /regress/case-tcpallfail.sys: -------------------------------------------------------------------------------- 1 | adnstest anarres 2 | 2/test.iwj.relativity.greenend.org.uk. 3 | start 962142174.403028 4 | socket type=SOCK_DGRAM 5 | socket=4 6 | +0.000120 7 | fcntl fd=4 cmd=F_GETFL 8 | fcntl=~O_NONBLOCK&... 9 | +0.000053 10 | fcntl fd=4 cmd=F_SETFL O_NONBLOCK|... 11 | fcntl=OK 12 | +0.000034 13 | socket type=SOCK_STREAM 14 | socket=5 15 | +0.000479 16 | fcntl fd=5 cmd=F_GETFL 17 | fcntl=~O_NONBLOCK&... 18 | +0.000036 19 | fcntl fd=5 cmd=F_SETFL O_NONBLOCK|... 20 | fcntl=OK 21 | +0.000031 22 | connect fd=5 addr=172.18.45.2:53 23 | connect=EINPROGRESS 24 | +0.000182 25 | select max=6 rfds=[4] wfds=[5] efds=[] to=13.999272 26 | select=1 rfds=[] wfds=[5] efds=[] 27 | +0.000862 28 | read fd=5 buflen=1 29 | read=ECONNREFUSED 30 | +0.000087 31 | close fd=5 32 | close=OK 33 | +0.000109 34 | select max=5 rfds=[4] wfds=[] efds=[] to=0.000000 35 | select=0 rfds=[] wfds=[] efds=[] 36 | +0.000103 37 | socket type=SOCK_STREAM 38 | socket=5 39 | +0.000392 40 | fcntl fd=5 cmd=F_GETFL 41 | fcntl=~O_NONBLOCK&... 42 | +0.000037 43 | fcntl fd=5 cmd=F_SETFL O_NONBLOCK|... 44 | fcntl=OK 45 | +0.000030 46 | connect fd=5 addr=172.18.45.2:53 47 | connect=EINPROGRESS 48 | +0.000127 49 | select max=6 rfds=[4] wfds=[5] efds=[] to=13.999414 50 | select=1 rfds=[] wfds=[5] efds=[] 51 | +0.000339 52 | read fd=5 buflen=1 53 | read=ECONNREFUSED 54 | +0.000075 55 | close fd=5 56 | close=OK 57 | +0.000084 58 | select max=5 rfds=[4] wfds=[] efds=[] to=0.000000 59 | select=0 rfds=[] wfds=[] efds=[] 60 | +0.000098 61 | close fd=4 62 | close=OK 63 | +0.000879 64 | -------------------------------------------------------------------------------- /regress/case-cnametocname.sys: -------------------------------------------------------------------------------- 1 | adnstest default 2 | :1 intel.ugcs.caltech.edu. 3 | start 938369896.279735 4 | socket type=SOCK_DGRAM 5 | socket=4 6 | +0.000179 7 | fcntl fd=4 cmd=F_GETFL 8 | fcntl=~O_NONBLOCK&... 9 | +0.000054 10 | fcntl fd=4 cmd=F_SETFL O_NONBLOCK|... 11 | fcntl=OK 12 | +0.000041 13 | sendto fd=4 addr=172.18.45.6:53 14 | 311f0100 00010000 00000000 05696e74 656c0475 67637307 63616c74 65636803 15 | 65647500 00010001. 16 | sendto=40 17 | +0.001628 18 | select max=5 rfds=[4] wfds=[] efds=[] to=1.998372 19 | select=1 rfds=[4] wfds=[] efds=[] 20 | +0.586476 21 | recvfrom fd=4 buflen=512 *addrlen=16 22 | recvfrom=OK addr=172.18.45.6:53 23 | 311f8180 00010003 00050005 05696e74 656c0475 67637307 63616c74 65636803 24 | 65647500 00010001 05696e74 656c0475 67637307 63616c74 65636803 65647500 25 | 00050001 0007985e 000f0775 67696e74 656c0462 657374c0 2ec04a00 05000100 26 | 00000a00 0a076472 6163686d 61c02ec0 65000100 01000798 83000483 d72bacc0 27 | 2e000200 01000935 be000b08 70757263 68617365 c02ec02e 00020001 000935be 28 | 00070465 6e7679c0 2ec02e00 02000100 0935be00 09036f66 62036e65 7400c02e 29 | 00020001 000935be 00090674 7962616c 74c033c0 2e000200 01000935 be000e08 30 | 6d657263 7574696f 026e69c0 33c08b00 01000100 0935be00 0483d72b a7c0a200 31 | 01000100 0935be00 0483d72b 87c0b500 01000100 001ef800 04c6b4b6 07c0ca00 32 | 01000100 0100d700 0483d78b 64c0df00 01000100 0100d700 0483d7fe 63. 33 | +0.001423 34 | recvfrom fd=4 buflen=512 *addrlen=16 35 | recvfrom=EAGAIN 36 | +0.000646 37 | close fd=4 38 | close=OK 39 | +0.000242 40 | -------------------------------------------------------------------------------- /regress/case-unknown5.sys: -------------------------------------------------------------------------------- 1 | ./adnshost default 2 | -t type5 pop.chiark.greenend.org.uk 3 | start 1144369700.944069 4 | socket type=SOCK_DGRAM 5 | socket=6 6 | +0.000074 7 | fcntl fd=6 cmd=F_GETFL 8 | fcntl=~O_NONBLOCK&... 9 | +0.000048 10 | fcntl fd=6 cmd=F_SETFL O_NONBLOCK|... 11 | fcntl=OK 12 | +0.000040 13 | sendto fd=6 addr=172.18.45.6:53 14 | 311f0100 00010000 00000000 03706f70 06636869 61726b08 67726565 6e656e64 15 | 036f7267 02756b00 00050001. 16 | sendto=44 17 | +0.000311 18 | select max=7 rfds=[6] wfds=[] efds=[] to=1.999689 19 | select=0 rfds=[] wfds=[] efds=[] 20 | +2.-00919 21 | select max=7 rfds=[6] wfds=[] efds=[] to=0.000608 22 | select=0 rfds=[] wfds=[] efds=[] 23 | +0.000988 24 | sendto fd=6 addr=172.18.45.6:53 25 | 311f0100 00010000 00000000 03706f70 06636869 61726b08 67726565 6e656e64 26 | 036f7267 02756b00 00050001. 27 | sendto=44 28 | +0.000264 29 | select max=7 rfds=[6] wfds=[] efds=[] to=1.999736 30 | select=1 rfds=[6] wfds=[] efds=[] 31 | +0.004660 32 | recvfrom fd=6 buflen=512 *addrlen=16 33 | recvfrom=OK addr=172.18.45.6:53 34 | 311f8580 00010001 00020002 03706f70 06636869 61726b08 67726565 6e656e64 35 | 036f7267 02756b00 00050001 c00c0005 00010001 5180000f 0c736572 76696365 36 | 2d6e616d 65c010c0 17000200 01000151 80001103 6e73300a 72656c61 74697669 37 | 7479c017 c0170002 00010001 51800006 036e7331 c057c053 00010001 00015180 38 | 0004ac12 2d06c070 00010001 00015180 0004ac12 2d0b. 39 | +0.000242 40 | recvfrom fd=6 buflen=512 *addrlen=16 41 | recvfrom=EAGAIN 42 | +0.000074 43 | close fd=6 44 | close=OK 45 | +0.000144 46 | -------------------------------------------------------------------------------- /regress/hredirect.h.m4: -------------------------------------------------------------------------------- 1 | m4_dnl hredirect.h.m4 2 | m4_dnl (part of complex test harness, not of the library) 3 | m4_dnl - redefinitions of system calls 4 | 5 | m4_dnl This file is part of adns, which is 6 | m4_dnl Copyright (C) 1997-2000,2003,2006 Ian Jackson 7 | m4_dnl Copyright (C) 1999-2000,2003,2006 Tony Finch 8 | m4_dnl Copyright (C) 1991 Massachusetts Institute of Technology 9 | m4_dnl (See the file INSTALL for full details.) 10 | m4_dnl 11 | m4_dnl This program is free software; you can redistribute it and/or modify 12 | m4_dnl it under the terms of the GNU General Public License as published by 13 | m4_dnl the Free Software Foundation; either version 2, or (at your option) 14 | m4_dnl any later version. 15 | m4_dnl 16 | m4_dnl This program is distributed in the hope that it will be useful, 17 | m4_dnl but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | m4_dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | m4_dnl GNU General Public License for more details. 20 | m4_dnl 21 | m4_dnl You should have received a copy of the GNU General Public License 22 | m4_dnl along with this program; if not, write to the Free Software Foundation, 23 | m4_dnl Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 24 | 25 | m4_include(hmacros.i4) 26 | 27 | #ifndef HREDIRECT_H_INCLUDED 28 | #define HREDIRECT_H_INCLUDED 29 | 30 | #include "hsyscalls.h" 31 | 32 | hm_create_nothing 33 | m4_define(`hm_syscall', `#undef $1 34 | #define $1 H$1') 35 | m4_define(`hm_specsyscall',`#undef $2 36 | #define $2 H$2') 37 | m4_include(`hsyscalls.i4') 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /regress/case-alr-norm.err: -------------------------------------------------------------------------------- 1 | adns debug: using nameserver 172.18.45.6 2 | adnslogres: submitting 172.18.45.1 -> 1.45.18.172.in-addr.arpa. 3 | adnslogres: 1 in queue; checking 172.18.45.1 4 | adnslogres: submitting 127.0.0.1 -> 1.0.0.127.in-addr.arpa. 5 | adnslogres: 1 in queue; checking 127.0.0.1 6 | adnslogres: submitting 172.30.206.14 -> 14.206.30.172.in-addr.arpa. 7 | adnslogres: 1 in queue; checking 172.30.206.14 8 | adnslogres: submitting 127.0.0.1 -> 1.0.0.127.in-addr.arpa. 9 | adnslogres: 2 in queue; checking 172.30.206.14 10 | adnslogres: submitting 172.18.45.3 -> 3.45.18.172.in-addr.arpa. 11 | adnslogres: 3 in queue; checking 172.30.206.14 12 | adnslogres: submitting 172.18.45.1 -> 1.45.18.172.in-addr.arpa. 13 | adnslogres: 4 in queue; checking 172.30.206.14 14 | adnslogres: submitting 172.18.45.8 -> 8.45.18.172.in-addr.arpa. 15 | adnslogres: 5 in queue; checking 172.30.206.14 16 | adnslogres: submitting 172.18.45.1 -> 1.45.18.172.in-addr.arpa. 17 | adnslogres: 6 in queue; checking 172.30.206.14 18 | adnslogres: submitting 172.18.45.1 -> 1.45.18.172.in-addr.arpa. 19 | adnslogres: 7 in queue; checking 172.30.206.14 20 | adnslogres: submitting 172.18.45.6 -> 6.45.18.172.in-addr.arpa. 21 | adnslogres: 8 in queue; checking 172.30.206.14 22 | adnslogres: 8 in queue; checking 172.30.206.14 23 | adnslogres: 7 in queue; checking 127.0.0.1 24 | adnslogres: 6 in queue; checking 172.18.45.3 25 | adnslogres: 5 in queue; checking 172.18.45.1 26 | adnslogres: 4 in queue; checking 172.18.45.8 27 | adnslogres: 3 in queue; checking 172.18.45.1 28 | adnslogres: 2 in queue; checking 172.18.45.1 29 | adnslogres: 1 in queue; checking 172.18.45.6 30 | -------------------------------------------------------------------------------- /regress/case-formerr.out: -------------------------------------------------------------------------------- 1 | adns debug: using nameserver 172.18.45.6 2 | h.rndrobwlxxxxxxxxxxlllantysiliogogllanfairpwllgwyngyllgogerychw.relativity.greenend.org.uk. flags 1 type 1 A(-) submitted 3 | adns warning: server cannot understand our query (Format Error) (NS=172.18.45.6) 4 | adns warning: server cannot understand our query (Format Error) (NS=172.18.45.6) 5 | adns warning: server cannot understand our query (Format Error) (NS=172.18.45.6) 6 | adns warning: server cannot understand our query (Format Error) (NS=172.18.45.6) 7 | adns warning: server cannot understand our query (Format Error) (NS=172.18.45.6) 8 | adns warning: server cannot understand our query (Format Error) (NS=172.18.45.6) 9 | adns warning: server cannot understand our query (Format Error) (NS=172.18.45.6) 10 | adns warning: server cannot understand our query (Format Error) (NS=172.18.45.6) 11 | adns warning: server cannot understand our query (Format Error) (NS=172.18.45.6) 12 | adns warning: server cannot understand our query (Format Error) (NS=172.18.45.6) 13 | adns warning: server cannot understand our query (Format Error) (NS=172.18.45.6) 14 | adns warning: server cannot understand our query (Format Error) (NS=172.18.45.6) 15 | adns warning: server cannot understand our query (Format Error) (NS=172.18.45.6) 16 | adns warning: server cannot understand our query (Format Error) (NS=172.18.45.6) 17 | adns warning: server cannot understand our query (Format Error) (NS=172.18.45.6) 18 | h.rndrobwlxxxxxxxxxxlllantysiliogogllanfairpwllgwyngyllgogerychw.relativity.greenend.org.uk. flags 1 type A(-): DNS query timed out; nrrs=0; cname=$; owner=$; ttl=604770 19 | rc=0 20 | -------------------------------------------------------------------------------- /LICENCE.WAIVERS: -------------------------------------------------------------------------------- 1 | LICENCE WAIVERS FOR ADNS 2 | ======================== 3 | 4 | See GPL-vs-LGPL, section 2. This file contains reproductions of 5 | waivers I have granted to allow adns to be mixed with certain other 6 | programs whose licenses are not GPL compatible. 7 | 8 | 9 | IMPORTANT NOTES 10 | --------------- 11 | 12 | * Not all of the code in adns was written by me. The programs 13 | `fanftest', `adnslogres' and `adnsheloex' are (partially) copyright 14 | Tony Finch and to that extent are not covered by the waivers. I 15 | believe - but do not warrant - that the rest of adns is (at the 16 | time of writing, 19th of November 2005) entirely mine, but please 17 | check the copyright notices on the individual files. 18 | 19 | * These waivers apply only in the specified circumstances. 20 | 21 | * The waivers listed in this file LICENCE.WAIVERS in a particular 22 | version of adns also apply to versions of adns released previously 23 | to the one with the LICENCE.WAIVERS file. But they do not 24 | necessarily apply to future versions of adns. 25 | 26 | - iwj, 19th November 2005 27 | 28 | 29 | Affero GPL 30 | ---------- 31 | 32 | When adns is combined with 33 | Infomine (http://infomine.ucr.edu) 34 | or a work derived from it, I am happy for you to treat adns as if 35 | it were licenced to you (and all third parties) under the GNU GPL 36 | v2 with additionally the clause 2d from the Affero General Public 37 | Licence version 1 (as published today at 38 | http://www.gnu.org/licenses/agpl.html). 39 | 40 | - iwj, 2nd March 2004 41 | 42 | 43 | Local variables: 44 | mode: text 45 | End: 46 | -------------------------------------------------------------------------------- /Makefile.am: -------------------------------------------------------------------------------- 1 | # Makefile.am - Top level makefile for adns 2 | # Copyright (C) 2008 g10 Code GmbH 3 | # 4 | # This file is part of adns, which is 5 | # Copyright (C) 1997-2000,2003,2006 Ian Jackson 6 | # Copyright (C) 1999-2000,2003,2006 Tony Finch 7 | # Copyright (C) 1991 Massachusetts Institute of Technology 8 | # (See the file INSTALL for full details.) 9 | # 10 | # This program is free software; you can redistribute it and/or modify 11 | # it under the terms of the GNU General Public License as published by 12 | # the Free Software Foundation; either version 2, or (at your option) 13 | # any later version. 14 | # 15 | # This program is distributed in the hope that it will be useful, 16 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | # GNU General Public License for more details. 19 | # 20 | # You should have received a copy of the GNU General Public License 21 | # along with this program; if not, see . 22 | 23 | ## Process this file with automake to produce Makefile.in 24 | 25 | ACLOCAL_AMFLAGS = -I m4 26 | 27 | EXTRA_DIST = autogen.sh changelog.Debian \ 28 | README.html GPL-vs-LGPL LICENCE.WAIVERS 29 | 30 | 31 | if CROSS_COMPILING 32 | regress = 33 | else 34 | regress = regress 35 | endif 36 | 37 | 38 | SUBDIRS = m4 src client ${regress} 39 | 40 | # Fixme we need to test that lynx is available. 41 | README: README.html 42 | lynx -dump -number_links -cfg=/dev/null ./README.html >README.tmp 43 | mv -f README.tmp README 44 | 45 | 46 | dist-hook: 47 | @set -e; echo "$(VERSION)" > $(distdir)/VERSION 48 | 49 | stowinstall: 50 | $(MAKE) $(AM_MAKEFLAGS) install prefix=/usr/local/stow/adns 51 | 52 | -------------------------------------------------------------------------------- /regress/case-connfail.sys: -------------------------------------------------------------------------------- 1 | ./adnstest 2ndserver 2 | :1 2/davenant.greenend.org.uk 3 | start 1056289303.784817 4 | socket type=SOCK_DGRAM 5 | socket=6 6 | +0.000031 7 | fcntl fd=6 cmd=F_GETFL 8 | fcntl=~O_NONBLOCK&... 9 | +0.000010 10 | fcntl fd=6 cmd=F_SETFL O_NONBLOCK|... 11 | fcntl=OK 12 | +0.000007 13 | socket type=SOCK_STREAM 14 | socket=7 15 | +0.000059 16 | fcntl fd=7 cmd=F_GETFL 17 | fcntl=~O_NONBLOCK&... 18 | +0.000007 19 | fcntl fd=7 cmd=F_SETFL O_NONBLOCK|... 20 | fcntl=OK 21 | +0.000006 22 | connect fd=7 addr=172.18.45.36:53 23 | connect=ENOTSOCK 24 | +0.000013 25 | close fd=7 26 | close=OK 27 | +0.000031 28 | socket type=SOCK_STREAM 29 | socket=7 30 | +0.000035 31 | fcntl fd=7 cmd=F_GETFL 32 | fcntl=~O_NONBLOCK&... 33 | +0.000006 34 | fcntl fd=7 cmd=F_SETFL O_NONBLOCK|... 35 | fcntl=OK 36 | +0.000007 37 | connect fd=7 addr=172.18.45.6:53 38 | connect=ENOTSOCK 39 | +0.000008 40 | close fd=7 41 | close=OK 42 | +0.000013 43 | select max=7 rfds=[6] wfds=[] efds=[] to=0.000000 44 | select=0 rfds=[] wfds=[] efds=[] 45 | +0.000036 46 | socket type=SOCK_STREAM 47 | socket=7 48 | +0.000036 49 | fcntl fd=7 cmd=F_GETFL 50 | fcntl=~O_NONBLOCK&... 51 | +0.000007 52 | fcntl fd=7 cmd=F_SETFL O_NONBLOCK|... 53 | fcntl=OK 54 | +0.000006 55 | connect fd=7 addr=172.18.45.36:53 56 | connect=ENOTSOCK 57 | +0.000008 58 | close fd=7 59 | close=OK 60 | +0.000013 61 | socket type=SOCK_STREAM 62 | socket=7 63 | +0.000036 64 | fcntl fd=7 cmd=F_GETFL 65 | fcntl=~O_NONBLOCK&... 66 | +0.000007 67 | fcntl fd=7 cmd=F_SETFL O_NONBLOCK|... 68 | fcntl=OK 69 | +0.000006 70 | connect fd=7 addr=172.18.45.6:53 71 | connect=ENOTSOCK 72 | +0.000008 73 | close fd=7 74 | close=OK 75 | +0.000012 76 | close fd=6 77 | close=OK 78 | +0.000023 79 | -------------------------------------------------------------------------------- /regress/case-2ndservok.sys: -------------------------------------------------------------------------------- 1 | adnstest 2ndserver 2 | :1 davenant.relativity.greenend.org.uk 3 | start 940100095.012145 4 | socket type=SOCK_DGRAM 5 | socket=4 6 | +0.000173 7 | fcntl fd=4 cmd=F_GETFL 8 | fcntl=~O_NONBLOCK&... 9 | +0.000053 10 | fcntl fd=4 cmd=F_SETFL O_NONBLOCK|... 11 | fcntl=OK 12 | +0.000042 13 | sendto fd=4 addr=172.18.45.36:53 14 | 311f0100 00010000 00000000 08646176 656e616e 740a7265 6c617469 76697479 15 | 08677265 656e656e 64036f72 6702756b 00000100 01. 16 | sendto=53 17 | +0.001041 18 | select max=5 rfds=[4] wfds=[] efds=[] to=1.998959 19 | select=0 rfds=[] wfds=[] efds=[] 20 | +2.-04931 21 | select max=5 rfds=[4] wfds=[] efds=[] to=0.003890 22 | select=0 rfds=[] wfds=[] efds=[] 23 | +0.009910 24 | sendto fd=4 addr=172.18.45.6:53 25 | 311f0100 00010000 00000000 08646176 656e616e 740a7265 6c617469 76697479 26 | 08677265 656e656e 64036f72 6702756b 00000100 01. 27 | sendto=53 28 | +0.000863 29 | select max=5 rfds=[4] wfds=[] efds=[] to=1.999137 30 | select=1 rfds=[4] wfds=[] efds=[] 31 | +0.000126 32 | recvfrom fd=4 buflen=512 *addrlen=16 33 | recvfrom=OK addr=172.18.45.6:53 34 | 311f8580 00010001 00030003 08646176 656e616e 740a7265 6c617469 76697479 35 | 08677265 656e656e 64036f72 6702756b 00000100 01c00c00 01000100 01518000 36 | 04ac122d 060a7265 6c617469 76697479 08677265 656e656e 64036f72 6702756b 37 | 00000200 01000151 80000603 6e7330c0 45c04500 02000100 01518000 06036e73 38 | 31c045c0 45000200 01000151 80000603 6e7332c0 45c06b00 01000100 01518000 39 | 04ac122d 06c07d00 01000100 01518000 04ac122d 41c08f00 01000100 01518000 40 | 04ac122d 01. 41 | +0.001026 42 | recvfrom fd=4 buflen=512 *addrlen=16 43 | recvfrom=EAGAIN 44 | +0.000423 45 | close fd=4 46 | close=OK 47 | +0.000435 48 | -------------------------------------------------------------------------------- /regress/hsyscalls.h.m4: -------------------------------------------------------------------------------- 1 | m4_dnl hsyscalls.h.m4 2 | m4_dnl (part of complex test harness, not of the library) 3 | m4_dnl - prototypes of redefinitions of system calls 4 | 5 | m4_dnl This file is part of adns, which is 6 | m4_dnl Copyright (C) 1997-2000,2003,2006 Ian Jackson 7 | m4_dnl Copyright (C) 1999-2000,2003,2006 Tony Finch 8 | m4_dnl Copyright (C) 1991 Massachusetts Institute of Technology 9 | m4_dnl (See the file INSTALL for full details.) 10 | m4_dnl 11 | m4_dnl This program is free software; you can redistribute it and/or modify 12 | m4_dnl it under the terms of the GNU General Public License as published by 13 | m4_dnl the Free Software Foundation; either version 2, or (at your option) 14 | m4_dnl any later version. 15 | m4_dnl 16 | m4_dnl This program is distributed in the hope that it will be useful, 17 | m4_dnl but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | m4_dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | m4_dnl GNU General Public License for more details. 20 | m4_dnl 21 | m4_dnl You should have received a copy of the GNU General Public License 22 | m4_dnl along with this program; if not, write to the Free Software Foundation, 23 | m4_dnl Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 24 | 25 | m4_include(hmacros.i4) 26 | 27 | #ifndef HSYSCALLS_H_INCLUDED 28 | #define HSYSCALLS_H_INCLUDED 29 | 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | 36 | #ifdef HAVE_POLL 37 | #include 38 | #endif 39 | 40 | hm_create_proto_h 41 | m4_define(`hm_syscall', `int H$1(hm_args_massage($3,void));') 42 | m4_define(`hm_specsyscall', `$1 H$2($3)$4;') 43 | m4_include(`hsyscalls.i4') 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /regress/case-adh-cancel2.sys: -------------------------------------------------------------------------------- 1 | ./adnshost default -f 2 | 3 | start 969124594.885114 4 | socket type=SOCK_DGRAM 5 | socket=6 6 | +0.000160 7 | fcntl fd=6 cmd=F_GETFL 8 | fcntl=~O_NONBLOCK&... 9 | +0.000057 10 | fcntl fd=6 cmd=F_SETFL O_NONBLOCK|... 11 | fcntl=OK 12 | +0.000035 13 | select max=7 rfds=[0,6] wfds=[] efds=[] to=null 14 | select=1 rfds=[0] wfds=[] efds=[] 15 | +6.-286734 16 | read fd=0 buflen=40 17 | read=OK 18 | 2d2d6173 796e6368 2d696420 34320a. 19 | +0.000727 20 | select max=7 rfds=[0,6] wfds=[] efds=[] to=null 21 | select=1 rfds=[0] wfds=[] efds=[] 22 | +0.000147 23 | read fd=0 buflen=40 24 | read=OK 25 | 63686961 726b2e67 7265656e 656e642e 6f72672e 756b0a. 26 | +0.000129 27 | sendto fd=6 addr=172.18.45.6:53 28 | 311f0100 00010000 00000000 06636869 61726b08 67726565 6e656e64 036f7267 29 | 02756b00 00010001. 30 | sendto=40 31 | +0.000802 32 | select max=7 rfds=[0,6] wfds=[] efds=[] to=1.999198 33 | select=1 rfds=[0,6] wfds=[] efds=[] 34 | +0.000135 35 | recvfrom fd=6 buflen=512 *addrlen=16 36 | recvfrom=OK addr=172.18.45.6:53 37 | 311f8580 00010001 00020002 06636869 61726b08 67726565 6e656e64 036f7267 38 | 02756b00 00010001 c00c0001 00010001 51800004 c3e04c84 08677265 656e656e 39 | 64036f72 6702756b 00000200 01000151 80001103 6e73300a 72656c61 74697669 40 | 7479c038 c0380002 00010001 51800006 036e7331 c057c053 00010001 00015180 41 | 0004ac12 2d06c070 00010001 00015180 0004ac12 2d01. 42 | +0.000553 43 | recvfrom fd=6 buflen=512 *addrlen=16 44 | recvfrom=EAGAIN 45 | +0.000195 46 | read fd=0 buflen=40 47 | read=OK 48 | 2d2d6361 6e63656c 2d696420 34320a. 49 | +0.000688 50 | select max=7 rfds=[0,6] wfds=[] efds=[] to=null 51 | select=1 rfds=[0] wfds=[] efds=[] 52 | +2.-11588 53 | read fd=0 buflen=40 54 | read=OK 55 | . 56 | +0.000089 57 | close fd=6 58 | close=OK 59 | +0.000149 60 | -------------------------------------------------------------------------------- /regress/case-sillyrp.out: -------------------------------------------------------------------------------- 1 | adns debug: using nameserver 172.18.45.6 2 | silly-rp-dm.test.iwj.relativity.greenend.org.uk flags 112 type 17 RP(raw) submitted 3 | silly-rp-dm.test.iwj.relativity.greenend.org.uk flags 112 type 131089 RP(822) submitted 4 | silly-rp-lp.test.iwj.relativity.greenend.org.uk flags 112 type 17 RP(raw) submitted 5 | silly-rp-lp.test.iwj.relativity.greenend.org.uk flags 112 type 131089 RP(822) submitted 6 | silly-rp-lp.test.iwj.relativity.greenend.org.uk flags 0 type 17 RP(raw) submitted 7 | silly-rp-lp.test.iwj.relativity.greenend.org.uk flags 0 type 131089 RP(822) submitted 8 | silly-rp-dm.test.iwj.relativity.greenend.org.uk flags 0 type 17 RP(raw) submitted 9 | silly-rp-dm.test.iwj.relativity.greenend.org.uk flags 0 type 131089 RP(822) submitted 10 | silly-rp-dm.test.iwj.relativity.greenend.org.uk flags 112 type RP(raw): OK; nrrs=1; cname=$; owner=$; ttl=60 11 | i\..root\000null.org . 12 | silly-rp-dm.test.iwj.relativity.greenend.org.uk flags 112 type RP(822): Found syntactically invalid domain name; nrrs=0; cname=$; owner=$; ttl=60 13 | silly-rp-lp.test.iwj.relativity.greenend.org.uk flags 112 type RP(raw): OK; nrrs=1; cname=$; owner=$; ttl=60 14 | spong\000flibble.ucam.org . 15 | silly-rp-lp.test.iwj.relativity.greenend.org.uk flags 112 type RP(822): Found invalid DNS data; nrrs=0; cname=$; owner=$; ttl=60 16 | silly-rp-lp.test.iwj.relativity.greenend.org.uk flags 0 type RP(raw): OK; nrrs=1; cname=$; owner=$; ttl=60 17 | spong\000flibble.ucam.org . 18 | silly-rp-lp.test.iwj.relativity.greenend.org.uk flags 0 type RP(822): Found invalid DNS data; nrrs=0; cname=$; owner=$; ttl=60 19 | silly-rp-dm.test.iwj.relativity.greenend.org.uk flags 0 type RP(raw): OK; nrrs=1; cname=$; owner=$; ttl=60 20 | i\..root\000null.org . 21 | silly-rp-dm.test.iwj.relativity.greenend.org.uk flags 0 type RP(822): Found syntactically invalid domain name; nrrs=0; cname=$; owner=$; ttl=60 22 | rc=0 23 | -------------------------------------------------------------------------------- /regress/case-srvbaddom.sys: -------------------------------------------------------------------------------- 1 | ./adnshost default 2 | -t srv- srv.tcp.test.iwj.relativity.greenend.org.uk. spong. _foo._bar. _s*a._tcp.ucam.org. _s*a._tcp.pi&ckle.ucam.org 3 | start 1144349027.926430 4 | socket type=SOCK_DGRAM 5 | socket=6 6 | +0.000082 7 | fcntl fd=6 cmd=F_GETFL 8 | fcntl=~O_NONBLOCK&... 9 | +0.000049 10 | fcntl fd=6 cmd=F_SETFL O_NONBLOCK|... 11 | fcntl=OK 12 | +0.000041 13 | sendto fd=6 addr=172.18.45.6:53 14 | 31210100 00010000 00000000 045f666f 6f045f62 61720000 210001. 15 | sendto=27 16 | +0.000326 17 | sendto fd=6 addr=172.18.45.6:53 18 | 31220100 00010000 00000000 045f732a 61045f74 63700475 63616d03 6f726700 19 | 00210001. 20 | sendto=36 21 | +0.000227 22 | select max=7 rfds=[6] wfds=[] efds=[] to=1.999447 23 | select=1 rfds=[6] wfds=[] efds=[] 24 | +0.004565 25 | recvfrom fd=6 buflen=512 *addrlen=16 26 | recvfrom=OK addr=172.18.45.6:53 27 | 31218183 00010000 00010000 045f666f 6f045f62 61720000 21000100 00060001 28 | 000029fb 00400141 0c524f4f 542d5345 52564552 53034e45 5400054e 53544c44 29 | 0c564552 49534947 4e2d4752 5303434f 4d007791 bfb50000 07080000 03840009 30 | 3a800001 5180. 31 | +0.000212 32 | recvfrom fd=6 buflen=512 *addrlen=16 33 | recvfrom=EAGAIN 34 | +0.000070 35 | select max=7 rfds=[6] wfds=[] efds=[] to=1.994926 36 | select=1 rfds=[6] wfds=[] efds=[] 37 | +0.002158 38 | recvfrom fd=6 buflen=512 *addrlen=16 39 | recvfrom=OK addr=172.18.45.6:53 40 | 31228183 00010000 00010000 045f732a 61045f74 63700475 63616d03 6f726700 41 | 00210001 c0160006 00010000 0df5004c 0a736f61 2d6f7269 67696e02 6e730663 42 | 68696172 6b086772 65656e65 6e64036f 72670275 6b000f73 74756465 6e742d72 43 | 756e2d64 6e73c03e 00000121 00002a30 00000e10 00093a80 00000e10. 44 | +0.000198 45 | recvfrom fd=6 buflen=512 *addrlen=16 46 | recvfrom=EAGAIN 47 | +0.000062 48 | close fd=6 49 | close=OK 50 | +0.000091 51 | -------------------------------------------------------------------------------- /src/versioninfo.rc.in: -------------------------------------------------------------------------------- 1 | /* versioninfo.rc.in - for adns 2 | * Copyright (C) 2008 g10 Code GmbH 3 | * 4 | * This file is free software; as a special exception the author gives 5 | * unlimited permission to copy and/or distribute it, with or without 6 | * modifications, as long as this notice is preserved. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY, to the extent permitted by law; without even the 10 | * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 11 | */ 12 | 13 | /* This file is processed by configure to create versioninfo.rc */ 14 | 15 | #line __LINE__ "versioninfo.rc.in" 16 | 17 | #include 18 | 19 | 20 | VS_VERSION_INFO VERSIONINFO 21 | FILEVERSION @ADNS_LT_CURRENT@,@ADNS_LT_AGE@,@ADNS_LT_REVISION@,@BUILD_REVISION@ 22 | PRODUCTVERSION @BUILD_FILEVERSION@ 23 | FILEFLAGSMASK 0x3fL 24 | #ifdef _DEBUG 25 | FILEFLAGS 0x21L 26 | #else 27 | FILEFLAGS 0x20L 28 | #endif 29 | FILEOS 0x40004L 30 | FILETYPE 0x1L 31 | FILESUBTYPE 0x0L 32 | BEGIN 33 | BLOCK "StringFileInfo" 34 | BEGIN 35 | BLOCK "040904b0" 36 | BEGIN 37 | VALUE "Comments", "Provided under the terms of the GNU General Public License.\0" 38 | VALUE "CompanyName", "Ian Jackson et al.\0" 39 | VALUE "FileDescription", "ADNS - DNS resolver library\0" 40 | VALUE "FileVersion", "@ADNS_LT_CURRENT@.@ADNS_LT_AGE@.@ADNS_LT_REVISION@.@BUILD_REVISION@\0" 41 | VALUE "InternalName", "libadns\0" 42 | VALUE "LegalCopyright", "Copyright © 2006 Ian Jackson\0" 43 | VALUE "LegalTrademarks", "\0" 44 | VALUE "OriginalFilename", "libadns.dll\0" 45 | VALUE "PrivateBuild", "\0" 46 | VALUE "ProductName", "libadns\0" 47 | VALUE "ProductVersion", "@PACKAGE_VERSION@\0" 48 | VALUE "SpecialBuild", "@BUILD_TIMESTAMP@\0" 49 | END 50 | END 51 | END 52 | -------------------------------------------------------------------------------- /regress/checkall: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # usage: checkall 3 | # runs all test cases 4 | # 5 | # This file is part of adns, which is 6 | # Copyright (C) 1997-2000,2003,2006 Ian Jackson 7 | # Copyright (C) 1999-2000,2003,2006 Tony Finch 8 | # Copyright (C) 1991 Massachusetts Institute of Technology 9 | # (See the file INSTALL for full details.) 10 | # 11 | # This program is free software; you can redistribute it and/or modify 12 | # it under the terms of the GNU General Public License as published by 13 | # the Free Software Foundation; either version 2, or (at your option) 14 | # any later version. 15 | # 16 | # This program is distributed in the hope that it will be useful, 17 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | # GNU General Public License for more details. 20 | # 21 | # You should have received a copy of the GNU General Public License 22 | # along with this program; if not, write to the Free Software Foundation, 23 | # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 24 | 25 | set -e 26 | 27 | failed='' 28 | passed='' 29 | skipped='' 30 | 31 | if test "x$srcdir" = "x" ; then 32 | srcdir=. 33 | fi 34 | 35 | for f in $(cd $srcdir && ls case-*.sys) 36 | do 37 | case="`echo \"$f\" | sed -e 's/^case-//; s/\.sys$//'`" 38 | set +e 39 | $srcdir/r1test $case 40 | rc=$? 41 | set -e 42 | case $rc in 43 | 0) passed="$passed $case" ;; 44 | 5) skipped="$skipped $case" ;; 45 | *) echo 46 | failed="$failed $case" 47 | echo 48 | ;; 49 | esac 50 | done 51 | 52 | if [ "x$failed" = x ] 53 | then 54 | echo " 55 | " 56 | if [ "x$skipped" = x ] 57 | then 58 | echo "all tests passed." 59 | else 60 | echo "all applicable tests passed (skipped:$skipped)" 61 | fi 62 | echo 63 | exit 0 64 | fi 65 | 66 | echo >&2 " 67 | AT LEAST ONE TEST FAILED 68 | passed tests:${passed:- NONE} 69 | skipped tests:${skipped:- NONE} 70 | failed tests:$failed 71 | " 72 | 73 | exit 1 74 | -------------------------------------------------------------------------------- /src/libadns.vers: -------------------------------------------------------------------------------- 1 | # libadns.vers - What symbols to export 2 | # Copyright (C) 2008 g10 Code GmbH 3 | # 4 | # This file is part of adns, which is 5 | # Copyright (C) 1997-2000,2003,2006 Ian Jackson 6 | # Copyright (C) 1999-2000,2003,2006 Tony Finch 7 | # Copyright (C) 1991 Massachusetts Institute of Technology 8 | # (See the file INSTALL for full details.) 9 | # 10 | # This program is free software; you can redistribute it and/or modify 11 | # it under the terms of the GNU General Public License as published by 12 | # the Free Software Foundation; either version 2, or (at your option) 13 | # any later version. 14 | # 15 | # This program is distributed in the hope that it will be useful, 16 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | # GNU General Public License for more details. 19 | # 20 | # You should have received a copy of the GNU General Public License 21 | # along with this program; if not, see . 22 | 23 | 24 | ADNS_1.0 { 25 | global: 26 | 27 | adns_init; 28 | adns_init_strcfg; 29 | adns_init_logfn; 30 | 31 | adns_synchronous; 32 | adns_submit; 33 | adns_check; 34 | adns_wait; 35 | adns_wait_poll; 36 | adns_cancel; 37 | 38 | adns_submit_reverse; 39 | adns_submit_reverse_any; 40 | 41 | adns_finish; 42 | 43 | adns_forallqueries_next; 44 | adns_forallqueries_begin; 45 | 46 | adns_checkconsistency; 47 | 48 | adns_processany; 49 | adns_processreadable; 50 | adns_processwriteable; 51 | adns_processexceptional; 52 | 53 | adns_processtimeouts; 54 | adns_firsttimeout; 55 | 56 | adns_globalsystemfailure; 57 | 58 | adns_beforeselect; 59 | adns_afterselect; 60 | adns_beforepoll; 61 | adns_afterpoll; 62 | 63 | adns_rr_info; 64 | 65 | adns_strerror; 66 | adns_errabbrev; 67 | adns_errtypeabbrev; 68 | 69 | adns_free; 70 | 71 | local: 72 | *; 73 | }; 74 | -------------------------------------------------------------------------------- /regress/case-ptrbaddom.sys: -------------------------------------------------------------------------------- 1 | adnstest default 2 | :12,65548 37.45.18.172.in-addr.arpa.test.iwj.relativity.greenend.org.uk. 3 | start 951960654.608219 4 | socket type=SOCK_DGRAM 5 | socket=4 6 | +0.000194 7 | fcntl fd=4 cmd=F_GETFL 8 | fcntl=~O_NONBLOCK&... 9 | +0.000055 10 | fcntl fd=4 cmd=F_SETFL O_NONBLOCK|... 11 | fcntl=OK 12 | +0.000035 13 | sendto fd=4 addr=172.18.45.6:53 14 | 311f0100 00010000 00000000 02333702 34350231 38033137 3207696e 2d616464 15 | 72046172 70610474 65737403 69776a0a 72656c61 74697669 74790867 7265656e 16 | 656e6403 6f726702 756b0000 0c0001. 17 | sendto=79 18 | +0.001355 19 | sendto fd=4 addr=172.18.45.6:53 20 | 31200100 00010000 00000000 02333702 34350231 38033137 3207696e 2d616464 21 | 72046172 70610474 65737403 69776a0a 72656c61 74697669 74790867 7265656e 22 | 656e6403 6f726702 756b0000 0c0001. 23 | sendto=79 24 | +0.000776 25 | select max=5 rfds=[4] wfds=[] efds=[] to=1.997869 26 | select=1 rfds=[4] wfds=[] efds=[] 27 | +0.000258 28 | recvfrom fd=4 buflen=512 *addrlen=16 29 | recvfrom=OK addr=172.18.45.6:53 30 | 311f8580 00010001 00010001 02333702 34350231 38033137 3207696e 2d616464 31 | 72046172 70610474 65737403 69776a0a 72656c61 74697669 74790867 7265656e 32 | 656e6403 6f726702 756b0000 0c0001c0 0c000c00 01000000 3c002903 70747204 33 | 74657374 0369776a 0a72656c 61746976 69747908 67726565 6e656e64 036f7267 34 | 02756b00 c05f0002 00010000 003c0006 036e7330 c068c090 00010001 00015180 35 | 0004ac12 2d06. 36 | +0.000613 37 | recvfrom fd=4 buflen=512 *addrlen=16 38 | recvfrom=OK addr=172.18.45.6:53 39 | 31208580 00010001 00010001 02333702 34350231 38033137 3207696e 2d616464 40 | 72046172 70610474 65737403 69776a0a 72656c61 74697669 74790867 7265656e 41 | 656e6403 6f726702 756b0000 0c0001c0 0c000c00 01000000 3c002903 70747204 42 | 74657374 0369776a 0a72656c 61746976 69747908 67726565 6e656e64 036f7267 43 | 02756b00 c05f0002 00010000 003c0006 036e7330 c068c090 00010001 00015180 44 | 0004ac12 2d06. 45 | +0.000711 46 | recvfrom fd=4 buflen=512 *addrlen=16 47 | recvfrom=EAGAIN 48 | +0.000133 49 | close fd=4 50 | close=OK 51 | +0.000187 52 | -------------------------------------------------------------------------------- /src/dlist.h: -------------------------------------------------------------------------------- 1 | /* 2 | * dlist.h 3 | * - macros for handling doubly linked lists 4 | */ 5 | /* 6 | * This file is part of adns, which is 7 | * Copyright (C) 1997-2000,2003,2006 Ian Jackson 8 | * Copyright (C) 1999-2000,2003,2006 Tony Finch 9 | * Copyright (C) 1991 Massachusetts Institute of Technology 10 | * (See the file INSTALL for full details.) 11 | * 12 | * This program is free software; you can redistribute it and/or modify 13 | * it under the terms of the GNU General Public License as published by 14 | * the Free Software Foundation; either version 2, or (at your option) 15 | * any later version. 16 | * 17 | * This program is distributed in the hope that it will be useful, 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | * GNU General Public License for more details. 21 | * 22 | * You should have received a copy of the GNU General Public License 23 | * along with this program; if not, write to the Free Software Foundation, 24 | * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 25 | */ 26 | 27 | #ifndef ADNS_DLIST_H_INCLUDED 28 | #define ADNS_DLIST_H_INCLUDED 29 | 30 | #define LIST_INIT(list) ((list).head= (list).tail= 0) 31 | #define LINK_INIT(link) ((link).next= (link).back= 0) 32 | 33 | #define LIST_UNLINK_PART(list,node,part) \ 34 | do { \ 35 | if ((node)->part back) (node)->part back->part next= (node)->part next; \ 36 | else (list).head= (node)->part next; \ 37 | if ((node)->part next) (node)->part next->part back= (node)->part back; \ 38 | else (list).tail= (node)->part back; \ 39 | } while(0) 40 | 41 | #define LIST_LINK_TAIL_PART(list,node,part) \ 42 | do { \ 43 | (node)->part next= 0; \ 44 | (node)->part back= (list).tail; \ 45 | if ((list).tail) (list).tail->part next= (node); \ 46 | else (list).head= (node); \ 47 | (list).tail= (node); \ 48 | } while(0) 49 | 50 | #define LIST_UNLINK(list,node) LIST_UNLINK_PART(list,node,) 51 | #define LIST_LINK_TAIL(list,node) LIST_LINK_TAIL_PART(list,node,) 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /src/libadns.def: -------------------------------------------------------------------------------- 1 | ;; libksba.def - Exported symbols for W32 2 | ;; Copyright (C) 2008 g10 Code GmbH 3 | ;; 4 | ;; This file is part of adns, which is 5 | ;; Copyright (C) 1997-2000,2003,2006 Ian Jackson 6 | ;; Copyright (C) 1999-2000,2003,2006 Tony Finch 7 | ;; Copyright (C) 1991 Massachusetts Institute of Technology 8 | ;; (See the file INSTALL for full details.) 9 | ;; 10 | ;; This program is free software; you can redistribute it and/or modify 11 | ;; it under the terms of the GNU General Public License as published by 12 | ;; the Free Software Foundation; either version 2, or (at your option) 13 | ;; any later version. 14 | ;; 15 | ;; This program is distributed in the hope that it will be useful, 16 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | ;; GNU General Public License for more details. 19 | ;; 20 | ;; You should have received a copy of the GNU General Public License 21 | ;; along with this program; if not, see . 22 | 23 | 24 | EXPORTS 25 | 26 | adns_init @1 27 | adns_init_strcfg @2 28 | adns_init_logfn @3 29 | 30 | adns_synchronous @4 31 | adns_submit @5 32 | adns_check @6 33 | adns_wait @7 34 | adns_wait_poll @8 35 | adns_cancel @9 36 | 37 | adns_submit_reverse @10 38 | adns_submit_reverse_any @11 39 | 40 | adns_finish @12 41 | 42 | adns_forallqueries_next @13 43 | adns_forallqueries_begin @14 44 | 45 | adns_checkconsistency @15 46 | 47 | adns_processany @16 48 | adns_processreadable @17 49 | adns_processwriteable @18 50 | adns_processexceptional @19 51 | 52 | adns_processtimeouts @20 53 | adns_firsttimeout @21 54 | 55 | adns_globalsystemfailure @22 56 | 57 | adns_beforeselect @23 58 | adns_afterselect @24 59 | adns_beforepoll @25 60 | adns_afterpoll @26 61 | 62 | adns_rr_info @27 63 | 64 | adns_strerror @28 65 | adns_errabbrev @29 66 | adns_errtypeabbrev @30 67 | 68 | adns_free @31 69 | 70 | 71 | -------------------------------------------------------------------------------- /client/client.h: -------------------------------------------------------------------------------- 1 | /* 2 | * clients.h 3 | * - useful declarations and definitions for adns client programs 4 | */ 5 | /* 6 | * This file is part of adns, which is 7 | * Copyright (C) 1997-2000,2003,2006 Ian Jackson 8 | * Copyright (C) 1999-2000,2003,2006 Tony Finch 9 | * Copyright (C) 1991 Massachusetts Institute of Technology 10 | * (See the file INSTALL for full details.) 11 | * 12 | * This program is free software; you can redistribute it and/or modify 13 | * it under the terms of the GNU General Public License as published by 14 | * the Free Software Foundation; either version 2, or (at your option) 15 | * any later version. 16 | * 17 | * This program is distributed in the hope that it will be useful, 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | * GNU General Public License for more details. 21 | * 22 | * You should have received a copy of the GNU General Public License 23 | * along with this program; if not, write to the Free Software Foundation, 24 | * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 25 | */ 26 | 27 | #ifndef CLIENT_H_INCLUDED 28 | #define CLIENT_H_INCLUDED 29 | 30 | 31 | #define COPYRIGHT_MESSAGE \ 32 | "Copyright (C) 1997-2000,2003,2006 Ian Jackson\n" \ 33 | "Copyright (C) 1999-2000,2003,2006 Tony Finch\n" \ 34 | "Copyright (C) 1991 Massachusetts Institute of Technology\n" \ 35 | "This is free software; see the source for copying conditions. There is NO\n" \ 36 | "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n" 37 | 38 | #define VERSION_MESSAGE(program) \ 39 | program " (GNU adns) " ADNS_VERSION_STRING "\n\n" COPYRIGHT_MESSAGE 40 | 41 | #define VERSION_PRINT_QUIT(program) \ 42 | if (fputs(VERSION_MESSAGE(program),stdout) == EOF || \ 43 | fclose(stdout)) { \ 44 | perror(program ": write version message"); \ 45 | quitnow(-1); \ 46 | } \ 47 | quitnow(0); 48 | 49 | void quitnow(int rc) NONRETURNING; 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /regress/case-abbrevto.out: -------------------------------------------------------------------------------- 1 | adns debug: using nameserver 172.18.45.36 2 | greenend.org.uk flags 0 type 1 A(-) submitted 3 | greenend.org.uk flags 0 type 2 NS(raw) submitted 4 | greenend.org.uk flags 0 type 5 CNAME(-) submitted 5 | greenend.org.uk flags 0 type 6 SOA(raw) submitted 6 | greenend.org.uk flags 0 type 12 PTR(raw) submitted 7 | greenend.org.uk flags 0 type 13 HINFO(-) submitted 8 | greenend.org.uk flags 0 type 15 MX(raw) submitted 9 | greenend.org.uk flags 0 type 16 TXT(-) submitted 10 | greenend.org.uk flags 0 type 17 RP(raw) submitted 11 | greenend.org.uk flags 0 type 65537 A(addr) submitted 12 | greenend.org.uk flags 0 type 65538 NS(+addr) submitted 13 | greenend.org.uk flags 0 type 65548 PTR(checked) submitted 14 | greenend.org.uk flags 0 type 65551 MX(+addr) submitted 15 | greenend.org.uk flags 0 type 131078 SOA(822) submitted 16 | greenend.org.uk flags 0 type 131089 RP(822) submitted 17 | greenend.org.uk flags 0 type A(-) ownflags=a: timeout; nrrs=0; cname=$; owner=$; ttl=604770 18 | greenend.org.uk flags 0 type NS(raw) ownflags=a: timeout; nrrs=0; cname=$; owner=$; ttl=604770 19 | greenend.org.uk flags 0 type CNAME(-) ownflags=a: timeout; nrrs=0; cname=$; owner=$; ttl=604770 20 | greenend.org.uk flags 0 type SOA(raw) ownflags=a: timeout; nrrs=0; cname=$; owner=$; ttl=604770 21 | greenend.org.uk flags 0 type PTR(raw) ownflags=a: timeout; nrrs=0; cname=$; owner=$; ttl=604770 22 | greenend.org.uk flags 0 type HINFO(-) ownflags=a: timeout; nrrs=0; cname=$; owner=$; ttl=604770 23 | greenend.org.uk flags 0 type MX(raw) ownflags=a: timeout; nrrs=0; cname=$; owner=$; ttl=604770 24 | greenend.org.uk flags 0 type TXT(-) ownflags=a: timeout; nrrs=0; cname=$; owner=$; ttl=604770 25 | greenend.org.uk flags 0 type RP(raw) ownflags=a: timeout; nrrs=0; cname=$; owner=$; ttl=604770 26 | greenend.org.uk flags 0 type A(addr) ownflags=a: timeout; nrrs=0; cname=$; owner=$; ttl=604770 27 | greenend.org.uk flags 0 type NS(+addr) ownflags=a: timeout; nrrs=0; cname=$; owner=$; ttl=604770 28 | greenend.org.uk flags 0 type PTR(checked) ownflags=a: timeout; nrrs=0; cname=$; owner=$; ttl=604770 29 | greenend.org.uk flags 0 type MX(+addr) ownflags=a: timeout; nrrs=0; cname=$; owner=$; ttl=604770 30 | greenend.org.uk flags 0 type SOA(822) ownflags=a: timeout; nrrs=0; cname=$; owner=$; ttl=604770 31 | greenend.org.uk flags 0 type RP(822) ownflags=a: timeout; nrrs=0; cname=$; owner=$; ttl=604770 32 | rc=0 33 | -------------------------------------------------------------------------------- /client/Makefile.am: -------------------------------------------------------------------------------- 1 | # Makefile.am - Makefile for client/ 2 | # Copyright (C) 2008 g10 Code GmbH 3 | # 4 | # This file is part of adns, which is 5 | # Copyright (C) 1997-2000,2003,2006 Ian Jackson 6 | # Copyright (C) 1999-2000,2003,2006 Tony Finch 7 | # Copyright (C) 1991 Massachusetts Institute of Technology 8 | # (See the file INSTALL for full details.) 9 | # 10 | # This program is free software; you can redistribute it and/or modify 11 | # it under the terms of the GNU General Public License as published by 12 | # the Free Software Foundation; either version 2, or (at your option) 13 | # any later version. 14 | # 15 | # This program is distributed in the hope that it will be useful, 16 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | # GNU General Public License for more details. 19 | # 20 | # You should have received a copy of the GNU General Public License 21 | # along with this program; if not, see . 22 | 23 | 24 | bin_PROGRAMS = adnslogres adnsheloex adnshost 25 | if HAVE_TSEARCH 26 | bin_PROGRAMS += adnsresfilter 27 | endif 28 | 29 | noinst_PROGRAMS = fanftest adnstest 30 | 31 | AM_CPPFLAGS = $(PLATFORMCPPFLAGS) -I$(top_srcdir)/src 32 | 33 | LDADD = ../src/libadns.la 34 | 35 | BUILT_SOURCES = adns.h tvarith.h w32extra.c 36 | CLEANFILES = adns.h tvarith.h w32extra.c 37 | 38 | sources_from_src = adns.h tvarith.h w32extra.c 39 | 40 | commonsrc = client.h 41 | if HAVE_W32_SYSTEM 42 | commonsrc += w32extra.c 43 | endif 44 | 45 | adnslogres_SOURCES = adnslogres.c $(commonsrc) 46 | 47 | adnsheloex_SOURCES = adnsheloex.c $(commonsrc) 48 | 49 | adnshost_SOURCES = adh-main.c adh-opts.c adh-query.c adnshost.h $(commonsrc) 50 | 51 | adnsresfilter_SOURCES = adnsresfilter.c $(commonsrc) 52 | 53 | fanftest_SOURCES = fanftest.c $(commonsrc) 54 | 55 | adnstest_SOURCES = adnstest.c $(commonsrc) 56 | 57 | 58 | ./adns.h : $(top_srcdir)/src/adns.h 59 | cp $< $@ 60 | 61 | ./tvarith.h : $(top_srcdir)/src/tvarith.h 62 | cp $< $@ 63 | 64 | ./w32extra.c : $(top_srcdir)/src/w32extra.c 65 | cp $< $@ 66 | 67 | 68 | # Make sure that the library is build before we use it. This is 69 | # important for make -j. Because some tools are based on certain 70 | # header files we also directly depend on them too. 71 | $(PROGRAMS): ../src/libadns.la $(sources_from_src) 72 | 73 | -------------------------------------------------------------------------------- /regress/case-longdomsrch1b.sys: -------------------------------------------------------------------------------- 1 | adnstest ndots100 2 | :1 1/1xxxlllantysiliogog.llanfairpwllgwyngyllgogerychwyrndrobwlxxxxxxxxxxlllantysiliogog.llanfairpwllgwyngyllgogerychwyrndrobwlxxxxxxxxxxlllantysiliogog.llanfairpwllgwyngyllgogerychwyrndrobwlxxxxxxxxxxlllantysiliogog.relativity.greenend.org.uk 3 | start 951956136.566877 4 | socket type=SOCK_DGRAM 5 | socket=4 6 | +0.000137 7 | fcntl fd=4 cmd=F_GETFL 8 | fcntl=~O_NONBLOCK&... 9 | +0.000060 10 | fcntl fd=4 cmd=F_SETFL O_NONBLOCK|... 11 | fcntl=OK 12 | +0.000038 13 | sendto fd=4 addr=172.18.45.6:53 14 | 31210100 00010000 00000000 13317878 786c6c6c 616e7479 73696c69 6f676f67 15 | 3f6c6c61 6e666169 7270776c 6c677779 6e67796c 6c676f67 65727963 68777972 16 | 6e64726f 62776c78 78787878 78787878 786c6c6c 616e7479 73696c69 6f676f67 17 | 3f6c6c61 6e666169 7270776c 6c677779 6e67796c 6c676f67 65727963 68777972 18 | 6e64726f 62776c78 78787878 78787878 786c6c6c 616e7479 73696c69 6f676f67 19 | 3f6c6c61 6e666169 7270776c 6c677779 6e67796c 6c676f67 65727963 68777972 20 | 6e64726f 62776c78 78787878 78787878 786c6c6c 616e7479 73696c69 6f676f67 21 | 0a72656c 61746976 69747908 67726565 6e656e64 036f7267 02756b00 00010001. 22 | sendto=256 23 | +0.004128 24 | select max=5 rfds=[4] wfds=[] efds=[] to=1.995872 25 | select=1 rfds=[4] wfds=[] efds=[] 26 | +0.000232 27 | recvfrom fd=4 buflen=512 *addrlen=16 28 | recvfrom=OK addr=172.18.45.6:53 29 | 31218583 00010000 00010000 13317878 786c6c6c 616e7479 73696c69 6f676f67 30 | 3f6c6c61 6e666169 7270776c 6c677779 6e67796c 6c676f67 65727963 68777972 31 | 6e64726f 62776c78 78787878 78787878 786c6c6c 616e7479 73696c69 6f676f67 32 | 3f6c6c61 6e666169 7270776c 6c677779 6e67796c 6c676f67 65727963 68777972 33 | 6e64726f 62776c78 78787878 78787878 786c6c6c 616e7479 73696c69 6f676f67 34 | 3f6c6c61 6e666169 7270776c 6c677779 6e67796c 6c676f67 65727963 68777972 35 | 6e64726f 62776c78 78787878 78787878 786c6c6c 616e7479 73696c69 6f676f67 36 | 0a72656c 61746976 69747908 67726565 6e656e64 036f7267 02756b00 00010001 37 | 0a72656c 61746976 69747908 67726565 6e656e64 036f7267 02756b00 00060001 38 | 00015180 0027036e 7330c100 0a686f73 746d6173 746572c1 00000000 2d00001c 39 | 2000000e 1000093a 80000151 80. 40 | +0.001145 41 | recvfrom fd=4 buflen=512 *addrlen=16 42 | recvfrom=EAGAIN 43 | +0.000155 44 | close fd=4 45 | close=OK 46 | +0.000161 47 | -------------------------------------------------------------------------------- /regress/case-unknown2.sys: -------------------------------------------------------------------------------- 1 | ./adnshost default 2 | -t type2 -Qq ucam.org. 3 | start 1144369677.011111 4 | socket type=SOCK_DGRAM 5 | socket=6 6 | +0.000083 7 | fcntl fd=6 cmd=F_GETFL 8 | fcntl=~O_NONBLOCK&... 9 | +0.000049 10 | fcntl fd=6 cmd=F_SETFL O_NONBLOCK|... 11 | fcntl=OK 12 | +0.000043 13 | sendto fd=6 addr=172.18.45.6:53 14 | 311f0100 00010000 00000000 04756361 6d036f72 67000002 0001. 15 | sendto=26 16 | +0.000308 17 | select max=7 rfds=[6] wfds=[] efds=[] to=1.999692 18 | select=0 rfds=[] wfds=[] efds=[] 19 | +2.-00406 20 | select max=7 rfds=[6] wfds=[] efds=[] to=0.000098 21 | select=0 rfds=[] wfds=[] efds=[] 22 | +0.000987 23 | sendto fd=6 addr=172.18.45.6:53 24 | 311f0100 00010000 00000000 04756361 6d036f72 67000002 0001. 25 | sendto=26 26 | +0.000244 27 | select max=7 rfds=[6] wfds=[] efds=[] to=1.999756 28 | select=0 rfds=[] wfds=[] efds=[] 29 | +2.-00531 30 | select max=7 rfds=[6] wfds=[] efds=[] to=0.000287 31 | select=0 rfds=[] wfds=[] efds=[] 32 | +0.000988 33 | sendto fd=6 addr=172.18.45.6:53 34 | 311f0100 00010000 00000000 04756361 6d036f72 67000002 0001. 35 | sendto=26 36 | +0.000252 37 | select max=7 rfds=[6] wfds=[] efds=[] to=1.999748 38 | select=0 rfds=[] wfds=[] efds=[] 39 | +2.-00540 40 | select max=7 rfds=[6] wfds=[] efds=[] to=0.000288 41 | select=0 rfds=[] wfds=[] efds=[] 42 | +0.000989 43 | sendto fd=6 addr=172.18.45.6:53 44 | 311f0100 00010000 00000000 04756361 6d036f72 67000002 0001. 45 | sendto=26 46 | +0.000237 47 | select max=7 rfds=[6] wfds=[] efds=[] to=1.999763 48 | select=1 rfds=[6] wfds=[] efds=[] 49 | +1.961402 50 | recvfrom fd=6 buflen=512 *addrlen=16 51 | recvfrom=OK addr=172.18.45.6:53 52 | 311f8180 00010004 00040004 04756361 6d036f72 67000002 00010475 63616d03 53 | 6f726700 00020001 00054600 000c0663 68696172 6b026e73 c01ac01a 00020001 54 | 00054600 000b0863 68696d61 657261c0 35c01a00 02000100 05460000 08057261 55 | 70756ec0 35c01a00 02000100 05460000 09066265 636b6574 c035c01a 00020001 56 | 00054600 0002c02e c01a0002 00010005 46000002 c046c01a 00020001 00054600 57 | 0002c05d c01a0002 00010005 46000002 c071c02e 00010001 0001517c 0004c1c9 58 | c8aac046 00010001 0001517c 0004836f 082ac05d 00010001 0001517c 0004836f 59 | e86cc071 00010001 0001517c 0004cd86 e6ba. 60 | +0.000366 61 | recvfrom fd=6 buflen=512 *addrlen=16 62 | recvfrom=EAGAIN 63 | +0.000089 64 | close fd=6 65 | close=OK 66 | +0.000187 67 | -------------------------------------------------------------------------------- /regress/case-child.sys: -------------------------------------------------------------------------------- 1 | adnstest default 2 | :65548 134.76.224.195.in-addr.arpa 3 | start 929574747.401802 4 | socket type=SOCK_DGRAM 5 | socket=4 6 | +0.000189 7 | fcntl fd=4 cmd=F_GETFL 8 | fcntl=~O_NONBLOCK&... 9 | +0.000080 10 | fcntl fd=4 cmd=F_SETFL O_NONBLOCK|... 11 | fcntl=OK 12 | +0.000058 13 | sendto fd=4 addr=172.18.45.6:53 14 | 311f0100 00010000 00000000 03313334 02373603 32323403 31393507 696e2d61 15 | 64647204 61727061 00000c00 01. 16 | sendto=45 17 | +0.000595 18 | select max=5 rfds=[4] wfds=[] efds=[] to=1.999405 19 | select=1 rfds=[4] wfds=[] efds=[] 20 | +0.008975 21 | recvfrom fd=4 buflen=512 *addrlen=16 22 | recvfrom=OK addr=172.18.45.6:53 23 | 311f8180 00010001 00050005 03313334 02373603 32323403 31393507 696e2d61 24 | 64647204 61727061 00000c00 01c00c00 0c000100 01336600 22107065 726d7574 25 | 6174696f 6e2d6369 74790867 7265656e 656e6403 6f726702 756b0002 37360332 26 | 32340331 39350769 6e2d6164 64720461 72706100 00020001 00013366 00110464 27 | 6e733006 656c6d61 696c0263 6fc057c0 5b000200 01000133 66000704 646e7331 28 | c083c05b 00020001 00013366 00070464 6e7332c0 83c05b00 02000100 01336600 29 | 0e036e73 32047861 7261036e 657400c0 5b000200 01000133 66000603 6e7333c0 30 | c5c07e00 01000100 00149d00 04c17ae9 11c09b00 01000100 00149d00 04c17ae9 31 | 01c0ae00 01000100 00149d00 04c3e04c c1c0c100 01000100 0284e500 04c28fa1 32 | 6bc0db00 01000100 0284e500 04c28fa3 19. 33 | +0.001671 34 | sendto fd=4 addr=172.18.45.6:53 35 | 31200100 00010000 00000000 10706572 6d757461 74696f6e 2d636974 79086772 36 | 65656e65 6e64036f 72670275 6b000001 0001. 37 | sendto=50 38 | +0.000683 39 | recvfrom fd=4 buflen=512 *addrlen=16 40 | recvfrom=EAGAIN 41 | +0.000108 42 | select max=5 rfds=[4] wfds=[] efds=[] to=1.997538 43 | select=1 rfds=[4] wfds=[] efds=[] 44 | +0.005811 45 | recvfrom fd=4 buflen=512 *addrlen=16 46 | recvfrom=OK addr=172.18.45.6:53 47 | 31208580 00010001 00020002 10706572 6d757461 74696f6e 2d636974 79086772 48 | 65656e65 6e64036f 72670275 6b000001 0001c00c 00010001 00015180 0004c3e0 49 | 4c860867 7265656e 656e6403 6f726702 756b0000 02000100 01518000 11036e73 50 | 300a7265 6c617469 76697479 c042c042 00020001 00015180 0006036e 7331c061 51 | c05d0001 00010001 51800004 ac122d06 c07a0001 00010001 51800004 ac122d41. 52 | +0.000862 53 | recvfrom fd=4 buflen=512 *addrlen=16 54 | recvfrom=EAGAIN 55 | +0.000193 56 | close fd=4 57 | close=OK 58 | +0.000207 59 | -------------------------------------------------------------------------------- /src/vbuf.c: -------------------------------------------------------------------------------- 1 | /* 2 | * vbuf.c 3 | * - vbuf handling 4 | */ 5 | /* 6 | * This file is part of adns, which is 7 | * Copyright (C) 1997-2000,2003,2006 Ian Jackson 8 | * Copyright (C) 1999-2000,2003,2006 Tony Finch 9 | * Copyright (C) 1991 Massachusetts Institute of Technology 10 | * (See the file INSTALL for full details.) 11 | * 12 | * This program is free software; you can redistribute it and/or modify 13 | * it under the terms of the GNU General Public License as published by 14 | * the Free Software Foundation; either version 2, or (at your option) 15 | * any later version. 16 | * 17 | * This program is distributed in the hope that it will be useful, 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | * GNU General Public License for more details. 21 | * 22 | * You should have received a copy of the GNU General Public License 23 | * along with this program; if not, write to the Free Software Foundation, 24 | * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 25 | */ 26 | 27 | #include 28 | #include 29 | 30 | #include 31 | 32 | #include "internal.h" 33 | 34 | /* vbuf functions */ 35 | 36 | void adns__vbuf_init(vbuf *vb) { 37 | vb->used= vb->avail= 0; vb->buf= 0; 38 | } 39 | 40 | int adns__vbuf_ensure(vbuf *vb, int want) { 41 | void *nb; 42 | 43 | if (vb->avail >= want) return 1; 44 | nb= realloc(vb->buf,want); if (!nb) return 0; 45 | vb->buf= nb; 46 | vb->avail= want; 47 | return 1; 48 | } 49 | 50 | void adns__vbuf_appendq(vbuf *vb, const byte *data, int len) { 51 | memcpy(vb->buf+vb->used,data,len); 52 | vb->used+= len; 53 | } 54 | 55 | int adns__vbuf_append(vbuf *vb, const byte *data, int len) { 56 | int newlen; 57 | void *nb; 58 | 59 | newlen= vb->used+len; 60 | if (vb->avail < newlen) { 61 | if (newlen<20) newlen= 20; 62 | newlen <<= 1; 63 | nb= realloc(vb->buf,newlen); 64 | if (!nb) { newlen= vb->used+len; nb= realloc(vb->buf,newlen); } 65 | if (!nb) return 0; 66 | vb->buf= nb; 67 | vb->avail= newlen; 68 | } 69 | adns__vbuf_appendq(vb,data,len); 70 | return 1; 71 | } 72 | 73 | int adns__vbuf_appendstr(vbuf *vb, const char *data) { 74 | int l; 75 | l= strlen(data); 76 | return adns__vbuf_append(vb,data,l); 77 | } 78 | 79 | void adns__vbuf_free(vbuf *vb) { 80 | free(vb->buf); 81 | adns__vbuf_init(vb); 82 | } 83 | 84 | -------------------------------------------------------------------------------- /regress/case-longdom0.sys: -------------------------------------------------------------------------------- 1 | adnstest default 2 | :1 1/0rndrobwlxxxxxxxxxxlllantysiliogog.llanfairpwllgwyngyllgogerychwyrndrobwlxxxxxxxxxxlllantysiliogog.llanfairpwllgwyngyllgogerychwyrndrobwlxxxxxxxxxxlllantysiliogog.llanfairpwllgwyngyllgogerychwyrndrobwlxxxxxxxxxxlllantysiliogog.relativity.greenend.org.uk. 3 | start 951955651.857473 4 | socket type=SOCK_DGRAM 5 | socket=4 6 | +0.000126 7 | fcntl fd=4 cmd=F_GETFL 8 | fcntl=~O_NONBLOCK&... 9 | +0.000056 10 | fcntl fd=4 cmd=F_SETFL O_NONBLOCK|... 11 | fcntl=OK 12 | +0.000036 13 | sendto fd=4 addr=172.18.45.6:53 14 | 311f0100 00010000 00000000 2230726e 64726f62 776c7878 78787878 78787878 15 | 6c6c6c61 6e747973 696c696f 676f673f 6c6c616e 66616972 70776c6c 6777796e 16 | 67796c6c 676f6765 72796368 7779726e 64726f62 776c7878 78787878 78787878 17 | 6c6c6c61 6e747973 696c696f 676f673f 6c6c616e 66616972 70776c6c 6777796e 18 | 67796c6c 676f6765 72796368 7779726e 64726f62 776c7878 78787878 78787878 19 | 6c6c6c61 6e747973 696c696f 676f673f 6c6c616e 66616972 70776c6c 6777796e 20 | 67796c6c 676f6765 72796368 7779726e 64726f62 776c7878 78787878 78787878 21 | 6c6c6c61 6e747973 696c696f 676f670a 72656c61 74697669 74790867 7265656e 22 | 656e6403 6f726702 756b0000 010001. 23 | sendto=271 24 | +0.003710 25 | select max=5 rfds=[4] wfds=[] efds=[] to=1.996290 26 | select=1 rfds=[4] wfds=[] efds=[] 27 | +0.000332 28 | recvfrom fd=4 buflen=512 *addrlen=16 29 | recvfrom=OK addr=172.18.45.6:53 30 | 311f8583 00010000 00010000 2230726e 64726f62 776c7878 78787878 78787878 31 | 6c6c6c61 6e747973 696c696f 676f673f 6c6c616e 66616972 70776c6c 6777796e 32 | 67796c6c 676f6765 72796368 7779726e 64726f62 776c7878 78787878 78787878 33 | 6c6c6c61 6e747973 696c696f 676f673f 6c6c616e 66616972 70776c6c 6777796e 34 | 67796c6c 676f6765 72796368 7779726e 64726f62 776c7878 78787878 78787878 35 | 6c6c6c61 6e747973 696c696f 676f673f 6c6c616e 66616972 70776c6c 6777796e 36 | 67796c6c 676f6765 72796368 7779726e 64726f62 776c7878 78787878 78787878 37 | 6c6c6c61 6e747973 696c696f 676f670a 72656c61 74697669 74790867 7265656e 38 | 656e6403 6f726702 756b0000 0100010a 72656c61 74697669 74790867 7265656e 39 | 656e6403 6f726702 756b0000 06000100 01518000 27036e73 30c10f0a 686f7374 40 | 6d617374 6572c10f 0000002d 00001c20 00000e10 00093a80 00015180. 41 | +0.001276 42 | recvfrom fd=4 buflen=512 *addrlen=16 43 | recvfrom=EAGAIN 44 | +0.000148 45 | close fd=4 46 | close=OK 47 | +0.000154 48 | -------------------------------------------------------------------------------- /regress/case-longdomsrch1.sys: -------------------------------------------------------------------------------- 1 | adnstest ndots100 2 | :1 1/0rndrobwlxxxxxxxxxxlllantysiliogog.llanfairpwllgwyngyllgogerychwyrndrobwlxxxxxxxxxxlllantysiliogog.llanfairpwllgwyngyllgogerychwyrndrobwlxxxxxxxxxxlllantysiliogog.llanfairpwllgwyngyllgogerychwyrndrobwlxxxxxxxxxxlllantysiliogog.relativity.greenend.org.uk 3 | start 951956087.269350 4 | socket type=SOCK_DGRAM 5 | socket=4 6 | +0.000132 7 | fcntl fd=4 cmd=F_GETFL 8 | fcntl=~O_NONBLOCK&... 9 | +0.000060 10 | fcntl fd=4 cmd=F_SETFL O_NONBLOCK|... 11 | fcntl=OK 12 | +0.000038 13 | sendto fd=4 addr=172.18.45.6:53 14 | 31210100 00010000 00000000 2230726e 64726f62 776c7878 78787878 78787878 15 | 6c6c6c61 6e747973 696c696f 676f673f 6c6c616e 66616972 70776c6c 6777796e 16 | 67796c6c 676f6765 72796368 7779726e 64726f62 776c7878 78787878 78787878 17 | 6c6c6c61 6e747973 696c696f 676f673f 6c6c616e 66616972 70776c6c 6777796e 18 | 67796c6c 676f6765 72796368 7779726e 64726f62 776c7878 78787878 78787878 19 | 6c6c6c61 6e747973 696c696f 676f673f 6c6c616e 66616972 70776c6c 6777796e 20 | 67796c6c 676f6765 72796368 7779726e 64726f62 776c7878 78787878 78787878 21 | 6c6c6c61 6e747973 696c696f 676f670a 72656c61 74697669 74790867 7265656e 22 | 656e6403 6f726702 756b0000 010001. 23 | sendto=271 24 | +0.001749 25 | select max=5 rfds=[4] wfds=[] efds=[] to=1.998251 26 | select=1 rfds=[4] wfds=[] efds=[] 27 | +0.000215 28 | recvfrom fd=4 buflen=512 *addrlen=16 29 | recvfrom=OK addr=172.18.45.6:53 30 | 31218583 00010000 00010000 2230726e 64726f62 776c7878 78787878 78787878 31 | 6c6c6c61 6e747973 696c696f 676f673f 6c6c616e 66616972 70776c6c 6777796e 32 | 67796c6c 676f6765 72796368 7779726e 64726f62 776c7878 78787878 78787878 33 | 6c6c6c61 6e747973 696c696f 676f673f 6c6c616e 66616972 70776c6c 6777796e 34 | 67796c6c 676f6765 72796368 7779726e 64726f62 776c7878 78787878 78787878 35 | 6c6c6c61 6e747973 696c696f 676f673f 6c6c616e 66616972 70776c6c 6777796e 36 | 67796c6c 676f6765 72796368 7779726e 64726f62 776c7878 78787878 78787878 37 | 6c6c6c61 6e747973 696c696f 676f670a 72656c61 74697669 74790867 7265656e 38 | 656e6403 6f726702 756b0000 0100010a 72656c61 74697669 74790867 7265656e 39 | 656e6403 6f726702 756b0000 06000100 01518000 27036e73 30c10f0a 686f7374 40 | 6d617374 6572c10f 0000002d 00001c20 00000e10 00093a80 00015180. 41 | +0.001176 42 | recvfrom fd=4 buflen=512 *addrlen=16 43 | recvfrom=EAGAIN 44 | +0.000173 45 | close fd=4 46 | close=OK 47 | +0.000152 48 | -------------------------------------------------------------------------------- /NEWS: -------------------------------------------------------------------------------- 1 | Noteworthy changes in version 1.4-g10-8 (unreleased) [C5/A4/R_] 2 | ---------------------------------------------------- 3 | 4 | 5 | Noteworthy changes in version 1.4-g10-7 (2015-11-20) [C5/A4/R0] 6 | ---------------------------------------------------- 7 | 8 | * Implement a mode to use a public nameserver via Tor. This 9 | introduces two new config options and a new init flag. 10 | 11 | * Fix use of TCP under Windows. 12 | 13 | 14 | Noteworthy changes in version 1.4-g10-6 (2015-04-13) [C4/A4/R3] 15 | ---------------------------------------------------- 16 | 17 | * Fix building for Windows with newer versions of Mingw. 18 | 19 | 20 | Noteworthy changes in version 1.4-g10-5 (2014-12-12) 21 | ---------------------------------------------------- 22 | 23 | * [W32] Build fix for newer dlltool versions. 24 | 25 | 26 | Noteworthy changes in version 1.4-g10-4 (2014-04-05) 27 | ---------------------------------------------------- 28 | 29 | * Improved privacy mode for adnslogres. 30 | 31 | * Added IPv6 support to adnslogres. 32 | 33 | * Added FTP log support to adnslogres. 34 | 35 | 36 | Noteworthy changes in version 1.4-g10-3 (2013-04-24) 37 | ---------------------------------------------------- 38 | 39 | * Basic support for AAAA records. 40 | 41 | * Added a privacy mode to adnslogres (options -P and -S). 42 | 43 | 44 | Noteworthy changes in version 1.4-g10-2 (2008-05-08) 45 | ---------------------------------------------------- 46 | 47 | * [W32] Do not use tsearch. 48 | 49 | 50 | Noteworthy changes in version 1.4-g10-1 (2008-04-30) 51 | ---------------------------------------------------- 52 | 53 | The old Windows port of adns did not worked very well (tcp 54 | connections have probably never been used) and it was not possible 55 | to build it from a POSIX box. To make the porting and maintaining 56 | easier the build system has been updated to make use of automake and 57 | libtool. Adding a bit of windows support was then easy. 58 | 59 | The package is available at: ftp://ftp.g10code.com/g10code/adns/. 60 | 61 | 62 | * New function adns_free which is nothing but a wrapper around free. 63 | Only needed under Windows in certain settings. It does not harm to 64 | use it always. 65 | 66 | * Symbol versioning is now implemented. 67 | 68 | * When updating the regression test suite new tests need to be added 69 | to one of the new automake include files. 70 | 71 | * New files ChangeLog, AUTHORS and NEWS as demanded by GNU standards. 72 | The old changelog has been renamed to changelog.Debian. 73 | 74 | -------------------------------------------------------------------------------- /regress/case-adh-cancel.sys: -------------------------------------------------------------------------------- 1 | ./adnshost default -f 2 | 3 | start 969124425.922896 4 | socket type=SOCK_DGRAM 5 | socket=6 6 | +0.000162 7 | fcntl fd=6 cmd=F_GETFL 8 | fcntl=~O_NONBLOCK&... 9 | +0.000058 10 | fcntl fd=6 cmd=F_SETFL O_NONBLOCK|... 11 | fcntl=OK 12 | +0.000035 13 | select max=7 rfds=[0,6] wfds=[] efds=[] to=null 14 | select=1 rfds=[0] wfds=[] efds=[] 15 | +0.000135 16 | read fd=0 buflen=40 17 | read=OK 18 | 2d2d6173 796e6368 2d696420 34320a63 68696172 6b2e6772 65656e65 6e642e6f 19 | 72672e75 6b0a2d2d. 20 | +0.000254 21 | sendto fd=6 addr=172.18.45.6:53 22 | 311f0100 00010000 00000000 06636869 61726b08 67726565 6e656e64 036f7267 23 | 02756b00 00010001. 24 | sendto=40 25 | +0.000825 26 | read fd=0 buflen=38 27 | read=OK 28 | 6173796e 63682d69 64203433 0a646176 656e616e 742e7265 6c617469 76697479 29 | 2e677265 656e. 30 | +0.000184 31 | read fd=0 buflen=15 32 | read=OK 33 | 656e642e 6f72672e 756b0a2d 2d6361. 34 | +0.000106 35 | sendto fd=6 addr=172.18.45.6:53 36 | 31200100 00010000 00000000 08646176 656e616e 740a7265 6c617469 76697479 37 | 08677265 656e656e 64036f72 6702756b 00000100 01. 38 | sendto=53 39 | +0.000624 40 | read fd=0 buflen=36 41 | read=OK 42 | 6e63656c 2d696420 34320a. 43 | +0.000145 44 | select max=7 rfds=[0,6] wfds=[] efds=[] to=1.999231 45 | select=2 rfds=[0,6] wfds=[] efds=[] 46 | +0.000157 47 | recvfrom fd=6 buflen=512 *addrlen=16 48 | recvfrom=OK addr=172.18.45.6:53 49 | 311f8580 00010001 00020002 06636869 61726b08 67726565 6e656e64 036f7267 50 | 02756b00 00010001 c00c0001 00010001 51800004 c3e04c84 08677265 656e656e 51 | 64036f72 6702756b 00000200 01000151 80001103 6e73300a 72656c61 74697669 52 | 7479c038 c0380002 00010001 51800006 036e7331 c057c053 00010001 00015180 53 | 0004ac12 2d06c070 00010001 00015180 0004ac12 2d01. 54 | +0.000551 55 | recvfrom fd=6 buflen=512 *addrlen=16 56 | recvfrom=OK addr=172.18.45.6:53 57 | 31208580 00010001 00020002 08646176 656e616e 740a7265 6c617469 76697479 58 | 08677265 656e656e 64036f72 6702756b 00000100 01c00c00 01000100 01518000 59 | 04ac122d 060a7265 6c617469 76697479 08677265 656e656e 64036f72 6702756b 60 | 00000200 01000151 80000603 6e7330c0 45c04500 02000100 01518000 06036e73 61 | 31c045c0 6b000100 01000151 800004ac 122d06c0 7d000100 01000151 800004ac 62 | 122d01. 63 | +0.000579 64 | recvfrom fd=6 buflen=512 *addrlen=16 65 | recvfrom=EAGAIN 66 | +0.000151 67 | read fd=0 buflen=40 68 | read=OK 69 | . 70 | +0.000043 71 | close fd=6 72 | close=OK 73 | +0.000961 74 | -------------------------------------------------------------------------------- /regress/case-norecurse3.out: -------------------------------------------------------------------------------- 1 | adns debug: using nameserver 172.18.45.6 2 | 2.203.156.195.in-addr.arpa1 flags 0 type 1 A(-) submitted 3 | 2.203.156.195.in-addr.arpa1 flags 0 type 2 NS(raw) submitted 4 | 2.203.156.195.in-addr.arpa1 flags 0 type 5 CNAME(-) submitted 5 | 2.203.156.195.in-addr.arpa1 flags 0 type 6 SOA(raw) submitted 6 | 2.203.156.195.in-addr.arpa1 flags 0 type 12 PTR(raw) submitted 7 | 2.203.156.195.in-addr.arpa1 flags 0 type 13 HINFO(-) submitted 8 | 2.203.156.195.in-addr.arpa1 flags 0 type 15 MX(raw) submitted 9 | 2.203.156.195.in-addr.arpa1 flags 0 type 16 TXT(-) submitted 10 | 2.203.156.195.in-addr.arpa1 flags 0 type 17 RP(raw) submitted 11 | 2.203.156.195.in-addr.arpa1 flags 0 type 65537 A(addr) submitted 12 | 2.203.156.195.in-addr.arpa1 flags 0 type 65538 NS(+addr) submitted 13 | 2.203.156.195.in-addr.arpa1 flags 0 type 65548 PTR(checked) submitted 14 | 2.203.156.195.in-addr.arpa1 flags 0 type 65551 MX(+addr) submitted 15 | 2.203.156.195.in-addr.arpa1 flags 0 type 131078 SOA(822) submitted 16 | 2.203.156.195.in-addr.arpa1 flags 0 type 131089 RP(822) submitted 17 | 2.203.156.195.in-addr.arpa1 flags 0 type A(-): No such domain; nrrs=0; cname=$; owner=$; ttl=86400 18 | 2.203.156.195.in-addr.arpa1 flags 0 type RP(822): No such domain; nrrs=0; cname=$; owner=$; ttl=86400 19 | 2.203.156.195.in-addr.arpa1 flags 0 type SOA(822): No such domain; nrrs=0; cname=$; owner=$; ttl=86400 20 | 2.203.156.195.in-addr.arpa1 flags 0 type MX(+addr): No such domain; nrrs=0; cname=$; owner=$; ttl=86400 21 | 2.203.156.195.in-addr.arpa1 flags 0 type PTR(checked): No such domain; nrrs=0; cname=$; owner=$; ttl=86400 22 | 2.203.156.195.in-addr.arpa1 flags 0 type NS(+addr): No such domain; nrrs=0; cname=$; owner=$; ttl=86400 23 | 2.203.156.195.in-addr.arpa1 flags 0 type A(addr): No such domain; nrrs=0; cname=$; owner=$; ttl=86400 24 | 2.203.156.195.in-addr.arpa1 flags 0 type RP(raw): No such domain; nrrs=0; cname=$; owner=$; ttl=86400 25 | 2.203.156.195.in-addr.arpa1 flags 0 type TXT(-): No such domain; nrrs=0; cname=$; owner=$; ttl=86400 26 | 2.203.156.195.in-addr.arpa1 flags 0 type MX(raw): No such domain; nrrs=0; cname=$; owner=$; ttl=86400 27 | 2.203.156.195.in-addr.arpa1 flags 0 type HINFO(-): No such domain; nrrs=0; cname=$; owner=$; ttl=86400 28 | 2.203.156.195.in-addr.arpa1 flags 0 type PTR(raw): No such domain; nrrs=0; cname=$; owner=$; ttl=86400 29 | 2.203.156.195.in-addr.arpa1 flags 0 type SOA(raw): No such domain; nrrs=0; cname=$; owner=$; ttl=86400 30 | 2.203.156.195.in-addr.arpa1 flags 0 type CNAME(-): No such domain; nrrs=0; cname=$; owner=$; ttl=86400 31 | 2.203.156.195.in-addr.arpa1 flags 0 type NS(raw): No such domain; nrrs=0; cname=$; owner=$; ttl=86400 32 | rc=0 33 | -------------------------------------------------------------------------------- /regress/case-1stservtotcp.out: -------------------------------------------------------------------------------- 1 | adns debug: using nameserver 10.0.0.1 2 | adns debug: using nameserver 172.18.45.6 3 | trunc.test.iwj.relativity.greenend.org.uk flags 0 type 12 PTR(raw) submitted 4 | adns warning: TCP connection failed: unable to make connection: timed out (NS=10.0.0.1) 5 | adns debug: TCP connected (NS=172.18.45.6) 6 | trunc.test.iwj.relativity.greenend.org.uk flags 0 type PTR(raw): OK; nrrs=30; cname=$; owner=$; ttl=59 7 | long.domain.to.force.truncation.0.test.iwj.relativity.greenend.org.uk 8 | long.domain.to.force.truncation.1.test.iwj.relativity.greenend.org.uk 9 | long.domain.to.force.truncation.2.test.iwj.relativity.greenend.org.uk 10 | long.domain.to.force.truncation.3.test.iwj.relativity.greenend.org.uk 11 | long.domain.to.force.truncation.4.test.iwj.relativity.greenend.org.uk 12 | long.domain.to.force.truncation.5.test.iwj.relativity.greenend.org.uk 13 | long.domain.to.force.truncation.6.test.iwj.relativity.greenend.org.uk 14 | long.domain.to.force.truncation.7.test.iwj.relativity.greenend.org.uk 15 | long.domain.to.force.truncation.8.test.iwj.relativity.greenend.org.uk 16 | long.domain.to.force.truncation.9.test.iwj.relativity.greenend.org.uk 17 | long.domain.to.force.truncation.10.test.iwj.relativity.greenend.org.uk 18 | long.domain.to.force.truncation.11.test.iwj.relativity.greenend.org.uk 19 | long.domain.to.force.truncation.12.test.iwj.relativity.greenend.org.uk 20 | long.domain.to.force.truncation.13.test.iwj.relativity.greenend.org.uk 21 | long.domain.to.force.truncation.14.test.iwj.relativity.greenend.org.uk 22 | long.domain.to.force.truncation.15.test.iwj.relativity.greenend.org.uk 23 | long.domain.to.force.truncation.16.test.iwj.relativity.greenend.org.uk 24 | long.domain.to.force.truncation.17.test.iwj.relativity.greenend.org.uk 25 | long.domain.to.force.truncation.18.test.iwj.relativity.greenend.org.uk 26 | long.domain.to.force.truncation.19.test.iwj.relativity.greenend.org.uk 27 | long.domain.to.force.truncation.20.test.iwj.relativity.greenend.org.uk 28 | long.domain.to.force.truncation.21.test.iwj.relativity.greenend.org.uk 29 | long.domain.to.force.truncation.22.test.iwj.relativity.greenend.org.uk 30 | long.domain.to.force.truncation.23.test.iwj.relativity.greenend.org.uk 31 | long.domain.to.force.truncation.24.test.iwj.relativity.greenend.org.uk 32 | long.domain.to.force.truncation.25.test.iwj.relativity.greenend.org.uk 33 | long.domain.to.force.truncation.26.test.iwj.relativity.greenend.org.uk 34 | long.domain.to.force.truncation.27.test.iwj.relativity.greenend.org.uk 35 | long.domain.to.force.truncation.28.test.iwj.relativity.greenend.org.uk 36 | long.domain.to.force.truncation.29.test.iwj.relativity.greenend.org.uk 37 | rc=0 38 | -------------------------------------------------------------------------------- /regress/case-2ndservtcp.out: -------------------------------------------------------------------------------- 1 | adns debug: using nameserver 172.18.45.36 2 | adns debug: using nameserver 172.18.45.6 3 | trunc.test.iwj.relativity.greenend.org.uk flags 0 type 12 PTR(raw) submitted 4 | adns warning: TCP connection failed: connect/read: No route to host (NS=172.18.45.36) 5 | adns debug: TCP connected (NS=172.18.45.6) 6 | trunc.test.iwj.relativity.greenend.org.uk flags 0 type PTR(raw): OK; nrrs=30; cname=$; owner=$; ttl=60 7 | long.domain.to.force.truncation.0.test.iwj.relativity.greenend.org.uk 8 | long.domain.to.force.truncation.1.test.iwj.relativity.greenend.org.uk 9 | long.domain.to.force.truncation.2.test.iwj.relativity.greenend.org.uk 10 | long.domain.to.force.truncation.3.test.iwj.relativity.greenend.org.uk 11 | long.domain.to.force.truncation.4.test.iwj.relativity.greenend.org.uk 12 | long.domain.to.force.truncation.5.test.iwj.relativity.greenend.org.uk 13 | long.domain.to.force.truncation.6.test.iwj.relativity.greenend.org.uk 14 | long.domain.to.force.truncation.7.test.iwj.relativity.greenend.org.uk 15 | long.domain.to.force.truncation.8.test.iwj.relativity.greenend.org.uk 16 | long.domain.to.force.truncation.9.test.iwj.relativity.greenend.org.uk 17 | long.domain.to.force.truncation.10.test.iwj.relativity.greenend.org.uk 18 | long.domain.to.force.truncation.11.test.iwj.relativity.greenend.org.uk 19 | long.domain.to.force.truncation.12.test.iwj.relativity.greenend.org.uk 20 | long.domain.to.force.truncation.13.test.iwj.relativity.greenend.org.uk 21 | long.domain.to.force.truncation.14.test.iwj.relativity.greenend.org.uk 22 | long.domain.to.force.truncation.15.test.iwj.relativity.greenend.org.uk 23 | long.domain.to.force.truncation.16.test.iwj.relativity.greenend.org.uk 24 | long.domain.to.force.truncation.17.test.iwj.relativity.greenend.org.uk 25 | long.domain.to.force.truncation.18.test.iwj.relativity.greenend.org.uk 26 | long.domain.to.force.truncation.19.test.iwj.relativity.greenend.org.uk 27 | long.domain.to.force.truncation.20.test.iwj.relativity.greenend.org.uk 28 | long.domain.to.force.truncation.21.test.iwj.relativity.greenend.org.uk 29 | long.domain.to.force.truncation.22.test.iwj.relativity.greenend.org.uk 30 | long.domain.to.force.truncation.23.test.iwj.relativity.greenend.org.uk 31 | long.domain.to.force.truncation.24.test.iwj.relativity.greenend.org.uk 32 | long.domain.to.force.truncation.25.test.iwj.relativity.greenend.org.uk 33 | long.domain.to.force.truncation.26.test.iwj.relativity.greenend.org.uk 34 | long.domain.to.force.truncation.27.test.iwj.relativity.greenend.org.uk 35 | long.domain.to.force.truncation.28.test.iwj.relativity.greenend.org.uk 36 | long.domain.to.force.truncation.29.test.iwj.relativity.greenend.org.uk 37 | rc=0 38 | -------------------------------------------------------------------------------- /regress/harness.h.m4: -------------------------------------------------------------------------------- 1 | m4_dnl harness.h.m4 2 | m4_dnl (part of complex test harness, not of the library) 3 | m4_dnl - function and other declarations 4 | 5 | m4_dnl This file is part of adns, which is 6 | m4_dnl Copyright (C) 1997-2000,2003,2006 Ian Jackson 7 | m4_dnl Copyright (C) 1999-2000,2003,2006 Tony Finch 8 | m4_dnl Copyright (C) 1991 Massachusetts Institute of Technology 9 | m4_dnl (See the file INSTALL for full details.) 10 | m4_dnl 11 | m4_dnl This program is free software; you can redistribute it and/or modify 12 | m4_dnl it under the terms of the GNU General Public License as published by 13 | m4_dnl the Free Software Foundation; either version 2, or (at your option) 14 | m4_dnl any later version. 15 | m4_dnl 16 | m4_dnl This program is distributed in the hope that it will be useful, 17 | m4_dnl but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | m4_dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | m4_dnl GNU General Public License for more details. 20 | m4_dnl 21 | m4_dnl You should have received a copy of the GNU General Public License 22 | m4_dnl along with this program; if not, write to the Free Software Foundation, 23 | m4_dnl Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 24 | 25 | m4_include(hmacros.i4) 26 | 27 | #ifndef HARNESS_H_INCLUDED 28 | #define HARNESS_H_INCLUDED 29 | 30 | #include "internal.h" 31 | #include "hsyscalls.h" 32 | 33 | /* There is a Q function (Q for Question) for each such syscall; 34 | * it constructs a string representing the call, and calls Q_str 35 | * on it, or constructs it in vb and calls Q_vb; 36 | */ 37 | 38 | hm_create_proto_q 39 | m4_define(`hm_syscall', `void Q$1(hm_args_massage($3,void));') 40 | m4_define(`hm_specsyscall', `') 41 | m4_include(`hsyscalls.i4') 42 | 43 | void Q_vb(void); 44 | 45 | extern void Tshutdown(void); 46 | 47 | /* General help functions */ 48 | 49 | void Tfailed(const char *why); 50 | void Toutputerr(void); 51 | void Tnomem(void); 52 | void Tfsyscallr(const char *fmt, ...) PRINTFFORMAT(1,2); 53 | void Tensurerecordfile(void); 54 | void Tmust(const char *call, const char *arg, int cond); 55 | 56 | void Tvbf(const char *fmt, ...) PRINTFFORMAT(1,2); 57 | void Tvbvf(const char *fmt, va_list al); 58 | void Tvbfdset(int max, const fd_set *set); 59 | void Tvbpollfds(const struct pollfd *fds, int nfds); 60 | void Tvbaddr(const struct sockaddr *addr, int addrlen); 61 | void Tvbbytes(const void *buf, int len); 62 | void Tvberrno(int e); 63 | void Tvba(const char *str); 64 | 65 | /* Shared globals */ 66 | 67 | extern vbuf vb; 68 | extern struct timeval currenttime; 69 | extern const struct Terrno { const char *n; int v; } Terrnos[]; 70 | 71 | #endif 72 | -------------------------------------------------------------------------------- /regress/case-1stservbroken.out: -------------------------------------------------------------------------------- 1 | adns debug: using nameserver 172.18.45.2 2 | adns debug: using nameserver 172.18.45.6 3 | trunc.test.iwj.relativity.greenend.org.uk flags 0 type 12 PTR(raw) submitted 4 | adns warning: datagram receive error: Connection refused 5 | adns debug: TCP connected (NS=172.18.45.2) 6 | adns warning: TCP connection failed: read: Broken pipe (NS=172.18.45.2) 7 | adns debug: TCP connected (NS=172.18.45.6) 8 | trunc.test.iwj.relativity.greenend.org.uk flags 0 type PTR(raw): OK; nrrs=30; cname=$; owner=$; ttl=60 9 | long.domain.to.force.truncation.0.test.iwj.relativity.greenend.org.uk 10 | long.domain.to.force.truncation.1.test.iwj.relativity.greenend.org.uk 11 | long.domain.to.force.truncation.2.test.iwj.relativity.greenend.org.uk 12 | long.domain.to.force.truncation.3.test.iwj.relativity.greenend.org.uk 13 | long.domain.to.force.truncation.4.test.iwj.relativity.greenend.org.uk 14 | long.domain.to.force.truncation.5.test.iwj.relativity.greenend.org.uk 15 | long.domain.to.force.truncation.6.test.iwj.relativity.greenend.org.uk 16 | long.domain.to.force.truncation.7.test.iwj.relativity.greenend.org.uk 17 | long.domain.to.force.truncation.8.test.iwj.relativity.greenend.org.uk 18 | long.domain.to.force.truncation.9.test.iwj.relativity.greenend.org.uk 19 | long.domain.to.force.truncation.10.test.iwj.relativity.greenend.org.uk 20 | long.domain.to.force.truncation.11.test.iwj.relativity.greenend.org.uk 21 | long.domain.to.force.truncation.12.test.iwj.relativity.greenend.org.uk 22 | long.domain.to.force.truncation.13.test.iwj.relativity.greenend.org.uk 23 | long.domain.to.force.truncation.14.test.iwj.relativity.greenend.org.uk 24 | long.domain.to.force.truncation.15.test.iwj.relativity.greenend.org.uk 25 | long.domain.to.force.truncation.16.test.iwj.relativity.greenend.org.uk 26 | long.domain.to.force.truncation.17.test.iwj.relativity.greenend.org.uk 27 | long.domain.to.force.truncation.18.test.iwj.relativity.greenend.org.uk 28 | long.domain.to.force.truncation.19.test.iwj.relativity.greenend.org.uk 29 | long.domain.to.force.truncation.20.test.iwj.relativity.greenend.org.uk 30 | long.domain.to.force.truncation.21.test.iwj.relativity.greenend.org.uk 31 | long.domain.to.force.truncation.22.test.iwj.relativity.greenend.org.uk 32 | long.domain.to.force.truncation.23.test.iwj.relativity.greenend.org.uk 33 | long.domain.to.force.truncation.24.test.iwj.relativity.greenend.org.uk 34 | long.domain.to.force.truncation.25.test.iwj.relativity.greenend.org.uk 35 | long.domain.to.force.truncation.26.test.iwj.relativity.greenend.org.uk 36 | long.domain.to.force.truncation.27.test.iwj.relativity.greenend.org.uk 37 | long.domain.to.force.truncation.28.test.iwj.relativity.greenend.org.uk 38 | long.domain.to.force.truncation.29.test.iwj.relativity.greenend.org.uk 39 | rc=0 40 | -------------------------------------------------------------------------------- /regress/case-abbrev.out: -------------------------------------------------------------------------------- 1 | adns debug: using nameserver 172.18.45.6 2 | greenend.org.uk flags 0 type 1 A(-) submitted 3 | greenend.org.uk flags 0 type 2 NS(raw) submitted 4 | greenend.org.uk flags 0 type 5 CNAME(-) submitted 5 | greenend.org.uk flags 0 type 6 SOA(raw) submitted 6 | greenend.org.uk flags 0 type 12 PTR(raw) submitted 7 | greenend.org.uk flags 0 type 13 HINFO(-) submitted 8 | greenend.org.uk flags 0 type 15 MX(raw) submitted 9 | greenend.org.uk flags 0 type 16 TXT(-) submitted 10 | greenend.org.uk flags 0 type 17 RP(raw) submitted 11 | greenend.org.uk flags 0 type 65537 A(addr) submitted 12 | greenend.org.uk flags 0 type 65538 NS(+addr) submitted 13 | greenend.org.uk flags 0 type 65548 PTR(checked) submitted 14 | greenend.org.uk flags 0 type 65551 MX(+addr) submitted 15 | greenend.org.uk flags 0 type 131078 SOA(822) submitted 16 | greenend.org.uk flags 0 type 131089 RP(822) submitted 17 | greenend.org.uk flags 0 type A(-) ownflags=a: nodata; nrrs=0; cname=$; owner=$; ttl=86400 18 | greenend.org.uk flags 0 type NS(raw) ownflags=a: ok; nrrs=2; cname=$; owner=$; ttl=86400 19 | ns1.relativity.greenend.org.uk 20 | ns0.relativity.greenend.org.uk 21 | greenend.org.uk flags 0 type CNAME(-) ownflags=a: nodata; nrrs=0; cname=$; owner=$; ttl=86400 22 | greenend.org.uk flags 0 type SOA(raw) ownflags=a: ok; nrrs=1; cname=$; owner=$; ttl=86400 23 | ns.chiark.greenend.org.uk hostmaster.greenend.org.uk 1999061300 28800 7200 604800 86400 24 | greenend.org.uk flags 0 type PTR(raw) ownflags=a: nodata; nrrs=0; cname=$; owner=$; ttl=86400 25 | greenend.org.uk flags 0 type HINFO(-) ownflags=a: nodata; nrrs=0; cname=$; owner=$; ttl=86400 26 | greenend.org.uk flags 0 type MX(raw) ownflags=a: ok; nrrs=1; cname=$; owner=$; ttl=86400 27 | 10 chiark.greenend.org.uk 28 | greenend.org.uk flags 0 type TXT(-) ownflags=a: nodata; nrrs=0; cname=$; owner=$; ttl=86400 29 | greenend.org.uk flags 0 type RP(raw) ownflags=a: nodata; nrrs=0; cname=$; owner=$; ttl=86400 30 | greenend.org.uk flags 0 type A(addr) ownflags=a: nodata; nrrs=0; cname=$; owner=$; ttl=86400 31 | greenend.org.uk flags 0 type NS(+addr) ownflags=a: ok; nrrs=2; cname=$; owner=$; ttl=86400 32 | ns0.relativity.greenend.org.uk ok 0 ok "OK" ( INET 172.18.45.6 ) 33 | ns1.relativity.greenend.org.uk ok 0 ok "OK" ( INET 172.18.45.65 ) 34 | greenend.org.uk flags 0 type PTR(checked) ownflags=a: nodata; nrrs=0; cname=$; owner=$; ttl=86400 35 | greenend.org.uk flags 0 type MX(+addr) ownflags=a: ok; nrrs=1; cname=$; owner=$; ttl=86400 36 | 10 chiark.greenend.org.uk ok 0 ok "OK" ( INET 195.224.76.132 ) 37 | greenend.org.uk flags 0 type SOA(822) ownflags=a: ok; nrrs=1; cname=$; owner=$; ttl=86400 38 | ns.chiark.greenend.org.uk hostmaster@greenend.org.uk 1999061300 28800 7200 604800 86400 39 | greenend.org.uk flags 0 type RP(822) ownflags=a: nodata; nrrs=0; cname=$; owner=$; ttl=86400 40 | rc=0 41 | -------------------------------------------------------------------------------- /regress/case-srvsort.out: -------------------------------------------------------------------------------- 1 | _srv._tcp.test.iwj.relativity.greenend.org.uk SRV 10 66 10066 davenant.relativity.greenend.org.uk 2 | _srv._tcp.test.iwj.relativity.greenend.org.uk SRV 20 400 20400 anarres.relativity.greenend.org.uk 3 | _srv._tcp.test.iwj.relativity.greenend.org.uk SRV 20 200 20200 norway.relativity.greenend.org.uk 4 | _srv._tcp.test.iwj.relativity.greenend.org.uk SRV 20 100 20100 nxdomain.relativity.greenend.org.uk 5 | _srv._tcp.test.iwj.relativity.greenend.org.uk SRV 10 66 10066 davenant.relativity.greenend.org.uk 6 | _srv._tcp.test.iwj.relativity.greenend.org.uk SRV 20 400 20400 anarres.relativity.greenend.org.uk 7 | _srv._tcp.test.iwj.relativity.greenend.org.uk SRV 20 100 20100 nxdomain.relativity.greenend.org.uk 8 | _srv._tcp.test.iwj.relativity.greenend.org.uk SRV 20 200 20200 norway.relativity.greenend.org.uk 9 | _srv._tcp.test.iwj.relativity.greenend.org.uk SRV 10 66 10066 davenant.relativity.greenend.org.uk 10 | _srv._tcp.test.iwj.relativity.greenend.org.uk SRV 20 400 20400 anarres.relativity.greenend.org.uk 11 | _srv._tcp.test.iwj.relativity.greenend.org.uk SRV 20 200 20200 norway.relativity.greenend.org.uk 12 | _srv._tcp.test.iwj.relativity.greenend.org.uk SRV 20 100 20100 nxdomain.relativity.greenend.org.uk 13 | _srv._tcp.test.iwj.relativity.greenend.org.uk SRV 10 66 10066 davenant.relativity.greenend.org.uk 14 | _srv._tcp.test.iwj.relativity.greenend.org.uk SRV 20 200 20200 norway.relativity.greenend.org.uk 15 | _srv._tcp.test.iwj.relativity.greenend.org.uk SRV 20 400 20400 anarres.relativity.greenend.org.uk 16 | _srv._tcp.test.iwj.relativity.greenend.org.uk SRV 20 100 20100 nxdomain.relativity.greenend.org.uk 17 | _srv._tcp.test.iwj.relativity.greenend.org.uk SRV 10 66 10066 davenant.relativity.greenend.org.uk 18 | _srv._tcp.test.iwj.relativity.greenend.org.uk SRV 20 200 20200 norway.relativity.greenend.org.uk 19 | _srv._tcp.test.iwj.relativity.greenend.org.uk SRV 20 400 20400 anarres.relativity.greenend.org.uk 20 | _srv._tcp.test.iwj.relativity.greenend.org.uk SRV 20 100 20100 nxdomain.relativity.greenend.org.uk 21 | _srv._tcp.test.iwj.relativity.greenend.org.uk SRV 10 66 10066 davenant.relativity.greenend.org.uk 22 | _srv._tcp.test.iwj.relativity.greenend.org.uk SRV 20 400 20400 anarres.relativity.greenend.org.uk 23 | _srv._tcp.test.iwj.relativity.greenend.org.uk SRV 20 100 20100 nxdomain.relativity.greenend.org.uk 24 | _srv._tcp.test.iwj.relativity.greenend.org.uk SRV 20 200 20200 norway.relativity.greenend.org.uk 25 | _srv._tcp.test.iwj.relativity.greenend.org.uk SRV 10 66 10066 davenant.relativity.greenend.org.uk 26 | _srv._tcp.test.iwj.relativity.greenend.org.uk SRV 20 100 20100 nxdomain.relativity.greenend.org.uk 27 | _srv._tcp.test.iwj.relativity.greenend.org.uk SRV 20 200 20200 norway.relativity.greenend.org.uk 28 | _srv._tcp.test.iwj.relativity.greenend.org.uk SRV 20 400 20400 anarres.relativity.greenend.org.uk 29 | rc=0 30 | -------------------------------------------------------------------------------- /client/fanftest.c: -------------------------------------------------------------------------------- 1 | /* 2 | * fanftest.c 3 | * - a small test program from Tony Finch 4 | */ 5 | /* 6 | * This file is 7 | * Copyright (C) 1999 Tony Finch 8 | * Copyright (C) 1999-2000 Ian Jackson 9 | * 10 | * It is part of adns, which is 11 | * Copyright (C) 1997-2000,2003,2006 Ian Jackson 12 | * Copyright (C) 1999-2000,2003,2006 Tony Finch 13 | * Copyright (C) 1991 Massachusetts Institute of Technology 14 | * (See the file INSTALL for full details.) 15 | * 16 | * This program is free software; you can redistribute it and/or modify 17 | * it under the terms of the GNU General Public License as published by 18 | * the Free Software Foundation; either version 2, or (at your option) 19 | * any later version. 20 | * 21 | * This program is distributed in the hope that it will be useful, 22 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 23 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 24 | * GNU General Public License for more details. 25 | * 26 | * You should have received a copy of the GNU General Public License 27 | * along with this program; if not, write to the Free Software Foundation, 28 | * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 29 | * 30 | * This version was originally supplied by Tony Finch, but has been 31 | * modified by Ian Jackson as it was incorporated into adns. 32 | */ 33 | 34 | static const char * const cvsid = 35 | "$Id: fanftest.c,v 1.6 2006/04/08 14:36:57 ian Exp $"; 36 | 37 | #include 38 | #include 39 | 40 | #include 41 | #include 42 | #include 43 | #include 44 | 45 | #include "config.h" 46 | #include "adns.h" 47 | 48 | static const char *progname; 49 | 50 | static void aargh(const char *msg) { 51 | fprintf(stderr, "%s: %s: %s (%d)\n", progname, msg, 52 | strerror(errno) ? strerror(errno) : "Unknown error", errno); 53 | exit(1); 54 | } 55 | 56 | int main(int argc, char *argv[]) { 57 | adns_state adns; 58 | adns_query query; 59 | adns_answer *answer; 60 | 61 | progname= strrchr(*argv, '/'); 62 | if (progname) 63 | progname++; 64 | else 65 | progname= *argv; 66 | 67 | if (argc != 2) { 68 | fprintf(stderr, "usage: %s \n", progname); 69 | exit(1); 70 | } 71 | 72 | errno= adns_init(&adns, adns_if_debug, 0); 73 | if (errno) aargh("adns_init"); 74 | 75 | errno= adns_submit(adns, argv[1], adns_r_ptr, 76 | adns_qf_quoteok_cname|adns_qf_cname_loose, 77 | NULL, &query); 78 | if (errno) aargh("adns_submit"); 79 | 80 | errno= adns_wait(adns, &query, &answer, NULL); 81 | if (errno) aargh("adns_init"); 82 | 83 | printf("%s\n", answer->status == adns_s_ok ? *answer->rrs.str : "dunno"); 84 | 85 | adns_finish(adns); 86 | 87 | return 0; 88 | } 89 | -------------------------------------------------------------------------------- /regress/case-searchabs.sys: -------------------------------------------------------------------------------- 1 | adnstest default 2 | :1 1/news.davenant 3 | start 924363451.882765 4 | socket type=SOCK_DGRAM 5 | socket=4 6 | +0.000207 7 | fcntl fd=4 cmd=F_GETFL 8 | fcntl=~O_NONBLOCK&... 9 | +0.000088 10 | fcntl fd=4 cmd=F_SETFL O_NONBLOCK|... 11 | fcntl=OK 12 | +0.000071 13 | sendto fd=4 addr=172.18.45.6:53 14 | 311f0100 00010000 00000000 046e6577 73086461 76656e61 6e740000 010001. 15 | sendto=31 16 | +0.001846 17 | select max=5 rfds=[4] wfds=[] efds=[] to=1.998154 18 | select=1 rfds=[4] wfds=[] efds=[] 19 | +0.004592 20 | recvfrom fd=4 buflen=512 *addrlen=16 21 | recvfrom=OK addr=172.18.45.6:53 22 | 311f8583 00010000 00010000 046e6577 73086461 76656e61 6e740000 01000100 23 | 00060001 00000248 003e0141 0c524f4f 542d5345 52564552 53034e45 54000a68 24 | 6f73746d 61737465 7208494e 5445524e 4943c039 7726f440 00000708 00000384 25 | 00093a80 00015180. 26 | +0.000697 27 | sendto fd=4 addr=172.18.45.6:53 28 | 31200100 00010000 00000000 046e6577 73086461 76656e61 6e740864 6176656e 29 | 616e7408 67726565 6e656e64 036f7267 02756b00 00010001. 30 | sendto=56 31 | +0.001073 32 | recvfrom fd=4 buflen=512 *addrlen=16 33 | recvfrom=EAGAIN 34 | +0.000105 35 | select max=5 rfds=[4] wfds=[] efds=[] to=1.998125 36 | select=1 rfds=[4] wfds=[] efds=[] 37 | +0.003727 38 | recvfrom fd=4 buflen=512 *addrlen=16 39 | recvfrom=OK addr=172.18.45.6:53 40 | 31208583 00010000 00010000 046e6577 73086461 76656e61 6e740864 6176656e 41 | 616e7408 67726565 6e656e64 036f7267 02756b00 00010001 08677265 656e656e 42 | 64036f72 6702756b 00000600 01000151 80003704 646e7330 06656c6d 61696c02 43 | 636fc045 08726963 68617264 6b066368 6961726b c0387726 f0bf0000 70800000 44 | 1c200009 3a800001 5180. 45 | +0.000972 46 | sendto fd=4 addr=172.18.45.6:53 47 | 31210100 00010000 00000000 046e6577 73086461 76656e61 6e740867 7265656e 48 | 656e6403 6f726702 756b0000 010001. 49 | sendto=47 50 | +0.000965 51 | recvfrom fd=4 buflen=512 *addrlen=16 52 | recvfrom=EAGAIN 53 | +0.000105 54 | select max=5 rfds=[4] wfds=[] efds=[] to=1.997958 55 | select=1 rfds=[4] wfds=[] efds=[] 56 | +0.007222 57 | recvfrom fd=4 buflen=512 *addrlen=16 58 | recvfrom=OK addr=172.18.45.6:53 59 | 31218580 00010002 00030003 046e6577 73086461 76656e61 6e740867 7265656e 60 | 656e6403 6f726702 756b0000 010001c0 0c000500 01000151 80002508 64617665 61 | 6e616e74 0a72656c 61746976 69747908 67726565 6e656e64 036f7267 02756b00 62 | c03b0001 00010001 51800004 ac122d06 c0440002 00010001 51800006 036e7330 63 | c044c044 00020001 00015180 0006036e 7331c044 c0440002 00010001 51800006 64 | 036e7332 c044c07c 00010001 00015180 0004ac12 2d06c08e 00010001 00015180 65 | 0004ac12 2d41c0a0 00010001 00015180 0004ac12 2d01. 66 | +0.001124 67 | recvfrom fd=4 buflen=512 *addrlen=16 68 | recvfrom=EAGAIN 69 | +0.000295 70 | close fd=4 71 | close=OK 72 | +0.000221 73 | -------------------------------------------------------------------------------- /regress/case-owner.out: -------------------------------------------------------------------------------- 1 | adns debug: using nameserver 172.18.45.6 2 | chiark.greenend.org.uk flags 4 type 1 A(-) submitted 3 | chiark.greenend.org.uk flags 4 type 2 NS(raw) submitted 4 | chiark.greenend.org.uk flags 4 type 5 CNAME(-) submitted 5 | chiark.greenend.org.uk flags 4 type 6 SOA(raw) submitted 6 | chiark.greenend.org.uk flags 4 type 12 PTR(raw) submitted 7 | chiark.greenend.org.uk flags 4 type 13 HINFO(-) submitted 8 | chiark.greenend.org.uk flags 4 type 15 MX(raw) submitted 9 | chiark.greenend.org.uk flags 4 type 16 TXT(-) submitted 10 | chiark.greenend.org.uk flags 4 type 17 RP(raw) submitted 11 | chiark.greenend.org.uk flags 4 type 65537 A(addr) submitted 12 | chiark.greenend.org.uk flags 4 type 65538 NS(+addr) submitted 13 | chiark.greenend.org.uk flags 4 type 65548 PTR(checked) submitted 14 | chiark.greenend.org.uk flags 4 type 65551 MX(+addr) submitted 15 | chiark.greenend.org.uk flags 4 type 131078 SOA(822) submitted 16 | chiark.greenend.org.uk flags 4 type 131089 RP(822) submitted 17 | chiark.greenend.org.uk flags 4 type A(-): OK; nrrs=1; cname=$; owner=chiark.greenend.org.uk; ttl=86400 18 | 195.224.76.132 19 | chiark.greenend.org.uk flags 4 type NS(raw): No such data; nrrs=0; cname=$; owner=chiark.greenend.org.uk; ttl=86400 20 | chiark.greenend.org.uk flags 4 type CNAME(-): No such data; nrrs=0; cname=$; owner=chiark.greenend.org.uk; ttl=86400 21 | chiark.greenend.org.uk flags 4 type SOA(raw): No such data; nrrs=0; cname=$; owner=chiark.greenend.org.uk; ttl=86400 22 | chiark.greenend.org.uk flags 4 type PTR(raw): No such data; nrrs=0; cname=$; owner=chiark.greenend.org.uk; ttl=86400 23 | chiark.greenend.org.uk flags 4 type HINFO(-): No such data; nrrs=0; cname=$; owner=chiark.greenend.org.uk; ttl=86400 24 | chiark.greenend.org.uk flags 4 type MX(raw): OK; nrrs=1; cname=$; owner=chiark.greenend.org.uk; ttl=86400 25 | 5 permutation-city.greenend.org.uk 26 | chiark.greenend.org.uk flags 4 type TXT(-): No such data; nrrs=0; cname=$; owner=chiark.greenend.org.uk; ttl=86400 27 | chiark.greenend.org.uk flags 4 type RP(raw): No such data; nrrs=0; cname=$; owner=chiark.greenend.org.uk; ttl=86400 28 | chiark.greenend.org.uk flags 4 type A(addr): OK; nrrs=1; cname=$; owner=chiark.greenend.org.uk; ttl=86400 29 | INET 195.224.76.132 30 | chiark.greenend.org.uk flags 4 type NS(+addr): No such data; nrrs=0; cname=$; owner=chiark.greenend.org.uk; ttl=86400 31 | chiark.greenend.org.uk flags 4 type PTR(checked): No such data; nrrs=0; cname=$; owner=chiark.greenend.org.uk; ttl=86400 32 | chiark.greenend.org.uk flags 4 type MX(+addr): OK; nrrs=1; cname=$; owner=chiark.greenend.org.uk; ttl=86400 33 | 5 permutation-city.greenend.org.uk ok 0 ok "OK" ( INET 195.224.76.134 ) 34 | chiark.greenend.org.uk flags 4 type SOA(822): No such data; nrrs=0; cname=$; owner=chiark.greenend.org.uk; ttl=86400 35 | chiark.greenend.org.uk flags 4 type RP(822): No such data; nrrs=0; cname=$; owner=chiark.greenend.org.uk; ttl=86400 36 | rc=0 37 | -------------------------------------------------------------------------------- /regress/case-tcpptr.sys: -------------------------------------------------------------------------------- 1 | adnstest default 2 | :65548 2/6.45.18.172.in-addr.arpa 3 | start 957718868.938329 4 | socket type=SOCK_DGRAM 5 | socket=4 6 | +0.000161 7 | fcntl fd=4 cmd=F_GETFL 8 | fcntl=~O_NONBLOCK&... 9 | +0.000059 10 | fcntl fd=4 cmd=F_SETFL O_NONBLOCK|... 11 | fcntl=OK 12 | +0.000038 13 | socket type=SOCK_STREAM 14 | socket=5 15 | +0.001056 16 | fcntl fd=5 cmd=F_GETFL 17 | fcntl=~O_NONBLOCK&... 18 | +0.000238 19 | fcntl fd=5 cmd=F_SETFL O_NONBLOCK|... 20 | fcntl=OK 21 | +0.000055 22 | connect fd=5 addr=172.18.45.6:53 23 | connect=EINPROGRESS 24 | +0.000723 25 | select max=6 rfds=[4] wfds=[5] efds=[] to=13.997928 26 | select=1 rfds=[] wfds=[5] efds=[] 27 | +0.000536 28 | read fd=5 buflen=1 29 | read=EAGAIN 30 | +0.000118 31 | write fd=5 32 | 002a311f 01000001 00000000 00000136 02343502 31380331 37320769 6e2d6164 33 | 64720461 72706100 000c0001. 34 | write=44 35 | +0.001433 36 | select max=6 rfds=[4,5] wfds=[] efds=[5] to=29.995841 37 | select=1 rfds=[5] wfds=[] efds=[] 38 | +0.000260 39 | read fd=5 buflen=2 40 | read=OK 41 | 00d7. 42 | +0.000302 43 | read fd=5 buflen=215 44 | read=OK 45 | 311f8580 00010001 00030003 01360234 35023138 03313732 07696e2d 61646472 46 | 04617270 6100000c 0001c00c 000c0001 00015180 00250864 6176656e 616e740a 47 | 72656c61 74697669 74790867 7265656e 656e6403 6f726702 756b0002 34350231 48 | 38033137 3207696e 2d616464 72046172 70610000 02000100 01518000 06036e73 49 | 30c03fc0 5b000200 01000151 80000603 6e7331c0 3fc05b00 02000100 01518000 50 | 06036e73 32c03fc0 7d000100 01000151 800004ac 122d06c0 8f000100 01000151 51 | 800004ac 122d41c0 a1000100 01000151 800004ac 122d01. 52 | +0.001364 53 | sendto fd=4 addr=172.18.45.6:53 54 | 31200100 00010000 00000000 08646176 656e616e 740a7265 6c617469 76697479 55 | 08677265 656e656e 64036f72 6702756b 00000100 01. 56 | sendto=EMSGSIZE 57 | +0.000001 58 | write fd=5 59 | 00353120 01000001 00000000 00000864 6176656e 616e740a 72656c61 74697669 60 | 74790867 7265656e 656e6403 6f726702 756b0000 010001. 61 | write=53 62 | +0.001233 63 | read fd=5 buflen=217 64 | read=EAGAIN 65 | +0.000100 66 | select max=6 rfds=[4,5] wfds=[5] efds=[5] to=29.997000 67 | select=1 rfds=[5] wfds=[] efds=[] 68 | +0.000118 69 | read fd=5 buflen=217 70 | read=OK 71 | 00c5 72 | 31208580 00010001 00030003 08646176 656e616e 740a7265 6c617469 76697479 73 | 08677265 656e656e 64036f72 6702756b 00000100 01c00c00 01000100 01518000 74 | 04ac122d 060a7265 6c617469 76697479 08677265 656e656e 64036f72 6702756b 75 | 00000200 01000151 80000603 6e7330c0 45c04500 02000100 01518000 06036e73 76 | 31c045c0 45000200 01000151 80000603 6e7332c0 45c06b00 01000100 01518000 77 | 04ac122d 06c07d00 01000100 01518000 04ac122d 41c08f00 01000100 01518000 78 | 04ac122d 01. 79 | +0.001171 80 | read fd=5 buflen=217 81 | read=EAGAIN 82 | +0.000189 83 | close fd=4 84 | close=OK 85 | +0.000352 86 | close fd=5 87 | close=OK 88 | +0.000507 89 | -------------------------------------------------------------------------------- /regress/r1test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # usage: r1test 3 | # test execution script, for running one test 4 | # 5 | # This file is part of adns, which is 6 | # Copyright (C) 1997-2000,2003,2006 Ian Jackson 7 | # Copyright (C) 1999-2000,2003,2006 Tony Finch 8 | # Copyright (C) 1991 Massachusetts Institute of Technology 9 | # (See the file INSTALL for full details.) 10 | # 11 | # This program is free software; you can redistribute it and/or modify 12 | # it under the terms of the GNU General Public License as published by 13 | # the Free Software Foundation; either version 2, or (at your option) 14 | # any later version. 15 | # 16 | # This program is distributed in the hope that it will be useful, 17 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | # GNU General Public License for more details. 20 | # 21 | # You should have received a copy of the GNU General Public License 22 | # along with this program; if not, write to the Free Software Foundation, 23 | # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 24 | 25 | set -e 26 | mrc=1 27 | trap 'exit $mrc' 0 28 | 29 | if test "x$srcdir" = "x" ; then 30 | srcdir=. 31 | fi 32 | 33 | casename="$1" 34 | case="case-$casename" 35 | ocase="output-$casename" 36 | 37 | exec 4<"$srcdir/$case.sys" 38 | read <&4 program initfile initflags 39 | read <&4 queryargs 40 | 41 | initstring="`cat $srcdir/init-$initfile.text`" 42 | xinitflagsf=$program-xinitflags.text 43 | if test -f $srcdir/$xinitflagsf 44 | then 45 | initflags="$initflags `cat $srcdir/$xinitflagsf`"; 46 | else 47 | initflags="$initflags /" 48 | fi 49 | 50 | rm -f $ocase.* 51 | 52 | EF_DISABLE_BANNER=1 53 | export EF_DISABLE_BANNER 54 | 55 | if test -f "$srcdir/$case.in" 56 | then 57 | exec <"$srcdir/$case.in" 58 | else 59 | exec >"$ocase.report" 4<&4 >"$ocase.out" 2>"$ocase.err" \ 73 | $playback $initflags"$initstring" $queryargs 74 | rc=$? 75 | set -e 76 | 77 | if [ "$rc" = 5 ] 78 | then 79 | printf "SKIPPED-$casename " 80 | mrc=5 81 | exit 82 | fi 83 | 84 | echo "rc=$rc" >>$ocase.out 85 | 86 | failed=false 87 | for part in err out 88 | do 89 | if diff -u -- "$srcdir/$case.$part" "$ocase.$part" 90 | then 91 | : 92 | else 93 | failwhy="$failwhy WRONG OUTPUT" 94 | fi 95 | done 96 | 97 | cat <&4 >"$ocase.leftover" 98 | if egrep . /dev/null "$ocase.leftover" 99 | then 100 | failwhy="$failwhy EXITED EARLY" 101 | fi 102 | 103 | if [ "x$failwhy" != x ] 104 | then 105 | scremain="`wc -l <\"$ocase.leftover\"`" 106 | echo >&2 "FAILED $case -$failwhy - lines of syscall remaining $scremain" 107 | mrc=2 108 | exit 109 | fi 110 | 111 | printf "$casename " 112 | mrc=0 113 | -------------------------------------------------------------------------------- /regress/case-tcpblock.out: -------------------------------------------------------------------------------- 1 | adns debug: using nameserver 172.18.45.2 2 | test.iwj.relativity.greenend.org.uk. flags 2 type 1 A(-) submitted 3 | test.iwj.relativity.greenend.org.uk. flags 2 type 2 NS(raw) submitted 4 | test.iwj.relativity.greenend.org.uk. flags 2 type 5 CNAME(-) submitted 5 | test.iwj.relativity.greenend.org.uk. flags 2 type 6 SOA(raw) submitted 6 | test.iwj.relativity.greenend.org.uk. flags 2 type 12 PTR(raw) submitted 7 | test.iwj.relativity.greenend.org.uk. flags 2 type 13 HINFO(-) submitted 8 | test.iwj.relativity.greenend.org.uk. flags 2 type 15 MX(raw) submitted 9 | test.iwj.relativity.greenend.org.uk. flags 2 type 16 TXT(-) submitted 10 | test.iwj.relativity.greenend.org.uk. flags 2 type 17 RP(raw) submitted 11 | test.iwj.relativity.greenend.org.uk. flags 2 type 65537 A(addr) submitted 12 | test.iwj.relativity.greenend.org.uk. flags 2 type 65538 NS(+addr) submitted 13 | test.iwj.relativity.greenend.org.uk. flags 2 type 65548 PTR(checked) submitted 14 | test.iwj.relativity.greenend.org.uk. flags 2 type 65551 MX(+addr) submitted 15 | test.iwj.relativity.greenend.org.uk. flags 2 type 131078 SOA(822) submitted 16 | test.iwj.relativity.greenend.org.uk. flags 2 type 131089 RP(822) submitted 17 | adns debug: TCP connected (NS=172.18.45.2) 18 | test.iwj.relativity.greenend.org.uk. flags 2 type A(-): DNS query timed out; nrrs=0; cname=$; owner=$; ttl=604770 19 | test.iwj.relativity.greenend.org.uk. flags 2 type NS(raw): DNS query timed out; nrrs=0; cname=$; owner=$; ttl=604770 20 | test.iwj.relativity.greenend.org.uk. flags 2 type CNAME(-): DNS query timed out; nrrs=0; cname=$; owner=$; ttl=604770 21 | test.iwj.relativity.greenend.org.uk. flags 2 type SOA(raw): DNS query timed out; nrrs=0; cname=$; owner=$; ttl=604770 22 | test.iwj.relativity.greenend.org.uk. flags 2 type PTR(raw): DNS query timed out; nrrs=0; cname=$; owner=$; ttl=604770 23 | test.iwj.relativity.greenend.org.uk. flags 2 type HINFO(-): DNS query timed out; nrrs=0; cname=$; owner=$; ttl=604770 24 | test.iwj.relativity.greenend.org.uk. flags 2 type MX(raw): DNS query timed out; nrrs=0; cname=$; owner=$; ttl=604770 25 | test.iwj.relativity.greenend.org.uk. flags 2 type TXT(-): DNS query timed out; nrrs=0; cname=$; owner=$; ttl=604770 26 | test.iwj.relativity.greenend.org.uk. flags 2 type RP(raw): DNS query timed out; nrrs=0; cname=$; owner=$; ttl=604770 27 | test.iwj.relativity.greenend.org.uk. flags 2 type A(addr): DNS query timed out; nrrs=0; cname=$; owner=$; ttl=604770 28 | test.iwj.relativity.greenend.org.uk. flags 2 type NS(+addr): DNS query timed out; nrrs=0; cname=$; owner=$; ttl=604770 29 | test.iwj.relativity.greenend.org.uk. flags 2 type PTR(checked): DNS query timed out; nrrs=0; cname=$; owner=$; ttl=604770 30 | test.iwj.relativity.greenend.org.uk. flags 2 type MX(+addr): DNS query timed out; nrrs=0; cname=$; owner=$; ttl=604770 31 | test.iwj.relativity.greenend.org.uk. flags 2 type SOA(822): DNS query timed out; nrrs=0; cname=$; owner=$; ttl=604770 32 | test.iwj.relativity.greenend.org.uk. flags 2 type RP(822): DNS query timed out; nrrs=0; cname=$; owner=$; ttl=604770 33 | rc=0 34 | -------------------------------------------------------------------------------- /regress/case-adh-cancel3.sys: -------------------------------------------------------------------------------- 1 | ./adnshost default -f 2 | 3 | start 969129578.690081 4 | socket type=SOCK_DGRAM 5 | socket=6 6 | +0.000809 7 | fcntl fd=6 cmd=F_GETFL 8 | fcntl=~O_NONBLOCK&... 9 | +0.000531 10 | fcntl fd=6 cmd=F_SETFL O_NONBLOCK|... 11 | fcntl=OK 12 | +0.000512 13 | select max=7 rfds=[0,6] wfds=[] efds=[] to=null 14 | select=1 rfds=[0] wfds=[] efds=[] 15 | +17.-461569 16 | read fd=0 buflen=40 17 | read=OK 18 | 2d2d6173 796e6368 2d696420 34320a. 19 | +0.000686 20 | select max=7 rfds=[0,6] wfds=[] efds=[] to=null 21 | select=1 rfds=[0] wfds=[] efds=[] 22 | +0.000915 23 | read fd=0 buflen=40 24 | read=OK 25 | 2d692031 37322e33 302e3230 362e3134 0a. 26 | +0.000583 27 | sendto fd=6 addr=172.18.45.6:53 28 | 311f0100 00010000 00000000 02313403 32303602 33300331 37320769 6e2d6164 29 | 64720461 72706100 000c0001. 30 | sendto=44 31 | +0.001629 32 | select max=7 rfds=[0,6] wfds=[] efds=[] to=1.998371 33 | select=1 rfds=[6] wfds=[] efds=[] 34 | +0.000910 35 | recvfrom fd=6 buflen=512 *addrlen=16 36 | recvfrom=OK addr=172.18.45.6:53 37 | 311f8580 00010001 00010001 02313403 32303602 33300331 37320769 6e2d6164 38 | 64720461 72706100 000c0001 c00c000c 00010000 003c002a 06323036 2d31340b 39 | 62726f6b 656e2d7a 6f6e6504 74657374 0763756c 74757265 05646f74 61740261 40 | 74000332 30360233 30033137 3207696e 2d616464 72046172 70610000 02000100 41 | 00003c00 20036e73 300a7265 6c617469 76697479 08677265 656e656e 64036f72 42 | 6702756b 00c08500 01000100 01518000 04ac122d 06. 43 | +0.001417 44 | sendto fd=6 addr=172.18.45.6:53 45 | 31200100 00010000 00000000 06323036 2d31340b 62726f6b 656e2d7a 6f6e6504 46 | 74657374 0763756c 74757265 05646f74 61740261 74000001 0001. 47 | sendto=58 48 | +0.001988 49 | recvfrom fd=6 buflen=512 *addrlen=16 50 | recvfrom=EAGAIN 51 | +0.000537 52 | select max=7 rfds=[0,6] wfds=[] efds=[] to=1.996058 53 | select=0 rfds=[] wfds=[] efds=[] 54 | +2.-05146 55 | select max=7 rfds=[0,6] wfds=[] efds=[] to=0.001204 56 | select=0 rfds=[] wfds=[] efds=[] 57 | +0.009951 58 | sendto fd=6 addr=172.18.45.6:53 59 | 31200100 00010000 00000000 06323036 2d31340b 62726f6b 656e2d7a 6f6e6504 60 | 74657374 0763756c 74757265 05646f74 61740261 74000001 0001. 61 | sendto=58 62 | +0.001141 63 | select max=7 rfds=[0,6] wfds=[] efds=[] to=1.998859 64 | select=1 rfds=[0] wfds=[] efds=[] 65 | +0.551215 66 | read fd=0 buflen=40 67 | read=OK 68 | 2d2d6361 6e63656c 2d696420 34320a. 69 | +0.000599 70 | select max=7 rfds=[0,6] wfds=[] efds=[] to=null 71 | select=1 rfds=[6] wfds=[] efds=[] 72 | +42.-794672 73 | recvfrom fd=6 buflen=512 *addrlen=16 74 | recvfrom=OK addr=172.18.45.6:53 75 | 31208182 00010000 00000000 06323036 2d31340b 62726f6b 656e2d7a 6f6e6504 76 | 74657374 0763756c 74757265 05646f74 61740261 74000001 0001. 77 | +0.000986 78 | recvfrom fd=6 buflen=512 *addrlen=16 79 | recvfrom=EAGAIN 80 | +0.003836 81 | select max=7 rfds=[0,6] wfds=[] efds=[] to=null 82 | select=1 rfds=[0] wfds=[] efds=[] 83 | +6.662470 84 | read fd=0 buflen=40 85 | read=OK 86 | . 87 | +0.000545 88 | close fd=6 89 | close=OK 90 | +0.000686 91 | -------------------------------------------------------------------------------- /regress/case-brokenmail.out: -------------------------------------------------------------------------------- 1 | adns debug: using nameserver 172.18.45.6 2 | broken-mail.test.iwj.relativity.greenend.org.uk. flags 0 type 15 MX(raw) submitted 3 | broken-mail.test.iwj.relativity.greenend.org.uk. flags 0 type 65551 MX(+addr) submitted 4 | broken-mail.test.iwj.relativity.greenend.org.uk. flags 256 type 15 MX(raw) submitted 5 | broken-mail.test.iwj.relativity.greenend.org.uk. flags 256 type 65551 MX(+addr) submitted 6 | broken-mail.test.iwj.relativity.greenend.org.uk. flags 260 type 15 MX(raw) submitted 7 | broken-mail.test.iwj.relativity.greenend.org.uk. flags 260 type 65551 MX(+addr) submitted 8 | broken-mail.test.iwj.relativity.greenend.org.uk. flags 0 type MX(raw): OK; nrrs=4; cname=$; owner=$; ttl=60 9 | 10 manyaddrs.test.iwj.relativity.greenend.org.uk 10 | 20 host.broken-delg.test.iwj.relativity.greenend.org.uk 11 | 30 172.18.45.36 12 | 40 cname-ptr.test.iwj.relativity.greenend.org.uk 13 | broken-mail.test.iwj.relativity.greenend.org.uk. flags 256 type MX(raw): OK; nrrs=4; cname=$; owner=$; ttl=60 14 | 10 manyaddrs.test.iwj.relativity.greenend.org.uk 15 | 20 host.broken-delg.test.iwj.relativity.greenend.org.uk 16 | 30 172.18.45.36 17 | 40 cname-ptr.test.iwj.relativity.greenend.org.uk 18 | broken-mail.test.iwj.relativity.greenend.org.uk. flags 260 type MX(raw): OK; nrrs=4; cname=$; owner=broken-mail.test.iwj.relativity.greenend.org.uk; ttl=60 19 | 10 manyaddrs.test.iwj.relativity.greenend.org.uk 20 | 20 host.broken-delg.test.iwj.relativity.greenend.org.uk 21 | 30 172.18.45.36 22 | 40 cname-ptr.test.iwj.relativity.greenend.org.uk 23 | broken-mail.test.iwj.relativity.greenend.org.uk. flags 0 type MX(+addr): OK; nrrs=4; cname=$; owner=$; ttl=30 24 | 10 manyaddrs.test.iwj.relativity.greenend.org.uk ok 0 ok "OK" ( INET 127.0.0.1 INET 172.18.45.6 INET 172.18.45.1 INET 172.18.45.35 ) 25 | 20 host.broken-delg.test.iwj.relativity.greenend.org.uk remotefail 30 timeout "DNS query timed out" ? 26 | 30 172.18.45.36 permfail 300 nxdomain "No such domain" ( ) 27 | 40 cname-ptr.test.iwj.relativity.greenend.org.uk misconfig 101 prohibitedcname "DNS alias found where canonical name wanted" ( ) 28 | broken-mail.test.iwj.relativity.greenend.org.uk. flags 256 type MX(+addr): OK; nrrs=4; cname=$; owner=$; ttl=30 29 | 10 manyaddrs.test.iwj.relativity.greenend.org.uk ok 0 ok "OK" ( INET 127.0.0.1 INET 172.18.45.6 INET 172.18.45.1 INET 172.18.45.35 ) 30 | 20 host.broken-delg.test.iwj.relativity.greenend.org.uk remotefail 30 timeout "DNS query timed out" ? 31 | 30 172.18.45.36 permfail 300 nxdomain "No such domain" ( ) 32 | 40 cname-ptr.test.iwj.relativity.greenend.org.uk ok 0 ok "OK" ( INET 172.18.45.37 ) 33 | broken-mail.test.iwj.relativity.greenend.org.uk. flags 260 type MX(+addr): OK; nrrs=4; cname=$; owner=broken-mail.test.iwj.relativity.greenend.org.uk; ttl=30 34 | 10 manyaddrs.test.iwj.relativity.greenend.org.uk ok 0 ok "OK" ( INET 127.0.0.1 INET 172.18.45.6 INET 172.18.45.1 INET 172.18.45.35 ) 35 | 20 host.broken-delg.test.iwj.relativity.greenend.org.uk remotefail 30 timeout "DNS query timed out" ? 36 | 30 172.18.45.36 permfail 300 nxdomain "No such domain" ( ) 37 | 40 cname-ptr.test.iwj.relativity.greenend.org.uk ok 0 ok "OK" ( INET 172.18.45.37 ) 38 | rc=0 39 | -------------------------------------------------------------------------------- /regress/case-tcpallfail.out: -------------------------------------------------------------------------------- 1 | adns debug: using nameserver 172.18.45.2 2 | test.iwj.relativity.greenend.org.uk. flags 2 type 1 A(-) submitted 3 | test.iwj.relativity.greenend.org.uk. flags 2 type 2 NS(raw) submitted 4 | test.iwj.relativity.greenend.org.uk. flags 2 type 5 CNAME(-) submitted 5 | test.iwj.relativity.greenend.org.uk. flags 2 type 6 SOA(raw) submitted 6 | test.iwj.relativity.greenend.org.uk. flags 2 type 12 PTR(raw) submitted 7 | test.iwj.relativity.greenend.org.uk. flags 2 type 13 HINFO(-) submitted 8 | test.iwj.relativity.greenend.org.uk. flags 2 type 15 MX(raw) submitted 9 | test.iwj.relativity.greenend.org.uk. flags 2 type 16 TXT(-) submitted 10 | test.iwj.relativity.greenend.org.uk. flags 2 type 17 RP(raw) submitted 11 | test.iwj.relativity.greenend.org.uk. flags 2 type 65537 A(addr) submitted 12 | test.iwj.relativity.greenend.org.uk. flags 2 type 65538 NS(+addr) submitted 13 | test.iwj.relativity.greenend.org.uk. flags 2 type 65548 PTR(checked) submitted 14 | test.iwj.relativity.greenend.org.uk. flags 2 type 65551 MX(+addr) submitted 15 | test.iwj.relativity.greenend.org.uk. flags 2 type 131078 SOA(822) submitted 16 | test.iwj.relativity.greenend.org.uk. flags 2 type 131089 RP(822) submitted 17 | adns warning: TCP connection failed: connect/read: Connection refused (NS=172.18.45.2) 18 | adns warning: TCP connection failed: connect/read: Connection refused (NS=172.18.45.2) 19 | test.iwj.relativity.greenend.org.uk. flags 2 type A(-): All nameservers failed; nrrs=0; cname=$; owner=$; ttl=604800 20 | test.iwj.relativity.greenend.org.uk. flags 2 type NS(raw): All nameservers failed; nrrs=0; cname=$; owner=$; ttl=604800 21 | test.iwj.relativity.greenend.org.uk. flags 2 type CNAME(-): All nameservers failed; nrrs=0; cname=$; owner=$; ttl=604800 22 | test.iwj.relativity.greenend.org.uk. flags 2 type SOA(raw): All nameservers failed; nrrs=0; cname=$; owner=$; ttl=604800 23 | test.iwj.relativity.greenend.org.uk. flags 2 type PTR(raw): All nameservers failed; nrrs=0; cname=$; owner=$; ttl=604800 24 | test.iwj.relativity.greenend.org.uk. flags 2 type HINFO(-): All nameservers failed; nrrs=0; cname=$; owner=$; ttl=604800 25 | test.iwj.relativity.greenend.org.uk. flags 2 type MX(raw): All nameservers failed; nrrs=0; cname=$; owner=$; ttl=604800 26 | test.iwj.relativity.greenend.org.uk. flags 2 type TXT(-): All nameservers failed; nrrs=0; cname=$; owner=$; ttl=604800 27 | test.iwj.relativity.greenend.org.uk. flags 2 type RP(raw): All nameservers failed; nrrs=0; cname=$; owner=$; ttl=604800 28 | test.iwj.relativity.greenend.org.uk. flags 2 type A(addr): All nameservers failed; nrrs=0; cname=$; owner=$; ttl=604800 29 | test.iwj.relativity.greenend.org.uk. flags 2 type NS(+addr): All nameservers failed; nrrs=0; cname=$; owner=$; ttl=604800 30 | test.iwj.relativity.greenend.org.uk. flags 2 type PTR(checked): All nameservers failed; nrrs=0; cname=$; owner=$; ttl=604800 31 | test.iwj.relativity.greenend.org.uk. flags 2 type MX(+addr): All nameservers failed; nrrs=0; cname=$; owner=$; ttl=604800 32 | test.iwj.relativity.greenend.org.uk. flags 2 type SOA(822): All nameservers failed; nrrs=0; cname=$; owner=$; ttl=604800 33 | test.iwj.relativity.greenend.org.uk. flags 2 type RP(822): All nameservers failed; nrrs=0; cname=$; owner=$; ttl=604800 34 | rc=0 35 | -------------------------------------------------------------------------------- /regress/case-quote.out: -------------------------------------------------------------------------------- 1 | adns debug: using nameserver 172.18.45.6 2 | hyphen.cname.test.iwj.relativity.greenend.org.uk flags 0 type 1 A(-) submitted 3 | dot.cname.test.iwj.relativity.greenend.org.uk flags 0 type 1 A(-) submitted 4 | plus.cname.test.iwj.relativity.greenend.org.uk flags 0 type 1 A(-) submitted 5 | slash.cname.test.iwj.relativity.greenend.org.uk flags 0 type 1 A(-) submitted 6 | underscore.cname.test.iwj.relativity.greenend.org.uk flags 0 type 1 A(-) submitted 7 | quote.cname.test.iwj.relativity.greenend.org.uk flags 0 type 1 A(-) submitted 8 | backslash.cname.test.iwj.relativity.greenend.org.uk flags 0 type 1 A(-) submitted 9 | null.cname.test.iwj.relativity.greenend.org.uk flags 0 type 1 A(-) submitted 10 | space.cname.test.iwj.relativity.greenend.org.uk flags 0 type 1 A(-) submitted 11 | hash.cname.test.iwj.relativity.greenend.org.uk flags 0 type 1 A(-) submitted 12 | del.cname.test.iwj.relativity.greenend.org.uk flags 0 type 1 A(-) submitted 13 | meta-null.cname.test.iwj.relativity.greenend.org.uk flags 0 type 1 A(-) submitted 14 | meta-del.cname.test.iwj.relativity.greenend.org.uk flags 0 type 1 A(-) submitted 15 | hyphen.cname.test.iwj.relativity.greenend.org.uk flags 0 type A(-): No such domain; nrrs=0; cname=a-b.cname.test.iwj.relativity.greenend.org.uk; owner=$; ttl=60 16 | dot.cname.test.iwj.relativity.greenend.org.uk flags 0 type A(-): No such domain; nrrs=0; cname=a\.b.cname.test.iwj.relativity.greenend.org.uk; owner=$; ttl=60 17 | plus.cname.test.iwj.relativity.greenend.org.uk flags 0 type A(-): No such domain; nrrs=0; cname=a+b.cname.test.iwj.relativity.greenend.org.uk; owner=$; ttl=60 18 | slash.cname.test.iwj.relativity.greenend.org.uk flags 0 type A(-): No such domain; nrrs=0; cname=a/b.cname.test.iwj.relativity.greenend.org.uk; owner=$; ttl=60 19 | underscore.cname.test.iwj.relativity.greenend.org.uk flags 0 type A(-): No such domain; nrrs=0; cname=a_b.cname.test.iwj.relativity.greenend.org.uk; owner=$; ttl=60 20 | quote.cname.test.iwj.relativity.greenend.org.uk flags 0 type A(-): No such domain; nrrs=0; cname=a\"b.cname.test.iwj.relativity.greenend.org.uk; owner=$; ttl=60 21 | backslash.cname.test.iwj.relativity.greenend.org.uk flags 0 type A(-): No such domain; nrrs=0; cname=a\\b.cname.test.iwj.relativity.greenend.org.uk; owner=$; ttl=60 22 | null.cname.test.iwj.relativity.greenend.org.uk flags 0 type A(-): No such domain; nrrs=0; cname=a\000b.cname.test.iwj.relativity.greenend.org.uk; owner=$; ttl=60 23 | space.cname.test.iwj.relativity.greenend.org.uk flags 0 type A(-): No such domain; nrrs=0; cname=a\040b.cname.test.iwj.relativity.greenend.org.uk; owner=$; ttl=60 24 | hash.cname.test.iwj.relativity.greenend.org.uk flags 0 type A(-): No such domain; nrrs=0; cname=a\#b.cname.test.iwj.relativity.greenend.org.uk; owner=$; ttl=60 25 | del.cname.test.iwj.relativity.greenend.org.uk flags 0 type A(-): No such domain; nrrs=0; cname=a\177b.cname.test.iwj.relativity.greenend.org.uk; owner=$; ttl=60 26 | meta-null.cname.test.iwj.relativity.greenend.org.uk flags 0 type A(-): No such domain; nrrs=0; cname=a\310b.cname.test.iwj.relativity.greenend.org.uk; owner=$; ttl=60 27 | meta-del.cname.test.iwj.relativity.greenend.org.uk flags 0 type A(-): No such domain; nrrs=0; cname=a\377b.cname.test.iwj.relativity.greenend.org.uk; owner=$; ttl=60 28 | rc=0 29 | -------------------------------------------------------------------------------- /regress/case-tcpblockbrk.out: -------------------------------------------------------------------------------- 1 | adns debug: using nameserver 172.18.45.2 2 | test.iwj.relativity.greenend.org.uk. flags 2 type 1 A(-) submitted 3 | test.iwj.relativity.greenend.org.uk. flags 2 type 2 NS(raw) submitted 4 | test.iwj.relativity.greenend.org.uk. flags 2 type 5 CNAME(-) submitted 5 | test.iwj.relativity.greenend.org.uk. flags 2 type 6 SOA(raw) submitted 6 | test.iwj.relativity.greenend.org.uk. flags 2 type 12 PTR(raw) submitted 7 | test.iwj.relativity.greenend.org.uk. flags 2 type 13 HINFO(-) submitted 8 | test.iwj.relativity.greenend.org.uk. flags 2 type 15 MX(raw) submitted 9 | test.iwj.relativity.greenend.org.uk. flags 2 type 16 TXT(-) submitted 10 | test.iwj.relativity.greenend.org.uk. flags 2 type 17 RP(raw) submitted 11 | test.iwj.relativity.greenend.org.uk. flags 2 type 65537 A(addr) submitted 12 | test.iwj.relativity.greenend.org.uk. flags 2 type 65538 NS(+addr) submitted 13 | test.iwj.relativity.greenend.org.uk. flags 2 type 65548 PTR(checked) submitted 14 | test.iwj.relativity.greenend.org.uk. flags 2 type 65551 MX(+addr) submitted 15 | test.iwj.relativity.greenend.org.uk. flags 2 type 131078 SOA(822) submitted 16 | test.iwj.relativity.greenend.org.uk. flags 2 type 131089 RP(822) submitted 17 | adns debug: TCP connected (NS=172.18.45.2) 18 | adns warning: TCP connection failed: read: Connection reset by peer (NS=172.18.45.2) 19 | adns warning: TCP connection failed: connect/read: Connection refused (NS=172.18.45.2) 20 | test.iwj.relativity.greenend.org.uk. flags 2 type A(-): All nameservers failed; nrrs=0; cname=$; owner=$; ttl=604798 21 | test.iwj.relativity.greenend.org.uk. flags 2 type NS(raw): All nameservers failed; nrrs=0; cname=$; owner=$; ttl=604798 22 | test.iwj.relativity.greenend.org.uk. flags 2 type CNAME(-): All nameservers failed; nrrs=0; cname=$; owner=$; ttl=604798 23 | test.iwj.relativity.greenend.org.uk. flags 2 type SOA(raw): All nameservers failed; nrrs=0; cname=$; owner=$; ttl=604798 24 | test.iwj.relativity.greenend.org.uk. flags 2 type PTR(raw): All nameservers failed; nrrs=0; cname=$; owner=$; ttl=604798 25 | test.iwj.relativity.greenend.org.uk. flags 2 type HINFO(-): All nameservers failed; nrrs=0; cname=$; owner=$; ttl=604798 26 | test.iwj.relativity.greenend.org.uk. flags 2 type MX(raw): All nameservers failed; nrrs=0; cname=$; owner=$; ttl=604798 27 | test.iwj.relativity.greenend.org.uk. flags 2 type TXT(-): All nameservers failed; nrrs=0; cname=$; owner=$; ttl=604798 28 | test.iwj.relativity.greenend.org.uk. flags 2 type RP(raw): All nameservers failed; nrrs=0; cname=$; owner=$; ttl=604798 29 | test.iwj.relativity.greenend.org.uk. flags 2 type A(addr): All nameservers failed; nrrs=0; cname=$; owner=$; ttl=604798 30 | test.iwj.relativity.greenend.org.uk. flags 2 type NS(+addr): All nameservers failed; nrrs=0; cname=$; owner=$; ttl=604798 31 | test.iwj.relativity.greenend.org.uk. flags 2 type PTR(checked): All nameservers failed; nrrs=0; cname=$; owner=$; ttl=604798 32 | test.iwj.relativity.greenend.org.uk. flags 2 type MX(+addr): All nameservers failed; nrrs=0; cname=$; owner=$; ttl=604798 33 | test.iwj.relativity.greenend.org.uk. flags 2 type SOA(822): All nameservers failed; nrrs=0; cname=$; owner=$; ttl=604798 34 | test.iwj.relativity.greenend.org.uk. flags 2 type RP(822): All nameservers failed; nrrs=0; cname=$; owner=$; ttl=604798 35 | rc=0 36 | -------------------------------------------------------------------------------- /regress/case-norecurse.out: -------------------------------------------------------------------------------- 1 | adns debug: using nameserver 172.18.45.6 2 | 4.204.50.158.in-addr.arpa flags 0 type 1 A(-) submitted 3 | 4.204.50.158.in-addr.arpa flags 0 type 2 NS(raw) submitted 4 | 4.204.50.158.in-addr.arpa flags 0 type 5 CNAME(-) submitted 5 | 4.204.50.158.in-addr.arpa flags 0 type 6 SOA(raw) submitted 6 | 4.204.50.158.in-addr.arpa flags 0 type 12 PTR(raw) submitted 7 | 4.204.50.158.in-addr.arpa flags 0 type 13adns debug: TCP connected (NS=172.18.45.6) 8 | HINFO(-) submitted 9 | 4.204.50.158.in-addr.arpa flags 0 type 15 MX(raw) submitted 10 | 4.204.50.158.in-addr.arpa flags 0 type 16 TXT(-) submitted 11 | 4.204.50.158.in-addr.arpa flags 0 type 17 RP(raw) submitted 12 | 4.204.50.158.in-addr.arpa flags 0 type 65537 A(addr) submitted 13 | 4.204.50.158.in-addr.arpa flags 0 type 65538 NS(+addr) submitted 14 | 4.204.50.158.in-addr.arpa flags 0 type 65548 PTR(checked) submitted 15 | 4.204.50.158.in-addr.arpa flags 0 type 65551 MX(+addr) submitted 16 | 4.204.50.158.in-addr.arpa flags 0 type 131078 SOA(822) submitted 17 | 4.204.50.158.in-addr.arpa flags 0 type 131089adns debug: reply not found, id 3141, query owner ns2.afpdoc.com (NS=172.18.45.6) 18 | adns debug: reply not found, id 3142, query owner ns2.afp-notes.com (NS=172.18.45.6) 19 | adns debug: reply not found, id 3143, query owner ns2.afp-domino.com (NS=172.18.45.6) 20 | RP(822) submitted 21 | 4.204.50.158.in-addr.arpa flags 0 type A(-): No such data; nrrs=0; cname=$; owner=$; ttl=0 22 | 4.204.50.158.in-addr.arpa flags 0 type NS(raw): No such data; nrrs=0; cname=$; owner=$; ttl=0 23 | 4.204.50.158.in-addr.arpa flags 0 type SOA(raw): No such data; nrrs=0; cname=$; owner=$; ttl=0 24 | 4.204.50.158.in-addr.arpa flags 0 type HINFO(-): No such data; nrrs=0; cname=$; owner=$; ttl=0 25 | 4.204.50.158.in-addr.arpa flags 0 type MX(raw): No such data; nrrs=0; cname=$; owner=$; ttl=0 26 | 4.204.50.158.in-addr.arpa flags 0 type PTR(raw): OK; nrrs=23; cname=$; owner=$; ttl=77948 27 | ns2.afp.com 28 | ns.afp.com 29 | news.afp.com 30 | ns2.afp.fr 31 | ns.afp.fr 32 | news.afp.fr 33 | ns2.agencefrancepresse.com 34 | news.agencefrancepresse.com 35 | ns2.agencefrancepresse.fr 36 | news.agencefrancepresse.fr 37 | ns2.agencefrance-presse.com 38 | news.agencefrance-presse.com 39 | ns2.agencefrance-presse.fr 40 | news.agencefrance-presse.fr 41 | ns2.imageforum.com 42 | news.imageforum.com 43 | ns2.imageforum.tm.fr 44 | news.imageforum.tm.fr 45 | ns2.ooh-lah-lah.com 46 | ns2.afpsciences.com 47 | ns2.afpdoc.com 48 | ns2.afp-notes.com 49 | ns2.afp-domino.com 50 | 4.204.50.158.in-addr.arpa flags 0 type TXT(-): No such data; nrrs=0; cname=$; owner=$; ttl=0 51 | 4.204.50.158.in-addr.arpa flags 0 type RP(raw): No such data; nrrs=0; cname=$; owner=$; ttl=0 52 | 4.204.50.158.in-addr.arpa flags 0 type A(addr): No such data; nrrs=0; cname=$; owner=$; ttl=0 53 | 4.204.50.158.in-addr.arpa flags 0 type NS(+addr): No such data; nrrs=0; cname=$; owner=$; ttl=0 54 | 4.204.50.158.in-addr.arpa flags 0 type MX(+addr): No such data; nrrs=0; cname=$; owner=$; ttl=0 55 | 4.204.50.158.in-addr.arpa flags 0 type SOA(822): No such data; nrrs=0; cname=$; owner=$; ttl=0 56 | 4.204.50.158.in-addr.arpa flags 0 type PTR(checked): Inconsistent resource records in DNS; nrrs=0; cname=$; owner=$; ttl=77948 57 | 4.204.50.158.in-addr.arpa flags 0 type RP(822): No such data; nrrs=0; cname=$; owner=$; ttl=0 58 | 4.204.50.158.in-addr.arpa flags 0 type CNAME(-): No such data; nrrs=0; cname=$; owner=$; ttl=0 59 | rc=0 60 | -------------------------------------------------------------------------------- /regress/case-norecurse2.out: -------------------------------------------------------------------------------- 1 | adns debug: using nameserver 172.18.45.6 2 | 4.204.50.158.in-addr.arpa flags 0 type 1 A(-) submitted 3 | 4.204.50.158.in-addr.arpa flags 0 type 2 NS(raw) submitted 4 | 4.204.50.158.in-addr.arpa flags 0 type 5 CNAME(-) submitted 5 | 4.204.50.158.in-addr.arpa flags 0 type 6 SOA(raw) submitted 6 | 4.204.50.158.in-addr.arpa flags 0 type 12 PTR(raw) submitted 7 | 4.204.50.158.in-addr.arpa flags 0 type 13 HINFO(-) submitted 8 | 4.204.50.158.in-addr.arpa flags 0 type 15 MX(raw) submitted 9 | 4.204.50.158.in-addr.arpa flags 0 type 16 TXT(-) submitted 10 | 4.204.50.158.in-addr.arpa flags 0 type 17 RP(raw) submitted 11 | 4.204.50.158.in-addr.arpa flags 0 type 65537 A(addr) submitted 12 | 4.204.50.158.in-addr.arpa flags 0 type 65538 NS(+addr) submitted 13 | 4.204.50.158.in-addr.arpa flags 0 type 65548 PTR(checked) submitted 14 | 4.204.50.158.in-addr.arpa flags 0 type 65551 MX(+addr) submitted 15 | 4.204.50.158.in-addr.arpa flags 0 type 131078 SOA(822) submitted 16 | 4.204.50.158.in-addr.arpa flags 0 type 131089 RP(822) submitted 17 | 4.204.50.158.in-addr.arpa flags 0 type SOA(raw): No such data; nrrs=0; cname=$; owner=$; ttl=0 18 | 4.204.50.158.in-addr.arpa flags 0 type HINFO(-): No such data; nrrs=0; cname=$; owner=$; ttl=0 19 | 4.204.50.158.in-addr.arpa flags 0 type MX(raw): No such data; nrrs=0; cname=$; owner=$; ttl=0 20 | 4.204.50.158.in-addr.arpa flags 0 type TXT(-): No such data; nrrs=0; cname=$; owner=$; ttl=0 21 | 4.204.50.158.in-addr.arpa flags 0 type MX(+addr): No such data; nrrs=0; cname=$; owner=$; ttl=0 22 | 4.204.50.158.in-addr.arpa flags 0 type A(addr): No such data; nrrs=0; cname=$; owner=$; ttl=0 23 | 4.204.50.158.in-addr.arpa flags 0 type NS(+addr): No such data; nrrs=0; cname=$; owner=$; ttl=0 24 | 4.204.50.158.in-addr.arpa flags 0 type RP(822): No such data; nrrs=0; cname=$; owner=$; ttl=0 25 | 4.204.50.158.in-addr.arpa flags 0 type A(-): No such data; nrrs=0; cname=$; owner=$; ttl=0 26 | 4.204.50.158.in-addr.arpa flags 0 type NS(raw): No such data; nrrs=0; cname=$; owner=$; ttl=0 27 | 4.204.50.158.in-addr.arpa flags 0 type SOA(822): No such data; nrrs=0; cname=$; owner=$; ttl=0 28 | adns debug: reply not found, id 312c, query owner 4.204.50.158.in-addr.arpa (NS=172.18.45.6) 29 | adns debug: reply not found, id 311f, query owner 4.204.50.158.in-addr.arpa (NS=172.18.45.6) 30 | adns debug: reply not found, id 3120, query owner 4.204.50.158.in-addr.arpa (NS=172.18.45.6) 31 | adns debug: reply not found, id 312a, query owner 4.204.50.158.in-addr.arpa (NS=172.18.45.6) 32 | 4.204.50.158.in-addr.arpa flags 0 type RP(raw): No such data; nrrs=0; cname=$; owner=$; ttl=0 33 | 4.204.50.158.in-addr.arpa flags 0 type CNAME(-): No such data; nrrs=0; cname=$; owner=$; ttl=0 34 | adns debug: TCP connected (NS=172.18.45.6) 35 | 4.204.50.158.in-addr.arpa flags 0 type PTR(raw): OK; nrrs=23; cname=$; owner=$; ttl=0 36 | ns2.afp.com 37 | ns.afp.com 38 | news.afp.com 39 | ns2.afp.fr 40 | ns.afp.fr 41 | news.afp.fr 42 | ns2.agencefrancepresse.com 43 | news.agencefrancepresse.com 44 | ns2.agencefrancepresse.fr 45 | news.agencefrancepresse.fr 46 | ns2.agencefrance-presse.com 47 | news.agencefrance-presse.com 48 | ns2.agencefrance-presse.fr 49 | news.agencefrance-presse.fr 50 | ns2.imageforum.com 51 | news.imageforum.com 52 | ns2.imageforum.tm.fr 53 | news.imageforum.tm.fr 54 | ns2.ooh-lah-lah.com 55 | ns2.afpsciences.com 56 | ns2.afpdoc.com 57 | ns2.afp-notes.com 58 | ns2.afp-domino.com 59 | 4.204.50.158.in-addr.arpa flags 0 type PTR(checked): Inconsistent resource records in DNS; nrrs=0; cname=$; owner=$; ttl=-6 60 | rc=0 61 | -------------------------------------------------------------------------------- /src/Makefile.am: -------------------------------------------------------------------------------- 1 | # src/Makefile.am 2 | # Copyright (C) 2008 g10 Code GmbH 3 | # 4 | # This file is part of adns, which is 5 | # Copyright (C) 1997-2000,2003,2006 Ian Jackson 6 | # Copyright (C) 1999-2000,2003,2006 Tony Finch 7 | # Copyright (C) 1991 Massachusetts Institute of Technology 8 | # (See the file INSTALL for full details.) 9 | # 10 | # This program is free software; you can redistribute it and/or modify 11 | # it under the terms of the GNU General Public License as published by 12 | # the Free Software Foundation; either version 2, or (at your option) 13 | # any later version. 14 | # 15 | # This program is distributed in the hope that it will be useful, 16 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | # GNU General Public License for more details. 19 | # 20 | # You should have received a copy of the GNU General Public License 21 | # along with this program; if not, see . 22 | 23 | ## Process this file with automake to produce Makefile.in 24 | 25 | EXTRA_DIST = adns-config.in libadns.vers libadns.def versioninfo.rc.in \ 26 | w32support.c w32extra.c w32inet.c 27 | bin_SCRIPTS = adns-config 28 | include_HEADERS = adns.h 29 | lib_LTLIBRARIES = libadns.la 30 | 31 | AM_CPPFLAGS=$(PLATFORMCPPFLAGS) 32 | 33 | if HAVE_LD_VERSION_SCRIPT 34 | adns_version_script_cmd = -Wl,--version-script=$(srcdir)/libadns.vers 35 | else 36 | adns_version_script_cmd = 37 | endif 38 | 39 | 40 | if HAVE_W32_SYSTEM 41 | LTRCCOMPILE = $(LIBTOOL) --mode=compile $(RC) \ 42 | `echo $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) | \ 43 | sed -e 's/-I/--include-dir /g;s/-D/--define /g'` 44 | 45 | .rc.lo: 46 | $(LTRCCOMPILE) -i $< -o $@ 47 | 48 | adns_res = versioninfo.lo 49 | adns_res_ldflag = -Wl,.libs/versioninfo.o 50 | no_undefined = -no-undefined 51 | export_symbols = -export-symbols $(srcdir)/libadns.def 52 | extra_ltoptions = -XCClinker -static-libgcc 53 | adns_deps = $(ksba_res) libadns.def 54 | w32src = w32support.c w32extra.c w32inet.c 55 | 56 | install-def-file: 57 | $(INSTALL) $(srcdir)/libadns.def $(DESTDIR)$(libdir)/libadns.def 58 | 59 | uninstall-def-file: 60 | -rm $(DESTDIR)$(libdir)/libadns.def 61 | 62 | else !HAVE_W32_SYSTEM 63 | adns_res = 64 | adns_ldflag = 65 | no_undefined = 66 | export_symbols = 67 | extra_ltoptions = 68 | adns_deps = 69 | w32src = 70 | install-def-file: 71 | uninstall-def-file: 72 | endif !HAVE_W32_SYSTEM 73 | 74 | 75 | libadns_la_LDFLAGS = $(no_undefined) $(export_symbols) $(extra_ltoptions) \ 76 | $(adns_version_script_cmd) -version-info \ 77 | @ADNS_LT_CURRENT@:@ADNS_LT_REVISION@:@ADNS_LT_AGE@ 78 | libadns_la_DEPENDENCIES = $(srcdir)/libadns.vers $(adns_deps) 79 | libadns_la_LIBADD = @LTLIBOBJS@ $(NETLIBS) 80 | 81 | # NOTE: The list of these files is also used in ../regress. 82 | adnssources = \ 83 | adns.h \ 84 | internal.h \ 85 | dlist.h \ 86 | tvarith.h \ 87 | platform.h \ 88 | types.c \ 89 | event.c \ 90 | query.c \ 91 | reply.c \ 92 | general.c \ 93 | vbuf.c \ 94 | setup.c \ 95 | transmit.c \ 96 | parse.c \ 97 | poll.c \ 98 | check.c 99 | 100 | libadns_la_SOURCES = $(adnssources) $(w32src) 101 | 102 | 103 | install-data-local: install-def-file 104 | 105 | uninstall-local: uninstall-def-file 106 | 107 | 108 | -------------------------------------------------------------------------------- /regress/case-rootquery.sys: -------------------------------------------------------------------------------- 1 | adnstest default 2 | :131078 . 1/. 3 | start 924364442.672925 4 | socket type=SOCK_DGRAM 5 | socket=4 6 | +0.000222 7 | fcntl fd=4 cmd=F_GETFL 8 | fcntl=~O_NONBLOCK&... 9 | +0.000085 10 | fcntl fd=4 cmd=F_SETFL O_NONBLOCK|... 11 | fcntl=OK 12 | +0.000069 13 | sendto fd=4 addr=172.18.45.6:53 14 | 311f0100 00010000 00000000 00000600 01. 15 | sendto=17 16 | +0.001781 17 | sendto fd=4 addr=172.18.45.6:53 18 | 31200100 00010000 00000000 00000600 01. 19 | sendto=17 20 | +0.001194 21 | select max=5 rfds=[4] wfds=[] efds=[] to=1.997025 22 | select=1 rfds=[4] wfds=[] efds=[] 23 | +0.012535 24 | recvfrom fd=4 buflen=512 *addrlen=16 25 | recvfrom=OK addr=172.18.45.6:53 26 | 311f8180 00010001 000d000d 00000600 01000006 00010000 eb3e003e 01410c52 27 | 4f4f542d 53455256 45525303 4e455400 0a686f73 746d6173 74657208 494e5445 28 | 524e4943 c02b7726 f4400000 07080000 03840009 3a800001 51800000 02000100 29 | 04a9e700 040144c0 1e000002 00010004 a9e70004 0145c01e 00000200 010004a9 30 | e7000401 49c01e00 00020001 0004a9e7 00040146 c01e0000 02000100 04a9e700 31 | 040147c0 1e000002 00010004 a9e70004 014ac01e 00000200 010004a9 e7000401 32 | 4bc01e00 00020001 0004a9e7 0004014c c01e0000 02000100 04a9e700 04014dc0 33 | 1e000002 00010004 a9e70002 c01c0000 02000100 04a9e700 040148c0 1e000002 34 | 00010004 a9e70004 0142c01e 00000200 010004a9 e7000401 43c01ec0 65000100 35 | 01000929 a8000480 080a5ac0 74000100 01000929 a80004c0 cbe60ac0 83000100 36 | 0100092c 170004c0 249411c0 92000100 01000929 a80004c0 0505f1c0 a1000100 37 | 01000929 a80004c0 702404c0 b0000100 010005fb 670004c6 29000ac0 bf000100 38 | 010005fb 670004c1 000e81c0 ce000100 010005fb 670004c6 20400cc0 dd000100 39 | 010005fb 670004ca 0c1b21c0 1c000100 01000929 a80004c6 290004c0 f9000100 40 | 01000929 a8000480 3f0235c1 08000100 01000929 a8000480 09006bc1 17000100 41 | 01000929 a80004c0 21040c. 42 | +0.002867 43 | recvfrom fd=4 buflen=512 *addrlen=16 44 | recvfrom=EAGAIN 45 | +0.000463 46 | select max=5 rfds=[4] wfds=[] efds=[] to=1.982941 47 | select=1 rfds=[4] wfds=[] efds=[] 48 | +0.008221 49 | recvfrom fd=4 buflen=512 *addrlen=16 50 | recvfrom=OK addr=172.18.45.6:53 51 | 31208180 00010001 000d000d 00000600 01000006 00010000 df7a003e 01410c52 52 | 4f4f542d 53455256 45525303 4e455400 0a686f73 746d6173 74657208 494e5445 53 | 524e4943 c02b7726 f4400000 07080000 03840009 3a800001 51800000 02000100 54 | 04a9e700 040144c0 1e000002 00010004 a9e70004 0145c01e 00000200 010004a9 55 | e7000401 49c01e00 00020001 0004a9e7 00040146 c01e0000 02000100 04a9e700 56 | 040147c0 1e000002 00010004 a9e70004 014ac01e 00000200 010004a9 e7000401 57 | 4bc01e00 00020001 0004a9e7 0004014c c01e0000 02000100 04a9e700 04014dc0 58 | 1e000002 00010004 a9e70002 c01c0000 02000100 04a9e700 040148c0 1e000002 59 | 00010004 a9e70004 0142c01e 00000200 010004a9 e7000401 43c01ec0 65000100 60 | 01000929 a8000480 080a5ac0 74000100 01000929 a80004c0 cbe60ac0 83000100 61 | 0100092c 170004c0 249411c0 92000100 01000929 a80004c0 0505f1c0 a1000100 62 | 01000929 a80004c0 702404c0 b0000100 010005fb 670004c6 29000ac0 bf000100 63 | 010005fb 670004c1 000e81c0 ce000100 010005fb 670004c6 20400cc0 dd000100 64 | 010005fb 670004ca 0c1b21c0 1c000100 01000929 a80004c6 290004c0 f9000100 65 | 01000929 a8000480 3f0235c1 08000100 01000929 a8000480 09006bc1 17000100 66 | 01000929 a80004c0 21040c. 67 | +0.002425 68 | recvfrom fd=4 buflen=512 *addrlen=16 69 | recvfrom=EAGAIN 70 | +0.000260 71 | close fd=4 72 | close=OK 73 | +0.000232 74 | -------------------------------------------------------------------------------- /regress/case-tcpbreakin.sys: -------------------------------------------------------------------------------- 1 | adnstest default 2 | :65548 2/6.45.18.172.in-addr.arpa 3 | start 957718868.938329 4 | socket type=SOCK_DGRAM 5 | socket=4 6 | +0.000161 7 | fcntl fd=4 cmd=F_GETFL 8 | fcntl=~O_NONBLOCK&... 9 | +0.000059 10 | fcntl fd=4 cmd=F_SETFL O_NONBLOCK|... 11 | fcntl=OK 12 | +0.000038 13 | socket type=SOCK_STREAM 14 | socket=5 15 | +0.001056 16 | fcntl fd=5 cmd=F_GETFL 17 | fcntl=~O_NONBLOCK&... 18 | +0.000238 19 | fcntl fd=5 cmd=F_SETFL O_NONBLOCK|... 20 | fcntl=OK 21 | +0.000055 22 | connect fd=5 addr=172.18.45.6:53 23 | connect=EINPROGRESS 24 | +0.000723 25 | select max=6 rfds=[4] wfds=[5] efds=[] to=13.997928 26 | select=1 rfds=[] wfds=[5] efds=[] 27 | +0.000536 28 | read fd=5 buflen=1 29 | read=EAGAIN 30 | +0.000118 31 | write fd=5 32 | 002a311f 01000001 00000000 00000136 02343502 31380331 37320769 6e2d6164 33 | 64720461 72706100 000c0001. 34 | write=44 35 | +0.001433 36 | select max=6 rfds=[4,5] wfds=[] efds=[5] to=29.995841 37 | select=1 rfds=[5] wfds=[] efds=[] 38 | +0.000260 39 | read fd=5 buflen=2 40 | read=OK 41 | 00d7. 42 | +0.000302 43 | read fd=5 buflen=215 44 | read=OK 45 | 311f8580 00010001 00030003 01360234 35023138 03313732 07696e2d 61646472 46 | 04617270 6100000c 0001c00c 000c0001 00015180 00250864 6176656e 616e740a 47 | 72656c61 74697669 74790867 7265656e 656e6403 6f726702 756b0002 34350231 48 | 38033137 3207696e 2d616464 72046172 70610000 02000100 01518000 06036e73 49 | 30c03fc0 5b000200 01000151 80000603 6e7331c0 3fc05b00 02000100 01518000 50 | 06036e73 32c03fc0 7d000100 01000151 800004ac 122d06c0 8f000100 01000151 51 | 800004ac 122d41c0 a1000100 01000151 800004ac 122d01. 52 | +0.001364 53 | sendto fd=4 addr=172.18.45.6:53 54 | 31200100 00010000 00000000 08646176 656e616e 740a7265 6c617469 76697479 55 | 08677265 656e656e 64036f72 6702756b 00000100 01. 56 | sendto=EMSGSIZE 57 | +0.000001 58 | write fd=5 59 | 00353120 01000001 00000000 00000864 6176656e 616e740a 72656c61 74697669 60 | 74790867 7265656e 656e6403 6f726702 756b0000 010001. 61 | write=EPIPE 62 | +0.001233 63 | close fd=5 64 | close=OK 65 | +0.000001 66 | select max=5 rfds=[4] wfds=[] efds=[] to=0.000000 67 | select=1 rfds=[] wfds=[] efds=[] 68 | +0.000118 69 | socket type=SOCK_STREAM 70 | socket=5 71 | +0.001056 72 | fcntl fd=5 cmd=F_GETFL 73 | fcntl=~O_NONBLOCK&... 74 | +0.000238 75 | fcntl fd=5 cmd=F_SETFL O_NONBLOCK|... 76 | fcntl=OK 77 | +0.000055 78 | connect fd=5 addr=172.18.45.6:53 79 | connect=EINPROGRESS 80 | +0.000723 81 | select max=6 rfds=[4] wfds=[5] efds=[] to=13.997928 82 | select=1 rfds=[] wfds=[5] efds=[] 83 | +0.000536 84 | read fd=5 buflen=1 85 | read=EAGAIN 86 | +0.000723 87 | write fd=5 88 | 00353120 01000001 00000000 00000864 6176656e 616e740a 72656c61 74697669 89 | 74790867 7265656e 656e6403 6f726702 756b0000 010001. 90 | write=44 91 | +0.000001 92 | select max=6 rfds=[4,5] wfds=[5] efds=[5] to=29.993649 93 | select=1 rfds=[5] wfds=[] efds=[] 94 | +0.000260 95 | read fd=5 buflen=217 96 | read=OK 97 | 00c5 98 | 31208580 00010001 00030003 08646176 656e616e 740a7265 6c617469 76697479 99 | 08677265 656e656e 64036f72 6702756b 00000100 01c00c00 01000100 01518000 100 | 04ac122d 060a7265 6c617469 76697479 08677265 656e656e 64036f72 6702756b 101 | 00000200 01000151 80000603 6e7330c0 45c04500 02000100 01518000 06036e73 102 | 31c045c0 45000200 01000151 80000603 6e7332c0 45c06b00 01000100 01518000 103 | 04ac122d 06c07d00 01000100 01518000 04ac122d 41c08f00 01000100 01518000 104 | 04ac122d 01. 105 | +0.001171 106 | read fd=5 buflen=217 107 | read=EAGAIN 108 | +0.000189 109 | close fd=4 110 | close=OK 111 | +0.000352 112 | close fd=5 113 | close=OK 114 | +0.000507 115 | -------------------------------------------------------------------------------- /regress/case-tcpblock.sys: -------------------------------------------------------------------------------- 1 | adnstest anarres 2 | 2/test.iwj.relativity.greenend.org.uk. 3 | start 962142246.340485 4 | socket type=SOCK_DGRAM 5 | socket=4 6 | +0.000126 7 | fcntl fd=4 cmd=F_GETFL 8 | fcntl=~O_NONBLOCK&... 9 | +0.000052 10 | fcntl fd=4 cmd=F_SETFL O_NONBLOCK|... 11 | fcntl=OK 12 | +0.000035 13 | socket type=SOCK_STREAM 14 | socket=5 15 | +0.000459 16 | fcntl fd=5 cmd=F_GETFL 17 | fcntl=~O_NONBLOCK&... 18 | +0.000036 19 | fcntl fd=5 cmd=F_SETFL O_NONBLOCK|... 20 | fcntl=OK 21 | +0.000031 22 | connect fd=5 addr=172.18.45.2:53 23 | connect=EINPROGRESS 24 | +0.000184 25 | select max=6 rfds=[4] wfds=[5] efds=[] to=13.999290 26 | select=1 rfds=[] wfds=[5] efds=[] 27 | +0.000937 28 | read fd=5 buflen=1 29 | read=EAGAIN 30 | +0.000090 31 | write fd=5 32 | 0035311f 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669 33 | 74790867 7265656e 656e6403 6f726702 756b0000 010001. 34 | write=55 35 | +0.000427 36 | write fd=5 37 | 00353120 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669 38 | 74790867 7265656e 656e6403 6f726702 756b0000 020001. 39 | write=55 40 | +0.000271 41 | write fd=5 42 | 00353121 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669 43 | 74790867 7265656e 656e6403 6f726702 756b0000 050001. 44 | write=55 45 | +0.000429 46 | write fd=5 47 | 00353122 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669 48 | 74790867 7265656e 656e6403 6f726702 756b0000 060001. 49 | write=55 50 | +0.000218 51 | write fd=5 52 | 00353123 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669 53 | 74790867 7265656e 656e6403 6f726702 756b0000 0c0001. 54 | write=55 55 | +0.000212 56 | write fd=5 57 | 00353124 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669 58 | 74790867 7265656e 656e6403 6f726702 756b0000 0d0001. 59 | write=55 60 | +0.000213 61 | write fd=5 62 | 00353125 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669 63 | 74790867 7265656e 656e6403 6f726702 756b0000 0f0001. 64 | write=55 65 | +0.000212 66 | write fd=5 67 | 00353126 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669 68 | 74790867 7265656e 656e6403 6f726702 756b0000 100001. 69 | write=55 70 | +0.000214 71 | write fd=5 72 | 00353127 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669 73 | 74790867 7265656e 656e6403 6f726702 756b0000 110001. 74 | write=55 75 | +0.000494 76 | write fd=5 77 | 00353128 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669 78 | 74790867 7265656e 656e6403 6f726702 756b0000 010001. 79 | write=55 80 | +0.000239 81 | write fd=5 82 | 00353129 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669 83 | 74790867 7265656e 656e6403 6f726702 756b0000 020001. 84 | write=55 85 | +0.000212 86 | write fd=5 87 | 0035312a 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669 88 | 74790867 7265656e 656e6403 6f726702 756b0000 0c0001. 89 | write=55 90 | +0.000213 91 | write fd=5 92 | 0035312b 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669 93 | 74790867 7265656e 656e6403 6f726702 756b0000 0f0001. 94 | write=55 95 | +0.000213 96 | write fd=5 97 | 0035312c 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669 98 | 74790867 7265656e 656e6403 6f726702 756b0000 060001. 99 | write=55 100 | +0.000215 101 | write fd=5 102 | 0035312d 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669 103 | 74790867 7265656e 656e6403 6f726702 756b0000 110001. 104 | write=55 105 | +0.000236 106 | select max=6 rfds=[4,5] wfds=[] efds=[5] to=29.994245 107 | select=0 rfds=[] wfds=[] efds=[] 108 | +30.-04653 109 | close fd=4 110 | close=OK 111 | +0.000943 112 | close fd=5 113 | close=OK 114 | +0.000113 115 | -------------------------------------------------------------------------------- /regress/case-datapluscname.out: -------------------------------------------------------------------------------- 1 | adns debug: using nameserver 172.18.45.6 2 | 170.99.219.194.in-addr.arpa flags 292 type 1 A(-) submitted 3 | 170.99.219.194.in-addr.arpa flags 292 type 2 NS(raw) submitted 4 | 170.99.219.194.in-addr.arpa flags 292 type 5 CNAME(-) submitted 5 | 170.99.219.194.in-addr.arpa flags 292 type 6 SOA(raw) submitted 6 | 170.99.219.194.in-addr.arpa flags 292 type 12 PTR(raw) submitted 7 | 170.99.219.194.in-addr.arpa flags 292 type 13 HINFO(-) submitted 8 | 170.99.219.194.in-addr.arpa flags 292 type 15 MX(raw) submitted 9 | 170.99.219.194.in-addr.arpa flags 292 type 16 TXT(-) submitted 10 | 170.99.219.194.in-addr.arpa flags 292 type 17 RP(raw) submitted 11 | 170.99.219.194.in-addr.arpa flags 292 type 65537 A(addr) submitted 12 | 170.99.219.194.in-addr.arpa flags 292 type 65538 NS(+addr) submitted 13 | 170.99.219.194.in-addr.arpa flags 292 type 65548 PTR(checked) submitted 14 | 170.99.219.194.in-addr.arpa flags 292 type 65551 MX(+addr) submitted 15 | 170.99.219.194.in-addr.arpa flags 292 type 131078 SOA(822) submitted 16 | 170.99.219.194.in-addr.arpa flags 292 type 131089 RP(822) submitted 17 | adns debug: ignoring CNAME (to 170.168.99.219.194.in-addr.arpa) coexisting with RR (QNAME=170.99.219.194.in-addr.arpa, QTYPE=PTR(raw), NS=172.18.45.6) 18 | adns debug: ignoring RR with an unexpected owner 170.168.99.219.194.in-addr.arpa (QNAME=170.99.219.194.in-addr.arpa, QTYPE=PTR(raw), NS=172.18.45.6) 19 | adns debug: ignoring CNAME (to 170.168.99.219.194.in-addr.arpa) coexisting with RR (QNAME=170.99.219.194.in-addr.arpa, QTYPE=PTR(checked), NS=172.18.45.6) 20 | adns debug: ignoring RR with an unexpected owner 170.168.99.219.194.in-addr.arpa (QNAME=170.99.219.194.in-addr.arpa, QTYPE=PTR(checked), NS=172.18.45.6) 21 | 170.99.219.194.in-addr.arpa flags 292 type A(-): No such data; nrrs=0; cname=170.168.99.219.194.in-addr.arpa; owner=170.99.219.194.in-addr.arpa; ttl=0 22 | 170.99.219.194.in-addr.arpa flags 292 type NS(raw): No such data; nrrs=0; cname=170.168.99.219.194.in-addr.arpa; owner=170.99.219.194.in-addr.arpa; ttl=0 23 | 170.99.219.194.in-addr.arpa flags 292 type SOA(raw): No such data; nrrs=0; cname=170.168.99.219.194.in-addr.arpa; owner=170.99.219.194.in-addr.arpa; ttl=0 24 | 170.99.219.194.in-addr.arpa flags 292 type PTR(raw): OK; nrrs=1; cname=$; owner=170.99.219.194.in-addr.arpa; ttl=171727 25 | proxy.scoplife.gr 26 | 170.99.219.194.in-addr.arpa flags 292 type HINFO(-): No such data; nrrs=0; cname=170.168.99.219.194.in-addr.arpa; owner=170.99.219.194.in-addr.arpa; ttl=0 27 | 170.99.219.194.in-addr.arpa flags 292 type MX(raw): No such data; nrrs=0; cname=170.168.99.219.194.in-addr.arpa; owner=170.99.219.194.in-addr.arpa; ttl=0 28 | 170.99.219.194.in-addr.arpa flags 292 type TXT(-): No such data; nrrs=0; cname=170.168.99.219.194.in-addr.arpa; owner=170.99.219.194.in-addr.arpa; ttl=0 29 | 170.99.219.194.in-addr.arpa flags 292 type RP(raw): No such data; nrrs=0; cname=170.168.99.219.194.in-addr.arpa; owner=170.99.219.194.in-addr.arpa; ttl=0 30 | 170.99.219.194.in-addr.arpa flags 292 type A(addr): No such data; nrrs=0; cname=170.168.99.219.194.in-addr.arpa; owner=170.99.219.194.in-addr.arpa; ttl=0 31 | 170.99.219.194.in-addr.arpa flags 292 type NS(+addr): No such data; nrrs=0; cname=170.168.99.219.194.in-addr.arpa; owner=170.99.219.194.in-addr.arpa; ttl=0 32 | 170.99.219.194.in-addr.arpa flags 292 type MX(+addr): No such data; nrrs=0; cname=170.168.99.219.194.in-addr.arpa; owner=170.99.219.194.in-addr.arpa; ttl=0 33 | 170.99.219.194.in-addr.arpa flags 292 type SOA(822): No such data; nrrs=0; cname=170.168.99.219.194.in-addr.arpa; owner=170.99.219.194.in-addr.arpa; ttl=0 34 | 170.99.219.194.in-addr.arpa flags 292 type RP(822): No such data; nrrs=0; cname=170.168.99.219.194.in-addr.arpa; owner=170.99.219.194.in-addr.arpa; ttl=0 35 | 170.99.219.194.in-addr.arpa flags 292 type PTR(checked): OK; nrrs=1; cname=$; owner=170.99.219.194.in-addr.arpa; ttl=171727 36 | proxy.scoplife.gr 37 | 170.99.219.194.in-addr.arpa flags 292 type CNAME(-): OK; nrrs=1; cname=$; owner=170.99.219.194.in-addr.arpa; ttl=171726 38 | 170.168.99.219.194.in-addr.arpa 39 | rc=0 40 | -------------------------------------------------------------------------------- /regress/case-longdomsrch2.sys: -------------------------------------------------------------------------------- 1 | adnstest ndots100 2 | :1 1/xxxlllantysiliogog.llanfairpwllgwyngyllgogerychwyrndrobwlxxxxxxxxxxlllantysiliogog.llanfairpwllgwyngyllgogerychwyrndrobwlxxxxxxxxxxlllantysiliogog.llanfairpwllgwyngyllgogerychwyrndrobwlxxxxxxxxxxlllantysiliogog.relativity.greenend.org.uk 3 | start 951956143.624786 4 | socket type=SOCK_DGRAM 5 | socket=4 6 | +0.000137 7 | fcntl fd=4 cmd=F_GETFL 8 | fcntl=~O_NONBLOCK&... 9 | +0.000058 10 | fcntl fd=4 cmd=F_SETFL O_NONBLOCK|... 11 | fcntl=OK 12 | +0.000035 13 | sendto fd=4 addr=172.18.45.6:53 14 | 31200100 00010000 00000000 12787878 6c6c6c61 6e747973 696c696f 676f673f 15 | 6c6c616e 66616972 70776c6c 6777796e 67796c6c 676f6765 72796368 7779726e 16 | 64726f62 776c7878 78787878 78787878 6c6c6c61 6e747973 696c696f 676f673f 17 | 6c6c616e 66616972 70776c6c 6777796e 67796c6c 676f6765 72796368 7779726e 18 | 64726f62 776c7878 78787878 78787878 6c6c6c61 6e747973 696c696f 676f673f 19 | 6c6c616e 66616972 70776c6c 6777796e 67796c6c 676f6765 72796368 7779726e 20 | 64726f62 776c7878 78787878 78787878 6c6c6c61 6e747973 696c696f 676f670a 21 | 72656c61 74697669 74790867 7265656e 656e6403 6f726702 756b0867 7265656e 22 | 656e6403 6f726702 756b0000 010001. 23 | sendto=271 24 | +0.004067 25 | select max=5 rfds=[4] wfds=[] efds=[] to=1.995933 26 | select=1 rfds=[4] wfds=[] efds=[] 27 | +0.000223 28 | recvfrom fd=4 buflen=512 *addrlen=16 29 | recvfrom=OK addr=172.18.45.6:53 30 | 31208583 00010000 00010000 12787878 6c6c6c61 6e747973 696c696f 676f673f 31 | 6c6c616e 66616972 70776c6c 6777796e 67796c6c 676f6765 72796368 7779726e 32 | 64726f62 776c7878 78787878 78787878 6c6c6c61 6e747973 696c696f 676f673f 33 | 6c6c616e 66616972 70776c6c 6777796e 67796c6c 676f6765 72796368 7779726e 34 | 64726f62 776c7878 78787878 78787878 6c6c6c61 6e747973 696c696f 676f673f 35 | 6c6c616e 66616972 70776c6c 6777796e 67796c6c 676f6765 72796368 7779726e 36 | 64726f62 776c7878 78787878 78787878 6c6c6c61 6e747973 696c696f 676f670a 37 | 72656c61 74697669 74790867 7265656e 656e6403 6f726702 756b0867 7265656e 38 | 656e6403 6f726702 756b0000 01000108 67726565 6e656e64 036f7267 02756b00 39 | 00060001 00015180 002d026e 73066368 6961726b c10f0a68 6f73746d 61737465 40 | 72c10f77 35e86000 00708000 001c2000 093a8000 015180. 41 | +0.001177 42 | sendto fd=4 addr=172.18.45.6:53 43 | 31210100 00010000 00000000 12787878 6c6c6c61 6e747973 696c696f 676f673f 44 | 6c6c616e 66616972 70776c6c 6777796e 67796c6c 676f6765 72796368 7779726e 45 | 64726f62 776c7878 78787878 78787878 6c6c6c61 6e747973 696c696f 676f673f 46 | 6c6c616e 66616972 70776c6c 6777796e 67796c6c 676f6765 72796368 7779726e 47 | 64726f62 776c7878 78787878 78787878 6c6c6c61 6e747973 696c696f 676f673f 48 | 6c6c616e 66616972 70776c6c 6777796e 67796c6c 676f6765 72796368 7779726e 49 | 64726f62 776c7878 78787878 78787878 6c6c6c61 6e747973 696c696f 676f670a 50 | 72656c61 74697669 74790867 7265656e 656e6403 6f726702 756b0000 010001. 51 | sendto=255 52 | +0.002348 53 | recvfrom fd=4 buflen=512 *addrlen=16 54 | recvfrom=OK addr=172.18.45.6:53 55 | 31218583 00010000 00010000 12787878 6c6c6c61 6e747973 696c696f 676f673f 56 | 6c6c616e 66616972 70776c6c 6777796e 67796c6c 676f6765 72796368 7779726e 57 | 64726f62 776c7878 78787878 78787878 6c6c6c61 6e747973 696c696f 676f673f 58 | 6c6c616e 66616972 70776c6c 6777796e 67796c6c 676f6765 72796368 7779726e 59 | 64726f62 776c7878 78787878 78787878 6c6c6c61 6e747973 696c696f 676f673f 60 | 6c6c616e 66616972 70776c6c 6777796e 67796c6c 676f6765 72796368 7779726e 61 | 64726f62 776c7878 78787878 78787878 6c6c6c61 6e747973 696c696f 676f670a 62 | 72656c61 74697669 74790867 7265656e 656e6403 6f726702 756b0000 0100010a 63 | 72656c61 74697669 74790867 7265656e 656e6403 6f726702 756b0000 06000100 64 | 01518000 27036e73 30c0ff0a 686f7374 6d617374 6572c0ff 0000002d 00001c20 65 | 00000e10 00093a80 00015180. 66 | +0.001060 67 | recvfrom fd=4 buflen=512 *addrlen=16 68 | recvfrom=EAGAIN 69 | +0.000105 70 | close fd=4 71 | close=OK 72 | +0.000176 73 | --------------------------------------------------------------------------------