]>
Commit | Line | Data |
---|---|---|
bdb140d7 | 1 | /** @file\r |
2 | EFI TCPv6(Transmission Control Protocol version 6) Protocol Definition\r | |
3 | The EFI TCPv6 Service Binding Protocol is used to locate EFI TCPv6 Protocol drivers to create\r | |
4 | and destroy child of the driver to communicate with other host using TCP protocol.\r | |
5 | The EFI TCPv6 Protocol provides services to send and receive data stream.\r | |
6 | \r | |
9df063a0 HT |
7 | Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>\r |
8 | This program and the accompanying materials\r | |
bdb140d7 | 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 | |
12 | \r | |
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 | |
15 | \r | |
bce46f7e | 16 | @par Revision Reference:\r |
5899caf0 | 17 | This Protocol is introduced in UEFI Specification 2.2\r |
18 | \r | |
bdb140d7 | 19 | **/\r |
20 | \r | |
21 | #ifndef __EFI_TCP6_PROTOCOL_H__\r | |
22 | #define __EFI_TCP6_PROTOCOL_H__\r | |
23 | \r | |
bdb140d7 | 24 | #include <Protocol/ManagedNetwork.h>\r |
25 | #include <Protocol/Ip6.h>\r | |
26 | \r | |
27 | #define EFI_TCP6_SERVICE_BINDING_PROTOCOL_GUID \\r | |
28 | { \\r | |
29 | 0xec20eb79, 0x6c1a, 0x4664, {0x9a, 0x0d, 0xd2, 0xe4, 0xcc, 0x16, 0xd6, 0x64 } \\r | |
30 | }\r | |
31 | \r | |
32 | #define EFI_TCP6_PROTOCOL_GUID \\r | |
33 | { \\r | |
34 | 0x46e44855, 0xbd60, 0x4ab7, {0xab, 0x0d, 0xa6, 0x79, 0xb9, 0x44, 0x7d, 0x77 } \\r | |
35 | }\r | |
36 | \r | |
37 | \r | |
38 | typedef struct _EFI_TCP6_PROTOCOL EFI_TCP6_PROTOCOL;\r | |
39 | \r | |
bdb140d7 | 40 | ///\r |
41 | /// EFI_TCP6_SERVICE_POINT\r | |
42 | ///\r | |
43 | typedef struct {\r | |
44 | ///\r | |
bce46f7e | 45 | /// The EFI TCPv6 Protocol instance handle that is using this\r |
bdb140d7 | 46 | /// address/port pair.\r |
47 | ///\r | |
48 | EFI_HANDLE InstanceHandle;\r | |
bce46f7e | 49 | ///\r |
50 | /// The local IPv6 address to which this TCP instance is bound. Set\r | |
51 | /// to 0::/128, if this TCP instance is configured to listen on all\r | |
bdb140d7 | 52 | /// available source addresses.\r |
bce46f7e | 53 | ///\r |
bdb140d7 | 54 | EFI_IPv6_ADDRESS LocalAddress;\r |
bce46f7e | 55 | ///\r |
bdb140d7 | 56 | /// The local port number in host byte order.\r |
bce46f7e | 57 | ///\r |
bdb140d7 | 58 | UINT16 LocalPort;\r |
bce46f7e | 59 | ///\r |
60 | /// The remote IPv6 address. It may be 0::/128 if this TCP instance is\r | |
61 | /// not connected to any remote host.\r | |
62 | ///\r | |
bdb140d7 | 63 | EFI_IPv6_ADDRESS RemoteAddress;\r |
bce46f7e | 64 | ///\r |
65 | /// The remote port number in host byte order. It may be zero if this\r | |
bdb140d7 | 66 | /// TCP instance is not connected to any remote host.\r |
bce46f7e | 67 | ///\r |
bdb140d7 | 68 | UINT16 RemotePort;\r |
69 | } EFI_TCP6_SERVICE_POINT;\r | |
70 | \r | |
bce46f7e | 71 | ///\r |
bdb140d7 | 72 | /// EFI_TCP6_VARIABLE_DATA\r |
73 | ///\r | |
74 | typedef struct {\r | |
75 | EFI_HANDLE DriverHandle; ///< The handle of the driver that creates this entry.\r | |
76 | UINT32 ServiceCount; ///< The number of address/port pairs following this data structure.\r | |
77 | EFI_TCP6_SERVICE_POINT Services[1]; ///< List of address/port pairs that are currently in use.\r | |
78 | } EFI_TCP6_VARIABLE_DATA;\r | |
79 | \r | |
80 | ///\r | |
81 | /// EFI_TCP6_ACCESS_POINT\r | |
82 | ///\r | |
83 | typedef struct {\r | |
bce46f7e | 84 | ///\r |
85 | /// The local IP address assigned to this TCP instance. The EFI\r | |
86 | /// TCPv6 driver will only deliver incoming packets whose\r | |
87 | /// destination addresses exactly match the IP address. Set to zero to\r | |
88 | /// let the underlying IPv6 driver choose a source address. If not zero\r | |
89 | /// it must be one of the configured IP addresses in the underlying\r | |
bdb140d7 | 90 | /// IPv6 driver.\r |
bce46f7e | 91 | ///\r |
bdb140d7 | 92 | EFI_IPv6_ADDRESS StationAddress;\r |
bce46f7e | 93 | ///\r |
94 | /// The local port number to which this EFI TCPv6 Protocol instance\r | |
95 | /// is bound. If the instance doesn't care the local port number, set\r | |
bdb140d7 | 96 | /// StationPort to zero to use an ephemeral port.\r |
bce46f7e | 97 | ///\r |
bdb140d7 | 98 | UINT16 StationPort;\r |
bce46f7e | 99 | ///\r |
100 | /// The remote IP address to which this EFI TCPv6 Protocol instance\r | |
101 | /// is connected. If ActiveFlag is FALSE (i.e. a passive TCPv6\r | |
102 | /// instance), the instance only accepts connections from the\r | |
103 | /// RemoteAddress. If ActiveFlag is TRUE the instance will\r | |
104 | /// connect to the RemoteAddress, i.e., outgoing segments will be\r | |
105 | /// sent to this address and only segments from this address will be\r | |
106 | /// delivered to the application. When ActiveFlag is FALSE, it\r | |
107 | /// can be set to zero and means that incoming connection requests\r | |
bdb140d7 | 108 | /// from any address will be accepted.\r |
bce46f7e | 109 | ///\r |
bdb140d7 | 110 | EFI_IPv6_ADDRESS RemoteAddress;\r |
bce46f7e | 111 | ///\r |
112 | /// The remote port to which this EFI TCPv6 Protocol instance\r | |
113 | /// connects or from which connection request will be accepted by\r | |
114 | /// this EFI TCPv6 Protocol instance. If ActiveFlag is FALSE it\r | |
115 | /// can be zero and means that incoming connection request from\r | |
116 | /// any port will be accepted. Its value can not be zero when\r | |
bdb140d7 | 117 | /// ActiveFlag is TRUE.\r |
bce46f7e | 118 | ///\r |
bdb140d7 | 119 | UINT16 RemotePort;\r |
bce46f7e | 120 | ///\r |
121 | /// Set it to TRUE to initiate an active open. Set it to FALSE to\r | |
bdb140d7 | 122 | /// initiate a passive open to act as a server.\r |
bce46f7e | 123 | ///\r |
bdb140d7 | 124 | BOOLEAN ActiveFlag;\r |
125 | } EFI_TCP6_ACCESS_POINT;\r | |
126 | \r | |
127 | ///\r | |
128 | /// EFI_TCP6_OPTION\r | |
129 | ///\r | |
130 | typedef struct {\r | |
bce46f7e | 131 | ///\r |
bdb140d7 | 132 | /// The size of the TCP receive buffer.\r |
bce46f7e | 133 | ///\r |
bdb140d7 | 134 | UINT32 ReceiveBufferSize;\r |
bce46f7e | 135 | ///\r |
bdb140d7 | 136 | /// The size of the TCP send buffer.\r |
bce46f7e | 137 | ///\r |
bdb140d7 | 138 | UINT32 SendBufferSize;\r |
bce46f7e | 139 | ///\r |
140 | /// The length of incoming connect request queue for a passive\r | |
bdb140d7 | 141 | /// instance. When set to zero, the value is implementation specific.\r |
bce46f7e | 142 | ///\r |
bdb140d7 | 143 | UINT32 MaxSynBackLog;\r |
bce46f7e | 144 | ///\r |
145 | /// The maximum seconds a TCP instance will wait for before a TCP\r | |
146 | /// connection established. When set to zero, the value is\r | |
bdb140d7 | 147 | /// implementation specific.\r |
bce46f7e | 148 | ///\r |
bdb140d7 | 149 | UINT32 ConnectionTimeout;\r |
150 | ///\r | |
bce46f7e | 151 | ///The number of times TCP will attempt to retransmit a packet on\r |
152 | ///an established connection. When set to zero, the value is\r | |
bdb140d7 | 153 | ///implementation specific.\r |
154 | ///\r | |
155 | UINT32 DataRetries;\r | |
bce46f7e | 156 | ///\r |
157 | /// How many seconds to wait in the FIN_WAIT_2 states for a final\r | |
158 | /// FIN flag before the TCP instance is closed. This timeout is in\r | |
159 | /// effective only if the application has called Close() to\r | |
160 | /// disconnect the connection completely. It is also called\r | |
161 | /// FIN_WAIT_2 timer in other implementations. When set to zero,\r | |
162 | /// it should be disabled because the FIN_WAIT_2 timer itself is\r | |
bdb140d7 | 163 | /// against the standard. The default value is 60.\r |
bce46f7e | 164 | ///\r |
bdb140d7 | 165 | UINT32 FinTimeout;\r |
bce46f7e | 166 | ///\r |
167 | /// How many seconds to wait in TIME_WAIT state before the TCP\r | |
168 | /// instance is closed. The timer is disabled completely to provide a\r | |
169 | /// method to close the TCP connection quickly if it is set to zero. It\r | |
bdb140d7 | 170 | /// is against the related RFC documents.\r |
bce46f7e | 171 | ///\r |
bdb140d7 | 172 | UINT32 TimeWaitTimeout;\r |
bce46f7e | 173 | ///\r |
174 | /// The maximum number of TCP keep-alive probes to send before\r | |
175 | /// giving up and resetting the connection if no response from the\r | |
bdb140d7 | 176 | /// other end. Set to zero to disable keep-alive probe.\r |
bce46f7e | 177 | ///\r |
bdb140d7 | 178 | UINT32 KeepAliveProbes;\r |
bce46f7e | 179 | ///\r |
180 | /// The number of seconds a connection needs to be idle before TCP\r | |
181 | /// sends out periodical keep-alive probes. When set to zero, the\r | |
bdb140d7 | 182 | /// value is implementation specific. It should be ignored if keep-\r |
183 | /// alive probe is disabled.\r | |
bce46f7e | 184 | ///\r |
bdb140d7 | 185 | UINT32 KeepAliveTime;\r |
bce46f7e | 186 | ///\r |
187 | /// The number of seconds between TCP keep-alive probes after the\r | |
188 | /// periodical keep-alive probe if no response. When set to zero, the\r | |
bdb140d7 | 189 | /// value is implementation specific. It should be ignored if keep-\r |
190 | /// alive probe is disabled.\r | |
bce46f7e | 191 | ///\r |
bdb140d7 | 192 | UINT32 KeepAliveInterval;\r |
bce46f7e | 193 | ///\r |
194 | /// Set it to TRUE to enable the Nagle algorithm as defined in\r | |
bdb140d7 | 195 | /// RFC896. Set it to FALSE to disable it.\r |
bce46f7e | 196 | ///\r |
bdb140d7 | 197 | BOOLEAN EnableNagle;\r |
bce46f7e | 198 | ///\r |
199 | /// Set it to TRUE to enable TCP timestamps option as defined in\r | |
bdb140d7 | 200 | /// RFC1323. Set to FALSE to disable it.\r |
bce46f7e | 201 | ///\r |
bdb140d7 | 202 | BOOLEAN EnableTimeStamp;\r |
bce46f7e | 203 | ///\r |
204 | /// Set it to TRUE to enable TCP window scale option as defined in\r | |
205 | /// RFC1323. Set it to FALSE to disable it.\r | |
206 | ///\r | |
bdb140d7 | 207 | BOOLEAN EnableWindowScaling;\r |
bce46f7e | 208 | ///\r |
209 | /// Set it to TRUE to enable selective acknowledge mechanism\r | |
210 | /// described in RFC 2018. Set it to FALSE to disable it.\r | |
211 | /// Implementation that supports SACK can optionally support\r | |
bdb140d7 | 212 | /// DSAK as defined in RFC 2883.\r |
bce46f7e | 213 | ///\r |
bdb140d7 | 214 | BOOLEAN EnableSelectiveAck;\r |
bce46f7e | 215 | ///\r |
216 | /// Set it to TRUE to enable path MTU discovery as defined in\r | |
bdb140d7 | 217 | /// RFC 1191. Set to FALSE to disable it.\r |
bce46f7e | 218 | ///\r |
bdb140d7 | 219 | BOOLEAN EnablePathMtuDiscovery;\r |
220 | } EFI_TCP6_OPTION;\r | |
221 | \r | |
222 | ///\r | |
223 | /// EFI_TCP6_CONFIG_DATA\r | |
224 | ///\r | |
225 | typedef struct {\r | |
226 | ///\r | |
227 | /// TrafficClass field in transmitted IPv6 packets.\r | |
228 | ///\r | |
229 | UINT8 TrafficClass;\r | |
230 | ///\r | |
231 | /// HopLimit field in transmitted IPv6 packets.\r | |
232 | ///\r | |
233 | UINT8 HopLimit;\r | |
234 | ///\r | |
bce46f7e | 235 | /// Used to specify TCP communication end settings for a TCP instance.\r |
bdb140d7 | 236 | ///\r |
237 | EFI_TCP6_ACCESS_POINT AccessPoint;\r | |
238 | ///\r | |
bce46f7e | 239 | /// Used to configure the advance TCP option for a connection. If set\r |
bdb140d7 | 240 | /// to NULL, implementation specific options for TCP connection will be used.\r |
241 | ///\r | |
242 | EFI_TCP6_OPTION *ControlOption;\r | |
243 | } EFI_TCP6_CONFIG_DATA;\r | |
244 | \r | |
245 | ///\r | |
246 | /// EFI_TCP6_CONNECTION_STATE\r | |
247 | ///\r | |
248 | typedef enum {\r | |
249 | Tcp6StateClosed = 0,\r | |
250 | Tcp6StateListen = 1,\r | |
251 | Tcp6StateSynSent = 2,\r | |
252 | Tcp6StateSynReceived = 3,\r | |
253 | Tcp6StateEstablished = 4,\r | |
254 | Tcp6StateFinWait1 = 5,\r | |
255 | Tcp6StateFinWait2 = 6,\r | |
256 | Tcp6StateClosing = 7,\r | |
257 | Tcp6StateTimeWait = 8,\r | |
258 | Tcp6StateCloseWait = 9,\r | |
259 | Tcp6StateLastAck = 10\r | |
260 | } EFI_TCP6_CONNECTION_STATE;\r | |
261 | \r | |
262 | ///\r | |
263 | /// EFI_TCP6_COMPLETION_TOKEN\r | |
bce46f7e | 264 | /// is used as a common header for various asynchronous tokens.\r |
bdb140d7 | 265 | ///\r |
266 | typedef struct {\r | |
267 | ///\r | |
bce46f7e | 268 | /// The Event to signal after request is finished and Status field is\r |
269 | /// updated by the EFI TCPv6 Protocol driver.\r | |
270 | ///\r | |
bdb140d7 | 271 | EFI_EVENT Event;\r |
272 | ///\r | |
bce46f7e | 273 | /// The result of the completed operation.\r |
bdb140d7 | 274 | ///\r |
275 | EFI_STATUS Status;\r | |
276 | } EFI_TCP6_COMPLETION_TOKEN;\r | |
277 | \r | |
278 | ///\r | |
279 | /// EFI_TCP6_CONNECTION_TOKEN\r | |
280 | /// will be set if the active open succeeds or an unexpected\r | |
281 | /// error happens.\r | |
282 | ///\r | |
283 | typedef struct {\r | |
284 | ///\r | |
bce46f7e | 285 | /// The Status in the CompletionToken will be set to one of\r |
286 | /// the following values if the active open succeeds or an unexpected\r | |
bdb140d7 | 287 | /// error happens:\r |
bce46f7e | 288 | /// EFI_SUCCESS: The active open succeeds and the instance's\r |
bdb140d7 | 289 | /// state is Tcp6StateEstablished.\r |
290 | /// EFI_CONNECTION_RESET: The connect fails because the connection is reset\r | |
291 | /// either by instance itself or the communication peer.\r | |
bce46f7e | 292 | /// EFI_CONNECTION_REFUSED: The receiving or transmission operation fails because this\r |
abbfadd7 | 293 | /// connection is refused.\r |
bdb140d7 | 294 | /// EFI_ABORTED: The active open is aborted.\r |
bce46f7e | 295 | /// EFI_TIMEOUT: The connection establishment timer expires and\r |
bdb140d7 | 296 | /// no more specific information is available.\r |
bce46f7e | 297 | /// EFI_NETWORK_UNREACHABLE: The active open fails because\r |
298 | /// an ICMP network unreachable error is received.\r | |
299 | /// EFI_HOST_UNREACHABLE: The active open fails because an\r | |
300 | /// ICMP host unreachable error is received.\r | |
301 | /// EFI_PROTOCOL_UNREACHABLE: The active open fails\r | |
bdb140d7 | 302 | /// because an ICMP protocol unreachable error is received.\r |
bce46f7e | 303 | /// EFI_PORT_UNREACHABLE: The connection establishment\r |
bdb140d7 | 304 | /// timer times out and an ICMP port unreachable error is received.\r |
bce46f7e | 305 | /// EFI_ICMP_ERROR: The connection establishment timer times\r |
bdb140d7 | 306 | /// out and some other ICMP error is received.\r |
307 | /// EFI_DEVICE_ERROR: An unexpected system or network error occurred.\r | |
308 | /// EFI_SECURITY_VIOLATION: The active open was failed because of IPSec policy check.\r | |
c5c3e7e2 | 309 | /// EFI_NO_MEDIA: There was a media error.\r |
bce46f7e | 310 | ///\r |
bdb140d7 | 311 | EFI_TCP6_COMPLETION_TOKEN CompletionToken;\r |
312 | } EFI_TCP6_CONNECTION_TOKEN;\r | |
313 | \r | |
314 | ///\r | |
315 | /// EFI_TCP6_LISTEN_TOKEN\r | |
316 | /// returns when list operation finishes.\r | |
317 | ///\r | |
318 | typedef struct {\r | |
319 | ///\r | |
bce46f7e | 320 | /// The Status in CompletionToken will be set to the\r |
bdb140d7 | 321 | /// following value if accept finishes:\r |
bce46f7e | 322 | /// EFI_SUCCESS: A remote peer has successfully established a\r |
323 | /// connection to this instance. A new TCP instance has also been\r | |
bdb140d7 | 324 | /// created for the connection.\r |
325 | /// EFI_CONNECTION_RESET: The accept fails because the connection is reset either\r | |
326 | /// by instance itself or communication peer.\r | |
327 | /// EFI_ABORTED: The accept request has been aborted.\r | |
328 | /// EFI_SECURITY_VIOLATION: The accept operation was failed because of IPSec policy check.\r | |
329 | ///\r | |
330 | EFI_TCP6_COMPLETION_TOKEN CompletionToken;\r | |
331 | EFI_HANDLE NewChildHandle;\r | |
332 | } EFI_TCP6_LISTEN_TOKEN;\r | |
333 | \r | |
334 | ///\r | |
335 | /// EFI_TCP6_FRAGMENT_DATA\r | |
bce46f7e | 336 | /// allows multiple receive or transmit buffers to be specified. The\r |
bdb140d7 | 337 | /// purpose of this structure is to provide scattered read and write.\r |
338 | ///\r | |
339 | typedef struct {\r | |
340 | UINT32 FragmentLength; ///< Length of data buffer in the fragment.\r | |
341 | VOID *FragmentBuffer; ///< Pointer to the data buffer in the fragment.\r | |
342 | } EFI_TCP6_FRAGMENT_DATA;\r | |
343 | \r | |
344 | ///\r | |
345 | /// EFI_TCP6_RECEIVE_DATA\r | |
bce46f7e | 346 | /// When TCPv6 driver wants to deliver received data to the application,\r |
bdb140d7 | 347 | /// it will pick up the first queued receiving token, update its\r |
348 | /// Token->Packet.RxData then signal the Token->CompletionToken.Event.\r | |
349 | ///\r | |
350 | typedef struct {\r | |
351 | ///\r | |
bce46f7e | 352 | /// Whether the data is urgent. When this flag is set, the instance is in\r |
353 | /// urgent mode.\r | |
bdb140d7 | 354 | ///\r |
355 | BOOLEAN UrgentFlag;\r | |
bce46f7e | 356 | ///\r |
357 | /// When calling Receive() function, it is the byte counts of all\r | |
358 | /// Fragmentbuffer in FragmentTable allocated by user.\r | |
359 | /// When the token is signaled by TCPv6 driver it is the length of\r | |
bdb140d7 | 360 | /// received data in the fragments.\r |
bce46f7e | 361 | ///\r |
bdb140d7 | 362 | UINT32 DataLength;\r |
bce46f7e | 363 | ///\r |
bdb140d7 | 364 | /// Number of fragments.\r |
bce46f7e | 365 | ///\r |
bdb140d7 | 366 | UINT32 FragmentCount;\r |
bce46f7e | 367 | ///\r |
bdb140d7 | 368 | /// An array of fragment descriptors.\r |
bce46f7e | 369 | ///\r |
bdb140d7 | 370 | EFI_TCP6_FRAGMENT_DATA FragmentTable[1];\r |
371 | } EFI_TCP6_RECEIVE_DATA;\r | |
372 | \r | |
373 | ///\r | |
374 | /// EFI_TCP6_TRANSMIT_DATA\r | |
375 | /// The EFI TCPv6 Protocol user must fill this data structure before sending a packet.\r | |
bce46f7e | 376 | /// The packet may contain multiple buffers in non-continuous memory locations.\r |
bdb140d7 | 377 | ///\r |
378 | typedef struct {\r | |
bce46f7e | 379 | ///\r |
380 | /// Push If TRUE, data must be transmitted promptly, and the PUSH bit in\r | |
381 | /// the last TCP segment created will be set. If FALSE, data\r | |
382 | /// transmission may be delayed to combine with data from\r | |
bdb140d7 | 383 | /// subsequent Transmit()s for efficiency.\r |
bce46f7e | 384 | ///\r |
bdb140d7 | 385 | BOOLEAN Push;\r |
bce46f7e | 386 | ///\r |
387 | /// The data in the fragment table are urgent and urgent point is in\r | |
bdb140d7 | 388 | /// effect if TRUE. Otherwise those data are NOT considered urgent.\r |
bce46f7e | 389 | ///\r |
bdb140d7 | 390 | BOOLEAN Urgent;\r |
391 | ///\r | |
bce46f7e | 392 | /// Length of the data in the fragments.\r |
bdb140d7 | 393 | ///\r |
394 | UINT32 DataLength;\r | |
395 | ///\r | |
396 | /// Number of fragments.\r | |
bce46f7e | 397 | ///\r |
bdb140d7 | 398 | UINT32 FragmentCount;\r |
399 | ///\r | |
400 | /// An array of fragment descriptors.\r | |
401 | ///\r | |
402 | EFI_TCP6_FRAGMENT_DATA FragmentTable[1];\r | |
403 | } EFI_TCP6_TRANSMIT_DATA;\r | |
404 | \r | |
405 | ///\r | |
406 | /// EFI_TCP6_IO_TOKEN\r | |
bce46f7e | 407 | /// returns When transmission finishes or meets any unexpected error.\r |
bdb140d7 | 408 | ///\r |
409 | typedef struct {\r | |
bce46f7e | 410 | ///\r |
411 | /// When transmission finishes or meets any unexpected error it will\r | |
bdb140d7 | 412 | /// be set to one of the following values:\r |
bce46f7e | 413 | /// EFI_SUCCESS: The receiving or transmission operation\r |
bdb140d7 | 414 | /// completes successfully.\r |
bce46f7e | 415 | /// EFI_CONNECTION_FIN: The receiving operation fails because the communication peer\r |
416 | /// has closed the connection and there is no more data in the\r | |
abbfadd7 | 417 | /// receive buffer of the instance.\r |
bdb140d7 | 418 | /// EFI_CONNECTION_RESET: The receiving or transmission operation fails\r |
bce46f7e | 419 | /// because this connection is reset either by instance\r |
bdb140d7 | 420 | /// itself or the communication peer.\r |
421 | /// EFI_ABORTED: The receiving or transmission is aborted.\r | |
bce46f7e | 422 | /// EFI_TIMEOUT: The transmission timer expires and no more\r |
bdb140d7 | 423 | /// specific information is available.\r |
bce46f7e | 424 | /// EFI_NETWORK_UNREACHABLE: The transmission fails\r |
425 | /// because an ICMP network unreachable error is received.\r | |
426 | /// EFI_HOST_UNREACHABLE: The transmission fails because an\r | |
427 | /// ICMP host unreachable error is received.\r | |
428 | /// EFI_PROTOCOL_UNREACHABLE: The transmission fails\r | |
429 | /// because an ICMP protocol unreachable error is received.\r | |
430 | /// EFI_PORT_UNREACHABLE: The transmission fails and an\r | |
431 | /// ICMP port unreachable error is received.\r | |
432 | /// EFI_ICMP_ERROR: The transmission fails and some other\r | |
433 | /// ICMP error is received.\r | |
bdb140d7 | 434 | /// EFI_DEVICE_ERROR: An unexpected system or network error occurs.\r |
bce46f7e | 435 | /// EFI_SECURITY_VIOLATION: The receiving or transmission\r |
bdb140d7 | 436 | /// operation was failed because of IPSec policy check\r |
c5c3e7e2 | 437 | /// EFI_NO_MEDIA: There was a media error.\r |
bdb140d7 | 438 | ///\r |
439 | EFI_TCP6_COMPLETION_TOKEN CompletionToken;\r | |
440 | union {\r | |
441 | ///\r | |
bce46f7e | 442 | /// When this token is used for receiving, RxData is a pointer to\r |
bdb140d7 | 443 | /// EFI_TCP6_RECEIVE_DATA.\r |
444 | ///\r | |
445 | EFI_TCP6_RECEIVE_DATA *RxData;\r | |
bce46f7e | 446 | ///\r |
447 | /// When this token is used for transmitting, TxData is a pointer to\r | |
bdb140d7 | 448 | /// EFI_TCP6_TRANSMIT_DATA.\r |
449 | ///\r | |
450 | EFI_TCP6_TRANSMIT_DATA *TxData;\r | |
451 | } Packet;\r | |
452 | } EFI_TCP6_IO_TOKEN;\r | |
453 | \r | |
454 | ///\r | |
455 | /// EFI_TCP6_CLOSE_TOKEN\r | |
456 | /// returns when close operation finishes.\r | |
457 | ///\r | |
458 | typedef struct {\r | |
459 | ///\r | |
bce46f7e | 460 | /// When close finishes or meets any unexpected error it will be set\r |
bdb140d7 | 461 | /// to one of the following values:\r |
462 | /// EFI_SUCCESS: The close operation completes successfully.\r | |
463 | /// EFI_ABORTED: User called configure with NULL without close stopping.\r | |
464 | /// EFI_SECURITY_VIOLATION: The close operation was failed because of IPSec policy check.\r | |
bce46f7e | 465 | ///\r |
bdb140d7 | 466 | EFI_TCP6_COMPLETION_TOKEN CompletionToken;\r |
bce46f7e | 467 | ///\r |
468 | /// Abort the TCP connection on close instead of the standard TCP\r | |
469 | /// close process when it is set to TRUE. This option can be used to\r | |
bdb140d7 | 470 | /// satisfy a fast disconnect.\r |
bce46f7e | 471 | ///\r |
bdb140d7 | 472 | BOOLEAN AbortOnClose;\r |
473 | } EFI_TCP6_CLOSE_TOKEN;\r | |
474 | \r | |
475 | /**\r | |
476 | Get the current operational status.\r | |
bce46f7e | 477 | \r |
bdb140d7 | 478 | The GetModeData() function copies the current operational settings of this EFI TCPv6\r |
479 | Protocol instance into user-supplied buffers. This function can also be used to retrieve\r | |
480 | the operational setting of underlying drivers such as IPv6, MNP, or SNP.\r | |
481 | \r | |
482 | @param[in] This Pointer to the EFI_TCP6_PROTOCOL instance.\r | |
483 | @param[out] Tcp6State The buffer in which the current TCP state is returned.\r | |
bce46f7e | 484 | @param[out] Tcp6ConfigData The buffer in which the current TCP configuration is returned.\r |
485 | @param[out] Ip6ModeData The buffer in which the current IPv6 configuration data used by\r | |
486 | the TCP instance is returned.\r | |
487 | @param[out] MnpConfigData The buffer in which the current MNP configuration data used\r | |
bdb140d7 | 488 | indirectly by the TCP instance is returned.\r |
bce46f7e | 489 | @param[out] SnpModeData The buffer in which the current SNP mode data used indirectly by\r |
bdb140d7 | 490 | the TCP instance is returned.\r |
491 | \r | |
492 | @retval EFI_SUCCESS The mode data was read.\r | |
493 | @retval EFI_NOT_STARTED No configuration data is available because this instance hasn't\r | |
494 | been started.\r | |
495 | @retval EFI_INVALID_PARAMETER This is NULL.\r | |
496 | \r | |
497 | **/\r | |
498 | typedef\r | |
499 | EFI_STATUS\r | |
5e6f3ee2 | 500 | (EFIAPI *EFI_TCP6_GET_MODE_DATA)(\r |
bdb140d7 | 501 | IN EFI_TCP6_PROTOCOL *This,\r |
502 | OUT EFI_TCP6_CONNECTION_STATE *Tcp6State OPTIONAL,\r | |
503 | OUT EFI_TCP6_CONFIG_DATA *Tcp6ConfigData OPTIONAL,\r | |
504 | OUT EFI_IP6_MODE_DATA *Ip6ModeData OPTIONAL,\r | |
505 | OUT EFI_MANAGED_NETWORK_CONFIG_DATA *MnpConfigData OPTIONAL,\r | |
506 | OUT EFI_SIMPLE_NETWORK_MODE *SnpModeData OPTIONAL\r | |
507 | );\r | |
508 | \r | |
509 | /**\r | |
510 | Initialize or brutally reset the operational parameters for this EFI TCPv6 instance.\r | |
511 | \r | |
512 | The Configure() function does the following:\r | |
513 | - Initialize this TCP instance, i.e., initialize the communication end settings and\r | |
514 | specify active open or passive open for an instance.\r | |
bce46f7e | 515 | - Reset this TCP instance brutally, i.e., cancel all pending asynchronous tokens, flush\r |
bdb140d7 | 516 | transmission and receiving buffer directly without informing the communication peer.\r |
517 | \r | |
518 | No other TCPv6 Protocol operation except Poll() can be executed by this instance until\r | |
519 | it is configured properly. For an active TCP instance, after a proper configuration it\r | |
bce46f7e | 520 | may call Connect() to initiates the three-way handshake. For a passive TCP instance,\r |
521 | its state will transit to Tcp6StateListen after configuration, and Accept() may be\r | |
bdb140d7 | 522 | called to listen the incoming TCP connection requests. If Tcp6ConfigData is set to NULL,\r |
523 | the instance is reset. Resetting process will be done brutally, the state machine will\r | |
524 | be set to Tcp6StateClosed directly, the receive queue and transmit queue will be flushed,\r | |
bce46f7e | 525 | and no traffic is allowed through this instance.\r |
bdb140d7 | 526 | \r |
527 | @param[in] This Pointer to the EFI_TCP6_PROTOCOL instance.\r | |
528 | @param[in] Tcp6ConfigData Pointer to the configure data to configure the instance.\r | |
529 | If Tcp6ConfigData is set to NULL, the instance is reset.\r | |
530 | \r | |
531 | @retval EFI_SUCCESS The operational settings are set, changed, or reset\r | |
532 | successfully.\r | |
bce46f7e | 533 | @retval EFI_NO_MAPPING The underlying IPv6 driver was responsible for choosing a source\r |
534 | address for this instance, but no source address was available for\r | |
bdb140d7 | 535 | use.\r |
536 | @retval EFI_INVALID_PARAMETER One or more of the following conditions are TRUE:\r | |
537 | - This is NULL.\r | |
bce46f7e | 538 | - Tcp6ConfigData->AccessPoint.StationAddress is neither zero nor\r |
bdb140d7 | 539 | one of the configured IP addresses in the underlying IPv6 driver.\r |
bce46f7e | 540 | - Tcp6ConfigData->AccessPoint.RemoteAddress isn't a valid unicast\r |
bdb140d7 | 541 | IPv6 address.\r |
bce46f7e | 542 | - Tcp6ConfigData->AccessPoint.RemoteAddress is zero or\r |
543 | Tcp6ConfigData->AccessPoint.RemotePort is zero when\r | |
bdb140d7 | 544 | Tcp6ConfigData->AccessPoint.ActiveFlag is TRUE.\r |
bce46f7e | 545 | - A same access point has been configured in other TCP\r |
bdb140d7 | 546 | instance properly.\r |
547 | @retval EFI_ACCESS_DENIED Configuring TCP instance when it is configured without\r | |
548 | calling Configure() with NULL to reset it.\r | |
549 | @retval EFI_UNSUPPORTED One or more of the control options are not supported in\r | |
550 | the implementation.\r | |
551 | @retval EFI_OUT_OF_RESOURCES Could not allocate enough system resources when\r | |
552 | executing Configure().\r | |
553 | @retval EFI_DEVICE_ERROR An unexpected network or system error occurred.\r | |
554 | \r | |
555 | **/\r | |
556 | typedef\r | |
557 | EFI_STATUS\r | |
5e6f3ee2 | 558 | (EFIAPI *EFI_TCP6_CONFIGURE)(\r |
bdb140d7 | 559 | IN EFI_TCP6_PROTOCOL *This,\r |
560 | IN EFI_TCP6_CONFIG_DATA *Tcp6ConfigData OPTIONAL\r | |
561 | );\r | |
562 | \r | |
563 | /**\r | |
564 | Initiate a nonblocking TCP connection request for an active TCP instance.\r | |
565 | \r | |
566 | The Connect() function will initiate an active open to the remote peer configured\r | |
567 | in current TCP instance if it is configured active. If the connection succeeds or\r | |
568 | fails due to any error, the ConnectionToken->CompletionToken.Event will be signaled\r | |
bce46f7e | 569 | and ConnectionToken->CompletionToken.Status will be updated accordingly. This\r |
570 | function can only be called for the TCP instance in Tcp6StateClosed state. The\r | |
571 | instance will transfer into Tcp6StateSynSent if the function returns EFI_SUCCESS.\r | |
bdb140d7 | 572 | If TCP three-way handshake succeeds, its state will become Tcp6StateEstablished,\r |
573 | otherwise, the state will return to Tcp6StateClosed.\r | |
574 | \r | |
575 | @param[in] This Pointer to the EFI_TCP6_PROTOCOL instance.\r | |
576 | @param[in] ConnectionToken Pointer to the connection token to return when the TCP three\r | |
577 | way handshake finishes.\r | |
578 | \r | |
bce46f7e | 579 | @retval EFI_SUCCESS The connection request is successfully initiated and the state of\r |
bdb140d7 | 580 | this TCP instance has been changed to Tcp6StateSynSent.\r |
581 | @retval EFI_NOT_STARTED This EFI TCPv6 Protocol instance has not been configured.\r | |
582 | @retval EFI_ACCESS_DENIED One or more of the following conditions are TRUE:\r | |
583 | - This instance is not configured as an active one.\r | |
584 | - This instance is not in Tcp6StateClosed state.\r | |
585 | @retval EFI_INVALID_PARAMETER One or more of the following are TRUE:\r | |
586 | - This is NULL.\r | |
587 | - ConnectionToken is NULL.\r | |
588 | - ConnectionToken->CompletionToken.Event is NULL.\r | |
589 | @retval EFI_OUT_OF_RESOURCES The driver can't allocate enough resource to initiate the active open.\r | |
590 | @retval EFI_DEVICE_ERROR An unexpected system or network error occurred.\r | |
591 | \r | |
592 | **/\r | |
593 | typedef\r | |
594 | EFI_STATUS\r | |
5e6f3ee2 | 595 | (EFIAPI *EFI_TCP6_CONNECT)(\r |
bdb140d7 | 596 | IN EFI_TCP6_PROTOCOL *This,\r |
597 | IN EFI_TCP6_CONNECTION_TOKEN *ConnectionToken\r | |
598 | );\r | |
599 | \r | |
600 | /**\r | |
bce46f7e | 601 | Listen on the passive instance to accept an incoming connection request. This is a\r |
bdb140d7 | 602 | nonblocking operation.\r |
bce46f7e | 603 | \r |
604 | The Accept() function initiates an asynchronous accept request to wait for an incoming\r | |
605 | connection on the passive TCP instance. If a remote peer successfully establishes a\r | |
bdb140d7 | 606 | connection with this instance, a new TCP instance will be created and its handle will\r |
607 | be returned in ListenToken->NewChildHandle. The newly created instance is configured\r | |
608 | by inheriting the passive instance's configuration and is ready for use upon return.\r | |
609 | The new instance is in the Tcp6StateEstablished state.\r | |
610 | \r | |
bce46f7e | 611 | The ListenToken->CompletionToken.Event will be signaled when a new connection is\r |
612 | accepted, user aborts the listen or connection is reset.\r | |
bdb140d7 | 613 | \r |
bce46f7e | 614 | This function only can be called when current TCP instance is in Tcp6StateListen state.\r |
bdb140d7 | 615 | \r |
616 | @param[in] This Pointer to the EFI_TCP6_PROTOCOL instance.\r | |
617 | @param[in] ListenToken Pointer to the listen token to return when operation finishes.\r | |
bce46f7e | 618 | \r |
619 | \r | |
bdb140d7 | 620 | @retval EFI_SUCCESS The listen token has been queued successfully.\r |
621 | @retval EFI_NOT_STARTED This EFI TCPv6 Protocol instance has not been configured.\r | |
622 | @retval EFI_ACCESS_DENIED One or more of the following are TRUE:\r | |
623 | - This instance is not a passive instance.\r | |
624 | - This instance is not in Tcp6StateListen state.\r | |
625 | - The same listen token has already existed in the listen\r | |
626 | token queue of this TCP instance.\r | |
627 | @retval EFI_INVALID_PARAMETER One or more of the following are TRUE:\r | |
628 | - This is NULL.\r | |
629 | - ListenToken is NULL.\r | |
630 | - ListentToken->CompletionToken.Event is NULL.\r | |
631 | @retval EFI_OUT_OF_RESOURCES Could not allocate enough resource to finish the operation.\r | |
632 | @retval EFI_DEVICE_ERROR Any unexpected and not belonged to above category error.\r | |
633 | \r | |
634 | **/\r | |
635 | typedef\r | |
636 | EFI_STATUS\r | |
5e6f3ee2 | 637 | (EFIAPI *EFI_TCP6_ACCEPT)(\r |
bdb140d7 | 638 | IN EFI_TCP6_PROTOCOL *This,\r |
639 | IN EFI_TCP6_LISTEN_TOKEN *ListenToken\r | |
640 | );\r | |
641 | \r | |
642 | /**\r | |
643 | Queues outgoing data into the transmit queue.\r | |
644 | \r | |
645 | The Transmit() function queues a sending request to this TCP instance along with the\r | |
bce46f7e | 646 | user data. The status of the token is updated and the event in the token will be\r |
bdb140d7 | 647 | signaled once the data is sent out or some error occurs.\r |
648 | \r | |
649 | @param[in] This Pointer to the EFI_TCP6_PROTOCOL instance.\r | |
650 | @param[in] Token Pointer to the completion token to queue to the transmit queue.\r | |
651 | \r | |
652 | @retval EFI_SUCCESS The data has been queued for transmission.\r | |
653 | @retval EFI_NOT_STARTED This EFI TCPv6 Protocol instance has not been configured.\r | |
bce46f7e | 654 | @retval EFI_NO_MAPPING The underlying IPv6 driver was responsible for choosing a\r |
655 | source address for this instance, but no source address was\r | |
bdb140d7 | 656 | available for use.\r |
657 | @retval EFI_INVALID_PARAMETER One or more of the following are TRUE:\r | |
658 | - This is NULL.\r | |
659 | - Token is NULL.\r | |
660 | - Token->CompletionToken.Event is NULL.\r | |
661 | - Token->Packet.TxData is NULL.\r | |
662 | - Token->Packet.FragmentCount is zero.\r | |
663 | - Token->Packet.DataLength is not equal to the sum of fragment lengths.\r | |
664 | @retval EFI_ACCESS_DENIED One or more of the following conditions are TRUE:\r | |
bce46f7e | 665 | - A transmit completion token with the same Token->\r |
666 | CompletionToken.Event was already in the\r | |
bdb140d7 | 667 | transmission queue.\r |
668 | - The current instance is in Tcp6StateClosed state.\r | |
bce46f7e | 669 | - The current instance is a passive one and it is in\r |
bdb140d7 | 670 | Tcp6StateListen state.\r |
671 | - User has called Close() to disconnect this connection.\r | |
672 | @retval EFI_NOT_READY The completion token could not be queued because the\r | |
673 | transmit queue is full.\r | |
674 | @retval EFI_OUT_OF_RESOURCES Could not queue the transmit data because of resource\r | |
675 | shortage.\r | |
676 | @retval EFI_NETWORK_UNREACHABLE There is no route to the destination network or address.\r | |
677 | \r | |
678 | **/\r | |
679 | typedef\r | |
680 | EFI_STATUS\r | |
5e6f3ee2 | 681 | (EFIAPI *EFI_TCP6_TRANSMIT)(\r |
bdb140d7 | 682 | IN EFI_TCP6_PROTOCOL *This,\r |
683 | IN EFI_TCP6_IO_TOKEN *Token\r | |
684 | );\r | |
685 | \r | |
686 | /**\r | |
687 | Places an asynchronous receive request into the receiving queue.\r | |
688 | \r | |
bce46f7e | 689 | The Receive() function places a completion token into the receive packet queue. This\r |
bdb140d7 | 690 | function is always asynchronous. The caller must allocate the Token->CompletionToken.Event\r |
bce46f7e | 691 | and the FragmentBuffer used to receive data. The caller also must fill the DataLength which\r |
692 | represents the whole length of all FragmentBuffer. When the receive operation completes, the\r | |
bdb140d7 | 693 | EFI TCPv6 Protocol driver updates the Token->CompletionToken.Status and Token->Packet.RxData\r |
694 | fields and the Token->CompletionToken.Event is signaled. If got data the data and its length\r | |
695 | will be copied into the FragmentTable, at the same time the full length of received data will\r | |
696 | be recorded in the DataLength fields. Providing a proper notification function and context\r | |
bce46f7e | 697 | for the event will enable the user to receive the notification and receiving status. That\r |
bdb140d7 | 698 | notification function is guaranteed to not be re-entered.\r |
699 | \r | |
700 | @param[in] This Pointer to the EFI_TCP6_PROTOCOL instance.\r | |
701 | @param[in] Token Pointer to a token that is associated with the receive data\r | |
702 | descriptor.\r | |
703 | \r | |
704 | @retval EFI_SUCCESS The receive completion token was cached.\r | |
705 | @retval EFI_NOT_STARTED This EFI TCPv6 Protocol instance has not been configured.\r | |
bce46f7e | 706 | @retval EFI_NO_MAPPING The underlying IPv6 driver was responsible for choosing a source\r |
bdb140d7 | 707 | address for this instance, but no source address was available for use.\r |
708 | @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:\r | |
709 | - This is NULL.\r | |
710 | - Token is NULL.\r | |
711 | - Token->CompletionToken.Event is NULL.\r | |
712 | - Token->Packet.RxData is NULL.\r | |
713 | - Token->Packet.RxData->DataLength is 0.\r | |
bce46f7e | 714 | - The Token->Packet.RxData->DataLength is not the\r |
bdb140d7 | 715 | sum of all FragmentBuffer length in FragmentTable.\r |
716 | @retval EFI_OUT_OF_RESOURCES The receive completion token could not be queued due to a lack of\r | |
717 | system resources (usually memory).\r | |
bce46f7e | 718 | @retval EFI_DEVICE_ERROR An unexpected system or network error occurred.\r |
bdb140d7 | 719 | The EFI TCPv6 Protocol instance has been reset to startup defaults.\r |
720 | @retval EFI_ACCESS_DENIED One or more of the following conditions is TRUE:\r | |
721 | - A receive completion token with the same Token->CompletionToken.Event\r | |
722 | was already in the receive queue.\r | |
723 | - The current instance is in Tcp6StateClosed state.\r | |
bce46f7e | 724 | - The current instance is a passive one and it is in\r |
bdb140d7 | 725 | Tcp6StateListen state.\r |
726 | - User has called Close() to disconnect this connection.\r | |
bce46f7e | 727 | @retval EFI_CONNECTION_FIN The communication peer has closed the connection and there is no\r |
bdb140d7 | 728 | any buffered data in the receive buffer of this instance\r |
729 | @retval EFI_NOT_READY The receive request could not be queued because the receive queue is full.\r | |
730 | \r | |
731 | **/\r | |
732 | typedef\r | |
733 | EFI_STATUS\r | |
5e6f3ee2 | 734 | (EFIAPI *EFI_TCP6_RECEIVE)(\r |
bdb140d7 | 735 | IN EFI_TCP6_PROTOCOL *This,\r |
736 | IN EFI_TCP6_IO_TOKEN *Token\r | |
737 | );\r | |
738 | \r | |
739 | /**\r | |
740 | Disconnecting a TCP connection gracefully or reset a TCP connection. This function is a\r | |
741 | nonblocking operation.\r | |
742 | \r | |
bce46f7e | 743 | Initiate an asynchronous close token to TCP driver. After Close() is called, any buffered\r |
744 | transmission data will be sent by TCP driver and the current instance will have a graceful close\r | |
745 | working flow described as RFC 793 if AbortOnClose is set to FALSE, otherwise, a rest packet\r | |
746 | will be sent by TCP driver to fast disconnect this connection. When the close operation completes\r | |
747 | successfully the TCP instance is in Tcp6StateClosed state, all pending asynchronous\r | |
bdb140d7 | 748 | operations are signaled and any buffers used for TCP network traffic are flushed.\r |
749 | \r | |
750 | @param[in] This Pointer to the EFI_TCP6_PROTOCOL instance.\r | |
751 | @param[in] CloseToken Pointer to the close token to return when operation finishes.\r | |
bce46f7e | 752 | \r |
bdb140d7 | 753 | @retval EFI_SUCCESS The Close() is called successfully.\r |
754 | @retval EFI_NOT_STARTED This EFI TCPv6 Protocol instance has not been configured.\r | |
755 | @retval EFI_ACCESS_DENIED One or more of the following are TRUE:\r | |
756 | - CloseToken or CloseToken->CompletionToken.Event is already in use.\r | |
757 | - Previous Close() call on this instance has not finished.\r | |
758 | @retval EFI_INVALID_PARAMETER One or more of the following are TRUE:\r | |
759 | - This is NULL.\r | |
760 | - CloseToken is NULL.\r | |
761 | - CloseToken->CompletionToken.Event is NULL.\r | |
762 | @retval EFI_OUT_OF_RESOURCES Could not allocate enough resource to finish the operation.\r | |
763 | @retval EFI_DEVICE_ERROR Any unexpected and not belonged to above category error.\r | |
764 | \r | |
765 | **/\r | |
766 | typedef\r | |
767 | EFI_STATUS\r | |
5e6f3ee2 | 768 | (EFIAPI *EFI_TCP6_CLOSE)(\r |
bdb140d7 | 769 | IN EFI_TCP6_PROTOCOL *This,\r |
770 | IN EFI_TCP6_CLOSE_TOKEN *CloseToken\r | |
771 | );\r | |
772 | \r | |
773 | /**\r | |
774 | Abort an asynchronous connection, listen, transmission or receive request.\r | |
775 | \r | |
bce46f7e | 776 | The Cancel() function aborts a pending connection, listen, transmit or\r |
bdb140d7 | 777 | receive request.\r |
778 | \r | |
779 | If Token is not NULL and the token is in the connection, listen, transmission\r | |
bce46f7e | 780 | or receive queue when it is being cancelled, its Token->Status will be set\r |
bdb140d7 | 781 | to EFI_ABORTED and then Token->Event will be signaled.\r |
782 | \r | |
bce46f7e | 783 | If the token is not in one of the queues, which usually means that the\r |
bdb140d7 | 784 | asynchronous operation has completed, EFI_NOT_FOUND is returned.\r |
785 | \r | |
786 | If Token is NULL all asynchronous token issued by Connect(), Accept(),\r | |
787 | Transmit() and Receive() will be aborted.\r | |
788 | \r | |
789 | @param[in] This Pointer to the EFI_TCP6_PROTOCOL instance.\r | |
790 | @param[in] Token Pointer to a token that has been issued by\r | |
791 | EFI_TCP6_PROTOCOL.Connect(),\r | |
792 | EFI_TCP6_PROTOCOL.Accept(),\r | |
793 | EFI_TCP6_PROTOCOL.Transmit() or\r | |
794 | EFI_TCP6_PROTOCOL.Receive(). If NULL, all pending\r | |
795 | tokens issued by above four functions will be aborted. Type\r | |
796 | EFI_TCP6_COMPLETION_TOKEN is defined in\r | |
797 | EFI_TCP_PROTOCOL.Connect().\r | |
798 | \r | |
bce46f7e | 799 | @retval EFI_SUCCESS The asynchronous I/O request is aborted and Token->Event\r |
800 | is signaled.\r | |
bdb140d7 | 801 | @retval EFI_INVALID_PARAMETER This is NULL.\r |
802 | @retval EFI_NOT_STARTED This instance hasn't been configured.\r | |
bce46f7e | 803 | @retval EFI_NOT_FOUND The asynchronous I/O request isn't found in the transmission or\r |
804 | receive queue. It has either completed or wasn't issued by\r | |
bdb140d7 | 805 | Transmit() and Receive().\r |
abbfadd7 | 806 | @retval EFI_UNSUPPORTED The implementation does not support this function.\r |
bdb140d7 | 807 | \r |
808 | **/\r | |
809 | typedef\r | |
810 | EFI_STATUS\r | |
5e6f3ee2 | 811 | (EFIAPI *EFI_TCP6_CANCEL)(\r |
bdb140d7 | 812 | IN EFI_TCP6_PROTOCOL *This,\r |
813 | IN EFI_TCP6_COMPLETION_TOKEN *Token OPTIONAL\r | |
814 | );\r | |
815 | \r | |
816 | /**\r | |
817 | Poll to receive incoming data and transmit outgoing segments.\r | |
818 | \r | |
819 | The Poll() function increases the rate that data is moved between the network\r | |
820 | and application and can be called when the TCP instance is created successfully.\r | |
821 | Its use is optional.\r | |
822 | \r | |
823 | @param[in] This Pointer to the EFI_TCP6_PROTOCOL instance.\r | |
824 | \r | |
825 | @retval EFI_SUCCESS Incoming or outgoing data was processed.\r | |
826 | @retval EFI_INVALID_PARAMETER This is NULL.\r | |
827 | @retval EFI_DEVICE_ERROR An unexpected system or network error occurred.\r | |
828 | @retval EFI_NOT_READY No incoming or outgoing data is processed.\r | |
829 | @retval EFI_TIMEOUT Data was dropped out of the transmission or receive queue.\r | |
830 | Consider increasing the polling rate.\r | |
831 | \r | |
832 | **/\r | |
833 | typedef\r | |
834 | EFI_STATUS\r | |
5e6f3ee2 | 835 | (EFIAPI *EFI_TCP6_POLL)(\r |
bdb140d7 | 836 | IN EFI_TCP6_PROTOCOL *This\r |
837 | );\r | |
838 | \r | |
839 | ///\r | |
bce46f7e | 840 | /// EFI_TCP6_PROTOCOL\r |
bdb140d7 | 841 | /// defines the EFI TCPv6 Protocol child to be used by any network drivers or\r |
bce46f7e | 842 | /// applications to send or receive data stream. It can either listen on a\r |
bdb140d7 | 843 | /// specified port as a service or actively connect to remote peer as a client.\r |
bce46f7e | 844 | /// Each instance has its own independent settings.\r |
bdb140d7 | 845 | ///\r |
5e6f3ee2 | 846 | struct _EFI_TCP6_PROTOCOL {\r |
bdb140d7 | 847 | EFI_TCP6_GET_MODE_DATA GetModeData;\r |
848 | EFI_TCP6_CONFIGURE Configure;\r | |
849 | EFI_TCP6_CONNECT Connect;\r | |
850 | EFI_TCP6_ACCEPT Accept;\r | |
851 | EFI_TCP6_TRANSMIT Transmit;\r | |
852 | EFI_TCP6_RECEIVE Receive;\r | |
853 | EFI_TCP6_CLOSE Close;\r | |
854 | EFI_TCP6_CANCEL Cancel;\r | |
855 | EFI_TCP6_POLL Poll;\r | |
5e6f3ee2 | 856 | };\r |
bdb140d7 | 857 | \r |
858 | extern EFI_GUID gEfiTcp6ServiceBindingProtocolGuid;\r | |
859 | extern EFI_GUID gEfiTcp6ProtocolGuid;\r | |
860 | \r | |
861 | #endif\r | |
862 | \r |