[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>
This commit is contained in:

committed by
David S. Miller

parent
f3f05f7046
commit
c752f0739f
@@ -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;
|
||||
|
@@ -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>
|
||||
|
||||
|
@@ -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>
|
||||
|
||||
|
@@ -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>
|
||||
|
||||
|
@@ -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 };
|
||||
|
@@ -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
|
||||
|
34
include/net/tcp_states.h
Normal file
34
include/net/tcp_states.h
Normal file
@@ -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 */
|
Reference in New Issue
Block a user