NetworkPkg/TcpDxe/SockImpl.h File Reference


Defines

#define SIGNAL_TOKEN(Token, TokenStatus)
#define SOCK_HEADER_SPACE   (60 + 60 + 72)

Functions

EFI_STATUS SockProcessTcpSndData (IN SOCKET *Sock, IN VOID *TcpTxData)
UINT32 SockProcessRcvToken (IN OUT SOCKET *Sock, IN OUT SOCK_IO_TOKEN *RcvToken)
VOID SockConnFlush (IN OUT SOCKET *Sock)
SOCKETSockCreate (IN SOCK_INIT_DATA *SockInitData)
VOID SockDestroy (IN OUT SOCKET *Sock)

Detailed Description

The function declaration that provided for Socket Interface.

Copyright (c) 2009 - 2010, 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.

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


Define Documentation

#define SIGNAL_TOKEN ( Token,
TokenStatus   ) 

Value:

do { \
    (Token)->Status = (TokenStatus); \
    gBS->SignalEvent ((Token)->Event); \
  } while (0)
Signal a event with the given status.

Parameters:
[in] Token The token's event is to be signaled.
[in] TokenStatus The status to be sent with the event.

Referenced by SockAccept(), SockConnClosed(), SockConnFlush(), SockDataSent(), SockFlushPendingToken(), SockProcessRcvToken(), SockProcessSndToken(), SockRcv(), SockWakeConnToken(), and SockWakeListenToken().

#define SOCK_HEADER_SPACE   (60 + 60 + 72)


Function Documentation

VOID SockConnFlush ( IN OUT SOCKET Sock  ) 

Flush the sndBuffer and rcvBuffer of socket.

Parameters:
[in,out] Sock Pointer to the socket.

References SIGNAL_TOKEN, SOCK_IS_LISTENING, SockDestroyChild(), and SockFlushPendingToken().

Referenced by SockConnClosed(), SockDestroy(), SockDestroyChild(), and SockFlush().

SOCKET* SockCreate ( IN SOCK_INIT_DATA SockInitData  ) 

Create a socket with initial data SockInitData.

Parameters:
[in] SockInitData Pointer to the initial data of the socket.
Returns:
Pointer to the newly created socket, return NULL when exception occured.
Create a socket with initial data SockInitData.

Parameters:
[in] SockInitData Pointer to the initial data of the socket.
Returns:
Pointer to the newly created socket, return NULL when an exception occurs.

References _TCP_SOCKET::BackLog, _TCP_SOCKET::ConnCnt, _TCP_SOCKET::ConnectionList, _TCP_SOCKET::Context, _TCP_SOCKET::CreateCallback, _SOCK_BUFFER::DataQueue, _TCP_SOCKET::DestroyCallback, _TCP_SOCKET::DriverBinding, _SOCK_BUFFER::HighWater, _TCP_SOCKET::IpVersion, _TCP_SOCKET::Link, _TCP_SOCKET::ListenTokenList, _TCP_SOCKET::Lock, _SOCK_BUFFER::LowWater, _TCP_SOCKET::NetProtocol, _TCP_SOCKET::Parent, _TCP_SOCKET::ProcessingSndTokenList, PROTO_RESERVED_LEN, _TCP_SOCKET::ProtoHandler, _TCP_SOCKET::ProtoReserved, _TCP_SOCKET::RcvBuffer, _TCP_SOCKET::RcvTokenList, _TCP_SOCKET::Signature, _TCP_SOCKET::SndBuffer, _TCP_SOCKET::SndTokenList, SOCK_BUFF_LOW_WATER, SOCK_IS_LISTENING, SOCK_SIGNATURE, _TCP_SOCKET::SockError, _TCP_SOCKET::SockHandle, SockStream, _TCP_SOCKET::State, and _TCP_SOCKET::Type.

Referenced by SockClone(), and SockCreateChild().

VOID SockDestroy ( IN OUT SOCKET Sock  ) 

Destroy a socket.

Parameters:
[in,out] Sock Pointer to the socket.

References SO_CLOSED, SO_UNCONFIGURED, SOCK_IS_UNCONFIGURED, SockConnFlush(), SockSetState(), and SockStream.

Referenced by SockCreateChild(), and SockDestroyChild().

UINT32 SockProcessRcvToken ( IN OUT SOCKET Sock,
IN OUT SOCK_IO_TOKEN RcvToken 
)

Get received data from the socket layer to the receive token.

Parameters:
[in,out] Sock Pointer to the socket.
[in,out] RcvToken Pointer to the application provided receive token.
Returns:
The length of data received in this token.

References SIGNAL_TOKEN, SockSetTcpRxData(), SockStream, and SockTcpDataToRcv().

Referenced by SockRcv(), and SockWakeRcvToken().

EFI_STATUS SockProcessTcpSndData ( IN SOCKET Sock,
IN VOID *  TcpTxData 
)

Process the TCP send data, buffer the tcp txdata and append the buffer to socket send buffer, then try to send it.

Parameters:
[in] Sock Pointer to the socket.
[in] TcpTxData Pointer to the application provided send buffer.
Return values:
EFI_SUCCESS The operation completed successfully.
EFI_OUT_OF_RESOURCES Failed due to resource limits.
Process the TCP send data, buffer the tcp txdata, and append the buffer to socket send buffer, then try to send it.

Parameters:
[in] Sock Pointer to the socket.
[in] TcpTxData Pointer to the application provided send buffer.
Return values:
EFI_SUCCESS The operation completed successfully.
EFI_OUT_OF_RESOURCES Failed due to resource limits.

References SOCK_SND, SOCK_SNDPUSH, SOCK_SNDURG, and SockFreeFoo().

Referenced by SockProcessSndToken(), and SockSend().


Generated on Mon Sep 28 08:49:06 2015 for NetworkPkg[ALL] by  doxygen 1.5.7.1