anchor.diff:           ;; Not much to do here, just waiting for the application to close.
            )
           (:last-ack
  +         ;; Local closed, waiting for remote to ACK.
            (when (logtest flags +tcp4-flag-ack+)
  +           ;; Remote have sended ACK , connection closed
              (setf (tcp-connection-state connection) :closed)
              (detach-tcp-connection connection)))
           (:fin-wait-1
  
positive.code:                 (setf (tcp-connection-state connection) :connection-aborted)
                  (detach-tcp-connection connection))))
          (:syn-received
           (cond ((and (eql flags +tcp4-flag-ack+)
                       (eql seq (tcp-connection-r-next connection))
                       (eql ack (tcp-connection-s-next connection)))
                  (setf (tcp-connection-state connection) :established))
                 ((and (logtest flags +tcp4-flag-syn+)
                       (eql ack (1- (tcp-connection-s-next connection))))
                  (format t "TCP: Ignore duplicated syn packets."))
                 (t
                  ;; Aborting connection
  
negative.code:          ;; Not much to do here, just waiting for the application to accept or decline new connection.
           )
          (:syn-sent
           ;; Active open
           (cond ((and (logtest flags +tcp4-flag-ack+)
                       (logtest flags +tcp4-flag-syn+)
                       (eql ack (tcp-connection-s-next connection)))
  