X-Git-Url: https://git.archive.openwrt.org/?a=blobdiff_plain;f=interface.c;h=c8d89721d05f15f6e248732f8b694be700f2f45f;hb=426330fffb024d3c2e4c6e34a16b04afef884d5d;hp=70c02aa706351d19c096bf0429b09f174104103f;hpb=cef603930a1b4ff932c9dcf1e5243c13279add14;p=project%2Fmdnsd.git diff --git a/interface.c b/interface.c index 70c02aa..c8d8972 100644 --- a/interface.c +++ b/interface.c @@ -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);