2 EFI PXE Base Code Protocol definitions, which is used to access PXE-compatible
3 devices for network access and network booting.
5 Copyright (c) 2006 - 2008, Intel Corporation
6 All rights reserved. This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 #ifndef __PXE_BASE_CODE_PROTOCOL_H__
16 #define __PXE_BASE_CODE_PROTOCOL_H__
19 /// PXE Base Code protocol
21 #define EFI_PXE_BASE_CODE_PROTOCOL_GUID \
23 0x03c4e603, 0xac28, 0x11d3, {0x9a, 0x2d, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \
26 typedef struct _EFI_PXE_BASE_CODE_PROTOCOL EFI_PXE_BASE_CODE_PROTOCOL
;
29 /// Protocol defined in EFI1.1.
31 typedef EFI_PXE_BASE_CODE_PROTOCOL EFI_PXE_BASE_CODE
;
34 /// Default IP TTL and ToS.
36 #define DEFAULT_TTL 16
56 } EFI_PXE_BASE_CODE_ICMP_ERROR
;
63 CHAR8 ErrorString
[127];
64 } EFI_PXE_BASE_CODE_TFTP_ERROR
;
67 /// IP Receive Filter definitions
69 #define EFI_PXE_BASE_CODE_MAX_IPCNT 8
72 /// IP Receive Filter structure
78 EFI_IP_ADDRESS IpList
[EFI_PXE_BASE_CODE_MAX_IPCNT
];
79 } EFI_PXE_BASE_CODE_IP_FILTER
;
81 #define EFI_PXE_BASE_CODE_IP_FILTER_STATION_IP 0x0001
82 #define EFI_PXE_BASE_CODE_IP_FILTER_BROADCAST 0x0002
83 #define EFI_PXE_BASE_CODE_IP_FILTER_PROMISCUOUS 0x0004
84 #define EFI_PXE_BASE_CODE_IP_FILTER_PROMISCUOUS_MULTICAST 0x0008
90 EFI_IP_ADDRESS IpAddr
;
91 EFI_MAC_ADDRESS MacAddr
;
92 } EFI_PXE_BASE_CODE_ARP_ENTRY
;
95 /// ARP route table entries
98 EFI_IP_ADDRESS IpAddr
;
99 EFI_IP_ADDRESS SubnetMask
;
100 EFI_IP_ADDRESS GwAddr
;
101 } EFI_PXE_BASE_CODE_ROUTE_ENTRY
;
106 typedef UINT16 EFI_PXE_BASE_CODE_UDP_PORT
;
108 #define EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_SRC_IP 0x0001
109 #define EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_SRC_PORT 0x0002
110 #define EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_DEST_IP 0x0004
111 #define EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_DEST_PORT 0x0008
112 #define EFI_PXE_BASE_CODE_UDP_OPFLAGS_USE_FILTER 0x0010
113 #define EFI_PXE_BASE_CODE_UDP_OPFLAGS_MAY_FRAGMENT 0x0020
116 // Discover() definitions
118 #define EFI_PXE_BASE_CODE_BOOT_TYPE_BOOTSTRAP 0
119 #define EFI_PXE_BASE_CODE_BOOT_TYPE_MS_WINNT_RIS 1
120 #define EFI_PXE_BASE_CODE_BOOT_TYPE_INTEL_LCM 2
121 #define EFI_PXE_BASE_CODE_BOOT_TYPE_DOSUNDI 3
122 #define EFI_PXE_BASE_CODE_BOOT_TYPE_NEC_ESMPRO 4
123 #define EFI_PXE_BASE_CODE_BOOT_TYPE_IBM_WSoD 5
124 #define EFI_PXE_BASE_CODE_BOOT_TYPE_IBM_LCCM 6
125 #define EFI_PXE_BASE_CODE_BOOT_TYPE_CA_UNICENTER_TNG 7
126 #define EFI_PXE_BASE_CODE_BOOT_TYPE_HP_OPENVIEW 8
127 #define EFI_PXE_BASE_CODE_BOOT_TYPE_ALTIRIS_9 9
128 #define EFI_PXE_BASE_CODE_BOOT_TYPE_ALTIRIS_10 10
129 #define EFI_PXE_BASE_CODE_BOOT_TYPE_ALTIRIS_11 11
130 #define EFI_PXE_BASE_CODE_BOOT_TYPE_NOT_USED_12 12
131 #define EFI_PXE_BASE_CODE_BOOT_TYPE_REDHAT_INSTALL 13
132 #define EFI_PXE_BASE_CODE_BOOT_TYPE_REDHAT_BOOT 14
133 #define EFI_PXE_BASE_CODE_BOOT_TYPE_REMBO 15
134 #define EFI_PXE_BASE_CODE_BOOT_TYPE_BEOBOOT 16
136 // 17 through 32767 are reserved
137 // 32768 through 65279 are for vendor use
138 // 65280 through 65534 are reserved
140 #define EFI_PXE_BASE_CODE_BOOT_TYPE_PXETEST 65535
142 #define EFI_PXE_BASE_CODE_BOOT_LAYER_MASK 0x7FFF
143 #define EFI_PXE_BASE_CODE_BOOT_LAYER_INITIAL 0x0000
146 /// Discover() server list structure.
150 BOOLEAN AcceptAnyResponse
;
152 EFI_IP_ADDRESS IpAddr
;
153 } EFI_PXE_BASE_CODE_SRVLIST
;
156 /// Discover() information override structure.
163 EFI_IP_ADDRESS ServerMCastIp
;
165 EFI_PXE_BASE_CODE_SRVLIST SrvList
[1];
166 } EFI_PXE_BASE_CODE_DISCOVER_INFO
;
169 /// TFTP opcode definitions
172 EFI_PXE_BASE_CODE_TFTP_FIRST
,
173 EFI_PXE_BASE_CODE_TFTP_GET_FILE_SIZE
,
174 EFI_PXE_BASE_CODE_TFTP_READ_FILE
,
175 EFI_PXE_BASE_CODE_TFTP_WRITE_FILE
,
176 EFI_PXE_BASE_CODE_TFTP_READ_DIRECTORY
,
177 EFI_PXE_BASE_CODE_MTFTP_GET_FILE_SIZE
,
178 EFI_PXE_BASE_CODE_MTFTP_READ_FILE
,
179 EFI_PXE_BASE_CODE_MTFTP_READ_DIRECTORY
,
180 EFI_PXE_BASE_CODE_MTFTP_LAST
181 } EFI_PXE_BASE_CODE_TFTP_OPCODE
;
184 /// MTFTP information. This information is required
185 /// to start or join a multicast TFTP session. It is also required to
186 /// perform the "get file size" and "read directory" operations of MTFTP.
189 EFI_IP_ADDRESS MCastIp
;
190 EFI_PXE_BASE_CODE_UDP_PORT CPort
;
191 EFI_PXE_BASE_CODE_UDP_PORT SPort
;
192 UINT16 ListenTimeout
;
193 UINT16 TransmitTimeout
;
194 } EFI_PXE_BASE_CODE_MTFTP_INFO
;
197 /// DHCPV4 Packet structure
202 UINT8 BootpHwAddrLen
;
207 UINT8 BootpCiAddr
[4];
208 UINT8 BootpYiAddr
[4];
209 UINT8 BootpSiAddr
[4];
210 UINT8 BootpGiAddr
[4];
211 UINT8 BootpHwAddr
[16];
212 UINT8 BootpSrvName
[64];
213 UINT8 BootpBootFile
[128];
215 UINT8 DhcpOptions
[56];
216 } EFI_PXE_BASE_CODE_DHCPV4_PACKET
;
223 EFI_PXE_BASE_CODE_DHCPV4_PACKET Dhcpv4
;
225 // EFI_PXE_BASE_CODE_DHCPV6_PACKET Dhcpv6;
227 } EFI_PXE_BASE_CODE_PACKET
;
230 // PXE Base Code Mode structure
232 #define EFI_PXE_BASE_CODE_MAX_ARP_ENTRIES 8
233 #define EFI_PXE_BASE_CODE_MAX_ROUTE_ENTRIES 8
236 /// EFI_PXE_BASE_CODE_MODE
237 /// The data values in this structure are read-only and
238 /// are updated by the code that produces the
239 /// EFI_PXE_BASE_CODE_PROTOCOL functions.
243 BOOLEAN Ipv6Available
;
244 BOOLEAN Ipv6Supported
;
246 BOOLEAN BisSupported
;
250 BOOLEAN DhcpDiscoverValid
;
251 BOOLEAN DhcpAckReceived
;
252 BOOLEAN ProxyOfferReceived
;
253 BOOLEAN PxeDiscoverValid
;
254 BOOLEAN PxeReplyReceived
;
255 BOOLEAN PxeBisReplyReceived
;
256 BOOLEAN IcmpErrorReceived
;
257 BOOLEAN TftpErrorReceived
;
258 BOOLEAN MakeCallbacks
;
261 EFI_IP_ADDRESS StationIp
;
262 EFI_IP_ADDRESS SubnetMask
;
263 EFI_PXE_BASE_CODE_PACKET DhcpDiscover
;
264 EFI_PXE_BASE_CODE_PACKET DhcpAck
;
265 EFI_PXE_BASE_CODE_PACKET ProxyOffer
;
266 EFI_PXE_BASE_CODE_PACKET PxeDiscover
;
267 EFI_PXE_BASE_CODE_PACKET PxeReply
;
268 EFI_PXE_BASE_CODE_PACKET PxeBisReply
;
269 EFI_PXE_BASE_CODE_IP_FILTER IpFilter
;
270 UINT32 ArpCacheEntries
;
271 EFI_PXE_BASE_CODE_ARP_ENTRY ArpCache
[EFI_PXE_BASE_CODE_MAX_ARP_ENTRIES
];
272 UINT32 RouteTableEntries
;
273 EFI_PXE_BASE_CODE_ROUTE_ENTRY RouteTable
[EFI_PXE_BASE_CODE_MAX_ROUTE_ENTRIES
];
274 EFI_PXE_BASE_CODE_ICMP_ERROR IcmpError
;
275 EFI_PXE_BASE_CODE_TFTP_ERROR TftpError
;
276 } EFI_PXE_BASE_CODE_MODE
;
279 // PXE Base Code Interface Function definitions
283 Enables the use of the PXE Base Code Protocol functions.
285 @param This Pointer to the EFI_PXE_BASE_CODE_PROTOCOL instance.
286 @param UseIpv6 Specifies the type of IP addresses that are to be used during the session
287 that is being started. Set to TRUE for IPv6 addresses, and FALSE for
290 @retval EFI_SUCCESS The PXE Base Code Protocol was started.
291 @retval EFI_DEVICE_ERROR The network device encountered an error during this oper
292 @retval EFI_UNSUPPORTED UseIpv6 is TRUE, but the Ipv6Supported field of the
293 EFI_PXE_BASE_CODE_MODE structure is FALSE.
294 @retval EFI_ALREADY_STARTED The PXE Base Code Protocol is already in the started state.
295 @retval EFI_INVALID_PARAMETER The This parameter is NULL or does not point to a valid
296 EFI_PXE_BASE_CODE_PROTOCOL structure.
297 @retval EFI_OUT_OF_RESOURCES Could not allocate enough memory or other resources to start the
298 PXE Base Code Protocol.
303 (EFIAPI
*EFI_PXE_BASE_CODE_START
)(
304 IN EFI_PXE_BASE_CODE_PROTOCOL
*This
,
309 Disables the use of the PXE Base Code Protocol functions.
311 @param This Pointer to the EFI_PXE_BASE_CODE_PROTOCOL instance.
313 @retval EFI_SUCCESS The PXE Base Code Protocol was stopped.
314 @retval EFI_NOT_STARTED The PXE Base Code Protocol is already in the stopped state.
315 @retval EFI_INVALID_PARAMETER The This parameter is NULL or does not point to a valid
316 EFI_PXE_BASE_CODE_PROTOCOL structure.
317 @retval EFI_DEVICE_ERROR The network device encountered an error during this operation.
322 (EFIAPI
*EFI_PXE_BASE_CODE_STOP
)(
323 IN EFI_PXE_BASE_CODE_PROTOCOL
*This
327 Attempts to complete a DHCPv4 D.O.R.A. (discover / offer / request / acknowledge) or DHCPv6
328 S.A.R.R (solicit / advertise / request / reply) sequence.
330 @param This Pointer to the EFI_PXE_BASE_CODE_PROTOCOL instance.
331 @param SortOffers TRUE if the offers received should be sorted. Set to FALSE to try the
332 offers in the order that they are received.
334 @retval EFI_SUCCESS Valid DHCP has completed.
335 @retval EFI_NOT_STARTED The PXE Base Code Protocol is in the stopped state.
336 @retval EFI_INVALID_PARAMETER The This parameter is NULL or does not point to a valid
337 EFI_PXE_BASE_CODE_PROTOCOL structure.
338 @retval EFI_DEVICE_ERROR The network device encountered an error during this operation.
339 @retval EFI_OUT_OF_RESOURCES Could not allocate enough memory to complete the DHCP Protocol.
340 @retval EFI_ABORTED The callback function aborted the DHCP Protocol.
341 @retval EFI_TIMEOUT The DHCP Protocol timed out.
342 @retval EFI_ICMP_ERROR An ICMP error packet was received during the DHCP session.
343 @retval EFI_NO_RESPONSE Valid PXE offer was not received.
348 (EFIAPI
*EFI_PXE_BASE_CODE_DHCP
)(
349 IN EFI_PXE_BASE_CODE_PROTOCOL
*This
,
350 IN BOOLEAN SortOffers
354 Attempts to complete the PXE Boot Server and/or boot image discovery sequence.
356 @param This Pointer to the EFI_PXE_BASE_CODE_PROTOCOL instance.
357 @param Type The type of bootstrap to perform.
358 @param Layer Pointer to the boot server layer number to discover, which must be
359 PXE_BOOT_LAYER_INITIAL when a new server type is being
361 @param UseBis TRUE if Boot Integrity Services are to be used. FALSE otherwise.
362 @param Info Pointer to a data structure that contains additional information on the
363 type of discovery operation that is to be performed.
365 @retval EFI_SUCCESS The Discovery sequence has been completed.
366 @retval EFI_NOT_STARTED The PXE Base Code Protocol is in the stopped state.
367 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
368 @retval EFI_DEVICE_ERROR The network device encountered an error during this operation.
369 @retval EFI_OUT_OF_RESOURCES Could not allocate enough memory to complete Discovery.
370 @retval EFI_ABORTED The callback function aborted the Discovery sequence.
371 @retval EFI_TIMEOUT The Discovery sequence timed out.
372 @retval EFI_ICMP_ERROR An ICMP error packet was received during the PXE discovery
378 (EFIAPI
*EFI_PXE_BASE_CODE_DISCOVER
)(
379 IN EFI_PXE_BASE_CODE_PROTOCOL
*This
,
383 IN EFI_PXE_BASE_CODE_DISCOVER_INFO
*Info OPTIONAL
387 Used to perform TFTP and MTFTP services.
389 @param This Pointer to the EFI_PXE_BASE_CODE_PROTOCOL instance.
390 @param Operation The type of operation to perform.
391 @param BufferPtr A pointer to the data buffer.
392 @param Overwrite Only used on write file operations. TRUE if a file on a remote server can
394 @param BufferSize For get-file-size operations, *BufferSize returns the size of the
396 @param BlockSize The requested block size to be used during a TFTP transfer.
397 @param ServerIp The TFTP / MTFTP server IP address.
398 @param Filename A Null-terminated ASCII string that specifies a directory name or a file
400 @param Info Pointer to the MTFTP information.
401 @param DontUseBuffer Set to FALSE for normal TFTP and MTFTP read file operation.
403 @retval EFI_SUCCESS The TFTP/MTFTP operation was completed.
404 @retval EFI_NOT_STARTED The PXE Base Code Protocol is in the stopped state.
405 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
406 @retval EFI_DEVICE_ERROR The network device encountered an error during this operation.
407 @retval EFI_BUFFER_TOO_SMALL The buffer is not large enough to complete the read operation.
408 @retval EFI_ABORTED The callback function aborted the TFTP/MTFTP operation.
409 @retval EFI_TIMEOUT The TFTP/MTFTP operation timed out.
410 @retval EFI_ICMP_ERROR An ICMP error packet was received during the MTFTP session.
411 @retval EFI_TFTP_ERROR A TFTP error packet was received during the MTFTP session.
416 (EFIAPI
*EFI_PXE_BASE_CODE_MTFTP
)(
417 IN EFI_PXE_BASE_CODE_PROTOCOL
*This
,
418 IN EFI_PXE_BASE_CODE_TFTP_OPCODE Operation
,
419 IN OUT VOID
*BufferPtr OPTIONAL
,
420 IN BOOLEAN Overwrite
,
421 IN OUT UINT64
*BufferSize
,
422 IN UINTN
*BlockSize OPTIONAL
,
423 IN EFI_IP_ADDRESS
*ServerIp
,
424 IN UINT8
*Filename OPTIONAL
,
425 IN EFI_PXE_BASE_CODE_MTFTP_INFO
*Info OPTIONAL
,
426 IN BOOLEAN DontUseBuffer
430 Writes a UDP packet to the network interface.
432 @param This Pointer to the EFI_PXE_BASE_CODE_PROTOCOL instance.
433 @param OpFlags The UDP operation flags.
434 @param DestIp The destination IP address.
435 @param DestPort The destination UDP port number.
436 @param GatewayIp The gateway IP address.
437 @param SrcIp The source IP address.
438 @param SrcPort The source UDP port number.
439 @param HeaderSize An optional field which may be set to the length of a header at
440 HeaderPtr to be prefixed to the data at BufferPtr.
441 @param HeaderPtr If HeaderSize is not NULL, a pointer to a header to be prefixed to the
443 @param BufferSize A pointer to the size of the data at BufferPtr.
444 @param BufferPtr A pointer to the data to be written.
446 @retval EFI_SUCCESS The UDP Write operation was completed.
447 @retval EFI_NOT_STARTED The PXE Base Code Protocol is in the stopped state.
448 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
449 @retval EFI_BAD_BUFFER_SIZE The buffer is too long to be transmitted.
450 @retval EFI_ABORTED The callback function aborted the UDP Write operation.
451 @retval EFI_TIMEOUT The UDP Write operation timed out.
452 @retval EFI_ICMP_ERROR An ICMP error packet was received during the UDP write session.
457 (EFIAPI
*EFI_PXE_BASE_CODE_UDP_WRITE
)(
458 IN EFI_PXE_BASE_CODE_PROTOCOL
*This
,
460 IN EFI_IP_ADDRESS
*DestIp
,
461 IN EFI_PXE_BASE_CODE_UDP_PORT
*DestPort
,
462 IN EFI_IP_ADDRESS
*GatewayIp
, OPTIONAL
463 IN EFI_IP_ADDRESS
*SrcIp
, OPTIONAL
464 IN OUT EFI_PXE_BASE_CODE_UDP_PORT
*SrcPort
, OPTIONAL
465 IN UINTN
*HeaderSize
, OPTIONAL
466 IN VOID
*HeaderPtr
, OPTIONAL
467 IN UINTN
*BufferSize
,
472 Reads a UDP packet from the network interface.
474 @param This Pointer to the EFI_PXE_BASE_CODE_PROTOCOL instance.
475 @param OpFlags The UDP operation flags.
476 @param DestIp The destination IP address.
477 @param DestPort The destination UDP port number.
478 @param GatewayIp The gateway IP address.
479 @param SrcIp The source IP address.
480 @param SrcPort The source UDP port number.
481 @param HeaderSize An optional field which may be set to the length of a header at
482 HeaderPtr to be prefixed to the data at BufferPtr.
483 @param HeaderPtr If HeaderSize is not NULL, a pointer to a header to be prefixed to the
485 @param BufferSize A pointer to the size of the data at BufferPtr.
486 @param BufferPtr A pointer to the data to be read.
488 @retval EFI_SUCCESS The UDP Write operation was completed.
489 @retval EFI_NOT_STARTED The PXE Base Code Protocol is in the stopped state.
490 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
491 @retval EFI_DEVICE_ERROR The network device encountered an error during this operation.
492 @retval EFI_BUFFER_TOO_SMALL The packet is larger than Buffer can hold.
493 @retval EFI_ABORTED The callback function aborted the UDP Read operation.
494 @retval EFI_TIMEOUT The UDP Read operation timed out.
499 (EFIAPI
*EFI_PXE_BASE_CODE_UDP_READ
)(
500 IN EFI_PXE_BASE_CODE_PROTOCOL
*This
,
502 IN OUT EFI_IP_ADDRESS
*DestIp
, OPTIONAL
503 IN OUT EFI_PXE_BASE_CODE_UDP_PORT
*DestPort
, OPTIONAL
504 IN OUT EFI_IP_ADDRESS
*SrcIp
, OPTIONAL
505 IN OUT EFI_PXE_BASE_CODE_UDP_PORT
*SrcPort
, OPTIONAL
506 IN UINTN
*HeaderSize
, OPTIONAL
507 IN VOID
*HeaderPtr
, OPTIONAL
508 IN OUT UINTN
*BufferSize
,
513 Updates the IP receive filters of a network device and enables software filtering.
515 @param This Pointer to the EFI_PXE_BASE_CODE_PROTOCOL instance.
516 @param NewFilter Pointer to the new set of IP receive filters.
518 @retval EFI_SUCCESS The IP receive filter settings were updated.
519 @retval EFI_NOT_STARTED The PXE Base Code Protocol is in the stopped state.
520 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
525 (EFIAPI
*EFI_PXE_BASE_CODE_SET_IP_FILTER
)(
526 IN EFI_PXE_BASE_CODE_PROTOCOL
*This
,
527 IN EFI_PXE_BASE_CODE_IP_FILTER
*NewFilter
531 Uses the ARP protocol to resolve a MAC address.
533 @param This Pointer to the EFI_PXE_BASE_CODE_PROTOCOL instance.
534 @param IpAddr Pointer to the IP address that is used to resolve a MAC address.
535 @param MacAddr If not NULL, a pointer to the MAC address that was resolved with the
538 @retval EFI_SUCCESS The IP or MAC address was resolved.
539 @retval EFI_NOT_STARTED The PXE Base Code Protocol is in the stopped state.
540 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
541 @retval EFI_DEVICE_ERROR The network device encountered an error during this operation.
542 @retval EFI_ABORTED The callback function aborted the ARP Protocol.
543 @retval EFI_TIMEOUT The ARP Protocol encountered a timeout condition.
548 (EFIAPI
*EFI_PXE_BASE_CODE_ARP
)(
549 IN EFI_PXE_BASE_CODE_PROTOCOL
*This
,
550 IN EFI_IP_ADDRESS
*IpAddr
,
551 IN EFI_MAC_ADDRESS
*MacAddr OPTIONAL
555 Updates the parameters that affect the operation of the PXE Base Code Protocol.
557 @param This Pointer to the EFI_PXE_BASE_CODE_PROTOCOL instance.
558 @param NewAutoArp If not NULL, a pointer to a value that specifies whether to replace the
559 current value of AutoARP.
560 @param NewSendGUID If not NULL, a pointer to a value that specifies whether to replace the
561 current value of SendGUID.
562 @param NewTTL If not NULL, a pointer to be used in place of the current value of TTL,
563 the "time to live" field of the IP header.
564 @param NewToS If not NULL, a pointer to be used in place of the current value of ToS,
565 the "type of service" field of the IP header.
566 @param NewMakeCallback If not NULL, a pointer to a value that specifies whether to replace the
567 current value of the MakeCallback field of the Mode structure.
569 @retval EFI_SUCCESS The new parameters values were updated.
570 @retval EFI_NOT_STARTED The PXE Base Code Protocol is in the stopped state.
571 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
576 (EFIAPI
*EFI_PXE_BASE_CODE_SET_PARAMETERS
)(
577 IN EFI_PXE_BASE_CODE_PROTOCOL
*This
,
578 IN BOOLEAN
*NewAutoArp
, OPTIONAL
579 IN BOOLEAN
*NewSendGUID
, OPTIONAL
580 IN UINT8
*NewTTL
, OPTIONAL
581 IN UINT8
*NewToS
, OPTIONAL
582 IN BOOLEAN
*NewMakeCallback OPTIONAL
586 Updates the station IP address and/or subnet mask values of a network device.
588 @param This Pointer to the EFI_PXE_BASE_CODE_PROTOCOL instance.
589 @param NewStationIp Pointer to the new IP address to be used by the network device.
590 @param NewSubnetMask Pointer to the new subnet mask to be used by the network device.
592 @retval EFI_SUCCESS The new station IP address and/or subnet mask were updated.
593 @retval EFI_NOT_STARTED The PXE Base Code Protocol is in the stopped state.
594 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
599 (EFIAPI
*EFI_PXE_BASE_CODE_SET_STATION_IP
)(
600 IN EFI_PXE_BASE_CODE_PROTOCOL
*This
,
601 IN EFI_IP_ADDRESS
*NewStationIp
, OPTIONAL
602 IN EFI_IP_ADDRESS
*NewSubnetMask OPTIONAL
606 Updates the contents of the cached DHCP and Discover packets.
608 @param This Pointer to the EFI_PXE_BASE_CODE_PROTOCOL instance.
609 @param NewDhcpDiscoverValid Pointer to a value that will replace the current
610 DhcpDiscoverValid field.
611 @param NewDhcpAckReceived Pointer to a value that will replace the current
612 DhcpAckReceived field.
613 @param NewProxyOfferReceived Pointer to a value that will replace the current
614 ProxyOfferReceived field.
615 @param NewPxeDiscoverValid Pointer to a value that will replace the current
616 ProxyOfferReceived field.
617 @param NewPxeReplyReceived Pointer to a value that will replace the current
618 PxeReplyReceived field.
619 @param NewPxeBisReplyReceived Pointer to a value that will replace the current
620 PxeBisReplyReceived field.
621 @param NewDhcpDiscover Pointer to the new cached DHCP Discover packet contents.
622 @param NewDhcpAck Pointer to the new cached DHCP Ack packet contents.
623 @param NewProxyOffer Pointer to the new cached Proxy Offer packet contents.
624 @param NewPxeDiscover Pointer to the new cached PXE Discover packet contents.
625 @param NewPxeReply Pointer to the new cached PXE Reply packet contents.
626 @param NewPxeBisReply Pointer to the new cached PXE BIS Reply packet contents.
628 @retval EFI_SUCCESS The cached packet contents were updated.
629 @retval EFI_NOT_STARTED The PXE Base Code Protocol is in the stopped state.
630 @retval EFI_INVALID_PARAMETER This is NULL or not point to a valid EFI_PXE_BASE_CODE_PROTOCOL structure.
635 (EFIAPI
*EFI_PXE_BASE_CODE_SET_PACKETS
)(
636 IN EFI_PXE_BASE_CODE_PROTOCOL
*This
,
637 BOOLEAN
*NewDhcpDiscoverValid
, OPTIONAL
638 BOOLEAN
*NewDhcpAckReceived
, OPTIONAL
639 BOOLEAN
*NewProxyOfferReceived
, OPTIONAL
640 BOOLEAN
*NewPxeDiscoverValid
, OPTIONAL
641 BOOLEAN
*NewPxeReplyReceived
, OPTIONAL
642 BOOLEAN
*NewPxeBisReplyReceived
, OPTIONAL
643 IN EFI_PXE_BASE_CODE_PACKET
*NewDhcpDiscover
, OPTIONAL
644 IN EFI_PXE_BASE_CODE_PACKET
*NewDhcpAck
, OPTIONAL
645 IN EFI_PXE_BASE_CODE_PACKET
*NewProxyOffer
, OPTIONAL
646 IN EFI_PXE_BASE_CODE_PACKET
*NewPxeDiscover
, OPTIONAL
647 IN EFI_PXE_BASE_CODE_PACKET
*NewPxeReply
, OPTIONAL
648 IN EFI_PXE_BASE_CODE_PACKET
*NewPxeBisReply OPTIONAL
652 // PXE Base Code Protocol structure
654 #define EFI_PXE_BASE_CODE_PROTOCOL_REVISION 0x00010000
657 // Revision defined in EFI1.1
659 #define EFI_PXE_BASE_CODE_INTERFACE_REVISION EFI_PXE_BASE_CODE_PROTOCOL_REVISION
662 /// The EFI_PXE_BASE_CODE_PROTOCOL is used to control PXE-compatible devices.
663 /// An EFI_PXE_BASE_CODE_PROTOCOL will be layered on top of an
664 /// EFI_MANAGED_NETWORK_PROTOCOL protocol in order to perform packet level transactions.
665 /// The EFI_PXE_BASE_CODE_PROTOCOL handle also supports the
666 /// EFI_LOAD_FILE_PROTOCOL protocol. This provides a clean way to obtain control from the
667 /// boot manager if the boot path is from the remote device.
669 struct _EFI_PXE_BASE_CODE_PROTOCOL
{
671 /// The revision of the EFI_PXE_BASE_CODE_PROTOCOL. All future revisions must
672 /// be backwards compatible. If a future version is not backwards compatible
673 /// it is not the same GUID.
676 EFI_PXE_BASE_CODE_START Start
;
677 EFI_PXE_BASE_CODE_STOP Stop
;
678 EFI_PXE_BASE_CODE_DHCP Dhcp
;
679 EFI_PXE_BASE_CODE_DISCOVER Discover
;
680 EFI_PXE_BASE_CODE_MTFTP Mtftp
;
681 EFI_PXE_BASE_CODE_UDP_WRITE UdpWrite
;
682 EFI_PXE_BASE_CODE_UDP_READ UdpRead
;
683 EFI_PXE_BASE_CODE_SET_IP_FILTER SetIpFilter
;
684 EFI_PXE_BASE_CODE_ARP Arp
;
685 EFI_PXE_BASE_CODE_SET_PARAMETERS SetParameters
;
686 EFI_PXE_BASE_CODE_SET_STATION_IP SetStationIp
;
687 EFI_PXE_BASE_CODE_SET_PACKETS SetPackets
;
689 /// Pointer to the EFI_PXE_BASE_CODE_MODE data for this device.
691 EFI_PXE_BASE_CODE_MODE
*Mode
;
694 extern EFI_GUID gEfiPxeBaseCodeProtocolGuid
;