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