]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Protocol/Dhcp4.h
Formalize comments for Protocols and PPIs.
[mirror_edk2.git] / MdePkg / Include / Protocol / Dhcp4.h
index 7879b5141c0180cc95e52f6d39669afaf24e909e..cefa8de73ae4a3bcc1f007291a903e71f9fc07c7 100644 (file)
@@ -1,17 +1,17 @@
 /** @file\r
   EFI_DHCP4_PROTOCOL as defined in UEFI 2.0.\r
   EFI_DHCP4_SERVICE_BINDING_PROTOCOL as defined in UEFI 2.0.\r
-  These protocols are used to collect configuration information for the EFI IPv4 Protocol \r
+  These protocols are used to collect configuration information for the EFI IPv4 Protocol\r
   drivers and to provide DHCPv4 server and PXE boot server discovery services.\r
 \r
-  Copyright (c) 2006, 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
+  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
+  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
 \r
@@ -27,7 +27,7 @@
   { \\r
     0x9d9a39d8, 0xbd42, 0x4a73, {0xa4, 0xd5, 0x8e, 0xe9, 0x4b, 0xe1, 0x13, 0x80 } \\r
   }\r
-  \r
+\r
 typedef struct _EFI_DHCP4_PROTOCOL EFI_DHCP4_PROTOCOL;\r
 \r
 \r
@@ -49,12 +49,12 @@ typedef struct {
     UINT32            Xid;\r
     UINT16            Seconds;\r
     UINT16            Reserved;\r
-    EFI_IPv4_ADDRESS  ClientAddr;       //Client IP address from client\r
-    EFI_IPv4_ADDRESS  YourAddr;         //Client IP address from server\r
-    EFI_IPv4_ADDRESS  ServerAddr;       //IP address of next server in bootstrap \r
-    EFI_IPv4_ADDRESS  GatewayAddr;      //Relay agent IP address\r
-    UINT8             ClientHwAddr[16]; //Client hardware address\r
-    CHAR8             ServerName[64];   \r
+    EFI_IPv4_ADDRESS  ClientAddr;       ///< Client IP address from client\r
+    EFI_IPv4_ADDRESS  YourAddr;         ///< Client IP address from server\r
+    EFI_IPv4_ADDRESS  ServerAddr;       ///< IP address of next server in bootstrap\r
+    EFI_IPv4_ADDRESS  GatewayAddr;      ///< Relay agent IP address\r
+    UINT8             ClientHwAddr[16]; ///< Client hardware address\r
+    CHAR8             ServerName[64];\r
     CHAR8             BootFileName[128];\r
 }EFI_DHCP4_HEADER;\r
 #pragma pack()\r
@@ -102,42 +102,42 @@ typedef enum{
   Dhcp4Fail           = 0x0c\r
 } EFI_DHCP4_EVENT;\r
 \r
-/**                                                                 \r
-  Callback routine \r
-    \r
+/**\r
+  Callback routine\r
+\r
   @param  This                  Pointer to the EFI DHCPv4 Protocol instance that is used to\r
-                                configure this callback function.                          \r
+                                configure this callback function.\r
   @param  Context               Pointer to the context that is initialized by\r
-                                EFI_DHCP4_PROTOCOL.Configure().                                              \r
+                                EFI_DHCP4_PROTOCOL.Configure().\r
   @param  CurrentState          The current operational state of the EFI DHCPv4 Protocol\r
-                                driver.                                                 \r
+                                driver.\r
   @param  Dhcp4Event            The event that occurs in the current state, which usually means a\r
-                                state transition.                                                \r
-  @param  Packet                The DHCP packet that is going to be sent or already received.                \r
+                                state transition.\r
+  @param  Packet                The DHCP packet that is going to be sent or already received.\r
   @param  NewPacket             The packet that is used to replace the above Packet.\r
-                                \r
+\r
   @retval EFI_SUCCESS           Tells the EFI DHCPv4 Protocol driver to continue the DHCP process.\r
-  @retval EFI_NOT_READY         Only used in the Dhcp4Selecting state. The EFI DHCPv4 Protocol         \r
+  @retval EFI_NOT_READY         Only used in the Dhcp4Selecting state. The EFI DHCPv4 Protocol\r
                                 driver will continue to wait for more DHCPOFFER packets until the retry\r
-                                timeout expires.                                                       \r
+                                timeout expires.\r
   @retval EFI_ABORTED           Tells the EFI DHCPv4 Protocol driver to abort the current process and\r
-                                return to the Dhcp4Init or Dhcp4InitReboot state.                    \r
-                                   \r
+                                return to the Dhcp4Init or Dhcp4InitReboot state.\r
+\r
 **/\r
