mdns: Add API to control custom network interfaces

* Original commit: espressif/esp-idf@b02468dc98
This commit is contained in:
David Cermak
2021-12-20 13:59:11 +01:00
committed by suren-gabrielyan-espressif
parent e9a1c26e0c
commit f836ae7f65
4 changed files with 46 additions and 17 deletions
+1 -6
View File
@@ -11,18 +11,13 @@
static const char * ip_protocol_str[] = {"V4", "V6", "MAX"};
static const char * if_str(esp_netif_t *netif)
{
return esp_netif_get_ifkey(netif);
}
static void mdns_print_results(mdns_result_t * results)
{
mdns_result_t * r = results;
mdns_ip_addr_t * a = NULL;
int i = 1;
while (r) {
printf("%d: Interface: %s, Type: %s\n", i++, if_str(r->esp_netif), ip_protocol_str[r->ip_protocol]);
printf("%d: Interface: %s, Type: %s\n", i++, esp_netif_get_ifkey(r->esp_netif), ip_protocol_str[r->ip_protocol]);
if (r->instance_name) {
printf(" PTR : %s\n", r->instance_name);
}