iPXE
Data Structures | Macros | Typedefs | Functions | Variables
Mtftp6.h File Reference

UEFI Multicast Trivial File Transfer Protocol v6 Definition, which is built upon the EFI UDPv6 Protocol and provides basic services for client-side unicast and/or multicast TFTP operations. More...

Go to the source code of this file.

Data Structures

struct  EFI_MTFTP6_REQ_HEADER
 EFI_MTFTP6_REQ_HEADER. More...
 
struct  EFI_MTFTP6_OACK_HEADER
 EFI_MTFTP6_OACK_HEADER. More...
 
struct  EFI_MTFTP6_DATA_HEADER
 EFI_MTFTP6_DATA_HEADER. More...
 
struct  EFI_MTFTP6_ACK_HEADER
 EFI_MTFTP6_ACK_HEADER. More...
 
struct  EFI_MTFTP6_DATA8_HEADER
 EFI_MTFTP6_DATA8_HEADER. More...
 
struct  EFI_MTFTP6_ACK8_HEADER
 EFI_MTFTP6_ACK8_HEADER. More...
 
struct  EFI_MTFTP6_ERROR_HEADER
 EFI_MTFTP6_ERROR_HEADER. More...
 
union  EFI_MTFTP6_PACKET
 EFI_MTFTP6_PACKET. More...
 
struct  EFI_MTFTP6_CONFIG_DATA
 EFI_MTFTP6_CONFIG_DATA. More...
 
struct  EFI_MTFTP6_MODE_DATA
 EFI_MTFTP6_MODE_DATA. More...
 
struct  EFI_MTFTP6_OVERRIDE_DATA
 EFI_MTFTP_OVERRIDE_DATA. More...
 
struct  EFI_MTFTP6_OPTION
 EFI_MTFTP6_OPTION. More...
 
struct  _EFI_MTFTP6_TOKEN
 
struct  _EFI_MTFTP6_PROTOCOL
 The EFI_MTFTP6_PROTOCOL is designed to be used by UEFI drivers and applications to transmit and receive data files. More...
 

Macros

#define EFI_MTFTP6_SERVICE_BINDING_PROTOCOL_GUID
 
#define EFI_MTFTP6_PROTOCOL_GUID
 
#define EFI_MTFTP6_OPCODE_RRQ   1
 MTFTP Packet OpCodes. More...
 
#define EFI_MTFTP6_OPCODE_WRQ   2
 The MTFTPv6 packet is a write request. More...
 
#define EFI_MTFTP6_OPCODE_DATA   3
 The MTFTPv6 packet is a data packet. More...
 
#define EFI_MTFTP6_OPCODE_ACK   4
 The MTFTPv6 packet is an acknowledgement packet. More...
 
#define EFI_MTFTP6_OPCODE_ERROR   5
 The MTFTPv6 packet is an error packet. More...
 
#define EFI_MTFTP6_OPCODE_OACK   6
 The MTFTPv6 packet is an option acknowledgement packet. More...
 
#define EFI_MTFTP6_OPCODE_DIR   7
 The MTFTPv6 packet is a directory query packet. More...
 
#define EFI_MTFTP6_OPCODE_DATA8   8
 The MTFTPv6 packet is a data packet with a big block number. More...
 
#define EFI_MTFTP6_OPCODE_ACK8   9
 The MTFTPv6 packet is an acknowledgement packet with a big block number. More...
 
#define EFI_MTFTP6_ERRORCODE_NOT_DEFINED   0
 MTFTP ERROR Packet ErrorCodes. More...
 
#define EFI_MTFTP6_ERRORCODE_FILE_NOT_FOUND   1
 The file was not found. More...
 
#define EFI_MTFTP6_ERRORCODE_ACCESS_VIOLATION   2
 There was an access violation. More...
 
#define EFI_MTFTP6_ERRORCODE_DISK_FULL   3
 The disk was full or its allocation was exceeded. More...
 
#define EFI_MTFTP6_ERRORCODE_ILLEGAL_OPERATION   4
 The MTFTPv6 operation was illegal. More...
 
#define EFI_MTFTP6_ERRORCODE_UNKNOWN_TRANSFER_ID   5
 The transfer ID is unknown. More...
 
#define EFI_MTFTP6_ERRORCODE_FILE_ALREADY_EXISTS   6
 The file already exists. More...
 
#define EFI_MTFTP6_ERRORCODE_NO_SUCH_USER   7
 There is no such user. More...
 
#define EFI_MTFTP6_ERRORCODE_REQUEST_DENIED   8
 The request has been denied due to option negotiation. More...
 

Typedefs

typedef struct _EFI_MTFTP6_PROTOCOL EFI_MTFTP6_PROTOCOL
 
