]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/netinet/tcp_fsm.h
xnu-344.21.73.tar.gz
[apple/xnu.git] / bsd / netinet / tcp_fsm.h
index 209f06e4b60881cb4a4d7c34b5dc8eb036d5e901..7b9b0732d9b499e7150c801782fc235ea68235f7 100644 (file)
@@ -3,19 +3,22 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * The contents of this file constitute Original Code as defined in and
- * are subject to the Apple Public Source License Version 1.1 (the
- * "License").  You may not use this file except in compliance with the
- * License.  Please obtain a copy of the License at
- * http://www.apple.com/publicsource and read it before using this file.
+ * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
  * 
- * This Original Code and all software distributed under the License are
- * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this
+ * file.
+ * 
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
- * License for the specific language governing rights and limitations
- * under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
  * SUCH DAMAGE.
  *
  *     @(#)tcp_fsm.h   8.1 (Berkeley) 6/10/93
+ * $FreeBSD: src/sys/netinet/tcp_fsm.h,v 1.14 1999/11/07 04:18:30 jlemon Exp $
  */
 
 #ifndef _NETINET_TCP_FSM_H_
 #define _NETINET_TCP_FSM_H_
+#include <sys/appleapiopts.h>
 
 /*
  * TCP FSM state definitions.
 #define        TCP6S_TIME_WAIT         TCPS_TIME_WAIT
 
 #define        TCPS_HAVERCVDSYN(s)     ((s) >= TCPS_SYN_RECEIVED)
-#define TCPS_HAVEESTABLISHED(s)        ((s) >= TCPS_ESTABLISHED)
+#define        TCPS_HAVEESTABLISHED(s) ((s) >= TCPS_ESTABLISHED)
 #define        TCPS_HAVERCVDFIN(s)     ((s) >= TCPS_TIME_WAIT)
 
-#ifdef TCPOUTFLAGS
+#ifdef __APPLE_API_UNSTABLE
+#ifdef TCPOUTFLAGS
 /*
  * Flags used when sending segments in tcp_output.
  * Basic flags (TH_RST,TH_ACK,TH_SYN,TH_FIN) are totally
  * if all data queued for output is included in the segment.
  */
 static u_char  tcp_outflags[TCP_NSTATES] = {
-    TH_RST|TH_ACK, 0, TH_SYN, TH_SYN|TH_ACK,
-    TH_ACK, TH_ACK,
-    TH_FIN|TH_ACK, TH_ACK, TH_FIN|TH_ACK, TH_ACK, TH_ACK,
-};
+       TH_RST|TH_ACK,          /* 0, CLOSED */
+       0,                      /* 1, LISTEN */
+       TH_SYN,                 /* 2, SYN_SENT */
+       TH_SYN|TH_ACK,          /* 3, SYN_RECEIVED */
+       TH_ACK,                 /* 4, ESTABLISHED */
+       TH_ACK,                 /* 5, CLOSE_WAIT */
+       TH_FIN|TH_ACK,          /* 6, FIN_WAIT_1 */
+       TH_FIN|TH_ACK,          /* 7, CLOSING */
+       TH_FIN|TH_ACK,          /* 8, LAST_ACK */
+       TH_ACK,                 /* 9, FIN_WAIT_2 */
+       TH_ACK,                 /* 10, TIME_WAIT */
+};     
 #endif
+#endif /* __APPLE_API_UNSTABLE */
 
 #if KPROF
+#ifdef __APPLE_API_PRIVATE
 int    tcp_acounts[TCP_NSTATES][PRU_NREQ];
+#endif /* __APPLE_API_PRIVATE */
 #endif
 
 #ifdef TCPSTATES