Lines Matching refs:uxIndex
68 static BaseType_t prvGetCacheIPEntry( UBaseType_t uxIndex,
74 static void prvUpdateCacheEntry( UBaseType_t uxIndex,
86 static void prvReadDNSCache( BaseType_t uxIndex,
209 UBaseType_t uxIndex; in FreeRTOS_ProcessDNSCache() local
224 xResult = prvFindEntryIndex( pcName, pxIP, &uxIndex ); in FreeRTOS_ProcessDNSCache()
235 ( void ) prvGetCacheIPEntry( uxIndex, in FreeRTOS_ProcessDNSCache()
242 prvUpdateCacheEntry( uxIndex, in FreeRTOS_ProcessDNSCache()
318 UBaseType_t uxIndex; in prvFindEntryIndex() local
321 for( uxIndex = 0; uxIndex < ipconfigDNS_CACHE_ENTRIES; uxIndex++ ) in prvFindEntryIndex()
323 if( xDNSCache[ uxIndex ].pcName[ 0 ] == ( char ) 0 ) in prvFindEntryIndex()
328 if( strcmp( xDNSCache[ uxIndex ].pcName, pcName ) == 0 ) in prvFindEntryIndex()
331 if( pxIP->xIs_IPv6 == xDNSCache[ uxIndex ].xAddresses[ 0 ].xIs_IPv6 ) in prvFindEntryIndex()
334 *uxResult = uxIndex; in prvFindEntryIndex()
355 static BaseType_t prvGetCacheIPEntry( UBaseType_t uxIndex, in prvGetCacheIPEntry() argument
362 uint32_t ulAge = ulCurrentTimeSeconds - xDNSCache[ uxIndex ].ulTimeWhenAddedInSeconds; in prvGetCacheIPEntry()
366 if( ulAge < FreeRTOS_ntohl( xDNSCache[ uxIndex ].ulTTL ) ) in prvGetCacheIPEntry()
377 … ucIndex = xDNSCache[ uxIndex ].ucCurrentIPAddress % xDNSCache[ uxIndex ].ucNumIPAddresses; in prvGetCacheIPEntry()
381 xDNSCache[ uxIndex ].ucCurrentIPAddress++; in prvGetCacheIPEntry()
384 …( void ) memcpy( pxIP, &( xDNSCache[ uxIndex ].xAddresses[ ulIPAddressIndex ] ), sizeof( *pxIP ) ); in prvGetCacheIPEntry()
390 prvReadDNSCache( ( BaseType_t ) uxIndex, ppxAddressInfo ); in prvGetCacheIPEntry()
396 xDNSCache[ uxIndex ].pcName[ 0 ] = ( char ) 0; in prvGetCacheIPEntry()
412 static void prvUpdateCacheEntry( UBaseType_t uxIndex, in prvUpdateCacheEntry() argument
420 if( xDNSCache[ uxIndex ].ucNumIPAddresses < in prvUpdateCacheEntry()
425 ulIPAddressIndex = xDNSCache[ uxIndex ].ucNumIPAddresses; in prvUpdateCacheEntry()
426 xDNSCache[ uxIndex ].ucNumIPAddresses++; in prvUpdateCacheEntry()
429 …( void ) memcpy( &( xDNSCache[ uxIndex ].xAddresses[ ulIPAddressIndex ] ), pxIP, sizeof( *pxIP ) ); in prvUpdateCacheEntry()
430 xDNSCache[ uxIndex ].ulTTL = ulTTL; in prvUpdateCacheEntry()
431 xDNSCache[ uxIndex ].ulTimeWhenAddedInSeconds = ulCurrentTimeSeconds; in prvUpdateCacheEntry()
482 static void prvReadDNSCache( BaseType_t uxIndex, in prvReadDNSCache() argument
492 uxNumIPAddresses = ( size_t ) xDNSCache[ uxIndex ].ucNumIPAddresses; in prvReadDNSCache()
503 pxAddresses = &( xDNSCache[ uxIndex ].xAddresses[ uxIPAddressIndex ] ); in prvReadDNSCache()
511 … pxNewAddress = pxNew_AddrInfo( xDNSCache[ uxIndex ].pcName, FREERTOS_AF_INET4, ucBytes ); in prvReadDNSCache()
518 …pxNewAddress = pxNew_AddrInfo( xDNSCache[ uxIndex ].pcName, FREERTOS_AF_INET6, pxAddresses->xIPAdd… in prvReadDNSCache()