Data Structures | |
struct | MTFTP6_EXT_OPTION_INFO |
Defines | |
#define | MTFTP6_SUPPORTED_OPTIONS_NUM 4 |
#define | MTFTP6_OPCODE_LEN 2 |
#define | MTFTP6_ERRCODE_LEN 2 |
#define | MTFTP6_BLKNO_LEN 2 |
#define | MTFTP6_DATA_HEAD_LEN 4 |
#define | MTFTP6_OPT_BLKSIZE_BIT 0x01 |
#define | MTFTP6_OPT_TIMEOUT_BIT 0x02 |
#define | MTFTP6_OPT_TSIZE_BIT 0x04 |
#define | MTFTP6_OPT_MCAST_BIT 0x08 |
Functions | |
EFI_STATUS | Mtftp6ParseMcastOption (IN UINT8 *Str, IN MTFTP6_EXT_OPTION_INFO *ExtInfo) |
EFI_STATUS | Mtftp6ParseExtensionOption (IN EFI_MTFTP6_OPTION *Options, IN UINT32 Count, IN BOOLEAN IsRequest, IN MTFTP6_EXT_OPTION_INFO *ExtInfo) |
EFI_STATUS | Mtftp6ParsePacketOption (IN EFI_MTFTP6_PACKET *Packet, IN UINT32 PacketLen, IN OUT UINT32 *Count, IN EFI_MTFTP6_OPTION *Options) |
EFI_STATUS | Mtftp6ParseStart (IN EFI_MTFTP6_PACKET *Packet, IN UINT32 PacketLen, IN OUT UINT32 *OptionCount, OUT EFI_MTFTP6_OPTION **OptionList) |
Variables | |
CHAR8 * | mMtftp6SupportedOptions [MTFTP6_SUPPORTED_OPTIONS_NUM] |
Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php.
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#define MTFTP6_BLKNO_LEN 2 |
Referenced by Mtftp6WrqInput().
#define MTFTP6_DATA_HEAD_LEN 4 |
Referenced by Mtftp6RrqInput(), Mtftp6RrqSaveBlock(), and Mtftp6WrqSendBlock().
#define MTFTP6_ERRCODE_LEN 2 |
#define MTFTP6_OPCODE_LEN 2 |
Referenced by Mtftp6ParsePacketOption(), Mtftp6RrqInput(), and Mtftp6WrqInput().
#define MTFTP6_OPT_BLKSIZE_BIT 0x01 |
Referenced by Mtftp6ParseExtensionOption(), Mtftp6RrqOackValid(), and Mtftp6WrqOackValid().
#define MTFTP6_OPT_MCAST_BIT 0x08 |
Referenced by Mtftp6ParseExtensionOption(), Mtftp6RrqHandleOack(), and Mtftp6RrqOackValid().
#define MTFTP6_OPT_TIMEOUT_BIT 0x02 |
Referenced by Mtftp6ParseExtensionOption(), Mtftp6RrqOackValid(), and Mtftp6WrqOackValid().
#define MTFTP6_OPT_TSIZE_BIT 0x04 |
Referenced by Mtftp6ParseExtensionOption().
#define MTFTP6_SUPPORTED_OPTIONS_NUM 4 |
Referenced by EfiMtftp6GetModeData().
EFI_STATUS Mtftp6ParseExtensionOption | ( | IN EFI_MTFTP6_OPTION * | Options, | |
IN UINT32 | Count, | |||
IN BOOLEAN | IsRequest, | |||
IN MTFTP6_EXT_OPTION_INFO * | ExtInfo | |||
) |
Parse the MTFTP6 extesion options.
[in] | Options | The pointer to the extension options list. |
[in] | Count | The num of the extension options. |
[in] | IsRequest | If FALSE, the extension options is included by a request packet. |
[in] | ExtInfo | The pointer to the option information to be filled. |
EFI_SUCCESS | Parse the multi-cast option successfully. | |
EFI_INVALID_PARAMETER | An option is malformatted. | |
EFI_UNSUPPORTED | An option is not supported. |
[in] | Options | The pointer to the extension options list. |
[in] | Count | The num of the extension options. |
[in] | IsRequest | If FALSE, the extension options is included by a request packet. |
[in] | ExtInfo | The pointer to the option information to be filled. |
EFI_SUCCESS | Parse the multicast option successfully. | |
EFI_INVALID_PARAMETER | There is one option is malformatted at least. | |
EFI_UNSUPPORTED | There is one option is not supported at least. |
References MTFTP6_OPT_BLKSIZE_BIT, MTFTP6_OPT_MCAST_BIT, MTFTP6_OPT_TIMEOUT_BIT, MTFTP6_OPT_TSIZE_BIT, and Mtftp6ParseMcastOption().
Referenced by Mtftp6OperationStart(), Mtftp6RrqHandleOack(), and Mtftp6WrqHandleOack().
EFI_STATUS Mtftp6ParseMcastOption | ( | IN UINT8 * | Str, | |
IN MTFTP6_EXT_OPTION_INFO * | ExtInfo | |||
) |
Parse the Ascii string of multi-cast option.
[in] | Str | The pointer to the Ascii string of multi-cast option. |
[in] | ExtInfo | The pointer to the option information to be filled. |
EFI_SUCCESS | Parse the multicast option successfully. | |
EFI_INVALID_PARAMETER | The string is malformatted. |
[in] | Str | The pointer to the Ascii string of multicast option. |
[in] | ExtInfo | The pointer to the option information to be filled. |
EFI_SUCCESS | Parse the multicast option successfully. | |
EFI_INVALID_PARAMETER | The string is malformatted. | |
EFI_OUT_OF_RESOURCES | Failed to perform the operation due to lack of resources. |
Referenced by Mtftp6ParseExtensionOption().
EFI_STATUS Mtftp6ParsePacketOption | ( | IN EFI_MTFTP6_PACKET * | Packet, | |
IN UINT32 | PacketLen, | |||
IN OUT UINT32 * | Count, | |||
IN EFI_MTFTP6_OPTION * | Options | |||
) |
Go through the packet to fill the options array with the start addresses of each MTFTP option name/value pair.
[in] | Packet | The packet to be checked. |
[in] | PacketLen | The length of the packet. |
[in,out] | Count | The num of the Options on input. The actual one on output. |
[in] | Options | The option array to be filled it's optional. |
EFI_SUCCESS | The packet has been parsed successfully. | |
EFI_INVALID_PARAMETER | The packet is malformatted | |
EFI_BUFFER_TOO_SMALL | The Options array is too small | |
EFI_PROTOCOL_ERROR | An unexpected MTFTPv6 packet was received. |
[in] | Packet | The packet to be checked. |
[in] | PacketLen | The length of the packet. |
[in,out] | Count | The num of the Options on input. The actual one on output. |
[in] | Options | The option array to be filled. It is optional. |
EFI_SUCCESS | The packet has been parsed successfully. | |
EFI_INVALID_PARAMETER | The packet is malformatted. | |
EFI_BUFFER_TOO_SMALL | The Options array is too small. | |
EFI_PROTOCOL_ERROR | An unexpected MTFTPv6 packet was received. |
References MTFTP6_OPCODE_LEN.
Referenced by Mtftp6ParseStart().
EFI_STATUS Mtftp6ParseStart | ( | IN EFI_MTFTP6_PACKET * | Packet, | |
IN UINT32 | PacketLen, | |||
IN OUT UINT32 * | OptionCount, | |||
OUT EFI_MTFTP6_OPTION ** | OptionList | |||
) |
Go through the packet, generate option list array and fill it by the result of parse options.
[in] | Packet | The packet to be checked. |
[in] | PacketLen | The length of the packet. |
[in,out] | OptionCount | The num of the Options on input. The actual one on output. |
[out] | OptionList | The option list array to be generated and filled. It is optional. |
EFI_SUCCESS | The packet has been parsed successfully. | |
EFI_INVALID_PARAMETER | The packet is malformatted. | |
EFI_PROTOCOL_ERROR | An option is malformatted. | |
EFI_NOT_FOUND | The packet has no options. | |
EFI_OUT_OF_RESOURCES | Failed to allocate memory for the array. | |
EFI_BUFFER_TOO_SMALL | The size of option list array is too small. |
[in] | Packet | The packet to be checked. |
[in] | PacketLen | The length of the packet. |
[in,out] | OptionCount | The num of the Options on input. The actual one on output. |
[out] | OptionList | The option list array to be generated and filled. It is optional. |
EFI_SUCCESS | The packet has been parsed successfully. | |
EFI_INVALID_PARAMETER | The packet is malformatted. | |
EFI_PROTOCOL_ERROR | There is one option is malformatted at least. | |
EFI_NOT_FOUND | The packet has no options. | |
EFI_OUT_OF_RESOURCES | Failed to allocate memory for the array. | |
EFI_BUFFER_TOO_SMALL | The size of option list array is too small. |
References Mtftp6ParsePacketOption().
Referenced by EfiMtftp6ParseOptions(), Mtftp6RrqHandleOack(), and Mtftp6WrqHandleOack().
CHAR8* mMtftp6SupportedOptions[MTFTP6_SUPPORTED_OPTIONS_NUM] |
Referenced by EfiMtftp6GetModeData().