anchor.diff:                                      :remote-port port
                                       :remote-ip ip
                                       :snd.nxt (+u32 iss 1)
  +                                    :snd.una iss
                                       :rcv.nxt 0
                                       :rcv.wnd *initial-window-size*
                                       :boot-id (if persist nil (mezzano.supervisor:current-boot-id)))))
  
positive.code:            (ack (tcp-packet-acknowledgment-number packet start end))
             (flags (tcp-packet-flags packet start end))
             (header-length (tcp-packet-header-length packet start end))
             (data-length (tcp-packet-header-length packet start end)))
        (when (logtest flags +tcp4-flag-rst+)
          ;; Remote has sent RST, aborting connection
          (setf (tcp-connection-pending-error connection)
                (make-condition 'connection-aborted
                                :host (tcp-connection-remote-ip connection)
                                :port (tcp-connection-remote-port connection)))
          (detach-tcp-connection connection)
          (return-from tcp4-connection-receive))
        ;; :CLOSED should never be seen here
        (ecase (tcp-connection-state connection)
  
negative.code:       (check-connection-error connection))
      connection))
  
  (defun subseq-ub8 (sequence start &optional end)
    "Like SUBSEQ, but returns a simple UB8 vector."
    (let ((result (make-array (- (or end (length sequence)) start) :element-type '(unsigned-byte 8))))
      (replace result sequence :start2 start :end2 end)
      result))
  
  (defun tcp-send-1 (connection data start end &key psh-p)
    (let ((snd.nxt (tcp-connection-snd.nxt connection))
          (rcv.nxt (tcp-connection-rcv.nxt connection))
          (len (- end start))
          ;; A copy of the data must be taken as it is owned by the user
          ;; and may be modified after TCP-SEND returns. Due to retransmit
          ;; it needs to be kept around until the remote has acked the data.
          (data (subseq-ub8 data start end)))
      (setf (tcp-connection-snd.nxt connection)
            (+u32 snd.nxt len))
      (setf (tcp-connection-retransmit-queue connection)
            (append (tcp-connection-retransmit-queue connection)
                    (list (list snd.nxt rcv.nxt data :psh-p psh-p))))
      ;; TODO: Calculate RTO properly.
      (arm-retransmit-timer *tcp-retransmit-time* connection)
      (when (not *netmangler-force-local-retransmit*)
        (tcp4-send-packet connection
                          snd.nxt rcv.nxt
                          data
                          :psh-p psh-p))))
  
  ;; TODO: Respect the send window, buffer data when it fills up.
  (defun tcp-send (connection data &optional (start 0) end)
    (setf end (or end (length data)))
    (with-tcp-connection-locked connection
      ;; FIXME: It should be an error to send after close.
      (when (or (eql (tcp-connection-state connection) :established)
                (eql (tcp-connection-state connection) :close-wait))
        (let ((mss (tcp-connection-max-seg-size connection)))
  