-typedef \r
-EFI_STATUS \r
-(EFIAPI *EFI_DHCP4_CALLBACK) (\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_DHCP4_CALLBACK)(\r
   IN  EFI_DHCP4_PROTOCOL         *This,\r
   IN  VOID                       *Context,\r
   IN  EFI_DHCP4_STATE            CurrentState,\r
   IN  EFI_DHCP4_EVENT            Dhcp4Event,\r
-  IN  EFI_DHCP4_PACKET           *Packet     OPTIONAL, \r
+  IN  EFI_DHCP4_PACKET           *Packet     OPTIONAL,\r
   OUT EFI_DHCP4_PACKET           **NewPacket OPTIONAL\r
   );\r
 \r
 \r
 typedef struct {\r
-  UINT32                      DiscoverTryCount;      \r
+  UINT32                      DiscoverTryCount;\r
   UINT32                      *DiscoverTimeout;\r
   UINT32                      RequestTryCount;\r
   UINT32                      *RequestTimeout;\r
@@ -170,17 +170,17 @@ typedef struct {
 \r
 \r
 typedef struct {\r
-  OUT EFI_STATUS              Status;\r
-  IN  EFI_EVENT               CompletionEvent;\r
-  IN  EFI_IPv4_ADDRESS        RemoteAddress;\r
-  IN  UINT16                  RemotePort;\r
-  IN  EFI_IPv4_ADDRESS        GatewayAddress;\r
-  IN  UINT32                  ListenPointCount;\r
-  IN  EFI_DHCP4_LISTEN_POINT  *ListenPoints;\r
-  IN  UINT32                  TimeoutValue;\r
-  IN  EFI_DHCP4_PACKET        *Packet;\r
-  OUT UINT32                  ResponseCount;\r
-  OUT EFI_DHCP4_PACKET        *ResponseList;\r
+  EFI_STATUS              Status;\r
+  EFI_EVENT               CompletionEvent;\r
+  EFI_IPv4_ADDRESS        RemoteAddress;\r
+  UINT16                  RemotePort;\r
+  EFI_IPv4_ADDRESS        GatewayAddress;\r
+  UINT32                  ListenPointCount;\r
+  EFI_DHCP4_LISTEN_POINT  *ListenPoints;\r
+  UINT32                  TimeoutValue;\r
+  EFI_DHCP4_PACKET        *Packet;\r
+  UINT32                  ResponseCount;\r
+  EFI_DHCP4_PACKET        *ResponseList;\r
 } EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN;\r
 \r
 \r
@@ -194,13 +194,12 @@ typedef struct {
   @retval EFI_INVALID_PARAMETER This is NULL.\r
 \r
 **/\r
-typedef \r
-EFI_STATUS \r
+typedef\r
+EFI_STATUS\r
 (EFIAPI *EFI_DHCP4_GET_MODE_DATA)(\r
   IN  EFI_DHCP4_PROTOCOL      *This,\r
   OUT EFI_DHCP4_MODE_DATA     *Dhcp4ModeData\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Initializes, changes, or resets the operational settings for the EFI DHCPv4 Protocol driver.\r
@@ -221,13 +220,12 @@ EFI_STATUS
   @retval EFI_DEVICE_ERROR      An unexpected system or network error occurred.\r
 \r
 **/\r
-typedef \r
+typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_DHCP4_CONFIGURE) (\r
+(EFIAPI *EFI_DHCP4_CONFIGURE)(\r
   IN EFI_DHCP4_PROTOCOL       *This,\r
   IN EFI_DHCP4_CONFIG_DATA    *Dhcp4CfgData  OPTIONAL\r
-  )\r
-;\r
+  );\r
 \r
 \r
 /**\r
@@ -256,13 +254,12 @@ EFI_STATUS
   @retval EFI_DEVICE_ERROR      An unexpected system or network error occurred.\r
 \r
 **/\r
-typedef \r
+typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_DHCP4_START) (\r
+(EFIAPI *EFI_DHCP4_START)(\r
   IN EFI_DHCP4_PROTOCOL       *This,\r
   IN EFI_EVENT                CompletionEvent   OPTIONAL\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Extends the lease time by sending a request packet.\r
@@ -292,12 +289,11 @@ EFI_STATUS
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_DHCP4_RENEW_REBIND) (\r
+(EFIAPI *EFI_DHCP4_RENEW_REBIND)(\r
   IN EFI_DHCP4_PROTOCOL       *This,\r
   IN BOOLEAN                  RebindRequest,\r
   IN EFI_EVENT                CompletionEvent  OPTIONAL\r
-  )\r
-;  \r
+  );\r
 \r
 /**\r
   Releases the current address configuration.\r
@@ -310,28 +306,26 @@ EFI_STATUS
   @retval EFI_DEVICE_ERROR      An unexpected system or network error occurred.\r
 \r
 **/\r
-typedef \r
+typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_DHCP4_RELEASE) (\r
+(EFIAPI *EFI_DHCP4_RELEASE)(\r
   IN EFI_DHCP4_PROTOCOL       *This\r
-  )\r
-;  \r
+  );\r
 \r
 /**\r
   Stops the current address configuration.\r
 \r
   @param  This                  Pointer to the EFI_DHCP4_PROTOCOL instance.\r
-                                 \r
+\r
   @retval EFI_SUCCESS           The EFI DHCPv4 Protocol driver is now in the Dhcp4Stopped phase.\r
   @retval EFI_INVALID_PARAMETER This is NULL.\r
 \r
 **/\r
-typedef \r
+typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_DHCP4_STOP) (\r
+(EFIAPI *EFI_DHCP4_STOP)(\r
   IN EFI_DHCP4_PROTOCOL       *This\r
-  )\r
-; \r
+  );\r
 \r
 /**\r
   Builds a DHCP packet, given the options to be appended or deleted or replaced.\r
@@ -357,7 +351,7 @@ EFI_STATUS
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_DHCP4_BUILD) (\r
+(EFIAPI *EFI_DHCP4_BUILD)(\r
   IN  EFI_DHCP4_PROTOCOL      *This,\r
   IN  EFI_DHCP4_PACKET        *SeedPacket,\r
   IN  UINT32                  DeleteCount,\r
@@ -366,8 +360,6 @@ EFI_STATUS
   IN  EFI_DHCP4_PACKET_OPTION *AppendList[]       OPTIONAL,\r
   OUT EFI_DHCP4_PACKET        **NewPacket\r
   );\r
-;   \r
-\r
 /**\r
   Transmits a DHCP formatted packet and optionally waits for responses.\r
 \r
@@ -383,13 +375,12 @@ EFI_STATUS
   @retval Others                Some other unexpected error occurred.\r
 \r
 **/\r
-typedef \r
+typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_DHCP4_TRANSMIT_RECEIVE) (\r
+(EFIAPI *EFI_DHCP4_TRANSMIT_RECEIVE)(\r
   IN EFI_DHCP4_PROTOCOL                *This,\r
   IN EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN  *Token\r
-  )\r
-;\r
+  );\r
 \r
 \r
 /**\r
@@ -413,15 +404,17 @@ EFI_STATUS
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_DHCP4_PARSE) (\r
+(EFIAPI *EFI_DHCP4_PARSE)(\r
   IN EFI_DHCP4_PROTOCOL        *This,\r
   IN EFI_DHCP4_PACKET          *Packet,\r
   IN OUT UINT32                *OptionCount,\r
   OUT EFI_DHCP4_PACKET_OPTION  *PacketOptionList[]  OPTIONAL\r
-  )\r
-;\r
-\r
+  );\r
 \r
+///\r
+/// This protocol is used to collect configuration information for the EFI IPv4 Protocol drivers\r
+/// and to provide DHCPv4 server and PXE boot server discovery services.\r
+///\r
 struct _EFI_DHCP4_PROTOCOL {\r
   EFI_DHCP4_GET_MODE_DATA      GetModeData;\r
   EFI_DHCP4_CONFIGURE          Configure;\r