diff options
author | Trent Lloyd <lathiat@bur.st> | 2005-08-23 19:31:53 +0000 |
---|---|---|
committer | Trent Lloyd <lathiat@bur.st> | 2005-08-23 19:31:53 +0000 |
commit | a417c80df67fd640a6f66fc4ef08c7f7ddc4bccd (patch) | |
tree | da080a14abe966315007c054166e246de0f71cc7 /avahi-core/iface.c | |
parent | e5496ed08b66b68c487bce6dbf06504d2d1f42cd (diff) |
* Merge changes from trunk into netlink-abstraction
git-svn-id: file:///home/lennart/svn/public/avahi/branches/netlink-abstraction@428 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'avahi-core/iface.c')
-rw-r--r-- | avahi-core/iface.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/avahi-core/iface.c b/avahi-core/iface.c index f5373e6..f9c3103 100644 --- a/avahi-core/iface.c +++ b/avahi-core/iface.c @@ -823,3 +823,21 @@ int avahi_interface_address_on_link(AvahiInterface *i, const AvahiAddress *a) { return 0; } + +int avahi_interface_has_address(AvahiInterfaceMonitor *m, AvahiIfIndex iface, const AvahiAddress *a) { + AvahiInterface *i; + AvahiInterfaceAddress *j; + + assert(m); + assert(iface != AVAHI_IF_UNSPEC); + assert(a); + + if (!(i = avahi_interface_monitor_get_interface(m, iface, a->family))) + return 0; + + for (j = i->addresses; j; j = j->address_next) + if (avahi_address_cmp(a, &j->address) == 0) + return 1; + + return 0; +} |