#define IP4_ALLSYSTEM_ADDRESS 0xE0000001u\r
#define IP4_ALLROUTER_ADDRESS 0xE0000002u\r
\r
-//\r
-// Compose the fragment field to be used in the IP4 header.\r
-//\r
+///\r
+/// Compose the fragment field to be used in the IP4 header.\r
+///\r
#define IP4_HEAD_FRAGMENT_FIELD(Df, Mf, Offset) \\r
((UINT16)(((Df) ? 0x4000 : 0) | ((Mf) ? 0x2000 : 0) | (((Offset) >> 3) & 0x1fff)))\r
\r
\r
#define IP4_IS_BROADCAST(CastType) ((CastType) >= IP4_LOCAL_BROADCAST)\r
\r
-//\r
-// Conver the Microsecond to second. IP transmit/receive time is\r
-// in the unit of microsecond. IP ticks once per second.\r
-//\r
+///\r
+/// Conver the Microsecond to second. IP transmit/receive time is\r
+/// in the unit of microsecond. IP ticks once per second.\r
+///\r
#define IP4_US_TO_SEC(Us) (((Us) + 999999) / 1000000)\r
\r
INTN\r
IN VOID *Context\r
);\r
\r
-//\r
-// Each receive request is wrapped in an IP4_LINK_RX_TOKEN.\r
-// Upon completion, the Callback will be called. Only one\r
-// receive request is send to MNP. IpInstance is always NULL.\r
-// Reference MNP's spec for information.\r
-//\r
+///\r
+/// Each receive request is wrapped in an IP4_LINK_RX_TOKEN.\r
+/// Upon completion, the Callback will be called. Only one\r
+/// receive request is send to MNP. IpInstance is always NULL.\r
+/// Reference MNP's spec for information.\r
+///\r
typedef struct {\r
UINT32 Signature;\r
IP4_INTERFACE *Interface;\r
EFI_MANAGED_NETWORK_COMPLETION_TOKEN MnpToken;\r
} IP4_LINK_RX_TOKEN;\r
\r
-//\r
-// Each transmit request is wrapped in an IP4_LINK_TX_TOKEN.\r
-// Upon completion, the Callback will be called.\r
-//\r
+///\r
+/// Each transmit request is wrapped in an IP4_LINK_TX_TOKEN.\r
+/// Upon completion, the Callback will be called.\r
+///\r
typedef struct {\r
UINT32 Signature;\r
LIST_ENTRY Link;\r
EFI_MANAGED_NETWORK_TRANSMIT_DATA MnpTxData;\r
} IP4_LINK_TX_TOKEN;\r
\r
-//\r
-// Only one ARP request is requested for all the frames in\r
-// a time. It is started for the first frames to the Ip. Any\r
-// subsequent transmission frame will be linked to Frames, and\r
-// be sent all at once the ARP requests succeed.\r
-//\r
+///\r
+/// Only one ARP request is requested for all the frames in\r
+/// a time. It is started for the first frames to the Ip. Any\r
+/// subsequent transmission frame will be linked to Frames, and\r
+/// be sent all at once the ARP requests succeed.\r
+///\r
typedef struct {\r
UINT32 Signature;\r
LIST_ENTRY Link;\r
} IGMP_HEAD;\r
#pragma pack()\r
\r
-//\r
-// The status of multicast group. It isn't necessary to maintain\r
-// explicit state of host state diagram. A group with non-zero\r
-// DelayTime is in "delaying member" state. otherwise, it is in\r
-// "idle member" state.\r
-//\r
+///\r
+/// The status of multicast group. It isn't necessary to maintain\r
+/// explicit state of host state diagram. A group with non-zero\r
+/// DelayTime is in "delaying member" state. otherwise, it is in\r
+/// "idle member" state.\r
+///\r
typedef struct {\r
LIST_ENTRY Link;\r
INTN RefCnt;\r
EFI_MAC_ADDRESS Mac;\r
} IGMP_GROUP;\r
\r
-//\r
-// The IGMP status. Each IP4 service instance has a IGMP_SERVICE_DATA\r
-// attached. The Igmpv1QuerySeen remember whether the server on this\r
-// connected network is v1 or v2.\r
-//\r
+///\r
+/// The IGMP status. Each IP4 service instance has a IGMP_SERVICE_DATA\r
+/// attached. The Igmpv1QuerySeen remember whether the server on this\r
+/// connected network is v1 or v2.\r
+///\r
typedef struct {\r
INTN Igmpv1QuerySeen;\r
LIST_ENTRY Groups;\r
/**\r
Decrease the life of the transmitted packets. If it is\r
decreased to zero, cancel the packet. This function is\r
- called by Ip4packetTimerTicking which time out both the\r
+ called by Ip4PacketTimerTicking which time out both the\r
received-but-not-delivered and transmitted-but-not-recycle\r
packets.\r
\r
IP4_SERVICE_DESTORY\r
} IP4_IMPL_ENUM_TYPES;\r
\r
-//\r
-// IP4_TXTOKEN_WRAP wraps the upper layer's transmit token.\r
-// The user's data is kept in the Packet. When fragment is\r
-// needed, each fragment of the Packet has a reference to the\r
-// Packet, no data is actually copied. The Packet will be\r
-// released when all the fragments of it have been recycled by\r
-// MNP. Upon then, the IP4_TXTOKEN_WRAP will be released, and\r
-// user's event signalled.\r
-//\r
+///\r
+/// IP4_TXTOKEN_WRAP wraps the upper layer's transmit token.\r
+/// The user's data is kept in the Packet. When fragment is\r
+/// needed, each fragment of the Packet has a reference to the\r
+/// Packet, no data is actually copied. The Packet will be\r
+/// released when all the fragments of it have been recycled by\r
+/// MNP. Upon then, the IP4_TXTOKEN_WRAP will be released, and\r
+/// user's event signalled.\r
+///\r
typedef struct {\r
IP4_PROTOCOL *IpInstance;\r
EFI_IP4_COMPLETION_TOKEN *Token;\r
INTN Life;\r
} IP4_TXTOKEN_WRAP;\r
\r
-//\r
-// IP4_RXDATA_WRAP wraps the data IP4 child delivers to the\r
-// upper layers. The received packet is kept in the Packet.\r
-// The Packet itself may be constructured from some fragments.\r
-// All the fragments of the Packet is organized by a\r
-// IP4_ASSEMBLE_ENTRY structure. If the Packet is recycled by\r
-// the upper layer, the assemble entry and its associated\r
-// fragments will be freed at last.\r
-//\r
+///\r
+/// IP4_RXDATA_WRAP wraps the data IP4 child delivers to the\r
+/// upper layers. The received packet is kept in the Packet.\r
+/// The Packet itself may be constructured from some fragments.\r
+/// All the fragments of the Packet is organized by a\r
+/// IP4_ASSEMBLE_ENTRY structure. If the Packet is recycled by\r
+/// the upper layer, the assemble entry and its associated\r
+/// fragments will be freed at last.\r
+///\r
typedef struct {\r
LIST_ENTRY Link;\r
IP4_PROTOCOL *IpInstance;\r
\r
\r
/**\r
- Create a empty assemble entry for the packet identified by\r
+ Create an empty assemble entry for the packet identified by\r
(Dst, Src, Id, Protocol). The default life for the packet is\r
120 seconds.\r
\r
\r
\r
/**\r
- Release all the fragments of a packet, then free the assemble entry\r
+ Release all the fragments of a packet, then free the assemble entry.\r
\r
@param Assemble The assemble entry to free\r
\r
**/\r
VOID\r
Ip4InitAssembleTable (\r
- IN IP4_ASSEMBLE_TABLE *Table\r
+ IN OUT IP4_ASSEMBLE_TABLE *Table\r
)\r
{\r
UINT32 Index;\r
**/\r
VOID\r
Ip4TrimPacket (\r
- IN NET_BUF *Packet,\r
- IN INTN Start,\r
- IN INTN End\r
+ IN OUT NET_BUF *Packet,\r
+ IN INTN Start,\r
+ IN INTN End\r
)\r
{\r
IP4_CLIP_INFO *Info;\r
return it to caller. If the packet can't be assembled, NULL is\r
return.\r
\r
- @param Table The assemble table used.\r
- @param Packet The fragment to assemble\r
+ @param Table The assemble table used. New assemble entry will be created\r
+ if the Packet is from a new chain of fragments.\r
+ @param Packet The fragment to assemble. It might be freed if the fragment\r
+ can't be re-assembled.\r
\r
@return NULL if the packet can't be reassemble. The point to just assembled\r
- @return packet if all the fragments of the packet have arrived.\r
+ packet if all the fragments of the packet have arrived.\r
\r
**/\r
NET_BUF *\r
Ip4Reassemble (\r
- IN IP4_ASSEMBLE_TABLE *Table,\r
- IN NET_BUF *Packet\r
+ IN OUT IP4_ASSEMBLE_TABLE *Table,\r
+ IN OUT NET_BUF *Packet\r
)\r
{\r
IP4_HEAD *IpHead;\r
//\r
// Deliver the whole packet if all the fragments received.\r
// All fragments received if:\r
- // 1. received the last one, so, the totoal length is know\r
+ // 1. received the last one, so, the total length is know\r
// 2. received all the data. If the last fragment on the\r
// queue ends at the total length, all data is received.\r
//\r
return NULL;\r
}\r
\r
- NewPacket->Ip = Assemble->Head;\r
+ NewPacket->Ip = Assemble->Head;\r
CopyMem (IP4_GET_CLIP_INFO (NewPacket), Assemble->Info, sizeof (*IP4_GET_CLIP_INFO (NewPacket)));\r
return NewPacket;\r
}\r
}\r
\r
//\r
- // Check that the IP4 header is correctly formated\r
+ // Check that the IP4 header is correctly formatted\r
//\r
if (Packet->TotalSize < IP4_MIN_HEADLEN) {\r
goto RESTART;\r
@param Head The IP header of the packet\r
@param Packet The data of the packet\r
\r
- @return TRUE if the child wants to receive the packet, otherwise return FALSE.\r
+ @retval TRUE If the child wants to receive the packet.\r
+ @retval FALSE Otherwise.\r
\r
**/\r
BOOLEAN\r
//\r
// Dirty trick for the Tiano UEFI network stack implmentation. If\r
// ReceiveTimeout == -1, the receive of the packet for this instance\r
- // is disabled. The UEFI spec don't have such captibility. We add\r
+ // is disabled. The UEFI spec don't have such capability. We add\r
// this to improve the performance because IP will make a copy of\r
// the received packet for each accepting instance. Some IP instances\r
// used by UDP/TCP only send packets, they don't wants to receive.\r
to each IP4 child that accepts the packet. The second pass will\r
deliver a non-shared copy of the packet to each IP4 child that\r
has pending receive requests. Data is copied if more than one\r
- child wants to consume the packet bacause each IP child need\r
+ child wants to consume the packet because each IP child needs\r
its own copy of the packet to make changes.\r
\r
@param IpSb The IP4 service instance that received the packet\r
#ifndef __EFI_IP4_INPUT_H__\r
#define __EFI_IP4_INPUT_H__\r
\r
-enum {\r
+typedef enum {\r
IP4_MIN_HEADLEN = 20,\r
IP4_MAX_HEADLEN = 60,\r
\r
IP4_ASSEMLE_HASH_SIZE = 31,\r
IP4_FRAGMENT_LIFE = 120,\r
IP4_MAX_PACKET_SIZE = 65535\r
-};\r
-\r
-//\r
-// Per packet information for input process. LinkFlag specifies whether\r
-// the packet is received as Link layer unicast, multicast or broadcast.\r
-// The CastType is the IP layer cast type, such as IP multicast or unicast.\r
-// Start, End and Length are staffs used to assemble the packets. Start\r
-// is the sequence number of the first byte of data in the packet. Length\r
-// is the number of bytes of data. End = Start + Length, that is, the\r
-// sequence number of last byte + 1. Each assembled packet has a count down\r
-// life. If it isn't consumed before Life reaches zero, the packet is released.\r
-//\r
+} IP4_INPUT_ENUM_TYPES;\r
+\r
+///\r
+/// Per packet information for input process. LinkFlag specifies whether\r
+/// the packet is received as Link layer unicast, multicast or broadcast.\r
+/// The CastType is the IP layer cast type, such as IP multicast or unicast.\r
+/// Start, End and Length are staffs used to assemble the packets. Start\r
+/// is the sequence number of the first byte of data in the packet. Length\r
+/// is the number of bytes of data. End = Start + Length, that is, the\r
+/// sequence number of last byte + 1. Each assembled packet has a count down\r
+/// life. If it isn't consumed before Life reaches zero, the packet is released.\r
+///\r
typedef struct {\r
UINTN LinkFlag;\r
INTN CastType;\r
EFI_STATUS Status;\r
} IP4_CLIP_INFO;\r
\r
-//\r
-// Structure used to assemble IP packets.\r
-//\r
+///\r
+/// Structure used to assemble IP packets.\r
+///\r
typedef struct {\r
LIST_ENTRY Link;\r
\r
INTN Life; // Count down life for the packet.\r
} IP4_ASSEMBLE_ENTRY;\r
\r
-//\r
-// Each Ip service instance has an assemble table to reassemble\r
-// the packets before delivery to its children. It is organized\r
-// as hash table.\r
-//\r
+///\r
+/// Each Ip service instance has an assemble table to reassemble\r
+/// the packets before delivery to its children. It is organized\r
+/// as hash table.\r
+///\r
typedef struct {\r
LIST_ENTRY Bucket[IP4_ASSEMLE_HASH_SIZE];\r
} IP4_ASSEMBLE_TABLE;\r
@param Rcvd The option is from the packet we received if TRUE,\r
otherwise the option we wants to transmit.\r
\r
- @return TRUE: The option is properly formated\r
- @return FALSE: The option is mal-formated\r
+ @retval TRUE The option is properly formatted\r
+ @retval FALSE The option is mal-formated\r
\r
**/\r
BOOLEAN\r
Point = Option[Cur + 2];\r
\r
//\r
- // SRR/RR options are formated as |Type|Len|Point|Ip1|Ip2|...\r
+ // SRR/RR options are formatted as |Type|Len|Point|Ip1|Ip2|...\r
//\r
if ((OptionLen - Cur < Len) || (Len < 3) || ((Len - 3) % 4 != 0)) {\r
IcmpPoint = Cur + 1;\r
Copy the option from the original option to buffer. It\r
handles the details such as:\r
1. whether copy the single IP4 option to the first/non-first\r
- fragments.\r
- 2. Pad the options copied over to aligened to 4 bytes.\r
+ fragments.\r
+ 2. Pad the options copied over to aligned to 4 bytes.\r
\r
@param Option The original option to copy from\r
@param OptionLen The length of the original option\r
@param FirstFragment Whether it is the first fragment\r
- @param Buf The buffer to copy options to\r
+ @param Buf The buffer to copy options to. NULL \r
@param BufLen The length of the buffer\r
\r
@retval EFI_SUCCESS The options are copied over\r
- @retval EFI_BUFFER_TOO_SMALL The buffer caller provided is too small.\r
+ @retval EFI_BUFFER_TOO_SMALL Buf is NULL or BufLen provided is too small.\r
\r
**/\r
EFI_STATUS\r
Ip4CopyOption (\r
- IN UINT8 *Option,\r
- IN UINT32 OptionLen,\r
- IN BOOLEAN FirstFragment,\r
- IN UINT8 *Buf, OPTIONAL\r
+ IN UINT8 *Option,\r
+ IN UINT32 OptionLen,\r
+ IN BOOLEAN FirstFragment,\r
+ IN OUT UINT8 *Buf, OPTIONAL\r
IN OUT UINT32 *BufLen\r
)\r
{\r
\r
@param Packet The packet to prepend IP4 header to\r
@param Head The caller supplied header. The caller should set\r
- the following header fields: Tos, TotalLen, Id,\r
+ the following header fields: Tos, TotalLen, Id,\r
Fragment, Ttl, Protocol, Src and Dst. All the fields\r
are in host byte order. This function will fill in\r
the Ver, HeadLen, and checksum.\r
**/\r
EFI_STATUS\r
Ip4PrependHead (\r
- IN NET_BUF *Packet,\r
- IN IP4_HEAD *Head,\r
- IN UINT8 *Option,\r
- IN UINT32 OptLen\r
+ IN OUT NET_BUF *Packet,\r
+ IN IP4_HEAD *Head,\r
+ IN UINT8 *Option,\r
+ IN UINT32 OptLen\r
)\r
{\r
UINT32 HeadLen;\r
Ip4CopyOption (Option, OptLen, FirstFragment, NULL, &Len);\r
\r
HeadLen = IP4_MIN_HEADLEN + Len;\r
- ASSERT (((Len %4) == 0) && (HeadLen <= IP4_MAX_HEADLEN));\r
+ ASSERT (((Len % 4) == 0) && (HeadLen <= IP4_MAX_HEADLEN));\r
\r
PacketHead = (IP4_HEAD *) NetbufAllocSpace (Packet, HeadLen, NET_BUF_HEAD);\r
\r
@param Src The source of the packet\r
\r
@return NULL if no proper interface is found, otherwise the interface that\r
- @return can be used to send the system packet from.\r
+ can be used to send the system packet from.\r
\r
**/\r
IP4_INTERFACE *\r
NULL if the packet is from the system.\r
@param Packet The user data to send, excluding the IP header.\r
@param Head The caller supplied header. The caller should set\r
- the following header fields: Tos, TotalLen, Id, tl,\r
+ the following header fields: Tos, TotalLen, Id, tl,\r
Fragment, Protocol, Src and Dst. All the fields are\r
in host byte order. This function will fill in the\r
Ver, HeadLen, Fragment, and checksum. The Fragment\r
if (IP4_IS_BROADCAST (Ip4GetNetCast (Dest, IpIf)) || (Dest == IP4_ALLONE_ADDRESS)) {\r
//\r
// Set the gateway to local broadcast if the Dest is\r
- // is the broadcast address for the connected network\r
- // or it is local broadcast.\r
+ // the broadcast address for the connected network or\r
+ // it is local broadcast.\r
//\r
GateWay = IP4_ALLONE_ADDRESS;\r
\r
**/\r
BOOLEAN\r
Ip4CancelPacketFragments (\r
- IP4_LINK_TX_TOKEN *Frame,\r
- VOID *Context\r
+ IN IP4_LINK_TX_TOKEN *Frame,\r
+ IN VOID *Context\r
)\r
{\r
if ((Frame->Packet == (NET_BUF *) Context) || (Frame->Context == Context)) {\r
@param GateWay The nexthop address\r
\r
@return NULL if failed to allocate memeory, otherwise the newly created\r
- @return route entry.\r
+ route entry.\r
\r
**/\r
IP4_ROUTE_ENTRY *\r
\r
\r
/**\r
- Allocate and initialize a IP4 route cache entry.\r
+ Allocate and initialize an IP4 route cache entry.\r
\r
@param Dst The destination address\r
@param Src The source address\r
entries spawned from one route table entry.\r
\r
@return NULL if failed to allocate memory for the cache, other point\r
- @return to the created route cache entry.\r
+ to the created route cache entry.\r
\r
**/\r
IP4_ROUTE_CACHE_ENTRY *\r
**/\r
VOID\r
Ip4InitRouteCache (\r
- IN IP4_ROUTE_CACHE *RtCache\r
+ IN OUT IP4_ROUTE_CACHE *RtCache\r
)\r
{\r
UINT32 Index;\r
/**\r
Create an empty route table, includes its internal route cache\r
\r
- None\r
-\r
@return NULL if failed to allocate memory for the route table, otherwise\r
- @return the point to newly created route table.\r
+ the point to newly created route table.\r
\r
**/\r
IP4_ROUTE_TABLE *\r
**/\r
VOID\r
Ip4PurgeRouteCache (\r
- IN IP4_ROUTE_CACHE *RtCache,\r
- IN UINTN Tag\r
+ IN OUT IP4_ROUTE_CACHE *RtCache,\r
+ IN UINTN Tag\r
)\r
{\r
LIST_ENTRY *Entry;\r
**/\r
EFI_STATUS\r
Ip4AddRoute (\r
- IN IP4_ROUTE_TABLE *RtTable,\r
- IN IP4_ADDR Dest,\r
- IN IP4_ADDR Netmask,\r
- IN IP4_ADDR Gateway\r
+ IN OUT IP4_ROUTE_TABLE *RtTable,\r
+ IN IP4_ADDR Dest,\r
+ IN IP4_ADDR Netmask,\r
+ IN IP4_ADDR Gateway\r
)\r
{\r
LIST_ENTRY *Head;\r
**/\r
EFI_STATUS\r
Ip4DelRoute (\r
- IN IP4_ROUTE_TABLE *RtTable,\r
- IN IP4_ADDR Dest,\r
- IN IP4_ADDR Netmask,\r
- IN IP4_ADDR Gateway\r
+ IN OUT IP4_ROUTE_TABLE *RtTable,\r
+ IN IP4_ADDR Dest,\r
+ IN IP4_ADDR Netmask,\r
+ IN IP4_ADDR Gateway\r
)\r
{\r
LIST_ENTRY *Head;\r
@param Src The source address\r
\r
@return NULL if no route entry to the (Dest, Src). Otherwise the point\r
- @return to the correct route cache entry.\r
+ to the correct route cache entry.\r
\r
**/\r
IP4_ROUTE_CACHE_ENTRY *\r
\r
/**\r
Search the route table for a most specific match to the Dst. It searches\r
- from the longest route area (mask length == 32) to the shortest route area (\r
- default routes). In each route area, it will first search the instance's\r
+ from the longest route area (mask length == 32) to the shortest route area\r
+ (default routes). In each route area, it will first search the instance's\r
route table, then the default route table. This is required by the following\r
requirements:\r
1. IP search the route table for a most specific match\r
\r
\r
/**\r
- Search the route table to route the packet. Return/creat a route\r
+ Search the route table to route the packet. Return/create a route\r
cache if there is a route to the destination.\r
\r
@param RtTable The route table to search from\r
@param Src The source address to search for\r
\r
@return NULL if failed to route packet, otherwise a route cache\r
- @return entry that can be used to route packet.\r
+ entry that can be used to route packet.\r
\r
**/\r
IP4_ROUTE_CACHE_ENTRY *\r
\r
//\r
// Found a route to the Dest, if it is a direct route, the packet\r
- // will be send directly to the destination, such as for connected\r
+ // will be sent directly to the destination, such as for connected\r
// network. Otherwise, it is an indirect route, the packet will be\r
- // send the next hop router.\r
+ // sent to the next hop router.\r
//\r
if ((RtEntry->Flag & IP4_DIRECT_ROUTE) != 0) {\r
NextHop = Dest;\r
\r
#define IP4_ROUTE_CACHE_HASH(Dst, Src) (((Dst) ^ (Src)) % IP4_ROUTE_CACHE_HASH)\r
\r
-//\r
-// The route entry in the route table. Dest/Netmask is the destion\r
-// network. The nexthop is the gateway to send the packet to in\r
-// order to reach the Dest/Netmask. If the Flag has IP4_DIRECT_ROUTE\r
-// on, the gateway is the destination of the IP packet itself. Route\r
-// enties of the connected network have the flag on.\r
-//\r
+///\r
+/// The route entry in the route table. Dest/Netmask is the destion\r
+/// network. The nexthop is the gateway to send the packet to in\r
+/// order to reach the Dest/Netmask. If the Flag has IP4_DIRECT_ROUTE\r
+/// on, the gateway is the destination of the IP packet itself. Route\r
+/// enties of the connected network have the flag on.\r
+///\r
typedef struct {\r
LIST_ENTRY Link;\r
INTN RefCnt;\r
UINT32 Flag;\r
} IP4_ROUTE_ENTRY;\r
\r
-//\r
-// The route cache entry. The route cache entry is optional.\r
-// But it is necessary to support the ICMP redirect message.\r
-// Check Ip4ProcessIcmpRedirect for information.\r
-//\r
-// The cache entry field Tag is used to tag all the route\r
-// cache entry spawned from a route table entry. This makes\r
-// it simple to delete all the route cache entries from a\r
-// to-be-deleted route entry.\r
-//\r
+///\r
+/// The route cache entry. The route cache entry is optional.\r
+/// But it is necessary to support the ICMP redirect message.\r
+/// Check Ip4ProcessIcmpRedirect for information.\r
+///\r
+/// The cache entry field Tag is used to tag all the route\r
+/// cache entry spawned from a route table entry. This makes\r
+/// it simple to delete all the route cache entries from a\r
+/// to-be-deleted route entry.\r
+///\r
typedef struct {\r
LIST_ENTRY Link;\r
INTN RefCnt;\r
UINTN Tag;\r
} IP4_ROUTE_CACHE_ENTRY;\r
\r
-//\r
-// The route cache table is organized as a hash table. Each\r
-// IP4 route table has a embedded route cache. For now the\r
-// route cache and route table are binded togehter. But keep\r
-// the route cache a seperated structure in case we want to\r
-// detach them later.\r
-//\r
+///\r
+/// The route cache table is organized as a hash table. Each\r
+/// IP4 route table has a embedded route cache. For now the\r
+/// route cache and route table are binded togehter. But keep\r
+/// the route cache a seperated structure in case we want to\r
+/// detach them later.\r
+///\r
typedef struct {\r
LIST_ENTRY CacheBucket[IP4_ROUTE_CACHE_HASH];\r
} IP4_ROUTE_CACHE;\r
\r
-//\r
-// Each IP4 instance has its own route table. Each ServiceBinding\r
-// instance has a default route table and default address.\r
-//\r
-// All the route table entries with the same mask are linked\r
-// together in one route area. For example, RouteArea[0] contains\r
-// the default routes. A route table also contains a route cache.\r
-//\r
+///\r
+/// Each IP4 instance has its own route table. Each ServiceBinding\r
+/// instance has a default route table and default address.\r
+///\r
+/// All the route table entries with the same mask are linked\r
+/// together in one route area. For example, RouteArea[0] contains\r
+/// the default routes. A route table also contains a route cache.\r
+///\r
typedef struct _IP4_ROUTE_TABLE IP4_ROUTE_TABLE;\r
\r
struct _IP4_ROUTE_TABLE {\r