anchor.diff:  (defvar *hosts-file* "/etc/hosts")
   
   (defclass host ()
  -  ((truename :initarg :truename  :reader host-truename
  +  ((truename :initform nil :initarg :truename
  +             :accessor host-truename
                :documentation "The name of the host.")
  -   (aliases :initarg :aliases   :reader host-aliases
  +   (aliases :initform nil :initarg :aliases
  +            :accessor host-aliases
               :documentation "A list of aliases.")
  -   (addresses :initarg :addresses :reader host-addresses
  +   (addresses :initform nil :initarg :addresses
  +              :accessor host-addresses
                 :documentation "A list of addresses."))
     (:documentation "Class representing a host: name, aliases and addresses."))
   
   (defmethod initialize-instance :after ((host host) &key)
  -  (when (slot-boundp host 'addresses)
  -    (with-slots (addresses) host
  -      (setf addresses (ensure-list addresses)))))
  +  (with-accessors ((name host-truename) (aliases host-aliases)
  +                   (addresses host-addresses)) host
  +    (flet ((namep (h) (and (stringp h) (plusp (length h)))))
  +      (assert (namep name))
  +      (assert (every #'namep aliases))
  +      (assert addresses)
  +      (setf addresses (ensure-list addresses))
  +      (map-into addresses #'ensure-address addresses))))
   
   (defun host-random-address (host)
     "Returns a random address from HOST's address list."
  
positive.code:                   addresses)))
    (values hostobj))
  
  (defun search-etc-hosts-ip (file ip ipv6)
    (car
     (search-in-etc-file
      file
      (lambda (col1 col2 other-cols)
        (let ((vector (string-address-to-vector col1)))
          (when (and (vector-ipv6-good-p vector ipv6)
                     (vector-equal vector ip))
            (let ((host
                   (make-host col2 (make-address vector) other-cols)))
              (if (eql ipv6 t)
                  (map-host-ipv4-addresses-to-ipv6 host)
                  host)))))
      nil)))
  
  (defun merge-lines-into-one-host (lines ipv6)
    (flet ((pushnew-alias (alias place cname)
             (when (string-not-equal alias cname)
               (pushnew alias place :test #'string-equal)
               place)))
      (let (ips aliases host)
        (destructuring-bind (first-ip cname first-aliases) (car lines)
          (setf ips (list first-ip))
          (mapc (lambda (alias)
                  (setf aliases (pushnew-alias alias aliases cname)))
                first-aliases)
          (mapc (lambda (line)
                  (destructuring-bind (ip alias more-aliases) line
                    (pushnew ip ips)
                    (mapc (lambda (alias)
                            (setf aliases (pushnew-alias alias aliases cname)))
                          (cons alias more-aliases))))
                (cdr lines))
          (setf host (make-host cname
                                (mapcar #'make-address (nreverse ips))
                                (nreverse aliases)))
          (if (eql ipv6 t)
              (map-host-ipv4-addresses-to-ipv6 host)
              host)))))
  
  (defun search-etc-hosts-name (file name ipv6)
    (let ((lines (search-in-etc-file
                  file
                  (lambda (col1 col2 other-cols)
                    (let ((vector (string-address-to-vector col1)))
                      (when (and (vector-ipv6-good-p vector ipv6)
                                 (or (string-equal name col2)
                                     (member name other-cols
                                             :test #'string-equal)))
                        (list vector col2 other-cols))))
                  t)))
      (when lines
        (merge-lines-into-one-host lines ipv6))))
  
negative.code: (defmethod print-object ((host host) stream)
    (print-unreadable-object (host stream :type t :identity nil)
      (with-slots (truename aliases addresses) host
        (format stream "Canonical name: ~S. Aliases: ~:[None~;~:*~{~S~^, ~}~]. Addresses: ~{~A~^, ~}"
                truename aliases addresses))))
  
  (defvar *hosts-cache* ())
  
  (defun map-host-ipv4-addresses-to-ipv6 (hostobj)
    (declare (type host hostobj))
    (with-accessors ((addresses host-addresses)) hostobj
      (setf addresses
            (mapcar (lambda (address)
                      (if (ipv4-address-p address)
  