anchor.diff:  
   (in-package :net.sockets)
   
  -(defun create-socket (&key (family :internet) (type :stream) (connect :active)
  -                      (protocol :default) (ipv6 *ipv6*)
  -                      (external-format :default))
  -  (let ((family (if (or (null family) (eq family :internet))
  -                    (if ipv6 :ipv6 :ipv4)
  -                    family)))
  -    (make-instance (select-socket-class family type connect protocol)
  -                   :family family
  -                   :external-format external-format)))
  +(defun create-socket (family type connect external-format)
  +  (make-instance (select-socket-class family type connect :default)
  +                 :family family
  +                 :external-format external-format))
   
   (defmacro %with-close-on-error ((var value) &body body)
     "Bind VAR to VALUE, execute BODY as implicit PROGN and return VAR.
  
positive.code: (define-symbol-macro +default-host+
      (if *ipv6* +ipv6-unspecified+ +ipv4-unspecified+))
  
  (defun %make-internet-stream-socket (args connect ef)
    (destructuring-bind (&key family reuse-address keepalive nodelay interface
                              (local-host +default-host+) (local-port 0)
                              (remote-host +default-host+) (remote-port 0)
                              (backlog *default-backlog-size*))
        args
      (let ((local-port  (ensure-numerical-service local-port))
            (remote-port (ensure-numerical-service remote-port)))
        (ecase connect
          (:active
           (%with-close-on-error (socket (create-socket :family family :type :stream
                                                        :connect :active :external-format ef))
             (when keepalive (set-socket-option socket :keep-alive :value t))
             (when nodelay (set-socket-option socket :tcp-nodelay :value t))
             (when local-host
               (bind-address socket (convert-or-lookup-inet-address local-host)
                             :port local-port
                             :reuse-address reuse-address))
             (when (plusp remote-port)
               (connect socket (convert-or-lookup-inet-address remote-host)
                        :port remote-port))))
          (:passive
           (%with-close-on-error (socket (create-socket :family family :type :stream
                                                        :connect :passive :external-format ef))
             (when local-host
               (bind-address socket (convert-or-lookup-inet-address local-host)
                             :port local-port
                             :reuse-address reuse-address)
               (when interface
                 (set-socket-option socket :bind-to-device :value interface))
             (socket-listen socket :backlog backlog))))))))
  
  (defun %make-local-stream-socket (args connect ef)
    (destructuring-bind (&key family (backlog *default-backlog-size*)
                              local-filename remote-filename)
        args
      (ecase connect
        (:active
         (%with-close-on-error (socket (create-socket :family family :type :stream
                                                      :connect :active :external-format ef))
           (when local-filename
             (bind-address socket (make-address local-filename)))
           (when remote-filename
             (connect socket (make-address remote-filename)))))
        (:passive
         (%with-close-on-error (socket (create-socket :family family :type :stream
                                                      :connect :passive :external-format ef))
           (when local-filename
             (bind-address socket (make-address local-filename))
             (socket-listen socket :backlog backlog)))))))
  
  (defun %make-internet-datagram-socket (args ef)
    (destructuring-bind (&key family reuse-address broadcast interface
                              (local-host +default-host+) (local-port 0)
                              (remote-host +default-host+) (remote-port 0))
        args
      (let ((local-port  (ensure-numerical-service local-port))
            (remote-port (ensure-numerical-service remote-port)))
        (%with-close-on-error (socket (create-socket :family family :type :datagram
                                                     :connect :active :external-format ef))
          (when broadcast (set-socket-option socket :broadcast :value t))
          (when local-host
            (bind-address socket (convert-or-lookup-inet-address local-host)
  
negative.code:           (connect socket (convert-or-lookup-inet-address remote-host)
                     :port remote-port))))))
  
  (defun %make-local-datagram-socket (args family ef)
    (destructuring-bind (&key local-filename remote-filename) args
      (%with-close-on-error (socket (create-socket family :datagram :active ef))
        (when local-filename
          (bind-address socket (ensure-address local-filename :local)))
        (when remote-filename
  