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
- Version 0.1 -- April 27, 2004 -- Initial attempt at ASDF-Install packaging.
- Version 0.2 -- April 28, 2004 -- Corrected attempt at ASDF-Install.
- Version 0.3 -- April 30, 2004 -- Worked around CMUCL compilation bug.
- Version 0.4 -- May 17, 2004 -- Signals conditions on decoding errors, clarified LGPL licensing, added documentation.
- Version 0.5 -- May 23, 2004 -- Fixed a bug in UFFI API usage exposed in recent UFFI versions.
- Version 0.6 -- November 22, 2004 -- Fixed another UFFI bug on non-CMUCL/SBCL platforms. Changed interface to use keyword symbols.
- Version 0.7 -- November 25, 2004 -- Changed the license from LGPL to LLGPL.
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.