]> git.proxmox.com Git - mirror_edk2.git/blame - NetworkPkg/Mtftp6Dxe/Mtftp6Impl.h
NetworkPkg/Mtftp6Dxe: Support windowsize in read request operation.
[mirror_edk2.git] / NetworkPkg / Mtftp6Dxe / Mtftp6Impl.h
CommitLineData
a3bcde70
HT
1/** @file\r
2 Mtftp6 internal data structure and definition declaration.\r
3\r
f3427f12 4 Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved. <BR>\r
a3bcde70
HT
5\r
6 This program and the accompanying materials\r
7 are licensed and made available under the terms and conditions of the BSD License\r
8 which accompanies this distribution. The full text of the license may be found at\r
9 http://opensource.org/licenses/bsd-license.php.\r
10\r
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
13\r
14**/\r
15\r
16#ifndef __EFI_MTFTP6_IMPL_H__\r
17#define __EFI_MTFTP6_IMPL_H__\r
18\r
19#include <Uefi.h>\r
20\r
21#include <Protocol/Udp6.h>\r
22#include <Protocol/Mtftp6.h>\r
23#include <Protocol/ServiceBinding.h>\r
24#include <Protocol/DriverBinding.h>\r
25\r
26#include <Library/DebugLib.h>\r
27#include <Library/UefiDriverEntryPoint.h>\r
28#include <Library/UefiBootServicesTableLib.h>\r
29#include <Library/UefiLib.h>\r
30#include <Library/BaseLib.h>\r
31#include <Library/NetLib.h>\r
216f7970 32#include <Library/PrintLib.h>\r
a3bcde70
HT
33\r
34typedef struct _MTFTP6_SERVICE MTFTP6_SERVICE;\r
35typedef struct _MTFTP6_INSTANCE MTFTP6_INSTANCE;\r
36\r
37#include "Mtftp6Driver.h"\r
38#include "Mtftp6Option.h"\r
39#include "Mtftp6Support.h"\r
40\r
41#define MTFTP6_SERVICE_SIGNATURE SIGNATURE_32 ('M', 'F', '6', 'S')\r
42#define MTFTP6_INSTANCE_SIGNATURE SIGNATURE_32 ('M', 'F', '6', 'I')\r
43\r
44#define MTFTP6_DEFAULT_SERVER_CMD_PORT 69\r
45#define MTFTP6_DEFAULT_TIMEOUT 3\r
46#define MTFTP6_GET_MAPPING_TIMEOUT 3\r
47#define MTFTP6_DEFAULT_MAX_RETRY 5\r
48#define MTFTP6_DEFAULT_BLK_SIZE 512\r
f3427f12 49#define MTFTP6_DEFAULT_WINDOWSIZE 1\r
a3bcde70
HT
50#define MTFTP6_TICK_PER_SECOND 10000000U\r
51\r
52#define MTFTP6_SERVICE_FROM_THIS(a) CR (a, MTFTP6_SERVICE, ServiceBinding, MTFTP6_SERVICE_SIGNATURE)\r
53#define MTFTP6_INSTANCE_FROM_THIS(a) CR (a, MTFTP6_INSTANCE, Mtftp6, MTFTP6_INSTANCE_SIGNATURE)\r
54\r
55extern EFI_MTFTP6_PROTOCOL gMtftp6ProtocolTemplate;\r
56\r
57typedef struct _MTFTP6_GETINFO_CONTEXT{\r
58 EFI_MTFTP6_PACKET **Packet;\r
59 UINT32 *PacketLen;\r
60 EFI_STATUS Status;\r
61} MTFTP6_GETINFO_CONTEXT;\r
62\r
63//\r
64// Control block for MTFTP6 instance, it's per configuration data.\r
65//\r
66struct _MTFTP6_INSTANCE {\r
67 UINT32 Signature;\r
68 EFI_HANDLE Handle;\r
69 LIST_ENTRY Link;\r
70 EFI_MTFTP6_PROTOCOL Mtftp6;\r
71 MTFTP6_SERVICE *Service;\r
72 EFI_MTFTP6_CONFIG_DATA *Config;\r
73\r
74 EFI_MTFTP6_TOKEN *Token;\r
75 MTFTP6_EXT_OPTION_INFO ExtInfo;\r
76\r
77 UINT16 BlkSize;\r
78 UINT16 LastBlk;\r
79 LIST_ENTRY BlkList;\r
80\r
f3427f12
JW
81 UINT16 Operation;\r
82\r
83 UINT16 WindowSize;\r
84\r
85 //\r
86 // Record the total received block number and the already acked block number.\r
87 //\r
88 UINT64 TotalBlock;\r
89 UINT64 AckedBlock;\r
90\r
a3bcde70
HT
91 EFI_IPv6_ADDRESS ServerIp;\r
92 UINT16 ServerCmdPort;\r
93 UINT16 ServerDataPort;\r
94 UDP_IO *UdpIo;\r
95\r
96 EFI_IPv6_ADDRESS McastIp;\r
97 UINT16 McastPort;\r
98 UDP_IO *McastUdpIo;\r
99\r
100 NET_BUF *LastPacket;\r
101 UINT32 CurRetry;\r
102 UINT32 MaxRetry;\r
103 UINT32 PacketToLive;\r
104 UINT32 Timeout;\r
105\r
106 EFI_TPL OldTpl;\r
107 BOOLEAN IsTransmitted;\r
108 BOOLEAN IsMaster;\r
75dce340 109 BOOLEAN InDestroy;\r
a3bcde70
HT
110};\r
111\r
112//\r
113// Control block for MTFTP6 service, it's per Nic handle.\r
114//\r
115struct _MTFTP6_SERVICE {\r
116 UINT32 Signature;\r
117 EFI_SERVICE_BINDING_PROTOCOL ServiceBinding;\r
118 EFI_HANDLE Controller;\r
119 EFI_HANDLE Image;\r
120\r
121 UINT16 ChildrenNum;\r
122 LIST_ENTRY Children;\r
123 //\r
124 // It is used to be as internal calculagraph for all instances.\r
125 //\r
126 EFI_EVENT Timer;\r
127 //\r
128 // It is used to maintain the parent-child relationship between\r
129 // mtftp driver and udp driver.\r
130 //\r
131 UDP_IO *DummyUdpIo;\r
a3bcde70
HT
132};\r
133\r
216f7970 134typedef struct {\r
135 EFI_SERVICE_BINDING_PROTOCOL *ServiceBinding;\r
136 UINTN NumberOfChildren;\r
137 EFI_HANDLE *ChildHandleBuffer;\r
138} MTFTP6_DESTROY_CHILD_IN_HANDLE_BUF_CONTEXT;\r
139\r
a3bcde70
HT
140/**\r
141 Returns the current operating mode data for the MTFTP6 instance.\r
142\r
143 The GetModeData() function returns the current operating mode and\r
144 cached data packet for the MTFTP6 instance.\r
145\r
146 @param[in] This Pointer to the EFI_MTFTP6_PROTOCOL instance.\r
147 @param[out] ModeData The buffer in which the EFI MTFTPv6 Protocol driver mode\r
148 data is returned.\r
149\r
150 @retval EFI_SUCCESS The configuration data was returned successfully.\r
151 @retval EFI_OUT_OF_RESOURCES The required mode data could not be allocated.\r
152 @retval EFI_INVALID_PARAMETER This is NULL, or ModeData is NULL.\r
153\r
154**/\r
155EFI_STATUS\r
156EFIAPI\r
157EfiMtftp6GetModeData (\r
158 IN EFI_MTFTP6_PROTOCOL *This,\r
159 OUT EFI_MTFTP6_MODE_DATA *ModeData\r
160 );\r
161\r
162/**\r
163 Initializes, changes, or resets the default operational setting for\r
164 this EFI MTFTPv6 Protocol driver instance.\r
165\r
166 The Configure() function is used to set and change the configuration\r
167 data for this EFI MTFTPv6 Protocol driver instance. The configuration\r
168 data can be reset to startup defaults by calling Configure() with\r
169 MtftpConfigData set to NULL. Whenever the instance is reset, any\r
170 pending operation is aborted. By changing the EFI MTFTPv6 Protocol\r
171 driver instance configuration data, the client can connect to\r
172 different MTFTPv6 servers. The configuration parameters in\r
173 MtftpConfigData are used as the default parameters in later MTFTPv6\r
174 operations and can be overridden in later operations.\r
175\r
176 @param[in] This Pointer to the EFI_MTFTP6_PROTOCOL instance.\r
177 @param[in] MtftpConfigData Pointer to the configuration data structure.\r
178\r
179 @retval EFI_SUCCESS The EFI MTFTPv6 Protocol instance was configured successfully.\r
180 @retval EFI_INVALID_PARAMETER One or more following conditions are TRUE:\r
181 - This is NULL.\r
182 - MtftpConfigData.StationIp is neither zero nor one\r
183 of the configured IP addresses in the underlying IPv6 driver.\r
184 - MtftpCofigData.ServerIp is not a valid IPv6 unicast address.\r
185 Note: It does not match the UEFI 2.3 Specification.\r
186 @retval EFI_ACCESS_DENIED - The configuration could not be changed at this time because there\r
187 is some MTFTP background operation in progress.\r
188 - MtftpCofigData.LocalPort is already in use.\r
189 Note: It does not match the UEFI 2.3 Specification.\r
190 @retval EFI_NO_MAPPING The underlying IPv6 driver was responsible for choosing a source\r
191 address for this instance, but no source address was available for use.\r
192 @retval EFI_OUT_OF_RESOURCES The EFI MTFTPv6 Protocol driver instance data could not be\r
193 allocated.\r
194 Note: It is not defined in the UEFI 2.3 Specification.\r
195 @retval EFI_DEVICE_ERROR An unexpected system or network error occurred. The EFI\r
196 MTFTPv6 Protocol driver instance is not configured.\r
197 Note: It is not defined in the UEFI 2.3 Specification.\r
198\r
199**/\r
200EFI_STATUS\r
201EFIAPI\r
202EfiMtftp6Configure (\r
203 IN EFI_MTFTP6_PROTOCOL *This,\r
204 IN EFI_MTFTP6_CONFIG_DATA *MtftpConfigData OPTIONAL\r
205 );\r
206\r
207/**\r
208 Get the information of the download from the server.\r
209\r
210 The GetInfo() function assembles an MTFTPv6 request packet\r
211 with options, sends it to the MTFTPv6 server, and may return\r
212 an MTFTPv6 OACK, MTFTPv6 ERROR, or ICMP ERROR packet. Retries\r
213 occur only if no response packets are received from the MTFTPv6\r
214 server before the timeout expires.\r
215\r
216 @param[in] This Pointer to the EFI_MTFTP6_PROTOCOL instance.\r
217 @param[in] OverrideData Data that is used to override the existing parameters. If NULL, the\r
218 default parameters that were set in the EFI_MTFTP6_PROTOCOL.Configure()\r
219 function are used.\r
4f077902
SZ
220 @param[in] Filename Pointer to null-terminated ASCII file name string.\r
221 @param[in] ModeStr Pointer to null-terminated ASCII mode string. If NULL, octet will be used\r
a3bcde70
HT
222 @param[in] OptionCount Number of option/value string pairs in OptionList.\r
223 @param[in] OptionList Pointer to array of option/value string pairs. Ignored if\r
224 OptionCount is zero.\r
225 @param[out] PacketLength The number of bytes in the returned packet.\r
226 @param[out] Packet The pointer to the received packet. This buffer must be freed by\r
227 the caller.\r
228\r
229 @retval EFI_SUCCESS An MTFTPv6 OACK packet was received and is in the Packet.\r
230 Note: It does not match the UEFI 2.3 Specification.\r
231 @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:\r
232 - This is NULL.\r
233 - Filename is NULL.\r
234 - OptionCount is not zero and OptionList is NULL.\r
235 - One or more options in OptionList have wrong format.\r
236 - PacketLength is NULL.\r
237 - OverrideData.ServerIp is not a valid unicast IPv6 address.\r
238 @retval EFI_UNSUPPORTED One or more options in the OptionList are unsupported by\r
239 this implementation.\r
240 @retval EFI_NOT_STARTED The EFI MTFTPv6 Protocol driver has not been started.\r
241 @retval EFI_NO_MAPPING The underlying IPv6 driver was responsible for choosing a source\r
242 address for this instance, but no source address was available for use.\r
243 @retval EFI_ACCESS_DENIED The previous operation has not completed yet.\r
244 @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.\r
245 @retval EFI_TFTP_ERROR An MTFTPv6 ERROR packet was received and is in the Packet.\r
246 @retval EFI_NETWORK_UNREACHABLE An ICMP network unreachable error packet was received, and the Packet is set to NULL.\r
247 Note: It is not defined in the UEFI 2.3 Specification.\r
248 @retval EFI_HOST_UNREACHABLE An ICMP host unreachable error packet was received, and the Packet is set to NULL.\r
249 Note: It is not defined in the UEFI 2.3 Specification.\r
250 @retval EFI_PROTOCOL_UNREACHABLE An ICMP protocol unreachable error packet was received, and the Packet is set to NULL.\r
251 Note: It is not defined in the UEFI 2.3 Specification.\r
252 @retval EFI_PORT_UNREACHABLE An ICMP port unreachable error packet was received, and the Packet is set to NULL.\r
253 @retval EFI_ICMP_ERROR Some other ICMP ERROR packet was received, and the Packet is set to NULL.\r
254 Note: It does not match the UEFI 2.3 Specification.\r
255 @retval EFI_PROTOCOL_ERROR An unexpected MTFTPv6 packet was received and is in the Packet.\r
256 @retval EFI_TIMEOUT No responses were received from the MTFTPv6 server.\r
257 @retval EFI_DEVICE_ERROR An unexpected network error or system error occurred.\r
258\r
259**/\r
260EFI_STATUS\r
261EFIAPI\r
262EfiMtftp6GetInfo (\r
263 IN EFI_MTFTP6_PROTOCOL *This,\r
264 IN EFI_MTFTP6_OVERRIDE_DATA *OverrideData OPTIONAL,\r
265 IN UINT8 *Filename,\r
266 IN UINT8 *ModeStr OPTIONAL,\r
267 IN UINT8 OptionCount,\r
268 IN EFI_MTFTP6_OPTION *OptionList OPTIONAL,\r
269 OUT UINT32 *PacketLength,\r
270 OUT EFI_MTFTP6_PACKET **Packet OPTIONAL\r
271 );\r
272\r
273/**\r
274 Parse the options in an MTFTPv6 OACK packet.\r
275\r
276 The ParseOptions() function parses the option fields in an MTFTPv6 OACK\r
277 packet and returns the number of options that were found, and optionally,\r
278 a list of pointers to the options in the packet. If one or more of the\r
279 option fields are not valid, then EFI_PROTOCOL_ERROR is returned and\r
280 *OptionCount and *OptionList stop at the last valid option.\r
281\r
282 @param[in] This Pointer to the EFI_MTFTP6_PROTOCOL instance.\r
283 @param[in] PacketLen Length of the OACK packet to be parsed.\r
284 @param[in] Packet Pointer to the OACK packet to be parsed.\r
285 @param[out] OptionCount Pointer to the number of options in the following OptionList.\r
286 @param[out] OptionList Pointer to EFI_MTFTP6_OPTION storage. Each pointer in the\r
287 OptionList points to the corresponding MTFTP option buffer\r
288 in the Packet. Call the EFI Boot Service FreePool() to\r
289 release the OptionList if the options in this OptionList\r
290 are not needed any more.\r
291\r
292 @retval EFI_SUCCESS The OACK packet was valid and the OptionCount, and\r
293 OptionList parameters have been updated.\r
294 @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:\r
295 - PacketLen is 0.\r
296 - Packet is NULL or Packet is not a valid MTFTPv6 packet.\r
297 - OptionCount is NULL.\r
298 @retval EFI_NOT_FOUND No options were found in the OACK packet.\r
299 @retval EFI_OUT_OF_RESOURCES Storage for the OptionList array can not be allocated.\r
300 @retval EFI_PROTOCOL_ERROR One or more of the option fields is invalid.\r
301\r
302**/\r
303EFI_STATUS\r
304EFIAPI\r
305EfiMtftp6ParseOptions (\r
306 IN EFI_MTFTP6_PROTOCOL *This,\r
307 IN UINT32 PacketLen,\r
308 IN EFI_MTFTP6_PACKET *Packet,\r
309 OUT UINT32 *OptionCount,\r
310 OUT EFI_MTFTP6_OPTION **OptionList OPTIONAL\r
311 );\r
312\r
313/**\r
314 Download a file from an MTFTPv6 server.\r
315\r
316 The ReadFile() function is used to initialize and start an MTFTPv6 download\r
317 process and optionally wait for completion. When the download operation\r
318 completes, whether successfully or not, the Token.Status field is updated\r
319 by the EFI MTFTPv6 Protocol driver, and then Token.Event is signaled if it\r
320 is not NULL.\r
321 Data can be downloaded from the MTFTPv6 server into either of the following\r
322 locations:\r
323 - A fixed buffer that is pointed to by Token.Buffer.\r
324 - A download service function that is pointed to by Token.CheckPacket.\r
325 If both Token.Buffer and Token.CheckPacket are used, then Token.CheckPacket\r
326 will be called first. If the call is successful, the packet will be stored\r
327 in Token.Buffer.\r
328\r
329 @param[in] This Pointer to the EFI_MTFTP6_PROTOCOL instance.\r
330 @param[in] Token Pointer to the token structure to provide the parameters that are\r
331 used in this operation.\r
332\r
333 @retval EFI_SUCCESS The data file has been transferred successfully.\r
334 @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.\r
335 @retval EFI_BUFFER_TOO_SMALL BufferSize is not zero but not large enough to hold the\r
336 downloaded data in downloading process.\r
337 Note: It does not match the UEFI 2.3 Specification.\r
338 @retval EFI_ABORTED Current operation is aborted by user.\r
339 @retval EFI_NETWORK_UNREACHABLE An ICMP network unreachable error packet was received.\r
340 Note: It is not defined in the UEFI 2.3 Specification.\r
341 @retval EFI_HOST_UNREACHABLE An ICMP host unreachable error packet was received.\r
342 Note: It is not defined in the UEFI 2.3 Specification.\r
343 @retval EFI_PROTOCOL_UNREACHABLE An ICMP protocol unreachable error packet was received.\r
344 Note: It is not defined in the UEFI 2.3 Specification.\r
345 @retval EFI_PORT_UNREACHABLE An ICMP port unreachable error packet was received.\r
346 Note: It is not defined in the UEFI 2.3 Specification.\r
347 @retval EFI_ICMP_ERROR An ICMP ERROR packet was received.\r
348 @retval EFI_TIMEOUT No responses were received from the MTFTPv6 server.\r
349 @retval EFI_TFTP_ERROR An MTFTPv6 ERROR packet was received.\r
350 @retval EFI_DEVICE_ERROR An unexpected network error or system error occurred.\r
351\r
352**/\r
353EFI_STATUS\r
354EFIAPI\r
355EfiMtftp6ReadFile (\r
356 IN EFI_MTFTP6_PROTOCOL *This,\r
357 IN EFI_MTFTP6_TOKEN *Token\r
358 );\r
359\r
360/**\r
361 Send a file to an MTFTPv6 server.\r
362\r
363 The WriteFile() function is used to initialize an uploading operation\r
364 with the given option list, and optionally, wait for completion. If one\r
365 or more of the options is not supported by the server, the unsupported\r
366 options are ignored and a standard TFTP process starts instead. When\r
367 the upload process completes, whether successfully or not, Token.Event\r
368 is signaled, and the EFI MTFTPv6 Protocol driver updates Token.Status.\r
369 The caller can supply the data to be uploaded in the following two modes:\r
370 - Through the user-provided buffer.\r
371 - Through a callback function.\r
372 With the user-provided buffer, the Token.BufferSize field indicates\r
373 the length of the buffer, and the driver will upload the data in the\r
374 buffer. With an EFI_MTFTP6_PACKET_NEEDED callback function, the driver\r
375 will call this callback function to get more data from the user to upload.\r
376\r
377 @param[in] This Pointer to the EFI_MTFTP6_PROTOCOL instance.\r
378 @param[in] Token Pointer to the token structure to provide the parameters that are\r
379 used in this operation.\r
380\r
381 @retval EFI_SUCCESS The upload session has started.\r
382 @retval EFI_UNSUPPORTED The operation is not supported by this implementation.\r
383 @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:\r
384 - This is NULL.\r
385 - Token is NULL.\r
386 - Token.Filename is NULL.\r
387 - Token.OptionCount is not zero and Token.OptionList is NULL.\r
388 - One or more options in Token.OptionList have wrong format.\r
389 - Token.Buffer and Token.PacketNeeded are both NULL.\r
390 - Token.OverrideData.ServerIp is not valid unicast IPv6 addresses.\r
391 @retval EFI_UNSUPPORTED One or more options in the Token.OptionList are not\r
392 supported by this implementation.\r
393 @retval EFI_NOT_STARTED The EFI MTFTPv6 Protocol driver has not been started.\r
394 @retval EFI_NO_MAPPING The underlying IPv6 driver was responsible for choosing a source\r
395 address for this instance, but no source address was available for use.\r
396 @retval EFI_ALREADY_STARTED This Token is already being used in another MTFTPv6 session.\r
397 @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.\r
398 @retval EFI_ACCESS_DENIED The previous operation has not completed yet.\r
399 @retval EFI_DEVICE_ERROR An unexpected network error or system error occurred.\r
400\r
401**/\r
402EFI_STATUS\r
403EFIAPI\r
404EfiMtftp6WriteFile (\r
405 IN EFI_MTFTP6_PROTOCOL *This,\r
406 IN EFI_MTFTP6_TOKEN *Token\r
407 );\r
408\r
409/**\r
410 Download a data file directory from an MTFTPv6 server.\r
411\r
412 The ReadDirectory() function is used to return a list of files on the\r
413 MTFTPv6 server that are logically (or operationally) related to\r
414 Token.Filename. The directory request packet that is sent to the server\r
415 is built with the option list that was provided by caller, if present.\r
416 The file information that the server returns is put into either of\r
417 the following locations:\r
418 - A fixed buffer that is pointed to by Token.Buffer.\r
419 - A download service function that is pointed to by Token.CheckPacket.\r
420 If both Token.Buffer and Token.CheckPacket are used, then Token.CheckPacket\r
421 will be called first. If the call is successful, the packet will be stored\r
422 in Token.Buffer.\r
423\r
424 @param[in] This Pointer to the EFI_MTFTP6_PROTOCOL instance.\r
425 @param[in] Token Pointer to the token structure to provide the parameters that are\r
426 used in this operation.\r
427\r
428 @retval EFI_SUCCESS The MTFTPv6 related file "directory" has been downloaded.\r
429 @retval EFI_UNSUPPORTED The EFI MTFTPv6 Protocol driver does not support this function.\r
430 @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:\r
431 - This is NULL.\r
432 - Token is NULL.\r
433 - Token.Filename is NULL.\r
434 - Token.OptionCount is not zero and Token.OptionList is NULL.\r
435 - One or more options in Token.OptionList have wrong format.\r
436 - Token.Buffer and Token.CheckPacket are both NULL.\r
437 - Token.OverrideData.ServerIp is not valid unicast IPv6 addresses.\r
438 @retval EFI_UNSUPPORTED One or more options in the Token.OptionList are not\r
439 supported by this implementation.\r
440 @retval EFI_NOT_STARTED The EFI MTFTPv6 Protocol driver has not been started.\r
441 @retval EFI_NO_MAPPING The underlying IPv6 driver was responsible for choosing a source\r
442 address for this instance, but no source address was available for use.\r
443 @retval EFI_ALREADY_STARTED This Token is already being used in another MTFTPv6 session.\r
444 @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.\r
445 @retval EFI_ACCESS_DENIED The previous operation has not completed yet.\r
446 @retval EFI_DEVICE_ERROR An unexpected network error or system error occurred.\r
447\r
448**/\r
449EFI_STATUS\r
450EFIAPI\r
451EfiMtftp6ReadDirectory (\r
452 IN EFI_MTFTP6_PROTOCOL *This,\r
453 IN EFI_MTFTP6_TOKEN *Token\r
454 );\r
455\r
456/**\r
457 Polls for incoming data packets and processes outgoing data packets.\r
458\r
459 The Poll() function can be used by network drivers and applications\r
460 to increase the rate that data packets are moved between the\r
461 communications device and the transmit and receive queues.In some\r
462 systems, the periodic timer event in the managed network driver may\r
463 not poll the underlying communications device fast enough to transmit\r
464 and/or receive all data packets without missing incoming packets or\r
465 dropping outgoing packets. Drivers and applications that are\r
466 experiencing packet loss should try calling the Poll() function\r
467 more often.\r
468\r
469 @param[in] This The MTFTP6 protocol instance.\r
470\r
471\r
472 @retval EFI_SUCCESS Incoming or outgoing data was processed.\r
473 @retval EFI_NOT_STARTED This EFI MTFTPv6 Protocol instance has not been started.\r
474 @retval EFI_INVALID_PARAMETER This is NULL.\r
475 @retval EFI_DEVICE_ERROR An unexpected system or network error occurred.\r
476 @retval EFI_TIMEOUT Data was dropped out of the transmit and/or receive queue.\r
477 Consider increasing the polling rate.\r
478\r
479**/\r
480EFI_STATUS\r
481EFIAPI\r
482EfiMtftp6Poll (\r
483 IN EFI_MTFTP6_PROTOCOL *This\r
484 );\r
485\r
486#endif\r