summaryrefslogtreecommitdiff
path: root/lib/if.h
diff options
context:
space:
mode:
authorLouis Scalbert <louis.scalbert@6wind.com>2022-04-22 18:08:08 +0200
committerDonatas Abraitis <donatas@opensourcerouting.org>2023-01-15 12:22:24 +0200
commitb2cfd204a8ec751c9c9ac00a27272f4b5c0721e3 (patch)
treec1c4cef5c4b877bfc00b08b324a587d47fcede37 /lib/if.h
parentb4710d034dc84ad1dfd3023e736d43418231de8f (diff)
lib: add a function to get the VRF or loopback interface
Add a function to find the VRF or the loopback interface: the loopback interface for the default VRF and the VRF master interface otherwise. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Diffstat (limited to 'lib/if.h')
-rw-r--r--lib/if.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/if.h b/lib/if.h
index 91dcd46247..a653246ccb 100644
--- a/lib/if.h
+++ b/lib/if.h
@@ -532,6 +532,7 @@ static inline bool if_address_is_local(const void *matchaddr, int family,
struct vrf;
extern struct interface *if_lookup_by_name_vrf(const char *name, struct vrf *vrf);
extern struct interface *if_lookup_by_name(const char *ifname, vrf_id_t vrf_id);
+extern struct interface *if_get_vrf_loopback(vrf_id_t vrf_id);
extern struct interface *if_get_by_name(const char *ifname, vrf_id_t vrf_id,
const char *vrf_name);