summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorHideaki Yoshifuji <yoshfuji@linux-ipv6.org>2003-05-25 05:43:02 -0700
committerDavid S. Miller <davem@nuts.ninka.net>2003-05-25 05:43:02 -0700
commita9b7fa76e5b5b69248cd07d43bd2fb1657de65c5 (patch)
tree919ae8c7192a211c99fad6f032abde3f284cfccd /include
parent26a2fcbd9d4c2a4dbd79eb1528c20f222f7c6498 (diff)
[IPV4/6]: Common TCP procfs infrastructure.
Diffstat (limited to 'include')
-rw-r--r--include/net/tcp.h28
1 files changed, 28 insertions, 0 deletions
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 <linux/ipv6.h>
#endif
+#include <linux/seq_file.h>
/* 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 */