TianoCore EDK2 master
Loading...
Searching...
No Matches
Tcp4.h
Go to the documentation of this file.
1
15#ifndef __EFI_TCP4_PROTOCOL_H__
16#define __EFI_TCP4_PROTOCOL_H__
17
18#include <Protocol/Ip4.h>
19
20#define EFI_TCP4_SERVICE_BINDING_PROTOCOL_GUID \
21 { \
22 0x00720665, 0x67EB, 0x4a99, {0xBA, 0xF7, 0xD3, 0xC3, 0x3A, 0x1C, 0x7C, 0xC9 } \
23 }
24
25#define EFI_TCP4_PROTOCOL_GUID \
26 { \
27 0x65530BC7, 0xA359, 0x410f, {0xB0, 0x10, 0x5A, 0xAD, 0xC7, 0xEC, 0x2B, 0x62 } \
28 }
29
31
36typedef struct {
37 EFI_HANDLE InstanceHandle;
38 EFI_IPv4_ADDRESS LocalAddress;
39 UINT16 LocalPort;
40 EFI_IPv4_ADDRESS RemoteAddress;
41 UINT16 RemotePort;
43
48typedef struct {
49 EFI_HANDLE DriverHandle;
50 UINT32 ServiceCount;
51 EFI_TCP4_SERVICE_POINT Services[1];
53
54typedef struct {
55 BOOLEAN UseDefaultAddress;
56 EFI_IPv4_ADDRESS StationAddress;
57 EFI_IPv4_ADDRESS SubnetMask;
58 UINT16 StationPort;
59 EFI_IPv4_ADDRESS RemoteAddress;
60 UINT16 RemotePort;
61 BOOLEAN ActiveFlag;
63
64typedef struct {
65 UINT32 ReceiveBufferSize;
66 UINT32 SendBufferSize;
67 UINT32 MaxSynBackLog;
68 UINT32 ConnectionTimeout;
69 UINT32 DataRetries;
70 UINT32 FinTimeout;
71 UINT32 TimeWaitTimeout;
72 UINT32 KeepAliveProbes;
73 UINT32 KeepAliveTime;
74 UINT32 KeepAliveInterval;
75 BOOLEAN EnableNagle;
76 BOOLEAN EnableTimeStamp;
77 BOOLEAN EnableWindowScaling;
78 BOOLEAN EnableSelectiveAck;
79 BOOLEAN EnablePathMtuDiscovery;
81
82typedef struct {
83 //
84 // I/O parameters
85 //
86 UINT8 TypeOfService;
87 UINT8 TimeToLive;
88
89 //
90 // Access Point
91 //
92 EFI_TCP4_ACCESS_POINT AccessPoint;
93
94 //
95 // TCP Control Options
96 //
97 EFI_TCP4_OPTION *ControlOption;
99
103typedef enum {
104 Tcp4StateClosed = 0,
105 Tcp4StateListen = 1,
106 Tcp4StateSynSent = 2,
107 Tcp4StateSynReceived = 3,
108 Tcp4StateEstablished = 4,
109 Tcp4StateFinWait1 = 5,
110 Tcp4StateFinWait2 = 6,
111 Tcp4StateClosing = 7,
112 Tcp4StateTimeWait = 8,
113 Tcp4StateCloseWait = 9,
114 Tcp4StateLastAck = 10
116
117typedef struct {
118 EFI_EVENT Event;
119 EFI_STATUS Status;
121
122typedef struct {
151
152typedef struct {
153 EFI_TCP4_COMPLETION_TOKEN CompletionToken;
154 EFI_HANDLE NewChildHandle;
156
157typedef struct {
158 UINT32 FragmentLength;
159 VOID *FragmentBuffer;
161
162typedef struct {
163 BOOLEAN UrgentFlag;
164 UINT32 DataLength;
165 UINT32 FragmentCount;
166 EFI_TCP4_FRAGMENT_DATA FragmentTable[1];
168
169typedef struct {
170 BOOLEAN Push;
171 BOOLEAN Urgent;
172 UINT32 DataLength;
173 UINT32 FragmentCount;
174 EFI_TCP4_FRAGMENT_DATA FragmentTable[1];
176
177typedef struct {
206 union {
215 } Packet;
217
218typedef struct {
219 EFI_TCP4_COMPLETION_TOKEN CompletionToken;
220 BOOLEAN AbortOnClose;
222
223//
224// Interface definition for TCP4 protocol
225//
226
246typedef
248(EFIAPI *EFI_TCP4_GET_MODE_DATA)(
249 IN EFI_TCP4_PROTOCOL *This,
251 OUT EFI_TCP4_CONFIG_DATA *Tcp4ConfigData OPTIONAL,
252 OUT EFI_IP4_MODE_DATA *Ip4ModeData OPTIONAL,
255 );
256
277typedef
279(EFIAPI *EFI_TCP4_CONFIGURE)(
280 IN EFI_TCP4_PROTOCOL *This,
281 IN EFI_TCP4_CONFIG_DATA *TcpConfigData OPTIONAL
282 );
283
317typedef
319(EFIAPI *EFI_TCP4_ROUTES)(
320 IN EFI_TCP4_PROTOCOL *This,
321 IN BOOLEAN DeleteRoute,
322 IN EFI_IPv4_ADDRESS *SubnetAddress,
323 IN EFI_IPv4_ADDRESS *SubnetMask,
324 IN EFI_IPv4_ADDRESS *GatewayAddress
325 );
326
348typedef
350(EFIAPI *EFI_TCP4_CONNECT)(
351 IN EFI_TCP4_PROTOCOL *This,
352 IN EFI_TCP4_CONNECTION_TOKEN *ConnectionToken
353 );
354
376typedef
378(EFIAPI *EFI_TCP4_ACCEPT)(
379 IN EFI_TCP4_PROTOCOL *This,
380 IN EFI_TCP4_LISTEN_TOKEN *ListenToken
381 );
382
414typedef
416(EFIAPI *EFI_TCP4_TRANSMIT)(
417 IN EFI_TCP4_PROTOCOL *This,
418 IN EFI_TCP4_IO_TOKEN *Token
419 );
420
456typedef
458(EFIAPI *EFI_TCP4_RECEIVE)(
459 IN EFI_TCP4_PROTOCOL *This,
460 IN EFI_TCP4_IO_TOKEN *Token
461 );
462
486typedef
488(EFIAPI *EFI_TCP4_CLOSE)(
489 IN EFI_TCP4_PROTOCOL *This,
490 IN EFI_TCP4_CLOSE_TOKEN *CloseToken
491 );
492
518typedef
520(EFIAPI *EFI_TCP4_CANCEL)(
521 IN EFI_TCP4_PROTOCOL *This,
523 );
524
538typedef
540(EFIAPI *EFI_TCP4_POLL)(
542 );
543
552 EFI_TCP4_GET_MODE_DATA GetModeData;
553 EFI_TCP4_CONFIGURE Configure;
554 EFI_TCP4_ROUTES Routes;
555 EFI_TCP4_CONNECT Connect;
556 EFI_TCP4_ACCEPT Accept;
557 EFI_TCP4_TRANSMIT Transmit;
558 EFI_TCP4_RECEIVE Receive;
559 EFI_TCP4_CLOSE Close;
560 EFI_TCP4_CANCEL Cancel;
561 EFI_TCP4_POLL Poll;
562};
563
564extern EFI_GUID gEfiTcp4ServiceBindingProtocolGuid;
565extern EFI_GUID gEfiTcp4ProtocolGuid;
566
567#endif
EFI_STATUS Push(IN UINT32 Value, IN UINTN Type)
#define OPTIONAL
Definition: Base.h:290
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
EFI_STATUS(EFIAPI * EFI_TCP4_CLOSE)(IN EFI_TCP4_PROTOCOL *This, IN EFI_TCP4_CLOSE_TOKEN *CloseToken)
Definition: Tcp4.h:488
EFI_STATUS(EFIAPI * EFI_TCP4_ROUTES)(IN EFI_TCP4_PROTOCOL *This, IN BOOLEAN DeleteRoute, IN EFI_IPv4_ADDRESS *SubnetAddress, IN EFI_IPv4_ADDRESS *SubnetMask, IN EFI_IPv4_ADDRESS *GatewayAddress)
Definition: Tcp4.h:319
EFI_STATUS(EFIAPI * EFI_TCP4_CONNECT)(IN EFI_TCP4_PROTOCOL *This, IN EFI_TCP4_CONNECTION_TOKEN *ConnectionToken)
Definition: Tcp4.h:350
EFI_STATUS(EFIAPI * EFI_TCP4_GET_MODE_DATA)(IN EFI_TCP4_PROTOCOL *This, OUT EFI_TCP4_CONNECTION_STATE *Tcp4State OPTIONAL, OUT EFI_TCP4_CONFIG_DATA *Tcp4ConfigData OPTIONAL, OUT EFI_IP4_MODE_DATA *Ip4ModeData OPTIONAL, OUT EFI_MANAGED_NETWORK_CONFIG_DATA *MnpConfigData OPTIONAL, OUT EFI_SIMPLE_NETWORK_MODE *SnpModeData OPTIONAL)
Definition: Tcp4.h:248
EFI_STATUS(EFIAPI * EFI_TCP4_ACCEPT)(IN EFI_TCP4_PROTOCOL *This, IN EFI_TCP4_LISTEN_TOKEN *ListenToken)
Definition: Tcp4.h:378
EFI_TCP4_CONNECTION_STATE
Definition: Tcp4.h:103
EFI_STATUS(EFIAPI * EFI_TCP4_TRANSMIT)(IN EFI_TCP4_PROTOCOL *This, IN EFI_TCP4_IO_TOKEN *Token)
Definition: Tcp4.h:416
EFI_STATUS(EFIAPI * EFI_TCP4_CONFIGURE)(IN EFI_TCP4_PROTOCOL *This, IN EFI_TCP4_CONFIG_DATA *TcpConfigData OPTIONAL)
Definition: Tcp4.h:279
EFI_STATUS(EFIAPI * EFI_TCP4_RECEIVE)(IN EFI_TCP4_PROTOCOL *This, IN EFI_TCP4_IO_TOKEN *Token)
Definition: Tcp4.h:458
EFI_STATUS(EFIAPI * EFI_TCP4_CANCEL)(IN EFI_TCP4_PROTOCOL *This, IN EFI_TCP4_COMPLETION_TOKEN *Token OPTIONAL)
Definition: Tcp4.h:520
EFI_STATUS(EFIAPI * EFI_TCP4_POLL)(IN EFI_TCP4_PROTOCOL *This)
Definition: Tcp4.h:540
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
VOID * EFI_EVENT
Definition: UefiBaseType.h:37
VOID * EFI_HANDLE
Definition: UefiBaseType.h:33
EFI_TCP4_COMPLETION_TOKEN CompletionToken
Definition: Tcp4.h:149
EFI_TCP4_COMPLETION_TOKEN CompletionToken
Definition: Tcp4.h:205
EFI_TCP4_TRANSMIT_DATA * TxData
Definition: Tcp4.h:214
EFI_TCP4_RECEIVE_DATA * RxData
Definition: Tcp4.h:210
Definition: Base.h:213