]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Io.h
BaseTools:Change the path of the file that Binary Cache
[mirror_edk2.git] / MdeModulePkg / Universal / Network / Dhcp4Dxe / Dhcp4Io.h
index 21bbf194bff216a0f9c047d3df4793b91d22d96e..01283e5e17b940045085121a65859653a3b78c2d 100644 (file)
@@ -1,30 +1,15 @@
 /** @file\r
-\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
-http://opensource.org/licenses/bsd-license.php\r
-\r
-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
-\r
-Module Name:\r
-\r
-  Dhcp4Io.h\r
-\r
-Abstract:\r
-\r
   The DHCP4 protocol implementation.\r
 \r
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
+SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 \r
 #ifndef __EFI_DHCP4_IO_H__\r
 #define __EFI_DHCP4_IO_H__\r
 \r
-#include <PiDxe.h>\r
+#include <Uefi.h>\r
 \r
 #include <Protocol/ServiceBinding.h>\r
 \r
@@ -40,36 +25,30 @@ Abstract:
 #define DHCP_SERVER_PORT                  67\r
 #define DHCP_CLIENT_PORT                  68\r
 \r
-typedef enum {\r
-  //\r
-  // BOOTP header "op" field\r
-  //\r
-  BOOTP_REQUEST           = 1,\r
-  BOOTP_REPLY             = 2\r
-} DHCP_OP_TYPE;\r
-\r
-typedef enum {\r
-  //\r
-  // DHCP message types\r
-  //\r
-  DHCP_MSG_DISCOVER       = 1,\r
-  DHCP_MSG_OFFER          = 2,\r
-  DHCP_MSG_REQUEST        = 3,\r
-  DHCP_MSG_DECLINE        = 4,\r
-  DHCP_MSG_ACK            = 5,\r
-  DHCP_MSG_NAK            = 6,\r
-  DHCP_MSG_RELEASE        = 7,\r
-  DHCP_MSG_INFORM         = 8\r
-} DHCP_MSG_TYPE;\r
-\r
-typedef enum {\r
-  //\r
-  // DHCP notify user type\r
-  //\r
-  DHCP_NOTIFY_COMPLETION  = 1,\r
-  DHCP_NOTIFY_RENEWREBIND,\r
-  DHCP_NOTIFY_ALL\r
-} DHCP_NOTIFY_TYPE;\r
+//\r
+// BOOTP header "op" field\r
+//\r
+#define BOOTP_REQUEST           1\r
+#define BOOTP_REPLY             2\r
+\r
+//\r
+// DHCP message types\r
+//\r
+#define DHCP_MSG_DISCOVER       1\r
+#define DHCP_MSG_OFFER          2\r
+#define DHCP_MSG_REQUEST        3\r
+#define DHCP_MSG_DECLINE        4\r
+#define DHCP_MSG_ACK            5\r
+#define DHCP_MSG_NAK            6\r
+#define DHCP_MSG_RELEASE        7\r
+#define DHCP_MSG_INFORM         8\r
+\r
+//\r
+// DHCP notify user type\r
+//\r
+#define DHCP_NOTIFY_COMPLETION  1\r
+#define DHCP_NOTIFY_RENEWREBIND 2\r
+#define DHCP_NOTIFY_ALL         3\r
 \r
 #define DHCP_IS_BOOTP(Parameter)  (((Parameter) == NULL) || ((Parameter)->DhcpType == 0))\r
 \r
@@ -104,12 +83,12 @@ DhcpSetState (
   the state (as defined in Figure 5. of the same RFC) before sending\r
   a DHCP message. The table is adjusted accordingly.\r
 \r
-  @param  DhcpSb                The DHCP service instance\r
-  @param  Seed                  The seed packet which the new packet is based on\r
-  @param  Para                  The DHCP parameter of the Seed packet\r
-  @param  Type                  The message type to send\r
-  @param  Msg                   The human readable message to include in the packet\r
-                                sent.\r
+  @param[in]  DhcpSb                The DHCP service instance\r
+  @param[in]  Seed                  The seed packet which the new packet is based on\r
+  @param[in]  Para                  The DHCP parameter of the Seed packet\r
+  @param[in]  Type                  The message type to send\r
+  @param[in]  Msg                   The human readable message to include in the packet\r
+                                    sent.\r
 \r
   @retval EFI_OUT_OF_RESOURCES  Failed to allocate resources for the packet\r
   @retval EFI_ACCESS_DENIED     Failed to transmit the packet through UDP\r
@@ -133,10 +112,8 @@ DhcpSendMessage (
   and lease to determine the time to renew and rebind the lease.\r
   DhcpOnTimerTick will be called once every second.\r
 \r
-  @param  Event                 The timer event\r
-  @param  Context               The context, which is the DHCP service instance.\r
-\r
-  @return None\r
+  @param[in]  Event                 The timer event\r
+  @param[in]  Context               The context, which is the DHCP service instance.\r
 \r
 **/\r
 VOID\r
@@ -151,17 +128,16 @@ DhcpOnTimerTick (
   state machine.\r
 \r
   @param  UdpPacket             The UDP packets received.\r
-  @param  Points                The local/remote UDP access points\r
+  @param  EndPoint              The local/remote UDP access point\r
   @param  IoStatus              The status of the UDP receive\r
   @param  Context               The opaque parameter to the function.\r
 \r
-  @return None\r
-\r
 **/\r
 VOID\r
+EFIAPI\r
 DhcpInput (\r
   NET_BUF                   *UdpPacket,\r
-  UDP_POINTS                *Points,\r
+  UDP_END_POINT             *EndPoint,\r
   EFI_STATUS                IoStatus,\r
   VOID                      *Context\r
   );\r
@@ -170,7 +146,7 @@ DhcpInput (
   Send an initial DISCOVER or REQUEST message according to the\r
   DHCP service's current state.\r
 \r
-  @param  DhcpSb                The DHCP service instance\r
+  @param[in]  DhcpSb                The DHCP service instance\r
 \r
   @retval EFI_SUCCESS           The request has been sent\r
   @retval other                 Some error occurs when sending the request.\r
@@ -186,8 +162,6 @@ DhcpInitRequest (
 \r
   @param  DhcpSb                The DHCP instance service.\r
 \r
-  @return None\r
-\r
 **/\r
 VOID\r
 DhcpCleanLease (\r
@@ -198,17 +172,16 @@ DhcpCleanLease (
   Release the net buffer when packet is sent.\r
 \r
   @param  UdpPacket             The UDP packets received.\r
-  @param  Points                The local/remote UDP access points\r
+  @param  EndPoint              The local/remote UDP access point\r
   @param  IoStatus              The status of the UDP receive\r
   @param  Context               The opaque parameter to the function.\r
 \r
-  @return None\r
-\r
 **/\r
 VOID\r
+EFIAPI\r
 DhcpOnPacketSent (\r
   NET_BUF                   *Packet,\r
-  UDP_POINTS                *Points,\r
+  UDP_END_POINT             *EndPoint,\r
   EFI_STATUS                IoStatus,\r
   VOID                      *Context\r
   );\r