diff options
author | Martin Mares <mj@ucw.cz> | 2000-03-27 12:16:37 +0000 |
---|---|---|
committer | Martin Mares <mj@ucw.cz> | 2000-03-27 12:16:37 +0000 |
commit | 200accf396b869267fd707b56afddb27d8479acc (patch) | |
tree | 97f6b7ca48da585cd504a849c69928d6f3fe5ed4 /nest/iface.h | |
parent | 6480dd08803bc46bcd19b466ac6c499699d17448 (diff) |
if_connected() is again private.
Introduced neigh_connected_to() to serve the same purpose efficiently.
Diffstat (limited to 'nest/iface.h')
-rw-r--r-- | nest/iface.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/nest/iface.h b/nest/iface.h index 379f566c..94c0945b 100644 --- a/nest/iface.h +++ b/nest/iface.h @@ -114,6 +114,12 @@ typedef struct neighbor { */ neighbor *neigh_find(struct proto *, ip_addr *, unsigned flags); +static inline int neigh_connected_to(struct proto *p, ip_addr *a, struct iface *i) +{ + neighbor *n = neigh_find(p, a, 0); + return n && n->iface == i; +} + void neigh_dump(neighbor *); void neigh_dump_all(void); void neigh_prune(void); @@ -121,8 +127,6 @@ void neigh_if_up(struct iface *); void neigh_if_down(struct iface *); void neigh_init(struct pool *); -extern int if_connected(ip_addr *a, struct iface *i); /* -1=error, 1=match, 0=no match */ - /* * Interface Pattern Lists */ |