typedef struct _EFI_MTFTP6_TOKEN EFI_MTFTP6_TOKEN
 
typedef EFI_STATUS(EFIAPIEFI_MTFTP6_CHECK_PACKET) (IN EFI_MTFTP6_PROTOCOL *This, IN EFI_MTFTP6_TOKEN *Token, IN UINT16 PacketLen, IN EFI_MTFTP6_PACKET *Packet)
 EFI_MTFTP6_TIMEOUT_CALLBACK is a callback function that the caller provides to capture the timeout event in the EFI_MTFTP6_PROTOCOL.ReadFile(), EFI_MTFTP6_PROTOCOL.WriteFile() or EFI_MTFTP6_PROTOCOL.ReadDirectory() functions. More...
 
typedef EFI_STATUS(EFIAPIEFI_MTFTP6_TIMEOUT_CALLBACK) (IN EFI_MTFTP6_PROTOCOL *This, IN EFI_MTFTP6_TOKEN *Token)
 EFI_MTFTP6_TIMEOUT_CALLBACK is a callback function that the caller provides to capture the timeout event in the EFI_MTFTP6_PROTOCOL.ReadFile(), EFI_MTFTP6_PROTOCOL.WriteFile() or EFI_MTFTP6_PROTOCOL.ReadDirectory() functions. More...
 
typedef EFI_STATUS(EFIAPIEFI_MTFTP6_PACKET_NEEDED) (IN EFI_MTFTP6_PROTOCOL *This, IN EFI_MTFTP6_TOKEN *Token, IN OUT UINT16 *Length, OUT VOID **Buffer)
 EFI_MTFTP6_PACKET_NEEDED is a callback function that the caller provides to feed data to the EFI_MTFTP6_PROTOCOL.WriteFile() function. More...
 
typedef EFI_STATUS(EFIAPIEFI_MTFTP6_GET_MODE_DATA) (IN EFI_MTFTP6_PROTOCOL *This, OUT EFI_MTFTP6_MODE_DATA *ModeData)
 Read the current operational settings. More...
 
typedef EFI_STATUS(EFIAPIEFI_MTFTP6_CONFIGURE) (IN EFI_MTFTP6_PROTOCOL *This, IN EFI_MTFTP6_CONFIG_DATA *MtftpConfigData OPTIONAL)
 Initializes, changes, or resets the default operational setting for this EFI MTFTPv6 Protocol driver instance. More...
 
typedef EFI_STATUS(EFIAPIEFI_MTFTP6_GET_INFO) (IN EFI_MTFTP6_PROTOCOL *This, IN EFI_MTFTP6_OVERRIDE_DATA *OverrideData OPTIONAL, IN UINT8 *Filename, IN UINT8 *ModeStr OPTIONAL, IN UINT8 OptionCount, IN EFI_MTFTP6_OPTION *OptionList OPTIONAL, OUT UINT32 *PacketLength, OUT EFI_MTFTP6_PACKET **Packet OPTIONAL)
 Get information about a file from an MTFTPv6 server. More...
 
typedef EFI_STATUS(EFIAPIEFI_MTFTP6_PARSE_OPTIONS) (IN EFI_MTFTP6_PROTOCOL *This, IN UINT32 PacketLen, IN EFI_MTFTP6_PACKET *Packet, OUT UINT32 *OptionCount, OUT EFI_MTFTP6_OPTION **OptionList OPTIONAL)
 Parse the options in an MTFTPv6 OACK packet. More...
 
typedef EFI_STATUS(EFIAPIEFI_MTFTP6_READ_FILE) (IN EFI_MTFTP6_PROTOCOL *This, IN EFI_MTFTP6_TOKEN *Token)
 Download a file from an MTFTPv6 server. More...
 
typedef EFI_STATUS(EFIAPIEFI_MTFTP6_WRITE_FILE) (IN EFI_MTFTP6_PROTOCOL *This, IN EFI_MTFTP6_TOKEN *Token)
 Send a file to an MTFTPv6 server. More...
 
typedef EFI_STATUS(EFIAPIEFI_MTFTP6_READ_DIRECTORY) (IN EFI_MTFTP6_PROTOCOL *This, IN EFI_MTFTP6_TOKEN *Token)
 Download a data file directory from an MTFTPv6 server. More...
 
typedef EFI_STATUS(EFIAPIEFI_MTFTP6_POLL) (IN EFI_MTFTP6_PROTOCOL *This)
 Polls for incoming data packets and processes outgoing data packets. More...
 

Functions

 FILE_LICENCE (BSD2_PATENT)
 

Variables

EFI_GUID gEfiMtftp6ServiceBindingProtocolGuid
 
