From patchwork Fri Dec 30 10:52:21 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Emelyanov X-Patchwork-Id: 133629 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 2F5B4B6F9D for ; Fri, 30 Dec 2011 21:52:52 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752510Ab1L3Kwc (ORCPT ); Fri, 30 Dec 2011 05:52:32 -0500 Received: from mailhub.sw.ru ([195.214.232.25]:38969 "EHLO relay.sw.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751459Ab1L3Kwb (ORCPT ); Fri, 30 Dec 2011 05:52:31 -0500 Received: from [10.30.19.237] ([10.30.19.237]) (authenticated bits=0) by relay.sw.ru (8.13.4/8.13.4) with ESMTP id pBUAqLV9012772 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 30 Dec 2011 13:52:24 +0300 (MSK) Message-ID: <4EFD97E5.6080701@parallels.com> Date: Fri, 30 Dec 2011 14:52:21 +0400 From: Pavel Emelyanov User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc15 Thunderbird/3.1.10 MIME-Version: 1.0 To: David Miller , Linux Netdev List Subject: [PATCH 1/7] sock_diag: Arrange sock_diag.h such that it is exportable to userspace Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Properly toss existing components around the ifdef __KERNEL__ and include the header into the header-y target. Signed-off-by: Pavel Emelyanov --- include/linux/Kbuild | 1 + include/linux/sock_diag.h | 10 +++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) 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