summaryrefslogtreecommitdiff
path: root/nest/iface.h
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2010-03-11 18:07:24 +0100
committerOndrej Zajicek <santiago@crfreenet.org>2010-03-11 18:07:24 +0100
commite7b76b976084006e430543f4b872f624326dbfe6 (patch)
treef215cce7aaeddfdb03164b67381d5eddb889d03f /nest/iface.h
parent353729f513aa6a1f9e7f66083a0f9d2117fe2be5 (diff)
Temoporary OSPF commit - socket changes.
Diffstat (limited to 'nest/iface.h')
-rw-r--r--nest/iface.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/nest/iface.h b/nest/iface.h
index a982c17f..b7c3c19c 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 {