From: Bulent Murtezaoglu
Subject: UDP/DNS libraries for Common Lisp?
Date: 
Message-ID: <87hevzjmug.fsf@nkapi.internal>
Is there a platform independent UDP/sockets binding or a binding for
the bind resolver library for Common Lisp?  Cmucl, Clisp and/or Corman 
would be very nice.  

I am toying with writing an "infrastructure evaluator" that checks the
DNS set-up from glue records down and MX's and produce a document that
includes a relevant reading list for inept admins.  Today was the third 
time this year a prospective client tried to mail me and couldn't because
_their_ domain disappeared from the DNS system (and of course they
think the problem is at my end).  Grr.  But maybe something productive
will come out of this grumpiness.

thanks,

BM



 

From: Kent M Pitman
Subject: Re: UDP/DNS libraries for Common Lisp?
Date: 
Message-ID: <sfwofq7b3iw.fsf@world.std.com>
Bulent Murtezaoglu <··@acm.org> writes:

> Is there a platform independent UDP/sockets binding or a binding for
> the bind resolver library for Common Lisp?  Cmucl, Clisp and/or Corman 
> would be very nice.  

It's been on my list to get or make one of these, as access to a shell
running nslookup seems available only in certain environments.  What
reference document(s) describe the resolution protocol?
From: Bulent Murtezaoglu
Subject: Re: UDP/DNS libraries for Common Lisp?
Date: 
Message-ID: <87elr3jhg5.fsf@nkapi.internal>
>>>>> "KMP" == Kent M Pitman <······@world.std.com> writes:
[on my posting about UDP/DNS lib bindings]
    KMP> It's been on my list to get or make one of these, as access
    KMP> to a shell running nslookup seems available only in certain
    KMP> environments.  

I prefer dig to nslookup.  By default nslookup seems to look up too much
and fail on perfectly legitimate set-ups.   It is great news though that
you are interested.  

    KPM> What reference document(s) describe the
    KMP> resolution protocol?

A whole much of RFC's cover this.  RFC-1034 for the overview RFC-1035
for the implementation.  RFC-2181 and RFC-1123 are also worth reading. 
RFC-2317 is a good document to read if you'll do reverse lookups.

None of these cover the newer DNSsec and dynamic update stuff, but a 
browse into an RFC site should give you the relevant documents for those.
  
http://www.isc.org/products/BIND/ has the bind distribution 
(name server and associated libraries, popular enough to be 
quasi-canonical).

I'd be very happy to collaborate on this.  I don't think you (KMP)
will need lisp help, but I think I know enough about DNS to help
decipher things.

BM
From: John Foderaro
Subject: Re: UDP/DNS libraries for Common Lisp?
Date: 
Message-ID: <MPG.15cb1077e89243d99896a4@news.dnai.com>
In article <··············@nkapi.internal>, ··@acm.org says...
> 
> Is there a platform independent UDP/sockets binding or a binding for
> the bind resolver library for Common Lisp?  Cmucl, Clisp and/or Corman 
> would be very nice.  

 I don't have the library to offer but if you want to see 
what nameservers are serving up you can download the trial 
edition of ACL and use our built in DNS support

documented here:
http://www.franz.com/support/documentation/6.0/doc/dns.htm

here's an example of viewing a dns reply to an mx record
request:

cl-user(7): (socket:dns-query "www.berkeley.edu" :type :mx :decode nil)
#S(acl-socket:dns-response :id 6
                           :flags
                           (:recursion-requested :recursion-ok :response)
                           :flags-value 33152
                           :answer
                           (#S(acl-socket:dns-rr :name "www.berkeley.edu"
                                                 :type :cname :class 1
                                                 :time-to-live 86209
                                                 :answer
                                                 "amber.berkeley.edu"))
                           :authority
                           (#S(acl-socket:dns-rr :name "berkeley.edu"
                                                 :type :soa :class 1
                                                 :time-to-live 10637
                                                 :answer nil))
                           :additional nil)
cl-user(8): 



- john foderaro
  franz inc
From: Hannu Koivisto
Subject: Re: UDP/DNS libraries for Common Lisp?
Date: 
Message-ID: <87hevyeou0.fsf@lynx.ionific.com>
Bulent Murtezaoglu <··@acm.org> writes:

| Is there a platform independent UDP/sockets binding or a binding for
| the bind resolver library for Common Lisp?  Cmucl, Clisp and/or Corman 
| would be very nice.  

I have a small DNS client library for CMUCL.  It uses UDP to talk
to a DNS server directly but it is only as platform independent as
CMUCL is (i.e. practically not probably any more independent than a
binding to a bind resolver library would be) and it is hardwired to
look up the nameserver from /etc/resolv.conf and it uses the FFI to
interface to BSD sockets.

| I am toying with writing an "infrastructure evaluator" that checks the
| DNS set-up from glue records down and MX's and produce a document that

I pretty much just translated the code from my friend's similar
Python implementation a year ago and I don't grok DNS internals so
I have to admit I'm not 100% sure if it can be used for what you
intend to do, although I'm guessing it can be, at least with some
modifications.  It was written to get asynchronous gethostbyname &
friends.  The TODO list for the code contains several items (there
is no documentation and some things just aren't written very
sanely), but it is under 500 lines and all the functions are small
with understandable (at least to someone who groks DNS) names, so I
think it should be relatively easy to modify.

If you (or someone else) want it, I can polish it a bit (get rid of
the dependency to my utility library etc.) and send it.  Feel free
to mail me if you are interested.

-- 
Hannu