From 07a81966419eeabdcf69c29644e92aa8d99d6b6e Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 23 Aug 2005 17:19:29 +0000 Subject: hide some files git-svn-id: file:///home/lennart/svn/public/avahi/trunk@422 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- avahi-core/iface.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'avahi-core/iface.c') 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; +} -- cgit