]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Protocol/Dhcp4.h
Clarify the UEFI/EFI specification version in file header comments.
[mirror_edk2.git] / MdePkg / Include / Protocol / Dhcp4.h
index 826d2e9b06b78978ec32cfcfa64839d3218a2de8..4000e9223333e8914af7ccca4787e3fbd66cf822 100644 (file)
@@ -4,7 +4,7 @@
   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 - 2008, Intel Corporation\r
+  Copyright (c) 2006 - 2009, 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
@@ -13,6 +13,9 @@
   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
+  @par Revision Reference:          \r
+  This Protocol is introduced in UEFI Specification 2.0\r
+\r
 **/\r
 \r
 #ifndef __EFI_DHCP4_PROTOCOL_H__\r
@@ -148,11 +151,11 @@ typedef enum {
 \r
 typedef enum{\r
   ///\r
-  /// A DHCPDISCOVER packet is about to be sent.\r
+  /// The packet to start the configuration sequence is about to be sent.\r
   ///\r
   Dhcp4SendDiscover   = 0x01,\r
   ///\r
-  /// A DHCPOFFER packet was just received.\r
+  /// A reply packet was just received.\r
   ///\r
   Dhcp4RcvdOffer      = 0x02,\r
   ///\r
@@ -225,8 +228,11 @@ typedef enum{
   @param  NewPacket             The packet that is used to replace the above Packet.\r
 \r
   @retval EFI_SUCCESS           Tells the EFI DHCPv4 Protocol driver to continue the DHCP process.\r
+                                When it is in the Dhcp4Selecting state, it tells the EFI DHCPv4 Protocol\r
+                                driver to stop collecting additional packets. The driver will exit\r
+                                the Dhcp4Selecting state and enter the Dhcp4Requesting state.\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
+                                driver will continue to wait for more packets until the retry\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
@@ -245,32 +251,35 @@ EFI_STATUS
 \r
 typedef struct {\r
   ///\r
-  /// Number of times to try sending DHCPDISCOVER packets and \r
-  /// waiting for DHCPOFFER packets before accepting failure.\r
+  /// Number of times to try sending a packet during the Dhcp4SendDiscover\r
+  /// event and waiting for a response during the Dhcp4RcvdOffer event.\r
   /// Set to zero to use the default try counts and timeout values.\r
   ///\r
   UINT32                      DiscoverTryCount;\r
   ///\r
-  /// Maximum amount of time (in seconds) to wait for DHCPOFFER packets in each \r
+  /// Maximum amount of time (in seconds) to wait for returned packets in each \r
   /// of the retries. Timeout values of zero will default to a timeout value \r
   /// of one second. Set to NULL to use default timeout values.\r
   ///\r
   UINT32                      *DiscoverTimeout;\r
   ///\r
-  /// Number of times to try sending DHCPREQUEST packets and waiting for DHCPACK \r
-  /// packets before accepting failure. Set to zero to use the default try counts and timeout values.\r
+  /// Number of times to try sending a packet during the Dhcp4SendRequest event\r
+  /// and waiting for a response during the Dhcp4RcvdAck event before accepting\r
+  /// failure. Set to zero to use the default try counts and timeout values.\r
   ///\r
   UINT32                      RequestTryCount;\r
   ///\r
-  /// Maximum amount of time (in seconds) to wait for DHCPACK packets in each of the retries. \r
+  /// Maximum amount of time (in seconds) to wait for return packets in each of the retries. \r
   /// Timeout values of zero will default to a timeout value of one second. \r
   /// Set to NULL to use default timeout values.\r
   ///\r
   UINT32                      *RequestTimeout;\r
   ///\r
-  /// Setting this parameter to the previously allocated IP address will cause \r
-  /// the EFI DHCPv4 Protocol driver to enter the Dhcp4InitReboot state. \r
-  /// Set this field to 0.0.0.0 to enter the Dhcp4Init state.\r
+  /// For a DHCPDISCOVER, setting this parameter to the previously allocated IP\r
+  /// address will cause the EFI DHCPv4 Protocol driver to enter the Dhcp4InitReboot state. \r
+  /// And set this field to 0.0.0.0 to enter the Dhcp4Init state.\r
+  /// For a DHCPINFORM this parameter should be set to the client network address\r
+  /// which was assigned to the client during a DHCPDISCOVER.\r
   ///\r
   EFI_IPv4_ADDRESS            ClientAddress;\r
   ///\r
@@ -287,8 +296,11 @@ typedef struct {
   ///\r
   UINT32                      OptionCount;\r
   ///\r
-  /// List of DHCP options to be included in every DHCPDISCOVER packet and \r
-  /// subsequent DHCPREQUEST packet that is generated from DHCPOFFER packets.\r
+  /// List of DHCP options to be included in every packet that is sent during the\r
+  /// Dhcp4SendDiscover event. Pad options are appended automatically by DHCP driver\r
+  /// in outgoing DHCP packets. If OptionList itself contains pad option, they are\r
+  /// ignored by the driver. OptionList can be freed after EFI_DHCP4_PROTOCOL.Configure()\r
+  /// returns. Ignored if OptionCount is zero.\r
   ///\r
   EFI_DHCP4_PACKET_OPTION     **OptionList;\r
 } EFI_DHCP4_CONFIG_DATA;\r
@@ -457,8 +469,9 @@ EFI_STATUS
 \r
   @retval EFI_SUCCESS           The EFI DHCPv4 Protocol driver is now in the Dhcp4Init or\r
                                 Dhcp4InitReboot state, if the original state of this driver\r
-                                was Dhcp4Stopped and the value of Dhcp4CfgData was\r
-                                not NULL. Otherwise, the state was left unchanged.\r
+                                was Dhcp4Stopped, Dhcp4Init,Dhcp4InitReboot, or Dhcp4Bound\r
+                                and the value of Dhcp4CfgData was not NULL.\r
+                                Otherwise, the state was left unchanged.\r
   @retval EFI_ACCESS_DENIED     This instance of the EFI DHCPv4 Protocol driver was not in the\r
                                 Dhcp4Stopped, Dhcp4Init, Dhcp4InitReboot, or Dhcp4Bound state;\r
                                 Or onother instance of this EFI DHCPv4 Protocol driver is already\r
@@ -710,7 +723,7 @@ EFI_STATUS
   If *OptionCount isn't zero, and there is enough space for all the DHCP options\r
   in the Packet, each element of PacketOptionList is set to point to somewhere in\r
   the Packet->Dhcp4.Option where a new DHCP option begins. If RFC3396 is supported,\r
-  the caller should reassemble the parsed DHCP options to get the finial result.\r
+  the caller should reassemble the parsed DHCP options to get the final result.\r
   If *OptionCount is zero or there isn't enough space for all of them, the number\r
   of DHCP options in the Packet is returned in OptionCount.\r
 \r