TianoCore EDK2 master
Loading...
Searching...
No Matches
PxeBcMtftp.h File Reference

Go to the source code of this file.

Macros

#define PXE_MTFTP_OPTION_BLKSIZE_INDEX   0
 
#define PXE_MTFTP_OPTION_TIMEOUT_INDEX   1
 
#define PXE_MTFTP_OPTION_TSIZE_INDEX   2
 
#define PXE_MTFTP_OPTION_MULTICAST_INDEX   3
 
#define PXE_MTFTP_OPTION_WINDOWSIZE_INDEX   4
 
#define PXE_MTFTP_OPTION_MAXIMUM_INDEX   5
 
#define PXE_MTFTP_OPTBUF_MAXNUM_INDEX   128
 
#define PXE_MTFTP_ERROR_STRING_LENGTH   127
 
#define PXE_MTFTP_DEFAULT_BLOCK_SIZE   512
 

Functions

EFI_STATUS PxeBcTftpGetFileSize (IN PXEBC_PRIVATE_DATA *Private, IN VOID *Config, IN UINT8 *Filename, IN UINTN *BlockSize, IN UINTN *WindowSize, IN OUT UINT64 *BufferSize)
 
EFI_STATUS PxeBcTftpReadFile (IN PXEBC_PRIVATE_DATA *Private, IN VOID *Config, IN UINT8 *Filename, IN UINTN *BlockSize, IN UINTN *WindowSize, IN UINT8 *BufferPtr, IN OUT UINT64 *BufferSize, IN BOOLEAN DontUseBuffer)
 
EFI_STATUS PxeBcTftpWriteFile (IN PXEBC_PRIVATE_DATA *Private, IN VOID *Config, IN UINT8 *Filename, IN BOOLEAN Overwrite, IN UINTN *BlockSize, IN UINT8 *BufferPtr, IN OUT UINT64 *BufferSize)
 
EFI_STATUS PxeBcTftpReadDirectory (IN PXEBC_PRIVATE_DATA *Private, IN VOID *Config, IN UINT8 *Filename, IN UINTN *BlockSize, IN UINTN *WindowSize, IN UINT8 *BufferPtr, IN OUT UINT64 *BufferSize, IN BOOLEAN DontUseBuffer)
 

Detailed Description

Functions declaration related with Mtftp for UefiPxeBc Driver.

Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.

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

Definition in file PxeBcMtftp.h.

Macro Definition Documentation

◆ PXE_MTFTP_DEFAULT_BLOCK_SIZE

#define PXE_MTFTP_DEFAULT_BLOCK_SIZE   512

Definition at line 22 of file PxeBcMtftp.h.

◆ PXE_MTFTP_ERROR_STRING_LENGTH

#define PXE_MTFTP_ERROR_STRING_LENGTH   127

Definition at line 21 of file PxeBcMtftp.h.

◆ PXE_MTFTP_OPTBUF_MAXNUM_INDEX

#define PXE_MTFTP_OPTBUF_MAXNUM_INDEX   128

Definition at line 19 of file PxeBcMtftp.h.

◆ PXE_MTFTP_OPTION_BLKSIZE_INDEX

#define PXE_MTFTP_OPTION_BLKSIZE_INDEX   0

Definition at line 13 of file PxeBcMtftp.h.

◆ PXE_MTFTP_OPTION_MAXIMUM_INDEX

#define PXE_MTFTP_OPTION_MAXIMUM_INDEX   5

Definition at line 18 of file PxeBcMtftp.h.

◆ PXE_MTFTP_OPTION_MULTICAST_INDEX

#define PXE_MTFTP_OPTION_MULTICAST_INDEX   3

Definition at line 16 of file PxeBcMtftp.h.

◆ PXE_MTFTP_OPTION_TIMEOUT_INDEX

#define PXE_MTFTP_OPTION_TIMEOUT_INDEX   1

Definition at line 14 of file PxeBcMtftp.h.

◆ PXE_MTFTP_OPTION_TSIZE_INDEX

#define PXE_MTFTP_OPTION_TSIZE_INDEX   2

Definition at line 15 of file PxeBcMtftp.h.

◆ PXE_MTFTP_OPTION_WINDOWSIZE_INDEX

#define PXE_MTFTP_OPTION_WINDOWSIZE_INDEX   4

Definition at line 17 of file PxeBcMtftp.h.

Function Documentation

◆ PxeBcTftpGetFileSize()

EFI_STATUS PxeBcTftpGetFileSize ( IN PXEBC_PRIVATE_DATA Private,
IN VOID *  Config,
IN UINT8 *  Filename,
IN UINTN BlockSize,
IN UINTN WindowSize,
IN OUT UINT64 *  BufferSize 
)

This function is wrapper to get the file size using TFTP.

Parameters
[in]PrivatePointer to PxeBc private data.
[in]ConfigPointer to configure data.
[in]FilenamePointer to boot file name.
[in]BlockSizePointer to required block size.
[in]WindowSizePointer to required window size.
[in,out]BufferSizePointer to buffer size.
Return values
EFI_SUCCESSSuccessfully obtained the size of file.
EFI_NOT_FOUNDParse the tftp options failed.
EFI_DEVICE_ERRORThe network device encountered an error during this operation.
OthersDid not obtain the size of the file.

