aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/interface.c
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2018-05-22 08:40:52 -0700
committerDamjan Marion <dmarion.lists@gmail.com>2018-05-25 11:45:48 +0000
commit0053de63ec4bf8b9bce7817f1b61c9791baf6c26 (patch)
tree17fe95628d3b9f5c3d226c3ff79fb2b3027a2b80 /src/vnet/interface.c
parent096e6be4bda3b409aa6fc400d0ce507ea415f26b (diff)
ARP proxy dumps
Change-Id: I8335ebf266becf2f42bb3f28a17dfed8d9b08f97 Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet/interface.c')
-rw-r--r--src/vnet/interface.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/vnet/interface.c b/src/vnet/interface.c
index d3ad896be12..36793f1177e 100644
--- a/src/vnet/interface.c
+++ b/src/vnet/interface.c
@@ -998,11 +998,30 @@ vnet_hw_interface_walk_sw (vnet_main_t * vnm,
hash_foreach (id, sw_if_index,
hi->sub_interface_sw_if_index_by_id,
({
- fn (vnm, sw_if_index, ctx);
+ if (WALK_STOP == fn (vnm, sw_if_index, ctx))
+ break;
}));
/* *INDENT-ON* */
}
+void
+vnet_sw_interface_walk (vnet_main_t * vnm,
+ vnet_sw_interface_walk_t fn, void *ctx)
+{
+ vnet_interface_main_t *im;
+ vnet_sw_interface_t *si;
+
+ im = &vnm->interface_main;
+
+ /* *INDENT-OFF* */
+ pool_foreach (si, im->sw_interfaces,
+ {
+ if (WALK_STOP == fn (vnm, si, ctx))
+ break;
+ });
+ /* *INDENT-ON* */
+}
+
static void
serialize_vnet_hw_interface_set_class (serialize_main_t * m, va_list * va)
{