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