diff options
author | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-11-20 05:42:23 +0000 |
---|---|---|
committer | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-11-20 05:42:23 +0000 |
commit | 36ee91ca3661d3d020a7841aacbf858d885c4728 (patch) | |
tree | 418e7a4d4a84d86a78d4b260acab20877be5bd45 /MdeModulePkg/Universal/Network/Dhcp4Dxe | |
parent | 04e12c21476db29e8f92030ed00122fa4e1e56cc (diff) | |
download | edk2-platforms-36ee91ca3661d3d020a7841aacbf858d885c4728.tar.xz |
1. Add DPC protocol and DpcLib library in MdeModulePkg.
2. Add DpcDxe module and DxeDpcLib module in MdeModulePkg
3. Port network stack module to use DPC.
4. Use MIN, and MAX defined in MdePkg to replace NET_MIN and NET_MAX.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4307 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/Network/Dhcp4Dxe')
-rw-r--r-- | MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Impl.c | 8 | ||||
-rw-r--r-- | MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Io.c | 2 | ||||
-rw-r--r-- | MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Option.c | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Impl.c b/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Impl.c index 69598f15c3..e8e9b383f8 100644 --- a/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Impl.c +++ b/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Impl.c @@ -178,7 +178,7 @@ DhcpCopyConfigure ( }
for (Index = 0; Index < Src->DiscoverTryCount; Index++) {
- Dst->DiscoverTimeout[Index] = NET_MAX (Src->DiscoverTimeout[Index], 1);
+ Dst->DiscoverTimeout[Index] = MAX (Src->DiscoverTimeout[Index], 1);
}
}
@@ -194,7 +194,7 @@ DhcpCopyConfigure ( }
for (Index = 0; Index < Src->RequestTryCount; Index++) {
- Dst->RequestTimeout[Index] = NET_MAX (Src->RequestTimeout[Index], 1);
+ Dst->RequestTimeout[Index] = MAX (Src->RequestTimeout[Index], 1);
}
}
@@ -214,7 +214,7 @@ DhcpCopyConfigure ( SrcOptions = Src->OptionList;
for (Index = 0; Index < Src->OptionCount; Index++) {
- Len = sizeof (EFI_DHCP4_PACKET_OPTION) + NET_MAX (SrcOptions[Index]->Length - 1, 0);
+ Len = sizeof (EFI_DHCP4_PACKET_OPTION) + MAX (SrcOptions[Index]->Length - 1, 0);
DstOptions[Index] = NetAllocatePool (Len);
@@ -819,7 +819,7 @@ Dhcp4ParseCheckOption ( Parse = (DHCP_PARSE_CONTEXT *) Context;
Parse->Index++;
- if (Parse->Index < Parse->OptionCount) {
+ if (Parse->Index <= Parse->OptionCount) {
//
// Use _CR to get the memory position of EFI_DHCP4_PACKET_OPTION for
// the EFI_DHCP4_PACKET_OPTION->Data because DhcpIterateOptions only
diff --git a/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Io.c b/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Io.c index 17c61007f1..8adf40ff43 100644 --- a/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Io.c +++ b/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Io.c @@ -1310,7 +1310,7 @@ DhcpSendMessage ( // Append the user's message if it isn't NULL
//
if (Msg != NULL) {
- Len = NET_MIN ((UINT32) AsciiStrLen ((CHAR8 *) Msg), 255);
+ Len = MIN ((UINT32) AsciiStrLen ((CHAR8 *) Msg), 255);
Buf = DhcpAppendOption (Buf, DHCP_TAG_MESSAGE, (UINT16) Len, Msg);
}
diff --git a/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Option.c b/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Option.c index cf43dfa206..cf81199839 100644 --- a/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Option.c +++ b/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Option.c @@ -763,7 +763,7 @@ DhcpAppendOption ( ASSERT (DataLen != 0);
for (Index = 0; Index < (DataLen + 254) / 255; Index++) {
- Len = NET_MIN (255, DataLen - Index * 255);
+ Len = MIN (255, DataLen - Index * 255);
*(Buf++) = Tag;
*(Buf++) = (UINT8) Len;
|