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