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