summaryrefslogtreecommitdiffstats
path: root/src/vpp-api/vom/interface_types.cpp
diff options
context:
space:
mode:
authorNeale Ranns <neale.ranns@cisco.com>2018-02-20 08:10:44 -0800
committerDamjan Marion <dmarion.lists@gmail.com>2018-02-22 19:57:08 +0000
commit4ef4226282685a049aad439080ca5478da09ac06 (patch)
treed9cefcdd79d9d5195b3862e56924ce8abb9218e8 /src/vpp-api/vom/interface_types.cpp
parentde0203edd2177f627cc655b52ffdf921d94d5d26 (diff)
VOM: vhost-use interfaces
Change-Id: Iee1574d1f0f081ccc4a90fd9825a0b5e254aa642 Signed-off-by: Neale Ranns <neale.ranns@cisco.com> Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Diffstat (limited to 'src/vpp-api/vom/interface_types.cpp')
-rw-r--r--src/vpp-api/vom/interface_types.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/vpp-api/vom/interface_types.cpp b/src/vpp-api/vom/interface_types.cpp
index a089f589f33..6d3dcae57f2 100644
--- a/src/vpp-api/vom/interface_types.cpp
+++ b/src/vpp-api/vom/interface_types.cpp
@@ -27,6 +27,7 @@ const interface::type_t interface::type_t::AFPACKET(4, "AFPACKET");
const interface::type_t interface::type_t::LOOPBACK(5, "LOOPBACK");
const interface::type_t interface::type_t::LOCAL(6, "LOCAL");
const interface::type_t interface::type_t::TAP(7, "TAP");
+const interface::type_t interface::type_t::VHOST(8, "VHOST");
const interface::oper_state_t interface::oper_state_t::DOWN(0, "down");
const interface::oper_state_t interface::oper_state_t::UP(1, "up");
@@ -37,7 +38,10 @@ const interface::admin_state_t interface::admin_state_t::UP(1, "up");
interface::type_t
interface::type_t::from_string(const std::string& str)
{
- if (str.find("Ethernet") != std::string::npos) {
+ if ((str.find("Virtual") != std::string::npos) ||
+ (str.find("vhost") != std::string::npos)) {
+ return interface::type_t::VHOST;
+ } else if (str.find("Ethernet") != std::string::npos) {
return interface::type_t::ETHERNET;
} else if (str.find("vxlan") != std::string::npos) {
return interface::type_t::VXLAN;