tcp_fsm.h (707f139edb3b432d47241c6524d7cd58670476fe) tcp_fsm.h (6a7be6e8e00c40ad6d03410d56236ca0ed3a635e)
1/*
2 * Copyright (c) 1982, 1986, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 17 unchanged lines hidden (view full) ---

26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * @(#)tcp_fsm.h 8.1 (Berkeley) 6/10/93
1/*
2 * Copyright (c) 1982, 1986, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 17 unchanged lines hidden (view full) ---

26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * @(#)tcp_fsm.h 8.1 (Berkeley) 6/10/93
34 * $Id: tcp_fsm.h,v 1.2 1994/08/02 07:48:58 davidg Exp $
34 * $Id: tcp_fsm.h,v 1.3 1994/08/21 05:27:36 paul Exp $
35 */
36
37#ifndef _NETINET_TCP_FSM_H_
38#define _NETINET_TCP_FSM_H_
39
40/*
41 * TCP FSM state definitions.
42 * Per RFC793, September, 1981.

--- 12 unchanged lines hidden (view full) ---

55#define TCPS_FIN_WAIT_1 6 /* have closed, sent fin */
56#define TCPS_CLOSING 7 /* closed xchd FIN; await FIN ACK */
57#define TCPS_LAST_ACK 8 /* had fin and close; await FIN ACK */
58/* states > TCPS_CLOSE_WAIT && < TCPS_FIN_WAIT_2 await ACK of FIN */
59#define TCPS_FIN_WAIT_2 9 /* have closed, fin is acked */
60#define TCPS_TIME_WAIT 10 /* in 2*msl quiet wait after close */
61
62#define TCPS_HAVERCVDSYN(s) ((s) >= TCPS_SYN_RECEIVED)
35 */
36
37#ifndef _NETINET_TCP_FSM_H_
38#define _NETINET_TCP_FSM_H_
39
40/*
41 * TCP FSM state definitions.
42 * Per RFC793, September, 1981.

--- 12 unchanged lines hidden (view full) ---

55#define TCPS_FIN_WAIT_1 6 /* have closed, sent fin */
56#define TCPS_CLOSING 7 /* closed xchd FIN; await FIN ACK */
57#define TCPS_LAST_ACK 8 /* had fin and close; await FIN ACK */
58/* states > TCPS_CLOSE_WAIT && < TCPS_FIN_WAIT_2 await ACK of FIN */
59#define TCPS_FIN_WAIT_2 9 /* have closed, fin is acked */
60#define TCPS_TIME_WAIT 10 /* in 2*msl quiet wait after close */
61
62#define TCPS_HAVERCVDSYN(s) ((s) >= TCPS_SYN_RECEIVED)
63#define TCPS_HAVEESTABLISHED(s) ((s) >= TCPS_ESTABLISHED)
63#define TCPS_HAVERCVDFIN(s) ((s) >= TCPS_TIME_WAIT)
64
65#ifdef TCPOUTFLAGS
66/*
67 * Flags used when sending segments in tcp_output.
68 * Basic flags (TH_RST,TH_ACK,TH_SYN,TH_FIN) are totally
69 * determined by state, with the proviso that TH_FIN is sent only
70 * if all data queued for output is included in the segment.

--- 21 unchanged lines hidden ---
64#define TCPS_HAVERCVDFIN(s) ((s) >= TCPS_TIME_WAIT)
65
66#ifdef TCPOUTFLAGS
67/*
68 * Flags used when sending segments in tcp_output.
69 * Basic flags (TH_RST,TH_ACK,TH_SYN,TH_FIN) are totally
70 * determined by state, with the proviso that TH_FIN is sent only
71 * if all data queued for output is included in the segment.

--- 21 unchanged lines hidden ---