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
75 EFI_IP_ADDRESS IpList
[EFI_PXE_BASE_CODE_MAX_IPCNT
];
76 } EFI_PXE_BASE_CODE_IP_FILTER
;
78 #define EFI_PXE_BASE_CODE_IP_FILTER_STATION_IP 0x0001
79 #define EFI_PXE_BASE_CODE_IP_FILTER_BROADCAST 0x0002
80 #define EFI_PXE_BASE_CODE_IP_FILTER_PROMISCUOUS 0x0004
81 #define EFI_PXE_BASE_CODE_IP_FILTER_PROMISCUOUS_MULTICAST 0x0008
84 /// ARP Cache definitions
87 EFI_IP_ADDRESS IpAddr
;
88 EFI_MAC_ADDRESS MacAddr
;
89 } EFI_PXE_BASE_CODE_ARP_ENTRY
;
92 EFI_IP_ADDRESS IpAddr
;
93 EFI_IP_ADDRESS SubnetMask
;
94 EFI_IP_ADDRESS GwAddr
;
95 } EFI_PXE_BASE_CODE_ROUTE_ENTRY
;
100 typedef UINT16 EFI_PXE_BASE_CODE_UDP_PORT
;
102 #define EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_SRC_IP 0x0001
103 #define EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_SRC_PORT 0x0002
104 #define EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_DEST_IP 0x0004
105 #define EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_DEST_PORT 0x0008
106 #define EFI_PXE_BASE_CODE_UDP_OPFLAGS_USE_FILTER 0x0010
107 #define EFI_PXE_BASE_CODE_UDP_OPFLAGS_MAY_FRAGMENT 0x0020
110 // Discover() definitions
112 #define EFI_PXE_BASE_CODE_BOOT_TYPE_BOOTSTRAP 0
113 #define EFI_PXE_BASE_CODE_BOOT_TYPE_MS_WINNT_RIS 1
114 #define EFI_PXE_BASE_CODE_BOOT_TYPE_INTEL_LCM 2
115 #define EFI_PXE_BASE_CODE_BOOT_TYPE_DOSUNDI 3
116 #define EFI_PXE_BASE_CODE_BOOT_TYPE_NEC_ESMPRO 4
117 #define EFI_PXE_BASE_CODE_BOOT_TYPE_IBM_WSoD 5
118 #define EFI_PXE_BASE_CODE_BOOT_TYPE_IBM_LCCM 6
119 #define EFI_PXE_BASE_CODE_BOOT_TYPE_CA_UNICENTER_TNG 7
120 #define EFI_PXE_BASE_CODE_BOOT_TYPE_HP_OPENVIEW 8
121 #define EFI_PXE_BASE_CODE_BOOT_TYPE_ALTIRIS_9 9
122 #define EFI_PXE_BASE_CODE_BOOT_TYPE_ALTIRIS_10 10
123 #define EFI_PXE_BASE_CODE_BOOT_TYPE_ALTIRIS_11 11
124 #define EFI_PXE_BASE_CODE_BOOT_TYPE_NOT_USED_12 12
125 #define EFI_PXE_BASE_CODE_BOOT_TYPE_REDHAT_INSTALL 13
126 #define EFI_PXE_BASE_CODE_BOOT_TYPE_REDHAT_BOOT 14
127 #define EFI_PXE_BASE_CODE_BOOT_TYPE_REMBO 15
128 #define EFI_PXE_BASE_CODE_BOOT_TYPE_BEOBOOT 16
130 // 17 through 32767 are reserved
131 // 32768 through 65279 are for vendor use
132 // 65280 through 65534 are reserved
134 #define EFI_PXE_BASE_CODE_BOOT_TYPE_PXETEST 65535
136 #define EFI_PXE_BASE_CODE_BOOT_LAYER_MASK 0x7FFF
137 #define EFI_PXE_BASE_CODE_BOOT_LAYER_INITIAL 0x0000
140 /// Discover() server list structure.
144 BOOLEAN AcceptAnyResponse
;
146 EFI_IP_ADDRESS IpAddr
;
147 } EFI_PXE_BASE_CODE_SRVLIST
;
150 /// Discover() information override structure.
157 EFI_IP_ADDRESS ServerMCastIp
;
159 EFI_PXE_BASE_CODE_SRVLIST SrvList
[1];
160 } EFI_PXE_BASE_CODE_DISCOVER_INFO
;
163 /// Mtftp() definitions
166 EFI_PXE_BASE_CODE_TFTP_FIRST
,
167 EFI_PXE_BASE_CODE_TFTP_GET_FILE_SIZE
,
168 EFI_PXE_BASE_CODE_TFTP_READ_FILE
,
169 EFI_PXE_BASE_CODE_TFTP_WRITE_FILE
,
170 EFI_PXE_BASE_CODE_TFTP_READ_DIRECTORY
,
171 EFI_PXE_BASE_CODE_MTFTP_GET_FILE_SIZE
,
172 EFI_PXE_BASE_CODE_MTFTP_READ_FILE
,
173 EFI_PXE_BASE_CODE_MTFTP_READ_DIRECTORY
,
174 EFI_PXE_BASE_CODE_MTFTP_LAST
175 } EFI_PXE_BASE_CODE_TFTP_OPCODE
;
178 EFI_IP_ADDRESS MCastIp
;
179 EFI_PXE_BASE_CODE_UDP_PORT CPort
;
180 EFI_PXE_BASE_CODE_UDP_PORT SPort
;
181 UINT16 ListenTimeout
;
182 UINT16 TransmitTimeout
;
183 } EFI_PXE_BASE_CODE_MTFTP_INFO
;
186 /// Packet definitions
191 UINT8 BootpHwAddrLen
;
196 UINT8 BootpCiAddr
[4];
197 UINT8 BootpYiAddr
[4];
198 UINT8 BootpSiAddr
[4];
199 UINT8 BootpGiAddr
[4];
200 UINT8 BootpHwAddr
[16];
201 UINT8 BootpSrvName
[64];
202 UINT8 BootpBootFile
[128];
204 UINT8 DhcpOptions
[56];
205 } EFI_PXE_BASE_CODE_DHCPV4_PACKET
;
209 EFI_PXE_BASE_CODE_DHCPV4_PACKET Dhcpv4
;
212 /// EFI_PXE_BASE_CODE_DHCPV6_PACKET Dhcpv6;
214 } EFI_PXE_BASE_CODE_PACKET
;
218 // PXE Base Code Mode structure
220 #define EFI_PXE_BASE_CODE_MAX_ARP_ENTRIES 8
221 #define EFI_PXE_BASE_CODE_MAX_ROUTE_ENTRIES 8
225 BOOLEAN Ipv6Available
;
226 BOOLEAN Ipv6Supported
;
228 BOOLEAN BisSupported
;
232 BOOLEAN DhcpDiscoverValid
;
233 BOOLEAN DhcpAckReceived
;
234 BOOLEAN ProxyOfferReceived
;
235 BOOLEAN PxeDiscoverValid
;
236 BOOLEAN PxeReplyReceived
;
237 BOOLEAN PxeBisReplyReceived
;
238 BOOLEAN IcmpErrorReceived
;
239 BOOLEAN TftpErrorReceived
;
240 BOOLEAN MakeCallbacks
;
243 EFI_IP_ADDRESS StationIp
;
244 EFI_IP_ADDRESS SubnetMask
;
245 EFI_PXE_BASE_CODE_PACKET DhcpDiscover
;
246 EFI_PXE_BASE_CODE_PACKET DhcpAck
;
247 EFI_PXE_BASE_CODE_PACKET ProxyOffer
;
248 EFI_PXE_BASE_CODE_PACKET PxeDiscover
;
249 EFI_PXE_BASE_CODE_PACKET PxeReply
;
250 EFI_PXE_BASE_CODE_PACKET PxeBisReply
;
251 EFI_PXE_BASE_CODE_IP_FILTER IpFilter
;
252 UINT32 ArpCacheEntries
;
253 EFI_PXE_BASE_CODE_ARP_ENTRY ArpCache
[EFI_PXE_BASE_CODE_MAX_ARP_ENTRIES
];
254 UINT32 RouteTableEntries
;
255 EFI_PXE_BASE_CODE_ROUTE_ENTRY RouteTable
[EFI_PXE_BASE_CODE_MAX_ROUTE_ENTRIES
];
256 EFI_PXE_BASE_CODE_ICMP_ERROR IcmpError
;
257 EFI_PXE_BASE_CODE_TFTP_ERROR TftpError
;
258 } EFI_PXE_BASE_CODE_MODE
;
261 // PXE Base Code Interface Function definitions
265 Enables the use of the PXE Base Code Protocol functions.
267 @param This Pointer to the EFI_PXE_BASE_CODE_PROTOCOL instance.
268 @param UseIpv6 Specifies the type of IP addresses that are to be used during the session
269 that is being started. Set to TRUE for IPv6 addresses, and FALSE for
272 @retval EFI_SUCCESS The PXE Base Code Protocol was started.
273 @retval EFI_DEVICE_ERROR The network device encountered an error during this oper
274 @retval EFI_UNSUPPORTED UseIpv6 is TRUE, but the Ipv6Supported field of the
275 EFI_PXE_BASE_CODE_MODE structure is FALSE.
276 @retval EFI_ALREADY_STARTED The PXE Base Code Protocol is already in the started state.
277 @retval EFI_INVALID_PARAMETER The This parameter is NULL or does not point to a valid
278 EFI_PXE_BASE_CODE_PROTOCOL structure.
279 @retval EFI_OUT_OF_RESOURCES Could not allocate enough memory or other resources to start the
280 PXE Base Code Protocol.
285 (EFIAPI
*EFI_PXE_BASE_CODE_START
)(
286 IN EFI_PXE_BASE_CODE_PROTOCOL
*This
,
291 Disables the use of the PXE Base Code Protocol functions.
293 @param This Pointer to the EFI_PXE_BASE_CODE_PROTOCOL instance.
295 @retval EFI_SUCCESS The PXE Base Code Protocol was stopped.
296 @retval EFI_NOT_STARTED The PXE Base Code Protocol is already in the stopped state.
297 @retval EFI_INVALID_PARAMETER The This parameter is NULL or does not point to a valid
298 EFI_PXE_BASE_CODE_PROTOCOL structure.
299 @retval EFI_DEVICE_ERROR The network device encountered an error during this operation.
304 (EFIAPI
*EFI_PXE_BASE_CODE_STOP
)(
305 IN EFI_PXE_BASE_CODE_PROTOCOL
*This
309 Attempts to complete a DHCPv4 D.O.R.A. (discover / offer / request / acknowledge) or DHCPv6
310 S.A.R.R (solicit / advertise / request / reply) sequence.
312 @param This Pointer to the EFI_PXE_BASE_CODE_PROTOCOL instance.
313 @param SortOffers TRUE if the offers received should be sorted. Set to FALSE to try the
314 offers in the order that they are received.
316 @retval EFI_SUCCESS Valid DHCP has completed.
317 @retval EFI_NOT_STARTED The PXE Base Code Protocol is in the stopped state.
318 @retval EFI_INVALID_PARAMETER The This parameter is NULL or does not point to a valid
319 EFI_PXE_BASE_CODE_PROTOCOL structure.
320 @retval EFI_DEVICE_ERROR The network device encountered an error during this operation.
321 @retval EFI_OUT_OF_RESOURCES Could not allocate enough memory to complete the DHCP Protocol.
322 @retval EFI_ABORTED The callback function aborted the DHCP Protocol.
323 @retval EFI_TIMEOUT The DHCP Protocol timed out.
324 @retval EFI_ICMP_ERROR An ICMP error packet was received during the DHCP session.
325 @retval EFI_NO_RESPONSE Valid PXE offer was not received.
330 (EFIAPI
*EFI_PXE_BASE_CODE_DHCP
)(
331 IN EFI_PXE_BASE_CODE_PROTOCOL
*This
,
332 IN BOOLEAN SortOffers
336 Attempts to complete the PXE Boot Server and/or boot image discovery sequence.
338 @param This Pointer to the EFI_PXE_BASE_CODE_PROTOCOL instance.
339 @param Type The type of bootstrap to perform.
340 @param Layer Pointer to the boot server layer number to discover, which must be
341 PXE_BOOT_LAYER_INITIAL when a new server type is being
343 @param UseBis TRUE if Boot Integrity Services are to be used. FALSE otherwise.
344 @param Info Pointer to a data structure that contains additional information on the
345 type of discovery operation that is to be performed.
347 @retval EFI_SUCCESS The Discovery sequence has been completed.
348 @retval EFI_NOT_STARTED The PXE Base Code Protocol is in the stopped state.
349 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
350 @retval EFI_DEVICE_ERROR The network device encountered an error during this operation.
351 @retval EFI_OUT_OF_RESOURCES Could not allocate enough memory to complete Discovery.
352 @retval EFI_ABORTED The callback function aborted the Discovery sequence.
353 @retval EFI_TIMEOUT The Discovery sequence timed out.
354 @retval EFI_ICMP_ERROR An ICMP error packet was received during the PXE discovery
360 (EFIAPI
*EFI_PXE_BASE_CODE_DISCOVER
)(
361 IN EFI_PXE_BASE_CODE_PROTOCOL
*This
,
365 IN EFI_PXE_BASE_CODE_DISCOVER_INFO
*Info OPTIONAL
369 Used to perform TFTP and MTFTP services.
371 @param This Pointer to the EFI_PXE_BASE_CODE_PROTOCOL instance.
372 @param Operation The type of operation to perform.
373 @param BufferPtr A pointer to the data buffer.
374 @param Overwrite Only used on write file operations. TRUE if a file on a remote server can
376 @param BufferSize For get-file-size operations, *BufferSize returns the size of the
378 @param BlockSize The requested block size to be used during a TFTP transfer.
379 @param ServerIp The TFTP / MTFTP server IP address.
380 @param Filename A Null-terminated ASCII string that specifies a directory name or a file
382 @param Info Pointer to the MTFTP information.
383 @param DontUseBuffer Set to FALSE for normal TFTP and MTFTP read file operation.
385 @retval EFI_SUCCESS The TFTP/MTFTP operation was completed.
386 @retval EFI_NOT_STARTED The PXE Base Code Protocol is in the stopped state.
387 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
388 @retval EFI_DEVICE_ERROR The network device encountered an error during this operation.
389 @retval EFI_BUFFER_TOO_SMALL The buffer is not large enough to complete the read operation.
390 @retval EFI_ABORTED The callback function aborted the TFTP/MTFTP operation.
391 @retval EFI_TIMEOUT The TFTP/MTFTP operation timed out.
392 @retval EFI_ICMP_ERROR An ICMP error packet was received during the MTFTP session.
393 @retval EFI_TFTP_ERROR A TFTP error packet was received during the MTFTP session.
398 (EFIAPI
*EFI_PXE_BASE_CODE_MTFTP
)(
399 IN EFI_PXE_BASE_CODE_PROTOCOL
*This
,
400 IN EFI_PXE_BASE_CODE_TFTP_OPCODE Operation
,
401 IN OUT VOID
*BufferPtr OPTIONAL
,
402 IN BOOLEAN Overwrite
,
403 IN OUT UINT64
*BufferSize
,
404 IN UINTN
*BlockSize OPTIONAL
,
405 IN EFI_IP_ADDRESS
*ServerIp
,
406 IN UINT8
*Filename OPTIONAL
,
407 IN EFI_PXE_BASE_CODE_MTFTP_INFO
*Info OPTIONAL
,
408 IN BOOLEAN DontUseBuffer
412 Writes a UDP packet to the network interface.
414 @param This Pointer to the EFI_PXE_BASE_CODE_PROTOCOL instance.
415 @param OpFlags The UDP operation flags.
416 @param DestIp The destination IP address.
417 @param DestPort The destination UDP port number.
418 @param GatewayIp The gateway IP address.
419 @param SrcIp The source IP address.
420 @param SrcPort The source UDP port number.
421 @param HeaderSize An optional field which may be set to the length of a header at
422 HeaderPtr to be prefixed to the data at BufferPtr.
423 @param HeaderPtr If HeaderSize is not NULL, a pointer to a header to be prefixed to the
425 @param BufferSize A pointer to the size of the data at BufferPtr.
426 @param BufferPtr A pointer to the data to be written.
428 @retval EFI_SUCCESS The UDP Write operation was completed.
429 @retval EFI_NOT_STARTED The PXE Base Code Protocol is in the stopped state.
430 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
431 @retval EFI_BAD_BUFFER_SIZE The buffer is too long to be transmitted.
432 @retval EFI_ABORTED The callback function aborted the UDP Write operation.
433 @retval EFI_TIMEOUT The UDP Write operation timed out.
434 @retval EFI_ICMP_ERROR An ICMP error packet was received during the UDP write session.
439 (EFIAPI
*EFI_PXE_BASE_CODE_UDP_WRITE
)(
440 IN EFI_PXE_BASE_CODE_PROTOCOL
*This
,
442 IN EFI_IP_ADDRESS
*DestIp
,
443 IN EFI_PXE_BASE_CODE_UDP_PORT
*DestPort
,
444 IN EFI_IP_ADDRESS
*GatewayIp
, OPTIONAL
445 IN EFI_IP_ADDRESS
*SrcIp
, OPTIONAL
446 IN OUT EFI_PXE_BASE_CODE_UDP_PORT
*SrcPort
, OPTIONAL
447 IN UINTN
*HeaderSize
, OPTIONAL
448 IN VOID
*HeaderPtr
, OPTIONAL
449 IN UINTN
*BufferSize
,
454 Reads a UDP packet from the network interface.
456 @param This Pointer to the EFI_PXE_BASE_CODE_PROTOCOL instance.
457 @param OpFlags The UDP operation flags.
458 @param DestIp The destination IP address.
459 @param DestPort The destination UDP port number.
460 @param GatewayIp The gateway IP address.
461 @param SrcIp The source IP address.
462 @param SrcPort The source UDP port number.
463 @param HeaderSize An optional field which may be set to the length of a header at
464 HeaderPtr to be prefixed to the data at BufferPtr.
465 @param HeaderPtr If HeaderSize is not NULL, a pointer to a header to be prefixed to the
467 @param BufferSize A pointer to the size of the data at BufferPtr.
468 @param BufferPtr A pointer to the data to be read.
470 @retval EFI_SUCCESS The UDP Write operation was completed.
471 @retval EFI_NOT_STARTED The PXE Base Code Protocol is in the stopped state.
472 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
473 @retval EFI_DEVICE_ERROR The network device encountered an error during this operation.
474 @retval EFI_BUFFER_TOO_SMALL The packet is larger than Buffer can hold.
475 @retval EFI_ABORTED The callback function aborted the UDP Read operation.
476 @retval EFI_TIMEOUT The UDP Read operation timed out.
481 (EFIAPI
*EFI_PXE_BASE_CODE_UDP_READ
)(
482 IN EFI_PXE_BASE_CODE_PROTOCOL
*This
,
484 IN OUT EFI_IP_ADDRESS
*DestIp
, OPTIONAL
485 IN OUT EFI_PXE_BASE_CODE_UDP_PORT
*DestPort
, OPTIONAL
486 IN OUT EFI_IP_ADDRESS
*SrcIp
, OPTIONAL
487 IN OUT EFI_PXE_BASE_CODE_UDP_PORT
*SrcPort
, OPTIONAL
488 IN UINTN
*HeaderSize
, OPTIONAL
489 IN VOID
*HeaderPtr
, OPTIONAL
490 IN OUT UINTN
*BufferSize
,
495 Updates the IP receive filters of a network device and enables software filtering.
497 @param This Pointer to the EFI_PXE_BASE_CODE_PROTOCOL instance.
498 @param NewFilter Pointer to the new set of IP receive filters.
500 @retval EFI_SUCCESS The IP receive filter settings were updated.
501 @retval EFI_NOT_STARTED The PXE Base Code Protocol is in the stopped state.
502 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
507 (EFIAPI
*EFI_PXE_BASE_CODE_SET_IP_FILTER
)(
508 IN EFI_PXE_BASE_CODE_PROTOCOL
*This
,
509 IN EFI_PXE_BASE_CODE_IP_FILTER
*NewFilter
513 Uses the ARP protocol to resolve a MAC address.
515 @param This Pointer to the EFI_PXE_BASE_CODE_PROTOCOL instance.
516 @param IpAddr Pointer to the IP address that is used to resolve a MAC address.
517 @param MacAddr If not NULL, a pointer to the MAC address that was resolved with the
520 @retval EFI_SUCCESS The IP or MAC address was resolved.
521 @retval EFI_NOT_STARTED The PXE Base Code Protocol is in the stopped state.
522 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
523 @retval EFI_DEVICE_ERROR The network device encountered an error during this operation.
524 @retval EFI_ABORTED The callback function aborted the ARP Protocol.
525 @retval EFI_TIMEOUT The ARP Protocol encountered a timeout condition.
530 (EFIAPI
*EFI_PXE_BASE_CODE_ARP
)(
531 IN EFI_PXE_BASE_CODE_PROTOCOL
*This
,
532 IN EFI_IP_ADDRESS
*IpAddr
,
533 IN EFI_MAC_ADDRESS
*MacAddr OPTIONAL
537 Updates the parameters that affect the operation of the PXE Base Code Protocol.
539 @param This Pointer to the EFI_PXE_BASE_CODE_PROTOCOL instance.
540 @param NewAutoArp If not NULL, a pointer to a value that specifies whether to replace the
541 current value of AutoARP.
542 @param NewSendGUID If not NULL, a pointer to a value that specifies whether to replace the
543 current value of SendGUID.
544 @param NewTTL If not NULL, a pointer to be used in place of the current value of TTL,
545 the "time to live" field of the IP header.
546 @param NewToS If not NULL, a pointer to be used in place of the current value of ToS,
547 the "type of service" field of the IP header.
548 @param NewMakeCallback If not NULL, a pointer to a value that specifies whether to replace the
549 current value of the MakeCallback field of the Mode structure.
551 @retval EFI_SUCCESS The new parameters values were updated.
552 @retval EFI_NOT_STARTED The PXE Base Code Protocol is in the stopped state.
553 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
558 (EFIAPI
*EFI_PXE_BASE_CODE_SET_PARAMETERS
)(
559 IN EFI_PXE_BASE_CODE_PROTOCOL
*This
,
560 IN BOOLEAN
*NewAutoArp
, OPTIONAL
561 IN BOOLEAN
*NewSendGUID
, OPTIONAL
562 IN UINT8
*NewTTL
, OPTIONAL
563 IN UINT8
*NewToS
, OPTIONAL
564 IN BOOLEAN
*NewMakeCallback OPTIONAL
568 Updates the station IP address and/or subnet mask values of a network device.
570 @param This Pointer to the EFI_PXE_BASE_CODE_PROTOCOL instance.
571 @param NewStationIp Pointer to the new IP address to be used by the network device.
572 @param NewSubnetMask Pointer to the new subnet mask to be used by the network device.
574 @retval EFI_SUCCESS The new station IP address and/or subnet mask were updated.
575 @retval EFI_NOT_STARTED The PXE Base Code Protocol is in the stopped state.
576 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
581 (EFIAPI
*EFI_PXE_BASE_CODE_SET_STATION_IP
)(
582 IN EFI_PXE_BASE_CODE_PROTOCOL
*This
,
583 IN EFI_IP_ADDRESS
*NewStationIp
, OPTIONAL
584 IN EFI_IP_ADDRESS
*NewSubnetMask OPTIONAL
588 Updates the contents of the cached DHCP and Discover packets.
590 @param This Pointer to the EFI_PXE_BASE_CODE_PROTOCOL instance.
591 @param NewDhcpDiscoverValid Pointer to a value that will replace the current
592 DhcpDiscoverValid field.
593 @param NewDhcpAckReceived Pointer to a value that will replace the current
594 DhcpAckReceived field.
595 @param NewProxyOfferReceived Pointer to a value that will replace the current
596 ProxyOfferReceived field.
597 @param NewPxeDiscoverValid Pointer to a value that will replace the current
598 ProxyOfferReceived field.
599 @param NewPxeReplyReceived Pointer to a value that will replace the current
600 PxeReplyReceived field.
601 @param NewPxeBisReplyReceived Pointer to a value that will replace the current
602 PxeBisReplyReceived field.
603 @param NewDhcpDiscover Pointer to the new cached DHCP Discover packet contents.
604 @param NewDhcpAck Pointer to the new cached DHCP Ack packet contents.
605 @param NewProxyOffer Pointer to the new cached Proxy Offer packet contents.
606 @param NewPxeDiscover Pointer to the new cached PXE Discover packet contents.
607 @param NewPxeReply Pointer to the new cached PXE Reply packet contents.
608 @param NewPxeBisReply Pointer to the new cached PXE BIS Reply packet contents.
610 @retval EFI_SUCCESS The cached packet contents were updated.
611 @retval EFI_NOT_STARTED The PXE Base Code Protocol is in the stopped state.
612 @retval EFI_INVALID_PARAMETER This is NULL or not point to a valid EFI_PXE_BASE_CODE_PROTOCOL structure.
617 (EFIAPI
*EFI_PXE_BASE_CODE_SET_PACKETS
)(
618 IN EFI_PXE_BASE_CODE_PROTOCOL
*This
,
619 BOOLEAN
*NewDhcpDiscoverValid
, OPTIONAL
620 BOOLEAN
*NewDhcpAckReceived
, OPTIONAL
621 BOOLEAN
*NewProxyOfferReceived
, OPTIONAL
622 BOOLEAN
*NewPxeDiscoverValid
, OPTIONAL
623 BOOLEAN
*NewPxeReplyReceived
, OPTIONAL
624 BOOLEAN
*NewPxeBisReplyReceived
, OPTIONAL
625 IN EFI_PXE_BASE_CODE_PACKET
*NewDhcpDiscover
, OPTIONAL
626 IN EFI_PXE_BASE_CODE_PACKET
*NewDhcpAck
, OPTIONAL
627 IN EFI_PXE_BASE_CODE_PACKET
*NewProxyOffer
, OPTIONAL
628 IN EFI_PXE_BASE_CODE_PACKET
*NewPxeDiscover
, OPTIONAL
629 IN EFI_PXE_BASE_CODE_PACKET
*NewPxeReply
, OPTIONAL
630 IN EFI_PXE_BASE_CODE_PACKET
*NewPxeBisReply OPTIONAL
634 // PXE Base Code Protocol structure
636 #define EFI_PXE_BASE_CODE_PROTOCOL_REVISION 0x00010000
639 // Revision defined in EFI1.1
641 #define EFI_PXE_BASE_CODE_INTERFACE_REVISION EFI_PXE_BASE_CODE_PROTOCOL_REVISION
644 /// The EFI_PXE_BASE_CODE_PROTOCOL is used to control PXE-compatible devices.
645 /// An EFI_PXE_BASE_CODE_PROTOCOL will be layered on top of an
646 /// EFI_MANAGED_NETWORK_PROTOCOL protocol in order to perform packet level transactions.
647 /// The EFI_PXE_BASE_CODE_PROTOCOL handle also supports the
648 /// EFI_LOAD_FILE_PROTOCOL protocol. This provides a clean way to obtain control from the
649 /// boot manager if the boot path is from the remote device.
651 struct _EFI_PXE_BASE_CODE_PROTOCOL
{
653 /// The revision of the EFI_PXE_BASE_CODE_PROTOCOL. All future revisions must
654 /// be backwards compatible. If a future version is not backwards compatible
655 /// it is not the same GUID.
658 EFI_PXE_BASE_CODE_START Start
;
659 EFI_PXE_BASE_CODE_STOP Stop
;
660 EFI_PXE_BASE_CODE_DHCP Dhcp
;
661 EFI_PXE_BASE_CODE_DISCOVER Discover
;
662 EFI_PXE_BASE_CODE_MTFTP Mtftp
;
663 EFI_PXE_BASE_CODE_UDP_WRITE UdpWrite
;
664 EFI_PXE_BASE_CODE_UDP_READ UdpRead
;
665 EFI_PXE_BASE_CODE_SET_IP_FILTER SetIpFilter
;
666 EFI_PXE_BASE_CODE_ARP Arp
;
667 EFI_PXE_BASE_CODE_SET_PARAMETERS SetParameters
;
668 EFI_PXE_BASE_CODE_SET_STATION_IP SetStationIp
;
669 EFI_PXE_BASE_CODE_SET_PACKETS SetPackets
;
671 /// Pointer to the EFI_PXE_BASE_CODE_MODE data for this device.
673 EFI_PXE_BASE_CODE_MODE
*Mode
;
676 extern EFI_GUID gEfiPxeBaseCodeProtocolGuid
;