Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Aug 2008 16:17:39 GMT
From:      Rui Paulo <rpaulo@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 147310 for review
Message-ID:  <200808131617.m7DGHdEg062581@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=147310

Change 147310 by rpaulo@rpaulo_epsilon on 2008/08/13 16:16:58

	Implement FSM transitions for simultaneous close.

Affected files ...

.. //depot/projects/soc2008/rpaulo-tcpad/verify.c#9 edit

Differences ...

==== //depot/projects/soc2008/rpaulo-tcpad/verify.c#9 (text+ko) ====

@@ -23,7 +23,7 @@
  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  *
- * $P4: //depot/projects/soc2008/rpaulo-tcpad/verify.c#8 $
+ * $P4: //depot/projects/soc2008/rpaulo-tcpad/verify.c#9 $
  */
 
 #include <stdio.h>
@@ -354,9 +354,13 @@
 			DPRINTF(DEBUG_FSM, "FSM transition: %p "
 			    "FIN_WAIT_2 -> TIME_WAIT\n", tp);
 			break;
+		case TCPS_FIN_WAIT_1:
+			tp->t_state = TCPS_CLOSING;
+			DPRINTF(DEBUG_FSM, "FSM transition: %p "
+			    "FIN_WAIT_1 -> CLOSING\n", tp);
+			break;
 		default:
-			if (cp)
-				dumper_error(cp, "FIN with no known state");
+			dumper_error(cp, "FIN with no known state");
 			break;
 		}
 	}
@@ -386,6 +390,10 @@
 			DPRINTF(DEBUG_FSM, "FSM transition: %p "
 			    "FIN_WAIT_1 -> FIN_WAIT_2\n", tp);
 			break;
+		case TCPS_CLOSING:
+			tp->t_state = TCPS_TIME_WAIT;
+			DPRINTF(DEBUG_FSM, "FSM transition: %p "
+			    "CLOSING -> TIME_WAIT\n", tp);
 		case TCPS_LAST_ACK:
 			tp->t_state = TCPS_CLOSED;
 			DPRINTF(DEBUG_FSM, "FSM transition: %p "



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200808131617.m7DGHdEg062581>