TianoCore EDK2 master
Loading...
Searching...
No Matches
TcpIo.c File Reference
#include "TcpMain.h"

Go to the source code of this file.

Functions

VOID EFIAPI TcpRxCallback (IN EFI_STATUS Status, IN UINT8 IcmpErr, IN EFI_NET_SESSION_DATA *NetSession, IN NET_BUF *Pkt, IN VOID *Context OPTIONAL)
 
INTN TcpSendIpPacket (IN TCP_CB *Tcb, IN NET_BUF *Nbuf, IN EFI_IP_ADDRESS *Src, IN EFI_IP_ADDRESS *Dest, IN UINT8 Version)
 
EFI_STATUS Tcp6RefreshNeighbor (IN TCP_CB *Tcb, IN EFI_IP_ADDRESS *Neighbor, IN UINT32 Timeout)
 

Detailed Description

Implementation of I/O interfaces between TCP and IpIoLib.

Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.

SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file TcpIo.c.

Function Documentation

◆ Tcp6RefreshNeighbor()

EFI_STATUS Tcp6RefreshNeighbor ( IN TCP_CB Tcb,
IN EFI_IP_ADDRESS Neighbor,
IN UINT32  Timeout 
)

Refresh the remote peer's Neighbor Cache State if already exists.

Parameters
[in]TcbPointer to the TCP_CB of this TCP instance.
[in]NeighborSource address of the TCP segment.
[in]TimeoutTime in 100-ns units that this entry will remain in the neighbor cache. A value of zero means that the entry is permanent. A value of non-zero means that the entry is dynamic and will be deleted after Timeout.
Return values
EFI_SUCCESSSuccessfully updated the neighbor relationship.
EFI_NOT_STARTEDThe IpIo is not configured.
EFI_INVALID_PARAMETERAny input parameter is invalid.
EFI_OUT_OF_RESOURCESFailed to allocate some resources.
EFI_NOT_FOUNDThis entry is not in the neighbor table.

Definition at line 157 of file TcpIo.c.

◆ TcpRxCallback()

VOID EFIAPI TcpRxCallback ( IN EFI_STATUS  Status,
IN UINT8  IcmpErr,
IN EFI_NET_SESSION_DATA NetSession,
IN NET_BUF Pkt,
IN VOID *Context  OPTIONAL 
)

Packet receive callback function provided to IP_IO, used to call the proper function to handle the packet received by IP.

Parameters
[in]StatusResult of the receive request.
[in]IcmpErrValid when Status is EFI_ICMP_ERROR.
[in]NetSessionThe IP session for the received packet.
[in]PktPacket received.
[in]ContextThe data provided by the user for the received packet when the callback is registered in IP_IO_OPEN_DATA::RcvdContext. This is an optional parameter that may be NULL.

Definition at line 27 of file TcpIo.c.

◆ TcpSendIpPacket()

INTN TcpSendIpPacket ( IN TCP_CB Tcb,
IN NET_BUF Nbuf,
IN EFI_IP_ADDRESS Src,
IN EFI_IP_ADDRESS Dest,
IN UINT8  Version 
)

Send the segment to IP via IpIo function.

Parameters
[in]TcbPointer to the TCP_CB of this TCP instance.
[in]NbufPointer to the TCP segment to be sent.
[in]SrcSource address of the TCP segment.
[in]DestDestination address of the TCP segment.
[in]VersionIP_VERSION_4 or IP_VERSION_6
Return values
0The segment was sent out successfully.
-1The segment failed to send.

Definition at line 62 of file TcpIo.c.