summaryrefslogtreecommitdiffstats
path: root/ldpd/l2vpn.c
diff options
context:
space:
mode:
Diffstat (limited to 'ldpd/l2vpn.c')
-rw-r--r--ldpd/l2vpn.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/ldpd/l2vpn.c b/ldpd/l2vpn.c
index 29302c465..ca40636e0 100644
--- a/ldpd/l2vpn.c
+++ b/ldpd/l2vpn.c
@@ -201,6 +201,24 @@ l2vpn_pw_find(struct l2vpn *l2vpn, const char *ifname)
return (RB_FIND(l2vpn_pw_head, &l2vpn->pw_inactive_tree, &s));
}
+struct l2vpn_pw *
+l2vpn_pw_find_active(struct l2vpn *l2vpn, const char *ifname)
+{
+ struct l2vpn_pw s;
+
+ strlcpy(s.ifname, ifname, sizeof(s.ifname));
+ return (RB_FIND(l2vpn_pw_head, &l2vpn->pw_tree, &s));
+}
+
+struct l2vpn_pw *
+l2vpn_pw_find_inactive(struct l2vpn *l2vpn, const char *ifname)
+{
+ struct l2vpn_pw s;
+
+ strlcpy(s.ifname, ifname, sizeof(s.ifname));
+ return (RB_FIND(l2vpn_pw_head, &l2vpn->pw_inactive_tree, &s));
+}
+
void
l2vpn_pw_init(struct l2vpn_pw *pw)
{