/* Check if interface is duplicate (two interfaces on the same subnet)  */
static bool _mdns_if_is_dup(tcpip_adapter_if_t tcpip_if)
/* Check if interface is duplicate (two interfaces on the same subnet)  */
static bool _mdns_if_is_dup(tcpip_adapter_if_t tcpip_if)
{
    tcpip_adapter_if_t other_if = _mdns_get_other_if (tcpip_if);
    if (other_if == TCPIP_ADAPTER_IF_MAX) {
        return false;
    }
    if (_mdns_server->interfaces[tcpip_if].pcbs[MDNS_IP_PROTOCOL_V4].state == PCB_DUP
        || _mdns_server->interfaces[tcpip_if].pcbs[MDNS_IP_PROTOCOL_V6].state == PCB_DUP
        || _mdns_server->interfaces[other_if].pcbs[MDNS_IP_PROTOCOL_V4].state == PCB_DUP
        || _mdns_server->interfaces[other_if].pcbs[MDNS_IP_PROTOCOL_V6].state == PCB_DUP
    ) {
        return true;
    }
    return false;
}