TianoCore EDK2 master
Loading...
Searching...
No Matches
FastbootTransportTcp.c File Reference

Go to the source code of this file.

Data Structures

struct  _FASTBOOT_TCP_PACKET_LIST
 

Macros

#define IP4_ADDR_TO_STRING(IpAddr, IpAddrString)
 
#define RX_FRAGMENT_SIZE   2048
 
#define NUM_RX_TOKENS   16
 
#define TOKEN_NEXT(Index)   (((Index) + 1) % NUM_RX_TOKENS)
 

Typedefs

typedef struct _FASTBOOT_TCP_PACKET_LIST FASTBOOT_TCP_PACKET_LIST
 

Functions

STATIC VOID EFIAPI DataReceived (IN EFI_EVENT Event, IN VOID *Context)
 
STATIC EFI_STATUS SubmitRecieveToken (VOID)
 
STATIC VOID ConnectionClosed (IN EFI_EVENT Event, IN VOID *Context)
 
STATIC VOID CloseReceiveEvents (VOID)
 
STATIC VOID EFIAPI ConnectionAccepted (IN EFI_EVENT Event, IN VOID *Context)
 
EFI_STATUS TcpFastbootTransportStart (EFI_EVENT ReceiveEvent)
 
EFI_STATUS TcpFastbootTransportStop (VOID)
 
STATIC VOID DataSent (EFI_EVENT Event, VOID *Context)
 
EFI_STATUS TcpFastbootTransportSend (IN UINTN BufferSize, IN CONST VOID *Buffer, IN EFI_EVENT *FatalErrorEvent)
 
EFI_STATUS TcpFastbootTransportReceive (OUT UINTN *BufferSize, OUT VOID **Buffer)
 
EFI_STATUS TcpFastbootTransportEntryPoint (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 

Variables

STATIC EFI_SIMPLE_TEXT_OUTPUT_PROTOCOLmTextOut
 
STATIC EFI_TCP4_PROTOCOLmTcpConnection
 
STATIC EFI_TCP4_PROTOCOLmTcpListener
 
STATIC EFI_EVENT mReceiveEvent
 
STATIC EFI_SERVICE_BINDING_PROTOCOLmTcpServiceBinding
 
STATIC EFI_HANDLE mTcpHandle = NULL
 
STATIC UINTN mNextSubmitIndex
 
STATIC UINTN mNextReceiveIndex
 
STATIC EFI_TCP4_IO_TOKEN mReceiveToken [NUM_RX_TOKENS]
 
STATIC EFI_TCP4_RECEIVE_DATA mRxData [NUM_RX_TOKENS]
 
STATIC EFI_TCP4_IO_TOKEN mTransmitToken
 
STATIC EFI_TCP4_TRANSMIT_DATA mTxData
 
STATIC EFI_TCP4_LISTEN_TOKEN mAcceptToken
 
STATIC EFI_TCP4_CLOSE_TOKEN mCloseToken
 
STATIC LIST_ENTRY mPacketListHead
 
FASTBOOT_TRANSPORT_PROTOCOL mTransportProtocol
 

Detailed Description

#

Copyright (c) 2014, ARM Ltd. All rights reserved.

#

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

# # #

Definition in file FastbootTransportTcp.c.

Macro Definition Documentation

◆ IP4_ADDR_TO_STRING

#define IP4_ADDR_TO_STRING (   IpAddr,
  IpAddrString 
)
Value:
IpAddrString, \
16 * 2, \
L"%d.%d.%d.%d", \
IpAddr.Addr[0], \
IpAddr.Addr[1], \
IpAddr.Addr[2], \
IpAddr.Addr[3] \
);
UINTN EFIAPI UnicodeSPrint(OUT CHAR16 *StartOfBuffer, IN UINTN BufferSize, IN CONST CHAR16 *FormatString,...)
Definition: PrintLib.c:408

Definition at line 25 of file FastbootTransportTcp.c.

◆ NUM_RX_TOKENS

#define NUM_RX_TOKENS   16

Definition at line 54 of file FastbootTransportTcp.c.

◆ RX_FRAGMENT_SIZE

#define RX_FRAGMENT_SIZE   2048

Definition at line 40 of file FastbootTransportTcp.c.

◆ TOKEN_NEXT

#define TOKEN_NEXT (   Index)    (((Index) + 1) % NUM_RX_TOKENS)

Definition at line 55 of file FastbootTransportTcp.c.

Function Documentation

◆ CloseReceiveEvents()

STATIC VOID CloseReceiveEvents ( VOID  )

Definition at line 149 of file FastbootTransportTcp.c.

◆ ConnectionAccepted()

