]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Updated network related definitions.
authorvanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 17 Sep 2009 02:37:58 +0000 (02:37 +0000)
committervanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 17 Sep 2009 02:37:58 +0000 (02:37 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9279 6f19259b-4bc3-4df7-8a09-765794883524

MdePkg/Include/Protocol/Dhcp6.h
MdePkg/Include/Protocol/Ip6.h
MdePkg/Include/Protocol/Mtftp4.h
MdePkg/Include/Protocol/Mtftp6.h
MdePkg/Include/Protocol/Tcp4.h
MdePkg/Include/Protocol/Tcp6.h

index 371579b265b20b4c7d071c726d195646615f99cf..3f12f3894c51954bffb40f6a0faafe33492f1ef6 100644 (file)
@@ -144,21 +144,31 @@ typedef enum {
 #define EFI_DHCP6_IA_TYPE_TA   4\r
 \r
 #pragma pack(1)\r
+///\r
+/// EFI_DHCP6_PACKET_OPTION\r
+/// defines the format of the DHCPv6 option, See RFC 3315 for more information.\r
+/// This data structure is used to reference option data that is packed in the DHCPv6 packet. \r
+///\r
 typedef struct {\r
   ///\r
-  /// The DHCPv6 option code.\r
+  /// The DHCPv6 option code, stored in network order.\r
   ///\r
   UINT16                       OpCode;\r
   ///\r
-  /// Length of the DHCPv6 option data. From the first byte to the last byte of the Data field.\r
+  /// Length of the DHCPv6 option data, stored in network order.\r
+  /// From the first byte to the last byte of the Data field.\r
   ///\r
   UINT16                       OpLen;\r
   ///\r
-  /// The data for the DHCPv6 option.\r
+  /// The data for the DHCPv6 option, stored in network order.\r
   ///\r
   UINT8                        Data[1];\r
 } EFI_DHCP6_PACKET_OPTION;\r
 \r
+///\r
+/// EFI_DHCP6_HEADER\r
+/// defines the format of the DHCPv6 header. See RFC 3315 for more information. \r
+///\r
 typedef struct{\r
   ///\r
   /// The DHCPv6 transaction ID.\r
@@ -170,6 +180,10 @@ typedef struct{
   UINT32                       TransactionId:24;\r
 } EFI_DHCP6_HEADER;\r
 \r
+///\r
+/// EFI_DHCP6_PACKET \r
+/// defines the format of the DHCPv6 packet. See RFC 3315 for more information.\r
+///\r
 typedef struct {\r
   ///\r
   /// Size of the EFI_DHCP6_PACKET buffer.\r
index 3053a28a5b8136a6f2b6392b5c3a05a8d0b4d778..e26bc8c94b6063470ec69eb563fc56c25acf30a3 100644 (file)
 \r
 typedef struct _EFI_IP6_PROTOCOL EFI_IP6_PROTOCOL;\r
 \r
+///\r
+/// EFI_IP6_ADDRESS_PAIR \r
+///\r
+typedef struct{ \r
+  ///\r
+  /// The EFI IPv6 Protocol instance handle that is using this address/prefix pair.\r
+  ///\r
+  EFI_HANDLE          InstanceHandle;\r
+  ///\r
+  /// IPv6 address in network byte order.\r
+  ///\r
+  EFI_IPv6_ADDRESS    Ip6Address;\r
+  ///\r
+  /// The length of the prefix associated with the Ip6Address.\r
+  ///\r
+  UINT8               PrefixLength;\r
+} EFI_IP6_ADDRESS_PAIR; \r
+\r
+///\r
+/// EFI_IP6_VARIABLE_DATA\r
+///\r
+typedef struct {\r
+  ///\r
+  /// The handle of the driver that creates this entry.\r
+  ///\r
+  EFI_HANDLE              DriverHandle;\r
+  ///\r
+  /// The number of IPv6 address pairs that follow this data structure.\r
+  ///\r
+  UINT32                  AddressCount;\r
+  ///\r
+  /// List of IPv6 address pairs that are currently in use.\r
+  ///\r
+  EFI_IP6_ADDRESS_PAIR    AddressPairs[1];\r
+} EFI_IP6_VARIABLE_DATA;\r
+\r
 ///\r
 /// ICMPv6 type definitions for error messages\r
 ///\r
index a7b251e00153d6053043b557c5a05320f43f4852..04095acffb156dd9dacdea287bef73d701ec73bb 100644 (file)
@@ -322,20 +322,31 @@ 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
+  @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
+  @retval EFI_HOST_UNREACHABLE     An ICMP host unreachable error packet was received and the Packet is set to NULL.\r
+  @retval EFI_PROTOCOL_UNREACHABLE An ICMP protocol unreachable error packet was received and the Packet is set to NULL.\r
+  @retval EFI_PORT_UNREACHABLE     An ICMP port unreachable error packet was received and the Packet is set to NULL.\r
+  @retval EFI_ICMP_ERROR           Some other 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 Packet.\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
@@ -391,15 +402,19 @@ 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
+  @retval EFI_ABORTED              Current operation is aborted by user.\r
+  @retval EFI_NETWORK_UNREACHABLE  An ICMP network unreachable error packet was received.\r
+  @retval EFI_HOST_UNREACHABLE     An ICMP host unreachable error packet was received.\r
+  @retval EFI_PROTOCOL_UNREACHABLE An ICMP protocol unreachable error packet was received.\r
+  @retval EFI_PORT_UNREACHABLE     An ICMP port unreachable error packet was received.\r
+  @retval EFI_ICMP_ERROR           Some other  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
 \r
 **/\r
 typedef \r
index 6c432f700032ff5355565766d9d55aafe7731960..c22ab3a77c57e26c02dd52d06f444a1e611b2232 100644 (file)
@@ -503,11 +503,16 @@ EFI_STATUS
                                  - MtftpConfigData.StationIp is neither zero nor one \r
                                    of the configured IP addresses in the underlying IPv6 driver.\r
                                  - MtftpCofigData.ServerIp is not a valid IPv6 unicast address.\r
-                                 - The StationIP and LocalPort is already in use\r
-  @retval  EFI_ACCESS_DENIED     The configuration could not be changed at this time because there \r
-                                 is some MTFTP background operation in progress.\r
+  @retval  EFI_ACCESS_DENIED     - The configuration could not be changed at this time because there \r
+                                   is some MTFTP background operation in progress.\r
+                                 - MtftpCofigData.LocalPort is already in use.\r
   @retval  EFI_NO_MAPPING        The underlying IPv6 driver was responsible for choosing a source \r
-                                 address for this instance, but no source address was available for use\r
+                                 address for this instance, but no source address was available for use.\r
+  @retval  EFI_OUT_OF_RESOURCES  The EFI MTFTPv6 Protocol driver instance data could not be \r
+                                 allocated.\r
+  @retval  EFI_DEVICE_ERROR      An unexpected system or network error occurred. The EFI \r
+                                 MTFTPv6 Protocol driver instance is not configured.\r
+\r
 \r
 **/\r
 typedef \r
@@ -538,26 +543,30 @@ EFI_STATUS
   @param[out] Packet             The pointer to the received packet. This buffer must be freed by \r
                                  the caller.\r
 \r
-  @retval  EFI_SUCCESS           An MTFTPv6 OACK packet was received and is in the Buffer.\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
-                                 - OverrideData.ServerIp is not valid unicast IPv6 addresses.\r
-  @retval  EFI_UNSUPPORTED       One or more options in the OptionList are unsupported by \r
-                                 this implementation.\r
-  @retval  EFI_NOT_STARTED       The EFI MTFTPv6 Protocol driver has not been started.\r
-  @retval  EFI_NO_MAPPING        The underlying IPv6 driver was responsible for choosing a source \r
-                                 address for this instance, but no source address was available for use.\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 MTFTPv6 ERROR packet was received and is in the Packet.\r
-  @retval  EFI_ICMP_ERROR        An ICMP ERROR packet was received and the Packet is set to NULL.\r
-  @retval  EFI_PROTOCOL_ERROR    An unexpected MTFTPv6 packet was received and is in the Packet.\r
-  @retval  EFI_TIMEOUT           No responses were received from the MTFTPv6 server.\r
-  @retval  EFI_DEVICE_ERROR      An unexpected network error or system error occurred.\r
+  @retval  EFI_SUCCESS              An MTFTPv6 OACK packet was received and is in the Packet.\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
+                                    - OverrideData.ServerIp is not valid unicast IPv6 addresses.\r
+  @retval  EFI_UNSUPPORTED          One or more options in the OptionList are unsupported by \r
+                                    this implementation.\r
+  @retval  EFI_NOT_STARTED          The EFI MTFTPv6 Protocol driver has not been started.\r
+  @retval  EFI_NO_MAPPING           The underlying IPv6 driver was responsible for choosing a source \r
+                                    address for this instance, but no source address was available for use.\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 MTFTPv6 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
+  @retval  EFI_HOST_UNREACHABLE     An ICMP host unreachable error packet was received and the Packet is set to NULL.\r
+  @retval  EFI_PROTOCOL_UNREACHABLE An ICMP protocol unreachable error packet was received and the Packet is set to NULL.\r
+  @retval  EFI_PORT_UNREACHABLE     An ICMP port unreachable error packet was received and the Packet is set to NULL.\r
+  @retval  EFI_ICMP_ERROR           Some other ICMP ERROR packet was received and the Packet is set to NULL.\r
+  @retval  EFI_PROTOCOL_ERROR       An unexpected MTFTPv6 packet was received and is in the Packet.\r
+  @retval  EFI_TIMEOUT              No responses were received from the MTFTPv6 server.\r
+  @retval  EFI_DEVICE_ERROR         An unexpected network error or system error occurred.\r
 \r
 **/\r
 typedef \r
@@ -632,15 +641,19 @@ EFI_STATUS
   @param[in]  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 MTFTPv6 server.\r
-  @retval  EFI_TFTP_ERROR        An MTFTPv6 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
+  @retval  EFI_ABORTED              Current operation is aborted by user.\r
+  @retval  EFI_NETWORK_UNREACHABLE  An ICMP network unreachable error packet was received.\r
+  @retval  EFI_HOST_UNREACHABLE     An ICMP host unreachable error packet was received.\r
+  @retval  EFI_PROTOCOL_UNREACHABLE An ICMP protocol unreachable error packet was received.\r
+  @retval  EFI_PORT_UNREACHABLE     An ICMP port unreachable error packet was received.\r
+  @retval  EFI_ICMP_ERROR           An ICMP ERROR packet was received.\r
+  @retval  EFI_TIMEOUT              No responses were received from the MTFTPv6 server.\r
+  @retval  EFI_TFTP_ERROR           An MTFTPv6 ERROR packet was received.\r
+  @retval  EFI_DEVICE_ERROR         An unexpected network error or system error occurred.\r
 \r
 **/\r
 typedef \r
index b233fd9b7127b73ae72eba2bd7f9105cb28c4e03..71aec843b69948a2c66331e158ba24af972dd9cc 100644 (file)
@@ -118,6 +118,31 @@ typedef struct {
 } EFI_TCP4_COMPLETION_TOKEN;\r
 \r
 typedef struct {\r
+  ///\r
+  /// The Status in the CompletionToken will be set to one of \r
+  /// the following values if the active open succeeds or an unexpected \r
+  /// error happens:\r
+  /// EFI_SUCCESS:              The active open succeeds and the instance's \r
+  ///                           state is Tcp4StateEstablished.\r
+  /// EFI_CONNECTION_RESET:     The connect fails because the connection is reset\r
+  ///                           either by instance itself or the communication peer.\r
+  /// EFI_CONNECTION_REFUSED:   The connect fails because this connection is initiated with\r
+  ///                           an active open and the connection is refused.\r
+  /// EFI_ABORTED:              The active open is aborted.\r
+  /// EFI_TIMEOUT:              The connection establishment timer expires and \r
+  ///                           no more specific information is available.\r
+  /// EFI_NETWORK_UNREACHABLE:  The active open fails because \r
+  ///                           an ICMP network unreachable error is received. \r
+  /// EFI_HOST_UNREACHABLE:     The active open fails because an \r
+  ///                           ICMP host unreachable error is received. \r
+  /// EFI_PROTOCOL_UNREACHABLE: The active open fails \r
+  ///                           because an ICMP protocol unreachable error is received.\r
+  /// EFI_PORT_UNREACHABLE:     The connection establishment \r
+  ///                           timer times out and an ICMP port unreachable error is received.\r
+  /// EFI_ICMP_ERROR:           The connection establishment timer timeout and some other ICMP\r
+  ///                           error is received.\r
+  /// EFI_DEVICE_ERROR:         An unexpected system or network error occurred.\r
+  /// \r
   EFI_TCP4_COMPLETION_TOKEN CompletionToken;\r
 } EFI_TCP4_CONNECTION_TOKEN;\r
 \r
@@ -147,9 +172,42 @@ typedef struct {
 } EFI_TCP4_TRANSMIT_DATA;\r
 \r
 typedef struct {\r
+  /// \r
+  /// When transmission finishes or meets any unexpected error it will \r
+  /// be set to one of the following values:\r
+  /// EFI_SUCCESS:              The receiving or transmission operation \r
+  ///                           completes successfully.\r
+  /// EFI_CONNECTION_FIN:       The receiving operation fails because the communication peer \r
+  ///                           has closed the connection and there is no more data in the \r
+  ///                           receive buffer of the instance.\r
+  /// EFI_CONNECTION_RESET:     The receiving or transmission operation fails\r
+  ///                           because this connection is reset either by instance \r
+  ///                           itself or the communication peer.\r
+  /// EFI_ABORTED:              The receiving or transmission is aborted.\r
+  /// EFI_TIMEOUT:              The transmission timer expires and no more \r
+  ///                           specific information is available.\r
+  /// EFI_NETWORK_UNREACHABLE:  The transmission fails \r
+  ///                           because an ICMP network unreachable error is received. \r
+  /// EFI_HOST_UNREACHABLE:     The transmission fails because an \r
+  ///                           ICMP host unreachable error is received. \r
+  /// EFI_PROTOCOL_UNREACHABLE: The transmission fails \r
+  ///                           because an ICMP protocol unreachable error is received. \r
+  /// EFI_PORT_UNREACHABLE:     The transmission fails and an \r
+  ///                           ICMP port unreachable error is received. \r
+  /// EFI_ICMP_ERROR:           The transmission fails and some other \r
+  ///                           ICMP error is received. \r
+  /// EFI_DEVICE_ERROR:         An unexpected system or network error occurs.\r
+  /// EFI_NO_MEDIA:             There was a media error.\r
+  ///\r
   EFI_TCP4_COMPLETION_TOKEN CompletionToken;\r
   union {\r
+    ///\r
+    /// When this token is used for receiving, RxData is a pointer to EFI_TCP4_RECEIVE_DATA.\r
+    ///\r
     EFI_TCP4_RECEIVE_DATA   *RxData;\r
+    ///\r
+    /// When this token is used for transmitting, TxData is a pointer to EFI_TCP4_TRANSMIT_DATA.\r
+    ///\r
     EFI_TCP4_TRANSMIT_DATA  *TxData;\r
   } Packet;\r
 } EFI_TCP4_IO_TOKEN;\r
@@ -454,6 +512,7 @@ EFI_STATUS
   @retval  EFI_NOT_FOUND           The asynchronous I/O request isn't found in the \r
                                    transmission or receive queue. It has either \r
                                    completed or wasn't issued by Transmit() and Receive().\r
+  @retval  EFI_UNSUPPORTED         The implementation does not support this function.\r
 \r
 **/\r
 typedef\r
index 3af54b91f436a6c0bec266d87faffaa63a584997..7b851796cf86a0de5e0d718dc797bc10bbbb909d 100644 (file)
@@ -289,6 +289,8 @@ typedef struct {
   ///                           state is Tcp6StateEstablished.\r
   /// EFI_CONNECTION_RESET:     The connect fails because the connection is reset\r
   ///                           either by instance itself or the communication peer.\r
+  /// EFI_CONNECTION_REFUSED:   The receiving or transmission operation fails because this \r
+  ///                           connection is refused.\r
   /// EFI_ABORTED:              The active open is aborted.\r
   /// EFI_TIMEOUT:              The connection establishment timer expires and \r
   ///                           no more specific information is available.\r
@@ -409,6 +411,9 @@ typedef struct {
   /// be set to one of the following values:\r
   /// EFI_SUCCESS:              The receiving or transmission operation \r
   ///                           completes successfully.\r
+  /// EFI_CONNECTION_FIN:       The receiving operation fails because the communication peer \r
+  ///                           has closed the connection and there is no more data in the \r
+  ///                           receive buffer of the instance.\r
   /// EFI_CONNECTION_RESET:     The receiving or transmission operation fails\r
   ///                           because this connection is reset either by instance \r
   ///                           itself or the communication peer.\r
@@ -796,6 +801,7 @@ EFI_STATUS
   @retval EFI_NOT_FOUND          The asynchronous I/O request isn't found in the transmission or \r
                                  receive queue. It has either completed or wasn't issued by \r
                                  Transmit() and Receive().\r
+  @retval EFI_UNSUPPORTED        The implementation does not support this function.\r
 \r
 **/\r
 typedef\r