summaryrefslogtreecommitdiff
path: root/usr.sbin/dvmrpd/interface.c
diff options
context:
space:
mode:
authorMichele Marchetto <michele@cvs.openbsd.org>2006-12-03 20:14:38 +0000
committerMichele Marchetto <michele@cvs.openbsd.org>2006-12-03 20:14:38 +0000
commit203a010fa05f5d3d23b26d1223c532e480a3646d (patch)
tree72f2e6289f3d3b7e0e8f47862ffad7d6a6261044 /usr.sbin/dvmrpd/interface.c
parent41305b9b281484e92a86490007074dedb744834d (diff)
introduce rde_check_route that selects which routes must be accepted and which discarded.
Still not complete, just a step forward. ok norby@ henning@
Diffstat (limited to 'usr.sbin/dvmrpd/interface.c')
-rw-r--r--usr.sbin/dvmrpd/interface.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/usr.sbin/dvmrpd/interface.c b/usr.sbin/dvmrpd/interface.c
index 453e7683d21..1ee259d535e 100644
--- a/usr.sbin/dvmrpd/interface.c
+++ b/usr.sbin/dvmrpd/interface.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: interface.c,v 1.3 2006/06/02 17:06:50 norby Exp $ */
+/* $OpenBSD: interface.c,v 1.4 2006/12/03 20:14:37 michele Exp $ */
/*
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
@@ -41,6 +41,8 @@
#include "log.h"
#include "dvmrpe.h"
+extern struct dvmrpd_conf *conf;
+
void if_probe_timer(int, short, void *);
int if_start_probe_timer(struct iface *);
int if_stop_probe_timer(struct iface *);
@@ -143,6 +145,19 @@ if_fsm(struct iface *iface, enum iface_event event)
}
struct iface *
+if_find_index(u_short ifindex)
+{
+ struct iface *iface;
+
+ LIST_FOREACH(iface, &conf->iface_list, entry) {
+ if (iface->ifindex == ifindex)
+ return (iface);
+ }
+
+ return (NULL);
+}
+
+struct iface *
if_new(struct kif *kif)
{
struct sockaddr_in *sain;