TianoCore EDK2 master
|
#include "Mtftp4Impl.h"
Go to the source code of this file.
Functions | |
BOOLEAN | NetStringEqualNoCase (IN UINT8 *Str1, IN UINT8 *Str2) |
UINT32 | NetStringToU32 (IN UINT8 *Str) |
EFI_STATUS | NetStringToIp (IN UINT8 *Str, OUT IP4_ADDR *Ip) |
EFI_STATUS | Mtftp4FillOptions (IN EFI_MTFTP4_PACKET *Packet, IN UINT32 PacketLen, IN OUT UINT32 *Count, OUT EFI_MTFTP4_OPTION *Options OPTIONAL) |
EFI_STATUS | Mtftp4ExtractOptions (IN EFI_MTFTP4_PACKET *Packet, IN UINT32 PacketLen, OUT UINT32 *OptionCount, OUT EFI_MTFTP4_OPTION **OptionList OPTIONAL) |
EFI_STATUS | Mtftp4ExtractMcast (IN UINT8 *Value, IN OUT MTFTP4_OPTION *Option) |
EFI_STATUS | Mtftp4ParseOption (IN EFI_MTFTP4_OPTION *Options, IN UINT32 Count, IN BOOLEAN Request, IN UINT16 Operation, OUT MTFTP4_OPTION *MtftpOption) |
EFI_STATUS | Mtftp4ParseOptionOack (IN EFI_MTFTP4_PACKET *Packet, IN UINT32 PacketLen, IN UINT16 Operation, OUT MTFTP4_OPTION *MtftpOption) |
Variables | |
CHAR8 * | mMtftp4SupportedOptions [MTFTP4_SUPPORTED_OPTIONS] |
Routines to process MTFTP4 options.
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file Mtftp4Option.c.
EFI_STATUS Mtftp4ExtractMcast | ( | IN UINT8 * | Value, |
IN OUT MTFTP4_OPTION * | Option | ||
) |
Parse the MTFTP multicast option.
Value | The Mtftp multicast value string |
Option | The option to save the info into. |
EFI_INVALID_PARAMETER | The multicast value string is invalid. |
EFI_SUCCESS | The multicast value is parsed into the Option |
Definition at line 302 of file Mtftp4Option.c.
EFI_STATUS Mtftp4ExtractOptions | ( | IN EFI_MTFTP4_PACKET * | Packet, |
IN UINT32 | PacketLen, | ||
OUT UINT32 * | OptionCount, | ||
OUT EFI_MTFTP4_OPTION **OptionList | OPTIONAL | ||
) |
Allocate and fill in a array of Mtftp options from the Packet.
It first calls Mtftp4FillOption to get the option number, then allocate the array, at last, call Mtftp4FillOption again to save the options.
Packet | The packet to parse |
PacketLen | The length of the packet |
OptionCount | The number of options in the packet |
OptionList | The point to get the option array. |
EFI_INVALID_PARAMETER | The parametera are invalid or packet isn't a well-formatted OACK packet. |
EFI_SUCCESS | The option array is build |
EFI_OUT_OF_RESOURCES | Failed to allocate memory for the array |
Definition at line 234 of file Mtftp4Option.c.
EFI_STATUS Mtftp4FillOptions | ( | IN EFI_MTFTP4_PACKET * | Packet, |
IN UINT32 | PacketLen, | ||
IN OUT UINT32 * | Count, | ||
OUT EFI_MTFTP4_OPTION *Options | OPTIONAL | ||
) |
Go through the packet to fill the Options array with the start addresses of each MTFTP option name/value pair.
Packet | The packet to check |
PacketLen | The packet's length |
Count | The size of the Options on input. The actual options on output |
Options | The option array to fill in |
EFI_INVALID_PARAMETER | The packet is malformatted |
EFI_BUFFER_TOO_SMALL | The Options array is too small |
EFI_SUCCESS | The packet has been parsed into the Options array. |
Definition at line 160 of file Mtftp4Option.c.
EFI_STATUS Mtftp4ParseOption | ( | IN EFI_MTFTP4_OPTION * | Options, |
IN UINT32 | Count, | ||
IN BOOLEAN | Request, | ||
IN UINT16 | Operation, | ||
OUT MTFTP4_OPTION * | MtftpOption | ||
) |
Parse the option in Options array to MTFTP4_OPTION which program can access directly.
Options | The option array, which contains addresses of each option's name/value string. |
Count | The number of options in the Options |
Request | Whether this is a request or OACK. The format of multicast is different according to this setting. |
Operation | The current performed operation. |
MtftpOption | The MTFTP4_OPTION for easy access. |
EFI_INVALID_PARAMETER | The option is malformatted |
EFI_UNSUPPORTED | Some option isn't supported |
EFI_SUCCESS | The option are OK and has been parsed. |
Definition at line 400 of file Mtftp4Option.c.
EFI_STATUS Mtftp4ParseOptionOack | ( | IN EFI_MTFTP4_PACKET * | Packet, |
IN UINT32 | PacketLen, | ||
IN UINT16 | Operation, | ||
OUT MTFTP4_OPTION * | MtftpOption | ||
) |
Parse the options in the OACK packet to MTFTP4_OPTION which program can access directly.
Packet | The OACK packet to parse |
PacketLen | The length of the packet |
Operation | The current performed operation. |
MtftpOption | The MTFTP_OPTION for easy access. |
EFI_INVALID_PARAMETER | The packet option is malformatted |
EFI_UNSUPPORTED | Some option isn't supported |
EFI_SUCCESS | The option are OK and has been parsed. |
Definition at line 512 of file Mtftp4Option.c.
Check whether two ascii strings are equal, ignore the case.
Str1 | The first ascii string |
Str2 | The second ascii string |
TRUE | Two strings are equal when case is ignored. |
FALSE | Two strings are not equal. |
Definition at line 30 of file Mtftp4Option.c.
EFI_STATUS NetStringToIp | ( | IN UINT8 * | Str, |
OUT IP4_ADDR * | Ip | ||
) |
Convert a string of the format "192.168.0.1" to an IP address.
Str | The string representation of IP |
Ip | The variable to get IP. |
EFI_INVALID_PARAMETER | The IP string is invalid. |
EFI_SUCCESS | The IP is parsed into the Ip |
Definition at line 100 of file Mtftp4Option.c.
UINT32 NetStringToU32 | ( | IN UINT8 * | Str | ) |
Convert a string to a UINT32 number.
Str | The string to convert from |
Definition at line 72 of file Mtftp4Option.c.
CHAR8* mMtftp4SupportedOptions[MTFTP4_SUPPORTED_OPTIONS] |
Definition at line 11 of file Mtftp4Option.c.