/* Find a route cache with the dst and src. This is used by ICMP redirect message process. All kinds of redirect is treated as host redirect according to RFC1122. So, only route cache entries are modified according to the ICMP redirect message. */
IP4_ROUTE_CACHE_ENTRY* Ip4FindRouteCache(IN IP4_ROUTE_TABLE *RtTable, IN IP4_ADDR Dest, IN IP4_ADDR Src)
/* Find a route cache with the dst and src. This is used by ICMP redirect message process. All kinds of redirect is treated as host redirect according to RFC1122. So, only route cache entries are modified according to the ICMP redirect message. */
IP4_ROUTE_CACHE_ENTRY* Ip4FindRouteCache(IN IP4_ROUTE_TABLE *RtTable, IN IP4_ADDR Dest, IN IP4_ADDR Src)
{
  LIST_ENTRY             *Entry;
  IP4_ROUTE_CACHE_ENTRY  *RtCacheEntry;
  UINT32                 Index;
  Index = IP4_ROUTE_CACHE_HASH (Dest, Src);
  NET_LIST_FOR_EACH (Entry, &RtTable->Cache.CacheBucket[Index]) {
    RtCacheEntry = NET_LIST_USER_STRUCT (Entry, IP4_ROUTE_CACHE_ENTRY, Link);
    if ((RtCacheEntry->Dest == Dest) && (RtCacheEntry->Src == Src)) {
      NET_GET_REF (RtCacheEntry);
      return RtCacheEntry;
    }
  }
  return NULL;
}