diff mbox

[iproute2-next,1/2] include: update linux/rtnetlink.h

Message ID 1428568214-8673-1-git-send-email-nicolas.dichtel@6wind.com
State Superseded, archived
Delegated to: stephen hemminger
Headers show

Commit Message

Nicolas Dichtel April 9, 2015, 8:30 a.m. UTC
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---
 include/linux/rtnetlink.h | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Stephen Hemminger April 10, 2015, 8:24 p.m. UTC | #1
On Thu,  9 Apr 2015 10:30:13 +0200
Nicolas Dichtel <nicolas.dichtel@6wind.com> wrote:

> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
> ---
>  include/linux/rtnetlink.h | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h
> index 28650a31d77f..702b19b4207e 100644
> --- a/include/linux/rtnetlink.h
> +++ b/include/linux/rtnetlink.h
> @@ -134,6 +134,8 @@ enum {
>  
>  	RTM_NEWNSID = 88,
>  #define RTM_NEWNSID RTM_NEWNSID
> +	RTM_DELNSID = 89,
> +#define RTM_DELNSID RTM_DELNSID
>  	RTM_GETNSID = 90,
>  #define RTM_GETNSID RTM_GETNSID
>  
> @@ -633,6 +635,8 @@ enum rtnetlink_groups {
>  #define RTNLGRP_MDB		RTNLGRP_MDB
>  	RTNLGRP_MPLS_ROUTE,
>  #define RTNLGRP_MPLS_ROUTE	RTNLGRP_MPLS_ROUTE
> +	RTNLGRP_NSID,
> +#define RTNLGRP_NSID		RTNLGRP_NSID
>  	__RTNLGRP_MAX
>  };
>  #define RTNLGRP_MAX	(__RTNLGRP_MAX - 1)

Unnecessary, already don on net-next branch
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
stephen hemminger April 20, 2015, 5:02 p.m. UTC | #2
On Thu, 9 Apr 2015 08:30:14 +0000
Nicolas Dichtel <nicolas.dichtel@6wind.com> wrote:

> Two commands are added:
>  - ip netns list-id
>  - ip monitor nsid
> 
> A cache is also added to remember the association between the iproute2 netns
> name (from /var/run/netns/) and the nsid.
> To avoid interfering with the rth socket, a new rtnl socket (rtnsh) is used to
> get nsid (we may send rtnl request during listing on rth).
> 
> Example:
> $ ip netns list-id
> nsid 0 (iproute2 netns name: foo)
> $ ip monitor nsid
> Deleted nsid 0 (iproute2 netns name: foo)
> nsid 16 (iproute2 netns name: bar)
> 
> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>

Applied with a couple of little style cleanups.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h
index 28650a31d77f..702b19b4207e 100644
--- a/include/linux/rtnetlink.h
+++ b/include/linux/rtnetlink.h
@@ -134,6 +134,8 @@  enum {
 
 	RTM_NEWNSID = 88,
 #define RTM_NEWNSID RTM_NEWNSID
+	RTM_DELNSID = 89,
+#define RTM_DELNSID RTM_DELNSID
 	RTM_GETNSID = 90,
 #define RTM_GETNSID RTM_GETNSID
 
@@ -633,6 +635,8 @@  enum rtnetlink_groups {
 #define RTNLGRP_MDB		RTNLGRP_MDB
 	RTNLGRP_MPLS_ROUTE,
 #define RTNLGRP_MPLS_ROUTE	RTNLGRP_MPLS_ROUTE
+	RTNLGRP_NSID,
+#define RTNLGRP_NSID		RTNLGRP_NSID
 	__RTNLGRP_MAX
 };
 #define RTNLGRP_MAX	(__RTNLGRP_MAX - 1)