summaryrefslogtreecommitdiffstats
path: root/nest/iface.h
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2010-03-26 18:53:31 +0100
committerOndrej Zajicek <santiago@crfreenet.org>2010-03-26 18:53:31 +0100
commiteb0f129fcedcecbee85403095abad8f59b82683c (patch)
tree562179cf65bcdcfe1fc2ea42b401ddce620de350 /nest/iface.h
parentb1c030b0ba59eed6da5271ed592d6b93ed088518 (diff)
parent48cff379a718998cd984d60fb6f8b48cb961c0f1 (diff)
downloadbird-eb0f129fcedcecbee85403095abad8f59b82683c.tar
bird-eb0f129fcedcecbee85403095abad8f59b82683c.zip
Merge branch 'socket2' into new
Diffstat (limited to 'nest/iface.h')
-rw-r--r--nest/iface.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/nest/iface.h b/nest/iface.h
index 8fc2567..c116db8 100644
--- a/nest/iface.h
+++ b/nest/iface.h
@@ -83,6 +83,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 {
@@ -135,7 +144,8 @@ struct iface_patt {
/* Protocol-specific data follow after this structure */
};
-struct iface_patt *iface_patt_find(list *, struct iface *);
+int iface_patt_match(struct iface_patt *ifp, struct iface *i, struct ifa *a);
+struct iface_patt *iface_patt_find(list *l, struct iface *i, struct ifa *a);
int iface_patts_equal(list *, list *, int (*)(struct iface_patt *, struct iface_patt *));
#endif