summaryrefslogtreecommitdiffstats
path: root/lib/if.h
diff options
context:
space:
mode:
authorPat Ruddy <pat@voltanet.io>2020-10-01 13:06:50 +0200
committerPat Ruddy <pat@voltanet.io>2021-02-02 10:37:08 +0100
commit0760a74d2fc29a89d1d0d252af98d674323b210a (patch)
tree6e38d606148eca387f22b5209fa53560d6cd0bfa /lib/if.h
parentbgpd, lib: add mplsL3VpnVrf table (diff)
downloadfrr-0760a74d2fc29a89d1d0d252af98d674323b210a.tar.xz
frr-0760a74d2fc29a89d1d0d252af98d674323b210a.zip
lib: add utility to get the next index in a vrf
Add if_vrf_lookup_by_index_next to get the next ifindex in a vrf given the previous ifindex or 0 for the first. Signed-off-by: Pat Ruddy <pat@voltanet.io>
Diffstat (limited to 'lib/if.h')
-rw-r--r--lib/if.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/if.h b/lib/if.h
index a2a40d095..5bf52936a 100644
--- a/lib/if.h
+++ b/lib/if.h
@@ -513,6 +513,8 @@ extern struct interface *if_create_name(const char *name, vrf_id_t vrf_id);
/* Create new interface, adds to index list only */
extern struct interface *if_create_ifindex(ifindex_t ifindex, vrf_id_t vrf_id);
extern struct interface *if_lookup_by_index(ifindex_t, vrf_id_t vrf_id);
+extern struct interface *if_vrf_lookup_by_index_next(ifindex_t ifindex,
+ vrf_id_t vrf_id);
extern struct interface *if_lookup_by_index_all_vrf(ifindex_t);
extern struct interface *if_lookup_exact_address(const void *matchaddr,
int family, vrf_id_t vrf_id);