Add query ubus call
[project/mdnsd.git] / interface.c
index 70c02aa706351d19c096bf0429b09f174104103f..c8d89721d05f15f6e248732f8b694be700f2f45f 100644 (file)
@@ -627,4 +627,13 @@ void interface_shutdown(void)
                interface_close(iface);
 }
 
+struct interface*
+interface_get(const char *name, int v6, int multicast)
+{
+       char id_buf[32];
+       snprintf(id_buf, sizeof(id_buf), "%d_%d_%s", multicast, v6, name);
+       struct interface *iface = vlist_find(&interfaces, id_buf, iface, node);
+       return iface;
+}
+
 VLIST_TREE(interfaces, avl_strcmp, iface_update_cb, false, false);