MdePkg/Include/Protocol/Tcp4.h File Reference


Data Structures

struct  EFI_TCP4_SERVICE_POINT
struct  EFI_TCP4_VARIABLE_DATA
struct  EFI_TCP4_ACCESS_POINT
struct  EFI_TCP4_OPTION
struct  EFI_TCP4_CONFIG_DATA
struct  EFI_TCP4_COMPLETION_TOKEN
struct  EFI_TCP4_CONNECTION_TOKEN
struct  EFI_TCP4_LISTEN_TOKEN
struct  EFI_TCP4_FRAGMENT_DATA
struct  EFI_TCP4_RECEIVE_DATA
struct  EFI_TCP4_TRANSMIT_DATA
struct  EFI_TCP4_IO_TOKEN
struct  EFI_TCP4_CLOSE_TOKEN
struct  _EFI_TCP4_PROTOCOL

Defines

#define EFI_TCP4_SERVICE_BINDING_PROTOCOL_GUID
#define EFI_TCP4_PROTOCOL_GUID

Typedefs

typedef struct _EFI_TCP4_PROTOCOL EFI_TCP4_PROTOCOL
typedef EFI_STATUS(EFIAPI * EFI_TCP4_GET_MODE_DATA )(IN EFI_TCP4_PROTOCOL *This, OUT EFI_TCP4_CONNECTION_STATE *Tcp4State, OUT EFI_TCP4_CONFIG_DATA *Tcp4ConfigData, OUT EFI_IP4_MODE_DATA *Ip4ModeData, OUT EFI_MANAGED_NETWORK_CONFIG_DATA *MnpConfigData, OUT EFI_SIMPLE_NETWORK_MODE *SnpModeData)
typedef EFI_STATUS(EFIAPI * EFI_TCP4_CONFIGURE )(IN EFI_TCP4_PROTOCOL *This, IN EFI_TCP4_CONFIG_DATA *TcpConfigData)
typedef EFI_STATUS(EFIAPI * EFI_TCP4_ROUTES )(IN EFI_TCP4_PROTOCOL *This, IN BOOLEAN DeleteRoute, IN EFI_IPv4_ADDRESS *SubnetAddress, IN EFI_IPv4_ADDRESS *SubnetMask, IN EFI_IPv4_ADDRESS *GatewayAddress)
typedef EFI_STATUS(EFIAPI * EFI_TCP4_CONNECT )(IN EFI_TCP4_PROTOCOL *This, IN EFI_TCP4_CONNECTION_TOKEN *ConnectionToken)
typedef EFI_STATUS(EFIAPI * EFI_TCP4_ACCEPT )(IN EFI_TCP4_PROTOCOL *This, IN EFI_TCP4_LISTEN_TOKEN *ListenToken)
typedef EFI_STATUS(EFIAPI * EFI_TCP4_TRANSMIT )(IN EFI_TCP4_PROTOCOL *This, IN EFI_TCP4_IO_TOKEN *Token)
typedef EFI_STATUS(EFIAPI * EFI_TCP4_RECEIVE )(IN EFI_TCP4_PROTOCOL *This, IN EFI_TCP4_IO_TOKEN *Token)
typedef EFI_STATUS(EFIAPI * EFI_TCP4_CLOSE )(IN EFI_TCP4_PROTOCOL *This, IN EFI_TCP4_CLOSE_TOKEN *CloseToken)
typedef EFI_STATUS(EFIAPI * EFI_TCP4_CANCEL )(IN EFI_TCP4_PROTOCOL *This, IN EFI_TCP4_COMPLETION_TOKEN *Token)
typedef EFI_STATUS(EFIAPI * EFI_TCP4_POLL )(IN EFI_TCP4_PROTOCOL *This)

Enumerations

enum  EFI_TCP4_CONNECTION_STATE {
  Tcp4StateClosed = 0, Tcp4StateListen = 1, Tcp4StateSynSent = 2, Tcp4StateSynReceived = 3,
  Tcp4StateEstablished = 4, Tcp4StateFinWait1 = 5, Tcp4StateFinWait2 = 6, Tcp4StateClosing = 7,
  Tcp4StateTimeWait = 8, Tcp4StateCloseWait = 9, Tcp4StateLastAck = 10
}

Variables

EFI_GUID gEfiTcp4ServiceBindingProtocolGuid
EFI_GUID gEfiTcp4ProtocolGuid

Detailed Description

