]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Include/Protocol/Tcp4.h
MdePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdePkg / Include / Protocol / Tcp4.h
1 /** @file
2 EFI TCPv4(Transmission Control Protocol version 4) Protocol Definition
3 The EFI TCPv4 Service Binding Protocol is used to locate EFI TCPv4 Protocol drivers to create
4 and destroy child of the driver to communicate with other host using TCP protocol.
5 The EFI TCPv4 Protocol provides services to send and receive data stream.
6
7 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
8 SPDX-License-Identifier: BSD-2-Clause-Patent
9
10 @par Revision Reference:
11 This Protocol is introduced in UEFI Specification 2.0.
12
13 **/
14
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
30 typedef struct _EFI_TCP4_PROTOCOL EFI_TCP4_PROTOCOL;
31
32 ///
33 /// EFI_TCP4_SERVICE_POINT is deprecated in the UEFI 2.4B and should not be used any more.
34 /// The definition in here is only present to provide backwards compatability.
35 ///
36 typedef struct {
37 EFI_HANDLE InstanceHandle;
38 EFI_IPv4_ADDRESS LocalAddress;
39 UINT16 LocalPort;
40 EFI_IPv4_ADDRESS RemoteAddress;
41 UINT16 RemotePort;
42 } EFI_TCP4_SERVICE_POINT;
43
44 ///
45 /// EFI_TCP4_VARIABLE_DATA is deprecated in the UEFI 2.4B and should not be used any more.
46 /// The definition in here is only present to provide backwards compatability.
47 ///
48 typedef struct {
49 EFI_HANDLE DriverHandle;
50 UINT32 ServiceCount;
51 EFI_TCP4_SERVICE_POINT Services[1];
52 } EFI_TCP4_VARIABLE_DATA;
53
54 typedef 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;
62 } EFI_TCP4_ACCESS_POINT;
63
64 typedef 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;
80 } EFI_TCP4_OPTION;
81
82 typedef 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;
98 } EFI_TCP4_CONFIG_DATA;
99
100 ///
101 /// TCP4 connnection state
102 ///
103 typedef 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
115 } EFI_TCP4_CONNECTION_STATE;
116
117 typedef struct {
118 EFI_EVENT Event;
119 EFI_STATUS Status;
120 } EFI_TCP4_COMPLETION_TOKEN;
121
122 typedef struct {
123 ///
124 /// The Status in the CompletionToken will be set to one of
125 /// the following values if the active open succeeds or an unexpected
126 /// error happens:
127 /// EFI_SUCCESS: The active open succeeds and the instance's
128 /// state is Tcp4StateEstablished.
129 /// EFI_CONNECTION_RESET: The connect fails because the connection is reset
130 /// either by instance itself or the communication peer.
131 /// EFI_CONNECTION_REFUSED: The connect fails because this connection is initiated with
132 /// an active open and the connection is refused.
133 /// EFI_ABORTED: The active open is aborted.
134 /// EFI_TIMEOUT: The connection establishment timer expires and
135 /// no more specific information is available.
136 /// EFI_NETWORK_UNREACHABLE: The active open fails because
137 /// an ICMP network unreachable error is received.
138 /// EFI_HOST_UNREACHABLE: The active open fails because an
139 /// ICMP host unreachable error is received.
140 /// EFI_PROTOCOL_UNREACHABLE: The active open fails
141 /// because an ICMP protocol unreachable error is received.
142 /// EFI_PORT_UNREACHABLE: The connection establishment
143 /// timer times out and an ICMP port unreachable error is received.
144 /// EFI_ICMP_ERROR: The connection establishment timer timeout and some other ICMP
145 /// error is received.
146 /// EFI_DEVICE_ERROR: An unexpected system or network error occurred.
147 /// EFI_NO_MEDIA: There was a media error.
148 ///
149 EFI_TCP4_COMPLETION_TOKEN CompletionToken;
150 } EFI_TCP4_CONNECTION_TOKEN;
151
152 typedef struct {
153 EFI_TCP4_COMPLETION_TOKEN CompletionToken;
154 EFI_HANDLE NewChildHandle;
155 } EFI_TCP4_LISTEN_TOKEN;
156
157 typedef struct {
158 UINT32 FragmentLength;
159 VOID *FragmentBuffer;
160 } EFI_TCP4_FRAGMENT_DATA;
161
162 typedef struct {
163 BOOLEAN UrgentFlag;
164 UINT32 DataLength;
165 UINT32 FragmentCount;
166 EFI_TCP4_FRAGMENT_DATA FragmentTable[1];
167 } EFI_TCP4_RECEIVE_DATA;
168
169 typedef struct {
170 BOOLEAN Push;
171 BOOLEAN Urgent;
172 UINT32 DataLength;
173 UINT32 FragmentCount;
174 EFI_TCP4_FRAGMENT_DATA FragmentTable[1];
175 } EFI_TCP4_TRANSMIT_DATA;
176
177 typedef struct {
178 ///
179 /// When transmission finishes or meets any unexpected error it will
180 /// be set to one of the following values:
181 /// EFI_SUCCESS: The receiving or transmission operation
182 /// completes successfully.
183 /// EFI_CONNECTION_FIN: The receiving operation fails because the communication peer
184 /// has closed the connection and there is no more data in the
185 /// receive buffer of the instance.
186 /// EFI_CONNECTION_RESET: The receiving or transmission operation fails
187 /// because this connection is reset either by instance
188 /// itself or the communication peer.
189 /// EFI_ABORTED: The receiving or transmission is aborted.
190 /// EFI_TIMEOUT: The transmission timer expires and no more
191 /// specific information is available.
192 /// EFI_NETWORK_UNREACHABLE: The transmission fails
193 /// because an ICMP network unreachable error is received.
194 /// EFI_HOST_UNREACHABLE: The transmission fails because an
195 /// ICMP host unreachable error is received.
196 /// EFI_PROTOCOL_UNREACHABLE: The transmission fails
197 /// because an ICMP protocol unreachable error is received.
198 /// EFI_PORT_UNREACHABLE: The transmission fails and an
199 /// ICMP port unreachable error is received.
200 /// EFI_ICMP_ERROR: The transmission fails and some other
201 /// ICMP error is received.
202 /// EFI_DEVICE_ERROR: An unexpected system or network error occurs.
203 /// EFI_NO_MEDIA: There was a media error.
204 ///
205 EFI_TCP4_COMPLETION_TOKEN CompletionToken;
206 union {
207 ///
208 /// When this token is used for receiving, RxData is a pointer to EFI_TCP4_RECEIVE_DATA.
209 ///
210 EFI_TCP4_RECEIVE_DATA *RxData;
211 ///
212 /// When this token is used for transmitting, TxData is a pointer to EFI_TCP4_TRANSMIT_DATA.
213 ///
214 EFI_TCP4_TRANSMIT_DATA *TxData;
215 } Packet;
216 } EFI_TCP4_IO_TOKEN;
217
218 typedef struct {
219 EFI_TCP4_COMPLETION_TOKEN CompletionToken;
220 BOOLEAN AbortOnClose;
221 } EFI_TCP4_CLOSE_TOKEN;
222
223 //
224 // Interface definition for TCP4 protocol
225 //
226
227 /**
228 Get the current operational status.
229
230 @param This The pointer to the EFI_TCP4_PROTOCOL instance.
231 @param Tcp4State The pointer to the buffer to receive the current TCP state.
232 @param Tcp4ConfigData The pointer to the buffer to receive the current TCP configuration.
233 @param Ip4ModeData The pointer to the buffer to receive the current IPv4 configuration
234 data used by the TCPv4 instance.
235 @param MnpConfigData The pointer to the buffer to receive the current MNP configuration
236 data used indirectly by the TCPv4 instance.
237 @param SnpModeData The pointer to the buffer to receive the current SNP configuration
238 data used indirectly by the TCPv4 instance.
239
240 @retval EFI_SUCCESS The mode data was read.
241 @retval EFI_INVALID_PARAMETER This is NULL.
242 @retval EFI_NOT_STARTED No configuration data is available because this instance hasn't
243 been started.
244
245 **/
246 typedef
247 EFI_STATUS
248 (EFIAPI *EFI_TCP4_GET_MODE_DATA)(
249 IN EFI_TCP4_PROTOCOL *This,
250 OUT EFI_TCP4_CONNECTION_STATE *Tcp4State OPTIONAL,
251 OUT EFI_TCP4_CONFIG_DATA *Tcp4ConfigData OPTIONAL,
252 OUT EFI_IP4_MODE_DATA *Ip4ModeData OPTIONAL,
253 OUT EFI_MANAGED_NETWORK_CONFIG_DATA *MnpConfigData OPTIONAL,
254 OUT EFI_SIMPLE_NETWORK_MODE *SnpModeData OPTIONAL
255 );
256
257 /**
258 Initialize or brutally reset the operational parameters for this EFI TCPv4 instance.
259
260 @param This The pointer to the EFI_TCP4_PROTOCOL instance.
261 @param Tcp4ConfigData The pointer to the configure data to configure the instance.
262
263 @retval EFI_SUCCESS The operational settings are set, changed, or reset
264 successfully.
265 @retval EFI_INVALID_PARAMETER Some parameter is invalid.
266 @retval EFI_NO_MAPPING When using a default address, configuration (through
267 DHCP, BOOTP, RARP, etc.) is not finished yet.
268 @retval EFI_ACCESS_DENIED Configuring TCP instance when it is configured without
269 calling Configure() with NULL to reset it.
270 @retval EFI_DEVICE_ERROR An unexpected network or system error occurred.
271 @retval EFI_UNSUPPORTED One or more of the control options are not supported in
272 the implementation.
273 @retval EFI_OUT_OF_RESOURCES Could not allocate enough system resources when
274 executing Configure().
275
276 **/
277 typedef
278 EFI_STATUS
279 (EFIAPI *EFI_TCP4_CONFIGURE)(
280 IN EFI_TCP4_PROTOCOL *This,
281 IN EFI_TCP4_CONFIG_DATA *TcpConfigData OPTIONAL
282 );
283
284
285 /**
286 Add or delete a route entry to the route table
287
288 @param This The pointer to the EFI_TCP4_PROTOCOL instance.
289 @param DeleteRoute Set it to TRUE to delete this route from the routing table. Set it to
290 FALSE to add this route to the routing table.
291 DestinationAddress and SubnetMask are used as the
292 keywords to search route entry.
293 @param SubnetAddress The destination network.
294 @param SubnetMask The subnet mask of the destination network.
295 @param GatewayAddress The gateway address for this route. It must be on the same
296 subnet with the station address unless a direct route is specified.
297
298 @retval EFI_SUCCESS The operation completed successfully.
299 @retval EFI_NOT_STARTED The EFI TCPv4 Protocol instance has not been configured.
300 @retval EFI_NO_MAPPING When using a default address, configuration (DHCP, BOOTP,
301 RARP, etc.) is not finished yet.
302 @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
303 - This is NULL.
304 - SubnetAddress is NULL.
305 - SubnetMask is NULL.
306 - GatewayAddress is NULL.
307 - *SubnetAddress is not NULL a valid subnet address.
308 - *SubnetMask is not a valid subnet mask.
309 - *GatewayAddress is not a valid unicast IP address or it
310 is not in the same subnet.
311 @retval EFI_OUT_OF_RESOURCES Could not allocate enough resources to add the entry to the
312 routing table.
313 @retval EFI_NOT_FOUND This route is not in the routing table.
314 @retval EFI_ACCESS_DENIED The route is already defined in the routing table.
315 @retval EFI_UNSUPPORTED The TCP driver does not support this operation.
316
317 **/
318 typedef
319 EFI_STATUS
320 (EFIAPI *EFI_TCP4_ROUTES)(
321 IN EFI_TCP4_PROTOCOL *This,
322 IN BOOLEAN DeleteRoute,
323 IN EFI_IPv4_ADDRESS *SubnetAddress,
324 IN EFI_IPv4_ADDRESS *SubnetMask,
325 IN EFI_IPv4_ADDRESS *GatewayAddress
326 );
327
328 /**
329 Initiate a nonblocking TCP connection request for an active TCP instance.
330
331 @param This The pointer to the EFI_TCP4_PROTOCOL instance.
332 @param ConnectionToken The pointer to the connection token to return when the TCP three
333 way handshake finishes.
334
335 @retval EFI_SUCCESS The connection request is successfully initiated and the state
336 of this TCPv4 instance has been changed to Tcp4StateSynSent.
337 @retval EFI_NOT_STARTED This EFI TCPv4 Protocol instance has not been configured.
338 @retval EFI_ACCESS_DENIED One or more of the following conditions are TRUE:
339 - This instance is not configured as an active one.
340 - This instance is not in Tcp4StateClosed state.
341 @retval EFI_INVALID_PARAMETER One or more of the following are TRUE:
342 - This is NULL.
343 - ConnectionToken is NULL.
344 - ConnectionToken->CompletionToken.Event is NULL.
345 @retval EFI_OUT_OF_RESOURCES The driver can't allocate enough resource to initiate the activ eopen.
346 @retval EFI_DEVICE_ERROR An unexpected system or network error occurred.
347
348 **/
349 typedef
350 EFI_STATUS
351 (EFIAPI *EFI_TCP4_CONNECT)(
352 IN EFI_TCP4_PROTOCOL *This,
353 IN EFI_TCP4_CONNECTION_TOKEN *ConnectionToken
354 );
355
356
357 /**
358 Listen on the passive instance to accept an incoming connection request. This is a nonblocking operation.
359
360 @param This The pointer to the EFI_TCP4_PROTOCOL instance.
361 @param ListenToken The pointer to the listen token to return when operation finishes.
362
363 @retval EFI_SUCCESS The listen token has been queued successfully.
364 @retval EFI_NOT_STARTED This EFI TCPv4 Protocol instance has not been configured.
365 @retval EFI_ACCESS_DENIED One or more of the following are TRUE:
366 - This instance is not a passive instance.
367 - This instance is not in Tcp4StateListen state.
368 - The same listen token has already existed in the listen
369 token queue of this TCP instance.
370 @retval EFI_INVALID_PARAMETER One or more of the following are TRUE:
371 - This is NULL.
372 - ListenToken is NULL.
373 - ListentToken->CompletionToken.Event is NULL.
374 @retval EFI_OUT_OF_RESOURCES Could not allocate enough resource to finish the operation.
375 @retval EFI_DEVICE_ERROR Any unexpected and not belonged to above category error.
376
377 **/
378 typedef
379 EFI_STATUS
380 (EFIAPI *EFI_TCP4_ACCEPT)(
381 IN EFI_TCP4_PROTOCOL *This,
382 IN EFI_TCP4_LISTEN_TOKEN *ListenToken
383 );
384
385 /**
386 Queues outgoing data into the transmit queue.
387
388 @param This The pointer to the EFI_TCP4_PROTOCOL instance.
389 @param Token The pointer to the completion token to queue to the transmit queue.
390
391 @retval EFI_SUCCESS The data has been queued for transmission.
392 @retval EFI_NOT_STARTED This EFI TCPv4 Protocol instance has not been configured.
393 @retval EFI_NO_MAPPING When using a default address, configuration (DHCP, BOOTP,
394 RARP, etc.) is not finished yet.
395 @retval EFI_INVALID_PARAMETER One or more of the following are TRUE:
396 - This is NULL.
397 - Token is NULL.
398 - Token->CompletionToken.Event is NULL.
399 - Token->Packet.TxData is NULL L.
400 - Token->Packet.FragmentCount is zero.
401 - Token->Packet.DataLength is not equal to the sum of fragment lengths.
402 @retval EFI_ACCESS_DENIED One or more of the following conditions is TRUE:
403 - A transmit completion token with the same Token->CompletionToken.Event
404 was already in the transmission queue.
405 - The current instance is in Tcp4StateClosed state.
406 - The current instance is a passive one and it is in
407 Tcp4StateListen state.
408 - User has called Close() to disconnect this connection.
409 @retval EFI_NOT_READY The completion token could not be queued because the
410 transmit queue is full.
411 @retval EFI_OUT_OF_RESOURCES Could not queue the transmit data because of resource
412 shortage.
413 @retval EFI_NETWORK_UNREACHABLE There is no route to the destination network or address.
414
415 **/
416 typedef
417 EFI_STATUS
418 (EFIAPI *EFI_TCP4_TRANSMIT)(
419 IN EFI_TCP4_PROTOCOL *This,
420 IN EFI_TCP4_IO_TOKEN *Token
421 );
422
423
424 /**
425 Places an asynchronous receive request into the receiving queue.
426
427 @param This The pointer to the EFI_TCP4_PROTOCOL instance.
428 @param Token The pointer to a token that is associated with the receive data
429 descriptor.
430
431 @retval EFI_SUCCESS The receive completion token was cached.
432 @retval EFI_NOT_STARTED This EFI TCPv4 Protocol instance has not been configured.
433 @retval EFI_NO_MAPPING When using a default address, configuration (DHCP, BOOTP, RARP,
434 etc.) is not finished yet.
435 @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
436 - This is NULL.
437 - Token is NULL.
438 - Token->CompletionToken.Event is NULL.
439 - Token->Packet.RxData is NULL.
440 - Token->Packet.RxData->DataLength is 0.
441 - The Token->Packet.RxData->DataLength is not
442 the sum of all FragmentBuffer length in FragmentTable.
443 @retval EFI_OUT_OF_RESOURCES The receive completion token could not be queued due to a lack of
444 system resources (usually memory).
445 @retval EFI_DEVICE_ERROR An unexpected system or network error occurred.
446 @retval EFI_ACCESS_DENIED One or more of the following conditions is TRUE:
447 - A receive completion token with the same Token-
448 >CompletionToken.Event was already in the receive
449 queue.
450 - The current instance is in Tcp4StateClosed state.
451 - The current instance is a passive one and it is in
452 Tcp4StateListen state.
453 - User has called Close() to disconnect this connection.
454 @retval EFI_CONNECTION_FIN The communication peer has closed the connection and there is
455 no any buffered data in the receive buffer of this instance.
456 @retval EFI_NOT_READY The receive request could not be queued because the receive queue is full.
457
458 **/
459 typedef
460 EFI_STATUS
461 (EFIAPI *EFI_TCP4_RECEIVE)(
462 IN EFI_TCP4_PROTOCOL *This,
463 IN EFI_TCP4_IO_TOKEN *Token
464 );
465
466 /**
467 Disconnecting a TCP connection gracefully or reset a TCP connection. This function is a
468 nonblocking operation.
469
470 @param This The pointer to the EFI_TCP4_PROTOCOL instance.
471 @param CloseToken The pointer to the close token to return when operation finishes.
472
473 @retval EFI_SUCCESS The Close() is called successfully.
474 @retval EFI_NOT_STARTED This EFI TCPv4 Protocol instance has not been configured.
475 @retval EFI_ACCESS_DENIED One or more of the following are TRUE:
476 - Configure() has been called with
477 TcpConfigData set to NULL and this function has
478 not returned.
479 - Previous Close() call on this instance has not
480 finished.
481 @retval EFI_INVALID_PARAMETER One or more of the following are TRUE:
482 - This is NULL.
483 - CloseToken is NULL.
484 - CloseToken->CompletionToken.Event is NULL.
485 @retval EFI_OUT_OF_RESOURCES Could not allocate enough resource to finish the operation.
486 @retval EFI_DEVICE_ERROR Any unexpected and not belonged to above category error.
487
488 **/
489 typedef
490 EFI_STATUS
491 (EFIAPI *EFI_TCP4_CLOSE)(
492 IN EFI_TCP4_PROTOCOL *This,
493 IN EFI_TCP4_CLOSE_TOKEN *CloseToken
494 );
495
496 /**
497 Abort an asynchronous connection, listen, transmission or receive request.
498
499 @param This The pointer to the EFI_TCP4_PROTOCOL instance.
500 @param Token The pointer to a token that has been issued by
501 EFI_TCP4_PROTOCOL.Connect(),
502 EFI_TCP4_PROTOCOL.Accept(),
503 EFI_TCP4_PROTOCOL.Transmit() or
504 EFI_TCP4_PROTOCOL.Receive(). If NULL, all pending
505 tokens issued by above four functions will be aborted. Type
506 EFI_TCP4_COMPLETION_TOKEN is defined in
507 EFI_TCP4_PROTOCOL.Connect().
508
509 @retval EFI_SUCCESS The asynchronous I/O request is aborted and Token->Event
510 is signaled.
511 @retval EFI_INVALID_PARAMETER This is NULL.
512 @retval EFI_NOT_STARTED This instance hasn't been configured.
513 @retval EFI_NO_MAPPING When using the default address, configuration
514 (DHCP, BOOTP,RARP, etc.) hasn't finished yet.
515 @retval EFI_NOT_FOUND The asynchronous I/O request isn't found in the
516 transmission or receive queue. It has either
517 completed or wasn't issued by Transmit() and Receive().
518 @retval EFI_UNSUPPORTED The implementation does not support this function.
519
520 **/
521 typedef
522 EFI_STATUS
523 (EFIAPI *EFI_TCP4_CANCEL)(
524 IN EFI_TCP4_PROTOCOL *This,
525 IN EFI_TCP4_COMPLETION_TOKEN *Token OPTIONAL
526 );
527
528
529 /**
530 Poll to receive incoming data and transmit outgoing segments.
531
532 @param This The pointer to the EFI_TCP4_PROTOCOL instance.
533
534 @retval EFI_SUCCESS Incoming or outgoing data was processed.
535 @retval EFI_INVALID_PARAMETER This is NULL.
536 @retval EFI_DEVICE_ERROR An unexpected system or network error occurred.
537 @retval EFI_NOT_READY No incoming or outgoing data is processed.
538 @retval EFI_TIMEOUT Data was dropped out of the transmission or receive queue.
539 Consider increasing the polling rate.
540
541 **/
542 typedef
543 EFI_STATUS
544 (EFIAPI *EFI_TCP4_POLL)(
545 IN EFI_TCP4_PROTOCOL *This
546 );
547
548 ///
549 /// The EFI_TCP4_PROTOCOL defines the EFI TCPv4 Protocol child to be used by
550 /// any network drivers or applications to send or receive data stream.
551 /// It can either listen on a specified port as a service or actively connected
552 /// to remote peer as a client. Each instance has its own independent settings,
553 /// such as the routing table.
554 ///
555 struct _EFI_TCP4_PROTOCOL {
556 EFI_TCP4_GET_MODE_DATA GetModeData;
557 EFI_TCP4_CONFIGURE Configure;
558 EFI_TCP4_ROUTES Routes;
559 EFI_TCP4_CONNECT Connect;
560 EFI_TCP4_ACCEPT Accept;
561 EFI_TCP4_TRANSMIT Transmit;
562 EFI_TCP4_RECEIVE Receive;
563 EFI_TCP4_CLOSE Close;
564 EFI_TCP4_CANCEL Cancel;
565 EFI_TCP4_POLL Poll;
566 };
567
568 extern EFI_GUID gEfiTcp4ServiceBindingProtocolGuid;
569 extern EFI_GUID gEfiTcp4ProtocolGuid;
570
571 #endif