]>
Commit | Line | Data |
---|---|---|
dc361cc5 | 1 | /** @file |
2 | ||
3 | Copyright (c) 2007, Intel Corporation | |
4 | All rights reserved. This program and the accompanying materials | |
5 | are licensed and made available under the terms and conditions of the BSD License | |
6 | which accompanies this distribution. The full text of the license may be found at | |
7 | http://opensource.org/licenses/bsd-license.php | |
8 | ||
9 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, | |
10 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. | |
11 | ||
12 | Module Name: | |
13 | ||
14 | PxeBcMtftp.h | |
15 | ||
16 | Abstract: | |
17 | ||
18 | Mtftp routines for PxeBc | |
19 | ||
20 | ||
21 | **/ | |
22 | ||
23 | #ifndef __EFI_PXEBC_MTFTP_H__ | |
24 | #define __EFI_PXEBC_MTFTP_H__ | |
25 | ||
26 | enum { | |
27 | PXE_MTFTP_OPTION_BLKSIZE_INDEX, | |
28 | PXE_MTFTP_OPTION_TIMEOUT_INDEX, | |
29 | PXE_MTFTP_OPTION_TSIZE_INDEX, | |
30 | PXE_MTFTP_OPTION_MULTICAST_INDEX, | |
31 | PXE_MTFTP_OPTION_MAXIMUM_INDEX | |
32 | }; | |
33 | ||
34 | ||
35 | /** | |
36 | This function is to get size of a file by Tftp. | |
37 | ||
38 | @param Private Pointer to PxeBc private data | |
39 | @param Config Pointer to Mtftp configuration data | |
40 | @param Filename Pointer to file name | |
41 | @param BlockSize Pointer to block size | |
42 | @param BufferSize Pointer to buffer size | |
43 | ||
44 | @return EFI_SUCCESS | |
45 | @return EFI_NOT_FOUND | |
46 | @return EFI_DEVICE_ERROR | |
47 | ||
48 | **/ | |
49 | EFI_STATUS | |
50 | PxeBcTftpGetFileSize ( | |
51 | IN PXEBC_PRIVATE_DATA *Private, | |
52 | IN EFI_MTFTP4_CONFIG_DATA *Config, | |
53 | IN UINT8 *Filename, | |
54 | IN UINTN *BlockSize, | |
55 | IN OUT UINT64 *BufferSize | |
56 | ) | |
57 | ; | |
58 | ||
59 | ||
60 | /** | |
61 | This function is to get data of a file by Tftp. | |
62 | ||
63 | @param Private Pointer to PxeBc private data | |
64 | @param Config Pointer to Mtftp configuration data | |
65 | @param Filename Pointer to file name | |
66 | @param BlockSize Pointer to block size | |
67 | @param BufferPtr Pointer to buffer | |
68 | @param BufferSize Pointer to buffer size | |
69 | @param DontUseBuffer Indicate whether with a receive buffer | |
70 | ||
71 | @return EFI_SUCCESS | |
72 | @return EFI_DEVICE_ERROR | |
73 | ||
74 | **/ | |
75 | EFI_STATUS | |
76 | PxeBcTftpReadFile ( | |
77 | IN PXEBC_PRIVATE_DATA *Private, | |
78 | IN EFI_MTFTP4_CONFIG_DATA *Config, | |
79 | IN UINT8 *Filename, | |
80 | IN UINTN *BlockSize, | |
81 | IN UINT8 *BufferPtr, | |
82 | IN OUT UINT64 *BufferSize, | |
83 | IN BOOLEAN DontUseBuffer | |
84 | ) | |
85 | ; | |
86 | ||
87 | ||
88 | /** | |
89 | This function is put data of a file by Tftp. | |
90 | ||
91 | @param Private Pointer to PxeBc private data | |
92 | @param Config Pointer to Mtftp configuration data | |
93 | @param Filename Pointer to file name | |
94 | @param Overwrite Indicate whether with overwrite attribute | |
95 | @param BlockSize Pointer to block size | |
96 | @param BufferPtr Pointer to buffer | |
97 | @param BufferSize Pointer to buffer size | |
98 | ||
99 | @return EFI_SUCCESS | |
100 | @return EFI_DEVICE_ERROR | |
101 | ||
102 | **/ | |
103 | EFI_STATUS | |
104 | PxeBcTftpWriteFile ( | |
105 | IN PXEBC_PRIVATE_DATA *Private, | |
106 | IN EFI_MTFTP4_CONFIG_DATA *Config, | |
107 | IN UINT8 *Filename, | |
108 | IN BOOLEAN Overwrite, | |
109 | IN UINTN *BlockSize, | |
110 | IN UINT8 *BufferPtr, | |
111 | IN OUT UINT64 *BufferSize | |
112 | ) | |
113 | ; | |
114 | ||
115 | ||
116 | /** | |
117 | This function is to get data of a directory by Tftp. | |
118 | ||
119 | @param Private Pointer to PxeBc private data | |
120 | @param Config Pointer to Mtftp configuration data | |
121 | @param Filename Pointer to file name | |
122 | @param BlockSize Pointer to block size | |
123 | @param BufferPtr Pointer to buffer | |
124 | @param BufferSize Pointer to buffer size | |
125 | @param DontUseBuffer Indicate whether with a receive buffer | |
126 | ||
127 | @return EFI_SUCCES | |
128 | @return EFI_DEVICE_ERROR | |
129 | ||
130 | **/ | |
131 | EFI_STATUS | |
132 | PxeBcTftpReadDirectory ( | |
133 | IN PXEBC_PRIVATE_DATA *Private, | |
134 | IN EFI_MTFTP4_CONFIG_DATA *Config, | |
135 | IN UINT8 *Filename, | |
136 | IN UINTN *BlockSize, | |
137 | IN UINT8 *BufferPtr, | |
138 | IN OUT UINT64 *BufferSize, | |
139 | IN BOOLEAN DontUseBuffer | |
140 | ) | |
141 | ; | |
142 | ||
143 | #endif | |
144 |