EFI TCPv4(Transmission Control Protocol version 4) Protocol Definition The EFI TCPv4 Service Binding Protocol is used to locate EFI TCPv4 Protocol drivers to create and destroy child of the driver to communicate with other host using TCP protocol. The EFI TCPv4 Protocol provides services to send and receive data stream.

Copyright (c) 2006 - 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 that accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php.

THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.

Revision Reference:
This Protocol is introduced in UEFI Specification 2.0.

Define Documentation

#define EFI_TCP4_PROTOCOL_GUID

Value:

{ \
    0x65530BC7, 0xA359, 0x410f, {0xB0, 0x10, 0x5A, 0xAD, 0xC7, 0xEC, 0x2B, 0x62 } \
  }

#define EFI_TCP4_SERVICE_BINDING_PROTOCOL_GUID

Value:

{ \
    0x00720665, 0x67EB, 0x4a99, {0xBA, 0xF7, 0xD3, 0xC3, 0x3A, 0x1C, 0x7C, 0xC9 } \
  }


Typedef Documentation

typedef EFI_STATUS(EFIAPI * EFI_TCP4_ACCEPT)(IN EFI_TCP4_PROTOCOL *This, IN EFI_TCP4_LISTEN_TOKEN *ListenToken)

Listen on the passive instance to accept an incoming connection request. This is a nonblocking operation.

Parameters:
This The pointer to the EFI_TCP4_PROTOCOL instance.
ListenToken The pointer to the listen token to return when operation finishes.
Return values:
EFI_SUCCESS The listen token has been queued successfully.
EFI_NOT_STARTED This EFI TCPv4 Protocol instance has not been configured.
EFI_ACCESS_DENIED One or more of the following are TRUE:
  • This instance is not a passive instance.
  • This instance is not in Tcp4StateListen state.
  • The same listen token has already existed in the listen token queue of this TCP instance.
EFI_INVALID_PARAMETER One or more of the following are TRUE:
EFI_OUT_OF_RESOURCES Could not allocate enough resource to finish the operation.
EFI_DEVICE_ERROR Any unexpected and not belonged to above category error.

typedef EFI_STATUS(EFIAPI * EFI_TCP4_CANCEL)(IN EFI_TCP4_PROTOCOL *This, IN EFI_TCP4_COMPLETION_TOKEN *Token)

Abort an asynchronous connection, listen, transmission or receive request.

Parameters:
This The pointer to the EFI_TCP4_PROTOCOL instance.
Token The pointer to a token that has been issued by EFI_TCP4_PROTOCOL.Connect(), EFI_TCP4_PROTOCOL.Accept(), EFI_TCP4_PROTOCOL.Transmit() or EFI_TCP4_PROTOCOL.Receive(). If NULL, all pending tokens issued by above four functions will be aborted. Type EFI_TCP4_COMPLETION_TOKEN is defined in EFI_TCP4_PROTOCOL.Connect().
Return values:
EFI_SUCCESS The asynchronous I/O request is aborted and Token->Event is signaled.
EFI_INVALID_PARAMETER This is NULL.
EFI_NOT_STARTED This instance hasn't been configured.
EFI_NO_MAPPING When using the default address, configuration (DHCP, BOOTP,RARP, etc.) hasn't finished yet.
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().
EFI_UNSUPPORTED The implementation does not support this function.

typedef EFI_STATUS(EFIAPI * EFI_TCP4_CLOSE)(IN EFI_TCP4_PROTOCOL *This, IN EFI_TCP4_CLOSE_TOKEN *CloseToken)

Disconnecting a TCP connection gracefully or reset a TCP connection. This function is a nonblocking operation.

Parameters:
This The pointer to the EFI_TCP4_PROTOCOL instance.
CloseToken The pointer to the close token to return when operation finishes.
Return values:
EFI_SUCCESS The Close() is called successfully.
EFI_NOT_STARTED This EFI TCPv4 Protocol instance has not been configured.
EFI_ACCESS_DENIED One or more of the following are TRUE:
  • Configure() has been called with TcpConfigData set to NULL and this function has not returned.
  • Previous Close() call on this instance has not finished.
EFI_INVALID_PARAMETER One or more of the following are TRUE:
EFI_OUT_OF_RESOURCES Could not allocate enough resource to finish the operation.
EFI_DEVICE_ERROR Any unexpected and not belonged to above category error.

typedef EFI_STATUS(EFIAPI * EFI_TCP4_CONFIGURE)(IN EFI_TCP4_PROTOCOL *This, IN EFI_TCP4_CONFIG_DATA *TcpConfigData)

Initialize or brutally reset the operational parameters for this EFI TCPv4 instance.

