chiark / gitweb /
zone.lisp: Export function and macro for iterating over hosts.
authorMark Wooding <mdw@distorted.org.uk>
Sat, 13 Jul 2013 15:34:40 +0000 (16:34 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sat, 19 Apr 2014 14:53:33 +0000 (15:53 +0100)
zone.lisp

index d25986a..d71536c 100644 (file)
--- 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)))