/** @file
Mtftp6 option parse functions declaration.
Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>
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
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#ifndef __EFI_MTFTP6_OPTION_H__
#define __EFI_MTFTP6_OPTION_H__
#include <Uefi.h>
#include <Protocol/ServiceBinding.h>
#include <Library/UdpIoLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/UefiRuntimeServicesTableLib.h>
//
// The bit map definition for Mtftp6 extension options.
//
typedef struct {
/**
Parse the Ascii string of multi-cast option.
@param[in] Str The pointer to the Ascii string of multi-cast option.
@param[in] ExtInfo The pointer to the option information to be filled.
@retval EFI_SUCCESS Parse the multicast option successfully.
@retval EFI_INVALID_PARAMETER The string is malformatted.
**/
);
/**
Parse the MTFTP6 extesion options.
@param[in] Options The pointer to the extension options list.
@param[in] Count The num of the extension options.
@param[in] IsRequest If FALSE, the extension options is included
by a request packet.
@param[in] ExtInfo The pointer to the option information to be filled.
@retval EFI_SUCCESS Parse the multi-cast option successfully.
@retval EFI_INVALID_PARAMETER An option is malformatted.
@retval EFI_UNSUPPORTED An option is not supported.
**/
);
/**
Go through the packet to fill the options array with the start
@param[in] Packet The packet to be checked.
@param[in] PacketLen The length of the packet.
@param[in, out] Count The num of the Options on input.
The actual one on output.
@param[in] Options The option array to be filled
it's optional.
@retval EFI_SUCCESS The packet has been parsed successfully.
@retval EFI_INVALID_PARAMETER The packet is malformatted
@retval EFI_BUFFER_TOO_SMALL The Options array is too small
@retval EFI_PROTOCOL_ERROR An unexpected MTFTPv6 packet was received.
**/
);
/**
Go through the packet, generate option list array and fill it
by the result of parse options.
@param[in] Packet The packet to be checked.
@param[in] PacketLen The length of the packet.
@param[in, out] OptionCount The num of the Options on input.
The actual one on output.
@param[out] OptionList The option list array to be generated
and filled. It is optional.
@retval EFI_SUCCESS The packet has been parsed successfully.
@retval EFI_INVALID_PARAMETER The packet is malformatted.
@retval EFI_PROTOCOL_ERROR An option is malformatted.
@retval EFI_NOT_FOUND The packet has no options.
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory for the array.
@retval EFI_BUFFER_TOO_SMALL The size of option list array is too small.
**/
);
#endif