Parameters:
This The pointer to the EFI_TCP4_PROTOCOL instance.
Tcp4ConfigData The pointer to the configure data to configure the instance.
Return values:
EFI_SUCCESS The operational settings are set, changed, or reset successfully.
EFI_INVALID_PARAMETER Some parameter is invalid.
EFI_NO_MAPPING When using a default address, configuration (through DHCP, BOOTP, RARP, etc.) is not finished yet.
EFI_ACCESS_DENIED Configuring TCP instance when it is configured without calling Configure() with NULL to reset it.
EFI_DEVICE_ERROR An unexpected network or system error occurred.
EFI_UNSUPPORTED One or more of the control options are not supported in the implementation.
EFI_OUT_OF_RESOURCES Could not allocate enough system resources when executing Configure().

typedef EFI_STATUS(EFIAPI * EFI_TCP4_CONNECT)(IN EFI_TCP4_PROTOCOL *This, IN EFI_TCP4_CONNECTION_TOKEN *ConnectionToken)

Initiate a nonblocking TCP connection request for an active TCP instance.

Parameters:
This The pointer to the EFI_TCP4_PROTOCOL instance.
ConnectionToken The pointer to the connection token to return when the TCP three way handshake finishes.
Return values:
EFI_SUCCESS The connection request is successfully initiated and the state of this TCPv4 instance has been changed to Tcp4StateSynSent.
EFI_NOT_STARTED This EFI TCPv4 Protocol instance has not been configured.
EFI_ACCESS_DENIED One or more of the following conditions are TRUE:
  • This instance is not configured as an active one.
  • This instance is not in Tcp4StateClosed state.
EFI_INVALID_PARAMETER One or more of the following are TRUE:
EFI_OUT_OF_RESOURCES The driver can't allocate enough resource to initiate the activ eopen.
EFI_DEVICE_ERROR An unexpected system or network error occurred.

typedef EFI_STATUS(EFIAPI * EFI_TCP4_GET_MODE_DATA)(IN EFI_TCP4_PROTOCOL *This, OUT EFI_TCP4_CONNECTION_STATE *Tcp4State, OUT EFI_TCP4_CONFIG_DATA *Tcp4ConfigData, OUT EFI_IP4_MODE_DATA *Ip4ModeData, OUT EFI_MANAGED_NETWORK_CONFIG_DATA *MnpConfigData, OUT EFI_SIMPLE_NETWORK_MODE *SnpModeData)

Get the current operational status.

Parameters:
This The pointer to the EFI_TCP4_PROTOCOL instance.
Tcp4State The pointer to the buffer to receive the current TCP state.
Tcp4ConfigData The pointer to the buffer to receive the current TCP configuration.
Ip4ModeData The pointer to the buffer to receive the current IPv4 configuration data used by the TCPv4 instance.
MnpConfigData The pointer to the buffer to receive the current MNP configuration data used indirectly by the TCPv4 instance.
SnpModeData The pointer to the buffer to receive the current SNP configuration data used indirectly by the TCPv4 instance.
Return values:
EFI_SUCCESS The mode data was read.
EFI_INVALID_PARAMETER This is NULL.
EFI_NOT_STARTED No configuration data is available because this instance hasn't been started.

typedef EFI_STATUS(EFIAPI * EFI_TCP4_POLL)(IN EFI_TCP4_PROTOCOL *This)

Poll to receive incoming data and transmit outgoing segments.

Parameters:
This The pointer to the EFI_TCP4_PROTOCOL instance.
Return values:
EFI_SUCCESS Incoming or outgoing data was processed.
EFI_INVALID_PARAMETER This is NULL.
EFI_DEVICE_ERROR An unexpected system or network error occurred.
EFI_NOT_READY No incoming or outgoing data is processed.
EFI_TIMEOUT Data was dropped out of the transmission or receive queue. Consider increasing the polling rate.

typedef EFI_STATUS(EFIAPI * EFI_TCP4_RECEIVE)(IN EFI_TCP4_PROTOCOL *This, IN EFI_TCP4_IO_TOKEN *Token)

Places an asynchronous receive request into the receiving queue.

Parameters:
This The pointer to the EFI_TCP4_PROTOCOL instance.
Token The pointer to a token that is associated with the receive data descriptor.
Return values:
EFI_SUCCESS The receive completion token was cached.
EFI_NOT_STARTED This EFI TCPv4 Protocol instance has not been configured.
EFI_NO_MAPPING When using a default address, configuration (DHCP, BOOTP, RARP, etc.) is not finished yet.
EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
  • This is NULL.
  • Token is NULL.
  • Token->CompletionToken.Event is NULL.
  • Token->Packet.RxData is NULL.
  • Token->Packet.RxData->DataLength is 0.
  • The Token->Packet.RxData->DataLength is not the sum of all FragmentBuffer length in FragmentTable.
