]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcDhcp.h
Fix various 'EFIAPI' inconsistencies found while building MdeModulePkg.
[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:?????:????:??????"
197
198 typedef struct {
199 UINT8 ClassIdentifier[10];
200 UINT8 ArchitecturePrefix[5];
201 UINT8 ArchitectureType[5];
202 UINT8 Lit3[1];
203 UINT8 InterfaceName[4];
204 UINT8 Lit4[1];
205 UINT8 UndiMajor[3];
206 UINT8 UndiMinor[3];
207 } PXEBC_DHCP4_OPTION_CLID;
208
209 typedef struct {
210 UINT8 Type;
211 UINT8 Guid[16];
212 } PXEBC_DHCP4_OPTION_UUID;
213
214 typedef struct {
215 UINT16 Type;
216 UINT16 Layer;
217 } PXEBC_OPTION_BOOT_ITEM;
218
219 #pragma pack()
220
221 typedef union {
222 PXEBC_DHCP4_OPTION_PARA *Para;
223 PXEBC_DHCP4_OPTION_UNDI *Undi;
224 PXEBC_DHCP4_OPTION_ARCH *Arch;
225 PXEBC_DHCP4_OPTION_CLID *Clid;
226 PXEBC_DHCP4_OPTION_UUID *Uuid;
227 PXEBC_DHCP4_OPTION_MESG *Mesg;
228 PXEBC_DHCP4_OPTION_MAX_MESG_SIZE *MaxMesgSize;
229 } PXEBC_DHCP4_OPTION_ENTRY;
230
231 typedef struct {
232 UINT16 Type;
233 UINT8 IpCnt;
234 EFI_IPv4_ADDRESS IpAddr[1];
235 } PXEBC_BOOT_SVR_ENTRY;
236
237 typedef struct {
238 UINT16 Type;
239 UINT8 DescLen;
240 UINT8 DescStr[1];
241 } PXEBC_BOOT_MENU_ENTRY;
242
243 typedef struct {
244 UINT8 Timeout;
245 UINT8 Prompt[1];
246 } PXEBC_MENU_PROMPT;
247
248 typedef struct {
249 UINT32 BitMap[8];
250 EFI_IPv4_ADDRESS MtftpIp;
251 UINT16 MtftpCPort;
252 UINT16 MtftpSPort;
253 UINT8 MtftpTimeout;
254 UINT8 MtftpDelay;
255 UINT8 DiscoverCtrl;
256 EFI_IPv4_ADDRESS DiscoverMcastIp;
257 EFI_IPv4_ADDRESS McastIpBase;
258 UINT16 McastIpBlock;
259 UINT16 McastIpRange;
260 UINT16 BootSrvType;
261 UINT16 BootSrvLayer;
262 PXEBC_BOOT_SVR_ENTRY *BootSvr;
263 UINT8 BootSvrLen;
264 PXEBC_BOOT_MENU_ENTRY *BootMenu;
265 UINT8 BootMenuLen;
266 PXEBC_MENU_PROMPT *MenuPrompt;
267 UINT8 MenuPromptLen;
268 UINT32 *CredType;
269 UINT8 CredTypeLen;
270 } PXEBC_VENDOR_OPTION;
271
272 #define PXEBC_CACHED_DHCP4_PACKET_MAX_SIZE (OFFSET_OF (EFI_DHCP4_PACKET, Dhcp4) + PXEBC_DHCP4_MAX_PACKET_SIZE)
273
274 typedef struct {
275 union {
276 EFI_DHCP4_PACKET Offer;
277 EFI_DHCP4_PACKET Ack;
278 UINT8 Buffer[PXEBC_CACHED_DHCP4_PACKET_MAX_SIZE];
279 } Packet;
280
281 BOOLEAN IsPxeOffer;
282 UINT8 OfferType;
283 EFI_DHCP4_PACKET_OPTION *Dhcp4Option[PXEBC_DHCP4_TAG_INDEX_MAX];
284 PXEBC_VENDOR_OPTION PxeVendorOption;
285 } PXEBC_CACHED_DHCP4_PACKET;
286
287 #define GET_NEXT_DHCP_OPTION(Opt) \
288 (EFI_DHCP4_PACKET_OPTION *) ((UINT8 *) (Opt) + sizeof (EFI_DHCP4_PACKET_OPTION) + (Opt)->Length - 1)
289
290 #define GET_OPTION_BUFFER_LEN(Pkt) ((Pkt)->Length - sizeof (EFI_DHCP4_HEADER) - 4)
291 #define IS_PROXY_DHCP_OFFER(Offer) EFI_IP4_EQUAL (&((Offer)->Dhcp4.Header.YourAddr), &mZeroIp4Addr)
292
293 #define GET_NEXT_BOOT_SVR_ENTRY(Ent) \
294 (PXEBC_BOOT_SVR_ENTRY *) ((UINT8 *) Ent + sizeof (*(Ent)) + ((Ent)->IpCnt - 1) * sizeof (EFI_IPv4_ADDRESS))
295
296
297 /**
298 This function initialize the DHCP4 message instance.
299
300 This function will pad each item of dhcp4 message packet.
301
302 @param Seed Pointer to the message instance of the DHCP4 packet.
303 @param Udp4 Pointer to the EFI_UDP4_PROTOCOL instance.
304
305 @return none.
306
307 **/
308 VOID
309 PxeBcInitSeedPacket (
310 IN EFI_DHCP4_PACKET *Seed,
311 IN EFI_UDP4_PROTOCOL *Udp4
312 );
313
314
315 /**
316 Parse the cached dhcp packet.
317
318 @param CachedPacket Pointer to cached dhcp packet.
319
320 @retval TRUE Succeed to parse and validation.
321 @retval FALSE Fail to parse or validation.
322
323 **/
324 BOOLEAN
325 PxeBcParseCachedDhcpPacket (
326 IN PXEBC_CACHED_DHCP4_PACKET *CachedPacket
327 );
328
329 /**
330 This function is to check the selected proxy offer (include BINL dhcp offer and
331 DHCP_ONLY offer ) and set the flag and copy the DHCP packets to the Pxe base code
332 mode structure.
333
334 @param Private Pointer to PxeBc private data.
335
336 @retval EFI_SUCCESS Operational successful.
337 @retval EFI_NO_RESPONSE Offer dhcp service failed.
338
339 **/
340 EFI_STATUS
341 PxeBcCheckSelectedOffer (
342 IN PXEBC_PRIVATE_DATA *Private
343 );
344
345
346 /**
347 Callback routine.
348
349 EFI_DHCP4_CALLBACK is provided by the consumer of the EFI DHCPv4 Protocol driver
350 to intercept events that occurred in the configuration process. This structure
351 provides advanced control of each state transition of the DHCP process. The
352 returned status code determines the behavior of the EFI DHCPv4 Protocol driver.
353 There are three possible returned values, which are described in the following
354 table.
355
356 @param This Pointer to the EFI DHCPv4 Protocol instance that is used to
357 configure this callback function.
358 @param Context Pointer to the context that is initialized by
359 EFI_DHCP4_PROTOCOL.Configure().
360 @param CurrentState The current operational state of the EFI DHCPv4 Protocol
361 driver.
362 @param Dhcp4Event The event that occurs in the current state, which usually means a
363 state transition.
364 @param Packet The DHCP packet that is going to be sent or already received.
365 @param NewPacket The packet that is used to replace the above Packet.
366
367 @retval EFI_SUCCESS Tells the EFI DHCPv4 Protocol driver to continue the DHCP process.
368 @retval EFI_NOT_READY Only used in the Dhcp4Selecting state. The EFI DHCPv4 Protocol
369 driver will continue to wait for more DHCPOFFER packets until the retry
370 timeout expires.
371 @retval EFI_ABORTED Tells the EFI DHCPv4 Protocol driver to abort the current process and
372 return to the Dhcp4Init or Dhcp4InitReboot state.
373
374 **/
375 EFI_STATUS
376 EFIAPI
377 PxeBcDhcpCallBack (
378 IN EFI_DHCP4_PROTOCOL * This,
379 IN VOID *Context,
380 IN EFI_DHCP4_STATE CurrentState,
381 IN EFI_DHCP4_EVENT Dhcp4Event,
382 IN EFI_DHCP4_PACKET * Packet OPTIONAL,
383 OUT EFI_DHCP4_PACKET **NewPacket OPTIONAL
384 );
385
386
387 /**
388 Discover the boot of service and initialize the vendor option if exists.
389
390 @param Private Pointer to PxeBc private data.
391 @param Type PxeBc option boot item type
392 @param Layer PxeBc option boot item layer
393 @param UseBis Use BIS or not
394 @param DestIp Ip address for server
395 @param IpCount The total count of the server ip address
396 @param SrvList Server list
397 @param IsDiscv Discover the vendor or not
398 @param Reply The dhcp4 packet of Pxe reply
399
400 @retval EFI_SUCCESS Operation succeeds.
401 @retval EFI_OUT_OF_RESOURCES Allocate memory pool failed.
402 @retval EFI_NOT_FOUND There is no vendor option exists.
403 @retval EFI_TIMEOUT Send Pxe Discover time out.
404
405 **/
406 EFI_STATUS
407 PxeBcDiscvBootService (
408 IN PXEBC_PRIVATE_DATA * Private,
409 IN UINT16 Type,
410 IN UINT16 *Layer,
411 IN BOOLEAN UseBis,
412 IN EFI_IP_ADDRESS * DestIp,
413 IN UINT16 IpCount,
414 IN EFI_PXE_BASE_CODE_SRVLIST * SrvList,
415 IN BOOLEAN IsDiscv,
416 OUT EFI_DHCP4_PACKET * Reply OPTIONAL
417 );
418
419
420 /**
421 Initialize the DHCP options and build the option list.
422
423 @param Private Pointer to PxeBc private data.
424 @param OptList Pointer to a DHCP option list.
425
426 @param IsDhcpDiscover Discover dhcp option or not.
427
428 @return The index item number of the option list.
429
430 **/
431 UINT32
432 PxeBcBuildDhcpOptions (
433 IN PXEBC_PRIVATE_DATA *Private,
434 IN EFI_DHCP4_PACKET_OPTION **OptList,
435 IN BOOLEAN IsDhcpDiscover
436 );
437
438
439 /**
440 Create the boot options
441
442 @param OptList Pointer to the list of the options
443 @param Type the type of option
444 @param Layer the layer of the boot options
445 @param OptLen length of opotion
446
447 @return None.
448
449 **/
450 VOID
451 PxeBcCreateBootOptions (
452 IN EFI_DHCP4_PACKET_OPTION *OptList,
453 IN UINT16 Type,
454 IN UINT16 *Layer,
455 OUT UINT32 *OptLen
456 );
457
458
459 /**
460 Parse interested dhcp options.
461
462 @param Buffer Pointer to the dhcp options packet.
463 @param Length The length of the dhcp options.
464 @param OptTag The option OpCode.
465
466 @return NULL if the buffer length is 0 and OpCode is not
467 PXEBC_DHCP4_TAG_EOP, or the pointer to the buffer.
468
469 **/
470 EFI_DHCP4_PACKET_OPTION *
471 PxeBcParseExtendOptions (
472 IN UINT8 *Buffer,
473 IN UINT32 Length,
474 IN UINT8 OptTag
475 );
476
477
478 /**
479 This function is to parse and check vendor options.
480
481 @param Dhcp4Option Pointer to dhcp options
482 @param VendorOption Pointer to vendor options
483
484 @return TRUE if valid for vendor options, or FALSE.
485
486 **/
487 BOOLEAN
488 PxeBcParseVendorOptions (
489 IN EFI_DHCP4_PACKET_OPTION *Dhcp4Option,
490 IN PXEBC_VENDOR_OPTION *VendorOption
491 );
492
493
494 /**
495 Choose the boot prompt.
496
497 @param Private Pointer to PxeBc private data.
498
499 @retval EFI_SUCCESS Select boot prompt done.
500 @retval EFI_TIMEOUT Select boot prompt time out.
501 @retval EFI_NOT_FOUND The proxy offer is not Pxe10.
502 @retval EFI_ABORTED User cancel the operation.
503 @retval EFI_NOT_READY Read the input key from the keybroad has not finish.
504
505 **/
506 EFI_STATUS
507 PxeBcSelectBootPrompt (
508 IN PXEBC_PRIVATE_DATA *Private
509 );
510
511
512 /**
513 Select the boot menu.
514
515 @param Private Pointer to PxeBc private data.
516 @param Type The type of the menu.
517 @param UseDefaultItem Use default item or not.
518
519 @retval EFI_ABORTED User cancel operation.
520 @retval EFI_SUCCESS Select the boot menu success.
521 @retval EFI_NOT_READY Read the input key from the keybroad has not finish.
522
523 **/
524 EFI_STATUS
525 PxeBcSelectBootMenu (
526 IN PXEBC_PRIVATE_DATA *Private,
527 OUT UINT16 *Type,
528 IN BOOLEAN UseDefaultItem
529 );
530
531 #endif
532