summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMohsin Kazmi <sykazmi@cisco.com>2018-04-03 14:23:30 +0200
committerNeale Ranns <nranns@cisco.com>2018-04-13 16:15:52 +0000
commita45bdcacebbb2ee4b4bd45cd2d805bb6b2aa671c (patch)
tree845c24589c09c13859fa7e24fd52cdd2a1a706dc
parent1d328abbe9d3d3dd7a0a92d79706616744d5d2fc (diff)
VOM: Add sub_interface in specific routing table
Change-Id: I3700fc1d140e30da783e41762670618f0298c7db Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com> (cherry picked from commit 1e583111ebeb0333435cfad8af10ebe0e9842d4d)
-rw-r--r--src/vpp-api/vom/sub_interface.cpp13
-rw-r--r--src/vpp-api/vom/sub_interface.hpp6
2 files changed, 19 insertions, 0 deletions
diff --git a/src/vpp-api/vom/sub_interface.cpp b/src/vpp-api/vom/sub_interface.cpp
index 94baa3d2ecc..42f75791968 100644
--- a/src/vpp-api/vom/sub_interface.cpp
+++ b/src/vpp-api/vom/sub_interface.cpp
@@ -29,6 +29,19 @@ sub_interface::sub_interface(const interface& parent,
{
}
+/**
+ * Construct a new object matching the desried state
+ */
+sub_interface::sub_interface(const interface& parent,
+ admin_state_t state,
+ const route_domain& rd,
+ vlan_id_t vlan)
+ : interface(mk_name(parent, vlan), parent.type(), state, rd)
+ , m_parent(parent.singular())
+ , m_vlan(vlan)
+{
+}
+
sub_interface::~sub_interface()
{
sweep();
diff --git a/src/vpp-api/vom/sub_interface.hpp b/src/vpp-api/vom/sub_interface.hpp
index 41786e42ef3..506133c900d 100644
--- a/src/vpp-api/vom/sub_interface.hpp
+++ b/src/vpp-api/vom/sub_interface.hpp
@@ -34,6 +34,12 @@ public:
* Construct a new object matching the desried state
*/
sub_interface(const interface& parent, admin_state_t state, vlan_id_t vlan);
+
+ sub_interface(const interface& parent,
+ admin_state_t state,
+ const route_domain& rd,
+ vlan_id_t vlan);
+
/**
* Destructor
*/