TianoCore EDK2 master
|
#include <Uefi.h>
#include <Library/TcpIoLib.h>
#include <Library/BaseLib.h>
#include <Library/DebugLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/BaseMemoryLib.h>
Go to the source code of this file.
Functions | |
VOID EFIAPI | TcpIoCommonNotify (IN EFI_EVENT Event, IN VOID *Context) |
EFI_STATUS | TcpIoGetMapping (IN EFI_TCP6_PROTOCOL *Tcp6, IN EFI_TCP6_CONFIG_DATA *Tcp6ConfigData) |
EFI_STATUS EFIAPI | TcpIoCreateSocket (IN EFI_HANDLE Image, IN EFI_HANDLE Controller, IN UINT8 TcpVersion, IN TCP_IO_CONFIG_DATA *ConfigData, OUT TCP_IO *TcpIo) |
VOID EFIAPI | TcpIoDestroySocket (IN TCP_IO *TcpIo) |
EFI_STATUS EFIAPI | TcpIoConnect (IN OUT TCP_IO *TcpIo, IN EFI_EVENT Timeout OPTIONAL) |
EFI_STATUS EFIAPI | TcpIoAccept (IN OUT TCP_IO *TcpIo, IN EFI_EVENT Timeout OPTIONAL) |
VOID EFIAPI | TcpIoReset (IN OUT TCP_IO *TcpIo) |
EFI_STATUS EFIAPI | TcpIoTransmit (IN TCP_IO *TcpIo, IN NET_BUF *Packet) |
EFI_STATUS EFIAPI | TcpIoReceive (IN OUT TCP_IO *TcpIo, IN NET_BUF *Packet, IN BOOLEAN AsyncMode, IN EFI_EVENT Timeout OPTIONAL) |
This library is used to share code between UEFI network stack modules. It provides the helper routines to access TCP service.
Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file DxeTcpIoLib.c.
Accept the incomding request from the other endpoint of the TCP socket.
[in,out] | TcpIo | The TcpIo wrapping the TCP socket. |
[in] | Timeout | The time to wait for connection done. Set to NULL for infinite wait. |
EFI_SUCCESS | Connect to the other endpoint of the TCP socket successfully. |
EFI_INVALID_PARAMETER | One or more parameters are invalid. |
EFI_UNSUPPORTED | One or more of the control options are not supported in the implementation. |
EFI_TIMEOUT | Failed to connect to the other endpoint of the TCP socket in the specified time period. |
Others | Other errors as indicated. |
Definition at line 609 of file DxeTcpIoLib.c.
The common notify function associated with various TcpIo events.
[in] | Event | The event signaled. |
[in] | Context | The context. |
Definition at line 28 of file DxeTcpIoLib.c.
Connect to the other endpoint of the TCP socket.
[in,out] | TcpIo | The TcpIo wrapping the TCP socket. |
[in] | Timeout | The time to wait for connection done. Set to NULL for infinite wait. |
EFI_SUCCESS | Connect to the other endpoint of the TCP socket successfully. |
EFI_TIMEOUT | Failed to connect to the other endpoint of the TCP socket in the specified time period. |
EFI_INVALID_PARAMETER | One or more parameters are invalid. |
EFI_UNSUPPORTED | One or more of the control options are not supported in the implementation. |
Others | Other errors as indicated. |
Definition at line 534 of file DxeTcpIoLib.c.
EFI_STATUS EFIAPI TcpIoCreateSocket | ( | IN EFI_HANDLE | Image, |
IN EFI_HANDLE | Controller, | ||
IN UINT8 | TcpVersion, | ||
IN TCP_IO_CONFIG_DATA * | ConfigData, | ||
OUT TCP_IO * | TcpIo | ||
) |
Create a TCP socket with the specified configuration data.
[in] | Image | The handle of the driver image. |
[in] | Controller | The handle of the controller. |
[in] | TcpVersion | The version of Tcp, TCP_VERSION_4 or TCP_VERSION_6. |
[in] | ConfigData | The Tcp configuration data. |
[out] | TcpIo | The TcpIo. |
EFI_SUCCESS | The TCP socket is created and configured. |
EFI_INVALID_PARAMETER | One or more parameters are invalid. |
EFI_UNSUPPORTED | One or more of the control options are not supported in the implementation. |
EFI_OUT_OF_RESOURCES | Failed to allocate memory. |
Others | Failed to create the TCP socket or configure it. |
Definition at line 125 of file DxeTcpIoLib.c.
Destroy the socket.
[in] | TcpIo | The TcpIo which wraps the socket to be destroyed. |
Definition at line 397 of file DxeTcpIoLib.c.
EFI_STATUS TcpIoGetMapping | ( | IN EFI_TCP6_PROTOCOL * | Tcp6, |
IN EFI_TCP6_CONFIG_DATA * | Tcp6ConfigData | ||
) |
The internal function for delay configuring TCP6 when IP6 driver is still in DAD.
[in] | Tcp6 | The EFI_TCP6_PROTOCOL protocol instance. |
[in] | Tcp6ConfigData | The Tcp6 configuration data. |
EFI_SUCCESS | The operational settings successfully completed. |
EFI_INVALID_PARAMETER | One or more parameters are invalid. |
Others | Failed to finish the operation. |
Definition at line 53 of file DxeTcpIoLib.c.
EFI_STATUS EFIAPI TcpIoReceive | ( | IN OUT TCP_IO * | TcpIo, |
IN NET_BUF * | Packet, | ||
IN BOOLEAN | AsyncMode, | ||
IN EFI_EVENT Timeout | OPTIONAL | ||
) |
Receive data from the socket.
[in,out] | TcpIo | The TcpIo which wraps the socket to be destroyed. |
[in] | Packet | The buffer to hold the data copy from the socket rx buffer. |
[in] | AsyncMode | Is this receive asynchronous or not. |
[in] | Timeout | The time to wait for receiving the amount of data the Packet can hold. Set to NULL for infinite wait. |
EFI_SUCCESS | The required amount of data is received from the socket. |
EFI_INVALID_PARAMETER | One or more parameters are invalid. |
EFI_DEVICE_ERROR | An unexpected network or system error occurred. |
EFI_OUT_OF_RESOURCES | Failed to allocate memory. |
EFI_TIMEOUT | Failed to receive the required amount of data in the specified time period. |
Others | Other errors as indicated. |
Definition at line 872 of file DxeTcpIoLib.c.
Reset the socket.
[in,out] | TcpIo | The TcpIo wrapping the TCP socket. |
Definition at line 694 of file DxeTcpIoLib.c.
EFI_STATUS EFIAPI TcpIoTransmit | ( | IN TCP_IO * | TcpIo, |
IN NET_BUF * | Packet | ||
) |
Transmit the Packet to the other endpoint of the socket.
[in] | TcpIo | The TcpIo wrapping the TCP socket. |
[in] | Packet | The packet to transmit. |
EFI_SUCCESS | The packet is transmitted. |
EFI_INVALID_PARAMETER | One or more parameters are invalid. |
EFI_UNSUPPORTED | One or more of the control options are not supported in the implementation. |
EFI_OUT_OF_RESOURCES | Failed to allocate memory. |
EFI_DEVICE_ERROR | An unexpected network or system error occurred. |
Others | Other errors as indicated. |
Definition at line 752 of file DxeTcpIoLib.c.