]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Include/Protocol/PxeBaseCode.h
add a error macro to prevent this file from included for now #error "UEFI 2.1 HII...
[mirror_edk2.git] / MdePkg / Include / Protocol / PxeBaseCode.h
1 /** @file
2 EFI PXE Base Code Protocol definitions.
3
4 Copyright (c) 2006, Intel Corporation
5 All rights reserved. This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
9
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
13 **/
14 #ifndef __PXE_BASE_CODE_PROTOCOL_H__
15 #define __PXE_BASE_CODE_PROTOCOL_H__
16
17 //
18 // PXE Base Code protocol
19 //
20 #define EFI_PXE_BASE_CODE_PROTOCOL_GUID \
21 { \
22 0x03c4e603, 0xac28, 0x11d3, {0x9a, 0x2d, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \
23 }
24
25 typedef struct _EFI_PXE_BASE_CODE_PROTOCOL EFI_PXE_BASE_CODE_PROTOCOL;
26
27 //
28 // Protocol defined in EFI1.1.
29 //
30 typedef EFI_PXE_BASE_CODE_PROTOCOL EFI_PXE_BASE_CODE;
31
32 //
33 // Default IP TTL and ToS.
34 //
35 #define DEFAULT_TTL 16
36 #define DEFAULT_ToS 0
37
38 //
39 // ICMP error format
40 //
41 typedef struct {
42 UINT8 Type;
43 UINT8 Code;
44 UINT16 Checksum;
45 union {
46 UINT32 reserved;
47 UINT32 Mtu;
48 UINT32 Pointer;
49 struct {
50 UINT16 Identifier;
51 UINT16 Sequence;
52 } Echo;
53 } u;
54 UINT8 Data[494];
55 } EFI_PXE_BASE_CODE_ICMP_ERROR;
56
57 //
58 // TFTP error format
59 //
60 typedef struct {
61 UINT8 ErrorCode;
62 CHAR8 ErrorString[127];
63 } EFI_PXE_BASE_CODE_TFTP_ERROR;
64
65 //
66 // IP Receive Filter definitions
67 //
68 #define EFI_PXE_BASE_CODE_MAX_IPCNT 8
69
70 typedef struct {
71 UINT8 Filters;
72 UINT8 IpCnt;
73 UINT16 reserved;
74 EFI_IP_ADDRESS IpList[EFI_PXE_BASE_CODE_MAX_IPCNT];
75 } EFI_PXE_BASE_CODE_IP_FILTER;
76
77 #define EFI_PXE_BASE_CODE_IP_FILTER_STATION_IP 0x0001
78 #define EFI_PXE_BASE_CODE_IP_FILTER_BROADCAST 0x0002
79 #define EFI_PXE_BASE_CODE_IP_FILTER_PROMISCUOUS 0x0004
80 #define EFI_PXE_BASE_CODE_IP_FILTER_PROMISCUOUS_MULTICAST 0x0008
81
82 //
83 // ARP Cache definitions
84 //
85 typedef struct {
86 EFI_IP_ADDRESS IpAddr;
87 EFI_MAC_ADDRESS MacAddr;
88 } EFI_PXE_BASE_CODE_ARP_ENTRY;
89
90 typedef struct {
91 EFI_IP_ADDRESS IpAddr;
92 EFI_IP_ADDRESS SubnetMask;
93 EFI_IP_ADDRESS GwAddr;
94 } EFI_PXE_BASE_CODE_ROUTE_ENTRY;
95
96 //
97 // UDP definitions
98 //
99 typedef UINT16 EFI_PXE_BASE_CODE_UDP_PORT;
100
101 #define EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_SRC_IP 0x0001
102 #define EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_SRC_PORT 0x0002
103 #define EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_DEST_IP 0x0004
104 #define EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_DEST_PORT 0x0008
105 #define EFI_PXE_BASE_CODE_UDP_OPFLAGS_USE_FILTER 0x0010
106 #define EFI_PXE_BASE_CODE_UDP_OPFLAGS_MAY_FRAGMENT 0x0020
107
108 //
109 // Discover() definitions
110 //
111 #define EFI_PXE_BASE_CODE_BOOT_TYPE_BOOTSTRAP 0
112 #define EFI_PXE_BASE_CODE_BOOT_TYPE_MS_WINNT_RIS 1
113 #define EFI_PXE_BASE_CODE_BOOT_TYPE_INTEL_LCM 2
114 #define EFI_PXE_BASE_CODE_BOOT_TYPE_DOSUNDI 3
115 #define EFI_PXE_BASE_CODE_BOOT_TYPE_NEC_ESMPRO 4
116 #define EFI_PXE_BASE_CODE_BOOT_TYPE_IBM_WSoD 5
117 #define EFI_PXE_BASE_CODE_BOOT_TYPE_IBM_LCCM 6
118 #define EFI_PXE_BASE_CODE_BOOT_TYPE_CA_UNICENTER_TNG 7
119 #define EFI_PXE_BASE_CODE_BOOT_TYPE_HP_OPENVIEW 8
120 #define EFI_PXE_BASE_CODE_BOOT_TYPE_ALTIRIS_9 9
121 #define EFI_PXE_BASE_CODE_BOOT_TYPE_ALTIRIS_10 10
122 #define EFI_PXE_BASE_CODE_BOOT_TYPE_ALTIRIS_11 11
123 #define EFI_PXE_BASE_CODE_BOOT_TYPE_NOT_USED_12 12
124 #define EFI_PXE_BASE_CODE_BOOT_TYPE_REDHAT_INSTALL 13
125 #define EFI_PXE_BASE_CODE_BOOT_TYPE_REDHAT_BOOT 14
126 #define EFI_PXE_BASE_CODE_BOOT_TYPE_REMBO 15
127 #define EFI_PXE_BASE_CODE_BOOT_TYPE_BEOBOOT 16
128 //
129 // 17 through 32767 are reserved
130 // 32768 through 65279 are for vendor use
131 // 65280 through 65534 are reserved
132 //
133 #define EFI_PXE_BASE_CODE_BOOT_TYPE_PXETEST 65535
134
135 #define EFI_PXE_BASE_CODE_BOOT_LAYER_MASK 0x7FFF
136 #define EFI_PXE_BASE_CODE_BOOT_LAYER_INITIAL 0x0000
137
138 //
139 // Discover() server list structure.
140 //
141 typedef struct {
142 UINT16 Type;
143 BOOLEAN AcceptAnyResponse;
144 UINT8 Reserved;
145 EFI_IP_ADDRESS IpAddr;
146 } EFI_PXE_BASE_CODE_SRVLIST;
147
148 //
149 // Discover() information override structure.
150 //
151 typedef struct {
152 BOOLEAN UseMCast;
153 BOOLEAN UseBCast;
154 BOOLEAN UseUCast;
155 BOOLEAN MustUseList;
156 EFI_IP_ADDRESS ServerMCastIp;
157 UINT16 IpCnt;
158 EFI_PXE_BASE_CODE_SRVLIST SrvList[1];
159 } EFI_PXE_BASE_CODE_DISCOVER_INFO;
160
161 //
162 // Mtftp() definitions
163 //
164 typedef enum {
165 EFI_PXE_BASE_CODE_TFTP_FIRST,
166 EFI_PXE_BASE_CODE_TFTP_GET_FILE_SIZE,
167 EFI_PXE_BASE_CODE_TFTP_READ_FILE,
168 EFI_PXE_BASE_CODE_TFTP_WRITE_FILE,
169 EFI_PXE_BASE_CODE_TFTP_READ_DIRECTORY,
170 EFI_PXE_BASE_CODE_MTFTP_GET_FILE_SIZE,
171 EFI_PXE_BASE_CODE_MTFTP_READ_FILE,
172 EFI_PXE_BASE_CODE_MTFTP_READ_DIRECTORY,
173 EFI_PXE_BASE_CODE_MTFTP_LAST
174 } EFI_PXE_BASE_CODE_TFTP_OPCODE;
175
176 typedef struct {
177 EFI_IP_ADDRESS MCastIp;
178 EFI_PXE_BASE_CODE_UDP_PORT CPort;
179 EFI_PXE_BASE_CODE_UDP_PORT SPort;
180 UINT16 ListenTimeout;
181 UINT16 TransmitTimeout;
182 } EFI_PXE_BASE_CODE_MTFTP_INFO;
183
184 //
185 // PXE Base Code Mode structure
186 //
187 #define EFI_PXE_BASE_CODE_MAX_ARP_ENTRIES 8
188 #define EFI_PXE_BASE_CODE_MAX_ROUTE_ENTRIES 8
189
190 typedef struct {
191 BOOLEAN Started;
192 BOOLEAN Ipv6Available;
193 BOOLEAN Ipv6Supported;
194 BOOLEAN UsingIpv6;
195 BOOLEAN BisSupported;
196 BOOLEAN BisDetected;
197 BOOLEAN AutoArp;
198 BOOLEAN SendGUID;
199 BOOLEAN DhcpDiscoverValid;
200 BOOLEAN DhcpAckReceived;
201 BOOLEAN ProxyOfferReceived;
202 BOOLEAN PxeDiscoverValid;
203 BOOLEAN PxeReplyReceived;
204 BOOLEAN PxeBisReplyReceived;
205 BOOLEAN IcmpErrorReceived;
206 BOOLEAN TftpErrorReceived;
207 BOOLEAN MakeCallbacks;
208 UINT8 TTL;
209 UINT8 ToS;
210 EFI_IP_ADDRESS StationIp;
211 EFI_IP_ADDRESS SubnetMask;
212 EFI_PXE_BASE_CODE_PACKET DhcpDiscover;
213 EFI_PXE_BASE_CODE_PACKET DhcpAck;
214 EFI_PXE_BASE_CODE_PACKET ProxyOffer;
215 EFI_PXE_BASE_CODE_PACKET PxeDiscover;
216 EFI_PXE_BASE_CODE_PACKET PxeReply;
217 EFI_PXE_BASE_CODE_PACKET PxeBisReply;
218 EFI_PXE_BASE_CODE_IP_FILTER IpFilter;
219 UINT32 ArpCacheEntries;
220 EFI_PXE_BASE_CODE_ARP_ENTRY ArpCache[EFI_PXE_BASE_CODE_MAX_ARP_ENTRIES];
221 UINT32 RouteTableEntries;
222 EFI_PXE_BASE_CODE_ROUTE_ENTRY RouteTable[EFI_PXE_BASE_CODE_MAX_ROUTE_ENTRIES];
223 EFI_PXE_BASE_CODE_ICMP_ERROR IcmpError;
224 EFI_PXE_BASE_CODE_TFTP_ERROR TftpError;
225 } EFI_PXE_BASE_CODE_MODE;
226
227 //
228 // PXE Base Code Interface Function definitions
229 //
230
231 /**
232 Enables the use of the PXE Base Code Protocol functions.
233
234 @param This Pointer to the EFI_PXE_BASE_CODE_PROTOCOL instance.
235 @param UseIpv6 Specifies the type of IP addresses that are to be used during the session
236 that is being started. Set to TRUE for IPv6 addresses, and FALSE for
237 IPv4 addresses.
238
239 @retval EFI_SUCCESS The PXE Base Code Protocol was started.
240 @retval EFI_DEVICE_ERROR The network device encountered an error during this oper
241 @retval EFI_UNSUPPORTED UseIpv6 is TRUE, but the Ipv6Supported field of the
242 EFI_PXE_BASE_CODE_MODE structure is FALSE.
243 @retval EFI_ALREADY_STARTED The PXE Base Code Protocol is already in the started state.
244 @retval EFI_INVALID_PARAMETER The This parameter is NULL or does not point to a valid
245 EFI_PXE_BASE_CODE_PROTOCOL structure.
246 @retval EFI_OUT_OF_RESOURCES Could not allocate enough memory or other resources to start the
247 PXE Base Code Protocol.
248
249 **/
250 typedef
251 EFI_STATUS
252 (EFIAPI *EFI_PXE_BASE_CODE_START) (
253 IN EFI_PXE_BASE_CODE_PROTOCOL *This,
254 IN BOOLEAN UseIpv6
255 );
256
257 /**
258 Disables the use of the PXE Base Code Protocol functions.
259
260 @param This Pointer to the EFI_PXE_BASE_CODE_PROTOCOL instance.
261
262 @retval EFI_SUCCESS The PXE Base Code Protocol was stopped.
263 @retval EFI_NOT_STARTED The PXE Base Code Protocol is already in the stopped state.
264 @retval EFI_INVALID_PARAMETER The This parameter is NULL or does not point to a valid
265 EFI_PXE_BASE_CODE_PROTOCOL structure.
266 @retval EFI_DEVICE_ERROR The network device encountered an error during this operation.
267
268 **/
269 typedef
270 EFI_STATUS
271 (EFIAPI *EFI_PXE_BASE_CODE_STOP) (
272 IN EFI_PXE_BASE_CODE_PROTOCOL *This
273 );
274
275 /**
276 Attempts to complete a DHCPv4 D.O.R.A. (discover / offer / request / acknowledge) or DHCPv6
277 S.A.R.R (solicit / advertise / request / reply) sequence.
278
279 @param This Pointer to the EFI_PXE_BASE_CODE_PROTOCOL instance.
280 @param SortOffers TRUE if the offers received should be sorted. Set to FALSE to try the
281 offers in the order that they are received.
282
283 @retval EFI_SUCCESS Valid DHCP has completed.
284 @retval EFI_NOT_STARTED The PXE Base Code Protocol is in the stopped state.
285 @retval EFI_INVALID_PARAMETER The This parameter is NULL or does not point to a valid
286 EFI_PXE_BASE_CODE_PROTOCOL structure.
287 @retval EFI_DEVICE_ERROR The network device encountered an error during this operation.
288 @retval EFI_OUT_OF_RESOURCES Could not allocate enough memory to complete the DHCP Protocol.
289 @retval EFI_ABORTED The callback function aborted the DHCP Protocol.
290 @retval EFI_TIMEOUT The DHCP Protocol timed out.
291 @retval EFI_ICMP_ERROR An ICMP error packet was received during the DHCP session.
292 @retval EFI_NO_RESPONSE Valid PXE offer was not received.
293
294 **/
295 typedef
296 EFI_STATUS
297 (EFIAPI *EFI_PXE_BASE_CODE_DHCP) (
298 IN EFI_PXE_BASE_CODE_PROTOCOL *This,
299 IN BOOLEAN SortOffers
300 );
301
302 /**
303 Attempts to complete the PXE Boot Server and/or boot image discovery sequence.
304
305 @param This Pointer to the EFI_PXE_BASE_CODE_PROTOCOL instance.
306 @param Type The type of bootstrap to perform.
307 @param Layer Pointer to the boot server layer number to discover, which must be
308 PXE_BOOT_LAYER_INITIAL when a new server type is being
309 discovered.
310 @param UseBis TRUE if Boot Integrity Services are to be used. FALSE otherwise.
311 @param Info Pointer to a data structure that contains additional information on the
312 type of discovery operation that is to be performed.
313
314 @retval EFI_SUCCESS The Discovery sequence has been completed.
315 @retval EFI_NOT_STARTED The PXE Base Code Protocol is in the stopped state.
316 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
317 @retval EFI_DEVICE_ERROR The network device encountered an error during this operation.
318 @retval EFI_OUT_OF_RESOURCES Could not allocate enough memory to complete Discovery.
319 @retval EFI_ABORTED The callback function aborted the Discovery sequence.
320 @retval EFI_TIMEOUT The Discovery sequence timed out.
321 @retval EFI_ICMP_ERROR An ICMP error packet was received during the PXE discovery
322 session.
323
324 **/
325 typedef
326 EFI_STATUS
327 (EFIAPI *EFI_PXE_BASE_CODE_DISCOVER) (
328 IN EFI_PXE_BASE_CODE_PROTOCOL *This,
329 IN UINT16 Type,
330 IN UINT16 *Layer,
331 IN BOOLEAN UseBis,
332 IN EFI_PXE_BASE_CODE_DISCOVER_INFO *Info OPTIONAL
333 );
334
335 /**
336 Used to perform TFTP and MTFTP services.
337
338 @param This Pointer to the EFI_PXE_BASE_CODE_PROTOCOL instance.
339 @param Operation The type of operation to perform.
340 @param BufferPtr A pointer to the data buffer.
341 @param Overwrite Only used on write file operations. TRUE if a file on a remote server can
342 be overwritten.
343 @param BufferSize For get-file-size operations, *BufferSize returns the size of the
344 requested file.
345 @param BlockSize The requested block size to be used during a TFTP transfer.
346 @param ServerIp The TFTP / MTFTP server IP address.
347 @param Filename A Null-terminated ASCII string that specifies a directory name or a file
348 name.
349 @param Info Pointer to the MTFTP information.
350 @param DontUseBuffer Set to FALSE for normal TFTP and MTFTP read file operation.
351
352 @retval EFI_SUCCESS The TFTP/MTFTP operation was completed.
353 @retval EFI_NOT_STARTED The PXE Base Code Protocol is in the stopped state.
354 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
355 @retval EFI_DEVICE_ERROR The network device encountered an error during this operation.
356 @retval EFI_BUFFER_TOO_SMALL The buffer is not large enough to complete the read operation.
357 @retval EFI_ABORTED The callback function aborted the TFTP/MTFTP operation.
358 @retval EFI_TIMEOUT The TFTP/MTFTP operation timed out.
359 @retval EFI_ICMP_ERROR An ICMP error packet was received during the MTFTP session.
360 @retval EFI_TFTP_ERROR A TFTP error packet was received during the MTFTP session.
361
362 **/
363 typedef
364 EFI_STATUS
365 (EFIAPI *EFI_PXE_BASE_CODE_MTFTP) (
366 IN EFI_PXE_BASE_CODE_PROTOCOL *This,
367 IN EFI_PXE_BASE_CODE_TFTP_OPCODE Operation,
368 IN OUT VOID *BufferPtr OPTIONAL,
369 IN BOOLEAN Overwrite,
370 IN OUT UINT64 *BufferSize,
371 IN UINTN *BlockSize OPTIONAL,
372 IN EFI_IP_ADDRESS *ServerIp,
373 IN UINT8 *Filename OPTIONAL,
374 IN EFI_PXE_BASE_CODE_MTFTP_INFO *Info OPTIONAL,
375 IN BOOLEAN DontUseBuffer
376 );
377
378 /**
379 Writes a UDP packet to the network interface.
380
381 @param This Pointer to the EFI_PXE_BASE_CODE_PROTOCOL instance.
382 @param OpFlags The UDP operation flags.
383 @param DestIp The destination IP address.
384 @param DestPort The destination UDP port number.
385 @param GatewayIp The gateway IP address.
386 @param SrcIp The source IP address.
387 @param SrcPort The source UDP port number.
388 @param HeaderSize An optional field which may be set to the length of a header at
389 HeaderPtr to be prefixed to the data at BufferPtr.
390 @param HeaderPtr If HeaderSize is not NULL, a pointer to a header to be prefixed to the
391 data at BufferPtr.
392 @param BufferSize A pointer to the size of the data at BufferPtr.
393 @param BufferPtr A pointer to the data to be written.
394
395 @retval EFI_SUCCESS The UDP Write operation was completed.
396 @retval EFI_NOT_STARTED The PXE Base Code Protocol is in the stopped state.
397 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
398 @retval EFI_BAD_BUFFER_SIZE The buffer is too long to be transmitted.
399 @retval EFI_ABORTED The callback function aborted the UDP Write operation.
400 @retval EFI_TIMEOUT The UDP Write operation timed out.
401 @retval EFI_ICMP_ERROR An ICMP error packet was received during the UDP write session.
402
403 **/
404 typedef
405 EFI_STATUS
406 (EFIAPI *EFI_PXE_BASE_CODE_UDP_WRITE) (
407 IN EFI_PXE_BASE_CODE_PROTOCOL *This,
408 IN UINT16 OpFlags,
409 IN EFI_IP_ADDRESS *DestIp,
410 IN EFI_PXE_BASE_CODE_UDP_PORT *DestPort,
411 IN EFI_IP_ADDRESS *GatewayIp, OPTIONAL
412 IN EFI_IP_ADDRESS *SrcIp, OPTIONAL
413 IN OUT EFI_PXE_BASE_CODE_UDP_PORT *SrcPort, OPTIONAL
414 IN UINTN *HeaderSize, OPTIONAL
415 IN VOID *HeaderPtr, OPTIONAL
416 IN UINTN *BufferSize,
417 IN VOID *BufferPtr
418 );
419
420 /**
421 Reads a UDP packet from the network interface.
422
423 @param This Pointer to the EFI_PXE_BASE_CODE_PROTOCOL instance.
424 @param OpFlags The UDP operation flags.
425 @param DestIp The destination IP address.
426 @param DestPort The destination UDP port number.
427 @param GatewayIp The gateway IP address.
428 @param SrcIp The source IP address.
429 @param SrcPort The source UDP port number.
430 @param HeaderSize An optional field which may be set to the length of a header at
431 HeaderPtr to be prefixed to the data at BufferPtr.
432 @param HeaderPtr If HeaderSize is not NULL, a pointer to a header to be prefixed to the
433 data at BufferPtr.
434 @param BufferSize A pointer to the size of the data at BufferPtr.
435 @param BufferPtr A pointer to the data to be read.
436
437 @retval EFI_SUCCESS The UDP Write operation was completed.
438 @retval EFI_NOT_STARTED The PXE Base Code Protocol is in the stopped state.
439 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
440 @retval EFI_DEVICE_ERROR The network device encountered an error during this operation.
441 @retval EFI_BUFFER_TOO_SMALL The packet is larger than Buffer can hold.
442 @retval EFI_ABORTED The callback function aborted the UDP Read operation.
443 @retval EFI_TIMEOUT The UDP Read operation timed out.
444
445 **/
446 typedef
447 EFI_STATUS
448 (EFIAPI *EFI_PXE_BASE_CODE_UDP_READ) (
449 IN EFI_PXE_BASE_CODE_PROTOCOL *This,
450 IN UINT16 OpFlags,
451 IN OUT EFI_IP_ADDRESS *DestIp, OPTIONAL
452 IN OUT EFI_PXE_BASE_CODE_UDP_PORT *DestPort, OPTIONAL
453 IN OUT EFI_IP_ADDRESS *SrcIp, OPTIONAL
454 IN OUT EFI_PXE_BASE_CODE_UDP_PORT *SrcPort, OPTIONAL
455 IN UINTN *HeaderSize, OPTIONAL
456 IN VOID *HeaderPtr, OPTIONAL
457 IN OUT UINTN *BufferSize,
458 IN VOID *BufferPtr
459 );
460
461 /**
462 Updates the IP receive filters of a network device and enables software filtering.
463
464 @param This Pointer to the EFI_PXE_BASE_CODE_PROTOCOL instance.
465 @param NewFilter Pointer to the new set of IP receive filters.
466
467 @retval EFI_SUCCESS The IP receive filter settings were updated.
468 @retval EFI_NOT_STARTED The PXE Base Code Protocol is in the stopped state.
469 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
470
471 **/
472 typedef
473 EFI_STATUS
474 (EFIAPI *EFI_PXE_BASE_CODE_SET_IP_FILTER) (
475 IN EFI_PXE_BASE_CODE_PROTOCOL *This,
476 IN EFI_PXE_BASE_CODE_IP_FILTER *NewFilter
477 );
478
479 /**
480 Uses the ARP protocol to resolve a MAC address.
481
482 @param This Pointer to the EFI_PXE_BASE_CODE_PROTOCOL instance.
483 @param IpAddr Pointer to the IP address that is used to resolve a MAC address.
484 @param MacAddr If not NULL, a pointer to the MAC address that was resolved with the
485 ARP protocol.
486
487 @retval EFI_SUCCESS The IP or MAC address was resolved.
488 @retval EFI_NOT_STARTED The PXE Base Code Protocol is in the stopped state.
489 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
490 @retval EFI_DEVICE_ERROR The network device encountered an error during this operation.
491 @retval EFI_ABORTED The callback function aborted the ARP Protocol.
492 @retval EFI_TIMEOUT The ARP Protocol encountered a timeout condition.
493
494 **/
495 typedef
496 EFI_STATUS
497 (EFIAPI *EFI_PXE_BASE_CODE_ARP) (
498 IN EFI_PXE_BASE_CODE_PROTOCOL *This,
499 IN EFI_IP_ADDRESS *IpAddr,
500 IN EFI_MAC_ADDRESS *MacAddr OPTIONAL
501 );
502
503 /**
504 Updates the parameters that affect the operation of the PXE Base Code Protocol.
505
506 @param This Pointer to the EFI_PXE_BASE_CODE_PROTOCOL instance.
507 @param NewAutoArp If not NULL, a pointer to a value that specifies whether to replace the
508 current value of AutoARP.
509 @param NewSendGUID If not NULL, a pointer to a value that specifies whether to replace the
510 current value of SendGUID.
511 @param NewTTL If not NULL, a pointer to be used in place of the current value of TTL,
512 the "time to live" field of the IP header.
513 @param NewToS If not NULL, a pointer to be used in place of the current value of ToS,
514 the "type of service" field of the IP header.
515 @param NewMakeCallback If not NULL, a pointer to a value that specifies whether to replace the
516 current value of the MakeCallback field of the Mode structure.
517
518 @retval EFI_SUCCESS The new parameters values 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.
521
522 **/
523 typedef
524 EFI_STATUS
525 (EFIAPI *EFI_PXE_BASE_CODE_SET_PARAMETERS) (
526 IN EFI_PXE_BASE_CODE_PROTOCOL *This,
527 IN BOOLEAN *NewAutoArp, OPTIONAL
528 IN BOOLEAN *NewSendGUID, OPTIONAL
529 IN UINT8 *NewTTL, OPTIONAL
530 IN UINT8 *NewToS, OPTIONAL
531 IN BOOLEAN *NewMakeCallback OPTIONAL
532 );
533
534 /**
535 Updates the station IP address and/or subnet mask values of a network device.
536
537 @param This Pointer to the EFI_PXE_BASE_CODE_PROTOCOL instance.
538 @param NewStationIp Pointer to the new IP address to be used by the network device.
539 @param NewSubnetMask Pointer to the new subnet mask to be used by the network device.
540
541 @retval EFI_SUCCESS The new station IP address and/or subnet mask were updated.
542 @retval EFI_NOT_STARTED The PXE Base Code Protocol is in the stopped state.
543 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
544
545 **/
546 typedef
547 EFI_STATUS
548 (EFIAPI *EFI_PXE_BASE_CODE_SET_STATION_IP) (
549 IN EFI_PXE_BASE_CODE_PROTOCOL *This,
550 IN EFI_IP_ADDRESS *NewStationIp, OPTIONAL
551 IN EFI_IP_ADDRESS *NewSubnetMask OPTIONAL
552 );
553
554 /**
555 Updates the contents of the cached DHCP and Discover packets.
556
557 @param This Pointer to the EFI_PXE_BASE_CODE_PROTOCOL instance.
558 @param NewDhcpDiscoverValid Pointer to a value that will replace the current
559 DhcpDiscoverValid field.
560 @param NewDhcpAckReceived Pointer to a value that will replace the current
561 DhcpAckReceived field.
562 @param NewProxyOfferReceived Pointer to a value that will replace the current
563 ProxyOfferReceived field.
564 @param NewPxeDiscoverValid Pointer to a value that will replace the current
565 ProxyOfferReceived field.
566 @param NewPxeReplyReceived Pointer to a value that will replace the current
567 PxeReplyReceived field.
568 @param NewPxeBisReplyReceived Pointer to a value that will replace the current
569 PxeBisReplyReceived field.
570 @param NewDhcpDiscover Pointer to the new cached DHCP Discover packet contents.
571 @param NewDhcpAck Pointer to the new cached DHCP Ack packet contents.
572 @param NewProxyOffer Pointer to the new cached Proxy Offer packet contents.
573 @param NewPxeDiscover Pointer to the new cached PXE Discover packet contents.
574 @param NewPxeReply Pointer to the new cached PXE Reply packet contents.
575 @param NewPxeBisReply Pointer to the new cached PXE BIS Reply packet contents.
576
577 @retval EFI_SUCCESS The cached packet contents were updated.
578 @retval EFI_NOT_STARTED The PXE Base Code Protocol is in the stopped state.
579 @retval EFI_INVALID_PARAMETER This is NULL or not point to a valid EFI_PXE_BASE_CODE_PROTOCOL structure.
580
581 **/
582 typedef
583 EFI_STATUS
584 (EFIAPI *EFI_PXE_BASE_CODE_SET_PACKETS) (
585 IN EFI_PXE_BASE_CODE_PROTOCOL *This,
586 BOOLEAN *NewDhcpDiscoverValid, OPTIONAL
587 BOOLEAN *NewDhcpAckReceived, OPTIONAL
588 BOOLEAN *NewProxyOfferReceived, OPTIONAL
589 BOOLEAN *NewPxeDiscoverValid, OPTIONAL
590 BOOLEAN *NewPxeReplyReceived, OPTIONAL
591 BOOLEAN *NewPxeBisReplyReceived, OPTIONAL
592 IN EFI_PXE_BASE_CODE_PACKET *NewDhcpDiscover, OPTIONAL
593 IN EFI_PXE_BASE_CODE_PACKET *NewDhcpAck, OPTIONAL
594 IN EFI_PXE_BASE_CODE_PACKET *NewProxyOffer, OPTIONAL
595 IN EFI_PXE_BASE_CODE_PACKET *NewPxeDiscover, OPTIONAL
596 IN EFI_PXE_BASE_CODE_PACKET *NewPxeReply, OPTIONAL
597 IN EFI_PXE_BASE_CODE_PACKET *NewPxeBisReply OPTIONAL
598 );
599
600 //
601 // PXE Base Code Protocol structure
602 //
603 #define EFI_PXE_BASE_CODE_PROTOCOL_REVISION 0x00010000
604
605 //
606 // Revision defined in EFI1.1
607 //
608 #define EFI_PXE_BASE_CODE_INTERFACE_REVISION EFI_PXE_BASE_CODE_PROTOCOL_REVISION
609
610 struct _EFI_PXE_BASE_CODE_PROTOCOL {
611 UINT64 Revision;
612 EFI_PXE_BASE_CODE_START Start;
613 EFI_PXE_BASE_CODE_STOP Stop;
614 EFI_PXE_BASE_CODE_DHCP Dhcp;
615 EFI_PXE_BASE_CODE_DISCOVER Discover;
616 EFI_PXE_BASE_CODE_MTFTP Mtftp;
617 EFI_PXE_BASE_CODE_UDP_WRITE UdpWrite;
618 EFI_PXE_BASE_CODE_UDP_READ UdpRead;
619 EFI_PXE_BASE_CODE_SET_IP_FILTER SetIpFilter;
620 EFI_PXE_BASE_CODE_ARP Arp;
621 EFI_PXE_BASE_CODE_SET_PARAMETERS SetParameters;
622 EFI_PXE_BASE_CODE_SET_STATION_IP SetStationIp;
623 EFI_PXE_BASE_CODE_SET_PACKETS SetPackets;
624 EFI_PXE_BASE_CODE_MODE *Mode;
625 };
626
627 extern EFI_GUID gEfiPxeBaseCodeProtocolGuid;
628
629 #endif