Lines Matching refs:ifd
336 inMDNS->p->unicastSock4.ifd = NULL; in mDNSPlatformInit()
368 inMDNS->p->unicastSock6.ifd = NULL; in mDNSPlatformInit()
801 mDNSInterfaceData * ifd; in mDNSPlatformInterfaceNameToID() local
809 for( ifd = inMDNS->p->interfaceList; ifd; ifd = ifd->next ) in mDNSPlatformInterfaceNameToID()
811 if( strcmp( ifd->name, inName ) == 0 ) in mDNSPlatformInterfaceNameToID()
816 require_action_quiet( ifd, exit, err = mStatus_NoSuchNameErr ); in mDNSPlatformInterfaceNameToID()
822 *outID = (mDNSInterfaceID) ifd; in mDNSPlatformInterfaceNameToID()
837 mDNSInterfaceData * ifd; in mDNSPlatformInterfaceIDToInfo() local
845 for( ifd = inMDNS->p->interfaceList; ifd; ifd = ifd->next ) in mDNSPlatformInterfaceIDToInfo()
847 if( ifd == (mDNSInterfaceData *) inID ) in mDNSPlatformInterfaceIDToInfo()
852 require_action_quiet( ifd, exit, err = mStatus_NoSuchNameErr ); in mDNSPlatformInterfaceIDToInfo()
856 outInfo->name = ifd->name; in mDNSPlatformInterfaceIDToInfo()
857 outInfo->ip = ifd->interfaceInfo.ip; in mDNSPlatformInterfaceIDToInfo()
885 mDNSInterfaceData * ifd; in mDNSPlatformInterfaceIDfromInterfaceIndex() local
887 for( ifd = inMDNS->p->interfaceList; ifd; ifd = ifd->next ) in mDNSPlatformInterfaceIDfromInterfaceIndex()
889 if( ( ifd->scopeID == inIndex ) && ifd->interfaceInfo.InterfaceActive ) in mDNSPlatformInterfaceIDfromInterfaceIndex()
891 id = ifd->interfaceInfo.InterfaceID; in mDNSPlatformInterfaceIDfromInterfaceIndex()
895 check( ifd ); in mDNSPlatformInterfaceIDfromInterfaceIndex()
922 mDNSInterfaceData * ifd; in mDNSPlatformInterfaceIndexfromInterfaceID() local
925 for( ifd = inMDNS->p->interfaceList; ifd; ifd = ifd->next ) in mDNSPlatformInterfaceIndexfromInterfaceID()
927 if( (mDNSInterfaceID) ifd == inID ) in mDNSPlatformInterfaceIndexfromInterfaceID()
929 index = ifd->scopeID; in mDNSPlatformInterfaceIndexfromInterfaceID()
936 if( !ifd ) in mDNSPlatformInterfaceIndexfromInterfaceID()
938 for( ifd = inMDNS->p->inactiveInterfaceList; ifd; ifd = ifd->next ) in mDNSPlatformInterfaceIndexfromInterfaceID()
940 if( (mDNSInterfaceID) ifd == inID ) in mDNSPlatformInterfaceIndexfromInterfaceID()
942 index = ifd->scopeID; in mDNSPlatformInterfaceIndexfromInterfaceID()
947 check( ifd ); in mDNSPlatformInterfaceIndexfromInterfaceID()
1416 sock->ifd = NULL; in mDNSPlatformUDPSocket()
1535 mDNSInterfaceData * ifd = (mDNSInterfaceData*) inInterfaceID; in mDNSPlatformSendUDP() local
1557 sendingsocket = ifd ? ifd->sock.fd : inMDNS->p->unicastSock4.fd; in mDNSPlatformSendUDP()
1571 sendingsocket = ifd ? ifd->sock.fd : inMDNS->p->unicastSock6.fd; in mDNSPlatformSendUDP()
2430 mDNSInterfaceData * ifd; in SetupInterfaceList() local
2494 err = SetupInterface( inMDNS, p, &ifd ); in SetupInterfaceList()
2501 if ( ifd->interfaceInfo.McastTxRx == mDNStrue ) in SetupInterfaceList()
2519 inMDNS->p->unicastSock4.addr = ifd->interfaceInfo.ip; in SetupInterfaceList()
2523 *next = ifd; in SetupInterfaceList()
2524 next = &ifd->next; in SetupInterfaceList()
2549 err = SetupInterface( inMDNS, p, &ifd ); in SetupInterfaceList()
2556 if ( ifd->interfaceInfo.McastTxRx == mDNStrue ) in SetupInterfaceList()
2569 inMDNS->p->unicastSock6.addr = ifd->interfaceInfo.ip; in SetupInterfaceList()
2573 *next = ifd; in SetupInterfaceList()
2574 next = &ifd->next; in SetupInterfaceList()
2608 err = SetupInterface( inMDNS, loopbackv4, &ifd ); in SetupInterfaceList()
2623 inMDNS->p->unicastSock4.addr = ifd->sock.addr; in SetupInterfaceList()
2628 *next = ifd; in SetupInterfaceList()
2629 next = &ifd->next; in SetupInterfaceList()
2638 err = SetupInterface( inMDNS, loopbackv6, &ifd ); in SetupInterfaceList()
2651 inMDNS->p->unicastSock6.addr = ifd->sock.addr; in SetupInterfaceList()
2656 *next = ifd; in SetupInterfaceList()
2657 next = &ifd->next; in SetupInterfaceList()
2683 mDNSInterfaceData * ifd; in TearDownInterfaceList() local
2696 ifd = *p; in TearDownInterfaceList()
2697 if( NumCacheRecordsForInterfaceID( inMDNS, (mDNSInterfaceID) ifd ) > 0 ) in TearDownInterfaceList()
2699 p = &ifd->next; in TearDownInterfaceList()
2703 …dlog( kDebugLevelInfo, DEBUG_NAME "freeing unreferenced, inactive interface %#p %#a\n", ifd, &ifd-… in TearDownInterfaceList()
2704 *p = ifd->next; in TearDownInterfaceList()
2706 QueueUserAPC( ( PAPCFUNC ) FreeInterface, inMDNS->p->mainThread, ( ULONG_PTR ) ifd ); in TearDownInterfaceList()
2713 ifd = inMDNS->p->interfaceList; in TearDownInterfaceList()
2714 inMDNS->p->interfaceList = ifd->next; in TearDownInterfaceList()
2716 TearDownInterface( inMDNS, ifd ); in TearDownInterfaceList()
2730 mDNSInterfaceData * ifd; in SetupInterface() local
2734 ifd = NULL; in SetupInterface()
2744 ifd = (mDNSInterfaceData *) calloc( 1, sizeof( *ifd ) ); in SetupInterface()
2745 require_action( ifd, exit, err = mStatus_NoMemoryErr ); in SetupInterface()
2746 ifd->sock.fd = kInvalidSocketRef; in SetupInterface()
2747 ifd->sock.overlapped.pending = FALSE; in SetupInterface()
2748 ifd->sock.ifd = ifd; in SetupInterface()
2749 ifd->sock.next = NULL; in SetupInterface()
2750 ifd->sock.m = inMDNS; in SetupInterface()
2751 ifd->index = inIFA->ifa_extra.index; in SetupInterface()
2752 ifd->scopeID = inIFA->ifa_extra.index; in SetupInterface()
2753 check( strlen( inIFA->ifa_name ) < sizeof( ifd->name ) ); in SetupInterface()
2754 strncpy( ifd->name, inIFA->ifa_name, sizeof( ifd->name ) - 1 ); in SetupInterface()
2755 ifd->name[ sizeof( ifd->name ) - 1 ] = '\0'; in SetupInterface()
2757 strncpy(ifd->interfaceInfo.ifname, inIFA->ifa_name, sizeof(ifd->interfaceInfo.ifname)); in SetupInterface()
2758 ifd->interfaceInfo.ifname[sizeof(ifd->interfaceInfo.ifname)-1] = 0; in SetupInterface()
2767 …ifd->interfaceInfo.McastTxRx = ( ( inIFA->ifa_flags & IFF_MULTICAST ) && !( inIFA->ifa_flags & I… in SetupInterface()
2768 ifd->interfaceInfo.InterfaceID = NULL; in SetupInterface()
2772 if ( strcmp( p->name, ifd->name ) == 0 ) in SetupInterface()
2774 if (!ifd->interfaceInfo.InterfaceID) in SetupInterface()
2776 ifd->interfaceInfo.InterfaceID = (mDNSInterfaceID) p; in SetupInterface()
2783 ifd->interfaceInfo.McastTxRx = mDNSfalse; in SetupInterface()
2790 if ( !ifd->interfaceInfo.InterfaceID ) in SetupInterface()
2792 ifd->interfaceInfo.InterfaceID = (mDNSInterfaceID) ifd; in SetupInterface()
2797 if( ifd->interfaceInfo.McastTxRx ) in SetupInterface()
2801 err = SetupSocket( inMDNS, inIFA->ifa_addr, MulticastDNSPort, &ifd->sock.fd ); in SetupInterface()
2803 …ifd->sock.addr = ( inIFA->ifa_addr->sa_family == AF_INET6 ) ? AllDNSLinkGroup_v6 : AllDNSLinkGroup… in SetupInterface()
2804 ifd->sock.port = MulticastDNSPort; in SetupInterface()
2808 …= WSAIoctl( ifd->sock.fd, SIO_GET_EXTENSION_FUNCTION_POINTER, &kWSARecvMsgGUID, sizeof( kWSARecvMs… in SetupInterface()
2812 ifd->sock.recvMsgPtr = NULL; in SetupInterface()
2821 ifd->interfaceInfo.NetWake = inIFA->ifa_womp; in SetupInterface()
2825 err = SockAddrToMDNSAddr( inIFA->ifa_addr, &ifd->interfaceInfo.ip, NULL ); in SetupInterface()
2828 err = SockAddrToMDNSAddr( inIFA->ifa_netmask, &ifd->interfaceInfo.mask, NULL ); in SetupInterface()
2831 memcpy( ifd->interfaceInfo.MAC.b, inIFA->ifa_physaddr, sizeof( ifd->interfaceInfo.MAC.b ) ); in SetupInterface()
2833 ifd->interfaceInfo.Advertise = ( mDNSu8 ) inMDNS->AdvertiseLocalAddresses; in SetupInterface()
2835 if ( ifd->sock.fd != kInvalidSocketRef ) in SetupInterface()
2837 err = UDPBeginRecv( &ifd->sock ); in SetupInterface()
2841 err = mDNS_RegisterInterface( inMDNS, &ifd->interfaceInfo, mDNSfalse ); in SetupInterface()
2843 ifd->hostRegistered = mDNStrue; in SetupInterface()
2849 *outIFD = ifd; in SetupInterface()
2850 ifd = NULL; in SetupInterface()
2854 if( ifd ) in SetupInterface()
2856 TearDownInterface( inMDNS, ifd ); in SetupInterface()
3315 if ( sock->ifd != NULL ) in UDPEndRecv()
3317 …require_action( ipv4PacketInfo->ipi_ifindex == sock->ifd->index, exit, err = ( DWORD ) kMismatchEr… in UDPEndRecv()
3329 if ( sock->ifd != NULL ) in UDPEndRecv()
3331 …require_action( ipv6PacketInfo->ipi6_ifindex == ( sock->ifd->index - kIPv6IfIndexBase ), exit, err… in UDPEndRecv()
3358 if ( sock->ifd != NULL ) in UDPEndRecv()
3360 …, DEBUG_NAME " interface = %#a (index=0x%08X)\n", &sock->ifd->interfaceInfo.ip, sock->ifd->inde… in UDPEndRecv()
5052 mDNSInterfaceData * ifd; in IsWOMPEnabled() local
5056 for( ifd = m->p->interfaceList; ifd; ifd = ifd->next ) in IsWOMPEnabled()
5058 if ( IsWOMPEnabledForAdapter( ifd->name ) ) in IsWOMPEnabled()
5154 const mDNSInterfaceID iid = sock->ifd ? sock->ifd->interfaceInfo.InterfaceID : NULL; in DispatchUDPEvent()