Definition at line 993 of file PxeBcMtftp.c.

◆ PxeBcTftpReadDirectory()

EFI_STATUS PxeBcTftpReadDirectory ( IN PXEBC_PRIVATE_DATA Private,
IN VOID *  Config,
IN UINT8 *  Filename,
IN UINTN BlockSize,
IN UINTN WindowSize,
IN UINT8 *  BufferPtr,
IN OUT UINT64 *  BufferSize,
IN BOOLEAN  DontUseBuffer 
)

This function is a wrapper to get the data (file) from a directory using TFTP.

Parameters
[in]PrivatePointer to PxeBc private data.
[in]ConfigPointer to config data.
[in]FilenamePointer to boot file name.
[in]BlockSizePointer to required block size.
[in]WindowSizePointer to required window size.
[in]BufferPtrPointer to buffer.
[in,out]BufferSizePointer to buffer size.
[in]DontUseBufferIndicates whether with a receive buffer.
Return values
EFI_SUCCESSSuccessfully obtained the data from the file included in directory.
EFI_DEVICE_ERRORThe network device encountered an error during this operation.
OthersOperation failed.

This function is a wrapper to get the data (file) from a directory using TFTP.

Parameters
[in]PrivatePointer to PxeBc private data.
[in]ConfigPointer to config data.
[in]FilenamePointer to boot file name.
[in]BlockSizePointer to required block size.
[in]WindowSizePointer to required window size.
[in]BufferPtrPointer to buffer.
[in,out]BufferSizePointer to buffer size.
[in]DontUseBufferIndicatse whether to use a receive buffer.
Return values
EFI_SUCCESSSuccessfully obtained the data from the file included in the directory.
EFI_DEVICE_ERRORThe network device encountered an error during this operation.
OthersOperation failed.

Definition at line 1145 of file PxeBcMtftp.c.

◆ PxeBcTftpReadFile()

EFI_STATUS PxeBcTftpReadFile ( IN PXEBC_PRIVATE_DATA Private,
IN VOID *  Config,
IN UINT8 *  Filename,
IN UINTN BlockSize,
IN UINTN WindowSize,
IN UINT8 *  BufferPtr,
IN OUT UINT64 *  BufferSize,
IN BOOLEAN  DontUseBuffer 
)

This function is a wrapper to get a file using TFTP.

Parameters
[in]PrivatePointer to PxeBc private data.
[in]ConfigPointer to config data.
[in]FilenamePointer to boot file name.
[in]BlockSizePointer to required block size.
[in]WindowSizePointer to required window size.
[in]BufferPtrPointer to buffer.
[in,out]BufferSizePointer to buffer size.
[in]DontUseBufferIndicates whether to use a receive buffer.
Return values
EFI_SUCCESSSuccessfully read the data from the special file.
EFI_DEVICE_ERRORThe network device encountered an error during this operation.
OthersRead data from file failed.

This function is a wrapper to get file using TFTP.

Parameters
[in]PrivatePointer to PxeBc private data.
[in]ConfigPointer to config data.
[in]FilenamePointer to boot file name.
[in]BlockSizePointer to required block size.
[in]WindowSizePointer to required window size.
[in]BufferPtrPointer to buffer.
[in,out]BufferSizePointer to buffer size.
[in]DontUseBufferIndicates whether to use a receive buffer.
Return values
EFI_SUCCESSSuccessfully read the data from the special file.
EFI_DEVICE_ERRORThe network device encountered an error during this operation.
OthersRead data from file failed.

Definition at line 1041 of file PxeBcMtftp.c.

◆ PxeBcTftpWriteFile()

EFI_STATUS PxeBcTftpWriteFile ( IN PXEBC_PRIVATE_DATA Private,
IN VOID *  Config,
IN UINT8 *  Filename,
IN BOOLEAN  Overwrite,
IN UINTN BlockSize,
IN UINT8 *  BufferPtr,
IN OUT UINT64 *  BufferSize 
)

This function is a wrapper to put file with TFTP.

Parameters
[in]PrivatePointer to PxeBc private data.
[in]ConfigPointer to config data.
[in]FilenamePointer to boot file name.
[in]OverwriteIndicates whether to use an overwrite attribute.
[in]BlockSizePointer to required block size.
[in]BufferPtrPointer to buffer.
[in,out]BufferSizePointer to buffer size.
Return values
EFI_SUCCESSSuccessfully wrote the data into the special file.
EFI_DEVICE_ERRORThe network device encountered an error during this operation.
otherWrite data into file failed.

This function is a wrapper to write file using TFTP.

Parameters
[in]PrivatePointer to PxeBc private data.
[in]ConfigPointer to config data.
[in]FilenamePointer to boot file name.
[in]OverwriteIndicate whether with overwrite attribute.
[in]BlockSizePointer to required block size.
[in]BufferPtrPointer to buffer.
[in,out]BufferSizePointer to buffer size.
Return values
EFI_SUCCESSSuccessfully wrote the data into a special file.
EFI_DEVICE_ERRORThe network device encountered an error during this operation.
otherWrite data into file failed.

Definition at line 1094 of file PxeBcMtftp.c.