Socket.h revision 4fd606d1f5abe38e1f42c38de1d2e895166bd0f4
/** @file
Definitions for the Socket layer driver.
Copyright (c) 2011, 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
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#ifndef _SOCKET_H_
#define _SOCKET_H_
#include <Efi/EfiSocketLib.h>
//------------------------------------------------------------------------------
// Constants
//------------------------------------------------------------------------------
#define ESL_STRUCTURE_ALIGNMENT_MASK ( ~ESL_STRUCTURE_ALIGNMENT_BYTES ) ///< Mask to align structures
/**
Socket states
**/
typedef enum
{
SOCKET_STATE_NOT_CONFIGURED = 0, ///< socket call was successful
SOCKET_STATE_BOUND, ///< bind call was successful
SOCKET_STATE_LISTENING, ///< listen call was successful
SOCKET_STATE_NO_PORTS, ///< No ports available
SOCKET_STATE_IN_FIFO, ///< Socket on FIFO
SOCKET_STATE_CONNECTING, ///< Connecting to a remote system
SOCKET_STATE_CONNECTED, ///< Accept or connect call was successful
//
// Close state must be the last in the list
//
SOCKET_STATE_CLOSED ///< Close call was successful
} SOCKET_STATE;
/**
Port states
**/
typedef enum
{
PORT_STATE_ALLOCATED = 0, ///< Port allocated
PORT_STATE_OPEN, ///< Port opened
PORT_STATE_RX_ERROR, ///< Receive error detected
//
// Close state must be last in the list!
//
// Using < <= > >= in tests code to detect port close state
// machine has started
//
PORT_STATE_CLOSE_STARTED, ///< Close started on port
PORT_STATE_CLOSE_TX_DONE, ///< Transmits shutdown
PORT_STATE_CLOSE_DONE, ///< Port close operation complete
PORT_STATE_CLOSE_RX_DONE ///< Receives shutdown
} PORT_STATE;
//------------------------------------------------------------------------------
// Data Types
//------------------------------------------------------------------------------
/**
Receive context for SOCK_RAW sockets using IPv4.
**/
typedef struct
{
/**
Transmit context for SOCK_RAW sockets using IPv4.
**/
typedef struct
{
/**
Receive context for SOCK_STREAM and SOCK_SEQPACKET sockets using TCPv4.
**/
typedef struct
{
/**
Transmit context for SOCK_STREAM and SOCK_SEQPACKET sockets using TCPv4.
**/
typedef struct
{
/**
Receive context for SOCK_DGRAM sockets using UDPv4.
**/
typedef struct
{
/**
Transmit context for SOCK_DGRAM sockets using UDPv4.
**/
typedef struct
{
/**
Network specific context for transmit and receive packets.
**/
typedef struct _ESL_PACKET {
union {
} Op; ///< Network specific context
/**
Service control structure
The driver uses this structure to manage the network devices.
**/
typedef struct _ESL_SERVICE {
//
// Links
//
//
// Service data
//
//
// Network data
//
/**
IO management structure
This structure manages a single operation with the network.
**/
typedef struct _ESL_IO_MGMT {
union {
} Token; ///< Completion token for the network operation
} GCC_IO_MGMT;
/**
IP4 context structure
The driver uses this structure to manage the IP4 connections.
**/
typedef struct {
//
// IP4 context
//
/**
TCP4 context structure
The driver uses this structure to manage the TCP4 connections.
**/
typedef struct {
//
// TCP4 context
//
//
// Tokens
//
/**
UDP4 context structure
The driver uses this structure to manage the UDP4 connections.
**/
typedef struct {
//
// UDP4 context
//
/**
Configure the network layer.
@param [in] pProtocol Protocol structure address
@param [in] pConfigData Address of the confiuration data
@return Returns EFI_SUCCESS if the operation is successfully
started.
**/
typedef
(* PFN_NET_CONFIGURE) (
);
/**
Hand an I/O operation to the network layer.
@param [in] pProtocol Protocol structure address
@param [in] pToken Completion token address
@return Returns EFI_SUCCESS if the operation is successfully
started.
**/
typedef
(* PFN_NET_IO_START) (
);
/**
Port control structure
The driver uses this structure to manager the socket's connection
with the network driver.
**/
typedef struct _ESL_PORT {
//
// List links
//
//
// Structures
//
//
// Eliminate the pService references during port close
//
//
// Port management
//
//
// Transmit data management
//
//
// Receive data management
//
//
// Protocol specific management data
//
union {
VOID * v; ///< VOID pointer
} pProtocol; ///< Protocol structure address
union {
} Context; ///< Network specific context
/**
Accept a network connection.
@param [in] pSocket Address of the socket structure.
@param [in] pSockAddr Address of a buffer to receive the remote
network address.
@param [in, out] pSockAddrLength Length in bytes of the address buffer.
On output specifies the length of the
remote network address.
@retval EFI_SUCCESS Remote address is available
@retval Others Remote address not available
**/
typedef
(* PFN_API_ACCEPT) (
);
/**
Poll for completion of the connection attempt.
@param [in] pSocket Address of an ::ESL_SOCKET structure.
@retval EFI_SUCCESS The connection was successfully established.
@retval EFI_NOT_READY The connection is in progress, call this routine again.
@retval Others The connection attempt failed.
**/
typedef
(* PFN_API_CONNECT_POLL) (
);
/**
Attempt to connect to a remote TCP port
This routine starts the connection processing for a SOCK_STREAM
or SOCK_SEQPAKCET socket using the TCP network layer.
This routine is called by ::EslSocketConnect to initiate the TCP
network specific connect operations.
@param [in] pSocket Address of an ::ESL_SOCKET structure.
@retval EFI_SUCCESS The connection was successfully established.
@retval EFI_NOT_READY The connection is in progress, call this routine again.
@retval Others The connection attempt failed.
**/
typedef
(* PFN_API_CONNECT_START) (
);
/**
Get the local socket address
@param [in] pPort Address of an ::ESL_PORT structure.
@param [out] pAddress Network address to receive the local system address
**/
typedef
(* PFN_API_LOCAL_ADDR_GET) (
);
/**
Set the local port address.
This routine sets the local port address.
This support routine is called by ::EslSocketPortAllocate.
@param [in] ppPort Address of an ESL_PORT structure
@param [in] pSockAddr Address of a sockaddr structure that contains the
connection point on the local machine. An IPv4 address
of INADDR_ANY specifies that the connection is made to
all of the network stacks on the platform. Specifying a
specific IPv4 address restricts the connection to the
network stack supporting that address. Specifying zero
for the port causes the network layer to assign a port
number from the dynamic range. Specifying a specific
port number causes the network layer to use that port.
@param [in] bBindTest TRUE = run bind testing
@retval EFI_SUCCESS The operation was successful
**/
typedef
(* PFN_API_LOCAL_ADDR_SET) (
);
/**
Process the completion event
This routine handles the I/O completion event.
This routine is called by the low level network driver when
the operation is completed.
@param [in] Event The receive completion event
@param [in] pIo The address of an ::ESL_IO_MGMT structure
**/
typedef
(* PFN_API_IO_COMPLETE) (
);
/**
Determine if the socket is configured.
@param [in] pSocket Address of a ESL_SOCKET structure
@retval EFI_SUCCESS - The port is connected
@retval EFI_NOT_STARTED - The port is not connected
**/
typedef
(* PFN_API_IS_CONFIGURED) (
);
/**
Establish the known port to listen for network connections.
@param [in] pSocket Address of the socket structure.
@retval EFI_SUCCESS - Socket successfully created
@retval Other - Failed to enable the socket for listen
**/
typedef
(* PFN_API_LISTEN) (
);
/**
Get the option value
Retrieve the protocol options one at a time by name.
@param [in] pSocket Address of a ESL_SOCKET structure
@param [in] OptionName Name of the option
@param [out] ppOptionData Buffer to receive address of option value
@param [out] pOptionLength Buffer to receive the option length
@retval EFI_SUCCESS - Socket data successfully received
**/
typedef
(* PFN_API_OPTION_GET) (
IN int OptionName,
);
/**
Set the option value
Adjust the protocol options one at a time by name.
@param [in] pSocket Address of a ESL_SOCKET structure
@param [in] OptionName Name of the option
@param [in] pOptionValue Buffer containing the option value
@param [in] OptionLength Length of the buffer in bytes
@retval EFI_SUCCESS - Option successfully set
**/
typedef
(* PFN_API_OPTION_SET) (
IN int OptionName,
);
/**
Free a receive packet
This routine performs the network specific operations necessary
to free a receive packet.
This routine is called by ::EslSocketPortCloseTxDone to free a
receive packet.
@param [in] pPacket Address of an ::ESL_PACKET structure.
@param [in, out] pRxBytes Address of the count of RX bytes
**/
typedef
(* PFN_API_PACKET_FREE) (
);
/**
Initialize the network specific portions of an ::ESL_PORT structure.
This routine initializes the network specific portions of an
::ESL_PORT structure for use by the socket.
This support routine is called by ::EslSocketPortAllocate
to connect the socket with the underlying network adapter
running the IPv4 protocol.
@param [in] ppPort Address of an ESL_PORT structure
@param [in] DebugFlags Flags for debug messages
@retval EFI_SUCCESS - Socket successfully created
**/
typedef
(* PFN_API_PORT_ALLOC) (
);
/**
Close a network specific port.
This routine releases the resources allocated by the
network specific PortAllocate routine.
This routine is called by ::EslSocketPortCloseRxDone as
the last step of closing processing.
See the \ref PortCloseStateMachine section.
@param [in] pPort Address of an ::ESL_PORT structure.
@retval EFI_SUCCESS The port is closed
@retval other Port close error
**/
typedef
(* PFN_API_PORT_CLOSE) (
);
/**
Perform the network specific close operation on the port.
This routine performs the network specific operation to
shutdown receive operations on the port.
This routine is called by the ::EslSocketPortCloseTxDone
routine after the port completes all of the transmission.
@param [in] pPort Address of an ::ESL_PORT structure.
@retval EFI_SUCCESS The port is closed, not normally returned
@retval EFI_NOT_READY The port is still closing
@retval EFI_ALREADY_STARTED Error, the port is in the wrong state,
most likely the routine was called already.
**/
typedef
(* PFN_API_PORT_CLOSE_OP) (
);
/**
Receive data from a network connection.
This routine attempts to return buffered data to the caller. The
data is removed from the urgent queue if the message flag MSG_OOB
is specified, otherwise data is removed from the normal queue.
See the \ref ReceiveEngine section.
This routine is called by ::EslSocketReceive to handle the network
specific receive operation.
@param [in] pPort Address of an ::ESL_PORT structure.
@param [in] pPacket Address of an ::ESL_PACKET structure.
@param [in] pbConsumePacket Address of a BOOLEAN indicating if the packet is to be consumed
@param [in] BufferLength Length of the the buffer
@param [in] pBuffer Address of a buffer to receive the data.
@param [in] pDataLength Number of received data bytes in the buffer.
@param [out] pAddress Network address to receive the remote system address
@param [out] pSkipBytes Address to receive the number of bytes skipped
@return Returns the address of the next free byte in the buffer.
**/
typedef
UINT8 *
(* PFN_API_RECEIVE) (
);
/**
Get the remote socket address
@param [in] pPort Address of an ::ESL_PORT structure.
@param [out] pAddress Network address to receive the remote system address
**/
typedef
(* PFN_API_REMOTE_ADDR_GET) (
);
/**
Set the remote address
This routine sets the remote address in the port.
This routine is called by ::EslSocketConnect to specify the
remote network address.
@param [in] pPort Address of an ::ESL_PORT structure.
@param [in] pSockAddr Network address of the remote system.
@param [in] SockAddrLength Length in bytes of the network address.
@retval EFI_SUCCESS The operation was successful
**/
typedef
(* PFN_API_REMOTE_ADDR_SET) (
);
/**
Start a receive operation
This routine prepares a packet for the receive operation.
See the \ref ReceiveEngine section.
This support routine is called by EslSocketRxStart.
@param [in] pPort Address of an ::ESL_PORT structure.
@param [in] pIo Address of an ::ESL_IO_MGMT structure.
**/
typedef
(* PFN_API_RX_START) (
);
/**
Buffer data for transmission over a network connection.
@param [in] pSocket Address of a ESL_SOCKET structure
@param [in] Flags Message control flags
@param [in] BufferLength Length of the the buffer
@param [in] pBuffer Address of a buffer to receive the data.
@param [in] pDataLength Number of received data bytes in the buffer.
@param [in] pAddress Network address of the remote system address
@param [in] AddressLength Length of the remote network address structure
@retval EFI_SUCCESS - Socket data successfully buffered
**/
typedef
(* PFN_API_TRANSMIT) (
);
/**
Process the transmit completion
This routine calls ::EslSocketTxComplete to handle the
transmit completion.
This routine is called by the network layers upon the completion
of a transmit operation.
@param [in] Event The urgent transmit completion event
@param [in] pIo The ESL_IO_MGMT structure address
**/
typedef
(* PFN_API_TX_COMPLETE) (
);
/**
Socket type control structure
This driver uses this structure to define the API for the socket type.
**/
typedef struct {
int DefaultProtocol; ///< Default protocol
int BindTestErrno; ///< errno value if EslSocketBindTest fails
/**
Socket control structure
The driver uses this structure to manage the socket.
**/
typedef struct _ESL_SOCKET {
//
// Protocol binding
//
//
// Socket management
//
int errno; ///< Error information for this socket
//
// Socket options
//
//
// Socket data
//
int Domain; ///< Specifies family of protocols
int Type; ///< Specifies how to make network connection
int Protocol; ///< Specifies lower layer protocol to use
//
// Pending connection data
//
//
// Network use
//
//
// Receive data management
//
//
// Transmit data management
//
#define SOCKET_FROM_PROTOCOL(a) CR (a, ESL_SOCKET, SocketProtocol, SOCKET_SIGNATURE) ///< Locate ESL_SOCKET from protocol
/**
Socket layer control structure
The driver uses this structure to manage the driver.
**/
typedef struct {
//
// Service binding interface
//
//
// Image data
//
//
// Network services
//
//
// Socket management
//
} ESL_LAYER;
#define LAYER_FROM_SERVICE(a) CR (a, ESL_LAYER, ServiceBinding, LAYER_SIGNATURE) ///< Locate ESL_LAYER from service binding
//------------------------------------------------------------------------------
// Data
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
// Socket Support Routines
//------------------------------------------------------------------------------
/**
Allocate and initialize a ESL_SOCKET structure.
This support function allocates an ::ESL_SOCKET structure
and installs a protocol on ChildHandle. If pChildHandle is a
pointer to NULL, then a new handle is created and returned in
pChildHandle. If pChildHandle is not a pointer to NULL, then
the protocol installs on the existing pChildHandle.
@param [in, out] pChildHandle Pointer to the handle of the child to create.
If it is NULL, then a new handle is created.
If it is a pointer to an existing UEFI handle,
then the protocol is added to the existing UEFI
handle.
@param [in] DebugFlags Flags for debug messages
@param [in, out] ppSocket The buffer to receive an ::ESL_SOCKET structure address.
@retval EFI_SUCCESS The protocol was added to ChildHandle.
@retval EFI_INVALID_PARAMETER ChildHandle is NULL.
@retval EFI_OUT_OF_RESOURCES There are not enough resources available to create
the child
@retval other The child handle was not created
**/
);
/**
Test the bind configuration.
@param [in] pPort Address of the ::ESL_PORT structure.
@param [in] ErrnoValue errno value if test fails
@retval EFI_SUCCESS The connection was successfully established.
@retval Others The connection attempt failed.
**/
IN int ErrnoValue
);
/**
Copy a fragmented buffer into a destination buffer.
This support routine copies a fragmented buffer to the caller specified buffer.
This routine is called by ::EslIp4Receive and ::EslUdp4Receive.
@param [in] FragmentCount Number of fragments in the table
@param [in] pFragmentTable Address of an EFI_IP4_FRAGMENT_DATA structure
@param [in] BufferLength Length of the the buffer
@param [in] pBuffer Address of a buffer to receive the data.
@param [in] pDataLength Number of received data bytes in the buffer.
@return Returns the address of the next free byte in the buffer.
**/
UINT8 *
);
/**
Free the ESL_IO_MGMT event and structure
This support routine walks the free list to close the event in
the ESL_IO_MGMT structure and remove the structure from the free
list.
See the \ref TransmitEngine section.
@param [in] pPort Address of an ::ESL_PORT structure
@param [in] ppFreeQueue Address of the free queue head
@param [in] DebugFlags Flags for debug messages
@param [in] pEventName Zero terminated string containing the event name
@retval EFI_SUCCESS - The structures were properly initialized
**/
);
/**
Initialize the ESL_IO_MGMT structures
This support routine initializes the ESL_IO_MGMT structure and
places them on to a free list.
This routine is called by the PortAllocate routines to prepare
the transmit engines. See the \ref TransmitEngine section.
@param [in] pPort Address of an ::ESL_PORT structure
@param [in, out] ppIo Address containing the first structure address. Upon
return this buffer contains the next structure address.
@param [in] TokenCount Number of structures to initialize
@param [in] ppFreeQueue Address of the free queue head
@param [in] DebugFlags Flags for debug messages
@param [in] pEventName Zero terminated string containing the event name
@param [in] pfnCompletion Completion routine address
@retval EFI_SUCCESS - The structures were properly initialized
**/
);
/**
Determine if the socket is configured
This support routine is called to determine if the socket if the
configuration call was made to the network layer. The following
routines call this routine to verify that they may be successful
in their operations:
<ul>
<li>::EslSocketGetLocalAddress</li>
<li>::EslSocketGetPeerAddress</li>
<li>::EslSocketPoll</li>
<li>::EslSocketReceive</li>
<li>::EslSocketTransmit</li>
</ul>
@param [in] pSocket Address of an ::ESL_SOCKET structure
@retval EFI_SUCCESS - The socket is configured
**/
);
/**
Allocate a packet for a receive or transmit operation
This support routine is called by ::EslSocketRxStart and the
network specific TxBuffer routines to get buffer space for the
next operation.
@param [in] ppPacket Address to receive the ::ESL_PACKET structure
@param [in] LengthInBytes Length of the packet structure
@param [in] ZeroBytes Length of packet to zero
@param [in] DebugFlags Flags for debug messages
@retval EFI_SUCCESS - The packet was allocated successfully
**/
);
/**
Free a packet used for receive or transmit operation
This support routine is called by the network specific Close
and TxComplete routines and during error cases in RxComplete
and TxBuffer. Note that the network layers typically place
receive packets on the ESL_SOCKET::pRxFree list for reuse.
@param [in] pPacket Address of an ::ESL_PACKET structure
@param [in] DebugFlags Flags for debug messages
@retval EFI_SUCCESS - The packet was allocated successfully
**/
);
/**
Allocate and initialize a ESL_PORT structure.
This routine initializes an ::ESL_PORT structure for use by
the socket. This routine calls a routine via
ESL_PROTOCOL_API::pfnPortAllocate to initialize the network
specific resources. The resources are released later by the
\ref PortCloseStateMachine.
This support routine is called by ::EslSocketBind and
::EslTcp4ListenComplete to connect the socket with the
underlying network adapter to the socket.
@param [in] pSocket Address of an ::ESL_SOCKET structure.
@param [in] pService Address of an ::ESL_SERVICE structure.
@param [in] ChildHandle TCP4 child handle
@param [in] pSockAddr Address of a sockaddr structure that contains the
connection point on the local machine. An IPv4 address
of INADDR_ANY specifies that the connection is made to
all of the network stacks on the platform. Specifying a
specific IPv4 address restricts the connection to the
network stack supporting that address. Specifying zero
for the port causes the network layer to assign a port
number from the dynamic range. Specifying a specific
port number causes the network layer to use that port.
@param [in] bBindTest TRUE if EslSocketBindTest should be called
@param [in] DebugFlags Flags for debug messages
@param [out] ppPort Buffer to receive new ::ESL_PORT structure address
@retval EFI_SUCCESS - Socket successfully created
**/
);
/**
Close a port.
This routine releases the resources allocated by ::EslSocketPortAllocate.
This routine calls ESL_PROTOCOL_API::pfnPortClose to release the network
specific resources.
This routine is called by:
<ul>
<li>::EslIp4PortAllocate - Port initialization failure</li>
<li>::EslSocketPortCloseRxDone - Last step of close processing</li>
<li>::EslTcp4ConnectComplete - Connection failure and reducint the port list to a single port</li>
<li>::EslTcp4PortAllocate - Port initialization failure</li>
<li>::EslUdp4PortAllocate - Port initialization failure</li>
</ul>
See the \ref PortCloseStateMachine section.
@param [in] pPort Address of an ::ESL_PORT structure.
@retval EFI_SUCCESS The port is closed
@retval other Port close error
**/
);
/**
Process the port close completion event
This routine attempts to complete the port close operation.
This routine is called by the TCP layer upon completion of
the close operation.
See the \ref PortCloseStateMachine section.
@param [in] Event The close completion event
@param [in] pPort Address of an ::ESL_PORT structure.
**/
);
/**
Port close state 3
This routine determines the state of the receive operations and
continues the close operation after the pending receive operations
are cancelled.
This routine is called by
<ul>
<li>::EslIp4RxComplete</li>
<li>::EslSocketPortCloseComplete</li>
<li>::EslSocketPortCloseTxDone</li>
<li>::EslUdp4RxComplete</li>
</ul>
to determine the state of the receive operations.
See the \ref PortCloseStateMachine section.
@param [in] pPort Address of an ::ESL_PORT structure.
@retval EFI_SUCCESS The port is closed
@retval EFI_NOT_READY The port is still closing
@retval EFI_ALREADY_STARTED Error, the port is in the wrong state,
most likely the routine was called already.
**/
);
/**
Start the close operation on a port, state 1.
This routine marks the port as closed and initiates the \ref
PortCloseStateMachine. The first step is to allow the \ref
TransmitEngine to run down.
This routine is called by ::EslSocketCloseStart to initiate the socket
network specific close operation on the socket.
@param [in] pPort Address of an ::ESL_PORT structure.
@param [in] bCloseNow Set TRUE to abort active transfers
@param [in] DebugFlags Flags for debug messages
@retval EFI_SUCCESS The port is closed, not normally returned
@retval EFI_NOT_READY The port has started the closing process
@retval EFI_ALREADY_STARTED Error, the port is in the wrong state,
most likely the routine was called already.
**/
);
/**
Port close state 2
This routine determines the state of the transmit engine and
continue the close operation after the transmission is complete.
The next step is to stop the \ref ReceiveEngine.
See the \ref PortCloseStateMachine section.
This routine is called by ::EslSocketPortCloseStart to determine
if the transmission is complete.
@param [in] pPort Address of an ::ESL_PORT structure.
@retval EFI_SUCCESS The port is closed, not normally returned
@retval EFI_NOT_READY The port is still closing
@retval EFI_ALREADY_STARTED Error, the port is in the wrong state,
most likely the routine was called already.
**/
);
/**
Cancel the receive operations
This routine cancels a pending receive operation.
See the \ref ReceiveEngine section.
This routine is called by ::EslSocketShutdown when the socket
layer is being shutdown.
@param [in] pPort Address of an ::ESL_PORT structure
@param [in] pIo Address of an ::ESL_IO_MGMT structure
**/
);
/**
Process the receive completion
This routine queues the data in FIFO order in either the urgent
or normal data queues depending upon the type of data received.
See the \ref ReceiveEngine section.
This routine is called when some data is received by:
<ul>
<li>::EslIp4RxComplete</li>
<li>::EslTcp4RxComplete</li>
<li>::EslUdp4RxComplete</li>
</ul>
@param [in] pIo Address of an ::ESL_IO_MGMT structure
@param [in] Status Receive status
@param [in] LengthInBytes Length of the receive data
@param [in] bUrgent TRUE if urgent data is received and FALSE
for normal data.
**/
);
/**
Start a receive operation
This routine posts a receive buffer to the network adapter.
See the \ref ReceiveEngine section.
This support routine is called by:
<ul>
<li>::EslIp4Receive to restart the receive engine to release flow control.</li>
<li>::EslIp4RxComplete to continue the operation of the receive engine if flow control is not being applied.</li>
<li>::EslIp4SocketIsConfigured to start the recevie engine for the new socket.</li>
<li>::EslTcp4ListenComplete to start the recevie engine for the new socket.</li>
<li>::EslTcp4Receive to restart the receive engine to release flow control.</li>
<li>::EslTcp4RxComplete to continue the operation of the receive engine if flow control is not being applied.</li>
<li>::EslUdp4Receive to restart the receive engine to release flow control.</li>
<li>::EslUdp4RxComplete to continue the operation of the receive engine if flow control is not being applied.</li>
<li>::EslUdp4SocketIsConfigured to start the recevie engine for the new socket.</li>
</ul>
@param [in] pPort Address of an ::ESL_PORT structure.
**/
);
/**
Complete the transmit operation
This support routine handles the transmit completion processing for
the various network layers. It frees the ::ESL_IO_MGMT structure
and and frees packet resources by calling ::EslSocketPacketFree.
Transmit errors are logged in ESL_SOCKET::TxError.
See the \ref TransmitEngine section.
This routine is called by:
<ul>
<li>::EslIp4TxComplete</li>
<li>::EslTcp4TxComplete</li>
<li>::EslTcp4TxOobComplete</li>
<li>::EslUdp4TxComplete</li>
</ul>
@param [in] pIo Address of an ::ESL_IO_MGMT structure
@param [in] LengthInBytes Length of the data in bytes
@param [in] Status Transmit operation status
@param [in] pQueueType Zero terminated string describing queue type
@param [in] ppQueueHead Transmit queue head address
@param [in] ppQueueTail Transmit queue tail address
@param [in] ppActive Active transmit queue address
@param [in] ppFree Free transmit queue address
**/
);
/**
Transmit data using a network connection.
This support routine starts a transmit operation on the
underlying network layer.
The network specific code calls this routine to start a
transmit operation. See the \ref TransmitEngine section.
@param [in] pPort Address of an ::ESL_PORT structure
@param [in] ppQueueHead Transmit queue head address
@param [in] ppQueueTail Transmit queue tail address
@param [in] ppActive Active transmit queue address
@param [in] ppFree Free transmit queue address
**/
);
//------------------------------------------------------------------------------
#endif // _SOCKET_H_