aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@ghostprotocols.net>2005-08-09 23:08:28 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2005-08-29 18:41:54 -0400
commitc752f0739f09b803aed191c4765a3b6650a08653 (patch)
tree33dcc7acf66ec51952b76276c758e38811f4f708 /include
parentf3f05f7046e7c85b04af390d95a82a27160dd5d0 (diff)
[TCP]: Move the tcp sock states to net/tcp_states.h
Lots of places just needs the states, not even linux/tcp.h, where this enum was, needs it. This speeds up development of the refactorings as less sources are rebuilt when things get moved from net/tcp.h. Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/tcp.h18
-rw-r--r--include/net/dn.h1
-rw-r--r--include/net/inet_hashtables.h2
-rw-r--r--include/net/ip6_route.h1
-rw-r--r--include/net/ip_vs.h1
-rw-r--r--include/net/sctp/constants.h2
-rw-r--r--include/net/tcp.h2
-rw-r--r--include/net/tcp_states.h34
8 files changed, 39 insertions, 22 deletions
diff --git a/include/linux/tcp.h b/include/linux/tcp.h
index e70ab19652db..b88fe05fdcbf 100644
--- a/include/linux/tcp.h
+++ b/include/linux/tcp.h
@@ -55,24 +55,6 @@ struct tcphdr {
55 __u16 urg_ptr; 55 __u16 urg_ptr;
56}; 56};
57 57
58
59enum {
60 TCP_ESTABLISHED = 1,
61 TCP_SYN_SENT,
62 TCP_SYN_RECV,
63 TCP_FIN_WAIT1,
64 TCP_FIN_WAIT2,
65 TCP_TIME_WAIT,
66 TCP_CLOSE,
67 TCP_CLOSE_WAIT,
68 TCP_LAST_ACK,
69 TCP_LISTEN,
70 TCP_CLOSING, /* now a valid state */
71
72 TCP_MAX_STATES /* Leave at the end! */
73};
74
75#define TCP_STATE_MASK 0xF
76#define TCP_ACTION_FIN (1 << 7) 58#define TCP_ACTION_FIN (1 << 7)
77 59
78enum { 60enum {
diff --git a/include/net/dn.h b/include/net/dn.h
index 5551c46db397..c1dbbd222793 100644
--- a/include/net/dn.h
+++ b/include/net/dn.h
@@ -3,6 +3,7 @@
3 3
4#include <linux/dn.h> 4#include <linux/dn.h>
5#include <net/sock.h> 5#include <net/sock.h>
6#include <net/tcp.h>
6#include <asm/byteorder.h> 7#include <asm/byteorder.h>
7 8
8typedef unsigned short dn_address; 9typedef unsigned short dn_address;
diff --git a/include/net/inet_hashtables.h b/include/net/inet_hashtables.h
index f5d65121f7b7..c816708fa556 100644
--- a/include/net/inet_hashtables.h
+++ b/include/net/inet_hashtables.h
@@ -19,11 +19,11 @@
19#include <linux/list.h> 19#include <linux/list.h>
20#include <linux/slab.h> 20#include <linux/slab.h>
21#include <linux/spinlock.h> 21#include <linux/spinlock.h>
22#include <linux/tcp.h> /* only for TCP_LISTEN, damn :-( */
23#include <linux/types.h> 22#include <linux/types.h>
24#include <linux/wait.h> 23#include <linux/wait.h>
25 24
26#include <net/sock.h> 25#include <net/sock.h>
26#include <net/tcp_states.h>
27 27
28#include <asm/atomic.h> 28#include <asm/atomic.h>
29 29
diff --git a/include/net/ip6_route.h b/include/net/ip6_route.h
index f920706d526b..1f2e428ca364 100644
--- a/include/net/ip6_route.h
+++ b/include/net/ip6_route.h
@@ -12,7 +12,6 @@
12#include <net/flow.h> 12#include <net/flow.h>
13#include <net/ip6_fib.h> 13#include <net/ip6_fib.h>
14#include <net/sock.h> 14#include <net/sock.h>
15#include <linux/tcp.h>
16#include <linux/ip.h> 15#include <linux/ip.h>
17#include <linux/ipv6.h> 16#include <linux/ipv6.h>
18 17
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h
index 52da5d26617a..7a3c43711a17 100644
--- a/include/net/ip_vs.h
+++ b/include/net/ip_vs.h
@@ -255,7 +255,6 @@ struct ip_vs_daemon_user {
255#include <asm/atomic.h> /* for struct atomic_t */ 255#include <asm/atomic.h> /* for struct atomic_t */
256#include <linux/netdevice.h> /* for struct neighbour */ 256#include <linux/netdevice.h> /* for struct neighbour */
257#include <net/dst.h> /* for struct dst_entry */ 257#include <net/dst.h> /* for struct dst_entry */
258#include <net/tcp.h>
259#include <net/udp.h> 258#include <net/udp.h>
260#include <linux/compiler.h> 259#include <linux/compiler.h>
261 260
diff --git a/include/net/sctp/constants.h b/include/net/sctp/constants.h
index 5999e5684bbf..c51541ee0247 100644
--- a/include/net/sctp/constants.h
+++ b/include/net/sctp/constants.h
@@ -47,10 +47,10 @@
47#ifndef __sctp_constants_h__ 47#ifndef __sctp_constants_h__
48#define __sctp_constants_h__ 48#define __sctp_constants_h__
49 49
50#include <linux/tcp.h> /* For TCP states used in sctp_sock_state_t */
51#include <linux/sctp.h> 50#include <linux/sctp.h>
52#include <linux/ipv6.h> /* For ipv6hdr. */ 51#include <linux/ipv6.h> /* For ipv6hdr. */
53#include <net/sctp/user.h> 52#include <net/sctp/user.h>
53#include <net/tcp_states.h> /* For TCP states used in sctp_sock_state_t */
54 54
55/* Value used for stream negotiation. */ 55/* Value used for stream negotiation. */
56enum { SCTP_MAX_STREAM = 0xffff }; 56enum { SCTP_MAX_STREAM = 0xffff };
diff --git a/include/net/tcp.h b/include/net/tcp.h
index bc110cc7022b..9d026d81d8c8 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -36,6 +36,8 @@
36#include <net/sock.h> 36#include <net/sock.h>
37#include <net/snmp.h> 37#include <net/snmp.h>
38#include <net/ip.h> 38#include <net/ip.h>
39#include <net/tcp_states.h>
40
39#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE) 41#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
40#include <linux/ipv6.h> 42#include <linux/ipv6.h>
41#endif 43#endif
diff --git a/include/net/tcp_states.h b/include/net/tcp_states.h
new file mode 100644
index 000000000000..b9d4176b2d15
--- /dev/null
+++ b/include/net/tcp_states.h
@@ -0,0 +1,34 @@
1/*
2 * INET An implementation of the TCP/IP protocol suite for the LINUX
3 * operating system. INET is implemented using the BSD Socket
4 * interface as the means of communication with the user level.
5 *
6 * Definitions for the TCP protocol sk_state field.
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version
11 * 2 of the License, or (at your option) any later version.
12 */
13#ifndef _LINUX_TCP_STATES_H
14#define _LINUX_TCP_STATES_H
15
16enum {
17 TCP_ESTABLISHED = 1,
18 TCP_SYN_SENT,
19 TCP_SYN_RECV,
20 TCP_FIN_WAIT1,
21 TCP_FIN_WAIT2,
22 TCP_TIME_WAIT,
23 TCP_CLOSE,
24 TCP_CLOSE_WAIT,
25 TCP_LAST_ACK,
26 TCP_LISTEN,
27 TCP_CLOSING, /* Now a valid state */
28
29 TCP_MAX_STATES /* Leave at the end! */
30};
31
32#define TCP_STATE_MASK 0xF
33
34#endif /* _LINUX_TCP_STATES_H */