STATIC VOID EFIAPI ConnectionAccepted ( IN EFI_EVENT  Event,
IN VOID *  Context 
)

Definition at line 233 of file FastbootTransportTcp.c.

◆ ConnectionClosed()

STATIC VOID ConnectionClosed ( IN EFI_EVENT  Event,
IN VOID *  Context 
)

Definition at line 126 of file FastbootTransportTcp.c.

◆ DataReceived()

STATIC VOID EFIAPI DataReceived ( IN EFI_EVENT  Event,
IN VOID *  Context 
)

Definition at line 166 of file FastbootTransportTcp.c.

◆ DataSent()

STATIC VOID DataSent ( EFI_EVENT  Event,
VOID *  Context 
)

Definition at line 543 of file FastbootTransportTcp.c.

◆ SubmitRecieveToken()

STATIC EFI_STATUS SubmitRecieveToken ( VOID  )

Definition at line 90 of file FastbootTransportTcp.c.

◆ TcpFastbootTransportEntryPoint()

EFI_STATUS TcpFastbootTransportEntryPoint ( IN EFI_HANDLE  ImageHandle,
IN EFI_SYSTEM_TABLE SystemTable 
)

Definition at line 640 of file FastbootTransportTcp.c.

◆ TcpFastbootTransportReceive()

EFI_STATUS TcpFastbootTransportReceive ( OUT UINTN BufferSize,
OUT VOID **  Buffer 
)

Definition at line 605 of file FastbootTransportTcp.c.

◆ TcpFastbootTransportSend()

EFI_STATUS TcpFastbootTransportSend ( IN UINTN  BufferSize,
IN CONST VOID *  Buffer,
IN EFI_EVENT FatalErrorEvent 
)

Definition at line 560 of file FastbootTransportTcp.c.

◆ TcpFastbootTransportStart()

EFI_STATUS TcpFastbootTransportStart ( EFI_EVENT  ReceiveEvent)

Definition at line 294 of file FastbootTransportTcp.c.

◆ TcpFastbootTransportStop()

EFI_STATUS TcpFastbootTransportStop ( VOID  )

Definition at line 468 of file FastbootTransportTcp.c.

Variable Documentation

◆ mAcceptToken

Definition at line 64 of file FastbootTransportTcp.c.

◆ mCloseToken

Definition at line 66 of file FastbootTransportTcp.c.

◆ mNextReceiveIndex

STATIC UINTN mNextReceiveIndex

Definition at line 58 of file FastbootTransportTcp.c.

◆ mNextSubmitIndex

STATIC UINTN mNextSubmitIndex

Definition at line 57 of file FastbootTransportTcp.c.

◆ mPacketListHead

STATIC LIST_ENTRY mPacketListHead

Definition at line 75 of file FastbootTransportTcp.c.

◆ mReceiveEvent

STATIC EFI_EVENT mReceiveEvent

Definition at line 47 of file FastbootTransportTcp.c.

◆ mReceiveToken

STATIC EFI_TCP4_IO_TOKEN mReceiveToken[NUM_RX_TOKENS]

Definition at line 59 of file FastbootTransportTcp.c.

◆ mRxData

STATIC EFI_TCP4_RECEIVE_DATA mRxData[NUM_RX_TOKENS]

Definition at line 60 of file FastbootTransportTcp.c.

◆ mTcpConnection

STATIC EFI_TCP4_PROTOCOL* mTcpConnection

Definition at line 44 of file FastbootTransportTcp.c.

◆ mTcpHandle

STATIC EFI_HANDLE mTcpHandle = NULL

Definition at line 50 of file FastbootTransportTcp.c.

◆ mTcpListener

STATIC EFI_TCP4_PROTOCOL* mTcpListener

Definition at line 45 of file FastbootTransportTcp.c.

◆ mTcpServiceBinding

STATIC EFI_SERVICE_BINDING_PROTOCOL* mTcpServiceBinding

Definition at line 49 of file FastbootTransportTcp.c.

◆ mTextOut

Definition at line 42 of file FastbootTransportTcp.c.

◆ mTransmitToken

STATIC EFI_TCP4_IO_TOKEN mTransmitToken

Definition at line 61 of file FastbootTransportTcp.c.

◆ mTransportProtocol

FASTBOOT_TRANSPORT_PROTOCOL mTransportProtocol
Initial value:
= {
TcpFastbootTransportStart,
TcpFastbootTransportStop,
TcpFastbootTransportSend,
TcpFastbootTransportReceive
}

Definition at line 632 of file FastbootTransportTcp.c.

◆ mTxData

Definition at line 62 of file FastbootTransportTcp.c.