]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Io.c
1. Add DPC protocol and DpcLib library in MdeModulePkg.
[mirror_edk2.git] / MdeModulePkg / Universal / Network / Dhcp4Dxe / Dhcp4Io.c
index e0fdcd382c66ef0da001dbe5e2ac7dbc4cc24400..8adf40ff4366bad97fecdd549f3446bdacdace7c 100644 (file)
@@ -120,7 +120,7 @@ DhcpCallUser (
   Status = Config->Dhcp4Callback (\r
                      &DhcpSb->ActiveChild->Dhcp4Protocol,\r
                      Config->CallbackContext,\r
-                     DhcpSb->DhcpState,\r
+                     (EFI_DHCP4_STATE) DhcpSb->DhcpState,\r
                      Event,\r
                      Packet,\r
                      NewPacket\r
@@ -755,15 +755,15 @@ DhcpHandleRequest (
   //\r
   Message = NULL;\r
 \r
-  if (!EFI_IP4_EQUAL (Head->YourAddr, Selected->YourAddr)) {\r
-    Message = "Lease confirmed isn't the same as that in the offer";\r
+  if (!EFI_IP4_EQUAL (&Head->YourAddr, &Selected->YourAddr)) {\r
+    Message = (UINT8 *) "Lease confirmed isn't the same as that in the offer";\r
     goto REJECT;\r
   }\r
 \r
   Status = DhcpCallUser (DhcpSb, Dhcp4RcvdAck, Packet, NULL);\r
 \r
   if (EFI_ERROR (Status)) {\r
-    Message = "Lease is denied upon received ACK";\r
+    Message = (UINT8 *) "Lease is denied upon received ACK";\r
     goto REJECT;\r
   }\r
 \r
@@ -773,7 +773,7 @@ DhcpHandleRequest (
   Status = DhcpLeaseAcquired (DhcpSb);\r
 \r
   if (EFI_ERROR (Status)) {\r
-    Message = "Lease is denied upon entering bound";\r
+    Message = (UINT8 *) "Lease is denied upon entering bound";\r
     goto REJECT;\r
   }\r
 \r
@@ -846,7 +846,7 @@ DhcpHandleRenewRebind (
   // The lease is different from the selected. Don't send a DECLINE\r
   // since it isn't existed in the client's FSM.\r
   //\r
-  if (!EFI_IP4_EQUAL (Head->YourAddr, Selected->YourAddr)) {\r
+  if (!EFI_IP4_EQUAL (&Head->YourAddr, &Selected->YourAddr)) {\r
     goto ON_EXIT;\r
   }\r
 \r
@@ -948,7 +948,7 @@ DhcpHandleReboot (
   }\r
 \r
   DhcpSb->Selected  = Packet;\r
-  CopyMem (DhcpSb->Para, Para, sizeof (DHCP_PARAMETER));\r
+  CopyMem (DhcpSb->Para, Para, sizeof (*DhcpSb->Para));\r
 \r
   Status            = DhcpLeaseAcquired (DhcpSb);\r
 \r
@@ -1214,7 +1214,7 @@ DhcpSendMessage (
   Len = sizeof (EFI_DHCP4_PACKET) + 128 + DhcpSb->UserOptionLen;\r
 \r
   if (Msg != NULL) {\r
-    Len += (UINT32)AsciiStrLen (Msg);\r
+    Len += (UINT32)AsciiStrLen ((CHAR8 *) Msg);\r
   }\r
 \r
   Packet = NetAllocatePool (Len);\r
@@ -1310,7 +1310,7 @@ DhcpSendMessage (
   // Append the user's message if it isn't NULL\r
   //\r
   if (Msg != NULL) {\r
-    Len     = NET_MIN ((UINT32) AsciiStrLen (Msg), 255);\r
+    Len     = MIN ((UINT32) AsciiStrLen ((CHAR8 *) Msg), 255);\r
     Buf     = DhcpAppendOption (Buf, DHCP_TAG_MESSAGE, (UINT16) Len, Msg);\r
   }\r
 \r