]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Protocol/PxeBaseCode.h
Fix minor build issue.
[mirror_edk2.git] / MdePkg / Include / Protocol / PxeBaseCode.h
CommitLineData
d1f95000 1/** @file\r
4ca9b6c4
LG
2 EFI PXE Base Code Protocol definitions, which is used to access PXE-compatible \r
3 devices for network access and network booting.\r
d1f95000 4\r
4ca9b6c4 5 Copyright (c) 2006 - 2008, Intel Corporation \r
d1f95000 6 All rights reserved. This program and the accompanying materials \r
7 are licensed and made available under the terms and conditions of the BSD License \r
8 which accompanies this distribution. The full text of the license may be found at \r
9 http://opensource.org/licenses/bsd-license.php \r
10\r
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
13\r
d1f95000 14**/\r
15#ifndef __PXE_BASE_CODE_PROTOCOL_H__\r
16#define __PXE_BASE_CODE_PROTOCOL_H__\r
17\r
99e8ed21 18///\r
19/// PXE Base Code protocol\r
20///\r
d1f95000 21#define EFI_PXE_BASE_CODE_PROTOCOL_GUID \\r
22 { \\r
23 0x03c4e603, 0xac28, 0x11d3, {0x9a, 0x2d, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \\r
24 }\r
25\r
a6508c05 26typedef struct _EFI_PXE_BASE_CODE_PROTOCOL EFI_PXE_BASE_CODE_PROTOCOL;\r
27\r
99e8ed21 28///\r
29/// Protocol defined in EFI1.1.\r
30/// \r
a6508c05 31typedef EFI_PXE_BASE_CODE_PROTOCOL EFI_PXE_BASE_CODE;\r
d1f95000 32\r
99e8ed21 33///\r
34/// Default IP TTL and ToS.\r
35///\r
d1f95000 36#define DEFAULT_TTL 16\r
37#define DEFAULT_ToS 0\r
38\r
99e8ed21 39///\r
40/// ICMP error format\r
41///\r
d1f95000 42typedef struct {\r
43 UINT8 Type;\r
44 UINT8 Code;\r
45 UINT16 Checksum;\r
46 union {\r
47 UINT32 reserved;\r
48 UINT32 Mtu;\r
49 UINT32 Pointer;\r
50 struct {\r
51 UINT16 Identifier;\r
52 UINT16 Sequence;\r
53 } Echo;\r
54 } u;\r
55 UINT8 Data[494];\r
56} EFI_PXE_BASE_CODE_ICMP_ERROR;\r
57\r
99e8ed21 58///\r
59/// TFTP error format\r
60///\r
d1f95000 61typedef struct {\r
62 UINT8 ErrorCode;\r
63 CHAR8 ErrorString[127];\r
64} EFI_PXE_BASE_CODE_TFTP_ERROR;\r
65\r
99e8ed21 66///\r
67/// IP Receive Filter definitions\r
68///\r
d1f95000 69#define EFI_PXE_BASE_CODE_MAX_IPCNT 8\r
70\r
9319d2c2
LG
71///\r
72/// IP Receive Filter structure\r
73///\r
d1f95000 74typedef struct {\r
75 UINT8 Filters;\r
76 UINT8 IpCnt;\r
77 UINT16 reserved;\r
78 EFI_IP_ADDRESS IpList[EFI_PXE_BASE_CODE_MAX_IPCNT];\r
79} EFI_PXE_BASE_CODE_IP_FILTER;\r
80\r
81#define EFI_PXE_BASE_CODE_IP_FILTER_STATION_IP 0x0001\r
82#define EFI_PXE_BASE_CODE_IP_FILTER_BROADCAST 0x0002\r
83#define EFI_PXE_BASE_CODE_IP_FILTER_PROMISCUOUS 0x0004\r
84#define EFI_PXE_BASE_CODE_IP_FILTER_PROMISCUOUS_MULTICAST 0x0008\r
85\r
99e8ed21 86///\r
9319d2c2 87/// ARP cache entries\r
99e8ed21 88///\r
d1f95000 89typedef struct {\r
90 EFI_IP_ADDRESS IpAddr;\r
91 EFI_MAC_ADDRESS MacAddr;\r
92} EFI_PXE_BASE_CODE_ARP_ENTRY;\r
93\r
9319d2c2
LG
94///\r
95/// ARP route table entries\r
96///\r
d1f95000 97typedef struct {\r
98 EFI_IP_ADDRESS IpAddr;\r
99 EFI_IP_ADDRESS SubnetMask;\r
100 EFI_IP_ADDRESS GwAddr;\r
101} EFI_PXE_BASE_CODE_ROUTE_ENTRY;\r
102\r
103//\r
104// UDP definitions\r
105//\r
106typedef UINT16 EFI_PXE_BASE_CODE_UDP_PORT;\r
107\r
108#define EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_SRC_IP 0x0001\r
109#define EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_SRC_PORT 0x0002\r
110#define EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_DEST_IP 0x0004\r
111#define EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_DEST_PORT 0x0008\r
112#define EFI_PXE_BASE_CODE_UDP_OPFLAGS_USE_FILTER 0x0010\r
113#define EFI_PXE_BASE_CODE_UDP_OPFLAGS_MAY_FRAGMENT 0x0020\r
114\r
115//\r
116// Discover() definitions\r
117//\r
118#define EFI_PXE_BASE_CODE_BOOT_TYPE_BOOTSTRAP 0\r
119#define EFI_PXE_BASE_CODE_BOOT_TYPE_MS_WINNT_RIS 1\r
120#define EFI_PXE_BASE_CODE_BOOT_TYPE_INTEL_LCM 2\r
121#define EFI_PXE_BASE_CODE_BOOT_TYPE_DOSUNDI 3\r
122#define EFI_PXE_BASE_CODE_BOOT_TYPE_NEC_ESMPRO 4\r
123#define EFI_PXE_BASE_CODE_BOOT_TYPE_IBM_WSoD 5\r
124#define EFI_PXE_BASE_CODE_BOOT_TYPE_IBM_LCCM 6\r
125#define EFI_PXE_BASE_CODE_BOOT_TYPE_CA_UNICENTER_TNG 7\r
126#define EFI_PXE_BASE_CODE_BOOT_TYPE_HP_OPENVIEW 8\r
127#define EFI_PXE_BASE_CODE_BOOT_TYPE_ALTIRIS_9 9\r
128#define EFI_PXE_BASE_CODE_BOOT_TYPE_ALTIRIS_10 10\r
129#define EFI_PXE_BASE_CODE_BOOT_TYPE_ALTIRIS_11 11\r
130#define EFI_PXE_BASE_CODE_BOOT_TYPE_NOT_USED_12 12\r
131#define EFI_PXE_BASE_CODE_BOOT_TYPE_REDHAT_INSTALL 13\r
132#define EFI_PXE_BASE_CODE_BOOT_TYPE_REDHAT_BOOT 14\r
133#define EFI_PXE_BASE_CODE_BOOT_TYPE_REMBO 15\r
134#define EFI_PXE_BASE_CODE_BOOT_TYPE_BEOBOOT 16\r
135//\r
136// 17 through 32767 are reserved\r
137// 32768 through 65279 are for vendor use\r
138// 65280 through 65534 are reserved\r
139//\r
140#define EFI_PXE_BASE_CODE_BOOT_TYPE_PXETEST 65535\r
141\r
142#define EFI_PXE_BASE_CODE_BOOT_LAYER_MASK 0x7FFF\r
143#define EFI_PXE_BASE_CODE_BOOT_LAYER_INITIAL 0x0000\r
144\r
99e8ed21 145///\r
146/// Discover() server list structure.\r
147///\r
d1f95000 148typedef struct {\r
149 UINT16 Type;\r
150 BOOLEAN AcceptAnyResponse;\r
151 UINT8 Reserved;\r
152 EFI_IP_ADDRESS IpAddr;\r
153} EFI_PXE_BASE_CODE_SRVLIST;\r
154\r
99e8ed21 155///\r
156/// Discover() information override structure.\r
157///\r
d1f95000 158typedef struct {\r
159 BOOLEAN UseMCast;\r
160 BOOLEAN UseBCast;\r
161 BOOLEAN UseUCast;\r
162 BOOLEAN MustUseList;\r
163 EFI_IP_ADDRESS ServerMCastIp;\r
164 UINT16 IpCnt;\r
165 EFI_PXE_BASE_CODE_SRVLIST SrvList[1];\r
166} EFI_PXE_BASE_CODE_DISCOVER_INFO;\r
167\r
99e8ed21 168///\r
9319d2c2 169/// TFTP opcode definitions\r
99e8ed21 170///\r
d1f95000 171typedef enum {\r
172 EFI_PXE_BASE_CODE_TFTP_FIRST,\r
173 EFI_PXE_BASE_CODE_TFTP_GET_FILE_SIZE,\r
174 EFI_PXE_BASE_CODE_TFTP_READ_FILE,\r
175 EFI_PXE_BASE_CODE_TFTP_WRITE_FILE,\r
176 EFI_PXE_BASE_CODE_TFTP_READ_DIRECTORY,\r
177 EFI_PXE_BASE_CODE_MTFTP_GET_FILE_SIZE,\r
178 EFI_PXE_BASE_CODE_MTFTP_READ_FILE,\r
179 EFI_PXE_BASE_CODE_MTFTP_READ_DIRECTORY,\r
180 EFI_PXE_BASE_CODE_MTFTP_LAST\r
181} EFI_PXE_BASE_CODE_TFTP_OPCODE;\r
182\r
9319d2c2
LG
183///\r
184/// MTFTP information. This information is required\r
185/// to start or join a multicast TFTP session. It is also required to\r
186/// perform the "get file size" and "read directory" operations of MTFTP.\r
187///\r
d1f95000 188typedef struct {\r
189 EFI_IP_ADDRESS MCastIp;\r
190 EFI_PXE_BASE_CODE_UDP_PORT CPort;\r
191 EFI_PXE_BASE_CODE_UDP_PORT SPort;\r
192 UINT16 ListenTimeout;\r
193 UINT16 TransmitTimeout;\r
194} EFI_PXE_BASE_CODE_MTFTP_INFO;\r
195\r
3ed785e9 196///\r
9319d2c2 197/// DHCPV4 Packet structure\r
3ed785e9 198///\r
199typedef struct {\r
200 UINT8 BootpOpcode;\r
201 UINT8 BootpHwType;\r
202 UINT8 BootpHwAddrLen;\r
203 UINT8 BootpGateHops;\r
204 UINT32 BootpIdent;\r
205 UINT16 BootpSeconds;\r
206 UINT16 BootpFlags;\r
207 UINT8 BootpCiAddr[4];\r
208 UINT8 BootpYiAddr[4];\r
209 UINT8 BootpSiAddr[4];\r
210 UINT8 BootpGiAddr[4];\r
211 UINT8 BootpHwAddr[16];\r
212 UINT8 BootpSrvName[64];\r
213 UINT8 BootpBootFile[128];\r
214 UINT32 DhcpMagik;\r
215 UINT8 DhcpOptions[56];\r
216} EFI_PXE_BASE_CODE_DHCPV4_PACKET;\r
217\r
9319d2c2
LG
218///\r
219/// Packet structure\r
220///\r
3ed785e9 221typedef union {\r
222 UINT8 Raw[1472];\r
223 EFI_PXE_BASE_CODE_DHCPV4_PACKET Dhcpv4;\r
9319d2c2
LG
224 //\r
225 // EFI_PXE_BASE_CODE_DHCPV6_PACKET Dhcpv6;\r
226 //\r
3ed785e9 227} EFI_PXE_BASE_CODE_PACKET;\r
228\r
d1f95000 229//\r
230// PXE Base Code Mode structure\r
231//\r
232#define EFI_PXE_BASE_CODE_MAX_ARP_ENTRIES 8\r
233#define EFI_PXE_BASE_CODE_MAX_ROUTE_ENTRIES 8\r
234\r
9319d2c2
LG
235///\r
236/// EFI_PXE_BASE_CODE_MODE\r
237/// The data values in this structure are read-only and \r
238/// are updated by the code that produces the\r
239/// EFI_PXE_BASE_CODE_PROTOCOL functions.\r
240///\r
d1f95000 241typedef struct {\r
242 BOOLEAN Started;\r
243 BOOLEAN Ipv6Available;\r
244 BOOLEAN Ipv6Supported;\r
245 BOOLEAN UsingIpv6;\r
246 BOOLEAN BisSupported;\r
247 BOOLEAN BisDetected;\r
248 BOOLEAN AutoArp;\r
249 BOOLEAN SendGUID;\r
250 BOOLEAN DhcpDiscoverValid;\r
251 BOOLEAN DhcpAckReceived;\r
252 BOOLEAN ProxyOfferReceived;\r
253 BOOLEAN PxeDiscoverValid;\r
254 BOOLEAN PxeReplyReceived;\r
255 BOOLEAN PxeBisReplyReceived;\r
256 BOOLEAN IcmpErrorReceived;\r
257 BOOLEAN TftpErrorReceived;\r
258 BOOLEAN MakeCallbacks;\r
259 UINT8 TTL;\r
260 UINT8 ToS;\r
261 EFI_IP_ADDRESS StationIp;\r
262 EFI_IP_ADDRESS SubnetMask;\r
263 EFI_PXE_BASE_CODE_PACKET DhcpDiscover;\r
264 EFI_PXE_BASE_CODE_PACKET DhcpAck;\r
265 EFI_PXE_BASE_CODE_PACKET ProxyOffer;\r
266 EFI_PXE_BASE_CODE_PACKET PxeDiscover;\r
267 EFI_PXE_BASE_CODE_PACKET PxeReply;\r
268 EFI_PXE_BASE_CODE_PACKET PxeBisReply;\r
269 EFI_PXE_BASE_CODE_IP_FILTER IpFilter;\r
270 UINT32 ArpCacheEntries;\r
271 EFI_PXE_BASE_CODE_ARP_ENTRY ArpCache[EFI_PXE_BASE_CODE_MAX_ARP_ENTRIES];\r
272 UINT32 RouteTableEntries;\r
273 EFI_PXE_BASE_CODE_ROUTE_ENTRY RouteTable[EFI_PXE_BASE_CODE_MAX_ROUTE_ENTRIES];\r
274 EFI_PXE_BASE_CODE_ICMP_ERROR IcmpError;\r
275 EFI_PXE_BASE_CODE_TFTP_ERROR TftpError;\r
276} EFI_PXE_BASE_CODE_MODE;\r
277\r
278//\r
279// PXE Base Code Interface Function definitions\r
280//\r
281\r
282/** \r
283 Enables the use of the PXE Base Code Protocol functions.\r
f737cfb9 284\r
285 This function enables the use of the PXE Base Code Protocol functions. If the\r
286 Started field of the EFI_PXE_BASE_CODE_MODE structure is already TRUE, then\r
287 EFI_ALREADY_STARTED will be returned. If UseIpv6 is TRUE, then IPv6 formatted\r
288 addresses will be used in this session. If UseIpv6 is FALSE, then IPv4 formatted\r
289 addresses will be used in this session. If UseIpv6 is TRUE, and the Ipv6Supported\r
290 field of the EFI_PXE_BASE_CODE_MODE structure is FALSE, then EFI_UNSUPPORTED will\r
291 be returned. If there is not enough memory or other resources to start the PXE\r
292 Base Code Protocol, then EFI_OUT_OF_RESOURCES will be returned. Otherwise, the\r
293 PXE Base Code Protocol will be started, and all of the fields of the EFI_PXE_BASE_CODE_MODE\r
294 structure will be initialized as follows:\r
295 StartedSet to TRUE.\r
296 Ipv6SupportedUnchanged.\r
297 Ipv6AvailableUnchanged.\r
298 UsingIpv6Set to UseIpv6.\r
299 BisSupportedUnchanged.\r
300 BisDetectedUnchanged.\r
301 AutoArpSet to TRUE.\r
302 SendGUIDSet to FALSE.\r
303 TTLSet to DEFAULT_TTL.\r
304 ToSSet to DEFAULT_ToS.\r
305 DhcpCompletedSet to FALSE.\r
306 ProxyOfferReceivedSet to FALSE.\r
307 StationIpSet to an address of all zeros.\r
308 SubnetMaskSet to a subnet mask of all zeros.\r
309 DhcpDiscoverZero-filled.\r
310 DhcpAckZero-filled.\r
311 ProxyOfferZero-filled.\r
312 PxeDiscoverValidSet to FALSE.\r
313 PxeDiscoverZero-filled.\r
314 PxeReplyValidSet to FALSE.\r
315 PxeReplyZero-filled.\r
316 PxeBisReplyValidSet to FALSE.\r
317 PxeBisReplyZero-filled.\r
318 IpFilterSet the Filters field to 0 and the IpCnt field to 0.\r
319 ArpCacheEntriesSet to 0.\r
320 ArpCacheZero-filled.\r
321 RouteTableEntriesSet to 0.\r
322 RouteTableZero-filled.\r
323 IcmpErrorReceivedSet to FALSE.\r
324 IcmpErrorZero-filled.\r
325 TftpErroReceivedSet to FALSE.\r
326 TftpErrorZero-filled.\r
327 MakeCallbacksSet to TRUE if the PXE Base Code Callback Protocol is available.\r
328 Set to FALSE if the PXE Base Code Callback Protocol is not available.\r
d1f95000 329 \r
330 @param This Pointer to the EFI_PXE_BASE_CODE_PROTOCOL instance.\r
331 @param UseIpv6 Specifies the type of IP addresses that are to be used during the session\r
332 that is being started. Set to TRUE for IPv6 addresses, and FALSE for \r
333 IPv4 addresses. \r
334 \r
335 @retval EFI_SUCCESS The PXE Base Code Protocol was started.\r
336 @retval EFI_DEVICE_ERROR The network device encountered an error during this oper \r
337 @retval EFI_UNSUPPORTED UseIpv6 is TRUE, but the Ipv6Supported field of the\r
338 EFI_PXE_BASE_CODE_MODE structure is FALSE. \r
339 @retval EFI_ALREADY_STARTED The PXE Base Code Protocol is already in the started state. \r
340 @retval EFI_INVALID_PARAMETER The This parameter is NULL or does not point to a valid\r
341 EFI_PXE_BASE_CODE_PROTOCOL structure. \r
342 @retval EFI_OUT_OF_RESOURCES Could not allocate enough memory or other resources to start the \r
343 PXE Base Code Protocol. \r
344 \r
345**/\r
346typedef\r
347EFI_STATUS\r
8b13229b 348(EFIAPI *EFI_PXE_BASE_CODE_START)(\r
d1f95000 349 IN EFI_PXE_BASE_CODE_PROTOCOL *This,\r
350 IN BOOLEAN UseIpv6\r
351 );\r
352\r
353/** \r
354 Disables the use of the PXE Base Code Protocol functions.\r
f737cfb9 355\r
356 This function stops all activity on the network device. All the resources allocated\r
357 in Start() are released, the Started field of the EFI_PXE_BASE_CODE_MODE structure is\r
358 set to FALSE and EFI_SUCCESS is returned. If the Started field of the EFI_PXE_BASE_CODE_MODE\r
359 structure is already FALSE, then EFI_NOT_STARTED will be returned.\r
360 \r
d1f95000 361 @param This Pointer to the EFI_PXE_BASE_CODE_PROTOCOL instance.\r
362 \r
363 @retval EFI_SUCCESS The PXE Base Code Protocol was stopped.\r
364 @retval EFI_NOT_STARTED The PXE Base Code Protocol is already in the stopped state. \r
365 @retval EFI_INVALID_PARAMETER The This parameter is NULL or does not point to a valid\r
366 EFI_PXE_BASE_CODE_PROTOCOL structure. \r
367 @retval EFI_DEVICE_ERROR The network device encountered an error during this operation. \r
368 \r
369**/\r
370typedef\r
371EFI_STATUS\r
8b13229b 372(EFIAPI *EFI_PXE_BASE_CODE_STOP)(\r
d1f95000 373 IN EFI_PXE_BASE_CODE_PROTOCOL *This\r
374 );\r
375\r
376/** \r
377 Attempts to complete a DHCPv4 D.O.R.A. (discover / offer / request / acknowledge) or DHCPv6\r
378 S.A.R.R (solicit / advertise / request / reply) sequence.\r
f737cfb9 379\r
380 This function attempts to complete the DHCP sequence. If this sequence is completed,\r
381 then EFI_SUCCESS is returned, and the DhcpCompleted, ProxyOfferReceived, StationIp,\r
382 SubnetMask, DhcpDiscover, DhcpAck, and ProxyOffer fields of the EFI_PXE_BASE_CODE_MODE\r
383 structure are filled in.\r
384 If SortOffers is TRUE, then the cached DHCP offer packets will be sorted before\r
385 they are tried. If SortOffers is FALSE, then the cached DHCP offer packets will\r
386 be tried in the order in which they are received. Please see the Preboot Execution\r
387 Environment (PXE) Specification for additional details on the implementation of DHCP.\r
388 This function can take at least 31 seconds to timeout and return control to the\r
389 caller. If the DHCP sequence does not complete, then EFI_TIMEOUT will be returned.\r
390 If the Callback Protocol does not return EFI_PXE_BASE_CODE_CALLBACK_STATUS_CONTINUE,\r
391 then the DHCP sequence will be stopped and EFI_ABORTED will be returned.\r
d1f95000 392 \r
393 @param This Pointer to the EFI_PXE_BASE_CODE_PROTOCOL instance.\r
394 @param SortOffers TRUE if the offers received should be sorted. Set to FALSE to try the\r
395 offers in the order that they are received. \r
396 \r
397 @retval EFI_SUCCESS Valid DHCP has completed.\r
398 @retval EFI_NOT_STARTED The PXE Base Code Protocol is in the stopped state.\r
399 @retval EFI_INVALID_PARAMETER The This parameter is NULL or does not point to a valid\r
400 EFI_PXE_BASE_CODE_PROTOCOL structure. \r
401 @retval EFI_DEVICE_ERROR The network device encountered an error during this operation. \r
402 @retval EFI_OUT_OF_RESOURCES Could not allocate enough memory to complete the DHCP Protocol.\r
403 @retval EFI_ABORTED The callback function aborted the DHCP Protocol.\r
404 @retval EFI_TIMEOUT The DHCP Protocol timed out.\r
405 @retval EFI_ICMP_ERROR An ICMP error packet was received during the DHCP session.\r
406 @retval EFI_NO_RESPONSE Valid PXE offer was not received.\r
407 \r
408**/\r
409typedef\r
410EFI_STATUS\r
8b13229b 411(EFIAPI *EFI_PXE_BASE_CODE_DHCP)(\r
d1f95000 412 IN EFI_PXE_BASE_CODE_PROTOCOL *This,\r
413 IN BOOLEAN SortOffers\r
414 );\r
415\r
416/** \r
417 Attempts to complete the PXE Boot Server and/or boot image discovery sequence.\r
f737cfb9 418\r
419 This function attempts to complete the PXE Boot Server and/or boot image discovery\r
420 sequence. If this sequence is completed, then EFI_SUCCESS is returned, and the\r
421 PxeDiscoverValid, PxeDiscover, PxeReplyReceived, and PxeReply fields of the\r
422 EFI_PXE_BASE_CODE_MODE structure are filled in. If UseBis is TRUE, then the\r
423 PxeBisReplyReceived and PxeBisReply fields of the EFI_PXE_BASE_CODE_MODE structure\r
424 will also be filled in. If UseBis is FALSE, then PxeBisReplyValid will be set to FALSE.\r
425 In the structure referenced by parameter Info, the PXE Boot Server list, SrvList[],\r
426 has two uses: It is the Boot Server IP address list used for unicast discovery\r
427 (if the UseUCast field is TRUE), and it is the list used for Boot Server verification\r
428 (if the MustUseList field is TRUE). Also, if the MustUseList field in that structure\r
429 is TRUE and the AcceptAnyResponse field in the SrvList[] array is TRUE, any Boot\r
430 Server reply of that type will be accepted. If the AcceptAnyResponse field is\r
431 FALSE, only responses from Boot Servers with matching IP addresses will be accepted.\r
432 This function can take at least 10 seconds to timeout and return control to the\r
433 caller. If the Discovery sequence does not complete, then EFI_TIMEOUT will be\r
434 returned. Please see the Preboot Execution Environment (PXE) Specification for\r
435 additional details on the implementation of the Discovery sequence.\r
436 If the Callback Protocol does not return EFI_PXE_BASE_CODE_CALLBACK_STATUS_CONTINUE,\r
437 then the Discovery sequence is stopped and EFI_ABORTED will be returned.\r
d1f95000 438 \r
439 @param This Pointer to the EFI_PXE_BASE_CODE_PROTOCOL instance.\r
440 @param Type The type of bootstrap to perform.\r
441 @param Layer Pointer to the boot server layer number to discover, which must be\r
442 PXE_BOOT_LAYER_INITIAL when a new server type is being \r
443 discovered. \r
444 @param UseBis TRUE if Boot Integrity Services are to be used. FALSE otherwise. \r
445 @param Info Pointer to a data structure that contains additional information on the\r
446 type of discovery operation that is to be performed. \r
447 \r
448 @retval EFI_SUCCESS The Discovery sequence has been completed.\r
449 @retval EFI_NOT_STARTED The PXE Base Code Protocol is in the stopped state.\r
450 @retval EFI_INVALID_PARAMETER One or more parameters are invalid. \r
451 @retval EFI_DEVICE_ERROR The network device encountered an error during this operation. \r
452 @retval EFI_OUT_OF_RESOURCES Could not allocate enough memory to complete Discovery.\r
453 @retval EFI_ABORTED The callback function aborted the Discovery sequence.\r
454 @retval EFI_TIMEOUT The Discovery sequence timed out.\r
455 @retval EFI_ICMP_ERROR An ICMP error packet was received during the PXE discovery\r
456 session. \r
457 \r
458**/\r
459typedef\r
460EFI_STATUS\r
8b13229b 461(EFIAPI *EFI_PXE_BASE_CODE_DISCOVER)(\r
d1f95000 462 IN EFI_PXE_BASE_CODE_PROTOCOL *This,\r
463 IN UINT16 Type,\r
464 IN UINT16 *Layer,\r
465 IN BOOLEAN UseBis,\r
466 IN EFI_PXE_BASE_CODE_DISCOVER_INFO *Info OPTIONAL\r
467 );\r
468\r
469/** \r
470 Used to perform TFTP and MTFTP services.\r
f737cfb9 471\r
472 This function is used to perform TFTP and MTFTP services. This includes the\r
473 TFTP operations to get the size of a file, read a directory, read a file, and\r
474 write a file. It also includes the MTFTP operations to get the size of a file,\r
475 read a directory, and read a file. The type of operation is specified by Operation.\r
476 If the callback function that is invoked during the TFTP/MTFTP operation does\r
477 not return EFI_PXE_BASE_CODE_CALLBACK_STATUS_CONTINUE, then EFI_ABORTED will\r
478 be returned.\r
479 For read operations, the return data will be placed in the buffer specified by\r
480 BufferPtr. If BufferSize is too small to contain the entire downloaded file,\r
481 then EFI_BUFFER_TOO_SMALL will be returned and BufferSize will be set to zero\r
482 or the size of the requested file (the size of the requested file is only returned\r
483 if the TFTP server supports TFTP options). If BufferSize is large enough for the\r
484 read operation, then BufferSize will be set to the size of the downloaded file,\r
485 and EFI_SUCCESS will be returned. Applications using the PxeBc.Mtftp() services\r
486 should use the get-file-size operations to determine the size of the downloaded\r
487 file prior to using the read-file operations--especially when downloading large\r
488 (greater than 64 MB) files--instead of making two calls to the read-file operation.\r
489 Following this recommendation will save time if the file is larger than expected\r
490 and the TFTP server does not support TFTP option extensions. Without TFTP option\r
491 extension support, the client has to download the entire file, counting and discarding\r
492 the received packets, to determine the file size.\r
493 For write operations, the data to be sent is in the buffer specified by BufferPtr.\r
494 BufferSize specifies the number of bytes to send. If the write operation completes\r
495 successfully, then EFI_SUCCESS will be returned.\r
496 For TFTP “get file size” operations, the size of the requested file or directory\r
497 is returned in BufferSize, and EFI_SUCCESS will be returned. If the TFTP server\r
498 does not support options, the file will be downloaded into a bit bucket and the\r
499 length of the downloaded file will be returned. For MTFTP “get file size” operations,\r
500 if the MTFTP server does not support the “get file size” option, EFI_UNSUPPORTED\r
501 will be returned.\r
502 This function can take up to 10 seconds to timeout and return control to the caller.\r
503 If the TFTP sequence does not complete, EFI_TIMEOUT will be returned.\r
504 If the Callback Protocol does not return EFI_PXE_BASE_CODE_CALLBACK_STATUS_CONTINUE,\r
505 then the TFTP sequence is stopped and EFI_ABORTED will be returned.\r
506 The format of the data returned from a TFTP read directory operation is a null-terminated\r
507 filename followed by a null-terminated information string, of the form\r
508 “size year-month-day hour:minute:second” (i.e. %d %d-%d-%d %d:%d:%f - note that\r
509 the seconds field can be a decimal number), where the date and time are UTC. For\r
510 an MTFTP read directory command, there is additionally a null-terminated multicast\r
511 IP address preceding the filename of the form %d.%d.%d.%d for IP v4. The final\r
512 entry is itself null-terminated, so that the final information string is terminated\r
513 with two null octets.\r
d1f95000 514 \r
515 @param This Pointer to the EFI_PXE_BASE_CODE_PROTOCOL instance.\r
516 @param Operation The type of operation to perform.\r
517 @param BufferPtr A pointer to the data buffer. \r
518 @param Overwrite Only used on write file operations. TRUE if a file on a remote server can\r
519 be overwritten. \r
520 @param BufferSize For get-file-size operations, *BufferSize returns the size of the\r
521 requested file. \r
522 @param BlockSize The requested block size to be used during a TFTP transfer.\r
523 @param ServerIp The TFTP / MTFTP server IP address.\r
524 @param Filename A Null-terminated ASCII string that specifies a directory name or a file\r
525 name. \r
526 @param Info Pointer to the MTFTP information.\r
527 @param DontUseBuffer Set to FALSE for normal TFTP and MTFTP read file operation. \r
528 \r
529 @retval EFI_SUCCESS The TFTP/MTFTP operation was completed.\r
530 @retval EFI_NOT_STARTED The PXE Base Code Protocol is in the stopped state.\r
531 @retval EFI_INVALID_PARAMETER One or more parameters are invalid. \r
532 @retval EFI_DEVICE_ERROR The network device encountered an error during this operation. \r
533 @retval EFI_BUFFER_TOO_SMALL The buffer is not large enough to complete the read operation. \r
534 @retval EFI_ABORTED The callback function aborted the TFTP/MTFTP operation.\r
535 @retval EFI_TIMEOUT The TFTP/MTFTP operation timed out.\r
536 @retval EFI_ICMP_ERROR An ICMP error packet was received during the MTFTP session.\r
537 @retval EFI_TFTP_ERROR A TFTP error packet was received during the MTFTP session.\r
538 \r
539**/\r
540typedef\r
541EFI_STATUS\r
8b13229b 542(EFIAPI *EFI_PXE_BASE_CODE_MTFTP)(\r
d1f95000 543 IN EFI_PXE_BASE_CODE_PROTOCOL *This,\r
544 IN EFI_PXE_BASE_CODE_TFTP_OPCODE Operation,\r
545 IN OUT VOID *BufferPtr OPTIONAL,\r
546 IN BOOLEAN Overwrite,\r
547 IN OUT UINT64 *BufferSize,\r
548 IN UINTN *BlockSize OPTIONAL,\r
549 IN EFI_IP_ADDRESS *ServerIp,\r
550 IN UINT8 *Filename OPTIONAL,\r
551 IN EFI_PXE_BASE_CODE_MTFTP_INFO *Info OPTIONAL,\r
552 IN BOOLEAN DontUseBuffer\r
553 );\r
554\r
555/** \r
556 Writes a UDP packet to the network interface.\r
f737cfb9 557\r
558 This function writes a UDP packet specified by the (optional HeaderPtr and)\r
559 BufferPtr parameters to the network interface. The UDP header is automatically\r
560 built by this routine. It uses the parameters OpFlags, DestIp, DestPort, GatewayIp,\r
561 SrcIp, and SrcPort to build this header. If the packet is successfully built and\r
562 transmitted through the network interface, then EFI_SUCCESS will be returned.\r
563 If a timeout occurs during the transmission of the packet, then EFI_TIMEOUT will\r
564 be returned. If an ICMP error occurs during the transmission of the packet, then\r
565 the IcmpErrorReceived field is set to TRUE, the IcmpError field is filled in and\r
566 EFI_ICMP_ERROR will be returned. If the Callback Protocol does not return\r
567 EFI_PXE_BASE_CODE_CALLBACK_STATUS_CONTINUE, then EFI_ABORTED will be returned.\r
d1f95000 568 \r
569 @param This Pointer to the EFI_PXE_BASE_CODE_PROTOCOL instance.\r
570 @param OpFlags The UDP operation flags. \r
571 @param DestIp The destination IP address.\r
572 @param DestPort The destination UDP port number. \r
573 @param GatewayIp The gateway IP address. \r
574 @param SrcIp The source IP address.\r
575 @param SrcPort The source UDP port number.\r
576 @param HeaderSize An optional field which may be set to the length of a header at\r
577 HeaderPtr to be prefixed to the data at BufferPtr. \r
578 @param HeaderPtr If HeaderSize is not NULL, a pointer to a header to be prefixed to the\r
579 data at BufferPtr. \r
580 @param BufferSize A pointer to the size of the data at BufferPtr.\r
581 @param BufferPtr A pointer to the data to be written.\r
582 \r
583 @retval EFI_SUCCESS The UDP Write operation was completed.\r
584 @retval EFI_NOT_STARTED The PXE Base Code Protocol is in the stopped state.\r
585 @retval EFI_INVALID_PARAMETER One or more parameters are invalid. \r
586 @retval EFI_BAD_BUFFER_SIZE The buffer is too long to be transmitted. \r
587 @retval EFI_ABORTED The callback function aborted the UDP Write operation.\r
588 @retval EFI_TIMEOUT The UDP Write operation timed out.\r
589 @retval EFI_ICMP_ERROR An ICMP error packet was received during the UDP write session. \r
590 \r
591**/\r
592typedef\r
593EFI_STATUS\r
8b13229b 594(EFIAPI *EFI_PXE_BASE_CODE_UDP_WRITE)(\r
d1f95000 595 IN EFI_PXE_BASE_CODE_PROTOCOL *This,\r
596 IN UINT16 OpFlags,\r
597 IN EFI_IP_ADDRESS *DestIp,\r
598 IN EFI_PXE_BASE_CODE_UDP_PORT *DestPort,\r
599 IN EFI_IP_ADDRESS *GatewayIp, OPTIONAL\r
600 IN EFI_IP_ADDRESS *SrcIp, OPTIONAL\r
601 IN OUT EFI_PXE_BASE_CODE_UDP_PORT *SrcPort, OPTIONAL\r
602 IN UINTN *HeaderSize, OPTIONAL\r
603 IN VOID *HeaderPtr, OPTIONAL\r
604 IN UINTN *BufferSize,\r
605 IN VOID *BufferPtr\r
606 );\r
607\r
608/** \r
609 Reads a UDP packet from the network interface.\r
f737cfb9 610\r
611 This function reads a UDP packet from a network interface. The data contents\r
612 are returned in (the optional HeaderPtr and) BufferPtr, and the size of the\r
613 buffer received is returned in BufferSize . If the input BufferSize is smaller\r
614 than the UDP packet received (less optional HeaderSize), it will be set to the\r
615 required size, and EFI_BUFFER_TOO_SMALL will be returned. In this case, the\r
616 contents of BufferPtr are undefined, and the packet is lost. If a UDP packet is\r
617 successfully received, then EFI_SUCCESS will be returned, and the information\r
618 from the UDP header will be returned in DestIp, DestPort, SrcIp, and SrcPort if\r
619 they are not NULL.\r
620 Depending on the values of OpFlags and the DestIp, DestPort, SrcIp, and SrcPort\r
621 input values, different types of UDP packet receive filtering will be performed.\r
622 The following tables summarize these receive filter operations.\r
d1f95000 623 \r
624 @param This Pointer to the EFI_PXE_BASE_CODE_PROTOCOL instance.\r
625 @param OpFlags The UDP operation flags. \r
626 @param DestIp The destination IP address.\r
f737cfb9 627 @param DestPort The destination UDP port number.\r
d1f95000 628 @param SrcIp The source IP address.\r
629 @param SrcPort The source UDP port number.\r
630 @param HeaderSize An optional field which may be set to the length of a header at\r
631 HeaderPtr to be prefixed to the data at BufferPtr. \r
632 @param HeaderPtr If HeaderSize is not NULL, a pointer to a header to be prefixed to the\r
633 data at BufferPtr. \r
634 @param BufferSize A pointer to the size of the data at BufferPtr.\r
635 @param BufferPtr A pointer to the data to be read.\r
636 \r
f737cfb9 637 @retval EFI_SUCCESS The UDP Read operation was completed.\r
d1f95000 638 @retval EFI_NOT_STARTED The PXE Base Code Protocol is in the stopped state.\r
639 @retval EFI_INVALID_PARAMETER One or more parameters are invalid. \r
640 @retval EFI_DEVICE_ERROR The network device encountered an error during this operation.\r
641 @retval EFI_BUFFER_TOO_SMALL The packet is larger than Buffer can hold.\r
642 @retval EFI_ABORTED The callback function aborted the UDP Read operation.\r
643 @retval EFI_TIMEOUT The UDP Read operation timed out. \r
644 \r
645**/\r
646typedef\r
647EFI_STATUS\r
8b13229b 648(EFIAPI *EFI_PXE_BASE_CODE_UDP_READ)(\r
d1f95000 649 IN EFI_PXE_BASE_CODE_PROTOCOL *This,\r
650 IN UINT16 OpFlags,\r
651 IN OUT EFI_IP_ADDRESS *DestIp, OPTIONAL\r
652 IN OUT EFI_PXE_BASE_CODE_UDP_PORT *DestPort, OPTIONAL\r
653 IN OUT EFI_IP_ADDRESS *SrcIp, OPTIONAL\r
654 IN OUT EFI_PXE_BASE_CODE_UDP_PORT *SrcPort, OPTIONAL\r
655 IN UINTN *HeaderSize, OPTIONAL\r
656 IN VOID *HeaderPtr, OPTIONAL\r
657 IN OUT UINTN *BufferSize,\r
658 IN VOID *BufferPtr\r
659 );\r
660\r
661/** \r
662 Updates the IP receive filters of a network device and enables software filtering.\r
f737cfb9 663 \r
664 The NewFilter field is used to modify the network device's current IP receive\r
665 filter settings and to enable a software filter. This function updates the IpFilter\r
666 field of the EFI_PXE_BASE_CODE_MODE structure with the contents of NewIpFilter.\r
667 The software filter is used when the USE_FILTER in OpFlags is set to UdpRead().\r
668 The current hardware filter remains in effect no matter what the settings of OpFlags\r
669 are, so that the meaning of ANY_DEST_IP set in OpFlags to UdpRead() is from those\r
670 packets whose reception is enabled in hardware – physical NIC address (unicast),\r
671 broadcast address, logical address or addresses (multicast), or all (promiscuous).\r
672 UdpRead() does not modify the IP filter settings.\r
673 Dhcp(), Discover(), and Mtftp() set the IP filter, and return with the IP receive\r
674 filter list emptied and the filter set to EFI_PXE_BASE_CODE_IP_FILTER_STATION_IP.\r
675 If an application or driver wishes to preserve the IP receive filter settings,\r
676 it will have to preserve the IP receive filter settings before these calls, and\r
677 use SetIpFilter() to restore them after the calls. If incompatible filtering is\r
678 requested (for example, PROMISCUOUS with anything else) or if the device does not\r
679 support a requested filter setting and it cannot be accommodated in software\r
680 (for example, PROMISCUOUS not supported), EFI_INVALID_PARAMETER will be returned.\r
681 The IPlist field is used to enable IPs other than the StationIP. They may be\r
682 multicast or unicast. If IPcnt is set as well as EFI_PXE_BASE_CODE_IP_FILTER_STATION_IP,\r
683 then both the StationIP and the IPs from the IPlist will be used.\r
d1f95000 684 \r
685 @param This Pointer to the EFI_PXE_BASE_CODE_PROTOCOL instance.\r
686 @param NewFilter Pointer to the new set of IP receive filters.\r
687 \r
688 @retval EFI_SUCCESS The IP receive filter settings were updated.\r
689 @retval EFI_NOT_STARTED The PXE Base Code Protocol is in the stopped state.\r
690 @retval EFI_INVALID_PARAMETER One or more parameters are invalid. \r
691 \r
692**/\r
693typedef\r
694EFI_STATUS\r
8b13229b 695(EFIAPI *EFI_PXE_BASE_CODE_SET_IP_FILTER)(\r
d1f95000 696 IN EFI_PXE_BASE_CODE_PROTOCOL *This,\r
697 IN EFI_PXE_BASE_CODE_IP_FILTER *NewFilter\r
698 );\r
699\r
700/** \r
701 Uses the ARP protocol to resolve a MAC address.\r
f737cfb9 702 \r
703 This function uses the ARP protocol to resolve a MAC address. The UsingIpv6 field\r
704 of the EFI_PXE_BASE_CODE_MODE structure is used to determine if IPv4 or IPv6\r
705 addresses are being used. The IP address specified by IpAddr is used to resolve\r
706 a MAC address. If the ARP protocol succeeds in resolving the specified address,\r
707 then the ArpCacheEntries and ArpCache fields of the EFI_PXE_BASE_CODE_MODE structure\r
708 are updated, and EFI_SUCCESS is returned. If MacAddr is not NULL, the resolved\r
709 MAC address is placed there as well.\r
710 If the PXE Base Code protocol is in the stopped state, then EFI_NOT_STARTED is\r
711 returned. If the ARP protocol encounters a timeout condition while attempting\r
712 to resolve an address, then EFI_TIMEOUT is returned. If the Callback Protocol\r
713 does not return EFI_PXE_BASE_CODE_CALLBACK_STATUS_CONTINUE, then EFI_ABORTED is\r
714 returned.\r
d1f95000 715 \r
716 @param This Pointer to the EFI_PXE_BASE_CODE_PROTOCOL instance.\r
717 @param IpAddr Pointer to the IP address that is used to resolve a MAC address.\r
718 @param MacAddr If not NULL, a pointer to the MAC address that was resolved with the\r
719 ARP protocol. \r
720 \r
721 @retval EFI_SUCCESS The IP or MAC address was resolved.\r
722 @retval EFI_NOT_STARTED The PXE Base Code Protocol is in the stopped state.\r
723 @retval EFI_INVALID_PARAMETER One or more parameters are invalid. \r
724 @retval EFI_DEVICE_ERROR The network device encountered an error during this operation. \r
725 @retval EFI_ABORTED The callback function aborted the ARP Protocol.\r
726 @retval EFI_TIMEOUT The ARP Protocol encountered a timeout condition.\r
727 \r
728**/\r
729typedef\r
730EFI_STATUS\r
8b13229b 731(EFIAPI *EFI_PXE_BASE_CODE_ARP)(\r
d1f95000 732 IN EFI_PXE_BASE_CODE_PROTOCOL *This,\r
733 IN EFI_IP_ADDRESS *IpAddr,\r
734 IN EFI_MAC_ADDRESS *MacAddr OPTIONAL\r
735 );\r
736\r
737/** \r
738 Updates the parameters that affect the operation of the PXE Base Code Protocol.\r
f737cfb9 739 \r
740 This function sets parameters that affect the operation of the PXE Base Code Protocol.\r
741 The parameter specified by NewAutoArp is used to control the generation of ARP\r
742 protocol packets. If NewAutoArp is TRUE, then ARP Protocol packets will be generated\r
743 as required by the PXE Base Code Protocol. If NewAutoArp is FALSE, then no ARP\r
744 Protocol packets will be generated. In this case, the only mappings that are\r
745 available are those stored in the ArpCache of the EFI_PXE_BASE_CODE_MODE structure.\r
746 If there are not enough mappings in the ArpCache to perform a PXE Base Code Protocol\r
747 service, then the service will fail. This function updates the AutoArp field of\r
748 the EFI_PXE_BASE_CODE_MODE structure to NewAutoArp.\r
749 The SetParameters() call must be invoked after a Callback Protocol is installed\r
750 to enable the use of callbacks.\r
d1f95000 751 \r
752 @param This Pointer to the EFI_PXE_BASE_CODE_PROTOCOL instance.\r
753 @param NewAutoArp If not NULL, a pointer to a value that specifies whether to replace the\r
754 current value of AutoARP. \r
755 @param NewSendGUID If not NULL, a pointer to a value that specifies whether to replace the\r
756 current value of SendGUID. \r
757 @param NewTTL If not NULL, a pointer to be used in place of the current value of TTL,\r
758 the "time to live" field of the IP header. \r
759 @param NewToS If not NULL, a pointer to be used in place of the current value of ToS,\r
760 the "type of service" field of the IP header. \r
761 @param NewMakeCallback If not NULL, a pointer to a value that specifies whether to replace the\r
762 current value of the MakeCallback field of the Mode structure. \r
763 \r
764 @retval EFI_SUCCESS The new parameters values were updated.\r
765 @retval EFI_NOT_STARTED The PXE Base Code Protocol is in the stopped state.\r
766 @retval EFI_INVALID_PARAMETER One or more parameters are invalid. \r
767 \r
768**/\r
769typedef\r
770EFI_STATUS\r
8b13229b 771(EFIAPI *EFI_PXE_BASE_CODE_SET_PARAMETERS)(\r
d1f95000 772 IN EFI_PXE_BASE_CODE_PROTOCOL *This,\r
773 IN BOOLEAN *NewAutoArp, OPTIONAL\r
774 IN BOOLEAN *NewSendGUID, OPTIONAL\r
775 IN UINT8 *NewTTL, OPTIONAL\r
776 IN UINT8 *NewToS, OPTIONAL\r
777 IN BOOLEAN *NewMakeCallback OPTIONAL\r
778 );\r
779\r
780/** \r
781 Updates the station IP address and/or subnet mask values of a network device.\r
f737cfb9 782 \r
783 This function updates the station IP address and/or subnet mask values of a network\r
784 device.\r
785 The NewStationIp field is used to modify the network device's current IP address.\r
786 If NewStationIP is NULL, then the current IP address will not be modified. Otherwise,\r
787 this function updates the StationIp field of the EFI_PXE_BASE_CODE_MODE structure\r
788 with NewStationIp.\r
789 The NewSubnetMask field is used to modify the network device's current subnet\r
790 mask. If NewSubnetMask is NULL, then the current subnet mask will not be modified.\r
791 Otherwise, this function updates the SubnetMask field of the EFI_PXE_BASE_CODE_MODE\r
792 structure with NewSubnetMask.\r
d1f95000 793 \r
794 @param This Pointer to the EFI_PXE_BASE_CODE_PROTOCOL instance.\r
795 @param NewStationIp Pointer to the new IP address to be used by the network device. \r
796 @param NewSubnetMask Pointer to the new subnet mask to be used by the network device. \r
797 \r
798 @retval EFI_SUCCESS The new station IP address and/or subnet mask were updated.\r
799 @retval EFI_NOT_STARTED The PXE Base Code Protocol is in the stopped state.\r
800 @retval EFI_INVALID_PARAMETER One or more parameters are invalid. \r
801 \r
802**/\r
803typedef\r
804EFI_STATUS\r
8b13229b 805(EFIAPI *EFI_PXE_BASE_CODE_SET_STATION_IP)(\r
d1f95000 806 IN EFI_PXE_BASE_CODE_PROTOCOL *This,\r
807 IN EFI_IP_ADDRESS *NewStationIp, OPTIONAL\r
808 IN EFI_IP_ADDRESS *NewSubnetMask OPTIONAL\r
809 );\r
810\r
811/** \r
812 Updates the contents of the cached DHCP and Discover packets.\r
f737cfb9 813 \r
814 The pointers to the new packets are used to update the contents of the cached\r
815 packets in the EFI_PXE_BASE_CODE_MODE structure.\r
d1f95000 816 \r
817 @param This Pointer to the EFI_PXE_BASE_CODE_PROTOCOL instance.\r
818 @param NewDhcpDiscoverValid Pointer to a value that will replace the current\r
819 DhcpDiscoverValid field. \r
820 @param NewDhcpAckReceived Pointer to a value that will replace the current\r
821 DhcpAckReceived field. \r
822 @param NewProxyOfferReceived Pointer to a value that will replace the current\r
823 ProxyOfferReceived field. \r
824 @param NewPxeDiscoverValid Pointer to a value that will replace the current \r
825 ProxyOfferReceived field. \r
826 @param NewPxeReplyReceived Pointer to a value that will replace the current\r
827 PxeReplyReceived field. \r
828 @param NewPxeBisReplyReceived Pointer to a value that will replace the current\r
829 PxeBisReplyReceived field. \r
830 @param NewDhcpDiscover Pointer to the new cached DHCP Discover packet contents. \r
831 @param NewDhcpAck Pointer to the new cached DHCP Ack packet contents.\r
832 @param NewProxyOffer Pointer to the new cached Proxy Offer packet contents.\r
833 @param NewPxeDiscover Pointer to the new cached PXE Discover packet contents.\r
834 @param NewPxeReply Pointer to the new cached PXE Reply packet contents.\r
835 @param NewPxeBisReply Pointer to the new cached PXE BIS Reply packet contents.\r
836 \r
837 @retval EFI_SUCCESS The cached packet contents were updated.\r
838 @retval EFI_NOT_STARTED The PXE Base Code Protocol is in the stopped state.\r
839 @retval EFI_INVALID_PARAMETER This is NULL or not point to a valid EFI_PXE_BASE_CODE_PROTOCOL structure.\r
840 \r
841**/\r
842typedef\r
843EFI_STATUS\r
8b13229b 844(EFIAPI *EFI_PXE_BASE_CODE_SET_PACKETS)(\r
d1f95000 845 IN EFI_PXE_BASE_CODE_PROTOCOL *This,\r
846 BOOLEAN *NewDhcpDiscoverValid, OPTIONAL\r
847 BOOLEAN *NewDhcpAckReceived, OPTIONAL\r
848 BOOLEAN *NewProxyOfferReceived, OPTIONAL\r
849 BOOLEAN *NewPxeDiscoverValid, OPTIONAL\r
850 BOOLEAN *NewPxeReplyReceived, OPTIONAL\r
851 BOOLEAN *NewPxeBisReplyReceived, OPTIONAL\r
852 IN EFI_PXE_BASE_CODE_PACKET *NewDhcpDiscover, OPTIONAL\r
853 IN EFI_PXE_BASE_CODE_PACKET *NewDhcpAck, OPTIONAL\r
854 IN EFI_PXE_BASE_CODE_PACKET *NewProxyOffer, OPTIONAL\r
855 IN EFI_PXE_BASE_CODE_PACKET *NewPxeDiscover, OPTIONAL\r
856 IN EFI_PXE_BASE_CODE_PACKET *NewPxeReply, OPTIONAL\r
857 IN EFI_PXE_BASE_CODE_PACKET *NewPxeBisReply OPTIONAL\r
858 );\r
859\r
860//\r
861// PXE Base Code Protocol structure\r
862//\r
a6508c05 863#define EFI_PXE_BASE_CODE_PROTOCOL_REVISION 0x00010000\r
864\r
865//\r
866// Revision defined in EFI1.1\r
867// \r
868#define EFI_PXE_BASE_CODE_INTERFACE_REVISION EFI_PXE_BASE_CODE_PROTOCOL_REVISION\r
d1f95000 869\r
44717a39 870///\r
871/// The EFI_PXE_BASE_CODE_PROTOCOL is used to control PXE-compatible devices.\r
872/// An EFI_PXE_BASE_CODE_PROTOCOL will be layered on top of an\r
873/// EFI_MANAGED_NETWORK_PROTOCOL protocol in order to perform packet level transactions.\r
874/// The EFI_PXE_BASE_CODE_PROTOCOL handle also supports the\r
875/// EFI_LOAD_FILE_PROTOCOL protocol. This provides a clean way to obtain control from the\r
876/// boot manager if the boot path is from the remote device.\r
877///\r
d1f95000 878struct _EFI_PXE_BASE_CODE_PROTOCOL {\r
1f08a159 879 ///\r
880 /// The revision of the EFI_PXE_BASE_CODE_PROTOCOL. All future revisions must \r
881 /// be backwards compatible. If a future version is not backwards compatible \r
882 /// it is not the same GUID.\r
883 ///\r
d1f95000 884 UINT64 Revision;\r
885 EFI_PXE_BASE_CODE_START Start;\r
886 EFI_PXE_BASE_CODE_STOP Stop;\r
887 EFI_PXE_BASE_CODE_DHCP Dhcp;\r
888 EFI_PXE_BASE_CODE_DISCOVER Discover;\r
889 EFI_PXE_BASE_CODE_MTFTP Mtftp;\r
890 EFI_PXE_BASE_CODE_UDP_WRITE UdpWrite;\r
891 EFI_PXE_BASE_CODE_UDP_READ UdpRead;\r
892 EFI_PXE_BASE_CODE_SET_IP_FILTER SetIpFilter;\r
893 EFI_PXE_BASE_CODE_ARP Arp;\r
894 EFI_PXE_BASE_CODE_SET_PARAMETERS SetParameters;\r
895 EFI_PXE_BASE_CODE_SET_STATION_IP SetStationIp;\r
896 EFI_PXE_BASE_CODE_SET_PACKETS SetPackets;\r
44717a39 897 ///\r
898 /// Pointer to the EFI_PXE_BASE_CODE_MODE data for this device.\r
899 ///\r
d1f95000 900 EFI_PXE_BASE_CODE_MODE *Mode;\r
901};\r
902\r
903extern EFI_GUID gEfiPxeBaseCodeProtocolGuid;\r
904\r
905#endif \r