summaryrefslogtreecommitdiff
path: root/include/linux/sock_diag.h
diff options
context:
space:
mode:
authorPavel Emelyanov <xemul@parallels.com>2011-12-30 04:52:21 +0400
committerDavid S. Miller <davem@davemloft.net>2011-12-31 01:42:18 +0400
commite6fe2371bdd3713d0b227e9cd7f905e127ff81a0 (patch)
tree504c0ee7fabcffc6b53ad7ea33e161189252444f /include/linux/sock_diag.h
parent56be178875cf699a17cc285171492353620ef0ae (diff)
downloadlinux-e6fe2371bdd3713d0b227e9cd7f905e127ff81a0.tar.xz
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>
Diffstat (limited to 'include/linux/sock_diag.h')
-rw-r--r--include/linux/sock_diag.h10
1 files changed, 7 insertions, 3 deletions
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 @@
#ifndef __SOCK_DIAG_H__
#define __SOCK_DIAG_H__
-#define SOCK_DIAG_BY_FAMILY 20
+#include <linux/types.h>
-struct sk_buff;
-struct nlmsghdr;
+#define SOCK_DIAG_BY_FAMILY 20
struct sock_diag_req {
__u8 sdiag_family;
__u8 sdiag_protocol;
};
+#ifdef __KERNEL__
+struct sk_buff;
+struct nlmsghdr;
+
struct sock_diag_handler {
__u8 family;
int (*dump)(struct sk_buff *skb, struct nlmsghdr *nlh);
@@ -26,4 +29,5 @@ int sock_diag_check_cookie(void *sk, __u32 *cookie);
void sock_diag_save_cookie(void *sk, __u32 *cookie);
extern struct sock *sock_diag_nlsk;
+#endif /* KERNEL */
#endif