]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Protocol/Tcp6.h
MdePkg/ProcessorBind: add defines for page allocation granularity
[mirror_edk2.git] / MdePkg / Include / Protocol / Tcp6.h
index 2cc80fd1fcfb08ccf21c62f5c590be16eeb81961..4b9b366242b0be64389ba043b3935ffcf634e5fc 100644 (file)
@@ -4,8 +4,8 @@
   and destroy child of the driver to communicate with other host using TCP protocol.\r
   The EFI TCPv6 Protocol provides services to send and receive data stream.\r
 \r
-  Copyright (c) 2008 - 2009, Intel Corporation\r
-  All rights reserved. This program and the accompanying materials\r
+  Copyright (c) 2008 - 2014, Intel Corporation. All rights reserved.<BR>\r
+  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
   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.2\r
+\r
 **/\r
 \r
 #ifndef __EFI_TCP6_PROTOCOL_H__\r
 #define __EFI_TCP6_PROTOCOL_H__\r
 \r
-#include <Protocol/Snp.h>\r
 #include <Protocol/ManagedNetwork.h>\r
 #include <Protocol/Ip6.h>\r
 \r
 typedef struct _EFI_TCP6_PROTOCOL EFI_TCP6_PROTOCOL;\r
 \r
 ///\r
-/// EFI_TCP6_SERVICE_POINT\r
+/// EFI_TCP6_SERVICE_POINT is deprecated in the UEFI 2.4B and should not be used any more.\r
+/// The definition in here is only present to provide backwards compatability.\r
 ///\r
 typedef struct {\r
   ///\r
-  /// The EFI TCPv6 Protocol instance handle that is using this \r
+  /// The EFI TCPv6 Protocol instance handle that is using this\r
   /// address/port pair.\r
   ///\r
   EFI_HANDLE        InstanceHandle;\r
-  /// \r
-  /// The local IPv6 address to which this TCP instance is bound. Set \r
-  /// to 0::/128, if this TCP instance is configured to listen on all \r
+  ///\r
+  /// The local IPv6 address to which this TCP instance is bound. Set\r
+  /// to 0::/128, if this TCP instance is configured to listen on all\r
   /// available source addresses.\r
-  /// \r
+  ///\r
   EFI_IPv6_ADDRESS  LocalAddress;\r
-  /// \r
+  ///\r
   /// The local port number in host byte order.\r
-  /// \r
+  ///\r
   UINT16            LocalPort;\r
-  /// \r
-  /// The remote IPv6 address. It may be 0::/128 if this TCP instance is \r
-  /// not connected to any remote host. \r
-  /// \r
+  ///\r
+  /// The remote IPv6 address. It may be 0::/128 if this TCP instance is\r
+  /// not connected to any remote host.\r
+  ///\r
   EFI_IPv6_ADDRESS  RemoteAddress;\r
-  /// \r
-  /// The remote port number in host byte order. It may be zero if this \r
+  ///\r
+  /// The remote port number in host byte order. It may be zero if this\r
   /// TCP instance is not connected to any remote host.\r
-  /// \r
+  ///\r
   UINT16            RemotePort;\r
 } EFI_TCP6_SERVICE_POINT;\r
 \r