EFI_GUID gEfiMtftp6ProtocolGuid
 

Detailed Description

UEFI Multicast Trivial File Transfer Protocol v6 Definition, which is built upon the EFI UDPv6 Protocol and provides basic services for client-side unicast and/or multicast TFTP operations.

Copyright (c) 2008 - 2011, Intel Corporation. All rights reserved.
(C) Copyright 2016 Hewlett Packard Enterprise Development LP

SPDX-License-Identifier: BSD-2-Clause-Patent

Revision Reference:
This Protocol is introduced in UEFI Specification 2.2

Definition in file Mtftp6.h.

Macro Definition Documentation

◆ EFI_MTFTP6_SERVICE_BINDING_PROTOCOL_GUID

#define EFI_MTFTP6_SERVICE_BINDING_PROTOCOL_GUID
Value:
{ \
0xd9760ff3, 0x3cca, 0x4267, {0x80, 0xf9, 0x75, 0x27, 0xfa, 0xfa, 0x42, 0x23 } \
}

Definition at line 21 of file Mtftp6.h.

◆ EFI_MTFTP6_PROTOCOL_GUID

#define EFI_MTFTP6_PROTOCOL_GUID
Value:
{ \
0xbf0a78ba, 0xec29, 0x49cf, {0xa1, 0xc9, 0x7a, 0xe5, 0x4e, 0xab, 0x6a, 0x51 } \
}

Definition at line 26 of file Mtftp6.h.

◆ EFI_MTFTP6_OPCODE_RRQ

#define EFI_MTFTP6_OPCODE_RRQ   1

MTFTP Packet OpCodes.

The MTFTPv6 packet is a read request.

Definition at line 37 of file Mtftp6.h.

◆ EFI_MTFTP6_OPCODE_WRQ

#define EFI_MTFTP6_OPCODE_WRQ   2

The MTFTPv6 packet is a write request.

Definition at line 38 of file Mtftp6.h.

◆ EFI_MTFTP6_OPCODE_DATA

#define EFI_MTFTP6_OPCODE_DATA   3

The MTFTPv6 packet is a data packet.

Definition at line 39 of file Mtftp6.h.

◆ EFI_MTFTP6_OPCODE_ACK

#define EFI_MTFTP6_OPCODE_ACK   4

The MTFTPv6 packet is an acknowledgement packet.

Definition at line 40 of file Mtftp6.h.

◆ EFI_MTFTP6_OPCODE_ERROR

#define EFI_MTFTP6_OPCODE_ERROR   5

The MTFTPv6 packet is an error packet.

Definition at line 41 of file Mtftp6.h.

◆ EFI_MTFTP6_OPCODE_OACK

#define EFI_MTFTP6_OPCODE_OACK   6

The MTFTPv6 packet is an option acknowledgement packet.

Definition at line 42 of file Mtftp6.h.

◆ EFI_MTFTP6_OPCODE_DIR

#define EFI_MTFTP6_OPCODE_DIR   7

The MTFTPv6 packet is a directory query packet.

Definition at line 43 of file Mtftp6.h.

◆ EFI_MTFTP6_OPCODE_DATA8

#define EFI_MTFTP6_OPCODE_DATA8   8

The MTFTPv6 packet is a data packet with a big block number.

Definition at line 44 of file Mtftp6.h.

◆ EFI_MTFTP6_OPCODE_ACK8

#define EFI_MTFTP6_OPCODE_ACK8   9

The MTFTPv6 packet is an acknowledgement packet with a big block number.

Definition at line 45 of file Mtftp6.h.

◆ EFI_MTFTP6_ERRORCODE_NOT_DEFINED

#define EFI_MTFTP6_ERRORCODE_NOT_DEFINED   0

MTFTP ERROR Packet ErrorCodes.

The error code is not defined. See the error message in the packet (if any) for details.

Definition at line 54 of file Mtftp6.h.

◆ EFI_MTFTP6_ERRORCODE_FILE_NOT_FOUND

#define EFI_MTFTP6_ERRORCODE_FILE_NOT_FOUND   1

The file was not found.

Definition at line 58 of file Mtftp6.h.

◆ EFI_MTFTP6_ERRORCODE_ACCESS_VIOLATION

#define EFI_MTFTP6_ERRORCODE_ACCESS_VIOLATION   2

There was an access violation.

Definition at line 62 of file Mtftp6.h.

◆ EFI_MTFTP6_ERRORCODE_DISK_FULL

#define EFI_MTFTP6_ERRORCODE_DISK_FULL   3

The disk was full or its allocation was exceeded.

Definition at line 66 of file Mtftp6.h.

◆ EFI_MTFTP6_ERRORCODE_ILLEGAL_OPERATION

