diff options
author | Lennart Poettering <lennart@poettering.net> | 2005-03-26 13:58:11 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2005-03-26 13:58:11 +0000 |
commit | 8e7f83aa5b6d910e80c56b31f4eb79b02e7ca67b (patch) | |
tree | 6a2da3b54fe17c82a998254d35b3c5d562e21ac4 /iface.c | |
parent | ad1f9d3725a300f10eca071c6fe2f2c583f51436 (diff) |
* add subscription feature - with reissuing
* interpret goodbye responses
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@17 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'iface.c')
-rw-r--r-- | iface.c | 30 |
1 files changed, 30 insertions, 0 deletions
@@ -489,3 +489,33 @@ gboolean flx_interface_match(flxInterface *i, gint index, guchar protocol) { return TRUE; } + +void flx_interface_monitor_walk(flxInterfaceMonitor *m, gint interface, guchar protocol, flxInterfaceMonitorWalkCallback callback, gpointer userdata) { + g_assert(m); + g_assert(callback); + + if (interface > 0) { + if (protocol != AF_UNSPEC) { + flxInterface *i; + + if ((i = flx_interface_monitor_get_interface(m, interface, protocol))) + callback(m, i, userdata); + + } else { + flxHwInterface *hw; + flxInterface *i; + + if ((hw = flx_interface_monitor_get_hw_interface(m, interface))) + for (i = hw->interfaces; i; i = i->by_hardware_next) + if (flx_interface_match(i, interface, protocol)) + callback(m, i, userdata); + } + + } else { + flxInterface *i; + + for (i = m->interfaces; i; i = i->interface_next) + if (flx_interface_match(i, interface, protocol)) + callback(m, i, userdata); + } +} |