-/// \r
-/// EFI_TCP6_VARIABLE_DATA\r
+///\r
+/// EFI_TCP6_VARIABLE_DATA is deprecated in the UEFI 2.4B and should not be used any more.\r
+/// The definition in here is only present to provide backwards compatability.\r
 ///\r
 typedef struct {\r
   EFI_HANDLE             DriverHandle; ///< The handle of the driver that creates this entry.\r
@@ -79,46 +83,46 @@ typedef struct {
 /// EFI_TCP6_ACCESS_POINT\r
 ///\r
 typedef struct {\r
-  /// \r
-  /// The local IP address assigned to this TCP instance. The EFI \r
-  /// TCPv6 driver will only deliver incoming packets whose \r
-  /// destination addresses exactly match the IP address. Set to zero to \r
-  /// let the underlying IPv6 driver choose a source address. If not zero \r
-  /// it must be one of the configured IP addresses in the underlying \r
+  ///\r
+  /// The local IP address assigned to this TCP instance. The EFI\r
+  /// TCPv6 driver will only deliver incoming packets whose\r
+  /// destination addresses exactly match the IP address. Set to zero to\r
+  /// let the underlying IPv6 driver choose a source address. If not zero\r
+  /// it must be one of the configured IP addresses in the underlying\r
   /// IPv6 driver.\r
-  /// \r
+  ///\r
   EFI_IPv6_ADDRESS  StationAddress;\r
-  /// \r
-  /// The local port number to which this EFI TCPv6 Protocol instance \r
-  /// is bound. If the instance doesn't care the local port number, set \r
+  ///\r
+  /// The local port number to which this EFI TCPv6 Protocol instance\r
+  /// is bound. If the instance doesn't care the local port number, set\r
   /// StationPort to zero to use an ephemeral port.\r
-  /// \r
+  ///\r
   UINT16            StationPort;\r
-  /// \r
-  /// The remote IP address to which this EFI TCPv6 Protocol instance \r
-  /// is connected. If ActiveFlag is FALSE (i.e. a passive TCPv6 \r
-  /// instance), the instance only accepts connections from the \r
-  /// RemoteAddress. If ActiveFlag is TRUE the instance will \r
-  /// connect to the RemoteAddress, i.e., outgoing segments will be \r
-  /// sent to this address and only segments from this address will be \r
-  /// delivered to the application. When ActiveFlag is FALSE, it \r
-  /// can be set to zero and means that incoming connection requests \r
+  ///\r
+  /// The remote IP address to which this EFI TCPv6 Protocol instance\r
+  /// is connected. If ActiveFlag is FALSE (i.e. a passive TCPv6\r
+  /// instance), the instance only accepts connections from the\r
+  /// RemoteAddress. If ActiveFlag is TRUE the instance will\r
+  /// connect to the RemoteAddress, i.e., outgoing segments will be\r
+  /// sent to this address and only segments from this address will be\r
+  /// delivered to the application. When ActiveFlag is FALSE, it\r
+  /// can be set to zero and means that incoming connection requests\r
   /// from any address will be accepted.\r
-  /// \r
+  ///\r
   EFI_IPv6_ADDRESS  RemoteAddress;\r
-  /// \r
-  /// The remote port to which this EFI TCPv6 Protocol instance \r
-  /// connects or from which connection request will be accepted by \r
-  /// this EFI TCPv6 Protocol instance. If ActiveFlag is FALSE it \r
-  /// can be zero and means that incoming connection request from \r
-  /// any port will be accepted. Its value can not be zero when \r
+  ///\r
+  /// The remote port to which this EFI TCPv6 Protocol instance\r
+  /// connects or from which connection request will be accepted by\r
+  /// this EFI TCPv6 Protocol instance. If ActiveFlag is FALSE it\r
+  /// can be zero and means that incoming connection request from\r
+  /// any port will be accepted. Its value can not be zero when\r
   /// ActiveFlag is TRUE.\r
-  /// \r
+  ///\r
   UINT16            RemotePort;\r
-  /// \r
-  /// Set it to TRUE to initiate an active open. Set it to FALSE to \r
+  ///\r
+  /// Set it to TRUE to initiate an active open. Set it to FALSE to\r
   /// initiate a passive open to act as a server.\r
-  /// \r
+  ///\r
   BOOLEAN           ActiveFlag;\r
 } EFI_TCP6_ACCESS_POINT;\r
 \r
@@ -126,94 +130,94 @@ typedef struct {
 /// EFI_TCP6_OPTION\r
 ///\r
 typedef struct {\r
-  /// \r
+  ///\r
   /// The size of the TCP receive buffer.\r
-  /// \r
+  ///\r
   UINT32   ReceiveBufferSize;\r
-  /// \r
+  ///\r
   /// The size of the TCP send buffer.\r
-  /// \r
+  ///\r
   UINT32   SendBufferSize;\r
-  /// \r
-  /// The length of incoming connect request queue for a passive \r
+  ///\r
+  /// The length of incoming connect request queue for a passive\r
   /// instance. When set to zero, the value is implementation specific.\r
-  /// \r
+  ///\r
   UINT32   MaxSynBackLog;\r
-  /// \r
-  /// The maximum seconds a TCP instance will wait for before a TCP \r
-  /// connection established. When set to zero, the value is \r
+  ///\r
+  /// The maximum seconds a TCP instance will wait for before a TCP\r
+  /// connection established. When set to zero, the value is\r
   /// implementation specific.\r
-  /// \r
+  ///\r
   UINT32   ConnectionTimeout;\r
   ///\r
-  ///The number of times TCP will attempt to retransmit a packet on \r
-  ///an established connection. When set to zero, the value is \r
+  ///The number of times TCP will attempt to retransmit a packet on\r
+  ///an established connection. When set to zero, the value is\r
   ///implementation specific.\r
   ///\r
   UINT32   DataRetries;\r
-  /// \r
-  /// How many seconds to wait in the FIN_WAIT_2 states for a final \r
-  /// FIN flag before the TCP instance is closed. This timeout is in \r
-  /// effective only if the application has called Close() to \r
-  /// disconnect the connection completely. It is also called \r
-  /// FIN_WAIT_2 timer in other implementations. When set to zero, \r
-  /// it should be disabled because the FIN_WAIT_2 timer itself is \r
+  ///\r
+  /// How many seconds to wait in the FIN_WAIT_2 states for a final\r
+  /// FIN flag before the TCP instance is closed. This timeout is in\r
+  /// effective only if the application has called Close() to\r
+  /// disconnect the connection completely. It is also called\r
+  /// FIN_WAIT_2 timer in other implementations. When set to zero,\r
+  /// it should be disabled because the FIN_WAIT_2 timer itself is\r
   /// against the standard. The default value is 60.\r
-  /// \r
+  ///\r
   UINT32   FinTimeout;\r
-  ///  \r
-  /// How many seconds to wait in TIME_WAIT state before the TCP \r
-  /// instance is closed. The timer is disabled completely to provide a \r
-  /// method to close the TCP connection quickly if it is set to zero. It \r
+  ///\r
+  /// How many seconds to wait in TIME_WAIT state before the TCP\r
+  /// instance is closed. The timer is disabled completely to provide a\r
+  /// method to close the TCP connection quickly if it is set to zero. It\r
   /// is against the related RFC documents.\r
-  /// \r
+  ///\r
   UINT32   TimeWaitTimeout;\r
-  /// \r
-  /// The maximum number of TCP keep-alive probes to send before \r
-  /// giving up and resetting the connection if no response from the \r
+  ///\r
+  /// The maximum number of TCP keep-alive probes to send before\r
+  /// giving up and resetting the connection if no response from the\r
   /// other end. Set to zero to disable keep-alive probe.\r
-  /// \r
+  ///\r
   UINT32   KeepAliveProbes;\r
-  /// \r
-  /// The number of seconds a connection needs to be idle before TCP \r
-  /// sends out periodical keep-alive probes. When set to zero, the \r
+  ///\r
+  /// The number of seconds a connection needs to be idle before TCP\r
+  /// sends out periodical keep-alive probes. When set to zero, the\r
   /// value is implementation specific. It should be ignored if keep-\r
   /// alive probe is disabled.\r
-  /// \r
+  ///\r
   UINT32   KeepAliveTime;\r
-  /// \r
-  /// The number of seconds between TCP keep-alive probes after the \r
-  /// periodical keep-alive probe if no response. When set to zero, the \r
+  ///\r
+  /// The number of seconds between TCP keep-alive probes after the\r
+  /// periodical keep-alive probe if no response. When set to zero, the\r
   /// value is implementation specific. It should be ignored if keep-\r
   /// alive probe is disabled.\r
-  /// \r
+  ///\r
   UINT32   KeepAliveInterval;\r
-  /// \r
-  /// Set it to TRUE to enable the Nagle algorithm as defined in \r
+  ///\r
+  /// Set it to TRUE to enable the Nagle algorithm as defined in\r
   /// RFC896. Set it to FALSE to disable it.\r
-  /// \r
+  ///\r
   BOOLEAN  EnableNagle;\r
-  /// \r
-  /// Set it to TRUE to enable TCP timestamps option as defined in \r
+  ///\r
+  /// Set it to TRUE to enable TCP timestamps option as defined in\r
   /// RFC1323. Set to FALSE to disable it.\r
-  /// \r
+  ///\r
   BOOLEAN  EnableTimeStamp;\r
-  /// \r
-  /// Set it to TRUE to enable TCP window scale option as defined in \r
-  /// RFC1323. Set it to FALSE to disable it. \r
-  /// \r
+  ///\r
+  /// Set it to TRUE to enable TCP window scale option as defined in\r
+  /// RFC1323. Set it to FALSE to disable it.\r
+  ///\r
   BOOLEAN  EnableWindowScaling;\r
-  /// \r
-  /// Set it to TRUE to enable selective acknowledge mechanism \r
-  /// described in RFC 2018. Set it to FALSE to disable it. \r
-  /// Implementation that supports SACK can optionally support \r
+  ///\r
+  /// Set it to TRUE to enable selective acknowledge mechanism\r
+  /// described in RFC 2018. Set it to FALSE to disable it.\r
+  /// Implementation that supports SACK can optionally support\r
   /// DSAK as defined in RFC 2883.\r
-  /// \r
+  ///\r
   BOOLEAN  EnableSelectiveAck;\r
-  /// \r
-  /// Set it to TRUE to enable path MTU discovery as defined in \r
+  ///\r
+  /// Set it to TRUE to enable path MTU discovery as defined in\r
   /// RFC 1191. Set to FALSE to disable it.\r
-  /// \r
+  ///\r
   BOOLEAN  EnablePathMtuDiscovery;\r
 } EFI_TCP6_OPTION;\r
 \r
@@ -230,11 +234,11 @@ typedef struct {
   ///\r
   UINT8                 HopLimit;\r
   ///\r
-  /// Used to specify TCP communication end settings for a TCP instance. \r
+  /// Used to specify TCP communication end settings for a TCP instance.\r
   ///\r
   EFI_TCP6_ACCESS_POINT AccessPoint;\r
   ///\r
-  /// Used to configure the advance TCP option for a connection. If set \r
+  /// Used to configure the advance TCP option for a connection. If set\r
   /// to NULL, implementation specific options for TCP connection will be used.\r
   ///\r
   EFI_TCP6_OPTION       *ControlOption;\r
@@ -259,16 +263,16 @@ typedef enum {
 \r
 ///\r
 /// EFI_TCP6_COMPLETION_TOKEN\r
-/// is used as a common header for various asynchronous tokens. \r
+/// is used as a common header for various asynchronous tokens.\r
 ///\r
 typedef struct {\r
   ///\r
-  /// The Event to signal after request is finished and Status field is \r
-  /// updated by the EFI TCPv6 Protocol driver. \r
-  /// \r
+  /// The Event to signal after request is finished and Status field is\r
+  /// updated by the EFI TCPv6 Protocol driver.\r
+  ///\r
   EFI_EVENT   Event;\r
   ///\r
-  /// The result of the completed operation. \r
+  /// The result of the completed operation.\r
   ///\r
   EFI_STATUS  Status;\r
 } EFI_TCP6_COMPLETION_TOKEN;\r
@@ -280,29 +284,32 @@ typedef struct {
 ///\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
+  /// 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
+  /// EFI_SUCCESS:              The active open succeeds and the instance's\r
   ///                           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
+  /// 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
+  /// 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
+  /// 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 times \r
+  /// EFI_ICMP_ERROR:           The connection establishment timer times\r
   ///                           out and some other ICMP error is received.\r
   /// EFI_DEVICE_ERROR:         An unexpected system or network error occurred.\r
   /// EFI_SECURITY_VIOLATION:   The active open was failed because of IPSec policy check.\r
-  /// \r
+  /// EFI_NO_MEDIA:             There was a media error.\r
+  ///\r
   EFI_TCP6_COMPLETION_TOKEN CompletionToken;\r
 } EFI_TCP6_CONNECTION_TOKEN;\r
 \r
@@ -312,10 +319,10 @@ typedef struct {
 ///\r
 typedef struct {\r
   ///\r
-  /// The Status in CompletionToken will be set to the \r
+  /// The Status in CompletionToken will be set to the\r
   /// following value if accept finishes:\r
-  /// EFI_SUCCESS:            A remote peer has successfully established a \r
-  ///                         connection to this instance. A new TCP instance has also been \r
+  /// EFI_SUCCESS:            A remote peer has successfully established a\r
+  ///                         connection to this instance. A new TCP instance has also been\r
   ///                         created for the connection.\r
   /// EFI_CONNECTION_RESET:   The accept fails because the connection is reset either\r
   ///                         by instance itself or communication peer.\r
@@ -328,7 +335,7 @@ typedef struct {
 \r
 ///\r
 /// EFI_TCP6_FRAGMENT_DATA\r
-/// allows multiple receive or transmit buffers to be specified. The \r
+/// allows multiple receive or transmit buffers to be specified. The\r
 /// purpose of this structure is to provide scattered read and write.\r
 ///\r
 typedef struct {\r
@@ -338,58 +345,58 @@ typedef struct {
 \r
 ///\r
 /// EFI_TCP6_RECEIVE_DATA\r
-/// When TCPv6 driver wants to deliver received data to the application, \r
+/// When TCPv6 driver wants to deliver received data to the application,\r
 /// it will pick up the first queued receiving token, update its\r
 /// Token->Packet.RxData then signal the Token->CompletionToken.Event.\r
 ///\r
 typedef struct {\r
   ///\r
-  /// Whether the data is urgent. When this flag is set, the instance is in \r
-  /// urgent mode. \r
+  /// Whether the data is urgent. When this flag is set, the instance is in\r
+  /// urgent mode.\r
   ///\r
   BOOLEAN                 UrgentFlag;\r
-  /// \r
-  /// When calling Receive() function, it is the byte counts of all \r
-  /// Fragmentbuffer in FragmentTable allocated by user. \r
-  /// When the token is signaled by TCPv6 driver it is the length of \r
+  ///\r
+  /// When calling Receive() function, it is the byte counts of all\r
+  /// Fragmentbuffer in FragmentTable allocated by user.\r
+  /// When the token is signaled by TCPv6 driver it is the length of\r
   /// received data in the fragments.\r
-  /// \r
+  ///\r
   UINT32                  DataLength;\r
-  /// \r
+  ///\r
   /// Number of fragments.\r
-  /// \r
+  ///\r
   UINT32                  FragmentCount;\r
-  /// \r
+  ///\r
   /// An array of fragment descriptors.\r
-  /// \r
+  ///\r
   EFI_TCP6_FRAGMENT_DATA  FragmentTable[1];\r
 } EFI_TCP6_RECEIVE_DATA;\r
 \r
 ///\r
 /// EFI_TCP6_TRANSMIT_DATA\r
 /// The EFI TCPv6 Protocol user must fill this data structure before sending a packet.\r
-/// The packet may contain multiple buffers in non-continuous memory locations. \r
+/// The packet may contain multiple buffers in non-continuous memory locations.\r
 ///\r
 typedef struct {\r
-  /// \r
-  /// Push If TRUE, data must be transmitted promptly, and the PUSH bit in \r
-  /// the last TCP segment created will be set. If FALSE, data \r
-  /// transmission may be delayed to combine with data from \r
+  ///\r
+  /// Push If TRUE, data must be transmitted promptly, and the PUSH bit in\r
+  /// the last TCP segment created will be set. If FALSE, data\r
+  /// transmission may be delayed to combine with data from\r
   /// subsequent Transmit()s for efficiency.\r
-  /// \r
+  ///\r
   BOOLEAN                 Push;\r
-  /// \r
-  /// The data in the fragment table are urgent and urgent point is in \r
+  ///\r
+  /// The data in the fragment table are urgent and urgent point is in\r
   /// effect if TRUE. Otherwise those data are NOT considered urgent.\r
-  /// \r
+  ///\r
   BOOLEAN                 Urgent;\r
   ///\r
-  /// Length of the data in the fragments. \r
+  /// Length of the data in the fragments.\r
   ///\r
   UINT32                  DataLength;\r
   ///\r
   /// Number of fragments.\r
-  /// \r
+  ///\r
   UINT32                  FragmentCount;\r
   ///\r
   /// An array of fragment descriptors.\r
@@ -399,43 +406,47 @@ typedef struct {
 \r
 ///\r
 /// EFI_TCP6_IO_TOKEN\r
-/// returns When transmission finishes or meets any unexpected error. \r
+/// returns When transmission finishes or meets any unexpected error.\r
 ///\r
 typedef struct {\r
-  /// \r
-  /// When transmission finishes or meets any unexpected error it will \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
+  /// 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
+  ///                           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
+  /// 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_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_SECURITY_VIOLATION:   The receiving or transmission \r
+  /// EFI_SECURITY_VIOLATION:   The receiving or transmission\r
   ///                           operation was failed because of IPSec policy check\r
+  /// EFI_NO_MEDIA:             There was a media error.\r
   ///\r
   EFI_TCP6_COMPLETION_TOKEN CompletionToken;\r
   union {\r
     ///\r
-    /// When this token is used for receiving, RxData is a pointer to \r
+    /// When this token is used for receiving, RxData is a pointer to\r
     /// EFI_TCP6_RECEIVE_DATA.\r
     ///\r
     EFI_TCP6_RECEIVE_DATA   *RxData;\r
-    /// \r
-    /// When this token is used for transmitting, TxData is a pointer to \r
+    ///\r
+    /// When this token is used for transmitting, TxData is a pointer to\r
     /// EFI_TCP6_TRANSMIT_DATA.\r
     ///\r
     EFI_TCP6_TRANSMIT_DATA  *TxData;\r
@@ -448,36 +459,36 @@ typedef struct {
 ///\r
 typedef struct {\r
   ///\r
-  /// When close finishes or meets any unexpected error it will be set \r
+  /// When close finishes or meets any unexpected error it will be set\r
   /// to one of the following values:\r
   /// EFI_SUCCESS:            The close operation completes successfully.\r
   /// EFI_ABORTED:            User called configure with NULL without close stopping.\r
   /// EFI_SECURITY_VIOLATION: The close operation was failed because of IPSec policy check.\r
-  /// \r
+  ///\r
   EFI_TCP6_COMPLETION_TOKEN CompletionToken;\r
-  /// \r
-  /// Abort the TCP connection on close instead of the standard TCP \r
-  /// close process when it is set to TRUE. This option can be used to \r
+  ///\r
+  /// Abort the TCP connection on close instead of the standard TCP\r
+  /// close process when it is set to TRUE. This option can be used to\r
   /// satisfy a fast disconnect.\r
-  /// \r
+  ///\r
   BOOLEAN                   AbortOnClose;\r
 } EFI_TCP6_CLOSE_TOKEN;\r
 \r
 /**\r
   Get the current operational status.\r
-        \r
+\r
   The GetModeData() function copies the current operational settings of this EFI TCPv6\r
   Protocol instance into user-supplied buffers. This function can also be used to retrieve\r
   the operational setting of underlying drivers such as IPv6, MNP, or SNP.\r
 \r
   @param[in]  This              Pointer to the EFI_TCP6_PROTOCOL instance.\r
   @param[out] Tcp6State         The buffer in which the current TCP state is returned.\r
-  @param[out] Tcp6ConfigData    The buffer in which the current TCP configuration is returned. \r
-  @param[out] Ip6ModeData       The buffer in which the current IPv6 configuration data used by \r
-                                the TCP instance is returned. \r
-  @param[out] MnpConfigData     The buffer in which the current MNP configuration data used \r
+  @param[out] Tcp6ConfigData    The buffer in which the current TCP configuration is returned.\r
+  @param[out] Ip6ModeData       The buffer in which the current IPv6 configuration data used by\r
+                                the TCP instance is returned.\r
+  @param[out] MnpConfigData     The buffer in which the current MNP configuration data used\r
                                 indirectly by the TCP instance is returned.\r
-  @param[out] SnpModeData       The buffer in which the current SNP mode data used indirectly by \r
+  @param[out] SnpModeData       The buffer in which the current SNP mode data used indirectly by\r
                                 the TCP instance is returned.\r
 \r
   @retval EFI_SUCCESS           The mode data was read.\r
@@ -503,17 +514,17 @@ EFI_STATUS
   The Configure() function does the following:\r
   - Initialize this TCP instance, i.e., initialize the communication end settings and\r
     specify active open or passive open for an instance.\r
-  - Reset this TCP instance brutally, i.e., cancel all pending asynchronous tokens, flush \r
+  - Reset this TCP instance brutally, i.e., cancel all pending asynchronous tokens, flush\r
     transmission and receiving buffer directly without informing the communication peer.\r
 \r
   No other TCPv6 Protocol operation except Poll() can be executed by this instance until\r
   it is configured properly. For an active TCP instance, after a proper configuration it\r
-  may call Connect() to initiates the three-way handshake. For a passive TCP instance, \r
-  its state will transit to Tcp6StateListen after configuration, and Accept() may be \r
+  may call Connect() to initiates the three-way handshake. For a passive TCP instance,\r
+  its state will transit to Tcp6StateListen after configuration, and Accept() may be\r
   called to listen the incoming TCP connection requests. If Tcp6ConfigData is set to NULL,\r
   the instance is reset. Resetting process will be done brutally, the state machine will\r
   be set to Tcp6StateClosed directly, the receive queue and transmit queue will be flushed,\r
-  and no traffic is allowed through this instance. \r
+  and no traffic is allowed through this instance.\r
 \r
   @param[in] This               Pointer to the EFI_TCP6_PROTOCOL instance.\r
   @param[in] Tcp6ConfigData     Pointer to the configure data to configure the instance.\r
@@ -521,19 +532,19 @@ EFI_STATUS
 \r
   @retval EFI_SUCCESS           The operational settings are set, changed, or reset\r
                                 successfully.\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 \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\r
                                 use.\r
   @retval EFI_INVALID_PARAMETER One or more of the following conditions are TRUE:\r
                                 - This is NULL.\r
-                                - Tcp6ConfigData->AccessPoint.StationAddress is neither zero nor \r
+                                - Tcp6ConfigData->AccessPoint.StationAddress is neither zero nor\r
                                   one of the configured IP addresses in the underlying IPv6 driver.\r
-                                - Tcp6ConfigData->AccessPoint.RemoteAddress isn't a valid unicast \r
+                                - Tcp6ConfigData->AccessPoint.RemoteAddress isn't a valid unicast\r
                                   IPv6 address.\r
-                                - Tcp6ConfigData->AccessPoint.RemoteAddress is zero or \r
-                                  Tcp6ConfigData->AccessPoint.RemotePort is zero when \r
+                                - Tcp6ConfigData->AccessPoint.RemoteAddress is zero or\r
+                                  Tcp6ConfigData->AccessPoint.RemotePort is zero when\r
                                   Tcp6ConfigData->AccessPoint.ActiveFlag is TRUE.\r
-                                - A same access point has been configured in other TCP \r
+                                - A same access point has been configured in other TCP\r
                                   instance properly.\r
   @retval EFI_ACCESS_DENIED     Configuring TCP instance when it is configured without\r
                                 calling Configure() with NULL to reset it.\r
@@ -557,9 +568,9 @@ EFI_STATUS
   The Connect() function will initiate an active open to the remote peer configured\r
   in current TCP instance if it is configured active. If the connection succeeds or\r
   fails due to any error, the ConnectionToken->CompletionToken.Event will be signaled\r
-  and ConnectionToken->CompletionToken.Status will be updated accordingly. This \r
-  function can only be called for the TCP instance in Tcp6StateClosed state. The \r
-  instance will transfer into Tcp6StateSynSent if the function returns EFI_SUCCESS. \r
+  and ConnectionToken->CompletionToken.Status will be updated accordingly. This\r
+  function can only be called for the TCP instance in Tcp6StateClosed state. The\r
+  instance will transfer into Tcp6StateSynSent if the function returns EFI_SUCCESS.\r
   If TCP three-way handshake succeeds, its state will become Tcp6StateEstablished,\r
   otherwise, the state will return to Tcp6StateClosed.\r
 \r
@@ -567,7 +578,7 @@ EFI_STATUS
   @param[in] ConnectionToken     Pointer to the connection token to return when the TCP three\r
                                  way handshake finishes.\r
 \r
-  @retval EFI_SUCCESS            The connection request is successfully initiated and the state of \r
+  @retval EFI_SUCCESS            The connection request is successfully initiated and the state of\r
                                  this TCP instance has been changed to Tcp6StateSynSent.\r
   @retval EFI_NOT_STARTED        This EFI TCPv6 Protocol instance has not been configured.\r
   @retval EFI_ACCESS_DENIED      One or more of the following conditions are TRUE:\r
@@ -589,25 +600,25 @@ EFI_STATUS
   );\r
 \r
 /**\r
-  Listen on the passive instance to accept an incoming connection request. This is a \r
+  Listen on the passive instance to accept an incoming connection request. This is a\r
   nonblocking operation.\r
\r
-  The Accept() function initiates an asynchronous accept request to wait for an incoming \r
-  connection on the passive TCP instance. If a remote peer successfully establishes a \r
+\r
+  The Accept() function initiates an asynchronous accept request to wait for an incoming\r
+  connection on the passive TCP instance. If a remote peer successfully establishes a\r
   connection with this instance, a new TCP instance will be created and its handle will\r
   be returned in ListenToken->NewChildHandle. The newly created instance is configured\r
   by inheriting the passive instance's configuration and is ready for use upon return.\r
   The new instance is in the Tcp6StateEstablished state.\r
 \r
-  The ListenToken->CompletionToken.Event will be signaled when a new connection is \r
-  accepted, user aborts the listen or connection is reset. \r
+  The ListenToken->CompletionToken.Event will be signaled when a new connection is\r
+  accepted, user aborts the listen or connection is reset.\r
 \r
-  This function only can be called when current TCP instance is in Tcp6StateListen state. \r
+  This function only can be called when current TCP instance is in Tcp6StateListen state.\r
 \r
   @param[in] This                Pointer to the EFI_TCP6_PROTOCOL instance.\r
   @param[in] ListenToken         Pointer to the listen token to return when operation finishes.\r
-                                 \r
-                                 \r
+\r
+\r
   @retval EFI_SUCCESS            The listen token has been queued successfully.\r
   @retval EFI_NOT_STARTED        This EFI TCPv6 Protocol instance has not been configured.\r
   @retval EFI_ACCESS_DENIED      One or more of the following are TRUE:\r
@@ -634,7 +645,7 @@ EFI_STATUS
   Queues outgoing data into the transmit queue.\r
 \r
   The Transmit() function queues a sending request to this TCP instance along with the\r
-  user data. The status of the token is updated and the event in the token will be \r
+  user data. The status of the token is updated and the event in the token will be\r
   signaled once the data is sent out or some error occurs.\r
 \r
   @param[in] This                 Pointer to the EFI_TCP6_PROTOCOL instance.\r
@@ -642,8 +653,8 @@ EFI_STATUS
 \r
   @retval EFI_SUCCESS             The data has been queued for transmission.\r
   @retval EFI_NOT_STARTED         This EFI TCPv6 Protocol instance has not been configured.\r
-  @retval EFI_NO_MAPPING          The underlying IPv6 driver was responsible for choosing a \r
-                                  source address for this instance, but no source address was \r
+  @retval EFI_NO_MAPPING          The underlying IPv6 driver was responsible for choosing a\r
+                                  source address for this instance, but no source address was\r
                                   available for use.\r
   @retval EFI_INVALID_PARAMETER   One or more of the following are TRUE:\r
                                   - This is NULL.\r
@@ -653,11 +664,11 @@ EFI_STATUS
                                   - Token->Packet.FragmentCount is zero.\r
                                   - Token->Packet.DataLength is not equal to the sum of fragment lengths.\r
   @retval EFI_ACCESS_DENIED       One or more of the following conditions are TRUE:\r
-                                  - A transmit completion token with the same Token-> \r
-                                    CompletionToken.Event was already in the \r
+                                  - A transmit completion token with the same Token->\r
+                                    CompletionToken.Event was already in the\r
                                     transmission queue.\r
                                   - The current instance is in Tcp6StateClosed state.\r
-                                  - The current instance is a passive one and it is in \r
+                                  - The current instance is a passive one and it is in\r
                                     Tcp6StateListen state.\r
                                   - User has called Close() to disconnect this connection.\r
   @retval EFI_NOT_READY           The completion token could not be queued because the\r
@@ -677,15 +688,15 @@ EFI_STATUS
 /**\r
   Places an asynchronous receive request into the receiving queue.\r
 \r
-  The Receive() function places a completion token into the receive packet queue. This \r
+  The Receive() function places a completion token into the receive packet queue. This\r
   function is always asynchronous. The caller must allocate the Token->CompletionToken.Event\r
-  and the FragmentBuffer used to receive data. The caller also must fill the DataLength which \r
-  represents the whole length of all FragmentBuffer. When the receive operation completes, the \r
+  and the FragmentBuffer used to receive data. The caller also must fill the DataLength which\r
+  represents the whole length of all FragmentBuffer. When the receive operation completes, the\r
   EFI TCPv6 Protocol driver updates the Token->CompletionToken.Status and Token->Packet.RxData\r
   fields and the Token->CompletionToken.Event is signaled. If got data the data and its length\r
   will be copied into the FragmentTable, at the same time the full length of received data will\r
   be recorded in the DataLength fields. Providing a proper notification function and context\r
-  for the event will enable the user to receive the notification and receiving status. That \r
+  for the event will enable the user to receive the notification and receiving status. That\r
   notification function is guaranteed to not be re-entered.\r
 \r
   @param[in] This               Pointer to the EFI_TCP6_PROTOCOL instance.\r
@@ -694,7 +705,7 @@ EFI_STATUS
 \r
   @retval EFI_SUCCESS            The receive completion token was cached.\r
   @retval EFI_NOT_STARTED        This EFI TCPv6 Protocol instance has not been configured.\r
-  @retval EFI_NO_MAPPING         The underlying IPv6 driver was responsible for choosing a source \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_INVALID_PARAMETER  One or more of the following conditions is TRUE:\r
                                  - This is NULL.\r
@@ -702,20 +713,20 @@ EFI_STATUS
                                  - Token->CompletionToken.Event is NULL.\r
                                  - Token->Packet.RxData is NULL.\r
                                  - Token->Packet.RxData->DataLength is 0.\r
-                                 - The Token->Packet.RxData->DataLength is not the \r
+                                 - The Token->Packet.RxData->DataLength is not the\r
                                    sum of all FragmentBuffer length in FragmentTable.\r
   @retval EFI_OUT_OF_RESOURCES   The receive completion token could not be queued due to a lack of\r
                                  system resources (usually memory).\r
-  @retval EFI_DEVICE_ERROR       An unexpected system or network error occurred. \r
+  @retval EFI_DEVICE_ERROR       An unexpected system or network error occurred.\r
                                  The EFI TCPv6 Protocol instance has been reset to startup defaults.\r
   @retval EFI_ACCESS_DENIED      One or more of the following conditions is TRUE:\r
                                  - A receive completion token with the same Token->CompletionToken.Event\r
                                    was already in the receive queue.\r
                                  - The current instance is in Tcp6StateClosed state.\r
-                                 - The current instance is a passive one and it is in \r
+                                 - The current instance is a passive one and it is in\r
                                    Tcp6StateListen state.\r
                                  - User has called Close() to disconnect this connection.\r
-  @retval EFI_CONNECTION_FIN     The communication peer has closed the connection and there is no \r
+  @retval EFI_CONNECTION_FIN     The communication peer has closed the connection and there is no\r
                                  any buffered data in the receive buffer of this instance\r
   @retval EFI_NOT_READY          The receive request could not be queued because the receive queue is full.\r
 \r
@@ -731,16 +742,16 @@ EFI_STATUS
   Disconnecting a TCP connection gracefully or reset a TCP connection. This function is a\r
   nonblocking operation.\r
 \r
-  Initiate an asynchronous close token to TCP driver. After Close() is called, any buffered \r
-  transmission data will be sent by TCP driver and the current instance will have a graceful close \r
-  working flow described as RFC 793 if AbortOnClose is set to FALSE, otherwise, a rest packet \r
-  will be sent by TCP driver to fast disconnect this connection. When the close operation completes \r
-  successfully the TCP instance is in Tcp6StateClosed state, all pending asynchronous \r
+  Initiate an asynchronous close token to TCP driver. After Close() is called, any buffered\r
+  transmission data will be sent by TCP driver and the current instance will have a graceful close\r
+  working flow described as RFC 793 if AbortOnClose is set to FALSE, otherwise, a rest packet\r
+  will be sent by TCP driver to fast disconnect this connection. When the close operation completes\r
+  successfully the TCP instance is in Tcp6StateClosed state, all pending asynchronous\r
   operations are signaled and any buffers used for TCP network traffic are flushed.\r
 \r
   @param[in] This                Pointer to the EFI_TCP6_PROTOCOL instance.\r
   @param[in] CloseToken          Pointer to the close token to return when operation finishes.\r
-                                 \r
+\r
   @retval EFI_SUCCESS            The Close() is called successfully.\r
   @retval EFI_NOT_STARTED        This EFI TCPv6 Protocol instance has not been configured.\r
   @retval EFI_ACCESS_DENIED      One or more of the following are TRUE:\r
@@ -764,14 +775,14 @@ EFI_STATUS
 /**\r
   Abort an asynchronous connection, listen, transmission or receive request.\r
 \r
-  The Cancel() function aborts a pending connection, listen, transmit or \r
+  The Cancel() function aborts a pending connection, listen, transmit or\r
   receive request.\r
 \r
   If Token is not NULL and the token is in the connection, listen, transmission\r
-  or receive queue when it is being cancelled, its Token->Status will be set \r
+  or receive queue when it is being cancelled, its Token->Status will be set\r
   to EFI_ABORTED and then Token->Event will be signaled.\r
 \r
-  If the token is not in one of the queues, which usually means that the \r
+  If the token is not in one of the queues, which usually means that the\r
   asynchronous operation has completed, EFI_NOT_FOUND is returned.\r
 \r
   If Token is NULL all asynchronous token issued by Connect(), Accept(),\r
@@ -787,13 +798,14 @@ EFI_STATUS
                                  EFI_TCP6_COMPLETION_TOKEN is defined in\r
                                  EFI_TCP_PROTOCOL.Connect().\r
 \r
-  @retval EFI_SUCCESS            The asynchronous I/O request is aborted and Token->Event \r
-                                 is signaled. \r
+  @retval EFI_SUCCESS            The asynchronous I/O request is aborted and Token->Event\r
+                                 is signaled.\r
   @retval EFI_INVALID_PARAMETER  This is NULL.\r
   @retval EFI_NOT_STARTED        This instance hasn't been configured.\r
-  @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
+  @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
@@ -827,11 +839,11 @@ EFI_STATUS
   );\r
 \r
 ///\r
-/// EFI_TCP6_PROTOCOL \r
+/// EFI_TCP6_PROTOCOL\r
 /// defines the EFI TCPv6 Protocol child to be used by any network drivers or\r
-/// applications to send or receive data stream. It can either listen on a \r
+/// applications to send or receive data stream. It can either listen on a\r
 /// specified port as a service or actively connect to remote peer as a client.\r
-/// Each instance has its own independent settings. \r
+/// Each instance has its own independent settings.\r
 ///\r
 struct _EFI_TCP6_PROTOCOL {\r
   EFI_TCP6_GET_MODE_DATA  GetModeData;\r