#define EFI_MTFTP6_ERRORCODE_ILLEGAL_OPERATION   4

The MTFTPv6 operation was illegal.

Definition at line 70 of file Mtftp6.h.

◆ EFI_MTFTP6_ERRORCODE_UNKNOWN_TRANSFER_ID

#define EFI_MTFTP6_ERRORCODE_UNKNOWN_TRANSFER_ID   5

The transfer ID is unknown.

Definition at line 74 of file Mtftp6.h.

◆ EFI_MTFTP6_ERRORCODE_FILE_ALREADY_EXISTS

#define EFI_MTFTP6_ERRORCODE_FILE_ALREADY_EXISTS   6

The file already exists.

Definition at line 78 of file Mtftp6.h.

◆ EFI_MTFTP6_ERRORCODE_NO_SUCH_USER

#define EFI_MTFTP6_ERRORCODE_NO_SUCH_USER   7

There is no such user.

Definition at line 82 of file Mtftp6.h.

◆ EFI_MTFTP6_ERRORCODE_REQUEST_DENIED

#define EFI_MTFTP6_ERRORCODE_REQUEST_DENIED   8

The request has been denied due to option negotiation.

Definition at line 86 of file Mtftp6.h.

Typedef Documentation

◆ EFI_MTFTP6_PROTOCOL

Definition at line 31 of file Mtftp6.h.

◆ EFI_MTFTP6_TOKEN

Definition at line 32 of file Mtftp6.h.

◆ EFI_MTFTP6_CHECK_PACKET

typedef EFI_STATUS(EFIAPI * EFI_MTFTP6_CHECK_PACKET) (IN EFI_MTFTP6_PROTOCOL *This, IN EFI_MTFTP6_TOKEN *Token, IN UINT16 PacketLen, IN EFI_MTFTP6_PACKET *Packet)

EFI_MTFTP6_TIMEOUT_CALLBACK is a callback function that the caller provides to capture the timeout event in the EFI_MTFTP6_PROTOCOL.ReadFile(), EFI_MTFTP6_PROTOCOL.WriteFile() or EFI_MTFTP6_PROTOCOL.ReadDirectory() functions.

Whenever a timeout occurs, the EFI MTFTPv6 Protocol driver will call the EFI_MTFTP6_TIMEOUT_CALLBACK function to notify the caller of the timeout event. Any status code other than EFI_SUCCESS that is returned from this function will abort the current download process.

Parameters
[in]ThisPointer to the EFI_MTFTP6_PROTOCOL instance.
[in]TokenThe token that the caller provided in the EFI_MTFTP6_PROTOCOl.ReadFile(), WriteFile() or ReadDirectory() function.
[in]PacketLenIndicates the length of the packet.
[in]PacketPointer to an MTFTPv6 packet.
Return values
EFI_SUCCESSOperation success.
OthersAborts session.

Definition at line 329 of file Mtftp6.h.

◆ EFI_MTFTP6_TIMEOUT_CALLBACK

typedef EFI_STATUS(EFIAPI * EFI_MTFTP6_TIMEOUT_CALLBACK) (IN EFI_MTFTP6_PROTOCOL *This, IN EFI_MTFTP6_TOKEN *Token)

EFI_MTFTP6_TIMEOUT_CALLBACK is a callback function that the caller provides to capture the timeout event in the EFI_MTFTP6_PROTOCOL.ReadFile(), EFI_MTFTP6_PROTOCOL.WriteFile() or EFI_MTFTP6_PROTOCOL.ReadDirectory() functions.

Whenever a timeout occurs, the EFI MTFTPv6 Protocol driver will call the EFI_MTFTP6_TIMEOUT_CALLBACK function to notify the caller of the timeout event. Any status code other than EFI_SUCCESS that is returned from this function will abort the current download process.

Parameters
[in]ThisPointer to the EFI_MTFTP6_PROTOCOL instance.
[in]TokenThe token that is provided in the EFI_MTFTP6_PROTOCOL.ReadFile() or EFI_MTFTP6_PROTOCOL.WriteFile() or EFI_MTFTP6_PROTOCOL.ReadDirectory() functions by the caller.
Return values
EFI_SUCCESSOperation success.
OthersAborts session.

Definition at line 356 of file Mtftp6.h.

◆ EFI_MTFTP6_PACKET_NEEDED

typedef EFI_STATUS(EFIAPI * EFI_MTFTP6_PACKET_NEEDED) (IN EFI_MTFTP6_PROTOCOL *This, IN EFI_MTFTP6_TOKEN *Token, IN OUT UINT16 *Length, OUT VOID **Buffer)

EFI_MTFTP6_PACKET_NEEDED is a callback function that the caller provides to feed data to the EFI_MTFTP6_PROTOCOL.WriteFile() function.

