]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Protocol/Mtftp4.h
clean up the un-suitable ';' location when declaring the functions.
[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
99e8ed21 114///\r
115/// MTFTP4 option definition\r
116///\r
d1f95000 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
ed66e1bc 182 );\r
d1f95000 183\r
184/**\r
185 Timeout callback funtion. \r
186\r
187 @param This Pointer to the EFI_MTFTP4_PROTOCOL instance.\r
188 @param Token The token that is provided in the\r
189 EFI_MTFTP4_PROTOCOL.ReadFile() or\r
190 EFI_MTFTP4_PROTOCOL.WriteFile() or\r
191 EFI_MTFTP4_PROTOCOL.ReadDirectory() functions\r
192 by the caller.\r
193 \r
194 @retval EFI_SUCCESS Operation sucess\r
195 @retval Others Aborts download process.\r
196\r
197**/\r
198typedef \r
199EFI_STATUS \r
200(EFIAPI *EFI_MTFTP4_TIMEOUT_CALLBACK)( \r
201 IN EFI_MTFTP4_PROTOCOL *This,\r
202 IN EFI_MTFTP4_TOKEN *Token\r
ed66e1bc 203 );\r
d1f95000 204\r
205/**\r
206 a callback function that the caller provides to feed data to the\r
207 EFI_MTFTP4_PROTOCOL.WriteFile() function.\r
208\r
209 @param This Pointer to the EFI_MTFTP4_PROTOCOL instance.\r
210 @param Token The token provided in the\r
211 EFI_MTFTP4_PROTOCOL.WriteFile() by the caller.\r
212 @param Length Indicates the length of the raw data wanted on input, and the\r
213 length the data available on output.\r
214 @param Buffer Pointer to the buffer where the data is stored.\r
215\r
216 @retval EFI_SUCCESS Operation sucess\r
217 @retval Others Aborts session.\r
218\r
219**/\r
220typedef \r
221EFI_STATUS \r
222(EFIAPI *EFI_MTFTP4_PACKET_NEEDED)( \r
223 IN EFI_MTFTP4_PROTOCOL *This,\r
224 IN EFI_MTFTP4_TOKEN *Token,\r
225 IN OUT UINT16 *Length,\r
226 OUT VOID **Buffer\r
ed66e1bc 227 );\r
d1f95000 228\r
229\r
230/**\r
231 Submits an asynchronous interrupt transfer to an interrupt endpoint of a USB device.\r
232\r
233 @param This Pointer to the EFI_MTFTP4_PROTOCOL instance.\r
234 @param ModeData Pointer to storage for the EFI MTFTPv4 Protocol driver mode data.\r
235\r
236 @retval EFI_SUCCESS The configuration data was successfully returned.\r
237 @retval EFI_OUT_OF_RESOURCES The required mode data could not be allocated.\r
238 @retval EFI_INVALID_PARAMETER This is NULL or ModeData is NULL.\r
239\r
240**/\r
241typedef \r
242EFI_STATUS \r
243(EFIAPI *EFI_MTFTP4_GET_MODE_DATA)(\r
244 IN EFI_MTFTP4_PROTOCOL *This,\r
245 OUT EFI_MTFTP4_MODE_DATA *ModeData\r
ed66e1bc 246 );\r
d1f95000 247\r
248\r
249/**\r
250 Initializes, changes, or resets the default operational setting for this \r
251 EFI MTFTPv4 Protocol driver instance.\r
252\r
253 @param This Pointer to the EFI_MTFTP4_PROTOCOL instance.\r
254 @param MtftpConfigData Pointer to the configuration data structure.\r
255\r
256 @retval EFI_SUCCESS The EFI MTFTPv4 Protocol driver was configured successfully.\r
257 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.\r
258 @retval EFI_ACCESS_DENIED The EFI configuration could not be changed at this time because\r
259 there is one MTFTP background operation in progress.\r
260 @retval EFI_NO_MAPPING When using a default address, configuration (DHCP, BOOTP,\r
261 RARP, etc.) has not finished yet.\r
262 @retval EFI_UNSUPPORTED A configuration protocol (DHCP, BOOTP, RARP, etc.) could not\r
263 be located when clients choose to use the default address\r
264 settings.\r
265 @retval EFI_OUT_OF_RESOURCES The EFI MTFTPv4 Protocol driver instance data could not be\r
266 allocated.\r
267 @retval EFI_DEVICE_ERROR An unexpected system or network error occurred. The EFI\r
268 MTFTPv4 Protocol driver instance is not configured.\r
269\r
270**/\r
271typedef \r
272EFI_STATUS \r
273(EFIAPI *EFI_MTFTP4_CONFIGURE)(\r
274 IN EFI_MTFTP4_PROTOCOL *This,\r
275 IN EFI_MTFTP4_CONFIG_DATA *MtftpConfigData OPTIONAL\r
ed66e1bc 276 ); \r
d1f95000 277 \r
278 \r
279/**\r
280 Gets information about a file from an MTFTPv4 server.\r
281\r
282 @param This Pointer to the EFI_MTFTP4_PROTOCOL instance.\r
283 @param OverrideData Data that is used to override the existing parameters. If NULL,\r
284 the default parameters that were set in the\r
285 EFI_MTFTP4_PROTOCOL.Configure() function are used.\r
286 @param Filename Pointer to ASCIIZ file name string.\r
287 @param ModeStr Pointer to ASCIIZ mode string. If NULL, "octet" will be used.\r
288 @param OptionCount Number of option/value string pairs in OptionList.\r
289 @param OptionList Pointer to array of option/value string pairs. Ignored if\r
290 OptionCount is zero.\r
291 @param PacketLength The number of bytes in the returned packet.\r
292 @param Packet The pointer to the received packet. This buffer must be freed by\r
293 the caller.\r
294\r
295 @retval EFI_SUCCESS An MTFTPv4 OACK packet was received and is in the Buffer.\r
296 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.\r
297 @retval EFI_UNSUPPORTED One or more options in the OptionList are in the\r
298 unsupported list of structure EFI_MTFTP4_MODE_DATA.\r
299 @retval EFI_NOT_STARTED The EFI MTFTPv4 Protocol driver has not been started.\r
300 @retval EFI_NO_MAPPING When using a default address, configuration (DHCP, BOOTP,\r
301 RARP, etc.) has not finished yet.\r
302 @retval EFI_ACCESS_DENIED The previous operation has not completed yet.\r
303 @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.\r
304 @retval EFI_TFTP_ERROR An MTFTPv4 ERROR packet was received and is in the buffer.\r
305 @retval EFI_ICMP_ERROR An ICMP ERROR packet was received and is in the Buffer.\r
306 @retval EFI_PROTOCOL_ERROR An unexpected MTFTPv4 packet was received and is in the buffer.\r
307 @retval EFI_TIMEOUT No responses were received from the MTFTPv4 server.\r
308 @retval EFI_DEVICE_ERROR An unexpected network error or system error occurred.\r
309\r
310**/\r
311typedef \r
312EFI_STATUS \r
313(EFIAPI *EFI_MTFTP4_GET_INFO)(\r
314 IN EFI_MTFTP4_PROTOCOL *This,\r
315 IN EFI_MTFTP4_OVERRIDE_DATA *OverrideData OPTIONAL,\r
316 IN UINT8 *Filename,\r
317 IN UINT8 *ModeStr OPTIONAL,\r
318 IN UINT8 OptionCount,\r
319 IN EFI_MTFTP4_OPTION *OptionList,\r
320 OUT UINT32 *PacketLength,\r
321 OUT EFI_MTFTP4_PACKET **Packet OPTIONAL\r
ed66e1bc 322 );\r
d1f95000 323\r
324/**\r
325 Parses the options in an MTFTPv4 OACK packet.\r
326\r
327 @param This Pointer to the EFI_MTFTP4_PROTOCOL instance.\r
328 @param PacketLen Length of the OACK packet to be parsed.\r
329 @param Packet Pointer to the OACK packet to be parsed.\r
330 @param OptionCount Pointer to the number of options in following OptionList.\r
331 @param OptionList Pointer to EFI_MTFTP4_OPTION storage. Call the EFI Boot\r
332 Service FreePool() to release each option if they are not\r
333 needed any more.\r
334\r
335 @retval EFI_SUCCESS The OACK packet was valid and the OptionCount and\r
336 OptionList parameters have been updated.\r
337 @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:\r
338 - PacketLen is 0.\r
339 - Packet is NULL or Packet is not a valid MTFTPv4 packet.\r
340 - OptionCount is NULL.\r
341 @retval EFI_NOT_FOUND No options were found in the OACK packet.\r
342 @retval EFI_OUT_OF_RESOURCES Storage for the OptionList array cannot be allocated.\r
343 @retval EFI_PROTOCOL_ERROR One or more of the option fields is invalid.\r
344\r
345**/\r
346typedef \r
347EFI_STATUS \r
348(EFIAPI *EFI_MTFTP4_PARSE_OPTIONS)(\r
349 IN EFI_MTFTP4_PROTOCOL *This,\r
350 IN UINT32 PacketLen,\r
351 IN EFI_MTFTP4_PACKET *Packet,\r
352 OUT UINT32 *OptionCount,\r
353 OUT EFI_MTFTP4_OPTION **OptionList OPTIONAL\r
ed66e1bc 354 ); \r
d1f95000 355\r
356\r
357/**\r
358 Downloads a file from an MTFTPv4 server.\r
359\r
360 @param This Pointer to the EFI_MTFTP4_PROTOCOL instance.\r
361 @param Token Pointer to the token structure to provide the parameters that are\r
362 used in this operation.\r
363\r
364 @retval EFI_SUCCESS The data file has been transferred successfully.\r
365 @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.\r
366 @retval EFI_BUFFER_TOO_SMALL BufferSize is not large enough to hold the downloaded data\r
367 in downloading process.\r
368 @retval EFI_ABORTED Current operation is aborted by user.\r
369 @retval EFI_ICMP_ERROR An ICMP ERROR packet was received.\r
370 @retval EFI_TIMEOUT No responses were received from the MTFTPv4 server.\r
371 @retval EFI_TFTP_ERROR An MTFTPv4 ERROR packet was received.\r
372 @retval EFI_DEVICE_ERROR An unexpected network error or system error occurred.\r
373\r
374**/\r
375typedef \r
376EFI_STATUS \r
377(EFIAPI *EFI_MTFTP4_READ_FILE)(\r
378 IN EFI_MTFTP4_PROTOCOL *This,\r
379 IN EFI_MTFTP4_TOKEN *Token\r
ed66e1bc 380 ); \r
d1f95000 381 \r
382\r
383\r
384/**\r
385 Sends a file to an MTFTPv4 server.\r
386\r
387 @param This Pointer to the EFI_MTFTP4_PROTOCOL instance.\r
388 @param Token Pointer to the token structure to provide the parameters that are\r
389 used in this operation.\r
390\r
391 @retval EFI_SUCCESS The upload session has started.\r
392 @retval EFI_UNSUPPORTED The operation is not supported by this implementation.\r
393 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.\r
394 @retval EFI_UNSUPPORTED One or more options in the Token.OptionList are in\r
395 the unsupported list of structure EFI_MTFTP4_MODE_DATA.\r
396 @retval EFI_NOT_STARTED The EFI MTFTPv4 Protocol driver has not been started.\r
397 @retval EFI_NO_MAPPING When using a default address, configuration (DHCP, BOOTP,\r
398 RARP, etc.) is not finished yet.\r
399 @retval EFI_ALREADY_STARTED This Token is already being used in another MTFTPv4 session.\r
400 @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.\r
401 @retval EFI_ACCESS_DENIED The previous operation has not completed yet.\r
402 @retval EFI_DEVICE_ERROR An unexpected network error or system error occurred.\r
403\r
404**/\r
405typedef \r
406EFI_STATUS \r
407(EFIAPI *EFI_MTFTP4_WRITE_FILE)(\r
408 IN EFI_MTFTP4_PROTOCOL *This,\r
409 IN EFI_MTFTP4_TOKEN *Token\r
ed66e1bc 410 ); \r
d1f95000 411 \r
412\r
413/**\r
414 Downloads a data file "directory" from an MTFTPv4 server. May be unsupported in some EFI\r
415 implementations. \r
416\r
417 @param This Pointer to the EFI_MTFTP4_PROTOCOL instance.\r
418 @param Token Pointer to the token structure to provide the parameters that are\r
419 used in this operation.\r
420\r
421 @retval EFI_SUCCESS The MTFTPv4 related file "directory" has been downloaded.\r
422 @retval EFI_UNSUPPORTED The operation is not supported by this implementation.\r
423 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.\r
424 @retval EFI_UNSUPPORTED One or more options in the Token.OptionList are in\r
425 the unsupported list of structure EFI_MTFTP4_MODE_DATA.\r
426 @retval EFI_NOT_STARTED The EFI MTFTPv4 Protocol driver has not been started.\r
427 @retval EFI_NO_MAPPING When using a default address, configuration (DHCP, BOOTP,\r
428 RARP, etc.) is not finished yet.\r
429 @retval EFI_ALREADY_STARTED This Token is already being used in another MTFTPv4 session.\r
430 @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.\r
431 @retval EFI_ACCESS_DENIED The previous operation has not completed yet.\r
432 @retval EFI_DEVICE_ERROR An unexpected network error or system error occurred.\r
433\r
434**/\r
435typedef \r
436EFI_STATUS \r
437(EFIAPI *EFI_MTFTP4_READ_DIRECTORY)(\r
438 IN EFI_MTFTP4_PROTOCOL *This,\r
439 IN EFI_MTFTP4_TOKEN *Token\r
ed66e1bc 440 ); \r
d1f95000 441\r
442/**\r
443 Polls for incoming data packets and processes outgoing data packets.\r
444\r
445 @param This Pointer to the EFI_MTFTP4_PROTOCOL instance.\r
446\r
447 @retval EFI_SUCCESS Incoming or outgoing data was processed.\r
448 @retval EFI_NOT_STARTED This EFI MTFTPv4 Protocol instance has not been started.\r
449 @retval EFI_NO_MAPPING When using a default address, configuration (DHCP, BOOTP,\r
450 RARP, etc.) is not finished yet.\r
451 @retval EFI_INVALID_PARAMETER This is NULL.\r
452 @retval EFI_DEVICE_ERROR An unexpected system or network error occurred.\r
453 @retval EFI_TIMEOUT Data was dropped out of the transmit and/or receive queue.\r
454 Consider increasing the polling rate.\r
455\r
456**/\r
457typedef\r
458EFI_STATUS\r
8b13229b 459(EFIAPI *EFI_MTFTP4_POLL)(\r
d1f95000 460 IN EFI_MTFTP4_PROTOCOL *This\r
ed66e1bc 461 ); \r
d1f95000 462 \r
4ca9b6c4
LG
463/** \r
464 The EFI MTFTPv4 Protocol provides basic services for client-side unicast \r
465 and/or multicast TFTP operations.\r
466\r
467 @par Protocol Description:\r
468 The EFI_MTFTP4_PROTOCOL is designed to be used by UEFI drivers and applications \r
469 to transmit and receive data files. The EFI MTFTPv4 Protocol driver uses \r
470 the underlying EFI UDPv4 Protocol driver and EFI IPv4 Protocol driver.\r
471\r
472 @param GetModeData\r
473 Reads the current operational settings. \r
474\r
475 @param Configure\r
476 Initializes, changes, or resets the operational settings for \r
477 this instance of the EFI MTFTPv4 Protocol driver. \r
478\r
479 @param GetInfo\r
480 Retrieves information about a file from an MTFTPv4 server. \r
481\r
482 @param ParseOptions\r
483 Parses the options in an MTFTPv4 OACK (options acknowledgement) packet. \r
484\r
485 @param ReadFile\r
486 Downloads a file from an MTFTPv4 server. \r
487\r
488 @param WriteFile\r
489 Uploads a file to an MTFTPv4 server. This function may be unsupported \r
490 in some EFI implementations. \r
491\r
492 @param ReadDirectory\r
493 Downloads a related file directory from an MTFTPv4 server. This function \r
494 may be unsupported in some EFI implementations. \r
495\r
496 @param Poll\r
497 Polls for incoming data packets and processes outgoing data packets. \r
498\r
499**/ \r
d1f95000 500struct _EFI_MTFTP4_PROTOCOL {\r
501 EFI_MTFTP4_GET_MODE_DATA GetModeData;\r
502 EFI_MTFTP4_CONFIGURE Configure;\r
503 EFI_MTFTP4_GET_INFO GetInfo;\r
504 EFI_MTFTP4_PARSE_OPTIONS ParseOptions;\r
505 EFI_MTFTP4_READ_FILE ReadFile;\r
506 EFI_MTFTP4_WRITE_FILE WriteFile;\r
507 EFI_MTFTP4_READ_DIRECTORY ReadDirectory;\r
508 EFI_MTFTP4_POLL Poll;\r
509};\r
510\r
511struct _EFI_MTFTP4_TOKEN {\r
bb8fb476 512 EFI_STATUS Status;\r
513 EFI_EVENT Event;\r
514 EFI_MTFTP4_OVERRIDE_DATA *OverrideData;\r
515 UINT8 *Filename;\r
516 UINT8 *ModeStr;\r
517 UINT32 OptionCount;\r
518 EFI_MTFTP4_OPTION *OptionList;\r
519 OUT UINT64 BufferSize;\r
520 OUT VOID *Buffer;\r
521 EFI_MTFTP4_CHECK_PACKET CheckPacket;\r
522 EFI_MTFTP4_TIMEOUT_CALLBACK TimeoutCallback;\r
523 EFI_MTFTP4_PACKET_NEEDED PacketNeeded;\r
d1f95000 524};\r
525\r
526extern EFI_GUID gEfiMtftp4ServiceBindingProtocolGuid;\r
527extern EFI_GUID gEfiMtftp4ProtocolGuid; \r
528\r
529#endif\r
530\r