From: Pavel Emelyanov Date: Fri, 30 Dec 2011 00:52:21 +0000 (+0000) Subject: sock_diag: Arrange sock_diag.h such that it is exportable to userspace X-Git-Tag: v3.3-rc1~182^2~75 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e6fe2371bdd3713d0b227e9cd7f905e127ff81a0;p=profile%2Fivi%2Fkernel-x86-ivi.git 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 Signed-off-by: David S. Miller --- diff --git a/include/linux/Kbuild b/include/linux/Kbuild index 0b091b3..8e484d6 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild @@ -195,6 +195,7 @@ header-y += igmp.h header-y += in.h header-y += in6.h header-y += in_route.h +header-y += sock_diag.h header-y += inet_diag.h header-y += inotify.h header-y += input.h diff --git a/include/linux/sock_diag.h b/include/linux/sock_diag.h index 379d5dc..66bc18e 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 -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