]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - include/linux/sock_diag.h
sock_diag: Arrange sock_diag.h such that it is exportable to userspace
[karo-tx-linux.git] / include / linux / sock_diag.h
index 379d5dccf8e1c6af8a2d65411a7739a747c0587c..66bc18ef4fa434a9a39e47d4f12644dee3912ad6 100644 (file)
@@ -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