Lines Matching refs:inMDNS

91 mDNSlocal mStatus			SetupNiceName( mDNS * const inMDNS );
92 mDNSlocal mStatus SetupHostName( mDNS * const inMDNS );
93 mDNSlocal mStatus SetupName( mDNS * const inMDNS );
94 mDNSlocal mStatus SetupInterface( mDNS * const inMDNS, const struct ifaddrs *inIFA, mDNSInterface…
95 mDNSlocal mStatus TearDownInterface( mDNS * const inMDNS, mDNSInterfaceData *inIFD );
97 mDNSlocal mStatus SetupSocket( mDNS * const inMDNS, const struct sockaddr *inAddr, mDNSIPPort por…
119 mDNSexport mStatus mDNSPlatformInterfaceNameToID( mDNS * const inMDNS, const char *inName, mDNSInte…
120 mDNSexport mStatus mDNSPlatformInterfaceIDToInfo( mDNS * const inMDNS, mDNSInterfaceID inID, mDNSPl…
141 mDNSlocal void TCPDidConnect( mDNS * const inMDNS, HANDLE event, void * context );
158 mDNSlocal void SetDomainSecrets( mDNS * const inMDNS );
161 mDNSlocal void CheckFileShares( mDNS * const inMDNS );
272 mDNSexport mStatus mDNSPlatformInit( mDNS * const inMDNS ) in mDNSPlatformInit() argument
290 if( !inMDNS->p ) inMDNS->p = &gMDNSPlatformSupport; in mDNSPlatformInit()
291 inMDNS->p->mainThread = OpenThread( THREAD_ALL_ACCESS, FALSE, GetCurrentThreadId() ); in mDNSPlatformInit()
292 require_action( inMDNS->p->mainThread, exit, err = mStatus_UnknownErr ); in mDNSPlatformInit()
293 inMDNS->p->checkFileSharesTimer = CreateWaitableTimer( NULL, FALSE, NULL ); in mDNSPlatformInit()
294 require_action( inMDNS->p->checkFileSharesTimer, exit, err = mStatus_UnknownErr ); in mDNSPlatformInit()
295 inMDNS->p->checkFileSharesTimeout = 10; // Retry time for CheckFileShares() in seconds in mDNSPlatformInit()
308 inMDNS->CanReceiveUnicastOn5353 = CanReceiveUnicast(); in mDNSPlatformInit()
313 strcpy_s( ( char* ) &inMDNS->HIHardware.c[ 1 ], sizeof( inMDNS->HIHardware.c ) - 2, "Windows" ); in mDNSPlatformInit()
314 inMDNS->HIHardware.c[ 0 ] = ( mDNSu8 ) mDNSPlatformStrLen( &inMDNS->HIHardware.c[ 1 ] ); in mDNSPlatformInit()
315 dlog( kDebugLevelInfo, DEBUG_NAME "HIHardware: %#s\n", inMDNS->HIHardware.c ); in mDNSPlatformInit()
319 mDNS_snprintf( (char *) &inMDNS->HISoftware.c[ 1 ], sizeof( inMDNS->HISoftware.c ) - 2, in mDNSPlatformInit()
321 inMDNS->HISoftware.c[ 0 ] = (mDNSu8) mDNSPlatformStrLen( &inMDNS->HISoftware.c[ 1 ] ); in mDNSPlatformInit()
322 dlog( kDebugLevelInfo, DEBUG_NAME "HISoftware: %#s\n", inMDNS->HISoftware.c ); in mDNSPlatformInit()
334 inMDNS->p->unicastSock4.fd = INVALID_SOCKET; in mDNSPlatformInit()
335 inMDNS->p->unicastSock4.recvMsgPtr = NULL; in mDNSPlatformInit()
336 inMDNS->p->unicastSock4.ifd = NULL; in mDNSPlatformInit()
337 inMDNS->p->unicastSock4.overlapped.pending = FALSE; in mDNSPlatformInit()
338 inMDNS->p->unicastSock4.next = NULL; in mDNSPlatformInit()
339 inMDNS->p->unicastSock4.m = inMDNS; in mDNSPlatformInit()
345 …err = SetupSocket( inMDNS, (const struct sockaddr*) &sa4, zeroIPPort, &inMDNS->p->unicastSock4.fd … in mDNSPlatformInit()
348 err = getsockname( inMDNS->p->unicastSock4.fd, (struct sockaddr*) &sa4, &sa4len ); in mDNSPlatformInit()
350 inMDNS->p->unicastSock4.port.NotAnInteger = sa4.sin_port; in mDNSPlatformInit()
351 inMDNS->UnicastPort4 = inMDNS->p->unicastSock4.port; in mDNSPlatformInit()
352inMDNS->p->unicastSock4.fd, SIO_GET_EXTENSION_FUNCTION_POINTER, &kWSARecvMsgGUID, sizeof( kWSARecv… in mDNSPlatformInit()
356 inMDNS->p->unicastSock4.recvMsgPtr = NULL; in mDNSPlatformInit()
359 err = UDPBeginRecv( &inMDNS->p->unicastSock4 ); in mDNSPlatformInit()
366 inMDNS->p->unicastSock6.fd = INVALID_SOCKET; in mDNSPlatformInit()
367 inMDNS->p->unicastSock6.recvMsgPtr = NULL; in mDNSPlatformInit()
368 inMDNS->p->unicastSock6.ifd = NULL; in mDNSPlatformInit()
369 inMDNS->p->unicastSock6.overlapped.pending = FALSE; in mDNSPlatformInit()
370 inMDNS->p->unicastSock6.next = NULL; in mDNSPlatformInit()
371 inMDNS->p->unicastSock6.m = inMDNS; in mDNSPlatformInit()
382 …err = SetupSocket( inMDNS, (const struct sockaddr*) &sa6, zeroIPPort, &inMDNS->p->unicastSock6.fd … in mDNSPlatformInit()
388 if ( inMDNS->p->unicastSock6.fd != INVALID_SOCKET ) in mDNSPlatformInit()
391 err = getsockname( inMDNS->p->unicastSock6.fd, (struct sockaddr*) &sa6, &sa6len ); in mDNSPlatformInit()
393 inMDNS->p->unicastSock6.port.NotAnInteger = sa6.sin6_port; in mDNSPlatformInit()
394 inMDNS->UnicastPort6 = inMDNS->p->unicastSock6.port; in mDNSPlatformInit()
396inMDNS->p->unicastSock6.fd, SIO_GET_EXTENSION_FUNCTION_POINTER, &kWSARecvMsgGUID, sizeof( kWSARecv… in mDNSPlatformInit()
400 inMDNS->p->unicastSock6.recvMsgPtr = NULL; in mDNSPlatformInit()
403 err = UDPBeginRecv( &inMDNS->p->unicastSock6 ); in mDNSPlatformInit()
411 SetDomainSecrets( inMDNS ); in mDNSPlatformInit()
415 mDNSCoreInitComplete( inMDNS, err ); in mDNSPlatformInit()
422 mDNSPlatformClose( inMDNS ); in mDNSPlatformInit()
433 mDNSexport void mDNSPlatformClose( mDNS * const inMDNS ) in mDNSPlatformClose() argument
438 check( inMDNS ); in mDNSPlatformClose()
482 inMDNS->p->smbFileSharing = mDNSfalse; in mDNSPlatformClose()
483 inMDNS->p->smbPrintSharing = mDNSfalse; in mDNSPlatformClose()
488 err = TearDownInterfaceList( inMDNS ); in mDNSPlatformClose()
490 check( !inMDNS->p->inactiveInterfaceList ); in mDNSPlatformClose()
494 UDPCloseSocket( &inMDNS->p->unicastSock4 ); in mDNSPlatformClose()
500 UDPCloseSocket( &inMDNS->p->unicastSock6 ); in mDNSPlatformClose()
542 DispatchSocketEvents( inMDNS ); in mDNSPlatformClose()
555 mDNSexport void mDNSPlatformLock( const mDNS * const inMDNS ) in mDNSPlatformLock() argument
557 ( void ) inMDNS; in mDNSPlatformLock()
564 mDNSexport void mDNSPlatformUnlock( const mDNS * const inMDNS ) in mDNSPlatformUnlock() argument
566 ( void ) inMDNS; in mDNSPlatformUnlock()
798 mDNSexport mStatus mDNSPlatformInterfaceNameToID( mDNS * const inMDNS, const char *inName, mDNSInte… in mDNSPlatformInterfaceNameToID() argument
803 check( inMDNS ); in mDNSPlatformInterfaceNameToID()
804 check( inMDNS->p ); in mDNSPlatformInterfaceNameToID()
809 for( ifd = inMDNS->p->interfaceList; ifd; ifd = ifd->next ) in mDNSPlatformInterfaceNameToID()
834 mDNSexport mStatus mDNSPlatformInterfaceIDToInfo( mDNS * const inMDNS, mDNSInterfaceID inID, mDNSPl… in mDNSPlatformInterfaceIDToInfo() argument
839 check( inMDNS ); in mDNSPlatformInterfaceIDToInfo()
845 for( ifd = inMDNS->p->interfaceList; ifd; ifd = ifd->next ) in mDNSPlatformInterfaceIDToInfo()
868 mDNSexport mDNSInterfaceID mDNSPlatformInterfaceIDfromInterfaceIndex( mDNS * const inMDNS, mDNSu32 … in mDNSPlatformInterfaceIDfromInterfaceIndex() argument
887 for( ifd = inMDNS->p->interfaceList; ifd; ifd = ifd->next ) in mDNSPlatformInterfaceIDfromInterfaceIndex()
904 mDNSexport mDNSu32 mDNSPlatformInterfaceIndexfromInterfaceID( mDNS * const inMDNS, mDNSInterfaceID … in mDNSPlatformInterfaceIndexfromInterfaceID() argument
925 for( ifd = inMDNS->p->interfaceList; ifd; ifd = ifd->next ) in mDNSPlatformInterfaceIndexfromInterfaceID()
938 for( ifd = inMDNS->p->inactiveInterfaceList; ifd; ifd = ifd->next ) in mDNSPlatformInterfaceIndexfromInterfaceID()
1249 mStatus TCPAddSocket( mDNS * const inMDNS, TCPSocket *sock ) in TCPAddSocket() argument
1253 ( void ) inMDNS; in TCPAddSocket()
1273 mDNSlocal void TCPDidConnect( mDNS * const inMDNS, HANDLE event, void * context ) in TCPDidConnect() argument
1280 if ( inMDNS->p->unregisterWaitableEventFunc ) in TCPDidConnect()
1282 inMDNS->p->unregisterWaitableEventFunc( inMDNS, event ); in TCPDidConnect()
1525 const mDNS * const inMDNS, in mDNSPlatformSendUDP() argument
1539 DEBUG_USE_ONLY( inMDNS ); in mDNSPlatformSendUDP()
1542 check( inMDNS ); in mDNSPlatformSendUDP()
1557 sendingsocket = ifd ? ifd->sock.fd : inMDNS->p->unicastSock4.fd; in mDNSPlatformSendUDP()
1559 …P using port %d, static port %d, sock %d", mDNSVal16(inSrcSocket->port), inMDNS->p->unicastSock4.f… in mDNSPlatformSendUDP()
1571 sendingsocket = ifd ? ifd->sock.fd : inMDNS->p->unicastSock6.fd; in mDNSPlatformSendUDP()
2239 mStatus SetupNiceName( mDNS * const inMDNS ) in SetupNiceName() argument
2250 check( inMDNS ); in SetupNiceName()
2310inMDNS->nicelabel.c[ 0 ] = (mDNSu8) (strlen( utf8 ) < MAX_DOMAIN_LABEL ? strlen( utf8 ) : MAX_DOMA… in SetupNiceName()
2311 memcpy( &inMDNS->nicelabel.c[ 1 ], utf8, inMDNS->nicelabel.c[ 0 ] ); in SetupNiceName()
2313 …dlog( kDebugLevelInfo, DEBUG_NAME "nice name \"%.*s\"\n", inMDNS->nicelabel.c[ 0 ], &inMDNS->nicel… in SetupNiceName()
2320 ZeroMemory( inMDNS->p->nbname, sizeof( inMDNS->p->nbname ) ); in SetupNiceName()
2321 ZeroMemory( inMDNS->p->nbdomain, sizeof( inMDNS->p->nbdomain ) ); in SetupNiceName()
2323 namelen = sizeof( inMDNS->p->nbname ); in SetupNiceName()
2324 ok = GetComputerNameExA( ComputerNamePhysicalNetBIOS, inMDNS->p->nbname, &namelen ); in SetupNiceName()
2326 if ( ok ) dlog( kDebugLevelInfo, DEBUG_NAME "netbios name \"%s\"\n", inMDNS->p->nbname ); in SetupNiceName()
2334 err = TCHARtoUTF8( joinName, inMDNS->p->nbdomain, sizeof( inMDNS->p->nbdomain ) ); in SetupNiceName()
2336 …if ( !err ) dlog( kDebugLevelInfo, DEBUG_NAME "netbios domain/workgroup \"%s\"\n", inMDNS->p->nbdo… in SetupNiceName()
2352 mDNSlocal mStatus SetupHostName( mDNS * const inMDNS ) in SetupHostName() argument
2360 check( inMDNS ); in SetupHostName()
2385 ConvertUTF8PstringToRFC1034HostLabel( tempLabel.c, &inMDNS->hostlabel ); in SetupHostName()
2386 if( inMDNS->hostlabel.c[ 0 ] == 0 ) in SetupHostName()
2390 MakeDomainLabelFromLiteralString( &inMDNS->hostlabel, kMDNSDefaultName ); in SetupHostName()
2393 check( inMDNS->hostlabel.c[ 0 ] != 0 ); in SetupHostName()
2395 mDNS_SetFQDN( inMDNS ); in SetupHostName()
2397 …dlog( kDebugLevelInfo, DEBUG_NAME "host name \"%.*s\"\n", inMDNS->hostlabel.c[ 0 ], &inMDNS->hostl… in SetupHostName()
2406 mDNSlocal mStatus SetupName( mDNS * const inMDNS ) in SetupName() argument
2410 check( inMDNS ); in SetupName()
2412 err = SetupNiceName( inMDNS ); in SetupName()
2415 err = SetupHostName( inMDNS ); in SetupName()
2426 mStatus SetupInterfaceList( mDNS * const inMDNS ) in SetupInterfaceList() argument
2443 check( inMDNS ); in SetupInterfaceList()
2444 check( inMDNS->p ); in SetupInterfaceList()
2446 inMDNS->p->registeredLoopback4 = mDNSfalse; in SetupInterfaceList()
2447 inMDNS->p->nextDHCPLeaseExpires = 0x7FFFFFFF; in SetupInterfaceList()
2456 TearDownInterfaceList( inMDNS ); in SetupInterfaceList()
2460 err = SetupName( inMDNS ); in SetupInterfaceList()
2471 next = &inMDNS->p->interfaceList; in SetupInterfaceList()
2494 err = SetupInterface( inMDNS, p, &ifd ); in SetupInterfaceList()
2506 if ( p->ifa_dhcpEnabled && ( p->ifa_dhcpLeaseExpires < inMDNS->p->nextDHCPLeaseExpires ) ) in SetupInterfaceList()
2508 inMDNS->p->nextDHCPLeaseExpires = p->ifa_dhcpLeaseExpires; in SetupInterfaceList()
2519 inMDNS->p->unicastSock4.addr = ifd->interfaceInfo.ip; in SetupInterfaceList()
2525 ++inMDNS->p->interfaceCount; in SetupInterfaceList()
2549 err = SetupInterface( inMDNS, p, &ifd ); in SetupInterfaceList()
2569 inMDNS->p->unicastSock6.addr = ifd->interfaceInfo.ip; in SetupInterfaceList()
2575 ++inMDNS->p->interfaceCount; in SetupInterfaceList()
2608 err = SetupInterface( inMDNS, loopbackv4, &ifd ); in SetupInterfaceList()
2611 inMDNS->p->registeredLoopback4 = mDNStrue; in SetupInterfaceList()
2623 inMDNS->p->unicastSock4.addr = ifd->sock.addr; in SetupInterfaceList()
2630 ++inMDNS->p->interfaceCount; in SetupInterfaceList()
2638 err = SetupInterface( inMDNS, loopbackv6, &ifd ); in SetupInterfaceList()
2651 inMDNS->p->unicastSock6.addr = ifd->sock.addr; in SetupInterfaceList()
2658 ++inMDNS->p->interfaceCount; in SetupInterfaceList()
2661 CheckFileShares( inMDNS ); in SetupInterfaceList()
2666 TearDownInterfaceList( inMDNS ); in SetupInterfaceList()
2680 mStatus TearDownInterfaceList( mDNS * const inMDNS ) in TearDownInterfaceList() argument
2686 check( inMDNS ); in TearDownInterfaceList()
2687 check( inMDNS->p ); in TearDownInterfaceList()
2693 p = &inMDNS->p->inactiveInterfaceList; in TearDownInterfaceList()
2697 if( NumCacheRecordsForInterfaceID( inMDNS, (mDNSInterfaceID) ifd ) > 0 ) in TearDownInterfaceList()
2706 QueueUserAPC( ( PAPCFUNC ) FreeInterface, inMDNS->p->mainThread, ( ULONG_PTR ) ifd ); in TearDownInterfaceList()
2711 while( inMDNS->p->interfaceList ) in TearDownInterfaceList()
2713 ifd = inMDNS->p->interfaceList; in TearDownInterfaceList()
2714 inMDNS->p->interfaceList = ifd->next; in TearDownInterfaceList()
2716 TearDownInterface( inMDNS, ifd ); in TearDownInterfaceList()
2718 inMDNS->p->interfaceCount = 0; in TearDownInterfaceList()
2728 mDNSlocal mStatus SetupInterface( mDNS * const inMDNS, const struct ifaddrs *inIFA, mDNSInterfaceDa… in SetupInterface() argument
2736 check( inMDNS ); in SetupInterface()
2737 check( inMDNS->p ); in SetupInterface()
2750 ifd->sock.m = inMDNS; in SetupInterface()
2770 for( p = inMDNS->p->interfaceList; p; p = p->next ) in SetupInterface()
2801 err = SetupSocket( inMDNS, inIFA->ifa_addr, MulticastDNSPort, &ifd->sock.fd ); in SetupInterface()
2816 if ( inIFA->ifa_dhcpEnabled && ( inIFA->ifa_dhcpLeaseExpires < inMDNS->p->nextDHCPLeaseExpires ) ) in SetupInterface()
2818 inMDNS->p->nextDHCPLeaseExpires = inIFA->ifa_dhcpLeaseExpires; in SetupInterface()
2833 ifd->interfaceInfo.Advertise = ( mDNSu8 ) inMDNS->AdvertiseLocalAddresses; in SetupInterface()
2841 err = mDNS_RegisterInterface( inMDNS, &ifd->interfaceInfo, mDNSfalse ); in SetupInterface()
2856 TearDownInterface( inMDNS, ifd ); in SetupInterface()
2866 mDNSlocal mStatus TearDownInterface( mDNS * const inMDNS, mDNSInterfaceData *inIFD ) in TearDownInterface() argument
2868 check( inMDNS ); in TearDownInterface()
2878 mDNS_DeregisterInterface( inMDNS, &inIFD->interfaceInfo, mDNSfalse ); in TearDownInterface()
2888 if( NumCacheRecordsForInterfaceID( inMDNS, (mDNSInterfaceID) inIFD ) > 0 ) in TearDownInterface()
2890 inIFD->next = inMDNS->p->inactiveInterfaceList; in TearDownInterface()
2891 inMDNS->p->inactiveInterfaceList = inIFD; in TearDownInterface()
2897 QueueUserAPC( ( PAPCFUNC ) FreeInterface, inMDNS->p->mainThread, ( ULONG_PTR ) inIFD ); in TearDownInterface()
2912 mDNSlocal mStatus SetupSocket( mDNS * const inMDNS, const struct sockaddr *inAddr, mDNSIPPort port,… in SetupSocket() argument
2920 DEBUG_UNUSED( inMDNS ); in SetupSocket()
2923 check( inMDNS ); in SetupSocket()
3378 void InterfaceListDidChange( mDNS * const inMDNS ) in InterfaceListDidChange() argument
3383 check( inMDNS ); in InterfaceListDidChange()
3387 err = TearDownInterfaceList( inMDNS ); in InterfaceListDidChange()
3390 err = SetupInterfaceList( inMDNS ); in InterfaceListDidChange()
3393 err = uDNS_SetupDNSConfig( inMDNS ); in InterfaceListDidChange()
3398 mDNS_ConfigChanged(inMDNS); in InterfaceListDidChange()
3402 mDNSCoreMachineSleep( inMDNS, mDNSfalse ); // What is this for? Mac OS X does not do this in InterfaceListDidChange()
3409 void ComputerDescriptionDidChange( mDNS * const inMDNS ) in ComputerDescriptionDidChange() argument
3412 check( inMDNS ); in ComputerDescriptionDidChange()
3415 SetupNiceName( inMDNS ); in ComputerDescriptionDidChange()
3422 void TCPIPConfigDidChange( mDNS * const inMDNS ) in TCPIPConfigDidChange() argument
3427 check( inMDNS ); in TCPIPConfigDidChange()
3429 err = uDNS_SetupDNSConfig( inMDNS ); in TCPIPConfigDidChange()
3437 void DynDNSConfigDidChange( mDNS * const inMDNS ) in DynDNSConfigDidChange() argument
3442 check( inMDNS ); in DynDNSConfigDidChange()
3444 SetDomainSecrets( inMDNS ); in DynDNSConfigDidChange()
3446 err = uDNS_SetupDNSConfig( inMDNS ); in DynDNSConfigDidChange()
3454 void FileSharingDidChange( mDNS * const inMDNS ) in FileSharingDidChange() argument
3457 check( inMDNS ); in FileSharingDidChange()
3459 CheckFileShares( inMDNS ); in FileSharingDidChange()
3466 void FirewallDidChange( mDNS * const inMDNS ) in FirewallDidChange() argument
3469 check( inMDNS ); in FirewallDidChange()
3471 CheckFileShares( inMDNS ); in FirewallDidChange()
5120 DispatchSocketEvents( mDNS * const inMDNS ) in DispatchSocketEvents() argument
5130 DispatchUDPEvent( inMDNS, udpSock ); in DispatchSocketEvents()
5138 DispatchTCPEvent( inMDNS, tcpSock ); in DispatchSocketEvents()
5144 DispatchUDPEvent( mDNS * const inMDNS, UDPSocket * sock ) in DispatchUDPEvent() argument
5146 ( void ) inMDNS; in DispatchUDPEvent()
5172 DispatchTCPEvent( mDNS * const inMDNS, TCPSocket * sock ) in DispatchTCPEvent() argument
5174 ( void ) inMDNS; in DispatchTCPEvent()