iPXE
Mtftp4.h
Go to the documentation of this file.
1 /** @file
2  EFI Multicast Trivial File Transfer Protocol Definition
3 
4 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6 
7  @par Revision Reference:
8  This Protocol is introduced in UEFI Specification 2.0
9 
10 **/
11 
12 #ifndef __EFI_MTFTP4_PROTOCOL_H__
13 #define __EFI_MTFTP4_PROTOCOL_H__
14 
15 FILE_LICENCE ( BSD2_PATENT );
16 
17 #define EFI_MTFTP4_SERVICE_BINDING_PROTOCOL_GUID \
18  { \
19  0x2FE800BE, 0x8F01, 0x4aa6, {0x94, 0x6B, 0xD7, 0x13, 0x88, 0xE1, 0x83, 0x3F } \
20  }
21 
22 #define EFI_MTFTP4_PROTOCOL_GUID \
23  { \
24  0x78247c57, 0x63db, 0x4708, {0x99, 0xc2, 0xa8, 0xb4, 0xa9, 0xa6, 0x1f, 0x6b } \
25  }
26 
29 
30 //
31 // MTFTP4 packet opcode definition
32 //
33 #define EFI_MTFTP4_OPCODE_RRQ 1
34 #define EFI_MTFTP4_OPCODE_WRQ 2
35 #define EFI_MTFTP4_OPCODE_DATA 3
36 #define EFI_MTFTP4_OPCODE_ACK 4
37 #define EFI_MTFTP4_OPCODE_ERROR 5
38 #define EFI_MTFTP4_OPCODE_OACK 6
39 #define EFI_MTFTP4_OPCODE_DIR 7
40 #define EFI_MTFTP4_OPCODE_DATA8 8
41 #define EFI_MTFTP4_OPCODE_ACK8 9
42 
43 //
44 // MTFTP4 error code definition
45 //
46 #define EFI_MTFTP4_ERRORCODE_NOT_DEFINED 0
47 #define EFI_MTFTP4_ERRORCODE_FILE_NOT_FOUND 1
48 #define EFI_MTFTP4_ERRORCODE_ACCESS_VIOLATION 2
49 #define EFI_MTFTP4_ERRORCODE_DISK_FULL 3
50 #define EFI_MTFTP4_ERRORCODE_ILLEGAL_OPERATION 4
51 #define EFI_MTFTP4_ERRORCODE_UNKNOWN_TRANSFER_ID 5
52 #define EFI_MTFTP4_ERRORCODE_FILE_ALREADY_EXISTS 6
53 #define EFI_MTFTP4_ERRORCODE_NO_SUCH_USER 7
54 #define EFI_MTFTP4_ERRORCODE_REQUEST_DENIED 8
55 
56 //
57 // MTFTP4 pacekt definitions
58 //
59 #pragma pack(1)
60 
61 typedef struct {
65 
66 typedef struct {
68  UINT8 Data[1];
70 
71 typedef struct {
74  UINT8 Data[1];
76 
77 typedef struct {
79  UINT16 Block[1];
81 
82 typedef struct {
85  UINT8 Data[1];
87 
88 typedef struct {
90  UINT64 Block[1];
92 
93 typedef struct {
96  UINT8 ErrorMessage[1];
98 
99 typedef union {
100  ///
101  /// Type of packets as defined by the MTFTPv4 packet opcodes.
102  ///
104  ///
105  /// Read request packet header.
106  ///
108  ///
109  /// Write request packet header.
110  ///
112  ///
113  /// Option acknowledge packet header.
114  ///
116  ///
117  /// Data packet header.
118  ///
120  ///
121  /// Acknowledgement packet header.
122  ///
124  ///
125  /// Data packet header with big block number.
126  ///
128  ///
129  /// Acknowledgement header with big block num.
130  ///
132  ///
133  /// Error packet header.
134  ///
137 
138 #pragma pack()
139 
140 ///
141 /// MTFTP4 option definition.
142 ///
143 typedef struct {
147 
148 typedef struct {
159 
160 typedef struct {
167 
168 typedef struct {
175 
176 //
177 // Protocol interfaces definition
178 //
179 
180 /**
181  A callback function that is provided by the caller to intercept
182  the EFI_MTFTP4_OPCODE_DATA or EFI_MTFTP4_OPCODE_DATA8 packets processed in the
183  EFI_MTFTP4_PROTOCOL.ReadFile() function, and alternatively to intercept
184  EFI_MTFTP4_OPCODE_OACK or EFI_MTFTP4_OPCODE_ERROR packets during a call to
185  EFI_MTFTP4_PROTOCOL.ReadFile(), WriteFile() or ReadDirectory().
186 
187  @param This The pointer to the EFI_MTFTP4_PROTOCOL instance.
188  @param Token The token that the caller provided in the
189  EFI_MTFTP4_PROTOCOL.ReadFile(), WriteFile()
190  or ReadDirectory() function.
191  @param PacketLen Indicates the length of the packet.
192  @param Packet The pointer to an MTFTPv4 packet.
193 
194  @retval EFI_SUCCESS The operation was successful.
195  @retval Others Aborts the transfer process.
196 
197 **/
198 typedef
201  IN EFI_MTFTP4_PROTOCOL *This,
202  IN EFI_MTFTP4_TOKEN *Token,
203  IN UINT16 PacketLen,
204  IN EFI_MTFTP4_PACKET *Paket
205  );
206 
207 /**
208  Timeout callback function.
209 
210  @param This The pointer to the EFI_MTFTP4_PROTOCOL instance.
211  @param Token The token that is provided in the
212  EFI_MTFTP4_PROTOCOL.ReadFile() or
213  EFI_MTFTP4_PROTOCOL.WriteFile() or
214  EFI_MTFTP4_PROTOCOL.ReadDirectory() functions
215  by the caller.
216 
217  @retval EFI_SUCCESS The operation was successful.
218  @retval Others Aborts download process.
219 
220 **/
221 typedef
224  IN EFI_MTFTP4_PROTOCOL *This,
225  IN EFI_MTFTP4_TOKEN *Token
226  );
227 
228 /**
229  A callback function that the caller provides to feed data to the
230  EFI_MTFTP4_PROTOCOL.WriteFile() function.
231 
232  @param This The pointer to the EFI_MTFTP4_PROTOCOL instance.
233  @param Token The token provided in the
234  EFI_MTFTP4_PROTOCOL.WriteFile() by the caller.
235  @param Length Indicates the length of the raw data wanted on input, and the
236  length the data available on output.
237  @param Buffer The pointer to the buffer where the data is stored.
238 
239  @retval EFI_SUCCESS The operation was successful.
240  @retval Others Aborts session.
241 
242 **/
243 typedef
246  IN EFI_MTFTP4_PROTOCOL *This,
247  IN EFI_MTFTP4_TOKEN *Token,
248  IN OUT UINT16 *Length,
249  OUT VOID **Buffer
250  );
251 
252 /**
253  Submits an asynchronous interrupt transfer to an interrupt endpoint of a USB device.
254 
255  @param This The pointer to the EFI_MTFTP4_PROTOCOL instance.
256  @param ModeData The pointer to storage for the EFI MTFTPv4 Protocol driver mode data.
257 
258  @retval EFI_SUCCESS The configuration data was successfully returned.
259  @retval EFI_OUT_OF_RESOURCES The required mode data could not be allocated.
260  @retval EFI_INVALID_PARAMETER This is NULL or ModeData is NULL.
261 
262 **/
263 typedef
266  IN EFI_MTFTP4_PROTOCOL *This,
267  OUT EFI_MTFTP4_MODE_DATA *ModeData
268  );
269 
270 /**
271  Initializes, changes, or resets the default operational setting for this
272  EFI MTFTPv4 Protocol driver instance.
273 
274  @param This The pointer to the EFI_MTFTP4_PROTOCOL instance.
275  @param MtftpConfigData The pointer to the configuration data structure.
276 
277  @retval EFI_SUCCESS The EFI MTFTPv4 Protocol driver was configured successfully.
278  @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
279  @retval EFI_ACCESS_DENIED The EFI configuration could not be changed at this time because
280  there is one MTFTP background operation in progress.
281  @retval EFI_NO_MAPPING When using a default address, configuration (DHCP, BOOTP,
282  RARP, etc.) has not finished yet.
283  @retval EFI_UNSUPPORTED A configuration protocol (DHCP, BOOTP, RARP, etc.) could not
284  be located when clients choose to use the default address
285  settings.
286  @retval EFI_OUT_OF_RESOURCES The EFI MTFTPv4 Protocol driver instance data could not be
287  allocated.
288  @retval EFI_DEVICE_ERROR An unexpected system or network error occurred. The EFI
289  MTFTPv4 Protocol driver instance is not configured.
290 
291 **/
292 typedef
295  IN EFI_MTFTP4_PROTOCOL *This,
296  IN EFI_MTFTP4_CONFIG_DATA *MtftpConfigData OPTIONAL
297  );
298 
299 /**
300  Gets information about a file from an MTFTPv4 server.
301 
302  @param This The pointer to the EFI_MTFTP4_PROTOCOL instance.
303  @param OverrideData Data that is used to override the existing parameters. If NULL,
304  the default parameters that were set in the
305  EFI_MTFTP4_PROTOCOL.Configure() function are used.
306  @param Filename The pointer to null-terminated ASCII file name string.
307  @param ModeStr The pointer to null-terminated ASCII mode string. If NULL, "octet" will be used.
308  @param OptionCount Number of option/value string pairs in OptionList.
309  @param OptionList The pointer to array of option/value string pairs. Ignored if
310  OptionCount is zero.
311  @param PacketLength The number of bytes in the returned packet.
312  @param Packet The pointer to the received packet. This buffer must be freed by
313  the caller.
314 
315  @retval EFI_SUCCESS An MTFTPv4 OACK packet was received and is in the Packet.
316  @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
317  - This is NULL.
318  - Filename is NULL.
319  - OptionCount is not zero and OptionList is NULL.
320  - One or more options in OptionList have wrong format.
321  - PacketLength is NULL.
322  - One or more IPv4 addresses in OverrideData are not valid
323  unicast IPv4 addresses if OverrideData is not NULL.
324  @retval EFI_UNSUPPORTED One or more options in the OptionList are in the
325  unsupported list of structure EFI_MTFTP4_MODE_DATA.
326  @retval EFI_NOT_STARTED The EFI MTFTPv4 Protocol driver has not been started.
327  @retval EFI_NO_MAPPING When using a default address, configuration (DHCP, BOOTP,
328  RARP, etc.) has not finished yet.
329  @retval EFI_ACCESS_DENIED The previous operation has not completed yet.
330  @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.
331  @retval EFI_TFTP_ERROR An MTFTPv4 ERROR packet was received and is in the Packet.
332  @retval EFI_NETWORK_UNREACHABLE An ICMP network unreachable error packet was received and the Packet is set to NULL.
333  @retval EFI_HOST_UNREACHABLE An ICMP host unreachable error packet was received and the Packet is set to NULL.
334  @retval EFI_PROTOCOL_UNREACHABLE An ICMP protocol unreachable error packet was received and the Packet is set to NULL.
335  @retval EFI_PORT_UNREACHABLE An ICMP port unreachable error packet was received and the Packet is set to NULL.
336  @retval EFI_ICMP_ERROR Some other ICMP ERROR packet was received and is in the Buffer.
337  @retval EFI_PROTOCOL_ERROR An unexpected MTFTPv4 packet was received and is in the Packet.
338  @retval EFI_TIMEOUT No responses were received from the MTFTPv4 server.
339  @retval EFI_DEVICE_ERROR An unexpected network error or system error occurred.
340  @retval EFI_NO_MEDIA There was a media error.
341 
342 **/
343 typedef
346  IN EFI_MTFTP4_PROTOCOL *This,
347  IN EFI_MTFTP4_OVERRIDE_DATA *OverrideData OPTIONAL,
348  IN UINT8 *Filename,
349  IN UINT8 *ModeStr OPTIONAL,
350  IN UINT8 OptionCount,
351  IN EFI_MTFTP4_OPTION *OptionList,
352  OUT UINT32 *PacketLength,
354  );
355 
356 /**
357  Parses the options in an MTFTPv4 OACK packet.
358 
359  @param This The pointer to the EFI_MTFTP4_PROTOCOL instance.
360  @param PacketLen Length of the OACK packet to be parsed.
361  @param Packet The pointer to the OACK packet to be parsed.
362  @param OptionCount The pointer to the number of options in following OptionList.
363  @param OptionList The pointer to EFI_MTFTP4_OPTION storage. Call the EFI Boot
364  Service FreePool() to release the OptionList if the options
365  in this OptionList are not needed any more.
366 
367  @retval EFI_SUCCESS The OACK packet was valid and the OptionCount and
368  OptionList parameters have been updated.
369  @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
370  - PacketLen is 0.
371  - Packet is NULL or Packet is not a valid MTFTPv4 packet.
372  - OptionCount is NULL.
373  @retval EFI_NOT_FOUND No options were found in the OACK packet.
374  @retval EFI_OUT_OF_RESOURCES Storage for the OptionList array cannot be allocated.
375  @retval EFI_PROTOCOL_ERROR One or more of the option fields is invalid.
376 
377 **/
378 typedef
381  IN EFI_MTFTP4_PROTOCOL *This,
382  IN UINT32 PacketLen,
383  IN EFI_MTFTP4_PACKET *Packet,
384  OUT UINT32 *OptionCount,
385  OUT EFI_MTFTP4_OPTION **OptionList OPTIONAL
386  );
387 
388 /**
389  Downloads a file from an MTFTPv4 server.
390 
391  @param This The pointer to the EFI_MTFTP4_PROTOCOL instance.
392  @param Token The pointer to the token structure to provide the parameters that are
393  used in this operation.
394 
395  @retval EFI_SUCCESS The data file has been transferred successfully.
396  @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.
397  @retval EFI_BUFFER_TOO_SMALL BufferSize is not zero but not large enough to hold the
398  downloaded data in downloading process.
399  @retval EFI_ABORTED Current operation is aborted by user.
400  @retval EFI_NETWORK_UNREACHABLE An ICMP network unreachable error packet was received.
401  @retval EFI_HOST_UNREACHABLE An ICMP host unreachable error packet was received.
402  @retval EFI_PROTOCOL_UNREACHABLE An ICMP protocol unreachable error packet was received.
403  @retval EFI_PORT_UNREACHABLE An ICMP port unreachable error packet was received.
404  @retval EFI_ICMP_ERROR Some other ICMP ERROR packet was received.
405  @retval EFI_TIMEOUT No responses were received from the MTFTPv4 server.
406  @retval EFI_TFTP_ERROR An MTFTPv4 ERROR packet was received.
407  @retval EFI_DEVICE_ERROR An unexpected network error or system error occurred.
408  @retval EFI_NO_MEDIA There was a media error.
409 
410 **/
411 typedef
414  IN EFI_MTFTP4_PROTOCOL *This,
415  IN EFI_MTFTP4_TOKEN *Token
416  );
417 
418 /**
419  Sends a file to an MTFTPv4 server.
420 
421  @param This The pointer to the EFI_MTFTP4_PROTOCOL instance.
422  @param Token The pointer to the token structure to provide the parameters that are
423  used in this operation.
424 
425  @retval EFI_SUCCESS The upload session has started.
426  @retval EFI_UNSUPPORTED The operation is not supported by this implementation.
427  @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
428  @retval EFI_UNSUPPORTED One or more options in the Token.OptionList are in
429  the unsupported list of structure EFI_MTFTP4_MODE_DATA.
430  @retval EFI_NOT_STARTED The EFI MTFTPv4 Protocol driver has not been started.
431  @retval EFI_NO_MAPPING When using a default address, configuration (DHCP, BOOTP,
432  RARP, etc.) is not finished yet.
433  @retval EFI_ALREADY_STARTED This Token is already being used in another MTFTPv4 session.
434  @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.
435  @retval EFI_ACCESS_DENIED The previous operation has not completed yet.
436  @retval EFI_DEVICE_ERROR An unexpected network error or system error occurred.
437 
438 **/
439 typedef
442  IN EFI_MTFTP4_PROTOCOL *This,
443  IN EFI_MTFTP4_TOKEN *Token
444  );
445 
446 /**
447  Downloads a data file "directory" from an MTFTPv4 server. May be unsupported in some EFI
448  implementations.
449 
450  @param This The pointer to the EFI_MTFTP4_PROTOCOL instance.
451  @param Token The pointer to the token structure to provide the parameters that are
452  used in this operation.
453 
454  @retval EFI_SUCCESS The MTFTPv4 related file "directory" has been downloaded.
455  @retval EFI_UNSUPPORTED The operation is not supported by this implementation.
456  @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
457  @retval EFI_UNSUPPORTED One or more options in the Token.OptionList are in
458  the unsupported list of structure EFI_MTFTP4_MODE_DATA.
459  @retval EFI_NOT_STARTED The EFI MTFTPv4 Protocol driver has not been started.
460  @retval EFI_NO_MAPPING When using a default address, configuration (DHCP, BOOTP,
461  RARP, etc.) is not finished yet.
462  @retval EFI_ALREADY_STARTED This Token is already being used in another MTFTPv4 session.
463  @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.
464  @retval EFI_ACCESS_DENIED The previous operation has not completed yet.
465  @retval EFI_DEVICE_ERROR An unexpected network error or system error occurred.
466 
467 **/
468 typedef
471  IN EFI_MTFTP4_PROTOCOL *This,
472  IN EFI_MTFTP4_TOKEN *Token
473  );
474 
475 /**
476  Polls for incoming data packets and processes outgoing data packets.
477 
478  @param This The pointer to the EFI_MTFTP4_PROTOCOL instance.
479 
480  @retval EFI_SUCCESS Incoming or outgoing data was processed.
481  @retval EFI_NOT_STARTED This EFI MTFTPv4 Protocol instance has not been started.
482  @retval EFI_NO_MAPPING When using a default address, configuration (DHCP, BOOTP,
483  RARP, etc.) is not finished yet.
484  @retval EFI_INVALID_PARAMETER This is NULL.
485  @retval EFI_DEVICE_ERROR An unexpected system or network error occurred.
486  @retval EFI_TIMEOUT Data was dropped out of the transmit and/or receive queue.
487  Consider increasing the polling rate.
488 
489 **/
490 typedef
493  IN EFI_MTFTP4_PROTOCOL *This
494  );
495 
496 ///
497 /// The EFI_MTFTP4_PROTOCOL is designed to be used by UEFI drivers and applications
498 /// to transmit and receive data files. The EFI MTFTPv4 Protocol driver uses
499 /// the underlying EFI UDPv4 Protocol driver and EFI IPv4 Protocol driver.
500 ///
510 };
511 
513  ///
514  /// The status that is returned to the caller at the end of the operation
515  /// to indicate whether this operation completed successfully.
516  ///
518  ///
519  /// The event that will be signaled when the operation completes. If
520  /// set to NULL, the corresponding function will wait until the read or
521  /// write operation finishes. The type of Event must be
522  /// EVT_NOTIFY_SIGNAL. The Task Priority Level (TPL) of
523  /// Event must be lower than or equal to TPL_CALLBACK.
524  ///
526  ///
527  /// If not NULL, the data that will be used to override the existing configure data.
528  ///
530  ///
531  /// The pointer to the null-terminated ASCII file name string.
532  ///
534  ///
535  /// The pointer to the null-terminated ASCII mode string. If NULL, "octet" is used.
536  ///
538  ///
539  /// Number of option/value string pairs.
540  ///
542  ///
543  /// The pointer to an array of option/value string pairs. Ignored if OptionCount is zero.
544  ///
546  ///
547  /// The size of the data buffer.
548  ///
550  ///
551  /// The pointer to the data buffer. Data that is downloaded from the
552  /// MTFTPv4 server is stored here. Data that is uploaded to the
553  /// MTFTPv4 server is read from here. Ignored if BufferSize is zero.
554  ///
556  ///
557  /// The pointer to the context that will be used by CheckPacket,
558  /// TimeoutCallback and PacketNeeded.
559  ///
561  ///
562  /// The pointer to the callback function to check the contents of the received packet.
563  ///
565  ///
566  /// The pointer to the function to be called when a timeout occurs.
567  ///
569  ///
570  /// The pointer to the function to provide the needed packet contents.
571  ///
573 };
574 
577 
578 #endif
EFI_IPv4_ADDRESS ServerIp
Definition: Mtftp4.h:154
#define OPTIONAL
Passing the datum to the function is optional, and a NULL is passed if the value is not supplied.
Definition: Base.h:292
EFI_GUID gEfiMtftp4ServiceBindingProtocolGuid
The EFI_MTFTP4_PROTOCOL is designed to be used by UEFI drivers and applications to transmit and recei...
Definition: Mtftp4.h:501
UINT8 UnsupportedOptionCount
Definition: Mtftp4.h:164
EFI_MTFTP4_OPTION * OptionList
The pointer to an array of option/value string pairs.
Definition: Mtftp4.h:545
EFI_STATUS(EFIAPI * EFI_MTFTP4_READ_DIRECTORY)(IN EFI_MTFTP4_PROTOCOL *This, IN EFI_MTFTP4_TOKEN *Token)
Downloads a data file "directory" from an MTFTPv4 server.
Definition: Mtftp4.h:470
128 bit buffer containing a unique identifier value.
Definition: Base.h:215
EFI_STATUS(EFIAPI * EFI_MTFTP4_CHECK_PACKET)(IN EFI_MTFTP4_PROTOCOL *This, IN EFI_MTFTP4_TOKEN *Token, IN UINT16 PacketLen, IN EFI_MTFTP4_PACKET *Paket)
A callback function that is provided by the caller to intercept the EFI_MTFTP4_OPCODE_DATA or EFI_MTF...
Definition: Mtftp4.h:200
VOID * EFI_EVENT
Handle to an event structure.
Definition: UefiBaseType.h:39
unsigned char BOOLEAN
unsigned int UINT32
Definition: ProcessorBind.h:98
UINT8 Length
Definition: Acpi10.h:134
EFI_MTFTP4_ERROR_HEADER Error
Error packet header.
Definition: Mtftp4.h:135
VOID * Context
The pointer to the context that will be used by CheckPacket, TimeoutCallback and PacketNeeded.
Definition: Mtftp4.h:560
EFI_STATUS(EFIAPI * EFI_MTFTP4_POLL)(IN EFI_MTFTP4_PROTOCOL *This)
Polls for incoming data packets and processes outgoing data packets.
Definition: Mtftp4.h:492
unsigned char UINT8
MTFTP4 option definition.
Definition: Mtftp4.h:143
UINT8 * Filename
The pointer to the null-terminated ASCII file name string.
Definition: Mtftp4.h:533
EFI_MTFTP4_READ_FILE ReadFile
Definition: Mtftp4.h:506
EFI_STATUS(EFIAPI * EFI_MTFTP4_WRITE_FILE)(IN EFI_MTFTP4_PROTOCOL *This, IN EFI_MTFTP4_TOKEN *Token)
Sends a file to an MTFTPv4 server.
Definition: Mtftp4.h:441
EFI_MTFTP4_DATA8_HEADER Data8
Data packet header with big block number.
Definition: Mtftp4.h:127
#define OUT
Definition: mlx_utils.h:29
EFI_MTFTP4_ACK_HEADER Ack
Acknowledgement packet header.
Definition: Mtftp4.h:123
EFI_MTFTP4_DATA_HEADER Data
Data packet header.
Definition: Mtftp4.h:119
EFI_STATUS(EFIAPI * EFI_MTFTP4_PACKET_NEEDED)(IN EFI_MTFTP4_PROTOCOL *This, IN EFI_MTFTP4_TOKEN *Token, IN OUT UINT16 *Length, OUT VOID **Buffer)
A callback function that the caller provides to feed data to the EFI_MTFTP4_PROTOCOL....
Definition: Mtftp4.h:245
EFI_MTFTP4_ACK8_HEADER Ack8
Acknowledgement header with big block num.
Definition: Mtftp4.h:131
EFI_STATUS Status
The status that is returned to the caller at the end of the operation to indicate whether this operat...
Definition: Mtftp4.h:517
EFI_MTFTP4_PARSE_OPTIONS ParseOptions
Definition: Mtftp4.h:505
UINT8 * OptionStr
Definition: Mtftp4.h:144
4-byte buffer.
Definition: Base.h:225
EFI_EVENT Event
The event that will be signaled when the operation completes.
Definition: Mtftp4.h:525
EFI_STATUS(EFIAPI * EFI_MTFTP4_TIMEOUT_CALLBACK)(IN EFI_MTFTP4_PROTOCOL *This, IN EFI_MTFTP4_TOKEN *Token)
Timeout callback function.
Definition: Mtftp4.h:223
EFI_STATUS(EFIAPI * EFI_MTFTP4_CONFIGURE)(IN EFI_MTFTP4_PROTOCOL *This, IN EFI_MTFTP4_CONFIG_DATA *MtftpConfigData OPTIONAL)
Initializes, changes, or resets the default operational setting for this EFI MTFTPv4 Protocol driver ...
Definition: Mtftp4.h:294
EFI_MTFTP4_WRITE_FILE WriteFile
Definition: Mtftp4.h:507
unsigned short UINT16
#define EFIAPI
EFI_MTFTP4_POLL Poll
Definition: Mtftp4.h:509
EFI_STATUS(EFIAPI * EFI_MTFTP4_GET_MODE_DATA)(IN EFI_MTFTP4_PROTOCOL *This, OUT EFI_MTFTP4_MODE_DATA *ModeData)
Submits an asynchronous interrupt transfer to an interrupt endpoint of a USB device.
Definition: Mtftp4.h:265
EFI_MTFTP4_CONFIGURE Configure
Definition: Mtftp4.h:503
FILE_LICENCE(BSD2_PATENT)
UINT8 ** SupportedOptoins
Definition: Mtftp4.h:163
SEGOFF16_t Buffer
Buffer address.
Definition: pxe_api.h:65
EFI_MTFTP4_OVERRIDE_DATA * OverrideData
If not NULL, the data that will be used to override the existing configure data.
Definition: Mtftp4.h:529
BOOLEAN UseDefaultSetting
Definition: Mtftp4.h:149
EFI_STATUS(EFIAPI * EFI_MTFTP4_PARSE_OPTIONS)(IN EFI_MTFTP4_PROTOCOL *This, IN UINT32 PacketLen, IN EFI_MTFTP4_PACKET *Packet, OUT UINT32 *OptionCount, OUT EFI_MTFTP4_OPTION **OptionList OPTIONAL)
Parses the options in an MTFTPv4 OACK packet.
Definition: Mtftp4.h:380
UINT8 * ValueStr
Definition: Mtftp4.h:145
EFI_MTFTP4_READ_DIRECTORY ReadDirectory
Definition: Mtftp4.h:508
EFI_STATUS(EFIAPI * EFI_MTFTP4_GET_INFO)(IN EFI_MTFTP4_PROTOCOL *This, IN EFI_MTFTP4_OVERRIDE_DATA *OverrideData OPTIONAL, IN UINT8 *Filename, IN UINT8 *ModeStr OPTIONAL, IN UINT8 OptionCount, IN EFI_MTFTP4_OPTION *OptionList, OUT UINT32 *PacketLength, OUT EFI_MTFTP4_PACKET **Packet OPTIONAL)
Gets information about a file from an MTFTPv4 server.
Definition: Mtftp4.h:345
#define VOID
Undeclared type.
Definition: Base.h:271
EFI_MTFTP4_GET_INFO GetInfo
Definition: Mtftp4.h:504
unsigned long long UINT64
Definition: ProcessorBind.h:96
EFI_IPv4_ADDRESS GatewayIp
Definition: Mtftp4.h:153
UINT16 OpCode
Type of packets as defined by the MTFTPv4 packet opcodes.
Definition: Mtftp4.h:103
#define IN
Definition: mlx_utils.h:28
UINT8 ** UnsupportedOptoins
Definition: Mtftp4.h:165
VOID * Buffer
The pointer to the data buffer.
Definition: Mtftp4.h:555
EFI_MTFTP4_PACKET_NEEDED PacketNeeded
The pointer to the function to provide the needed packet contents.
Definition: Mtftp4.h:572
UINT64 BufferSize
The size of the data buffer.
Definition: Mtftp4.h:549
EFI_MTFTP4_REQ_HEADER Rrq
Read request packet header.
Definition: Mtftp4.h:107
RETURN_STATUS EFI_STATUS
Function return status for EFI API.
Definition: UefiBaseType.h:31
EFI_MTFTP4_REQ_HEADER Wrq
Write request packet header.
Definition: Mtftp4.h:111
UINT32 OptionCount
Number of option/value string pairs.
Definition: Mtftp4.h:541
EFI_IPv4_ADDRESS SubnetMask
Definition: Mtftp4.h:151
EFI_MTFTP4_OACK_HEADER Oack
Option acknowledge packet header.
Definition: Mtftp4.h:115
EFI_MTFTP4_CONFIG_DATA ConfigData
Definition: Mtftp4.h:161
EFI_STATUS(EFIAPI * EFI_MTFTP4_READ_FILE)(IN EFI_MTFTP4_PROTOCOL *This, IN EFI_MTFTP4_TOKEN *Token)
Downloads a file from an MTFTPv4 server.
Definition: Mtftp4.h:413
EFI_IPv4_ADDRESS GatewayIp
Definition: Mtftp4.h:169
EFI_IPv4_ADDRESS StationIp
Definition: Mtftp4.h:150
UINT16 InitialServerPort
Definition: Mtftp4.h:155
EFI_IPv4_ADDRESS ServerIp
Definition: Mtftp4.h:170
EFI_MTFTP4_GET_MODE_DATA GetModeData
Definition: Mtftp4.h:502
EFI_GUID gEfiMtftp4ProtocolGuid
EFI_MTFTP4_CHECK_PACKET CheckPacket
The pointer to the callback function to check the contents of the received packet.
Definition: Mtftp4.h:564
UINT8 * ModeStr
The pointer to the null-terminated ASCII mode string.
Definition: Mtftp4.h:537
UINT8 SupportedOptionCount
Definition: Mtftp4.h:162
EFI_MTFTP4_TIMEOUT_CALLBACK TimeoutCallback
The pointer to the function to be called when a timeout occurs.
Definition: Mtftp4.h:568