diff options
author | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-08-23 02:19:41 +0000 |
---|---|---|
committer | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-08-23 02:19:41 +0000 |
commit | 687a2e5f6902fa26c7a1d7a7705e0747c4095125 (patch) | |
tree | bcdcba327f17dd1fe3306d8ed04a98ca1e18f1cf /MdeModulePkg/Universal/Network/Ip4Dxe | |
parent | 4a8f7cceccde9f40f55cae415e10d80906a84919 (diff) | |
download | edk2-platforms-687a2e5f6902fa26c7a1d7a7705e0747c4095125.tar.xz |
1. Enable Network stack to pass SCT, currently MNP, ARP, IP4, TCP4 and DHCP4 have passed SCT.
2. Enable Network stack to pass ICC build.
3. Sync Network library instances' module names with their filenames.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3692 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/Network/Ip4Dxe')
-rw-r--r-- | MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Common.h | 2 | ||||
-rw-r--r-- | MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Icmp.c | 4 | ||||
-rw-r--r-- | MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Icmp.h | 2 | ||||
-rw-r--r-- | MdeModulePkg/Universal/Network/Ip4Dxe/Ip4If.c | 14 | ||||
-rw-r--r-- | MdeModulePkg/Universal/Network/Ip4Dxe/Ip4If.h | 6 | ||||
-rw-r--r-- | MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Igmp.c | 2 | ||||
-rw-r--r-- | MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Igmp.h | 2 | ||||
-rw-r--r-- | MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c | 17 | ||||
-rw-r--r-- | MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.h | 24 | ||||
-rw-r--r-- | MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Input.c | 4 | ||||
-rw-r--r-- | MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Input.h | 2 | ||||
-rw-r--r-- | MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Option.c | 6 | ||||
-rw-r--r-- | MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Option.h | 2 | ||||
-rw-r--r-- | MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Output.c | 2 | ||||
-rw-r--r-- | MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Route.c | 2 | ||||
-rw-r--r-- | MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Route.h | 4 |
16 files changed, 45 insertions, 50 deletions
diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Common.h b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Common.h index 59e5c11786..4c5a7b4079 100644 --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Common.h +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Common.h @@ -58,7 +58,7 @@ enum { // IP4_HEAD_DF_MASK = 0x4000, IP4_HEAD_MF_MASK = 0x2000, - IP4_HEAD_OFFSET_MASK = 0x1fff, + IP4_HEAD_OFFSET_MASK = 0x1fff }; #define IP4_ALLZERO_ADDRESS 0x00000000u diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Icmp.c b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Icmp.c index 7f29c90869..14188851b4 100644 --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Icmp.c +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Icmp.c @@ -251,7 +251,7 @@ Ip4IcmpReplyEcho ( Icmp = (IP4_ICMP_QUERY_HEAD *) NetbufGetByte (Data, 0, NULL);
Icmp->Head.Type = ICMP_ECHO_REPLY;
Icmp->Head.Checksum = 0;
- Icmp->Head.Checksum = ~NetblockChecksum ((UINT8 *) Icmp, Data->TotalSize);
+ Icmp->Head.Checksum = (UINT16) (~NetblockChecksum ((UINT8 *) Icmp, Data->TotalSize));
ReplyHead.Tos = 0;
ReplyHead.Fragment = 0;
@@ -353,7 +353,7 @@ Ip4IcmpHandle ( goto DROP;
}
- Checksum = ~NetbufChecksum (Packet);
+ Checksum = (UINT16) (~NetbufChecksum (Packet));
if ((Icmp.Checksum != 0) && (Checksum != 0)) {
goto DROP;
}
diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Icmp.h b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Icmp.h index f4641e2ef6..366b02c176 100644 --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Icmp.h +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Icmp.h @@ -79,7 +79,7 @@ enum { // ICMP_INVALID_MESSAGE = 0, ICMP_ERROR_MESSAGE = 1, - ICMP_QUERY_MESSAGE = 2, + ICMP_QUERY_MESSAGE = 2 }; typedef struct { diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4If.c b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4If.c index 952eb98ccc..bfb9616c2d 100644 --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4If.c +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4If.c @@ -108,8 +108,8 @@ Ip4WrapLinkTxToken ( Token->CallBack = CallBack;
Token->Packet = Packet;
Token->Context = Context;
- CopyMem (&Token->DstMac, &mZeroMacAddress, sizeof (EFI_MAC_ADDRESS));
- CopyMem (&Token->SrcMac, &Interface->Mac, sizeof (EFI_MAC_ADDRESS));
+ CopyMem (&Token->DstMac, &mZeroMacAddress, sizeof (Token->DstMac));
+ CopyMem (&Token->SrcMac, &Interface->Mac, sizeof (Token->SrcMac));
MnpToken = &(Token->MnpToken);
MnpToken->Status = EFI_NOT_READY;
@@ -213,7 +213,7 @@ Ip4CreateArpQue ( }
ArpQue->Ip = DestIp;
- CopyMem (&ArpQue->Mac, &mZeroMacAddress, sizeof (EFI_MAC_ADDRESS));
+ CopyMem (&ArpQue->Mac, &mZeroMacAddress, sizeof (ArpQue->Mac));
return ArpQue;
}
@@ -485,8 +485,8 @@ Ip4CreateInterface ( return NULL;
}
- CopyMem (&Interface->Mac, &SnpMode.CurrentAddress, sizeof (EFI_MAC_ADDRESS));
- CopyMem (&Interface->BroadcastMac, &SnpMode.BroadcastAddress, sizeof (EFI_MAC_ADDRESS));
+ CopyMem (&Interface->Mac, &SnpMode.CurrentAddress, sizeof (Interface->Mac));
+ CopyMem (&Interface->BroadcastMac, &SnpMode.BroadcastAddress, sizeof (Interface->BroadcastMac));
Interface->HwaddrLen = SnpMode.HwAddressSize;
NetListInit (&Interface->IpInstances);
@@ -796,7 +796,7 @@ Ip4OnArpResolved ( NetListRemoveEntry (Entry);
Token = NET_LIST_USER_STRUCT (Entry, IP4_LINK_TX_TOKEN, Link);
- CopyMem (&Token->DstMac, &ArpQue->Mac, sizeof (EFI_MAC_ADDRESS));
+ CopyMem (&Token->DstMac, &ArpQue->Mac, sizeof (Token->DstMac));
Status = Interface->Mnp->Transmit (Interface->Mnp, &Token->MnpToken);
@@ -904,7 +904,7 @@ Ip4SendFrame ( // all the broadcasts.
//
if (NextHop == IP4_ALLONE_ADDRESS) {
- CopyMem (&Token->DstMac, &Interface->BroadcastMac, sizeof (EFI_MAC_ADDRESS));
+ CopyMem (&Token->DstMac, &Interface->BroadcastMac, sizeof (Token->DstMac));
goto SEND_NOW;
} else if (IP4_IS_MULTICAST (NextHop)) {
diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4If.h b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4If.h index a324c82430..9db1d8ac79 100644 --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4If.h +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4If.h @@ -28,7 +28,7 @@ enum { IP4_FRAME_RX_SIGNATURE = EFI_SIGNATURE_32 ('I', 'P', 'F', 'R'), IP4_FRAME_TX_SIGNATURE = EFI_SIGNATURE_32 ('I', 'P', 'F', 'T'), IP4_FRAME_ARP_SIGNATURE = EFI_SIGNATURE_32 ('I', 'P', 'F', 'A'), - IP4_INTERFACE_SIGNATURE = EFI_SIGNATURE_32 ('I', 'P', 'I', 'F'), + IP4_INTERFACE_SIGNATURE = EFI_SIGNATURE_32 ('I', 'P', 'I', 'F') }; // @@ -134,7 +134,7 @@ BOOLEAN // Notice the special cases that DHCP can configure the interface // with 0.0.0.0/0.0.0.0. // -typedef struct _IP4_INTERFACE { +struct _IP4_INTERFACE { UINT32 Signature; NET_LIST_ENTRY Link; INTN RefCnt; @@ -182,7 +182,7 @@ typedef struct _IP4_INTERFACE { // NET_LIST_ENTRY IpInstances; BOOLEAN PromiscRecv; -} IP4_INTERFACE; +}; IP4_INTERFACE * Ip4CreateInterface ( diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Igmp.c b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Igmp.c index 135efa62ce..6609b1334d 100644 --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Igmp.c +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Igmp.c @@ -206,7 +206,7 @@ Ip4SendIgmpMessage ( Igmp->MaxRespTime = 0;
Igmp->Checksum = 0;
Igmp->Group = HTONL (Group);
- Igmp->Checksum = ~NetblockChecksum ((UINT8 *) Igmp, sizeof (IGMP_HEAD));
+ Igmp->Checksum = (UINT16) (~NetblockChecksum ((UINT8 *) Igmp, sizeof (IGMP_HEAD)));
Head.Tos = 0;
Head.Protocol = IP4_PROTO_IGMP;
diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Igmp.h b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Igmp.h index f7cb92c23f..9bda9f942b 100644 --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Igmp.h +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Igmp.h @@ -66,7 +66,7 @@ enum { IGMP_LEAVE_GROUP = 0x17, IGMP_V1ROUTER_PRESENT = 400, - IGMP_UNSOLICIATED_REPORT = 10, + IGMP_UNSOLICIATED_REPORT = 10 }; EFI_STATUS diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c index 824524d508..e617d3de80 100644 --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c @@ -67,7 +67,7 @@ EfiIp4GetModeData ( // IsConfigured is "whether the station address has been configured"
//
Ip4ModeData->IsStarted = (BOOLEAN)(IpInstance->State == IP4_STATE_CONFIGED);
- CopyMem (&Ip4ModeData->ConfigData, &IpInstance->ConfigData, sizeof (EFI_IP4_CONFIG_DATA));
+ CopyMem (&Ip4ModeData->ConfigData, &IpInstance->ConfigData, sizeof (Ip4ModeData->ConfigData));
Ip4ModeData->IsConfigured = FALSE;
Ip4ModeData->GroupCount = IpInstance->GroupCount;
@@ -112,11 +112,11 @@ EfiIp4GetModeData ( }
if (MnpConfigData != NULL) {
- CopyMem (MnpConfigData, &IpSb->MnpConfigData, sizeof (EFI_MANAGED_NETWORK_CONFIG_DATA));
+ CopyMem (MnpConfigData, &IpSb->MnpConfigData, sizeof (*MnpConfigData));
}
if (SnpModeData != NULL) {
- CopyMem (SnpModeData, &IpSb->SnpMode, sizeof (EFI_SIMPLE_NETWORK_MODE));
+ CopyMem (SnpModeData, &IpSb->SnpMode, sizeof (*SnpModeData));
}
NET_RESTORE_TPL (OldTpl);
@@ -197,7 +197,7 @@ Ip4ServiceConfigMnp ( // recover the original configuration if failed to set the configure.
//
if (EFI_ERROR (Status) && Reconfig) {
- IpSb->MnpConfigData.EnablePromiscuousReceive = !PromiscReceive;
+ IpSb->MnpConfigData.EnablePromiscuousReceive = (BOOLEAN) !PromiscReceive;
}
return Status;
@@ -477,7 +477,7 @@ Ip4InitProtocol ( NetZeroMem (IpInstance, sizeof (IP4_PROTOCOL));
IpInstance->Signature = IP4_PROTOCOL_SIGNATURE;
- CopyMem (&IpInstance->Ip4Proto, &mEfiIp4ProtocolTemplete, sizeof (EFI_IP4_PROTOCOL));
+ CopyMem (&IpInstance->Ip4Proto, &mEfiIp4ProtocolTemplete, sizeof (IpInstance->Ip4Proto));
IpInstance->State = IP4_STATE_UNCONFIGED;
IpInstance->Service = IpSb;
@@ -538,7 +538,7 @@ Ip4ConfigProtocol ( return EFI_DEVICE_ERROR;
}
- CopyMem (&IpInstance->ConfigData, Config, sizeof (EFI_IP4_CONFIG_DATA));
+ CopyMem (&IpInstance->ConfigData, Config, sizeof (IpInstance->ConfigData));
return EFI_SUCCESS;
}
@@ -627,7 +627,7 @@ Ip4ConfigProtocol ( IpInstance->Interface = IpIf;
NetListInsertTail (&IpIf->IpInstances, &IpInstance->AddrLink);
- CopyMem (&IpInstance->ConfigData, Config, sizeof (EFI_IP4_CONFIG_DATA));
+ CopyMem (&IpInstance->ConfigData, Config, sizeof (IpInstance->ConfigData));
IpInstance->State = IP4_STATE_CONFIGED;
//
@@ -1616,7 +1616,6 @@ EfiIp4Receive ( )
{
IP4_PROTOCOL *IpInstance;
- EFI_IP4_CONFIG_DATA *Config;
EFI_STATUS Status;
EFI_TPL OldTpl;
@@ -1636,8 +1635,6 @@ EfiIp4Receive ( goto ON_EXIT;
}
- Config = &IpInstance->ConfigData;
-
//
// Current Udp implementation creates an IP child for each Udp child.
// It initates a asynchronous receive immediately no matter whether
diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.h b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.h index 1bbee93237..58bf045372 100644 --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.h +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.h @@ -40,15 +40,15 @@ Abstract: #include <Library/BaseMemoryLib.h> #include <Library/MemoryAllocationLib.h> -#include "IP4Common.h" -#include "IP4Driver.h" -#include "IP4If.h" +#include "Ip4Common.h" +#include "Ip4Driver.h" +#include "Ip4If.h" #include "Ip4Icmp.h" -#include "IP4Option.h" +#include "Ip4Option.h" #include "Ip4Igmp.h" -#include "IP4Route.h" -#include "IP4Input.h" -#include "IP4Output.h" +#include "Ip4Route.h" +#include "Ip4Input.h" +#include "Ip4Output.h" enum { IP4_PROTOCOL_SIGNATURE = EFI_SIGNATURE_32 ('I', 'P', '4', 'P'), @@ -73,7 +73,7 @@ enum { IP4_SERVICE_UNSTARTED = 0, IP4_SERVICE_STARTED, IP4_SERVICE_CONFIGED, - IP4_SERVICE_DESTORY, + IP4_SERVICE_DESTORY }; // @@ -109,7 +109,7 @@ typedef struct { EFI_IP4_RECEIVE_DATA RxData; } IP4_RXDATA_WRAP; -typedef struct _IP4_PROTOCOL { +struct _IP4_PROTOCOL { UINT32 Signature; EFI_IP4_PROTOCOL Ip4Proto; @@ -148,9 +148,9 @@ typedef struct _IP4_PROTOCOL { EFI_IP4_CONFIG_DATA ConfigData; -} IP4_PROTOCOL; +}; -typedef struct _IP4_SERVICE { +struct _IP4_SERVICE { UINT32 Signature; EFI_SERVICE_BINDING_PROTOCOL ServiceBinding; INTN State; @@ -200,7 +200,7 @@ typedef struct _IP4_SERVICE { // NIC this IP4_SERVICE works on. // CHAR16 *MacString; -} IP4_SERVICE; +}; #define IP4_INSTANCE_FROM_PROTOCOL(Ip4) \ CR ((Ip4), IP4_PROTOCOL, Ip4Proto, IP4_PROTOCOL_SIGNATURE) diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Input.c b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Input.c index f5c4c9e1d4..5ed1ec79f0 100644 --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Input.c +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Input.c @@ -435,7 +435,7 @@ Ip4Reassemble ( }
NewPacket->Ip = Assemble->Head;
- CopyMem (IP4_GET_CLIP_INFO (NewPacket), Assemble->Info, sizeof (IP4_CLIP_INFO));
+ CopyMem (IP4_GET_CLIP_INFO (NewPacket), Assemble->Info, sizeof (*IP4_GET_CLIP_INFO (NewPacket)));
return NewPacket;
}
@@ -511,7 +511,7 @@ Ip4AccpetFrame ( //
// Some OS may send IP packets without checksum.
//
- Checksum = ~NetblockChecksum ((UINT8 *) Head, HeadLen);
+ Checksum = (UINT16) (~NetblockChecksum ((UINT8 *) Head, HeadLen));
if ((Head->Checksum != 0) && (Checksum != 0)) {
goto RESTART;
diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Input.h b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Input.h index 9a3af8fba7..2acf769968 100644 --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Input.h +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Input.h @@ -27,7 +27,7 @@ enum { IP4_ASSEMLE_HASH_SIZE = 31, IP4_FRAGMENT_LIFE = 120, - IP4_MAX_PACKET_SIZE = 65535, + IP4_MAX_PACKET_SIZE = 65535 }; // diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Option.c b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Option.c index e1f059e89f..322166f657 100644 --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Option.c +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Option.c @@ -47,9 +47,9 @@ Ip4OptionIsValid ( UINT32 Cur;
UINT32 Len;
UINT32 Point;
- UINT8 IcmpType;
- UINT8 IcmpCode;
- UINT32 IcmpPoint;
+ volatile UINT8 IcmpType;
+ volatile UINT8 IcmpCode;
+ volatile UINT32 IcmpPoint;
IcmpType = ICMP_PARAMETER_PROBLEM;
IcmpCode = 0;
diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Option.h b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Option.h index 6af885f25b..665b55b06a 100644 --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Option.h +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Option.h @@ -31,7 +31,7 @@ enum { IP4_OPTION_SSRR = 137, // Strict source and record routing, 10001001 IP4_OPTION_RR = 7, // Record routing, 00000111 - IP4_OPTION_COPY_MASK = 0x80, + IP4_OPTION_COPY_MASK = 0x80 }; BOOLEAN diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Output.c b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Output.c index d595ab2999..0232bfedda 100644 --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Output.c +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Output.c @@ -89,7 +89,7 @@ Ip4PrependHead ( PacketHead->Protocol = Head->Protocol;
PacketHead->Src = HTONL (Head->Src);
PacketHead->Dst = HTONL (Head->Dst);
- PacketHead->Checksum = ~NetblockChecksum ((UINT8 *) PacketHead, HeadLen);
+ PacketHead->Checksum = (UINT16) (~NetblockChecksum ((UINT8 *) PacketHead, HeadLen));
Packet->Ip = PacketHead;
return EFI_SUCCESS;
diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Route.c b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Route.c index 2cf1d0f29c..54d934250f 100644 --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Route.c +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Route.c @@ -628,7 +628,6 @@ Ip4BuildEfiRouteTable ( IN IP4_PROTOCOL *IpInstance
)
{
- IP4_SERVICE *IpSb;
NET_LIST_ENTRY *Entry;
IP4_ROUTE_TABLE *RtTable;
IP4_ROUTE_ENTRY *RtEntry;
@@ -636,7 +635,6 @@ Ip4BuildEfiRouteTable ( UINT32 Count;
INT32 Index;
- IpSb = IpInstance->Service;
RtTable = IpInstance->RouteTable;
if (IpInstance->EfiRouteTable != NULL) {
diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Route.h b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Route.h index ce07b1d10c..3dce5d2f3a 100644 --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Route.h +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Route.h @@ -30,7 +30,7 @@ enum { IP4_DIRECT_ROUTE = 0x00000001, IP4_ROUTE_CACHE_HASH = 31, - IP4_ROUTE_CACHE_MAX = 64, // Max NO. of cache entry per hash bucket + IP4_ROUTE_CACHE_MAX = 64 // Max NO. of cache entry per hash bucket }; #define IP4_ROUTE_CACHE_HASH(Dst, Src) (((Dst) ^ (Src)) % IP4_ROUTE_CACHE_HASH) @@ -91,7 +91,7 @@ typedef struct { // typedef struct _IP4_ROUTE_TABLE IP4_ROUTE_TABLE; -typedef struct _IP4_ROUTE_TABLE { +struct _IP4_ROUTE_TABLE { INTN RefCnt; UINT32 TotalNum; NET_LIST_ENTRY RouteArea[IP4_MASK_NUM]; |