From a9b7fa76e5b5b69248cd07d43bd2fb1657de65c5 Mon Sep 17 00:00:00 2001 From: Hideaki Yoshifuji Date: Sun, 25 May 2003 05:43:02 -0700 Subject: [IPV4/6]: Common TCP procfs infrastructure. --- include/net/tcp.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'include') diff --git a/include/net/tcp.h b/include/net/tcp.h index 080e2f0d06f0..158ee68198b4 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -35,6 +35,7 @@ #if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE) #include #endif +#include /* This is for all connections with a full identity, no wildcards. * New scheme, half the table is for TIME_WAIT, the other half is @@ -1889,4 +1890,31 @@ static inline void tcp_mib_init(void) TCP_ADD_STATS_USER(TcpMaxConn, -1); } +/* /proc */ +enum tcp_seq_states { + TCP_SEQ_STATE_LISTENING, + TCP_SEQ_STATE_OPENREQ, + TCP_SEQ_STATE_ESTABLISHED, + TCP_SEQ_STATE_TIME_WAIT, +}; + +struct tcp_seq_afinfo { + struct module *owner; + char *name; + sa_family_t family; + int (*seq_show) (struct seq_file *m, void *v); + struct file_operations *seq_fops; +}; + +struct tcp_iter_state { + sa_family_t family; + enum tcp_seq_states state; + struct sock *syn_wait_sk; + int bucket, sbucket, num, uid; + struct seq_operations seq_ops; +}; + +extern int tcp_proc_register(struct tcp_seq_afinfo *afinfo); +extern void tcp_proc_unregister(struct tcp_seq_afinfo *afinfo); + #endif /* _TCP_H */ -- cgit v1.2.3