diff options
author | Chad Wang <imflinter@gmail.com> | 2018-03-15 14:06:42 -0400 |
---|---|---|
committer | Chad Wang <imflinter@gmail.com> | 2018-04-04 10:26:45 -0400 |
commit | 2ab698c963b12219aecf72d001ae28c173548933 (patch) | |
tree | f271ebd670c242c3cde7157d0861fc2503feff2c /netlink/librtnl/netns.h | |
parent | 042a782c530ceb58507d697726e68ad7fe4fe023 (diff) |
Add support for MPLS labels in router plugin
1. Fixed more formatting issues. Added ASSERT.
2. Added MPLS features to support iproute2 command like
ip -f mpls route add <label> dev vpp0
ip route add <IP> encap mpls <LABELS> via <IP> dev vpp0
3. Modifications to compile with the latest VPP.
Change-Id: I5ed55ec3c6484beb1377496e9c763bb55da7ee26
Signed-off-by: Chad Wang <imflinter@gmail.com>
Diffstat (limited to 'netlink/librtnl/netns.h')
-rw-r--r-- | netlink/librtnl/netns.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/netlink/librtnl/netns.h b/netlink/librtnl/netns.h index fb87ac7..23f2dc2 100644 --- a/netlink/librtnl/netns.h +++ b/netlink/librtnl/netns.h @@ -25,6 +25,11 @@ #include <librtnl/rtnl.h> +/*include it for 'struct mpls_label'*/ +#include <linux/mpls.h> +/*so far depth is fixed, looking into ways to be dynamic*/ +#define MPLS_STACK_DEPTH 7 + typedef struct { struct ifinfomsg ifi; u8 hwaddr[IFHWADDRLEN]; @@ -41,6 +46,7 @@ typedef struct { struct rtmsg rtm; u8 dst[16]; u8 src[16]; + u8 via[16]; u8 prefsrc[16]; u32 iif; u32 oif; @@ -48,6 +54,7 @@ typedef struct { u8 gateway[16]; u32 priority; struct rta_cacheinfo cacheinfo; + struct mpls_label encap[MPLS_STACK_DEPTH]; f64 last_updated; } ns_route_t; |