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