+++ /dev/null
-/** @file\r
- Socket implementation header file.\r
-\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
-http://opensource.org/licenses/bsd-license.php<BR>\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
-**/\r
-\r
-#ifndef _SOCK_IMPL_H_\r
-#define _SOCK_IMPL_H_\r
-\r
-#include "Socket.h"\r
-#include "Tcp4Main.h"\r
-\r
-/**\r
- Signal a event with the given status.\r
-\r
- @param Token The token's event is to be signaled.\r
- @param TokenStatus The status to be sent with the event.\r
-\r
-**/\r
-#define SIGNAL_TOKEN(Token, TokenStatus) \\r
- do { \\r
- (Token)->Status = (TokenStatus); \\r
- gBS->SignalEvent ((Token)->Event); \\r
- } while (0)\r
-\r
-\r
-/**\r
- Supporting function for both SockImpl and SockInterface.\r
-\r
- @param Event The Event this notify function registered to, ignored.\r
-\r
-**/\r
-VOID\r
-EFIAPI\r
-SockFreeFoo (\r
- IN EFI_EVENT Event\r
- );\r
-\r
-/**\r
- Process the TCP send data, buffer the tcp txdata and append\r
- the buffer to socket send buffer,then try to send it.\r
-\r
- @param Sock Pointer to the socket.\r
- @param TcpTxData Pointer to the tcp txdata.\r
-\r
- @retval EFI_SUCCESS The operation is completed successfully.\r
- @retval EFI_OUT_OF_RESOURCES Failed due to resource limit.\r
-\r
-**/\r
-EFI_STATUS\r
-SockProcessTcpSndData (\r
- IN SOCKET *Sock,\r
- IN VOID *TcpTxData\r
- );\r
-\r
-/**\r
- Copy data from socket buffer to application provided receive buffer.\r
-\r
- @param Sock Pointer to the socket.\r
- @param TcpRxData Pointer to the application provided receive buffer.\r
- @param RcvdBytes The maximum length of the data can be copied.\r
- @param IsOOB If TRUE the data is OOB, else the data is normal.\r
-\r
-**/\r
-VOID\r
-SockSetTcpRxData (\r
- IN SOCKET *Sock,\r
- IN VOID *TcpRxData,\r
- IN UINT32 RcvdBytes,\r
- IN BOOLEAN IsOOB\r
- );\r
-\r
-/**\r
- Get received data from the socket layer to the receive token.\r
-\r
- @param Sock Pointer to the socket.\r
- @param RcvToken Pointer to the application provided receive token.\r
-\r
- @return The length of data received in this token.\r
-\r
-**/\r
-UINT32\r
-SockProcessRcvToken (\r
- IN SOCKET *Sock,\r
- IN OUT SOCK_IO_TOKEN *RcvToken\r
- );\r
-\r
-/**\r
- Flush the socket.\r
-\r
- @param Sock Pointer to the socket.\r
-\r
-**/\r
-VOID\r
-SockConnFlush (\r
- IN OUT SOCKET *Sock\r
- );\r
-\r
-/**\r
- Create a socket with initial data SockInitData.\r
-\r
- @param SockInitData Pointer to the initial data of the socket.\r
-\r
- @return Pointer to the newly created socket.\r
-\r
-**/\r
-SOCKET *\r
-SockCreate (\r
- IN SOCK_INIT_DATA *SockInitData\r
- );\r
-\r
-/**\r
- Destroy a socket.\r
-\r
- @param Sock Pointer to the socket.\r
-\r
-**/\r
-VOID\r
-SockDestroy (\r
- IN OUT SOCKET *Sock\r
- );\r
-\r
-#endif\r