TianoCore EDK2 master
Loading...
Searching...
No Matches
TcpIoLib.h
Go to the documentation of this file.
1
10#ifndef _TCP_IO_H_
11#define _TCP_IO_H_
12
13#include <Protocol/Tcp4.h>
14#include <Protocol/Tcp6.h>
15
16#include <Library/NetLib.h>
17
18#define TCP_VERSION_4 IP_VERSION_4
19#define TCP_VERSION_6 IP_VERSION_6
20
24#define TCP_GET_MAPPING_TIMEOUT 100000000U
25
26typedef struct {
27 EFI_IPv4_ADDRESS LocalIp;
28 EFI_IPv4_ADDRESS SubnetMask;
29 EFI_IPv4_ADDRESS Gateway;
30
31 UINT16 StationPort;
32 EFI_IPv4_ADDRESS RemoteIp;
33 UINT16 RemotePort;
34 BOOLEAN ActiveFlag;
36
37typedef struct {
38 UINT16 StationPort;
39 EFI_IPv6_ADDRESS RemoteIp;
40 UINT16 RemotePort;
41 BOOLEAN ActiveFlag;
43
44typedef union {
45 TCP4_IO_CONFIG_DATA Tcp4IoConfigData;
46 TCP6_IO_CONFIG_DATA Tcp6IoConfigData;
48
49typedef union {
53
54typedef union {
58
59typedef union {
60 EFI_TCP4_IO_TOKEN Tcp4Token;
61 EFI_TCP6_IO_TOKEN Tcp6Token;
63
64typedef union {
65 EFI_TCP4_CLOSE_TOKEN Tcp4Token;
66 EFI_TCP6_CLOSE_TOKEN Tcp6Token;
68
69typedef union {
70 EFI_TCP4_LISTEN_TOKEN Tcp4Token;
71 EFI_TCP6_LISTEN_TOKEN Tcp6Token;
73
74typedef struct {
75 UINT8 TcpVersion;
76 EFI_HANDLE Image;
77 EFI_HANDLE Controller;
78 EFI_HANDLE Handle;
79
81 TCP_IO_PROTOCOL NewTcp;
83 TCP_IO_IO_TOKEN TxToken;
84 TCP_IO_IO_TOKEN RxToken;
85 TCP_IO_CLOSE_TOKEN CloseToken;
86 TCP_IO_LISTEN_TOKEN ListenToken;
87
88 BOOLEAN IsConnDone;
89 BOOLEAN IsTxDone;
90 BOOLEAN IsRxDone;
91 BOOLEAN IsCloseDone;
92 BOOLEAN IsListenDone;
93} TCP_IO;
94
113EFIAPI
115 IN EFI_HANDLE Image,
116 IN EFI_HANDLE Controller,
117 IN UINT8 TcpVersion,
118 IN TCP_IO_CONFIG_DATA *ConfigData,
119 OUT TCP_IO *TcpIo
120 );
121
128VOID
129EFIAPI
131 IN TCP_IO *TcpIo
132 );
133
151EFIAPI
153 IN OUT TCP_IO *TcpIo,
154 IN EFI_EVENT Timeout OPTIONAL
155 );
156
176EFIAPI
178 IN OUT TCP_IO *TcpIo,
179 IN EFI_EVENT Timeout OPTIONAL
180 );
181
188VOID
189EFIAPI
191 IN OUT TCP_IO *TcpIo
192 );
193
210EFIAPI
212 IN TCP_IO *TcpIo,
213 IN NET_BUF *Packet
214 );
215
235EFIAPI
237 IN OUT TCP_IO *TcpIo,
238 IN NET_BUF *Packet,
239 IN BOOLEAN AsyncMode,
240 IN EFI_EVENT Timeout OPTIONAL
241 );
242
243#endif
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
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)
Definition: DxeTcpIoLib.c:125
EFI_STATUS EFIAPI TcpIoAccept(IN OUT TCP_IO *TcpIo, IN EFI_EVENT Timeout OPTIONAL)
Definition: DxeTcpIoLib.c:609
EFI_STATUS EFIAPI TcpIoReceive(IN OUT TCP_IO *TcpIo, IN NET_BUF *Packet, IN BOOLEAN AsyncMode, IN EFI_EVENT Timeout OPTIONAL)
Definition: DxeTcpIoLib.c:872
EFI_STATUS EFIAPI TcpIoConnect(IN OUT TCP_IO *TcpIo, IN EFI_EVENT Timeout OPTIONAL)
Definition: DxeTcpIoLib.c:534
EFI_STATUS EFIAPI TcpIoTransmit(IN TCP_IO *TcpIo, IN NET_BUF *Packet)
Definition: DxeTcpIoLib.c:752
VOID EFIAPI TcpIoDestroySocket(IN TCP_IO *TcpIo)
Definition: DxeTcpIoLib.c:397
VOID EFIAPI TcpIoReset(IN OUT TCP_IO *TcpIo)
Definition: DxeTcpIoLib.c:694
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
VOID * EFI_EVENT
Definition: UefiBaseType.h:37
VOID * EFI_HANDLE
Definition: UefiBaseType.h:33