EFI_MTFTP6_PACKET_NEEDED provides another mechanism for the caller to provide data to upload other than a static buffer. The EFI MTFTP6 Protocol driver always calls EFI_MTFTP6_PACKET_NEEDED to get packet data from the caller if no static buffer was given in the initial call to EFI_MTFTP6_PROTOCOL.WriteFile() function. Setting *Length to zero signals the end of the session. Returning a status code other than EFI_SUCCESS aborts the session.

Parameters
[in]ThisPointer to the EFI_MTFTP6_PROTOCOL instance.
[in]TokenThe token provided in the EFI_MTFTP6_PROTOCOL.WriteFile() by the caller.
[in,out]LengthIndicates the length of the raw data wanted on input, and the length the data available on output.
[out]BufferPointer to the buffer where the data is stored.
Return values
EFI_SUCCESSOperation success.
OthersAborts session.

Definition at line 383 of file Mtftp6.h.

◆ EFI_MTFTP6_GET_MODE_DATA

typedef EFI_STATUS(EFIAPI * EFI_MTFTP6_GET_MODE_DATA) (IN EFI_MTFTP6_PROTOCOL *This, OUT EFI_MTFTP6_MODE_DATA *ModeData)

Read the current operational settings.

The GetModeData() function reads the current operational settings of this EFI MTFTPv6 Protocol driver instance.

Parameters
[in]ThisPointer to the EFI_MTFTP6_PROTOCOL instance.
[out]ModeDataThe buffer in which the EFI MTFTPv6 Protocol driver mode data is returned.
Return values
EFI_SUCCESSThe configuration data was successfully returned.
EFI_OUT_OF_RESOURCESThe required mode data could not be allocated.
EFI_INVALID_PARAMETERThis is NULL or ModeData is NULL.

Definition at line 477 of file Mtftp6.h.

◆ EFI_MTFTP6_CONFIGURE

typedef EFI_STATUS(EFIAPI * EFI_MTFTP6_CONFIGURE) (IN EFI_MTFTP6_PROTOCOL *This, IN EFI_MTFTP6_CONFIG_DATA *MtftpConfigData OPTIONAL)

Initializes, changes, or resets the default operational setting for this EFI MTFTPv6 Protocol driver instance.

The Configure() function is used to set and change the configuration data for this EFI MTFTPv6 Protocol driver instance. The configuration data can be reset to startup defaults by calling Configure() with MtftpConfigData set to NULL. Whenever the instance is reset, any pending operation is aborted. By changing the EFI MTFTPv6 Protocol driver instance configuration data, the client can connect to different MTFTPv6 servers. The configuration parameters in MtftpConfigData are used as the default parameters in later MTFTPv6 operations and can be overridden in later operations.

Parameters
[in]ThisPointer to the EFI_MTFTP6_PROTOCOL instance.
[in]MtftpConfigDataPointer to the configuration data structure.
Return values
EFI_SUCCESSThe EFI MTFTPv6 Protocol instance was configured successfully.
EFI_INVALID_PARAMETEROne or more following conditions are TRUE:
  • This is NULL.
  • MtftpConfigData.StationIp is neither zero nor one of the configured IP addresses in the underlying IPv6 driver.
  • MtftpCofigData.ServerIp is not a valid IPv6 unicast address.
EFI_ACCESS_DENIED- The configuration could not be changed at this time because there is some MTFTP background operation in progress.
  • MtftpCofigData.LocalPort is already in use.
EFI_NO_MAPPINGThe underlying IPv6 driver was responsible for choosing a source address for this instance, but no source address was available for use.
EFI_OUT_OF_RESOURCESThe EFI MTFTPv6 Protocol driver instance data could not be allocated.
EFI_DEVICE_ERRORAn unexpected system or network error occurred. The EFI MTFTPv6 Protocol driver instance is not configured.

Definition at line 517 of file Mtftp6.h.

◆ EFI_MTFTP6_GET_INFO

typedef EFI_STATUS(EFIAPI * EFI_MTFTP6_GET_INFO) (IN EFI_MTFTP6_PROTOCOL *This, IN EFI_MTFTP6_OVERRIDE_DATA *OverrideData OPTIONAL, IN UINT8 *Filename, IN UINT8 *ModeStr OPTIONAL, IN UINT8 OptionCount, IN EFI_MTFTP6_OPTION *OptionList OPTIONAL, OUT UINT32 *PacketLength, OUT EFI_MTFTP6_PACKET **Packet OPTIONAL)

Get information about a file from an MTFTPv6 server.

