]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Main.h
MdeModulePkg: Clean up source files
[mirror_edk2.git] / MdeModulePkg / Universal / Network / Tcp4Dxe / Tcp4Main.h
index cd904584bf9a58c44164a1fd6ef1865052f9ef4a..c898a7ee2dd0d1da94765f733c3fbe84b480ca46 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   TCP4 protocol services header file.\r
 \r
-Copyright (c) 2005 - 2012, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2005 - 2018, 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
@@ -53,7 +53,7 @@ Tcp4Dispatcher (
   IN UINT8                   Request,\r
   IN VOID                    *Data    OPTIONAL\r
   );\r
-  \r
+\r
 ///\r
 /// TCP mode data\r
 ///\r
@@ -83,10 +83,10 @@ typedef struct {
 \r
 /**\r
   Get the current operational status of a TCP instance.\r
-  \r
-  The GetModeData() function copies the current operational settings of this \r
-  EFI TCPv4 Protocol instance into user-supplied buffers. This function can \r
-  also be used to retrieve the operational setting of underlying drivers \r
+\r
+  The GetModeData() function copies the current operational settings of this\r
+  EFI TCPv4 Protocol instance into user-supplied buffers. This function can\r
+  also be used to retrieve the operational setting of underlying drivers\r
   such as IPv4, MNP, or SNP.\r
 \r
   @param  This                     Pointer to the EFI_TCP4_PROTOCOL instance.\r
@@ -94,7 +94,7 @@ typedef struct {
                                    state.\r
   @param  Tcp4ConfigData           Pointer to the buffer to receive the current TCP\r
                                    configuration.\r
-  @param  Ip4ModeData              Pointer to the buffer to receive the current IPv4 \r
+  @param  Ip4ModeData              Pointer to the buffer to receive the current IPv4\r
                                    configuration data used by the TCPv4 instance.\r
   @param  MnpConfigData            Pointer to the buffer to receive the current MNP\r
                                    configuration data indirectly used by the TCPv4\r
@@ -124,21 +124,21 @@ Tcp4GetModeData (
 /**\r
   Initialize or brutally reset the operational parameters for\r
   this EFI TCPv4 instance.\r
-  \r
+\r
   The Configure() function does the following:\r
-  * Initialize this EFI TCPv4 instance, i.e., initialize the communication end \r
+  * Initialize this EFI TCPv4 instance, i.e., initialize the communication end\r
   setting, specify active open or passive open for an instance.\r
-  * Reset this TCPv4 instance brutally, i.e., cancel all pending asynchronous \r
-  tokens, flush transmission and receiving buffer directly without informing \r
+  * Reset this TCPv4 instance brutally, i.e., cancel all pending asynchronous\r
+  tokens, flush transmission and receiving buffer directly without informing\r
   the communication peer.\r
-  No other TCPv4 Protocol operation can be executed by this instance \r
-  until it is configured properly. For an active TCP4 instance, after a proper \r
-  configuration it may call Connect() to initiates the three-way handshake. \r
-  For a passive TCP4 instance, its state will transit to Tcp4StateListen after \r
-  configuration, and Accept() may be called to listen the incoming TCP connection \r
-  request. If TcpConfigData is set to NULL, the instance is reset. Resetting \r
-  process will be done brutally, the state machine will be set to Tcp4StateClosed \r
-  directly, the receive queue and transmit queue will be flushed, and no traffic is \r
+  No other TCPv4 Protocol operation can be executed by this instance\r
+  until it is configured properly. For an active TCP4 instance, after a proper\r
+  configuration it may call Connect() to initiates the three-way handshake.\r
+  For a passive TCP4 instance, its state will transit to Tcp4StateListen after\r
+  configuration, and Accept() may be called to listen the incoming TCP connection\r
+  request. If TcpConfigData is set to NULL, the instance is reset. Resetting\r
+  process will be done brutally, the state machine will be set to Tcp4StateClosed\r
+  directly, the receive queue and transmit queue will be flushed, and no traffic is\r
   allowed through this instance.\r
 \r
   @param  This                     Pointer to the EFI_TCP4_PROTOCOL instance.\r
@@ -168,35 +168,35 @@ Tcp4Configure (
 \r
 /**\r
   Add or delete routing entries.\r
-  \r
+\r
   The Routes() function adds or deletes a route from the instance's routing table.\r
-  The most specific route is selected by comparing the SubnetAddress with the \r
+  The most specific route is selected by comparing the SubnetAddress with the\r
   destination IP address's arithmetical AND to the SubnetMask.\r
-  The default route is added with both SubnetAddress and SubnetMask set to 0.0.0.0. \r
+  The default route is added with both SubnetAddress and SubnetMask set to 0.0.0.0.\r
   The default route matches all destination IP addresses if there is no more specific route.\r
-  Direct route is added with GatewayAddress set to 0.0.0.0. Packets are sent to \r
-  the destination host if its address can be found in the Address Resolution Protocol (ARP) \r
-  cache or it is on the local subnet. If the instance is configured to use default \r
+  Direct route is added with GatewayAddress set to 0.0.0.0. Packets are sent to\r
+  the destination host if its address can be found in the Address Resolution Protocol (ARP)\r
+  cache or it is on the local subnet. If the instance is configured to use default\r
   address, a direct route to the local network will be added automatically.\r
-  Each TCP instance has its own independent routing table. Instance that uses the \r
-  default IP address will have a copy of the EFI_IP4_CONFIG_PROTOCOL's routing table. \r
-  The copy will be updated automatically whenever the IP driver reconfigures its \r
-  instance. As a result, the previous modification to the instance's local copy \r
-  will be lost. The priority of checking the route table is specific with IP \r
+  Each TCP instance has its own independent routing table. Instance that uses the\r
+  default IP address will have a copy of the EFI_IP4_CONFIG_PROTOCOL's routing table.\r
+  The copy will be updated automatically whenever the IP driver reconfigures its\r
+  instance. As a result, the previous modification to the instance's local copy\r
+  will be lost. The priority of checking the route table is specific with IP\r
   implementation and every IP implementation must comply with RFC 1122.\r
 \r
   @param  This                     Pointer to the EFI_TCP4_PROTOCOL instance.\r
   @param  DeleteRoute              If TRUE, delete the specified route from routing\r
                                    table; if FALSE, add the specified route to\r
                                    routing table.\r
-                                   DestinationAddress and SubnetMask are used as \r
+                                   DestinationAddress and SubnetMask are used as\r
                                    the keywords to search route entry.\r
   @param  SubnetAddress            The destination network.\r
   @param  SubnetMask               The subnet mask for the destination network.\r
-  @param  GatewayAddress           The gateway address for this route. \r
-                                   It must be on the same subnet with the station \r
+  @param  GatewayAddress           The gateway address for this route.\r
+                                   It must be on the same subnet with the station\r
                                    address unless a direct route is specified.\r
-                                   \r
+\r
   @retval EFI_SUCCESS              The operation completed successfully.\r
   @retval EFI_NOT_STARTED          The EFI_TCP4_PROTOCOL instance has not been\r
                                    configured.\r
@@ -224,21 +224,21 @@ Tcp4Routes (
 /**\r
   Initiate a nonblocking TCP connection request for an active TCP instance.\r
 \r
-  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 \r
-  or fails due to any error, the ConnectionToken->CompletionToken.Event will be \r
-  signaled and ConnectionToken->CompletionToken.Status will be updated accordingly. \r
-  This function can only be called for the TCP instance in Tcp4StateClosed state. \r
-  The instance will transfer into Tcp4StateSynSent if the function returns EFI_SUCCESS. \r
-  If TCP three way handshake succeeds, its state will become Tcp4StateEstablished, \r
+  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\r
+  or fails due to any error, the ConnectionToken->CompletionToken.Event will be\r
+  signaled and ConnectionToken->CompletionToken.Status will be updated accordingly.\r
+  This function can only be called for the TCP instance in Tcp4StateClosed state.\r
+  The instance will transfer into Tcp4StateSynSent if the function returns EFI_SUCCESS.\r
+  If TCP three way handshake succeeds, its state will become Tcp4StateEstablished,\r
   otherwise, the state will return to Tcp4StateClosed.\r
-  \r
+\r
   @param  This                     Pointer to the EFI_TCP4_PROTOCOL instance\r
   @param  ConnectionToken          Pointer to the connection token to return when\r
                                    the TCP three way handshake finishes.\r
 \r
-  @retval EFI_SUCCESS              The connection request is successfully initiated \r
-                                   and the state of this TCPv4 instance has \r
+  @retval EFI_SUCCESS              The connection request is successfully initiated\r
+                                   and the state of this TCPv4 instance has\r
                                    been changed to Tcp4StateSynSent.\r
   @retval EFI_NOT_STARTED          This EFI_TCP4_PROTOCOL instance hasn't been\r
                                    configured.\r
@@ -260,14 +260,14 @@ Tcp4Connect (
 /**\r
   Listen on the passive instance to accept an incoming connection request.\r
 \r
-  The Accept() function initiates an asynchronous accept request to wait for an \r
-  incoming connection on the passive TCP instance. If a remote peer successfully \r
-  establishes a connection with this instance, a new TCP instance will be created \r
-  and its handle will be returned in ListenToken->NewChildHandle. The newly created \r
-  instance is configured by inheriting the passive instance's configuration and is \r
+  The Accept() function initiates an asynchronous accept request to wait for an\r
+  incoming connection on the passive TCP instance. If a remote peer successfully\r
+  establishes a connection with this instance, a new TCP instance will be created\r
+  and its handle will be returned in ListenToken->NewChildHandle. The newly created\r
+  instance is configured by inheriting the passive instance's configuration and is\r
   ready for use upon return. The instance is in the Tcp4StateEstablished state.\r
-  The ListenToken->CompletionToken.Event will be signaled when a new connection \r
-  is accepted, user aborts the listen or connection is reset. This function only \r
+  The ListenToken->CompletionToken.Event will be signaled when a new connection\r
+  is accepted, user aborts the listen or connection is reset. This function only\r
   can be called when current TCP instance is in Tcp4StateListen state.\r
 \r
   @param  This                     Pointer to the EFI_TCP4_PROTOCOL instance\r
@@ -297,8 +297,8 @@ Tcp4Accept (
 /**\r
   Queues outgoing data into the transmit queue.\r
 \r
-  The Transmit() function queues a sending request to this TCPv4 instance along \r
-  with the user data. The status of the token is updated and the event in the token \r
+  The Transmit() function queues a sending request to this TCPv4 instance along\r
+  with the user data. The status of the token is updated and the event in the token\r
   will be signaled once the data is sent out or some error occurs.\r
 \r
   @param  This                     Pointer to the EFI_TCP4_PROTOCOL instance\r
@@ -314,11 +314,11 @@ Tcp4Accept (
   @retval EFI_ACCESS_DENIED        One or more of the following conditions is TRUE:\r
                                    * A transmit completion token with the same\r
                                      Token-> CompletionToken.Event was already in the\r
-                                     transmission queue. \r
-                                   * The current instance is in Tcp4StateClosed state \r
-                                   * The current instance is a passive one and \r
-                                     it is in Tcp4StateListen state. \r
-                                   * User has called Close() to disconnect this \r
+                                     transmission queue.\r
+                                   * The current instance is in Tcp4StateClosed state\r
+                                   * The current instance is a passive one and\r
+                                     it is in Tcp4StateListen state.\r
+                                   * User has called Close() to disconnect this\r
                                      connection.\r
   @retval EFI_NOT_READY            The completion token could not be queued because\r
                                    the transmit queue is full.\r
@@ -338,16 +338,16 @@ Tcp4Transmit (
 /**\r
   Place an asynchronous receive request into the receiving queue.\r
 \r
-  The Receive() function places a completion token into the receive packet queue. \r
-  This function is always asynchronous. The caller must allocate the \r
-  Token->CompletionToken.Event and the FragmentBuffer used to receive data. He also \r
-  must fill the DataLength which represents the whole length of all FragmentBuffer. \r
-  When the receive operation completes, the EFI TCPv4 Protocol driver updates the \r
-  Token->CompletionToken.Status and Token->Packet.RxData fields and the \r
-  Token->CompletionToken.Event is signaled. If got data the data and its length \r
-  will be copy into the FragmentTable, in the same time the full length of received \r
-  data will be recorded in the DataLength fields. Providing a proper notification \r
-  function and context for the event will enable the user to receive the notification \r
+  The Receive() function places a completion token into the receive packet queue.\r
+  This function is always asynchronous. The caller must allocate the\r
+  Token->CompletionToken.Event and the FragmentBuffer used to receive data. He also\r
+  must fill the DataLength which represents the whole length of all FragmentBuffer.\r
+  When the receive operation completes, the EFI TCPv4 Protocol driver updates the\r
+  Token->CompletionToken.Status and Token->Packet.RxData fields and the\r
+  Token->CompletionToken.Event is signaled. If got data the data and its length\r
+  will be copy into the FragmentTable, in the same time the full length of received\r
+  data will be recorded in the DataLength fields. Providing a proper notification\r
+  function and context for the event will enable the user to receive the notification\r
   and receiving status. That notification function is guaranteed to not be re-entered.\r
 \r
   @param  This                     Pointer to the EFI_TCP4_PROTOCOL instance.\r
@@ -363,16 +363,16 @@ Tcp4Transmit (
   @retval EFI_OUT_OF_RESOURCES     The receive completion token could not be queued\r
                                    due to a lack of system resources.\r
   @retval EFI_DEVICE_ERROR         An unexpected system or network error occurred.\r
-                                   The EFI TCPv4 Protocol instance has been reset \r
+                                   The EFI TCPv4 Protocol instance has been reset\r
                                    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\r
-                                     Token->CompletionToken.Event was already in \r
-                                     the receive queue. \r
-                                   * The current instance is in Tcp4StateClosed state. \r
-                                   * The current instance is a passive one and it \r
-                                     is in Tcp4StateListen state. \r
-                                   * User has called Close() to disconnect this \r
+                                     Token->CompletionToken.Event was already in\r
+                                     the receive queue.\r
+                                   * The current instance is in Tcp4StateClosed state.\r
+                                   * The current instance is a passive one and it\r
+                                     is in Tcp4StateListen state.\r
+                                   * User has called Close() to disconnect this\r
                                      connection.\r
   @retval EFI_CONNECTION_FIN       The communication peer has closed the connection\r
                                    and there is no any buffered data in the receive\r
@@ -391,13 +391,13 @@ Tcp4Receive (
 /**\r
   Disconnecting a TCP connection gracefully or reset a TCP connection.\r
 \r
-  Initiate an asynchronous close token to TCP driver. After Close() is called, \r
-  any buffered transmission data will be sent by TCP driver and the current \r
-  instance will have a graceful close working flow described as RFC 793 if \r
-  AbortOnClose is set to FALSE, otherwise, a rest packet will be sent by TCP \r
-  driver to fast disconnect this connection. When the close operation completes \r
-  successfully the TCP instance is in Tcp4StateClosed state, all pending \r
-  asynchronous operation is signaled and any buffers used for TCP network traffic \r
+  Initiate an asynchronous close token to TCP driver. After Close() is called,\r
+  any buffered transmission data will be sent by TCP driver and the current\r
+  instance will have a graceful close working flow described as RFC 793 if\r
+  AbortOnClose is set to FALSE, otherwise, a rest packet will be sent by TCP\r
+  driver to fast disconnect this connection. When the close operation completes\r
+  successfully the TCP instance is in Tcp4StateClosed state, all pending\r
+  asynchronous operation is signaled and any buffers used for TCP network traffic\r
   is flushed.\r
 \r
   @param  This                     Pointer to the EFI_TCP4_PROTOCOL instance.\r
@@ -407,7 +407,7 @@ Tcp4Receive (
   @retval EFI_SUCCESS              The operation completed successfully.\r
   @retval EFI_NOT_STARTED          The EFI_TCP4_PROTOCOL instance hasn't been\r
                                    configured.\r
-  @retval EFI_ACCESS_DENIED        One or more of the following are TRUE: \r
+  @retval EFI_ACCESS_DENIED        One or more of the following are TRUE:\r
                                    * Configure() has been called with TcpConfigData\r
                                      set to NULL and this function has not returned.\r
                                    * Previous Close() call on this instance has not\r
@@ -429,33 +429,33 @@ Tcp4Close (
 /**\r
   Abort an asynchronous connection, listen, transmission or receive request.\r
 \r
-  The Cancel() function aborts a pending connection, listen, transmit or receive \r
-  request. If Token is not NULL and the token is in the connection, listen, \r
-  transmission or receive queue when it is being cancelled, its Token->Status \r
-  will be set to EFI_ABORTED and then Token->Event will be signaled. If the token \r
-  is not in one of the queues, which usually means that the asynchronous operation \r
-  has completed, EFI_NOT_FOUND is returned. If Token is NULL all asynchronous token \r
+  The Cancel() function aborts a pending connection, listen, transmit or receive\r
+  request. If Token is not NULL and the token is in the connection, listen,\r
+  transmission or receive queue when it is being cancelled, its Token->Status\r
+  will be set to EFI_ABORTED and then Token->Event will be signaled. If the token\r
+  is not in one of the queues, which usually means that the asynchronous operation\r
+  has completed, EFI_NOT_FOUND is returned. If Token is NULL all asynchronous token\r
   issued by Connect(), Accept(), Transmit() and Receive()will be aborted.\r
   NOTE: It has not been implemented currently.\r
-    \r
+\r
   @param  This                     Pointer to the EFI_TCP4_PROTOCOL instance.\r
   @param  Token                    Pointer to a token that has been issued by\r
                                    Connect(), Accept(), Transmit() or Receive(). If\r
                                    NULL, all pending tokens issued by above four\r
                                    functions will be aborted.\r
-                                   \r
+\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's been configured.\r
   @retval  EFI_NO_MAPPING          When using the default address, configuration\r
                                    (DHCP, BOOTP,RARP, etc.) hasn's finished yet.\r
-  @retval  EFI_NOT_FOUND           The asynchronous I/O request isn's found in the \r
-                                   transmission or receive queue. It has either \r
+  @retval  EFI_NOT_FOUND           The asynchronous I/O request isn's found in the\r
+                                   transmission or receive queue. It has either\r
                                    completed or wasn's issued by Transmit() and Receive().\r
   @retval  EFI_UNSUPPORTED         The operation is not supported in current\r
                                    implementation.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -467,11 +467,11 @@ Tcp4Cancel (
 /**\r
   Poll to receive incoming data and transmit outgoing segments.\r
 \r
-  The Poll() function increases the rate that data is moved between the network \r
-  and application and can be called when the TCP instance is created successfully. \r
-  Its use is optional. In some implementations, the periodical timer in the MNP \r
-  driver may not poll the underlying communications device fast enough to avoid \r
-  drop packets. Drivers and applications that are experiencing packet loss should \r
+  The Poll() function increases the rate that data is moved between the network\r
+  and application and can be called when the TCP instance is created successfully.\r
+  Its use is optional. In some implementations, the periodical timer in the MNP\r
+  driver may not poll the underlying communications device fast enough to avoid\r
+  drop packets. Drivers and applications that are experiencing packet loss should\r
   try calling the Poll() function in a high frequency.\r
 \r
   @param  This                     Pointer to the EFI_TCP4_PROTOCOL instance.\r