From patchwork Wed Oct 24 16:02:55 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Dichtel X-Patchwork-Id: 193839 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 E03D02C0091 for ; Thu, 25 Oct 2012 02:54:48 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758609Ab2JXPyr (ORCPT ); Wed, 24 Oct 2012 11:54:47 -0400 Received: from 33.106-14-84.ripe.coltfrance.com ([84.14.106.33]:35369 "EHLO proxy.6wind.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757599Ab2JXPyp (ORCPT ); Wed, 24 Oct 2012 11:54:45 -0400 Received: from schnaps.dev.6wind.com (unknown [10.16.0.249]) by proxy.6wind.com (Postfix) with ESMTPS id 2F57F5A38C; Wed, 24 Oct 2012 17:54:44 +0200 (CEST) Received: from root by schnaps.dev.6wind.com with local (Exim 4.80) (envelope-from ) id 1TR3Qj-00012A-TL; Wed, 24 Oct 2012 18:03:41 +0200 From: Nicolas Dichtel To: davem@davemloft.net Cc: netdev@vger.kernel.org, Nicolas Dichtel Subject: [RFC PATCH net-next v2 1/5] rtnl: add a new type of msg to advertise protocol configuration Date: Wed, 24 Oct 2012 18:02:55 +0200 Message-Id: <1351094579-3911-2-git-send-email-nicolas.dichtel@6wind.com> X-Mailer: git-send-email 1.7.12 In-Reply-To: <1351094579-3911-1-git-send-email-nicolas.dichtel@6wind.com> References: <20121023.132940.1732325493436273627.davem@davemloft.net> <1351094579-3911-1-git-send-email-nicolas.dichtel@6wind.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org A new type is added to allow userland to monitor protocol configuration, like IPv4 or IPv6. For example, monitoring the state of the forwarding status of an interface of the system. Signed-off-by: Nicolas Dichtel --- include/uapi/linux/netconf.h | 22 ++++++++++++++++++++++ include/uapi/linux/rtnetlink.h | 5 +++++ 2 files changed, 27 insertions(+) create mode 100644 include/uapi/linux/netconf.h diff --git a/include/uapi/linux/netconf.h b/include/uapi/linux/netconf.h new file mode 100644 index 0000000..d051372 --- /dev/null +++ b/include/uapi/linux/netconf.h @@ -0,0 +1,22 @@ +#ifndef _UAPI_LINUX_NETCONF_H_ +#define _UAPI_LINUX_NETCONF_H_ + +#include +#include + +struct netconfmsg { + __u8 ncm_family; +}; + +enum { + NETCONFA_UNSPEC, + NETCONFA_IFINDEX, + NETCONFA_FORWARDING, + __NETCONFA_MAX +}; +#define NETCONFA_MAX (__NETCONFA_MAX - 1) + +#define NETCONFA_IFINDEX_ALL -1 +#define NETCONFA_IFINDEX_DEFAULT -2 + +#endif /* _UAPI_LINUX_NETCONF_H_ */ diff --git a/include/uapi/linux/rtnetlink.h b/include/uapi/linux/rtnetlink.h index fcd768b..0043b41 100644 --- a/include/uapi/linux/rtnetlink.h +++ b/include/uapi/linux/rtnetlink.h @@ -120,6 +120,11 @@ enum { RTM_SETDCB, #define RTM_SETDCB RTM_SETDCB + RTM_NEWNETCONF = 80, +#define RTM_NEWNETCONF RTM_NEWNETCONF + RTM_GETNETCONF = 82, +#define RTM_GETNETCONF RTM_GETNETCONF + __RTM_MAX, #define RTM_MAX (((__RTM_MAX + 3) & ~3) - 1) };