The GetInfo() function assembles an MTFTPv6 request packet with options, sends it to the MTFTPv6 server, and may return an MTFTPv6 OACK, MTFTPv6 ERROR, or ICMP ERROR packet. Retries occur only if no response packets are received from the MTFTPv6 server before the timeout expires.

Parameters
[in]ThisPointer to the EFI_MTFTP6_PROTOCOL instance.
[in]OverrideDataData that is used to override the existing parameters. If NULL, the default parameters that were set in the EFI_MTFTP6_PROTOCOL.Configure() function are used.
[in]FilenamePointer to null-terminated ASCII file name string.
[in]ModeStrPointer to null-terminated ASCII mode string. If NULL, octet will be used
[in]OptionCountNumber of option/value string pairs in OptionList.
[in]OptionListPointer to array of option/value string pairs. Ignored if OptionCount is zero.
[out]PacketLengthThe number of bytes in the returned packet.
[out]PacketThe pointer to the received packet. This buffer must be freed by the caller.
Return values
EFI_SUCCESSAn MTFTPv6 OACK packet was received and is in the Packet.
EFI_INVALID_PARAMETEROne or more of the following conditions is TRUE:
  • This is NULL.
  • Filename is NULL
  • OptionCount is not zero and OptionList is NULL.
  • One or more options in OptionList have wrong format.
  • PacketLength is NULL.
  • OverrideData.ServerIp is not valid unicast IPv6 addresses.
EFI_UNSUPPORTEDOne or more options in the OptionList are unsupported by this implementation.
EFI_NOT_STARTEDThe EFI MTFTPv6 Protocol driver has not been started.
EFI_NO_MAPPINGThe underlying IPv6 driver was responsible for choosing a source address for this instance, but no source address was available for use.
EFI_ACCESS_DENIEDThe previous operation has not completed yet.
EFI_OUT_OF_RESOURCESRequired system resources could not be allocated.
EFI_TFTP_ERRORAn MTFTPv6 ERROR packet was received and is in the Packet.
EFI_NETWORK_UNREACHABLEAn ICMP network unreachable error packet was received and the Packet is set to NULL.
EFI_HOST_UNREACHABLEAn ICMP host unreachable error packet was received and the Packet is set to NULL.
EFI_PROTOCOL_UNREACHABLEAn ICMP protocol unreachable error packet was received and the Packet is set to NULL.
EFI_PORT_UNREACHABLEAn ICMP port unreachable error packet was received and the Packet is set to NULL.
EFI_ICMP_ERRORSome other ICMP ERROR packet was received and the Packet is set to NULL.
EFI_PROTOCOL_ERRORAn unexpected MTFTPv6 packet was received and is in the Packet.
EFI_TIMEOUTNo responses were received from the MTFTPv6 server.
EFI_DEVICE_ERRORAn unexpected network error or system error occurred.
EFI_NO_MEDIAThere was a media error.

Definition at line 572 of file Mtftp6.h.

◆ EFI_MTFTP6_PARSE_OPTIONS

typedef EFI_STATUS(EFIAPI * EFI_MTFTP6_PARSE_OPTIONS) (IN EFI_MTFTP6_PROTOCOL *This, IN UINT32 PacketLen, IN EFI_MTFTP6_PACKET *Packet, OUT UINT32 *OptionCount, OUT EFI_MTFTP6_OPTION **OptionList OPTIONAL)

Parse the options in an MTFTPv6 OACK packet.

The ParseOptions() function parses the option fields in an MTFTPv6 OACK packet and returns the number of options that were found and optionally a list of pointers to the options in the packet. If one or more of the option fields are not valid, then EFI_PROTOCOL_ERROR is returned and *OptionCount and *OptionList stop at the last valid option.

Parameters
[in]ThisPointer to the EFI_MTFTP6_PROTOCOL instance.
[in]PacketLenLength of the OACK packet to be parsed.
[in]PacketPointer to the OACK packet to be parsed.
[out]OptionCountPointer to the number of options in the following OptionList.
[out]OptionListPointer to EFI_MTFTP6_OPTION storage. Each pointer in the OptionList points to the corresponding MTFTP option buffer in the Packet. Call the EFI Boot Service FreePool() to release the OptionList if the options in this OptionList are not needed any more.
Return values
EFI_SUCCESSThe OACK packet was valid and the OptionCount and OptionList parameters have been updated.
EFI_INVALID_PARAMETEROne or more of the following conditions is TRUE:
  • PacketLen is 0.
  • Packet is NULL or Packet is not a valid MTFTPv6 packet.
  • OptionCount is NULL.
EFI_NOT_FOUNDNo options were found in the OACK packet.
EFI_OUT_OF_RESOURCESStorage for the OptionList array can not be allocated.
EFI_PROTOCOL_ERROROne or more of the option fields is invalid.

