From e7b76b976084006e430543f4b872f624326dbfe6 Mon Sep 17 00:00:00 2001 From: Ondrej Zajicek Date: Thu, 11 Mar 2010 18:07:24 +0100 Subject: Temoporary OSPF commit - socket changes. --- nest/iface.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'nest') diff --git a/nest/iface.h b/nest/iface.h index a982c17..b7c3c19 100644 --- a/nest/iface.h +++ b/nest/iface.h @@ -82,6 +82,15 @@ struct iface *if_find_by_index(unsigned); struct iface *if_find_by_name(char *); void ifa_recalc_all_primary_addresses(void); +static inline int +ifa_match_addr(struct ifa *ifa, ip_addr addr) +{ + if (ifa->flags & IA_UNNUMBERED) + return ipa_equal(addr, ifa->opposite); + else + return ipa_in_net(addr, ifa->prefix, ifa->pxlen); +} + /* The Neighbor Cache */ typedef struct neighbor { -- cgit v1.2.3