Tftp.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /** @file
  2. Header file for 'tftp' command functions.
  3. Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved. <BR>
  4. Copyright (c) 2015, ARM Ltd. All rights reserved.<BR>
  5. SPDX-License-Identifier: BSD-2-Clause-Patent
  6. **/
  7. #ifndef _TFTP_H_
  8. #define _TFTP_H_
  9. #include <Uefi.h>
  10. #include <Protocol/HiiPackageList.h>
  11. #include <Protocol/ServiceBinding.h>
  12. #include <Protocol/Mtftp4.h>
  13. #include <Library/BaseLib.h>
  14. #include <Library/BaseMemoryLib.h>
  15. #include <Library/DebugLib.h>
  16. #include <Library/MemoryAllocationLib.h>
  17. #include <Library/ShellLib.h>
  18. #include <Library/UefiLib.h>
  19. #include <Library/UefiRuntimeServicesTableLib.h>
  20. #include <Library/UefiBootServicesTableLib.h>
  21. #include <Library/HiiLib.h>
  22. #include <Library/NetLib.h>
  23. #include <Library/PrintLib.h>
  24. #include <Library/UefiHiiServicesLib.h>
  25. extern EFI_HII_HANDLE mTftpHiiHandle;
  26. typedef struct {
  27. UINTN FileSize;
  28. UINTN DownloadedNbOfBytes;
  29. UINTN LastReportedNbOfBytes;
  30. } DOWNLOAD_CONTEXT;
  31. /**
  32. Function for 'tftp' command.
  33. @param[in] ImageHandle The image handle.
  34. @param[in] SystemTable The system table.
  35. @retval SHELL_SUCCESS Command completed successfully.
  36. @retval SHELL_INVALID_PARAMETER Command usage error.
  37. @retval SHELL_ABORTED The user aborts the operation.
  38. @retval value Unknown error.
  39. **/
  40. SHELL_STATUS
  41. RunTftp (
  42. IN EFI_HANDLE ImageHandle,
  43. IN EFI_SYSTEM_TABLE *SystemTable
  44. );
  45. /**
  46. Retrieve HII package list from ImageHandle and publish to HII database.
  47. @param ImageHandle The image handle of the process.
  48. @return HII handle.
  49. **/
  50. EFI_HII_HANDLE
  51. InitializeHiiPackage (
  52. EFI_HANDLE ImageHandle
  53. );
  54. #endif // _TFTP_H_