Definition at line 615 of file Mtftp6.h.

◆ EFI_MTFTP6_READ_FILE

typedef EFI_STATUS(EFIAPI * EFI_MTFTP6_READ_FILE) (IN EFI_MTFTP6_PROTOCOL *This, IN EFI_MTFTP6_TOKEN *Token)

Download a file from an MTFTPv6 server.

The ReadFile() function is used to initialize and start an MTFTPv6 download process and optionally wait for completion. When the download operation completes, whether successfully or not, the Token.Status field is updated by the EFI MTFTPv6 Protocol driver and then Token.Event is signaled if it is not NULL.

Data can be downloaded from the MTFTPv6 server into either of the following locations:

  • A fixed buffer that is pointed to by Token.Buffer
  • A download service function that is pointed to by Token.CheckPacket

If both Token.Buffer and Token.CheckPacket are used, then Token.CheckPacket will be called first. If the call is successful, the packet will be stored in Token.Buffer.

Parameters
[in]ThisPointer to the EFI_MTFTP6_PROTOCOL instance.
[in]TokenPointer to the token structure to provide the parameters that are used in this operation.
Return values
EFI_SUCCESSThe data file has been transferred successfully.
EFI_OUT_OF_RESOURCESRequired system resources could not be allocated.
EFI_BUFFER_TOO_SMALLBufferSize is not zero but not large enough to hold the downloaded data in downloading process.
EFI_ABORTEDCurrent operation is aborted by user.
EFI_NETWORK_UNREACHABLEAn ICMP network unreachable error packet was received.
EFI_HOST_UNREACHABLEAn ICMP host unreachable error packet was received.
EFI_PROTOCOL_UNREACHABLEAn ICMP protocol unreachable error packet was received.
EFI_PORT_UNREACHABLEAn ICMP port unreachable error packet was received.
EFI_ICMP_ERRORAn ICMP ERROR packet was received.
EFI_TIMEOUTNo responses were received from the MTFTPv6 server.
EFI_TFTP_ERRORAn MTFTPv6 ERROR packet was received.
EFI_DEVICE_ERRORAn unexpected network error or system error occurred.
EFI_NO_MEDIAThere was a media error.

Definition at line 660 of file Mtftp6.h.

◆ EFI_MTFTP6_WRITE_FILE

typedef EFI_STATUS(EFIAPI * EFI_MTFTP6_WRITE_FILE) (IN EFI_MTFTP6_PROTOCOL *This, IN EFI_MTFTP6_TOKEN *Token)

Send a file to an MTFTPv6 server.

May be unsupported in some implementations.

The WriteFile() function is used to initialize an uploading operation with the given option list and optionally wait for completion. If one or more of the options is not supported by the server, the unsupported options are ignored and a standard TFTP process starts instead. When the upload process completes, whether successfully or not, Token.Event is signaled, and the EFI MTFTPv6 Protocol driver updates Token.Status.

The caller can supply the data to be uploaded in the following two modes:

  • Through the user-provided buffer
  • Through a callback function

With the user-provided buffer, the Token.BufferSize field indicates the length of the buffer, and the driver will upload the data in the buffer. With an EFI_MTFTP6_PACKET_NEEDED callback function, the driver will call this callback function to get more data from the user to upload. See the definition of EFI_MTFTP6_PACKET_NEEDED for more information. These two modes cannot be used at the same time. The callback function will be ignored if the user provides the buffer.

Parameters
[in]ThisPointer to the EFI_MTFTP6_PROTOCOL instance.
[in]TokenPointer to the token structure to provide the parameters that are used in this operation.
Return values
EFI_SUCCESSThe upload session has started.
EFI_UNSUPPORTEDThe operation is not supported by this implementation.
EFI_INVALID_PARAMETEROne or more of the following conditions is TRUE:
  • This is NULL.
  • Token is NULL.
  • Token.Filename is NULL.
  • Token.OptionCount is not zero and Token.OptionList is NULL.
  • One or more options in Token.OptionList have wrong format.
  • Token.Buffer and Token.PacketNeeded are both NULL.
  • Token.OverrideData.ServerIp is not valid unicast IPv6 addresses.
EFI_UNSUPPORTEDOne or more options in the Token.OptionList are not supported by this implementation.
EFI_NOT_STARTEDThe EFI MTFTPv6 Protocol driver has not been started.
EFI_NO_MAPPINGThe underlying IPv6 driver was responsible for choosing a source address for this instance, but no source address was available for use.
EFI_ALREADY_STARTEDThis Token is already being used in another MTFTPv6 session.
EFI_OUT_OF_RESOURCESRequired system resources could not be allocated.
EFI_ACCESS_DENIEDThe previous operation has not completed yet.
EFI_DEVICE_ERRORAn unexpected network error or system error occurred.

