TianoCore EDK2 master
|
#include <Uefi.h>
#include <Protocol/ServiceBinding.h>
#include <Library/NetLib.h>
#include <Library/UdpIoLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/UefiRuntimeServicesTableLib.h>
Go to the source code of this file.
Data Structures | |
struct | MTFTP6_EXT_OPTION_INFO |
Macros | |
#define | MTFTP6_SUPPORTED_OPTIONS_NUM 5 |
#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 |
#define | MTFTP6_OPT_WINDOWSIZE_BIT 0X10 |
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 UINT16 Operation, 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 OPTIONAL) |
EFI_STATUS | Mtftp6ParseStart (IN EFI_MTFTP6_PACKET *Packet, IN UINT32 PacketLen, IN OUT UINT32 *OptionCount, OUT EFI_MTFTP6_OPTION **OptionList OPTIONAL) |
Variables | |
CHAR8 * | mMtftp6SupportedOptions [MTFTP6_SUPPORTED_OPTIONS_NUM] |
Mtftp6 option parse functions declaration.
Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file Mtftp6Option.h.
#define MTFTP6_BLKNO_LEN 2 |
Definition at line 26 of file Mtftp6Option.h.
#define MTFTP6_DATA_HEAD_LEN 4 |
Definition at line 27 of file Mtftp6Option.h.
#define MTFTP6_ERRCODE_LEN 2 |
Definition at line 25 of file Mtftp6Option.h.
#define MTFTP6_OPCODE_LEN 2 |
Definition at line 24 of file Mtftp6Option.h.
#define MTFTP6_OPT_BLKSIZE_BIT 0x01 |
Definition at line 32 of file Mtftp6Option.h.
#define MTFTP6_OPT_MCAST_BIT 0x08 |
Definition at line 35 of file Mtftp6Option.h.
#define MTFTP6_OPT_TIMEOUT_BIT 0x02 |
Definition at line 33 of file Mtftp6Option.h.
#define MTFTP6_OPT_TSIZE_BIT 0x04 |
Definition at line 34 of file Mtftp6Option.h.
#define MTFTP6_OPT_WINDOWSIZE_BIT 0X10 |
Definition at line 36 of file Mtftp6Option.h.
#define MTFTP6_SUPPORTED_OPTIONS_NUM 5 |
Definition at line 23 of file Mtftp6Option.h.
EFI_STATUS Mtftp6ParseExtensionOption | ( | IN EFI_MTFTP6_OPTION * | Options, |
IN UINT32 | Count, | ||
IN BOOLEAN | IsRequest, | ||
IN UINT16 | Operation, | ||
IN MTFTP6_EXT_OPTION_INFO * | ExtInfo | ||
) |
Parse the MTFTP6 extension 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] | Operation | The current performed operation. |
[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. |
Definition at line 147 of file Mtftp6Option.c.
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. |
Parse the NULL terminated ASCII string of multicast option.
[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. |
Definition at line 33 of file Mtftp6Option.c.
EFI_STATUS Mtftp6ParsePacketOption | ( | IN EFI_MTFTP6_PACKET * | Packet, |
IN UINT32 | PacketLen, | ||
IN OUT UINT32 * | Count, | ||
IN EFI_MTFTP6_OPTION *Options | OPTIONAL | ||
) |
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. |
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 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. |
Definition at line 260 of file Mtftp6Option.c.
EFI_STATUS Mtftp6ParseStart | ( | IN EFI_MTFTP6_PACKET * | Packet, |
IN UINT32 | PacketLen, | ||
IN OUT UINT32 * | OptionCount, | ||
OUT EFI_MTFTP6_OPTION **OptionList | OPTIONAL | ||
) |
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. |
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 | 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. |
Definition at line 340 of file Mtftp6Option.c.
|
extern |
Definition at line 12 of file Mtftp6Option.c.