]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Protocol/Mtftp4.h
Add some comments.
[mirror_edk2.git] / MdePkg / Include / Protocol / Mtftp4.h
index 988cbe16278b6f147d9db3ecb6aeef1cbade3f61..095b81b285fad393bb0552192d0ca98782dac96a 100644 (file)
@@ -1,14 +1,17 @@
 /** @file\r
   EFI Multicast Trivial File Tranfer Protocol Definition\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
   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
+  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
@@ -319,20 +322,38 @@ EFI_STATUS
   @param  Packet       The pointer to the received packet. This buffer must be freed by\r
                        the caller.\r
 \r
-  @retval EFI_SUCCESS           An MTFTPv4 OACK packet was received and is in the Buffer.\r
-  @retval EFI_INVALID_PARAMETER One or more parameters are invalid.\r
-  @retval EFI_UNSUPPORTED       One or more options in the OptionList are in the\r
-                                unsupported list of structure EFI_MTFTP4_MODE_DATA.\r
-  @retval EFI_NOT_STARTED       The EFI MTFTPv4 Protocol driver has not been started.\r
-  @retval EFI_NO_MAPPING        When using a default address, configuration (DHCP, BOOTP,\r
-                                RARP, etc.) has not finished yet.\r
-  @retval EFI_ACCESS_DENIED     The previous operation has not completed yet.\r
-  @retval EFI_OUT_OF_RESOURCES  Required system resources could not be allocated.\r
-  @retval EFI_TFTP_ERROR        An MTFTPv4 ERROR packet was received and is in the buffer.\r
-  @retval EFI_ICMP_ERROR        An ICMP ERROR packet was received and is in the Buffer.\r
-  @retval EFI_PROTOCOL_ERROR    An unexpected MTFTPv4 packet was received and is in the buffer.\r
-  @retval EFI_TIMEOUT           No responses were received from the MTFTPv4 server.\r
-  @retval EFI_DEVICE_ERROR      An unexpected network error or system error occurred.\r
+  @retval EFI_SUCCESS              An MTFTPv4 OACK packet was received and is in the Packet.\r
+                                   Note: It does not match UEFI 2.3 Specification.\r
+  @retval EFI_INVALID_PARAMETER    One or more of the following conditions is TRUE:\r
+                                   - This is NULL.\r
+                                   - Filename is NULL.\r
+                                   - OptionCount is not zero and OptionList is NULL.\r
+                                   - One or more options in OptionList have wrong format.\r
+                                   - PacketLength is NULL.\r
+                                   - One or more IPv4 addresses in OverrideData are not valid\r
+                                     unicast IPv4 addresses if OverrideData is not NULL.\r
+  @retval EFI_UNSUPPORTED          One or more options in the OptionList are in the\r
+                                   unsupported list of structure EFI_MTFTP4_MODE_DATA.\r
+  @retval EFI_NOT_STARTED          The EFI MTFTPv4 Protocol driver has not been started.\r
+  @retval EFI_NO_MAPPING           When using a default address, configuration (DHCP, BOOTP,\r
+                                   RARP, etc.) has not finished yet.\r
+  @retval EFI_ACCESS_DENIED        The previous operation has not completed yet.\r
+  @retval EFI_OUT_OF_RESOURCES     Required system resources could not be allocated.\r
+  @retval EFI_TFTP_ERROR           An MTFTPv4 ERROR packet was received and is in the Packet.\r
+  @retval EFI_NETWORK_UNREACHABLE  An ICMP network unreachable error packet was received and the Packet is set to NULL.\r
+                                   Note: It is not defined in UEFI 2.3 Specification.\r
+  @retval EFI_HOST_UNREACHABLE     An ICMP host unreachable error packet was received and the Packet is set to NULL.\r
+                                   Note: It is not defined in UEFI 2.3 Specification.\r
+  @retval EFI_PROTOCOL_UNREACHABLE An ICMP protocol unreachable error packet was received and the Packet is set to NULL.\r
+                                   Note: It is not defined in UEFI 2.3 Specification.\r
+  @retval EFI_PORT_UNREACHABLE     An ICMP port unreachable error packet was received and the Packet is set to NULL.\r
+                                   Note: It is not defined in UEFI 2.3 Specification.\r
+  @retval EFI_ICMP_ERROR           Some other ICMP ERROR packet was received and is in the Buffer.\r
+                                   Note: It does not match UEFI 2.3 Specification.\r
+  @retval EFI_PROTOCOL_ERROR       An unexpected MTFTPv4 packet was received and is in the Packet.\r
+                                   Note: It does not match UEFI 2.3 Specification.\r
+  @retval EFI_TIMEOUT              No responses were received from the MTFTPv4 server.\r
+  @retval EFI_DEVICE_ERROR         An unexpected network error or system error occurred.\r
 \r
 **/\r
 typedef \r
