From ed45f2e126680c7197be2058f9c162f1d5019eeb Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Sun, 29 Nov 1998 22:01:03 +0000 Subject: Added functions for manipulating interface name pattern lists: o iface_patt_match(list, iface) -- match interface against list o iface_patts_equal(a, b, c) -- compare whether two pattern lists are equal or not. c(x,y) is called for comparison of protocol-dependent data. --- nest/iface.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'nest/iface.h') diff --git a/nest/iface.h b/nest/iface.h index ea93720..62b3f94 100644 --- a/nest/iface.h +++ b/nest/iface.h @@ -91,4 +91,18 @@ neighbor *neigh_find(struct proto *, ip_addr *, unsigned flags); void neigh_dump(neighbor *); void neigh_dump_all(void); +/* + * Interface Pattern Lists + */ + +struct iface_patt { + node n; + byte *pattern; /* Interface name pattern */ + + /* Protocol-specific data follow */ +}; + +struct iface_patt *iface_patt_match(list *, struct iface *); +int iface_patts_equal(list *, list *, int (*)(struct iface_patt *, struct iface_patt *)); + #endif -- cgit v1.2.3