]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcDhcp.h
Use default UNDI information if NII protocol not exists.
[mirror_edk2.git] / MdeModulePkg / Universal / Network / UefiPxeBcDxe / PxeBcDhcp.h
1 /** @file
2 Dhcp and Discover routines for PxeBc.
3
4 Copyright (c) 2007 - 2009, Intel Corporation.<BR>
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
15 #ifndef __EFI_PXEBC_DHCP_H__
16 #define __EFI_PXEBC_DHCP_H__
17
18 typedef enum {
19 PXEBC_DHCP4_MAX_OPTION_NUM = 16,
20 PXEBC_DHCP4_MAX_OPTION_SIZE = 312,
21 PXEBC_DHCP4_MAX_PACKET_SIZE = 1472,
22
23 PXEBC_DHCP4_S_PORT = 67,
24 PXEBC_DHCP4_C_PORT = 68,
25 PXEBC_BS_DOWNLOAD_PORT = 69,
26 PXEBC_BS_DISCOVER_PORT = 4011,
27
28 PXEBC_DHCP4_OPCODE_REQUEST = 1,
29 PXEBC_DHCP4_OPCODE_REPLY = 2,
30 PXEBC_DHCP4_MSG_TYPE_REQUEST = 3,
31 PXEBC_DHCP4_MAGIC = 0x63538263, // network byte order
32 //
33 // Dhcp Options
34 //
35 PXEBC_DHCP4_TAG_PAD = 0, // Pad Option
36 PXEBC_DHCP4_TAG_EOP = 255, // End Option
37 PXEBC_DHCP4_TAG_NETMASK = 1, // Subnet Mask
38 PXEBC_DHCP4_TAG_TIME_OFFSET = 2, // Time Offset from UTC
39 PXEBC_DHCP4_TAG_ROUTER = 3, // Router option,
40 PXEBC_DHCP4_TAG_TIME_SERVER = 4, // Time Server
41 PXEBC_DHCP4_TAG_NAME_SERVER = 5, // Name Server
42 PXEBC_DHCP4_TAG_DNS_SERVER = 6, // Domain Name Server
43 PXEBC_DHCP4_TAG_HOSTNAME = 12, // Host Name
44 PXEBC_DHCP4_TAG_BOOTFILE_LEN = 13, // Boot File Size
45 PXEBC_DHCP4_TAG_DUMP = 14, // Merit Dump File
46 PXEBC_DHCP4_TAG_DOMAINNAME = 15, // Domain Name
47 PXEBC_DHCP4_TAG_ROOTPATH = 17, // Root path
48 PXEBC_DHCP4_TAG_EXTEND_PATH = 18, // Extensions Path
49 PXEBC_DHCP4_TAG_EMTU = 22, // Maximum Datagram Reassembly Size
50 PXEBC_DHCP4_TAG_TTL = 23, // Default IP Time-to-live
51 PXEBC_DHCP4_TAG_BROADCAST = 28, // Broadcast Address
52 PXEBC_DHCP4_TAG_NIS_DOMAIN = 40, // Network Information Service Domain
53 PXEBC_DHCP4_TAG_NIS_SERVER = 41, // Network Information Servers
54 PXEBC_DHCP4_TAG_NTP_SERVER = 42, // Network Time Protocol Servers
55 PXEBC_DHCP4_TAG_VENDOR = 43, // Vendor Specific Information
56 PXEBC_DHCP4_TAG_REQUEST_IP = 50, // Requested IP Address
57 PXEBC_DHCP4_TAG_LEASE = 51, // IP Address Lease Time
58 PXEBC_DHCP4_TAG_OVERLOAD = 52, // Option Overload
59 PXEBC_DHCP4_TAG_MSG_TYPE = 53, // DHCP Message Type
60 PXEBC_DHCP4_TAG_SERVER_ID = 54, // Server Identifier
61 PXEBC_DHCP4_TAG_PARA_LIST = 55, // Parameter Request List
62 PXEBC_DHCP4_TAG_MAXMSG = 57, // Maximum DHCP Message Size
63 PXEBC_DHCP4_TAG_T1 = 58, // Renewal (T1) Time Value
64 PXEBC_DHCP4_TAG_T2 = 59, // Rebinding (T2) Time Value
65 PXEBC_DHCP4_TAG_CLASS_ID = 60, // Vendor class identifier
66 PXEBC_DHCP4_TAG_CLIENT_ID = 61, // Client-identifier
67 PXEBC_DHCP4_TAG_TFTP = 66, // TFTP server name
68 PXEBC_DHCP4_TAG_BOOTFILE = 67, // Bootfile name
69 PXEBC_PXE_DHCP4_TAG_ARCH = 93,
70 PXEBC_PXE_DHCP4_TAG_UNDI = 94,
71 PXEBC_PXE_DHCP4_TAG_UUID = 97,
72 //
73 // Sub-Options in Dhcp Vendor Option
74 //
75 PXEBC_VENDOR_TAG_MTFTP_IP = 1,
76 PXEBC_VENDOR_TAG_MTFTP_CPORT = 2,
77 PXEBC_VENDOR_TAG_MTFTP_SPORT = 3,
78 PXEBC_VENDOR_TAG_MTFTP_TIMEOUT = 4,
79 PXEBC_VENDOR_TAG_MTFTP_DELAY = 5,
80 PXEBC_VENDOR_TAG_DISCOVER_CTRL = 6,
81 PXEBC_VENDOR_TAG_DISCOVER_MCAST = 7,
82 PXEBC_VENDOR_TAG_BOOT_SERVERS = 8,
83 PXEBC_VENDOR_TAG_BOOT_MENU = 9,
84 PXEBC_VENDOR_TAG_MENU_PROMPT = 10,
85 PXEBC_VENDOR_TAG_MCAST_ALLOC = 11,
86 PXEBC_VENDOR_TAG_CREDENTIAL_TYPES = 12,
87 PXEBC_VENDOR_TAG_BOOT_ITEM = 71,
88
89 PXEBC_DHCP4_DISCOVER_INIT_TIMEOUT = 4,
90 PXEBC_DHCP4_DISCOVER_RETRIES = 4,
91
92 PXEBC_MAX_MENU_NUM = 24,
93 PXEBC_MAX_OFFER_NUM = 16,
94
95 PXEBC_BOOT_REQUEST_TIMEOUT = 1,
96 PXEBC_BOOT_REQUEST_RETRIES = 4,
97
98 PXEBC_DHCP4_OVERLOAD_FILE = 1,
99 PXEBC_DHCP4_OVERLOAD_SERVER_NAME = 2
100 } PXEBC_ENUM_TYPES;
101
102 //
103 // The array index of the DHCP4 option tag interested
104 //
105 typedef enum {
106 PXEBC_DHCP4_TAG_INDEX_BOOTFILE_LEN,
107 PXEBC_DHCP4_TAG_INDEX_VENDOR,
108 PXEBC_DHCP4_TAG_INDEX_OVERLOAD,
109 PXEBC_DHCP4_TAG_INDEX_MSG_TYPE,
110 PXEBC_DHCP4_TAG_INDEX_SERVER_ID,
111 PXEBC_DHCP4_TAG_INDEX_CLASS_ID,
112 PXEBC_DHCP4_TAG_INDEX_BOOTFILE,
113 PXEBC_DHCP4_TAG_INDEX_MAX
114 } PXEBC_DHCP4_TAG_INDEX_ENUM_TYPES;
115
116 //
117 // The type of DHCP OFFER, arranged by priority, PXE10 has the highest priority.
118 //
119 typedef enum {
120 DHCP4_PACKET_TYPE_PXE10,
121 DHCP4_PACKET_TYPE_WFM11A,
122 DHCP4_PACKET_TYPE_BINL,
123 DHCP4_PACKET_TYPE_DHCP_ONLY,
124 DHCP4_PACKET_TYPE_MAX,
125 DHCP4_PACKET_TYPE_BOOTP = DHCP4_PACKET_TYPE_MAX
126 } DHCP4_PACKET_TYPE_ENUM_TYPES;
127
128 #define BIT(x) (1 << x)
129 #define CTRL(x) (0x1F & (x))
130
131 //
132 // WfM11a options
133 //
134 #define MTFTP_VENDOR_OPTION_BIT_MAP (BIT (PXEBC_VENDOR_TAG_MTFTP_IP) | \
135 BIT (PXEBC_VENDOR_TAG_MTFTP_CPORT) | \
136 BIT (PXEBC_VENDOR_TAG_MTFTP_SPORT) | \
137 BIT (PXEBC_VENDOR_TAG_MTFTP_TIMEOUT) | \
138 BIT (PXEBC_VENDOR_TAG_MTFTP_DELAY))
139 //
140 // Discoverty options
141 //
142 #define DISCOVER_VENDOR_OPTION_BIT_MAP (BIT (PXEBC_VENDOR_TAG_DISCOVER_CTRL) | \
143 BIT (PXEBC_VENDOR_TAG_DISCOVER_MCAST) | \
144 BIT (PXEBC_VENDOR_TAG_BOOT_SERVERS) | \
145 BIT (PXEBC_VENDOR_TAG_BOOT_MENU) | \
146 BIT (PXEBC_VENDOR_TAG_MENU_PROMPT))
147
148 #define IS_VALID_BOOT_PROMPT(x) \
149 ((((x)[0]) & BIT (PXEBC_VENDOR_TAG_MENU_PROMPT)) == BIT (PXEBC_VENDOR_TAG_MENU_PROMPT))
150
151 #define IS_VALID_BOOT_MENU(x) \
152 ((((x)[0]) & BIT (PXEBC_VENDOR_TAG_BOOT_MENU)) == BIT (PXEBC_VENDOR_TAG_BOOT_MENU))
153
154 #define IS_VALID_MTFTP_VENDOR_OPTION(x) \
155 (((UINT32) ((x)[0]) & MTFTP_VENDOR_OPTION_BIT_MAP) == MTFTP_VENDOR_OPTION_BIT_MAP)
156
157 #define IS_VALID_DISCOVER_VENDOR_OPTION(x) (((UINT32) ((x)[0]) & DISCOVER_VENDOR_OPTION_BIT_MAP) != 0)
158
159 #define IS_VALID_CREDENTIAL_VENDOR_OPTION(x) \
160 (((UINT32) ((x)[0]) & BIT (PXEBC_VENDOR_TAG_CREDENTIAL_TYPES)) == BIT (PXEBC_VENDOR_TAG_CREDENTIAL_TYPES))
161
162 #define IS_VALID_BOOTITEM_VENDOR_OPTION(x) \
163 (((UINT32) ((x)[PXEBC_VENDOR_TAG_BOOT_ITEM / 32]) & BIT (PXEBC_VENDOR_TAG_BOOT_ITEM % 32)) \
164 == BIT (PXEBC_VENDOR_TAG_BOOT_ITEM % 32))
165
166 #define IS_DISABLE_BCAST_DISCOVER(x) (((x) & BIT (0)) == BIT (0))
167 #define IS_DISABLE_MCAST_DISCOVER(x) (((x) & BIT (1)) == BIT (1))
168 #define IS_ENABLE_USE_SERVER_LIST(x) (((x) & BIT (2)) == BIT (2))
169 #define IS_ENABLE_BOOT_FILE_NAME(x) (((x) & BIT (3)) == BIT (3))
170
171 #define SET_VENDOR_OPTION_BIT_MAP(x, y) (((x)[(y) / 32]) = (UINT32) ((x)[(y) / 32]) | BIT ((y) % 32))
172
173 #pragma pack(1)
174 typedef struct {
175 UINT8 ParaList[135];
176 } PXEBC_DHCP4_OPTION_PARA;
177
178 typedef struct {
179 UINT16 Size;
180 } PXEBC_DHCP4_OPTION_MAX_MESG_SIZE;
181
182 typedef struct {
183 UINT8 Type;
184 UINT8 MajorVer;
185 UINT8 MinorVer;
186 } PXEBC_DHCP4_OPTION_UNDI;
187
188 typedef struct {
189 UINT8 Type;
190 } PXEBC_DHCP4_OPTION_MESG;
191
192 typedef struct {
193 UINT16 Type;
194 } PXEBC_DHCP4_OPTION_ARCH;
195
196 #define DEFAULT_CLASS_ID_DATA "PXEClient:Arch:xxxxx:UNDI:003000"
197 #define DEFAULT_UNDI_TYPE 1
198 #define DEFAULT_UNDI_MAJOR 3
199 #define DEFAULT_UNDI_MINOR 0
200
201 typedef struct {
202 UINT8 ClassIdentifier[10];
203 UINT8 ArchitecturePrefix[5];
204 UINT8 ArchitectureType[5];
205 UINT8 Lit3[1];
206 UINT8 InterfaceName[4];
207 UINT8 Lit4[1];
208 UINT8 UndiMajor[3];
209 UINT8 UndiMinor[3];
210 } PXEBC_DHCP4_OPTION_CLID;
211
212 typedef struct {
213 UINT8 Type;
214 UINT8 Guid[16];
215 } PXEBC_DHCP4_OPTION_UUID;
216
217 typedef struct {
218 UINT16 Type;
219 UINT16 Layer;
220 } PXEBC_OPTION_BOOT_ITEM;
221
222 #pragma pack()
223
224 typedef union {
225 PXEBC_DHCP4_OPTION_PARA *Para;
226 PXEBC_DHCP4_OPTION_UNDI *Undi;
227 PXEBC_DHCP4_OPTION_ARCH *Arch;
228 PXEBC_DHCP4_OPTION_CLID *Clid;
229 PXEBC_DHCP4_OPTION_UUID *Uuid;
230 PXEBC_DHCP4_OPTION_MESG *Mesg;
231 PXEBC_DHCP4_OPTION_MAX_MESG_SIZE *MaxMesgSize;
232 } PXEBC_DHCP4_OPTION_ENTRY;
233
234 typedef struct {
235 UINT16 Type;
236 UINT8 IpCnt;
237 EFI_IPv4_ADDRESS IpAddr[1];
238 } PXEBC_BOOT_SVR_ENTRY;
239
240 typedef struct {
241 UINT16 Type;
242 UINT8 DescLen;
243 UINT8 DescStr[1];
244 } PXEBC_BOOT_MENU_ENTRY;
245
246 typedef struct {
247 UINT8 Timeout;
248 UINT8 Prompt[1];
249 } PXEBC_MENU_PROMPT;
250
251 typedef struct {
252 UINT32 BitMap[8];
253 EFI_IPv4_ADDRESS MtftpIp;
254 UINT16 MtftpCPort;
255 UINT16 MtftpSPort;
256 UINT8 MtftpTimeout;
257 UINT8 MtftpDelay;
258 UINT8 DiscoverCtrl;
259 EFI_IPv4_ADDRESS DiscoverMcastIp;
260 EFI_IPv4_ADDRESS McastIpBase;
261 UINT16 McastIpBlock;
262 UINT16 McastIpRange;
263 UINT16 BootSrvType;
264 UINT16 BootSrvLayer;
265 PXEBC_BOOT_SVR_ENTRY *BootSvr;
266 UINT8 BootSvrLen;
267 PXEBC_BOOT_MENU_ENTRY *BootMenu;
268 UINT8 BootMenuLen;
269 PXEBC_MENU_PROMPT *MenuPrompt;
270 UINT8 MenuPromptLen;
271 UINT32 *CredType;
272 UINT8 CredTypeLen;
273 } PXEBC_VENDOR_OPTION;
274
275 #define PXEBC_CACHED_DHCP4_PACKET_MAX_SIZE (OFFSET_OF (EFI_DHCP4_PACKET, Dhcp4) + PXEBC_DHCP4_MAX_PACKET_SIZE)
276
277 typedef struct {
278 union {
279 EFI_DHCP4_PACKET Offer;
280 EFI_DHCP4_PACKET Ack;
281 UINT8 Buffer[PXEBC_CACHED_DHCP4_PACKET_MAX_SIZE];
282 } Packet;
283
284 BOOLEAN IsPxeOffer;
285 UINT8 OfferType;
286 EFI_DHCP4_PACKET_OPTION *Dhcp4Option[PXEBC_DHCP4_TAG_INDEX_MAX];
287 PXEBC_VENDOR_OPTION PxeVendorOption;
288 } PXEBC_CACHED_DHCP4_PACKET;
289
290 #define GET_NEXT_DHCP_OPTION(Opt) \
291 (EFI_DHCP4_PACKET_OPTION *) ((UINT8 *) (Opt) + sizeof (EFI_DHCP4_PACKET_OPTION) + (Opt)->Length - 1)
292
293 #define GET_OPTION_BUFFER_LEN(Pkt) ((Pkt)->Length - sizeof (EFI_DHCP4_HEADER) - 4)
294 #define IS_PROXY_DHCP_OFFER(Offer) EFI_IP4_EQUAL (&((Offer)->Dhcp4.Header.YourAddr), &mZeroIp4Addr)
295
296 #define GET_NEXT_BOOT_SVR_ENTRY(Ent) \
297 (PXEBC_BOOT_SVR_ENTRY *) ((UINT8 *) Ent + sizeof (*(Ent)) + ((Ent)->IpCnt - 1) * sizeof (EFI_IPv4_ADDRESS))
298
299
300 /**
301 This function initialize the DHCP4 message instance.
302
303 This function will pad each item of dhcp4 message packet.
304
305 @param Seed Pointer to the message instance of the DHCP4 packet.
306 @param Udp4 Pointer to the EFI_UDP4_PROTOCOL instance.
307
308 @return none.
309
310 **/
311 VOID
312 PxeBcInitSeedPacket (
313 IN EFI_DHCP4_PACKET *Seed,
314 IN EFI_UDP4_PROTOCOL *Udp4
315 );
316
317
318 /**
319 Parse the cached dhcp packet.
320
321 @param CachedPacket Pointer to cached dhcp packet.
322
323 @retval TRUE Succeed to parse and validation.
324 @retval FALSE Fail to parse or validation.
325
326 **/
327 BOOLEAN
328 PxeBcParseCachedDhcpPacket (
329 IN PXEBC_CACHED_DHCP4_PACKET *CachedPacket
330 );
331
332 /**
333 This function is to check the selected proxy offer (include BINL dhcp offer and
334 DHCP_ONLY offer ) and set the flag and copy the DHCP packets to the Pxe base code
335 mode structure.
336
337 @param Private Pointer to PxeBc private data.
338
339 @retval EFI_SUCCESS Operational successful.
340 @retval EFI_NO_RESPONSE Offer dhcp service failed.
341
342 **/
343 EFI_STATUS
344 PxeBcCheckSelectedOffer (
345 IN PXEBC_PRIVATE_DATA *Private
346 );
347
348
349 /**
350 Callback routine.
351
352 EFI_DHCP4_CALLBACK is provided by the consumer of the EFI DHCPv4 Protocol driver
353 to intercept events that occurred in the configuration process. This structure
354 provides advanced control of each state transition of the DHCP process. The
355 returned status code determines the behavior of the EFI DHCPv4 Protocol driver.
356 There are three possible returned values, which are described in the following
357 table.
358
359 @param This Pointer to the EFI DHCPv4 Protocol instance that is used to
360 configure this callback function.
361 @param Context Pointer to the context that is initialized by
362 EFI_DHCP4_PROTOCOL.Configure().
363 @param CurrentState The current operational state of the EFI DHCPv4 Protocol
364 driver.
365 @param Dhcp4Event The event that occurs in the current state, which usually means a
366 state transition.
367 @param Packet The DHCP packet that is going to be sent or already received.
368 @param NewPacket The packet that is used to replace the above Packet.
369
370 @retval EFI_SUCCESS Tells the EFI DHCPv4 Protocol driver to continue the DHCP process.
371 @retval EFI_NOT_READY Only used in the Dhcp4Selecting state. The EFI DHCPv4 Protocol
372 driver will continue to wait for more DHCPOFFER packets until the retry
373 timeout expires.
374 @retval EFI_ABORTED Tells the EFI DHCPv4 Protocol driver to abort the current process and
375 return to the Dhcp4Init or Dhcp4InitReboot state.
376
377 **/
378 EFI_STATUS
379 EFIAPI
380 PxeBcDhcpCallBack (
381 IN EFI_DHCP4_PROTOCOL * This,
382 IN VOID *Context,
383 IN EFI_DHCP4_STATE CurrentState,
384 IN EFI_DHCP4_EVENT Dhcp4Event,
385 IN EFI_DHCP4_PACKET * Packet OPTIONAL,
386 OUT EFI_DHCP4_PACKET **NewPacket OPTIONAL
387 );
388
389
390 /**
391 Discover the boot of service and initialize the vendor option if exists.
392
393 @param Private Pointer to PxeBc private data.
394 @param Type PxeBc option boot item type
395 @param Layer PxeBc option boot item layer
396 @param UseBis Use BIS or not
397 @param DestIp Ip address for server
398 @param IpCount The total count of the server ip address
399 @param SrvList Server list
400 @param IsDiscv Discover the vendor or not
401 @param Reply The dhcp4 packet of Pxe reply
402
403 @retval EFI_SUCCESS Operation succeeds.
404 @retval EFI_OUT_OF_RESOURCES Allocate memory pool failed.
405 @retval EFI_NOT_FOUND There is no vendor option exists.
406 @retval EFI_TIMEOUT Send Pxe Discover time out.
407
408 **/
409 EFI_STATUS
410 PxeBcDiscvBootService (
411 IN PXEBC_PRIVATE_DATA * Private,
412 IN UINT16 Type,
413 IN UINT16 *Layer,
414 IN BOOLEAN UseBis,
415 IN EFI_IP_ADDRESS * DestIp,
416 IN UINT16 IpCount,
417 IN EFI_PXE_BASE_CODE_SRVLIST * SrvList,
418 IN BOOLEAN IsDiscv,
419 OUT EFI_DHCP4_PACKET * Reply OPTIONAL
420 );
421
422
423 /**
424 Initialize the DHCP options and build the option list.
425
426 @param Private Pointer to PxeBc private data.
427 @param OptList Pointer to a DHCP option list.
428
429 @param IsDhcpDiscover Discover dhcp option or not.
430
431 @return The index item number of the option list.
432
433 **/
434 UINT32
435 PxeBcBuildDhcpOptions (
436 IN PXEBC_PRIVATE_DATA *Private,
437 IN EFI_DHCP4_PACKET_OPTION **OptList,
438 IN BOOLEAN IsDhcpDiscover
439 );
440
441
442 /**
443 Create the boot options
444
445 @param OptList Pointer to the list of the options
446 @param Type the type of option
447 @param Layer the layer of the boot options
448 @param OptLen length of opotion
449
450 @return None.
451
452 **/
453 VOID
454 PxeBcCreateBootOptions (
455 IN EFI_DHCP4_PACKET_OPTION *OptList,
456 IN UINT16 Type,
457 IN UINT16 *Layer,
458 OUT UINT32 *OptLen
459 );
460
461
462 /**
463 Parse interested dhcp options.
464
465 @param Buffer Pointer to the dhcp options packet.
466 @param Length The length of the dhcp options.
467 @param OptTag The option OpCode.
468
469 @return NULL if the buffer length is 0 and OpCode is not
470 PXEBC_DHCP4_TAG_EOP, or the pointer to the buffer.
471
472 **/
473 EFI_DHCP4_PACKET_OPTION *
474 PxeBcParseExtendOptions (
475 IN UINT8 *Buffer,
476 IN UINT32 Length,
477 IN UINT8 OptTag
478 );
479
480
481 /**
482 This function is to parse and check vendor options.
483
484 @param Dhcp4Option Pointer to dhcp options
485 @param VendorOption Pointer to vendor options
486
487 @return TRUE if valid for vendor options, or FALSE.
488
489 **/
490 BOOLEAN
491 PxeBcParseVendorOptions (
492 IN EFI_DHCP4_PACKET_OPTION *Dhcp4Option,
493 IN PXEBC_VENDOR_OPTION *VendorOption
494 );
495
496
497 /**
498 Choose the boot prompt.
499
500 @param Private Pointer to PxeBc private data.
501
502 @retval EFI_SUCCESS Select boot prompt done.
503 @retval EFI_TIMEOUT Select boot prompt time out.
504 @retval EFI_NOT_FOUND The proxy offer is not Pxe10.
505 @retval EFI_ABORTED User cancel the operation.
506 @retval EFI_NOT_READY Read the input key from the keybroad has not finish.
507
508 **/
509 EFI_STATUS
510 PxeBcSelectBootPrompt (
511 IN PXEBC_PRIVATE_DATA *Private
512 );
513
514
515 /**
516 Select the boot menu.
517
518 @param Private Pointer to PxeBc private data.
519 @param Type The type of the menu.
520 @param UseDefaultItem Use default item or not.
521
522 @retval EFI_ABORTED User cancel operation.
523 @retval EFI_SUCCESS Select the boot menu success.
524 @retval EFI_NOT_READY Read the input key from the keybroad has not finish.
525
526 **/
527 EFI_STATUS
528 PxeBcSelectBootMenu (
529 IN PXEBC_PRIVATE_DATA *Private,
530 OUT UINT16 *Type,
531 IN BOOLEAN UseDefaultItem
532 );
533
534 #endif
535