aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/interface.c
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2019-04-18 10:23:56 +0000
committerOle Trøan <otroan@employees.org>2019-12-04 22:45:11 +0000
commit5f8f6173328f8d77feea5fd100e150c3094c11f0 (patch)
tree16849c6e7619b227a93ce9846f344da2cc96ef2d /src/vnet/interface.c
parent79619c10142e15754e2f0b2ba26c20d415e7c36f (diff)
gre: Multi-point interfaces
Type: feature Change-Id: I0129ad6ace44a50a8a3b26db8e445cd06b2b49e8 Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet/interface.c')
-rw-r--r--src/vnet/interface.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/vnet/interface.c b/src/vnet/interface.c
index 51c5d825812..b2166dcebae 100644
--- a/src/vnet/interface.c
+++ b/src/vnet/interface.c
@@ -1235,6 +1235,16 @@ vnet_sw_interface_is_p2p (vnet_main_t * vnm, u32 sw_if_index)
return (hc->flags & VNET_HW_INTERFACE_CLASS_FLAG_P2P);
}
+int
+vnet_sw_interface_is_nbma (vnet_main_t * vnm, u32 sw_if_index)
+{
+ vnet_hw_interface_t *hw = vnet_get_sup_hw_interface (vnm, sw_if_index);
+ vnet_hw_interface_class_t *hc =
+ vnet_get_hw_interface_class (vnm, hw->hw_class_index);
+
+ return (hc->flags & VNET_HW_INTERFACE_CLASS_FLAG_NBMA);
+}
+
clib_error_t *
vnet_interface_init (vlib_main_t * vm)
{