diff options
author | Pavel Emelyanov <xemul@parallels.com> | 2011-12-29 19:52:21 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-12-30 16:42:18 -0500 |
commit | e6fe2371bdd3713d0b227e9cd7f905e127ff81a0 (patch) | |
tree | 504c0ee7fabcffc6b53ad7ea33e161189252444f | |
parent | 56be178875cf699a17cc285171492353620ef0ae (diff) |
sock_diag: Arrange sock_diag.h such that it is exportable to userspace
Properly toss existing components around the ifdef __KERNEL__
and include the header into the header-y target.
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | include/linux/Kbuild | 1 | ||||
-rw-r--r-- | include/linux/sock_diag.h | 10 |
2 files changed, 8 insertions, 3 deletions
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index 0b091b32267d..8e484d660bc3 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
@@ -195,6 +195,7 @@ header-y += igmp.h | |||
195 | header-y += in.h | 195 | header-y += in.h |
196 | header-y += in6.h | 196 | header-y += in6.h |
197 | header-y += in_route.h | 197 | header-y += in_route.h |
198 | header-y += sock_diag.h | ||
198 | header-y += inet_diag.h | 199 | header-y += inet_diag.h |
199 | header-y += inotify.h | 200 | header-y += inotify.h |
200 | header-y += input.h | 201 | header-y += input.h |
diff --git a/include/linux/sock_diag.h b/include/linux/sock_diag.h index 379d5dccf8e1..66bc18ef4fa4 100644 --- a/include/linux/sock_diag.h +++ b/include/linux/sock_diag.h | |||
@@ -1,16 +1,19 @@ | |||
1 | #ifndef __SOCK_DIAG_H__ | 1 | #ifndef __SOCK_DIAG_H__ |
2 | #define __SOCK_DIAG_H__ | 2 | #define __SOCK_DIAG_H__ |
3 | 3 | ||
4 | #define SOCK_DIAG_BY_FAMILY 20 | 4 | #include <linux/types.h> |
5 | 5 | ||
6 | struct sk_buff; | 6 | #define SOCK_DIAG_BY_FAMILY 20 |
7 | struct nlmsghdr; | ||
8 | 7 | ||
9 | struct sock_diag_req { | 8 | struct sock_diag_req { |
10 | __u8 sdiag_family; | 9 | __u8 sdiag_family; |
11 | __u8 sdiag_protocol; | 10 | __u8 sdiag_protocol; |
12 | }; | 11 | }; |
13 | 12 | ||
13 | #ifdef __KERNEL__ | ||
14 | struct sk_buff; | ||
15 | struct nlmsghdr; | ||
16 | |||
14 | struct sock_diag_handler { | 17 | struct sock_diag_handler { |
15 | __u8 family; | 18 | __u8 family; |
16 | int (*dump)(struct sk_buff *skb, struct nlmsghdr *nlh); | 19 | int (*dump)(struct sk_buff *skb, struct nlmsghdr *nlh); |
@@ -26,4 +29,5 @@ int sock_diag_check_cookie(void *sk, __u32 *cookie); | |||
26 | void sock_diag_save_cookie(void *sk, __u32 *cookie); | 29 | void sock_diag_save_cookie(void *sk, __u32 *cookie); |
27 | 30 | ||
28 | extern struct sock *sock_diag_nlsk; | 31 | extern struct sock *sock_diag_nlsk; |
32 | #endif /* KERNEL */ | ||
29 | #endif | 33 | #endif |