anchor.diff:      (mezzano.sync:mailbox-flush (tcp-listener-connections listener))))
   
   (defclass tcp-connection ()
  -  ((%state :accessor tcp-connection-%state :initarg :%state)
  -   (local-port :accessor tcp-connection-local-port :initarg :local-port)
  -   (local-ip :accessor tcp-connection-local-ip :initarg :local-ip)
  -   (remote-port :accessor tcp-connection-remote-port :initarg :remote-port)
  -   (remote-ip :accessor tcp-connection-remote-ip :initarg :remote-ip)
  -   (s-next :accessor tcp-connection-s-next :initarg :s-next)
  -   (r-next :accessor tcp-connection-r-next :initarg :r-next)
  -   (window-size :accessor tcp-connection-window-size :initarg :window-size)
  -   (max-seg-size :accessor tcp-connection-max-seg-size :initarg :max-seg-size)
  -   (rx-data :accessor tcp-connection-rx-data :initarg :rx-data)
  -   (rx-data-unordered :accessor tcp-connection-rx-data-unordered :initarg :rx-data-unordered)
  -   (lock :accessor tcp-connection-lock :initarg :lock)
  -   (cvar :accessor tcp-connection-cvar :initarg :cvar))
  +  ((%state :accessor tcp-connection-state
  +           :initarg :state
  +           :type tcp-connection-state)
  +   (%local-port :reader tcp-connection-local-port
  +                :initarg :local-port
  +                :type tcp-port-number)
  +   (%local-ip :reader tcp-connection-local-ip
  +              :initarg :local-ip
  +              :type mezzano.network.ip::ipv4-address)
  +   (%remote-port :reader tcp-connection-remote-port
  +                 :initarg :remote-port
  +                 :type tcp-port-number)
  +   (%remote-ip :reader tcp-connection-remote-ip
  +               :initarg :remote-ip
  +               :type mezzano.network.ip::ipv4-address)
  +   (%s-next :accessor tcp-connection-s-next
  +            :initarg :s-next
  +            :type tcp-sequence-number)
  +   (%r-next :accessor tcp-connection-r-next
  +            :initarg :r-next
  +            :type tcp-sequence-number)
  +   (%window-size :accessor tcp-connection-window-size :initarg :window-size)
  +   (%max-seg-size :accessor tcp-connection-max-seg-size :initarg :max-seg-size)
  +   (%rx-data :accessor tcp-connection-rx-data :initarg :rx-data)
  +   (%rx-data-unordered :reader tcp-connection-rx-data-unordered :initarg :rx-data-unordered)
  +   (%lock :reader tcp-connection-lock :initarg :lock)
  +   (%cvar :reader tcp-connection-cvar :initarg :cvar))
     (:default-initargs
      :max-seg-size 1000
      :rx-data '()
      :rx-data-unordered (make-hash-table)
      :lock (mezzano.supervisor:make-mutex "TCP connection lock")
      :cvar (mezzano.supervisor:make-condition-variable "TCP connection cvar")))
  -
  -(declaim (inline tcp-connection-state (setf tcp-connection-state)))
  -
  -(defun tcp-connection-state (connection)
  -  (tcp-connection-%state connection))
  -
  -(defun (setf tcp-connection-state) (value connection)
  -  (setf (tcp-connection-%state connection) value))
   
   (defmacro with-tcp-connection-locked (connection &body body)
     `(mezzano.supervisor:with-mutex ((tcp-connection-lock ,connection))
  
positive.code:            (source-port (allocate-local-tcp-port source-address ip port))
             (seq (random #x100000000))
             (connection (make-instance 'tcp-connection
                                        :%state :syn-sent
                                        :local-port source-port
                                        :local-ip source-address
                                        :remote-port port
  
negative.code:   (let* ((seq (ub32ref/be packet (+ start +tcp4-header-sequence-number+)))
           (blah (random #x100000000))
           (connection (make-instance 'tcp-connection
                                      :state :syn-received
                                      :local-port local-port
                                      :local-ip local-ip
                                      :remote-port remote-port
  