X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=NetworkPkg%2FUefiPxeBcDxe%2FPxeBcMtftp.h;h=0b0cfd195b2ac0cd17e864352556e514c318e8e3;hb=HEAD;hp=f1150762c6e0eb8678724ef7b3d23750ce4b58b0;hpb=c960bdc2dcfad4ececbe208fbe3a25adea6dceea;p=mirror_edk2.git diff --git a/NetworkPkg/UefiPxeBcDxe/PxeBcMtftp.h b/NetworkPkg/UefiPxeBcDxe/PxeBcMtftp.h index f1150762c6..0b0cfd195b 100644 --- a/NetworkPkg/UefiPxeBcDxe/PxeBcMtftp.h +++ b/NetworkPkg/UefiPxeBcDxe/PxeBcMtftp.h @@ -1,15 +1,9 @@ /** @file Functions declaration related with Mtftp for UefiPxeBc Driver. - Copyright (c) 2007 - 2015, Intel Corporation. All rights reserved.
+ Copyright (c) 2007 - 2018, 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -20,12 +14,12 @@ #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_MAXIMUM_INDEX 4 +#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 // refer to definition of struct EFI_PXE_BASE_CODE_TFTP_ERROR. -#define PXE_MTFTP_DEFAULT_BLOCK_SIZE 512 // refer to rfc-1350. - +#define PXE_MTFTP_ERROR_STRING_LENGTH 127 // refer to definition of struct EFI_PXE_BASE_CODE_TFTP_ERROR. +#define PXE_MTFTP_DEFAULT_BLOCK_SIZE 512 // refer to rfc-1350. /** This function is wrapper to get the file size using TFTP. @@ -34,24 +28,25 @@ @param[in] Config Pointer to configure data. @param[in] Filename Pointer to boot file name. @param[in] BlockSize Pointer to required block size. + @param[in] WindowSize Pointer to required window size. @param[in, out] BufferSize Pointer to buffer size. @retval EFI_SUCCESS Successfully obtained the size of file. - @retval EFI_NOT_FOUND Parse the tftp ptions failed. + @retval EFI_NOT_FOUND Parse the tftp options failed. @retval EFI_DEVICE_ERROR The network device encountered an error during this operation. @retval Others Did not obtain the size of the file. **/ EFI_STATUS PxeBcTftpGetFileSize ( - IN PXEBC_PRIVATE_DATA *Private, - IN VOID *Config, - IN UINT8 *Filename, - IN UINTN *BlockSize, - IN OUT UINT64 *BufferSize + IN PXEBC_PRIVATE_DATA *Private, + IN VOID *Config, + IN UINT8 *Filename, + IN UINTN *BlockSize, + IN UINTN *WindowSize, + IN OUT UINT64 *BufferSize ); - /** This function is a wrapper to get a file using TFTP. @@ -59,6 +54,7 @@ PxeBcTftpGetFileSize ( @param[in] Config Pointer to config data. @param[in] Filename Pointer to boot file name. @param[in] BlockSize Pointer to required block size. + @param[in] WindowSize Pointer to required window size. @param[in] BufferPtr Pointer to buffer. @param[in, out] BufferSize Pointer to buffer size. @param[in] DontUseBuffer Indicates whether to use a receive buffer. @@ -70,16 +66,16 @@ PxeBcTftpGetFileSize ( **/ EFI_STATUS PxeBcTftpReadFile ( - IN PXEBC_PRIVATE_DATA *Private, - IN VOID *Config, - IN UINT8 *Filename, - IN UINTN *BlockSize, - IN UINT8 *BufferPtr, - IN OUT UINT64 *BufferSize, - IN BOOLEAN DontUseBuffer + 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 put file with TFTP. @@ -98,16 +94,15 @@ PxeBcTftpReadFile ( **/ 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 + 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 get the data (file) from a directory using TFTP. @@ -115,23 +110,26 @@ PxeBcTftpWriteFile ( @param[in] Config Pointer to config data. @param[in] Filename Pointer to boot file name. @param[in] BlockSize Pointer to required block size. + @param[in] WindowSize Pointer to required window size. @param[in] BufferPtr Pointer to buffer. @param[in, out] BufferSize Pointer to buffer size. @param[in] DontUseBuffer Indicates whether with a receive buffer. - @retval EFI_SUCCES Successfully obtained the data from the file included in directory. + @retval EFI_SUCCESS Successfully obtained the data from the file included in directory. @retval EFI_DEVICE_ERROR The network device encountered an error during this operation. @retval Others Operation failed. **/ EFI_STATUS PxeBcTftpReadDirectory ( - IN PXEBC_PRIVATE_DATA *Private, - IN VOID *Config, - IN UINT8 *Filename, - IN UINTN *BlockSize, - IN UINT8 *BufferPtr, - IN OUT UINT64 *BufferSize, - IN BOOLEAN DontUseBuffer + 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 ); + #endif