Packages

Resolver

Resolver is a UFFI interface to Linux's libresolv.so DNS library. Resolver allows you to query any type of DNS record and returns the full contents of a DNS reply packet, decoded in list format. Resolver is basically the Lisp equivalent of the Linux dig utility.

History / Changelog

Installation

You can install Resolver using ASDF-Install. If you are using SBCL, simply execute

* (require :asdf)
* (require :asdf-install)
* (asdf-install:install :resolver)

If you are not using ASDF-Install, you can download the tarball here.

Usage

Unfortunately, there is no documentation for Resolver yet. It's pretty easy to use, however. If you're using SBCL, simply

* (require :asdf)
* (require :resolver)
* (use-package :resolver)
* (lookup "findinglisp.com" :mx) ;; etc...

If you're using ASDF, but not SBCL, you will probably have to do something like

* (load "asdf")
* (asdf:oos asdf:load-op :resolver)
* (use-package :resolver)
* (lookup "findinglisp.com" :mx)

The result of (lookup ...) is a list of lists containing each section of the DNS reply message, like so

((53369 T :QUERY NIL NIL T T :NO-ERROR 1 2 2 6) (("findinglisp.com." :MX :IN))
 (("findinglisp.com." :MX :IN 86178 10 "mx01.1and1.com.")
  ("findinglisp.com." :MX :IN 86178 10 "mx00.1and1.com."))
 (("findinglisp.com." :NS :IN 172578 "ns27.1and1.com.")
  ("findinglisp.com." :NS :IN 172578 "ns28.1and1.com."))
 (("mx01.1and1.com." :A :IN 83865 #(217 160 230 13))
  ("mx01.1and1.com." :A :IN 83865 #(217 160 230 11))
  ("mx00.1and1.com." :A :IN 1237 #(217 160 230 10))
  ("mx00.1and1.com." :A :IN 1237 #(217 160 230 12))
  ("ns27.1and1.com." :A :IN 77450 #(217 160 224 3))
  ("ns28.1and1.com." :A :IN 32577 #(217 160 228 3))))

You'll probably want to take a look at RFC 1035 to understand each of the sublists. You can take a quick look at the source for some other functions that will deconstruct this list further.

See the DOCS file in the distribution for more information.

License

Resolver is licensed under the Lisp Lesser Gnu Public License (LLGPL). See the file "COPYING" in the distribution.