From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: From: erik quanstrom Date: Wed, 18 Oct 2006 15:30:28 -0400 To: 9fans@cse.psu.edu Subject: Re: [9fans] csipinfo In-Reply-To: <0fcc387289a4a346cbd5bf450171a0d0@plan9.jp> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Topicbox-Message-UUID: cce937c4-ead1-11e9-9d60-3106f5b1d025 > Thanks, this finally looks like what I need. Two points though: > 1. Is 64 bytes sufficient for the domain name? Searching the =E2=80=99= net > I=E2=80=99ve found other numbers =E2=80=94 according to it > should be 1005; links to a name about 140 > bytes long and firefox handles it just fine. this was throwaway code. i didn't think very hard about that number. ndb does have a maximum value length of 64 bytes. ; g -i max /sys/src/cmd/ndb/dns.h: dns.h:68: Domlen=3D 256, /* max domain name length (with NULL) */ > 2. Why the second part of =E2=80=9Cif(l < 0 || l =3D=3D sizeof buf)=E2=80= =9D? room for the terminating null. as pointed out, this doesn't quite work. you have to reverse the dots you= rself and add in-addr.arpa. the code is in /sys/src/cmd/ndb/dnsquery.c - erik