-#define EFAILEC -1 /* new state for failure, internally */
-#define SAME 0 /* no state change, internally */
-#define LISTEN 1 /* listening for connection */
-#define SYN_SENT 2 /* active, have sent syn */
-#define SYN_RCVD 3
-#define L_SYN_RCVD 4
-#define ESTAB 5 /* established */
-#define FIN_W1 6 /* have closed and sent fin */
-#define FIN_W2 7 /* have closed and rcvd ack of fin */
-#define TIME_WAIT 8 /* in 2*msl quiet wait after close */
-#define CLOSE_WAIT 9 /* rcvd fin, waiting for UCLOSE */
-#define CLOSING 10 /* closed xchd FIN; await FIN ACK */
-#define LAST_ACK 11 /* had fin and UCLOSE; await FIN ACK */
-#define RCV_WAIT 12 /* waiting for user to drain data */
-#define CLOSED 13 /* closed */
+#define TCPS_CLOSED 0 /* closed */
+#define TCPS_LISTEN 1 /* listening for connection */
+#define TCPS_SYN_SENT 2 /* active, have sent syn */
+#define TCPS_SYN_RECEIVED 3 /* have send and received syn */
+/* states < TCPS_ESTABLISHED are those where connections not established */
+#define TCPS_ESTABLISHED 4 /* established */
+#define TCPS_CLOSE_WAIT 5 /* rcvd fin, waiting for close */
+/* states > TCPS_CLOSE_WAIT are those where user has closed */
+#define TCPS_FIN_WAIT_1 6 /* have closed, sent fin */
+#define TCPS_CLOSING 7 /* closed xchd FIN; await FIN ACK */
+#define TCPS_LAST_ACK 8 /* had fin and close; await FIN ACK */
+/* states > TCPS_CLOSE_WAIT && < TCPS_FIN_WAIT_2 await ACK of FIN */
+#define TCPS_FIN_WAIT_2 9 /* have closed, fin is acked */
+#define TCPS_TIME_WAIT 10 /* in 2*msl quiet wait after close */