Lines Matching refs:uxIndex
82 static BaseType_t prvGetCacheIPEntry( UBaseType_t uxIndex,
86 static void prvUpdateCacheEntry( UBaseType_t uxIndex,
162 UBaseType_t uxIndex; in FreeRTOS_ProcessDNSCache() local
170 xResult = prvFindEntryIndex( pcName, &uxIndex ); in FreeRTOS_ProcessDNSCache()
180 ( void ) prvGetCacheIPEntry( uxIndex, in FreeRTOS_ProcessDNSCache()
186 prvUpdateCacheEntry( uxIndex, in FreeRTOS_ProcessDNSCache()
229 UBaseType_t uxIndex; in prvFindEntryIndex() local
232 for( uxIndex = 0; uxIndex < ipconfigDNS_CACHE_ENTRIES; uxIndex++ ) in prvFindEntryIndex()
234 if( xDNSCache[ uxIndex ].pcName[ 0 ] == ( char ) 0 ) in prvFindEntryIndex()
239 if( strcmp( xDNSCache[ uxIndex ].pcName, pcName ) == 0 ) in prvFindEntryIndex()
242 *uxResult = uxIndex; in prvFindEntryIndex()
259 static BaseType_t prvGetCacheIPEntry( UBaseType_t uxIndex, in prvGetCacheIPEntry() argument
265 uint32_t ulAge = ulCurrentTimeSeconds - xDNSCache[ uxIndex ].ulTimeWhenAddedInSeconds; in prvGetCacheIPEntry()
269 if( ulAge < FreeRTOS_ntohl( xDNSCache[ uxIndex ].ulTTL ) ) in prvGetCacheIPEntry()
280 … ucIndex = xDNSCache[ uxIndex ].ucCurrentIPAddress % xDNSCache[ uxIndex ].ucNumIPAddresses; in prvGetCacheIPEntry()
284 xDNSCache[ uxIndex ].ucCurrentIPAddress++; in prvGetCacheIPEntry()
287 *pulIP = xDNSCache[ uxIndex ].ulIPAddresses[ ulIPAddressIndex ]; in prvGetCacheIPEntry()
293 xDNSCache[ uxIndex ].pcName[ 0 ] = ( char ) 0; in prvGetCacheIPEntry()
309 static void prvUpdateCacheEntry( UBaseType_t uxIndex, in prvUpdateCacheEntry() argument
317 if( xDNSCache[ uxIndex ].ucNumIPAddresses < in prvUpdateCacheEntry()
322 ulIPAddressIndex = xDNSCache[ uxIndex ].ucNumIPAddresses; in prvUpdateCacheEntry()
323 xDNSCache[ uxIndex ].ucNumIPAddresses++; in prvUpdateCacheEntry()
326 xDNSCache[ uxIndex ].ulIPAddresses[ ulIPAddressIndex ] = *pulIP; in prvUpdateCacheEntry()
327 xDNSCache[ uxIndex ].ulTTL = ulTTL; in prvUpdateCacheEntry()
328 xDNSCache[ uxIndex ].ulTimeWhenAddedInSeconds = ulCurrentTimeSeconds; in prvUpdateCacheEntry()