878ddf1f |
1 | /** @file\r |
2 | EFI Multicast Trivial File Tranfer Protocol Definition\r |
3 | \r |
4 | Copyright (c) 2006, Intel Corporation \r |
5 | All rights reserved. This program and the accompanying materials \r |
6 | are licensed and made available under the terms and conditions of the BSD License \r |
7 | which accompanies this distribution. The full text of the license may be found at \r |
8 | http://opensource.org/licenses/bsd-license.php \r |
9 | \r |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r |
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r |
12 | \r |
13 | Module Name: Mtftp4.h\r |
14 | \r |
15 | **/\r |
16 | \r |
17 | #ifndef __EFI_MTFTP4_PROTOCOL_H__\r |
18 | #define __EFI_MTFTP4_PROTOCOL_H__\r |
19 | \r |
20 | #define EFI_MTFTP4_SERVICE_BINDING_PROTOCOL_GUID \\r |
21 | { \\r |
22 | 0x2FE800BE, 0x8F01, 0x4aa6, {0x94, 0x6B, 0xD7, 0x13, 0x88, 0xE1, 0x83, 0x3F } \\r |
23 | }\r |
24 | \r |
25 | #define EFI_MTFTP4_PROTOCOL_GUID \\r |
26 | { \\r |
27 | 0x3ad9df29, 0x4501, 0x478d, {0xb1, 0xf8, 0x7f, 0x7f, 0xe7, 0x0e, 0x50, 0xf3 } \\r |
28 | }\r |
29 | \r |
30 | typedef struct _EFI_MTFTP4_PROTOCOL EFI_MTFTP4_PROTOCOL;\r |
31 | typedef struct _EFI_MTFTP4_TOKEN EFI_MTFTP4_TOKEN;\r |
32 | \r |
33 | //\r |
34 | //MTFTP4 packet opcode definition\r |
35 | //\r |
36 | #define EFI_MTFTP4_OPCODE_RRQ 1\r |
37 | #define EFI_MTFTP4_OPCODE_WRQ 2\r |
38 | #define EFI_MTFTP4_OPCODE_DATA 3\r |
39 | #define EFI_MTFTP4_OPCODE_ACK 4\r |
40 | #define EFI_MTFTP4_OPCODE_ERROR 5\r |
41 | #define EFI_MTFTP4_OPCODE_OACK 6\r |
42 | #define EFI_MTFTP4_OPCODE_DIR 7\r |
43 | #define EFI_MTFTP4_OPCODE_DATA8 8\r |
44 | #define EFI_MTFTP4_OPCODE_ACK8 9\r |
45 | \r |
46 | //\r |
47 | // MTFTP4 error code definition\r |
48 | //\r |
49 | #define EFI_MTFTP4_ERRORCODE_NOT_DEFINED 0\r |
50 | #define EFI_MTFTP4_ERRORCODE_FILE_NOT_FOUND 1\r |
51 | #define EFI_MTFTP4_ERRORCODE_ACCESS_VIOLATION 2\r |
52 | #define EFI_MTFTP4_ERRORCODE_DISK_FULL 3\r |
53 | #define EFI_MTFTP4_ERRORCODE_ILLEGAL_OPERATION 4\r |
54 | #define EFI_MTFTP4_ERRORCODE_UNKNOWN_TRANSFER_ID 5\r |
55 | #define EFI_MTFTP4_ERRORCODE_FILE_ALREADY_EXISTS 6\r |
56 | #define EFI_MTFTP4_ERRORCODE_NO_SUCH_USER 7\r |
57 | #define EFI_MTFTP4_ERRORCODE_REQUEST_DENIED 8\r |
58 | \r |
59 | //\r |
60 | // MTFTP4 pacekt definitions\r |
61 | //\r |
62 | #pragma pack(1)\r |
63 | \r |
64 | typedef struct {\r |
65 | UINT16 OpCode;\r |
66 | UINT8 Filename[1];\r |
67 | } EFI_MTFTP4_REQ_HEADER;\r |
68 | \r |
69 | typedef struct {\r |
70 | UINT16 OpCode;\r |
71 | UINT8 Data[1];\r |
72 | } EFI_MTFTP4_OACK_HEADER;\r |
73 | \r |
74 | typedef struct {\r |
75 | UINT16 OpCode;\r |
76 | UINT16 Block;\r |
77 | UINT8 Data[1];\r |
78 | } EFI_MTFTP4_DATA_HEADER;\r |
79 | \r |
80 | typedef struct {\r |
81 | UINT16 OpCode;\r |
82 | UINT16 Block[1];\r |
83 | } EFI_MTFTP4_ACK_HEADER;\r |
84 | \r |
85 | typedef struct {\r |
86 | UINT16 OpCode;\r |
87 | UINT64 Block;\r |
88 | UINT8 Data[1];\r |
89 | } EFI_MTFTP4_DATA8_HEADER;\r |
90 | \r |
91 | typedef struct {\r |
92 | UINT16 OpCode;\r |
93 | UINT64 Block[1];\r |
94 | } EFI_MTFTP4_ACK8_HEADER;\r |
95 | \r |
96 | typedef struct {\r |
97 | UINT16 OpCode;\r |
98 | UINT16 ErrorCode;\r |
99 | UINT8 ErrorMessage[1];\r |
100 | } EFI_MTFTP4_ERROR_HEADER;\r |
101 | \r |
102 | typedef union {\r |
103 | UINT16 OpCode;\r |
104 | EFI_MTFTP4_REQ_HEADER Rrq;\r |
105 | EFI_MTFTP4_REQ_HEADER Wrq;\r |
106 | EFI_MTFTP4_OACK_HEADER Oack;\r |
107 | EFI_MTFTP4_DATA_HEADER Data;\r |
108 | EFI_MTFTP4_ACK_HEADER Ack;\r |
109 | EFI_MTFTP4_DATA8_HEADER Data8;\r |
110 | EFI_MTFTP4_ACK8_HEADER Ack8;\r |
111 | EFI_MTFTP4_ERROR_HEADER Error;\r |
112 | } EFI_MTFTP4_PACKET;\r |
113 | \r |
114 | #pragma pack()\r |
115 | \r |
116 | //\r |
117 | // MTFTP4 option definition\r |
118 | //\r |
119 | typedef struct {\r |
120 | UINT8 *OptionStr;\r |
121 | UINT8 *ValueStr;\r |
122 | } EFI_MTFTP4_OPTION;\r |
123 | \r |
124 | \r |
125 | typedef struct {\r |
126 | BOOLEAN UseDefaultSetting;\r |
127 | EFI_IPv4_ADDRESS StationIp;\r |
128 | EFI_IPv4_ADDRESS SubnetMask;\r |
129 | UINT16 LocalPort;\r |
130 | EFI_IPv4_ADDRESS GatewayIp;\r |
131 | EFI_IPv4_ADDRESS ServerIp;\r |
132 | UINT16 InitialServerPort;\r |
133 | UINT16 TryCount;\r |
134 | UINT16 TimeoutValue;\r |
135 | } EFI_MTFTP4_CONFIG_DATA;\r |
136 | \r |
137 | \r |
138 | typedef struct {\r |
139 | EFI_MTFTP4_CONFIG_DATA ConfigData;\r |
140 | UINT8 SupportedOptionCount; \r |
141 | UINT8 **SupportedOptoins;\r |
142 | UINT8 UnsupportedOptionCount; \r |
143 | UINT8 **UnsupportedOptoins;\r |
144 | } EFI_MTFTP4_MODE_DATA;\r |
145 | \r |
146 | \r |
147 | typedef struct {\r |
148 | EFI_IPv4_ADDRESS GatewayIp;\r |
149 | EFI_IPv4_ADDRESS ServerIp;\r |
150 | UINT16 ServerPort;\r |
151 | UINT16 TryCount;\r |
152 | UINT16 TimeoutValue;\r |
153 | } EFI_MTFTP4_OVERRIDE_DATA;\r |
154 | \r |
155 | //\r |
156 | // Protocol interfaces definition\r |
157 | //\r |
158 | \r |
159 | /**\r |
160 | a callback function that is provided by the caller to intercept \r |
161 | the EFI_MTFTP4_OPCODE_DATA or EFI_MTFTP4_OPCODE_DATA8 packets processed in the\r |
162 | EFI_MTFTP4_PROTOCOL.ReadFile() function, and alternatively to intercept \r |
163 | EFI_MTFTP4_OPCODE_OACK or EFI_MTFTP4_OPCODE_ERROR packets during a call to \r |
164 | EFI_MTFTP4_PROTOCOL.ReadFile(), WriteFile() or ReadDirectory(). \r |
165 | \r |
166 | @param This Pointer to the EFI_MTFTP4_PROTOCOL instance.\r |
167 | @param Token The token that the caller provided in the\r |
168 | EFI_MTFTP4_PROTOCOL.ReadFile(), WriteFile()\r |
169 | or ReadDirectory() function.\r |
170 | @param PacketLen Indicates the length of the packet.\r |
171 | @param Packet Pointer to an MTFTPv4 packet.\r |
172 | \r |
173 | @retval EFI_SUCCESS Operation sucess\r |
174 | @retval Others Abort transfer process\r |
175 | \r |
176 | **/\r |
177 | typedef \r |
178 | EFI_STATUS \r |
179 | (EFIAPI *EFI_MTFTP4_CHECK_PACKET)( \r |
180 | IN EFI_MTFTP4_PROTOCOL *This,\r |
181 | IN EFI_MTFTP4_TOKEN *Token,\r |
182 | IN UINT16 PacketLen,\r |
183 | IN EFI_MTFTP4_PACKET *Paket\r |
184 | )\r |
185 | ;\r |
186 | \r |
187 | /**\r |
188 | Timeout callback funtion. \r |
189 | \r |
190 | @param This Pointer to the EFI_MTFTP4_PROTOCOL instance.\r |
191 | @param Token The token that is provided in the\r |
192 | EFI_MTFTP4_PROTOCOL.ReadFile() or\r |
193 | EFI_MTFTP4_PROTOCOL.WriteFile() or\r |
194 | EFI_MTFTP4_PROTOCOL.ReadDirectory() functions\r |
195 | by the caller.\r |
196 | \r |
197 | @retval EFI_SUCCESS Operation sucess\r |
198 | @retval Others Aborts download process.\r |
199 | \r |
200 | **/\r |
201 | typedef \r |
202 | EFI_STATUS \r |
203 | (EFIAPI *EFI_MTFTP4_TIMEOUT_CALLBACK)( \r |
204 | IN EFI_MTFTP4_PROTOCOL *This,\r |
205 | IN EFI_MTFTP4_TOKEN *Token\r |
206 | )\r |
207 | ;\r |
208 | \r |
209 | /**\r |
210 | a callback function that the caller provides to feed data to the\r |
211 | EFI_MTFTP4_PROTOCOL.WriteFile() function.\r |
212 | \r |
213 | @param This Pointer to the EFI_MTFTP4_PROTOCOL instance.\r |
214 | @param Token The token provided in the\r |
215 | EFI_MTFTP4_PROTOCOL.WriteFile() by the caller.\r |
216 | @param Length Indicates the length of the raw data wanted on input, and the\r |
217 | length the data available on output.\r |
218 | @param Buffer Pointer to the buffer where the data is stored.\r |
219 | \r |
220 | @retval EFI_SUCCESS Operation sucess\r |
221 | @retval Others Aborts session.\r |
222 | \r |
223 | **/\r |
224 | typedef \r |
225 | EFI_STATUS \r |
226 | (EFIAPI *EFI_MTFTP4_PACKET_NEEDED)( \r |
227 | IN EFI_MTFTP4_PROTOCOL *This,\r |
228 | IN EFI_MTFTP4_TOKEN *Token,\r |
229 | IN OUT UINT16 *Length,\r |
230 | OUT VOID **Buffer\r |
231 | )\r |
232 | ;\r |
233 | \r |
234 | \r |
235 | /**\r |
236 | Submits an asynchronous interrupt transfer to an interrupt endpoint of a USB device.\r |
237 | \r |
238 | @param This Pointer to the EFI_MTFTP4_PROTOCOL instance.\r |
239 | @param ModeData Pointer to storage for the EFI MTFTPv4 Protocol driver mode data.\r |
240 | \r |
241 | @retval EFI_SUCCESS The configuration data was successfully returned.\r |
242 | @retval EFI_OUT_OF_RESOURCES The required mode data could not be allocated.\r |
243 | @retval EFI_INVALID_PARAMETER This is NULL or ModeData is NULL.\r |
244 | \r |
245 | **/\r |
246 | typedef \r |
247 | EFI_STATUS \r |
248 | (EFIAPI *EFI_MTFTP4_GET_MODE_DATA)(\r |
249 | IN EFI_MTFTP4_PROTOCOL *This,\r |
250 | OUT EFI_MTFTP4_MODE_DATA *ModeData\r |
251 | )\r |
252 | ;\r |
253 | \r |
254 | \r |
255 | /**\r |
256 | Initializes, changes, or resets the default operational setting for this \r |
257 | EFI MTFTPv4 Protocol driver instance.\r |
258 | \r |
259 | @param This Pointer to the EFI_MTFTP4_PROTOCOL instance.\r |
260 | @param MtftpConfigData Pointer to the configuration data structure.\r |
261 | \r |
262 | @retval EFI_SUCCESS The EFI MTFTPv4 Protocol driver was configured successfully.\r |
263 | @retval EFI_INVALID_PARAMETER One or more parameters are invalid.\r |
264 | @retval EFI_ACCESS_DENIED The EFI configuration could not be changed at this time because\r |
265 | there is one MTFTP background operation in progress.\r |
266 | @retval EFI_NO_MAPPING When using a default address, configuration (DHCP, BOOTP,\r |
267 | RARP, etc.) has not finished yet.\r |
268 | @retval EFI_UNSUPPORTED A configuration protocol (DHCP, BOOTP, RARP, etc.) could not\r |
269 | be located when clients choose to use the default address\r |
270 | settings.\r |
271 | @retval EFI_OUT_OF_RESOURCES The EFI MTFTPv4 Protocol driver instance data could not be\r |
272 | allocated.\r |
273 | @retval EFI_DEVICE_ERROR An unexpected system or network error occurred. The EFI\r |
274 | MTFTPv4 Protocol driver instance is not configured.\r |
275 | \r |
276 | **/\r |
277 | typedef \r |
278 | EFI_STATUS \r |
279 | (EFIAPI *EFI_MTFTP4_CONFIGURE)(\r |
280 | IN EFI_MTFTP4_PROTOCOL *This,\r |
281 | IN EFI_MTFTP4_CONFIG_DATA *MtftpConfigData OPTIONAL\r |
282 | )\r |
283 | ; \r |
284 | \r |
285 | \r |
286 | /**\r |
287 | Gets information about a file from an MTFTPv4 server.\r |
288 | \r |
289 | @param This Pointer to the EFI_MTFTP4_PROTOCOL instance.\r |
290 | @param OverrideData Data that is used to override the existing parameters. If NULL,\r |
291 | the default parameters that were set in the\r |
292 | EFI_MTFTP4_PROTOCOL.Configure() function are used.\r |
293 | @param Filename Pointer to ASCIIZ file name string.\r |
294 | Content-type: text/html
git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Protocol/Mtftp4.h
500 - Internal Server Error
Malformed UTF-8 character (fatal) at (eval 6) line 1, <$fd> line 599.