/** @file\r
The functions and routines to handle the route caches and route table.\r
\r
- Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
\r
RtEntry = NULL;\r
\r
- for (Index = IP6_PREFIX_NUM - 1; Index >= 0; Index--) {\r
+ for (Index = IP6_PREFIX_MAX; Index >= 0; Index--) {\r
NET_LIST_FOR_EACH (Entry, &RtTable->RouteArea[Index]) {\r
RtEntry = NET_LIST_USER_STRUCT (Entry, IP6_ROUTE_ENTRY, Link);\r
\r
//\r
Count = 0;\r
\r
- for (Index = IP6_PREFIX_NUM - 1; Index >= 0; Index--) {\r
+ for (Index = IP6_PREFIX_MAX; Index >= 0; Index--) {\r
\r
NET_LIST_FOR_EACH (Entry, &(RouteTable->RouteArea[Index])) {\r
RtEntry = NET_LIST_USER_STRUCT (Entry, IP6_ROUTE_ENTRY, Link);\r
RtTable->RefCnt = 1;\r
RtTable->TotalNum = 0;\r
\r
- for (Index = 0; Index < IP6_PREFIX_NUM; Index++) {\r
+ for (Index = 0; Index <= IP6_PREFIX_MAX; Index++) {\r
InitializeListHead (&RtTable->RouteArea[Index]);\r
}\r
\r
//\r
// Free all the route table entry and its route cache.\r
//\r
- for (Index = 0; Index < IP6_PREFIX_NUM; Index++) {\r
+ for (Index = 0; Index <= IP6_PREFIX_MAX; Index++) {\r
NET_LIST_FOR_EACH_SAFE (Entry, Next, &RtTable->RouteArea[Index]) {\r
RtEntry = NET_LIST_USER_STRUCT (Entry, IP6_ROUTE_ENTRY, Link);\r
RemoveEntryList (Entry);\r