summaryrefslogtreecommitdiffstats
path: root/src/vpp-api/vom/prefix.cpp
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2018-01-03 04:18:48 -0800
committerOle Trøan <otroan@employees.org>2018-01-09 16:38:19 +0000
commitf068c3ed296c49dfbfe17677fc1ad2428fb4e3e4 (patch)
treeeef3c7c502b68ccdff9c5d80d04850465e25ef01 /src/vpp-api/vom/prefix.cpp
parent0e8cb6c475b616a3296b08d25bcaa1eed3ab0084 (diff)
DVR: run L3 output features
- rename l2_bridged to is_dvr. Including on the ip.api this was new in the 18.01 release so no compatability issues. - steal the free space in vnet_buffer_opaque_t for use with flags. - run the ipX-output feature arc from the DVR DPO Change-Id: I040e5976d1dbe076fcdda3a40a7804f56337ce3f Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vpp-api/vom/prefix.cpp')
-rw-r--r--src/vpp-api/vom/prefix.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/vpp-api/vom/prefix.cpp b/src/vpp-api/vom/prefix.cpp
index e754999b6d1..abd589eef9f 100644
--- a/src/vpp-api/vom/prefix.cpp
+++ b/src/vpp-api/vom/prefix.cpp
@@ -53,6 +53,19 @@ l3_proto_t::from_address(const boost::asio::ip::address& addr)
return IPV4;
}
+const nh_proto_t&
+l3_proto_t::to_nh_proto() const
+{
+ if (*this == IPV4)
+ return nh_proto_t::IPV4;
+ else if (*this == IPV6)
+ return nh_proto_t::IPV6;
+ else if (*this == MPLS)
+ return nh_proto_t::MPLS;
+
+ return nh_proto_t::IPV4;
+}
+
std::ostream&
operator<<(std::ostream& os, const l3_proto_t& l3p)
{