]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Impl.h
Clean Network Driver to include Uefi.h, not PiDxe.h.
[mirror_edk2.git] / MdeModulePkg / Universal / Network / Dhcp4Dxe / Dhcp4Impl.h
index bf401bda0d0cfe66a91a6cff16fc037adfea4f78..fa75215dadee71b631226732ec9b40ad25e92a20 100644 (file)
@@ -1,6 +1,12 @@
 /** @file\r
-\r
-Copyright (c) 2006 - 2008, Intel Corporation\r
+  EFI DHCP protocol implementation.\r
+  RFCs supported are:\r
+  RFC 2131: Dynamic Host Configuration Protocol\r
+  RFC 2132: DHCP Options and BOOTP Vendor Extensions\r
+  RFC 1534: Interoperation Between DHCP and BOOTP\r
+  RFC 3396: Encoding Long Options in DHCP.\r
+  \r
+Copyright (c) 2006 - 2008, Intel Corporation.<BR>\r
 All rights reserved. This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -9,20 +15,6 @@ http://opensource.org/licenses/bsd-license.php
 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
-Module Name:\r
-\r
-  Dhcp4Impl.h\r
-\r
-Abstract:\r
-\r
-  EFI DHCP protocol implementation\r
-  RFCs supported are:\r
-  RFC 2131: Dynamic Host Configuration Protocol\r
-  RFC 2132: DHCP Options and BOOTP Vendor Extensions\r
-  RFC 1534: Interoperation Between DHCP and BOOTP\r
-  RFC 3396: Encoding Long Options in DHCP\r
-\r
-\r
 **/\r
 \r
 #ifndef __EFI_DHCP4_IMPL_H__\r
@@ -30,7 +22,7 @@ Abstract:
 \r
 \r
 \r
-#include <PiDxe.h>\r
+#include <Uefi.h>\r
 \r
 #include <Protocol/Dhcp4.h>\r
 #include <Protocol/Udp4.h>\r
@@ -48,10 +40,10 @@ typedef struct _DHCP_PROTOCOL DHCP_PROTOCOL;
 #include "Dhcp4Option.h"\r
 #include "Dhcp4Io.h"\r
 \r
-enum {\r
-  DHCP_SERVICE_SIGNATURE  = EFI_SIGNATURE_32 ('D', 'H', 'C', 'P'),\r
-  DHCP_PROTOCOL_SIGNATURE = EFI_SIGNATURE_32 ('d', 'h', 'c', 'p'),\r
+#define DHCP_SERVICE_SIGNATURE   SIGNATURE_32 ('D', 'H', 'C', 'P')\r
+#define DHCP_PROTOCOL_SIGNATURE  SIGNATURE_32 ('d', 'h', 'c', 'p')\r
 \r
+typedef enum {\r
   //\r
   // The state of the DHCP service. It starts as UNCONFIGED. If\r
   // and active child configures the service successfully, it\r
@@ -62,7 +54,7 @@ enum {
   DHCP_UNCONFIGED         = 0,\r
   DHCP_CONFIGED,\r
   DHCP_DESTORY\r
-};\r
+} DHCP_STATE;\r
 \r
 struct _DHCP_PROTOCOL {\r
   UINT32                            Signature;\r
@@ -153,11 +145,25 @@ typedef struct {
 \r
 extern EFI_DHCP4_PROTOCOL mDhcp4ProtocolTemplate;\r
 \r
+/**\r
+  Give up the control of the DHCP service to let other child\r
+  resume. Don't change the service's DHCP state and the Client\r
+  address and option list configure as required by RFC2131.\r
+\r
+  @param  DhcpSb                 The DHCP service instance.\r
+\r
+**/\r
 VOID\r
 DhcpYieldControl (\r
-  IN DHCP_SERVICE         *DhcpSb\r
+  IN DHCP_SERVICE           *DhcpSb\r
   );\r
 \r
+/**\r
+  Complete a Dhcp4 transaction and signal the upper layer.\r
+  \r
+  @param Instance      Dhcp4 instance.\r
+\r
+**/\r
 VOID\r
 PxeDhcpDone (\r
   IN DHCP_PROTOCOL  *Instance\r