@@ -356,8 +377,8 @@ EFI_STATUS
   @param  Packet       Pointer to the OACK packet to be parsed.\r
   @param  OptionCount  Pointer to the number of options in following OptionList.\r
   @param  OptionList   Pointer to EFI_MTFTP4_OPTION storage. Call the EFI Boot\r
-                       Service FreePool() to release each option if they are not\r
-                       needed any more.\r
+                       Service FreePool() to release the OptionList if the options\r
+                       in this OptionList are not needed any more.\r
 \r
   @retval EFI_SUCCESS           The OACK packet was valid and the OptionCount and\r
                                 OptionList parameters have been updated.\r
@@ -388,15 +409,25 @@ EFI_STATUS
   @param  Token Pointer to the token structure to provide the parameters that are\r
                 used in this operation.\r
 \r
-  @retval EFI_SUCCESS          The data file has been transferred successfully.\r
-  @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.\r
-  @retval EFI_BUFFER_TOO_SMALL BufferSize is not large enough to hold the downloaded data\r
-                               in downloading process.\r
-  @retval EFI_ABORTED          Current operation is aborted by user.\r
-  @retval EFI_ICMP_ERROR       An ICMP ERROR packet was received.\r
-  @retval EFI_TIMEOUT          No responses were received from the MTFTPv4 server.\r
-  @retval EFI_TFTP_ERROR       An MTFTPv4 ERROR packet was received.\r
-  @retval EFI_DEVICE_ERROR     An unexpected network error or system error occurred.\r
+  @retval EFI_SUCCESS              The data file has been transferred successfully.\r
+  @retval EFI_OUT_OF_RESOURCES     Required system resources could not be allocated.\r
+  @retval EFI_BUFFER_TOO_SMALL     BufferSize is not zero but not large enough to hold the\r
+                                   downloaded data in downloading process.\r
+                                                                  Note: It does not match UEFI 2.3 Specification.\r
+  @retval EFI_ABORTED              Current operation is aborted by user.\r
+  @retval EFI_NETWORK_UNREACHABLE  An ICMP network unreachable error packet was received.\r
+                                   Note: It is not defined in UEFI 2.3 Specification.\r
+  @retval EFI_HOST_UNREACHABLE     An ICMP host unreachable error packet was received.\r
+                                   Note: It is not defined in UEFI 2.3 Specification.\r
+  @retval EFI_PROTOCOL_UNREACHABLE An ICMP protocol unreachable error packet was received.\r
+                                   Note: It is not defined in UEFI 2.3 Specification.\r
+  @retval EFI_PORT_UNREACHABLE     An ICMP port unreachable error packet was received.\r
+                                   Note: It is not defined in UEFI 2.3 Specification.\r
+  @retval EFI_ICMP_ERROR           Some other  ICMP ERROR packet was received.\r
+                                   Note: It does not match UEFI 2.3 Specification.\r
+  @retval EFI_TIMEOUT              No responses were received from the MTFTPv4 server.\r
+  @retval EFI_TFTP_ERROR           An MTFTPv4 ERROR packet was received.\r
+  @retval EFI_DEVICE_ERROR         An unexpected network error or system error occurred.\r
 \r
 **/\r
 typedef \r
@@ -540,13 +571,18 @@ struct _EFI_MTFTP4_TOKEN {
   ///\r
   /// Size of the data buffer.\r
   ///\r
-  OUT UINT64                  BufferSize;\r
+  UINT64                      BufferSize;\r
   ///\r
   /// Pointer to the data buffer. Data that is downloaded from the\r
   /// MTFTPv4 server is stored here. Data that is uploaded to the\r
   /// MTFTPv4 server is read from here. Ignored if BufferSize is zero.\r
   ///\r
-  OUT VOID                    *Buffer;\r
+  VOID                        *Buffer;\r
+  ///\r
+  /// Pointer to the context that will be used by CheckPacket, \r
+  /// TimeoutCallback and PacketNeeded.\r
+  ///\r
+  VOID                        *Context;\r
   ///\r
   /// Pointer to the callback function to check the contents of the received packet.\r
   ///\r