]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Impl.h
Clean up to update the reference of the these macros:
[mirror_edk2.git] / MdeModulePkg / Universal / Network / Dhcp4Dxe / Dhcp4Impl.h
index 7a04109f4db82e0f82dd33ee75c7f73d721bd674..4832ecd747481dc0f57711fa8cddc49436f82844 100644 (file)
@@ -1,6 +1,6 @@
 /** @file\r
 \r
-Copyright (c) 2006, Intel Corporation\r
+Copyright (c) 2006 - 2008, Intel Corporation\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
@@ -48,10 +48,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,12 +62,12 @@ enum {
   DHCP_UNCONFIGED         = 0,\r
   DHCP_CONFIGED,\r
   DHCP_DESTORY\r
-};\r
+} DHCP_STATE;\r
 \r
 struct _DHCP_PROTOCOL {\r
   UINT32                            Signature;\r
   EFI_DHCP4_PROTOCOL                Dhcp4Protocol;\r
-  NET_LIST_ENTRY                    Link;\r
+  LIST_ENTRY                        Link;\r
   EFI_HANDLE                        Handle;\r
   DHCP_SERVICE                      *Service;\r
 \r
@@ -77,6 +77,9 @@ struct _DHCP_PROTOCOL {
   EFI_EVENT                         RenewRebindEvent;\r
 \r
   EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN  *Token;\r
+  UDP_IO_PORT                       *UdpIo; // The UDP IO used for TransmitReceive.\r
+  UINT32                            Timeout;\r
+  NET_BUF_QUEUE                     ResponseQueue;\r
 };\r
 \r
 //\r
@@ -93,7 +96,7 @@ struct _DHCP_SERVICE {
   EFI_HANDLE                    Controller;\r
   EFI_HANDLE                    Image;\r
 \r
-  NET_LIST_ENTRY                Children;\r
+  LIST_ENTRY                    Children;\r
   UINTN                         NumChildren;\r
 \r
   INTN                          DhcpState;\r
@@ -119,6 +122,7 @@ struct _DHCP_SERVICE {
   EFI_MAC_ADDRESS               Mac;\r
   UINT8                         HwType;\r
   UINT8                         HwLen;\r
+  UINT8                         ClientAddressSendOut[16];\r
 \r
   DHCP_PROTOCOL                 *ActiveChild;\r
   EFI_DHCP4_CONFIG_DATA         ActiveConfig;\r
@@ -132,8 +136,6 @@ struct _DHCP_SERVICE {
   UINT32                        PacketToLive; // Retransmission timer for our packets\r
   INTN                          CurRetry;\r
   INTN                          MaxRetries;\r
-\r
-  UINT32                        WaitOffer;    // Time to collect the offers\r
   UINT32                        LeaseLife;\r
 };\r
 \r
@@ -151,9 +153,32 @@ 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
+  @return None\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
+  @return None.\r
+\r
+**/\r
+VOID\r
+PxeDhcpDone (\r
+  IN DHCP_PROTOCOL  *Instance\r
   );\r
 \r
 #endif\r