diff options
author | Pavel Emelyanov <xemul@openvz.org> | 2007-11-20 01:36:45 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 17:54:30 -0500 |
commit | b673e4dfc8f29e5bfe4d342029b793e9d504f6dd (patch) | |
tree | e0282a3819176b9f28eb7e2021c55c70bdbda50e /include/net/raw.h | |
parent | 69d6da0b0faa70249a243a14e6066c013e9294e5 (diff) |
[RAW]: Introduce raw_hashinfo structure
The ipv4/raw.c and ipv6/raw.c contain many common code (most
of which is proc interface) which can be consolidated.
Most of the places to consolidate deal with the raw sockets
hashtable, so introduce a struct raw_hashinfo which describes
the raw sockets hash.
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/raw.h')
-rw-r--r-- | include/net/raw.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/net/raw.h b/include/net/raw.h index 7fc3c770f170..70b27c7c8167 100644 --- a/include/net/raw.h +++ b/include/net/raw.h | |||
@@ -27,6 +27,13 @@ int raw_local_deliver(struct sk_buff *, int); | |||
27 | 27 | ||
28 | extern int raw_rcv(struct sock *, struct sk_buff *); | 28 | extern int raw_rcv(struct sock *, struct sk_buff *); |
29 | 29 | ||
30 | #define RAW_HTABLE_SIZE MAX_INET_PROTOS | ||
31 | |||
32 | struct raw_hashinfo { | ||
33 | rwlock_t lock; | ||
34 | struct hlist_head ht[RAW_HTABLE_SIZE]; | ||
35 | }; | ||
36 | |||
30 | #ifdef CONFIG_PROC_FS | 37 | #ifdef CONFIG_PROC_FS |
31 | extern int raw_proc_init(void); | 38 | extern int raw_proc_init(void); |
32 | extern void raw_proc_exit(void); | 39 | extern void raw_proc_exit(void); |