mirror of
https://github.com/espressif/esp-protocols.git
synced 2026-05-04 03:50:46 +02:00
mdns: Add API to control custom network interfaces
* Original commit: espressif/esp-idf@b02468dc98
This commit is contained in:
committed by
suren-gabrielyan-espressif
parent
e9a1c26e0c
commit
f836ae7f65
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user