/* Clean up a route cache, that is free all the route cache entries enqueued in the cache. */
VOID Ip4CleanRouteCache(IN IP4_ROUTE_CACHE *RtCache)
/* Clean up a route cache, that is free all the route cache entries enqueued in the cache. */
VOID Ip4CleanRouteCache(IN IP4_ROUTE_CACHE *RtCache)
{
  LIST_ENTRY             *Entry;
  LIST_ENTRY             *Next;
  IP4_ROUTE_CACHE_ENTRY  *RtCacheEntry;
  UINT32                 Index;
  for (Index = 0; Index < IP4_ROUTE_CACHE_HASH_VALUE; Index++) {
    NET_LIST_FOR_EACH_SAFE (Entry, Next, &(RtCache->CacheBucket[Index])) {
      RtCacheEntry = NET_LIST_USER_STRUCT (Entry, IP4_ROUTE_CACHE_ENTRY, Link);
      RemoveEntryList (Entry);
      Ip4FreeRouteCacheEntry (RtCacheEntry);
    }
  }
}