EFI_OUT_OF_RESOURCES The receive completion token could not be queued due to a lack of system resources (usually memory).
EFI_DEVICE_ERROR An unexpected system or network error occurred.
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 Tcp4StateClosed state.
  • The current instance is a passive one and it is in Tcp4StateListen state.
  • User has called Close() to disconnect this connection.
EFI_CONNECTION_FIN The communication peer has closed the connection and there is no any buffered data in the receive buffer of this instance.
EFI_NOT_READY The receive request could not be queued because the receive queue is full.

typedef EFI_STATUS(EFIAPI * EFI_TCP4_ROUTES)(IN EFI_TCP4_PROTOCOL *This, IN BOOLEAN DeleteRoute, IN EFI_IPv4_ADDRESS *SubnetAddress, IN EFI_IPv4_ADDRESS *SubnetMask, IN EFI_IPv4_ADDRESS *GatewayAddress)

Add or delete a route entry to the route table

Parameters:
This The pointer to the EFI_TCP4_PROTOCOL instance.
DeleteRoute Set it to TRUE to delete this route from the routing table. Set it to FALSE to add this route to the routing table. DestinationAddress and SubnetMask are used as the keywords to search route entry.
SubnetAddress The destination network.
SubnetMask The subnet mask of the destination network.
GatewayAddress The gateway address for this route. It must be on the same subnet with the station address unless a direct route is specified.
Return values:
EFI_SUCCESS The operation completed successfully.
EFI_NOT_STARTED The EFI TCPv4 Protocol instance has not been configured.
EFI_NO_MAPPING When using a default address, configuration (DHCP, BOOTP, RARP, etc.) is not finished yet.
EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
  • This is NULL.
  • SubnetAddress is NULL.
  • SubnetMask is NULL.
  • GatewayAddress is NULL.
  • *SubnetAddress is not NULL a valid subnet address.
  • *SubnetMask is not a valid subnet mask.
  • *GatewayAddress is not a valid unicast IP address or it is not in the same subnet.
EFI_OUT_OF_RESOURCES Could not allocate enough resources to add the entry to the routing table.
EFI_NOT_FOUND This route is not in the routing table.
EFI_ACCESS_DENIED The route is already defined in the routing table.
EFI_UNSUPPORTED The TCP driver does not support this operation.

typedef EFI_STATUS(EFIAPI * EFI_TCP4_TRANSMIT)(IN EFI_TCP4_PROTOCOL *This, IN EFI_TCP4_IO_TOKEN *Token)

Queues outgoing data into the transmit queue.

Parameters:
This The pointer to the EFI_TCP4_PROTOCOL instance.
Token The pointer to the completion token to queue to the transmit queue.
Return values:
EFI_SUCCESS The data has been queued for transmission.
EFI_NOT_STARTED This EFI TCPv4 Protocol instance has not been configured.
EFI_NO_MAPPING When using a default address, configuration (DHCP, BOOTP, RARP, etc.) is not finished yet.
EFI_INVALID_PARAMETER One or more of the following are TRUE:
EFI_ACCESS_DENIED One or more of the following conditions is TRUE:
  • A transmit completion token with the same Token->CompletionToken.Event was already in the transmission queue.
  • The current instance is in Tcp4StateClosed state.
  • The current instance is a passive one and it is in Tcp4StateListen state.
  • User has called Close() to disconnect this connection.
EFI_NOT_READY The completion token could not be queued because the transmit queue is full.
EFI_OUT_OF_RESOURCES Could not queue the transmit data because of resource shortage.
EFI_NETWORK_UNREACHABLE There is no route to the destination network or address.


Enumeration Type Documentation

TCP4 connnection state

Enumerator:
Tcp4StateClosed 
Tcp4StateListen 
Tcp4StateSynSent 
Tcp4StateSynReceived 
Tcp4StateEstablished 
Tcp4StateFinWait1 
Tcp4StateFinWait2 
Tcp4StateClosing 
Tcp4StateTimeWait 
Tcp4StateCloseWait 
Tcp4StateLastAck 


Variable Documentation


Generated on Wed Sep 23 16:24:24 2015 for MdePkg[ALL] by  doxygen 1.5.7.1