aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@ghostprotocols.net>2005-08-09 20:08:28 -0700
committerDavid S. Miller <davem@sunset.davemloft.net>2005-08-29 15:41:54 -0700
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 e70ab19652d..b88fe05fdcb 100644
--- a/include/linux/tcp.h
+++ b/include/linux/tcp.h
@@ -55,24 +55,6 @@ struct tcphdr {
__u16 urg_ptr;
};
-
-enum {
- TCP_ESTABLISHED = 1,
- TCP_SYN_SENT,
- TCP_SYN_RECV,
- TCP_FIN_WAIT1,
- TCP_FIN_WAIT2,
- TCP_TIME_WAIT,
- TCP_CLOSE,
- TCP_CLOSE_WAIT,
- TCP_LAST_ACK,
- TCP_LISTEN,
- TCP_CLOSING, /* now a valid state */
-
- TCP_MAX_STATES /* Leave at the end! */
-};
-
-#define TCP_STATE_MASK 0xF
#define TCP_ACTION_FIN (1 << 7)
enum {
diff --git a/include/net/dn.h b/include/net/dn.h
index 5551c46db39..c1dbbd22279 100644
--- a/include/net/dn.h
+++ b/include/net/dn.h
@@ -3,6 +3,7 @@
#include <linux/dn.h>
#include <net/sock.h>
+#include <net/tcp.h>
#include <asm/byteorder.h>
typedef unsigned short dn_address;
diff --git a/include/net/inet_hashtables.h b/include/net/inet_hashtables.h
index f5d65121f7b..c816708fa55 100644
--- a/include/net/inet_hashtables.h
+++ b/include/net/inet_hashtables.h
@@ -19,11 +19,11 @@
#include <linux/list.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
-#include <linux/tcp.h> /* only for TCP_LISTEN, damn :-( */
#include <linux/types.h>
#include <linux/wait.h>
#include <net/sock.h>
+#include <net/tcp_states.h>
#include <asm/atomic.h>
diff --git a/include/net/ip6_route.h b/include/net/ip6_route.h
index f920706d526..1f2e428ca36 100644
--- a/include/net/ip6_route.h
+++ b/include/net/ip6_route.h
@@ -12,7 +12,6 @@
#include <net/flow.h>
#include <net/ip6_fib.h>
#include <net/sock.h>
-#include <linux/tcp.h>
#include <linux/ip.h>
#include <linux/ipv6.h>
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h
index 52da5d26617..7a3c43711a1 100644
--- a/include/net/ip_vs.h
+++ b/include/net/ip_vs.h
@@ -255,7 +255,6 @@ struct ip_vs_daemon_user {
#include <asm/atomic.h> /* for struct atomic_t */
#include <linux/netdevice.h> /* for struct neighbour */
#include <net/dst.h> /* for struct dst_entry */
-#include <net/tcp.h>
#include <net/udp.h>
#include <linux/compiler.h>
diff --git a/include/net/sctp/constants.h b/include/net/sctp/constants.h
index 5999e5684bb..c51541ee024 100644
--- a/include/net/sctp/constants.h
+++ b/include/net/sctp/constants.h
@@ -47,10 +47,10 @@
#ifndef __sctp_constants_h__
#define __sctp_constants_h__
-#include <linux/tcp.h> /* For TCP states used in sctp_sock_state_t */
#include <linux/sctp.h>
#include <linux/ipv6.h> /* For ipv6hdr. */
#include <net/sctp/user.h>
+#include <net/tcp_states.h> /* For TCP states used in sctp_sock_state_t */
/* Value used for stream negotiation. */
enum { SCTP_MAX_STREAM = 0xffff };
diff --git a/include/net/tcp.h b/include/net/tcp.h
index bc110cc7022..9d026d81d8c 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -36,6 +36,8 @@
#include <net/sock.h>
#include <net/snmp.h>
#include <net/ip.h>
+#include <net/tcp_states.h>
+
#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
#include <linux/ipv6.h>
#endif
diff --git a/include/net/tcp_states.h b/include/net/tcp_states.h
new file mode 100644
index 00000000000..b9d4176b2d1
--- /dev/null
+++ b/include/net/tcp_states.h
@@ -0,0 +1,34 @@
+/*
+ * INET An implementation of the TCP/IP protocol suite for the LINUX
+ * operating system. INET is implemented using the BSD Socket
+ * interface as the means of communication with the user level.
+ *
+ * Definitions for the TCP protocol sk_state field.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+#ifndef _LINUX_TCP_STATES_H
+#define _LINUX_TCP_STATES_H
+
+enum {
+ TCP_ESTABLISHED = 1,
+ TCP_SYN_SENT,
+ TCP_SYN_RECV,
+ TCP_FIN_WAIT1,
+ TCP_FIN_WAIT2,
+ TCP_TIME_WAIT,
+ TCP_CLOSE,
+ TCP_CLOSE_WAIT,
+ TCP_LAST_ACK,
+ TCP_LISTEN,
+ TCP_CLOSING, /* Now a valid state */
+
+ TCP_MAX_STATES /* Leave at the end! */
+};
+
+#define TCP_STATE_MASK 0xF
+
+#endif /* _LINUX_TCP_STATES_H */