Definition at line 712 of file Mtftp6.h.

◆ EFI_MTFTP6_READ_DIRECTORY

typedef EFI_STATUS(EFIAPI * EFI_MTFTP6_READ_DIRECTORY) (IN EFI_MTFTP6_PROTOCOL *This, IN EFI_MTFTP6_TOKEN *Token)

Download a data file directory from an MTFTPv6 server.

May be unsupported in some implementations.

The ReadDirectory() function is used to return a list of files on the MTFTPv6 server that are logically (or operationally) related to Token.Filename. The directory request packet that is sent to the server is built with the option list that was provided by caller, if present.

The file information that the server returns is put into either of the following locations:

  • A fixed buffer that is pointed to by Token.Buffer
  • A download service function that is pointed to by Token.CheckPacket

If both Token.Buffer and Token.CheckPacket are used, then Token.CheckPacket will be called first. If the call is successful, the packet will be stored in Token.Buffer.

The returned directory listing in the Token.Buffer or EFI_MTFTP6_PACKET consists of a list of two or three variable-length ASCII strings, each terminated by a null character, for each file in the directory. If the multicast option is involved, the first field of each directory entry is the static multicast IP address and UDP port number that is associated with the file name. The format of the field is ip:ip:ip:ip:port. If the multicast option is not involved, this field and its terminating null character are not present.

The next field of each directory entry is the file name and the last field is the file information string. The information string contains the file size and the create/modify timestamp. The format of the information string is filesize yyyy-mm-dd hh:mm:ss:ffff. The timestamp is Coordinated Universal Time (UTC; also known as Greenwich Mean Time [GMT]).

Parameters
[in]ThisPointer to the EFI_MTFTP6_PROTOCOL instance.
[in]TokenPointer to the token structure to provide the parameters that are used in this operation.
Return values
EFI_SUCCESSThe MTFTPv6 related file "directory" has been downloaded.
EFI_UNSUPPORTEDThe EFI MTFTPv6 Protocol driver does not support this function.
EFI_INVALID_PARAMETEROne or more of the following conditions is TRUE:
  • This is NULL.
  • Token is NULL.
  • Token.Filename is NULL.
  • Token.OptionCount is not zero and Token.OptionList is NULL.
  • One or more options in Token.OptionList have wrong format.
  • Token.Buffer and Token.CheckPacket are both NULL.
  • Token.OverrideData.ServerIp is not valid unicast IPv6 addresses.
EFI_UNSUPPORTEDOne or more options in the Token.OptionList are not supported by this implementation.
EFI_NOT_STARTEDThe EFI MTFTPv6 Protocol driver has not been started.
EFI_NO_MAPPINGThe underlying IPv6 driver was responsible for choosing a source address for this instance, but no source address was available for use.
EFI_ALREADY_STARTEDThis Token is already being used in another MTFTPv6 session.
EFI_OUT_OF_RESOURCESRequired system resources could not be allocated.
EFI_ACCESS_DENIEDThe previous operation has not completed yet.
EFI_DEVICE_ERRORAn unexpected network error or system error occurred.

Definition at line 770 of file Mtftp6.h.

◆ EFI_MTFTP6_POLL

typedef EFI_STATUS(EFIAPI * EFI_MTFTP6_POLL) (IN EFI_MTFTP6_PROTOCOL *This)

Polls for incoming data packets and processes outgoing data packets.

The Poll() function can be used by network drivers and applications to increase the rate that data packets are moved between the communications device and the transmit and receive queues. In some systems, the periodic timer event in the managed network driver may not poll the underlying communications device fast enough to transmit and/or receive all data packets without missing incoming packets or dropping outgoing packets. Drivers and applications that are experiencing packet loss should try calling the Poll() function more often.

Parameters
[in]ThisPointer to the EFI_MTFTP6_PROTOCOL instance.
Return values
EFI_SUCCESSIncoming or outgoing data was processed.
EFI_NOT_STARTEDThis EFI MTFTPv6 Protocol instance has not been started.
EFI_INVALID_PARAMETERThis is NULL.
EFI_DEVICE_ERRORAn unexpected system or network error occurred.
EFI_TIMEOUTData was dropped out of the transmit and/or receive queue. Consider increasing the polling rate.

Definition at line 797 of file Mtftp6.h.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( BSD2_PATENT  )

Variable Documentation

◆ gEfiMtftp6ServiceBindingProtocolGuid

EFI_GUID gEfiMtftp6ServiceBindingProtocolGuid

◆ gEfiMtftp6ProtocolGuid

EFI_GUID gEfiMtftp6ProtocolGuid