X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/zone/blobdiff_plain/32ebbe9b0fcc1a698c6ffec760259c5f7e953a9d..6a26c716f6f159e76dda56fd64bf346b569bb693:/zone.lisp diff --git a/zone.lisp b/zone.lisp index 735e87f..d71536c 100644 --- a/zone.lisp +++ b/zone.lisp @@ -580,12 +580,14 @@ (defmacro defrevzone (head &body zf) nconc (list k v))) ,@',zf))))))) +(export 'map-host-addresses) (defun map-host-addresses (func addr &key (family *address-family*)) "Call FUNC for each address denoted by ADDR (a `host-parse' address)." (dolist (a (host-addrs (host-parse addr family))) (funcall func a))) +(export 'do-host) (defmacro do-host ((addr spec &key (family *address-family*)) &body body) "Evaluate BODY, binding ADDR to each address denoted by SPEC." `(dolist (,addr (host-addrs (host-parse ,spec ,family))) @@ -609,6 +611,10 @@ (defzoneparse :a (name data rec) ":a IPADDR" (zone-set-address #'rec data :make-ptr-p t :family :ipv4)) +(defzoneparse :aaaa (name data rec) + ":aaaa IPADDR" + (zone-set-address #'rec data :make-ptr-p t :family :ipv6)) + (defzoneparse :addr (name data rec) ":addr IPADDR" (zone-set-address #'rec data :make-ptr-p t)) @@ -983,6 +989,7 @@ (defgeneric bind-record-type (type) (export 'bind-record-format-args) (defgeneric bind-record-format-args (type data) (:method ((type (eql :a)) data) (list "~A" (ipaddr-string data))) + (:method ((type (eql :aaaa)) data) (list "~A" (ipaddr-string data))) (:method ((type (eql :ptr)) data) (list "~A" (bind-hostname data))) (:method ((type (eql :cname)) data) (list "~A" (bind-hostname data))) (:method ((type (eql :ns)) data) (list "~A" (bind-hostname data)))