]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Protocol/Mtftp4.h
Code Scrub for Protocol and Ppi Definition
[mirror_edk2.git] / MdePkg / Include / Protocol / Mtftp4.h
CommitLineData
d1f95000 1/** @file\r
2 EFI Multicast Trivial File Tranfer Protocol Definition\r
3\r
4ca9b6c4 4 Copyright (c) 2006 - 2008, Intel Corporation \r
d1f95000 5 All rights reserved. This program and the accompanying materials \r
6 are licensed and made available under the terms and conditions of the BSD License \r
7 which accompanies this distribution. The full text of the license may be found at \r
8 http://opensource.org/licenses/bsd-license.php \r
9\r
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
12\r
d1f95000 13**/\r
14\r
15#ifndef __EFI_MTFTP4_PROTOCOL_H__\r
16#define __EFI_MTFTP4_PROTOCOL_H__\r
17\r
18#define EFI_MTFTP4_SERVICE_BINDING_PROTOCOL_GUID \\r
19 { \\r
20 0x2FE800BE, 0x8F01, 0x4aa6, {0x94, 0x6B, 0xD7, 0x13, 0x88, 0xE1, 0x83, 0x3F } \\r
21 }\r
22\r
23#define EFI_MTFTP4_PROTOCOL_GUID \\r
24 { \\r
25 0x78247c57, 0x63db, 0x4708, {0x99, 0xc2, 0xa8, 0xb4, 0xa9, 0xa6, 0x1f, 0x6b } \\r
26 }\r
27\r
28typedef struct _EFI_MTFTP4_PROTOCOL EFI_MTFTP4_PROTOCOL;\r
29typedef struct _EFI_MTFTP4_TOKEN EFI_MTFTP4_TOKEN;\r
30\r
31//\r
32//MTFTP4 packet opcode definition\r
33//\r
34#define EFI_MTFTP4_OPCODE_RRQ 1\r
35#define EFI_MTFTP4_OPCODE_WRQ 2\r
36#define EFI_MTFTP4_OPCODE_DATA 3\r
37#define EFI_MTFTP4_OPCODE_ACK 4\r
38#define EFI_MTFTP4_OPCODE_ERROR 5\r
39#define EFI_MTFTP4_OPCODE_OACK 6\r
40#define EFI_MTFTP4_OPCODE_DIR 7\r
41#define EFI_MTFTP4_OPCODE_DATA8 8\r
42#define EFI_MTFTP4_OPCODE_ACK8 9\r
43\r
44//\r
45// MTFTP4 error code definition\r
46//\r
47#define EFI_MTFTP4_ERRORCODE_NOT_DEFINED 0\r
48#define EFI_MTFTP4_ERRORCODE_FILE_NOT_FOUND 1\r
49#define EFI_MTFTP4_ERRORCODE_ACCESS_VIOLATION 2\r
50#define EFI_MTFTP4_ERRORCODE_DISK_FULL 3\r
51#define EFI_MTFTP4_ERRORCODE_ILLEGAL_OPERATION 4\r
52#define EFI_MTFTP4_ERRORCODE_UNKNOWN_TRANSFER_ID 5\r
53#define EFI_MTFTP4_ERRORCODE_FILE_ALREADY_EXISTS 6\r
54#define EFI_MTFTP4_ERRORCODE_NO_SUCH_USER 7\r
55#define EFI_MTFTP4_ERRORCODE_REQUEST_DENIED 8\r
56\r
57//\r
58// MTFTP4 pacekt definitions\r
59//\r
60#pragma pack(1)\r
61\r
62typedef struct {\r
63 UINT16 OpCode;\r
64 UINT8 Filename[1];\r
65} EFI_MTFTP4_REQ_HEADER;\r
66\r
67typedef struct {\r
68 UINT16 OpCode;\r
69 UINT8 Data[1];\r
70} EFI_MTFTP4_OACK_HEADER;\r
71\r
72typedef struct {\r
73 UINT16 OpCode;\r
74 UINT16 Block;\r
75 UINT8 Data[1];\r
76} EFI_MTFTP4_DATA_HEADER;\r
77\r
78typedef struct {\r
79 UINT16 OpCode;\r
80 UINT16 Block[1];\r
81} EFI_MTFTP4_ACK_HEADER;\r
82\r
83typedef struct {\r
84 UINT16 OpCode;\r
85 UINT64 Block;\r
86 UINT8 Data[1];\r
87} EFI_MTFTP4_DATA8_HEADER;\r
88\r
89typedef struct {\r
90 UINT16 OpCode;\r
91 UINT64 Block[1];\r
92} EFI_MTFTP4_ACK8_HEADER;\r
93\r
94typedef struct {\r
95 UINT16 OpCode;\r
96 UINT16 ErrorCode;\r
97 UINT8 ErrorMessage[1];\r
98} EFI_MTFTP4_ERROR_HEADER;\r
99\r
100typedef union {\r
101 UINT16 OpCode;\r
102 EFI_MTFTP4_REQ_HEADER Rrq;\r
103 EFI_MTFTP4_REQ_HEADER Wrq;\r
104 EFI_MTFTP4_OACK_HEADER Oack;\r
105 EFI_MTFTP4_DATA_HEADER Data;\r
106 EFI_MTFTP4_ACK_HEADER Ack;\r
107 EFI_MTFTP4_DATA8_HEADER Data8;\r
108 EFI_MTFTP4_ACK8_HEADER Ack8;\r
109 EFI_MTFTP4_ERROR_HEADER Error;\r
110} EFI_MTFTP4_PACKET;\r
111\r
112#pragma pack()\r
113\r
114//\r
115// MTFTP4 option definition\r
116//\r
117typedef struct {\r
118 UINT8 *OptionStr;\r
119 UINT8 *ValueStr;\r
120} EFI_MTFTP4_OPTION;\r
121\r
122\r
123typedef struct {\r
124 BOOLEAN UseDefaultSetting;\r
125 EFI_IPv4_ADDRESS StationIp;\r
126 EFI_IPv4_ADDRESS SubnetMask;\r
127 UINT16 LocalPort;\r
128 EFI_IPv4_ADDRESS GatewayIp;\r
129 EFI_IPv4_ADDRESS ServerIp;\r
130 UINT16 InitialServerPort;\r
131 UINT16 TryCount;\r
132 UINT16 TimeoutValue;\r
133} EFI_MTFTP4_CONFIG_DATA;\r
134\r
135\r
136typedef struct {\r
137 EFI_MTFTP4_CONFIG_DATA ConfigData;\r
138 UINT8 SupportedOptionCount; \r
139 UINT8 **SupportedOptoins;\r
140 UINT8 UnsupportedOptionCount; \r
141 UINT8 **UnsupportedOptoins;\r
142} EFI_MTFTP4_MODE_DATA;\r
143\r
144\r
145typedef struct {\r
146 EFI_IPv4_ADDRESS GatewayIp;\r
147 EFI_IPv4_ADDRESS ServerIp;\r
148 UINT16 ServerPort;\r
149 UINT16 TryCount;\r
150 UINT16 TimeoutValue;\r
151} EFI_MTFTP4_OVERRIDE_DATA;\r
152\r
153//\r
154// Protocol interfaces definition\r
155//\r
156\r
157/**\r
158 a callback function that is provided by the caller to intercept \r
159 the EFI_MTFTP4_OPCODE_DATA or EFI_MTFTP4_OPCODE_DATA8 packets processed in the\r
160 EFI_MTFTP4_PROTOCOL.ReadFile() function, and alternatively to intercept \r
161 EFI_MTFTP4_OPCODE_OACK or EFI_MTFTP4_OPCODE_ERROR packets during a call to \r
162 EFI_MTFTP4_PROTOCOL.ReadFile(), WriteFile() or ReadDirectory(). \r
163\r
164 @param This Pointer to the EFI_MTFTP4_PROTOCOL instance.\r
165 @param Token The token that the caller provided in the\r
166 EFI_MTFTP4_PROTOCOL.ReadFile(), WriteFile()\r
167 or ReadDirectory() function.\r
168 @param PacketLen Indicates the length of the packet.\r
169 @param Packet Pointer to an MTFTPv4 packet.\r
170\r
171 @retval EFI_SUCCESS Operation sucess\r
172 @retval Others Abort transfer process\r
173\r
174**/\r
175typedef \r
176EFI_STATUS \r
177(EFIAPI *EFI_MTFTP4_CHECK_PACKET)( \r
178 IN EFI_MTFTP4_PROTOCOL *This,\r
179 IN EFI_MTFTP4_TOKEN *Token,\r
180 IN UINT16 PacketLen,\r
181 IN EFI_MTFTP4_PACKET *Paket\r
182 )\r
183;\r
184\r
185/**\r
186 Timeout callback funtion. \r
187\r
188 @param This Pointer to the EFI_MTFTP4_PROTOCOL instance.\r
189 @param Token The token that is provided in the\r
190 EFI_MTFTP4_PROTOCOL.ReadFile() or\r
191 EFI_MTFTP4_PROTOCOL.WriteFile() or\r
192 EFI_MTFTP4_PROTOCOL.ReadDirectory() functions\r
193 by the caller.\r
194 \r
195 @retval EFI_SUCCESS Operation sucess\r
196 @retval Others Aborts download process.\r
197\r
198**/\r
199typedef \r
200EFI_STATUS \r
201(EFIAPI *EFI_MTFTP4_TIMEOUT_CALLBACK)( \r
202 IN EFI_MTFTP4_PROTOCOL *This,\r
203 IN EFI_MTFTP4_TOKEN *Token\r
204 )\r
205;\r
206\r
207/**\r
208 a callback function that the caller provides to feed data to the\r
209 EFI_MTFTP4_PROTOCOL.WriteFile() function.\r
210\r
211 @param This Pointer to the EFI_MTFTP4_PROTOCOL instance.\r
212 @param Token The token provided in the\r
213 EFI_MTFTP4_PROTOCOL.WriteFile() by the caller.\r
214 @param Length Indicates the length of the raw data wanted on input, and the\r
215 length the data available on output.\r
216 @param Buffer Pointer to the buffer where the data is stored.\r
217\r
218 @retval EFI_SUCCESS Operation sucess\r
219 @retval Others Aborts session.\r
220\r
221**/\r
222typedef \r
223EFI_STATUS \r
224(EFIAPI *EFI_MTFTP4_PACKET_NEEDED)( \r
225 IN EFI_MTFTP4_PROTOCOL *This,\r
226 IN EFI_MTFTP4_TOKEN *Token,\r
227 IN OUT UINT16 *Length,\r
228 OUT VOID **Buffer\r
229 )\r
230;\r
231\r
232\r
233/**\r
234 Submits an asynchronous interrupt transfer to an interrupt endpoint of a USB device.\r
235\r
236 @param This Pointer to the EFI_MTFTP4_PROTOCOL instance.\r
237 @param ModeData Pointer to storage for the EFI MTFTPv4 Protocol driver mode data.\r
238\r
239 @retval EFI_SUCCESS The configuration data was successfully returned.\r
240 @retval EFI_OUT_OF_RESOURCES The required mode data could not be allocated.\r
241 @retval EFI_INVALID_PARAMETER This is NULL or ModeData is NULL.\r
242\r
243**/\r
244typedef \r
245EFI_STATUS \r
246(EFIAPI *EFI_MTFTP4_GET_MODE_DATA)(\r
247 IN EFI_MTFTP4_PROTOCOL *This,\r
248 OUT EFI_MTFTP4_MODE_DATA *ModeData\r
249 )\r
250;\r
251\r
252\r
253/**\r
254 Initializes, changes, or resets the default operational setting for this \r
255 EFI MTFTPv4 Protocol driver instance.\r
256\r
257 @param This Pointer to the EFI_MTFTP4_PROTOCOL instance.\r
258 @param MtftpConfigData Pointer to the configuration data structure.\r
259\r
260 @retval EFI_SUCCESS The EFI MTFTPv4 Protocol driver was configured successfully.\r
261 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.\r
262 @retval EFI_ACCESS_DENIED The EFI configuration could not be changed at this time because\r
263 there is one MTFTP background operation in progress.\r
264 @retval EFI_NO_MAPPING When using a default address, configuration (DHCP, BOOTP,\r
265 RARP, etc.) has not finished yet.\r
266 @retval EFI_UNSUPPORTED A configuration protocol (DHCP, BOOTP, RARP, etc.) could not\r
267 be located when clients choose to use the default address\r
268 settings.\r
269 @retval EFI_OUT_OF_RESOURCES The EFI MTFTPv4 Protocol driver instance data could not be\r
270 allocated.\r
271 @retval EFI_DEVICE_ERROR An unexpected system or network error occurred. The EFI\r
272 MTFTPv4 Protocol driver instance is not configured.\r
273\r
274**/\r
275typedef \r
276EFI_STATUS \r
277(EFIAPI *EFI_MTFTP4_CONFIGURE)(\r
278 IN EFI_MTFTP4_PROTOCOL *This,\r
279 IN EFI_MTFTP4_CONFIG_DATA *MtftpConfigData OPTIONAL\r
280 )\r
281; \r
282 \r
283 \r
284/**\r
285 Gets information about a file from an MTFTPv4 server.\r
286\r
287 @param This Pointer to the EFI_MTFTP4_PROTOCOL instance.\r
288 @param OverrideData Data that is used to override the existing parameters. If NULL,\r
289 the default parameters that were set in the\r
290 EFI_MTFTP4_PROTOCOL.Configure() function are used.\r
291 @param Filename Pointer to ASCIIZ file name string.\r
292 @param ModeStr Pointer to ASCIIZ mode string. If NULL, "octet" will be used.\r
293 @param OptionCount Number of option/value string pairs in OptionList.\r
294 @param OptionList Pointer to array of option/value string pairs. Ignored if\r
295 OptionCount is zero.\r
296 @param PacketLength The number of bytes in the returned packet.\r
297 @param Packet The pointer to the received packet. This buffer must be freed by\r
298 the caller.\r
299\r
300 @retval EFI_SUCCESS An MTFTPv4 OACK packet was received and is in the Buffer.\r
301 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.\r
302 @retval EFI_UNSUPPORTED One or more options in the OptionList are in the\r
303 unsupported list of structure EFI_MTFTP4_MODE_DATA.\r
304 @retval EFI_NOT_STARTED The EFI MTFTPv4 Protocol driver has not been started.\r
305 @retval EFI_NO_MAPPING When using a default address, configuration (DHCP, BOOTP,\r
306 RARP, etc.) has not finished yet.\r
307 @retval EFI_ACCESS_DENIED The previous operation has not completed yet.\r
308 @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.\r
309 @retval EFI_TFTP_ERROR An MTFTPv4 ERROR packet was received and is in the buffer.\r
310 @retval EFI_ICMP_ERROR An ICMP ERROR packet was received and is in the Buffer.\r
311 @retval EFI_PROTOCOL_ERROR An unexpected MTFTPv4 packet was received and is in the buffer.\r
312 @retval EFI_TIMEOUT No responses were received from the MTFTPv4 server.\r
313 @retval EFI_DEVICE_ERROR An unexpected network error or system error occurred.\r
314\r
315**/\r
316typedef \r
317EFI_STATUS \r
318(EFIAPI *EFI_MTFTP4_GET_INFO)(\r
319 IN EFI_MTFTP4_PROTOCOL *This,\r
320 IN EFI_MTFTP4_OVERRIDE_DATA *OverrideData OPTIONAL,\r
321 IN UINT8 *Filename,\r
322 IN UINT8 *ModeStr OPTIONAL,\r
323 IN UINT8 OptionCount,\r
324 IN EFI_MTFTP4_OPTION *OptionList,\r
325 OUT UINT32 *PacketLength,\r
326 OUT EFI_MTFTP4_PACKET **Packet OPTIONAL\r
327 )\r
328;\r
329\r
330/**\r
331 Parses the options in an MTFTPv4 OACK packet.\r
332\r
333 @param This Pointer to the EFI_MTFTP4_PROTOCOL instance.\r
334 @param PacketLen Length of the OACK packet to be parsed.\r
335 @param Packet Pointer to the OACK packet to be parsed.\r
336 @param OptionCount Pointer to the number of options in following OptionList.\r
337 @param OptionList Pointer to EFI_MTFTP4_OPTION storage. Call the EFI Boot\r
338 Service FreePool() to release each option if they are not\r
339 needed any more.\r
340\r
341 @retval EFI_SUCCESS The OACK packet was valid and the OptionCount and\r
342 OptionList parameters have been updated.\r
343 @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:\r
344 - PacketLen is 0.\r
345 - Packet is NULL or Packet is not a valid MTFTPv4 packet.\r
346 - OptionCount is NULL.\r
347 @retval EFI_NOT_FOUND No options were found in the OACK packet.\r
348 @retval EFI_OUT_OF_RESOURCES Storage for the OptionList array cannot be allocated.\r
349 @retval EFI_PROTOCOL_ERROR One or more of the option fields is invalid.\r
350\r
351**/\r
352typedef \r
353EFI_STATUS \r
354(EFIAPI *EFI_MTFTP4_PARSE_OPTIONS)(\r
355 IN EFI_MTFTP4_PROTOCOL *This,\r
356 IN UINT32 PacketLen,\r
357 IN EFI_MTFTP4_PACKET *Packet,\r
358 OUT UINT32 *OptionCount,\r
359 OUT EFI_MTFTP4_OPTION **OptionList OPTIONAL\r
360 )\r
361; \r
362\r
363\r
364/**\r
365 Downloads a file from an MTFTPv4 server.\r
366\r
367 @param This Pointer to the EFI_MTFTP4_PROTOCOL instance.\r
368 @param Token Pointer to the token structure to provide the parameters that are\r
369 used in this operation.\r
370\r
371 @retval EFI_SUCCESS The data file has been transferred successfully.\r
372 @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.\r
373 @retval EFI_BUFFER_TOO_SMALL BufferSize is not large enough to hold the downloaded data\r
374 in downloading process.\r
375 @retval EFI_ABORTED Current operation is aborted by user.\r
376 @retval EFI_ICMP_ERROR An ICMP ERROR packet was received.\r
377 @retval EFI_TIMEOUT No responses were received from the MTFTPv4 server.\r
378 @retval EFI_TFTP_ERROR An MTFTPv4 ERROR packet was received.\r
379 @retval EFI_DEVICE_ERROR An unexpected network error or system error occurred.\r
380\r
381**/\r
382typedef \r
383EFI_STATUS \r
384(EFIAPI *EFI_MTFTP4_READ_FILE)(\r
385 IN EFI_MTFTP4_PROTOCOL *This,\r
386 IN EFI_MTFTP4_TOKEN *Token\r
387 )\r
388; \r
389 \r
390\r
391\r
392/**\r
393 Sends a file to an MTFTPv4 server.\r
394\r
395 @param This Pointer to the EFI_MTFTP4_PROTOCOL instance.\r
396 @param Token Pointer to the token structure to provide the parameters that are\r
397 used in this operation.\r
398\r
399 @retval EFI_SUCCESS The upload session has started.\r
400 @retval EFI_UNSUPPORTED The operation is not supported by this implementation.\r
401 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.\r
402 @retval EFI_UNSUPPORTED One or more options in the Token.OptionList are in\r
403 the unsupported list of structure EFI_MTFTP4_MODE_DATA.\r
404 @retval EFI_NOT_STARTED The EFI MTFTPv4 Protocol driver has not been started.\r
405 @retval EFI_NO_MAPPING When using a default address, configuration (DHCP, BOOTP,\r
406 RARP, etc.) is not finished yet.\r
407 @retval EFI_ALREADY_STARTED This Token is already being used in another MTFTPv4 session.\r
408 @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.\r
409 @retval EFI_ACCESS_DENIED The previous operation has not completed yet.\r
410 @retval EFI_DEVICE_ERROR An unexpected network error or system error occurred.\r
411\r
412**/\r
413typedef \r
414EFI_STATUS \r
415(EFIAPI *EFI_MTFTP4_WRITE_FILE)(\r
416 IN EFI_MTFTP4_PROTOCOL *This,\r
417 IN EFI_MTFTP4_TOKEN *Token\r
418 )\r
419; \r
420 \r
421\r
422/**\r
423 Downloads a data file "directory" from an MTFTPv4 server. May be unsupported in some EFI\r
424 implementations. \r
425\r
426 @param This Pointer to the EFI_MTFTP4_PROTOCOL instance.\r
427 @param Token Pointer to the token structure to provide the parameters that are\r
428 used in this operation.\r
429\r
430 @retval EFI_SUCCESS The MTFTPv4 related file "directory" has been downloaded.\r
431 @retval EFI_UNSUPPORTED The operation is not supported by this implementation.\r
432 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.\r
433 @retval EFI_UNSUPPORTED One or more options in the Token.OptionList are in\r
434 the unsupported list of structure EFI_MTFTP4_MODE_DATA.\r
435 @retval EFI_NOT_STARTED The EFI MTFTPv4 Protocol driver has not been started.\r
436 @retval EFI_NO_MAPPING When using a default address, configuration (DHCP, BOOTP,\r
437 RARP, etc.) is not finished yet.\r
438 @retval EFI_ALREADY_STARTED This Token is already being used in another MTFTPv4 session.\r
439 @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.\r
440 @retval EFI_ACCESS_DENIED The previous operation has not completed yet.\r
441 @retval EFI_DEVICE_ERROR An unexpected network error or system error occurred.\r
442\r
443**/\r
444typedef \r
445EFI_STATUS \r
446(EFIAPI *EFI_MTFTP4_READ_DIRECTORY)(\r
447 IN EFI_MTFTP4_PROTOCOL *This,\r
448 IN EFI_MTFTP4_TOKEN *Token\r
449 )\r
450; \r
451\r
452/**\r
453 Polls for incoming data packets and processes outgoing data packets.\r
454\r
455 @param This Pointer to the EFI_MTFTP4_PROTOCOL instance.\r
456\r
457 @retval EFI_SUCCESS Incoming or outgoing data was processed.\r
458 @retval EFI_NOT_STARTED This EFI MTFTPv4 Protocol instance has not been started.\r
459 @retval EFI_NO_MAPPING When using a default address, configuration (DHCP, BOOTP,\r
460 RARP, etc.) is not finished yet.\r
461 @retval EFI_INVALID_PARAMETER This is NULL.\r
462 @retval EFI_DEVICE_ERROR An unexpected system or network error occurred.\r
463 @retval EFI_TIMEOUT Data was dropped out of the transmit and/or receive queue.\r
464 Consider increasing the polling rate.\r
465\r
466**/\r
467typedef\r
468EFI_STATUS\r
8b13229b 469(EFIAPI *EFI_MTFTP4_POLL)(\r
d1f95000 470 IN EFI_MTFTP4_PROTOCOL *This\r
471 )\r
472; \r
473 \r
4ca9b6c4
LG
474/** \r
475 The EFI MTFTPv4 Protocol provides basic services for client-side unicast \r
476 and/or multicast TFTP operations.\r
477\r
478 @par Protocol Description:\r
479 The EFI_MTFTP4_PROTOCOL is designed to be used by UEFI drivers and applications \r
480 to transmit and receive data files. The EFI MTFTPv4 Protocol driver uses \r
481 the underlying EFI UDPv4 Protocol driver and EFI IPv4 Protocol driver.\r
482\r
483 @param GetModeData\r
484 Reads the current operational settings. \r
485\r
486 @param Configure\r
487 Initializes, changes, or resets the operational settings for \r
488 this instance of the EFI MTFTPv4 Protocol driver. \r
489\r
490 @param GetInfo\r
491 Retrieves information about a file from an MTFTPv4 server. \r
492\r
493 @param ParseOptions\r
494 Parses the options in an MTFTPv4 OACK (options acknowledgement) packet. \r
495\r
496 @param ReadFile\r
497 Downloads a file from an MTFTPv4 server. \r
498\r
499 @param WriteFile\r
500 Uploads a file to an MTFTPv4 server. This function may be unsupported \r
501 in some EFI implementations. \r
502\r
503 @param ReadDirectory\r
504 Downloads a related file directory from an MTFTPv4 server. This function \r
505 may be unsupported in some EFI implementations. \r
506\r
507 @param Poll\r
508 Polls for incoming data packets and processes outgoing data packets. \r
509\r
510**/ \r
d1f95000 511struct _EFI_MTFTP4_PROTOCOL {\r
512 EFI_MTFTP4_GET_MODE_DATA GetModeData;\r
513 EFI_MTFTP4_CONFIGURE Configure;\r
514 EFI_MTFTP4_GET_INFO GetInfo;\r
515 EFI_MTFTP4_PARSE_OPTIONS ParseOptions;\r
516 EFI_MTFTP4_READ_FILE ReadFile;\r
517 EFI_MTFTP4_WRITE_FILE WriteFile;\r
518 EFI_MTFTP4_READ_DIRECTORY ReadDirectory;\r
519 EFI_MTFTP4_POLL Poll;\r
520};\r
521\r
522struct _EFI_MTFTP4_TOKEN {\r
523 OUT EFI_STATUS Status;\r
524 IN EFI_EVENT Event;\r
525 IN EFI_MTFTP4_OVERRIDE_DATA *OverrideData;\r
526 IN UINT8 *Filename;\r
527 IN UINT8 *ModeStr;\r
528 IN UINT32 OptionCount;\r
529 IN EFI_MTFTP4_OPTION *OptionList;\r
530 IN OUT UINT64 BufferSize;\r
531 IN OUT VOID *Buffer;\r
532 IN EFI_MTFTP4_CHECK_PACKET CheckPacket;\r
533 IN EFI_MTFTP4_TIMEOUT_CALLBACK TimeoutCallback;\r
534 IN EFI_MTFTP4_PACKET_NEEDED PacketNeeded;\r
535};\r
536\r
537extern EFI_GUID gEfiMtftp4ServiceBindingProtocolGuid;\r
538extern EFI_GUID gEfiMtftp4ProtocolGuid; \r
539\r
540#endif\r
541\r