TianoCore EDK2 master
|
Go to the source code of this file.
Data Structures | |
struct | PXEBC_DHCP4_OPTION_PARA |
struct | PXEBC_DHCP4_OPTION_MAX_MESG_SIZE |
struct | PXEBC_DHCP4_OPTION_UNDI |
struct | PXEBC_DHCP4_OPTION_MESG |
struct | PXEBC_DHCP4_OPTION_ARCH |
struct | PXEBC_DHCP4_OPTION_CLID |
struct | PXEBC_DHCP4_OPTION_UUID |
struct | PXEBC_OPTION_BOOT_ITEM |
union | PXEBC_DHCP4_OPTION_ENTRY |
struct | PXEBC_BOOT_SVR_ENTRY |
struct | PXEBC_BOOT_MENU_ENTRY |
struct | PXEBC_MENU_PROMPT |
struct | PXEBC_VENDOR_OPTION |
union | PXEBC_DHCP4_PACKET |
struct | PXEBC_DHCP4_PACKET_CACHE |
Functions | |
VOID | PxeBcSeedDhcp4Packet (OUT EFI_DHCP4_PACKET *Seed, IN EFI_UDP4_PROTOCOL *Udp4) |
EFI_STATUS | PxeBcParseDhcp4Packet (IN PXEBC_DHCP4_PACKET_CACHE *Cache4) |
EFI_STATUS | PxeBcDhcp4Discover (IN PXEBC_PRIVATE_DATA *Private, IN UINT16 Type, IN UINT16 *Layer, IN BOOLEAN UseBis, IN EFI_IP_ADDRESS *DestIp, IN UINT16 IpCount, IN EFI_PXE_BASE_CODE_SRVLIST *SrvList) |
EFI_STATUS | PxeBcSetIp4Policy (IN PXEBC_PRIVATE_DATA *Private) |
EFI_STATUS | PxeBcDhcp4Dora (IN PXEBC_PRIVATE_DATA *Private, IN EFI_DHCP4_PROTOCOL *Dhcp4) |
Functions declaration related with DHCPv4 for UefiPxeBc Driver.
Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file PxeBcDhcp4.h.
#define BIT | ( | x | ) | (1 << x) |
Definition at line 81 of file PxeBcDhcp4.h.
#define CTRL | ( | x | ) | (0x1F & (x)) |
Definition at line 82 of file PxeBcDhcp4.h.
#define DEFAULT_CLASS_ID_DATA "PXEClient:Arch:xxxxx:UNDI:003000" |
Definition at line 83 of file PxeBcDhcp4.h.
#define DEFAULT_UNDI_MAJOR 3 |
Definition at line 85 of file PxeBcDhcp4.h.
#define DEFAULT_UNDI_MINOR 0 |
Definition at line 86 of file PxeBcDhcp4.h.
#define DEFAULT_UNDI_TYPE 1 |
Definition at line 84 of file PxeBcDhcp4.h.
#define DISCOVER_VENDOR_OPTION_BIT_MAP |
Definition at line 95 of file PxeBcDhcp4.h.
#define GET_NEXT_BOOT_SVR_ENTRY | ( | Ent | ) |
Definition at line 140 of file PxeBcDhcp4.h.
#define GET_NEXT_DHCP_OPTION | ( | Opt | ) |
Definition at line 133 of file PxeBcDhcp4.h.
#define GET_OPTION_BUFFER_LEN | ( | Pkt | ) | ((Pkt)->Length - sizeof (EFI_DHCP4_HEADER) - 4) |
Definition at line 137 of file PxeBcDhcp4.h.
#define IS_DISABLE_BCAST_DISCOVER | ( | x | ) | (((x) & BIT (0)) == BIT (0)) |
Definition at line 147 of file PxeBcDhcp4.h.
#define IS_DISABLE_MCAST_DISCOVER | ( | x | ) | (((x) & BIT (1)) == BIT (1)) |
Definition at line 150 of file PxeBcDhcp4.h.
#define IS_DISABLE_PROMPT_MENU | ( | x | ) | (((x) & BIT (3)) == BIT (3)) |
Definition at line 156 of file PxeBcDhcp4.h.
#define IS_ENABLE_USE_SERVER_LIST | ( | x | ) | (((x) & BIT (2)) == BIT (2)) |
Definition at line 153 of file PxeBcDhcp4.h.
#define IS_PROXY_DHCP_OFFER | ( | Offer | ) | EFI_IP4_EQUAL (&(Offer)->Dhcp4.Header.YourAddr, &mZeroIp4Addr) |
Definition at line 144 of file PxeBcDhcp4.h.
#define IS_VALID_BOOT_MENU | ( | x | ) |
Definition at line 110 of file PxeBcDhcp4.h.
#define IS_VALID_BOOT_PROMPT | ( | x | ) |
Definition at line 106 of file PxeBcDhcp4.h.
#define IS_VALID_BOOT_SERVERS | ( | x | ) |
Definition at line 102 of file PxeBcDhcp4.h.
#define IS_VALID_BOOTITEM_VENDOR_OPTION | ( | x | ) |
Definition at line 125 of file PxeBcDhcp4.h.
#define IS_VALID_CREDENTIAL_VENDOR_OPTION | ( | x | ) |
Definition at line 121 of file PxeBcDhcp4.h.
#define IS_VALID_DISCOVER_VENDOR_OPTION | ( | x | ) | (((UINT32) ((x)[0]) & DISCOVER_VENDOR_OPTION_BIT_MAP) != 0) |
Definition at line 118 of file PxeBcDhcp4.h.
#define IS_VALID_MTFTP_VENDOR_OPTION | ( | x | ) |
Definition at line 114 of file PxeBcDhcp4.h.
#define MTFTP_VENDOR_OPTION_BIT_MAP |
Definition at line 88 of file PxeBcDhcp4.h.
#define PXEBC_BOOT_REQUEST_RETRIES 4 |
Definition at line 43 of file PxeBcDhcp4.h.
#define PXEBC_BOOT_REQUEST_TIMEOUT 1 |
Definition at line 42 of file PxeBcDhcp4.h.
#define PXEBC_BS_DISCOVER_PORT 4011 |
Definition at line 19 of file PxeBcDhcp4.h.
#define PXEBC_BS_DOWNLOAD_PORT 69 |
Definition at line 18 of file PxeBcDhcp4.h.
#define PXEBC_CACHED_DHCP4_PACKET_MAX_SIZE (OFFSET_OF (EFI_DHCP4_PACKET, Dhcp4) + PXEBC_DHCP4_PACKET_MAX_SIZE) |
Definition at line 258 of file PxeBcDhcp4.h.
#define PXEBC_DHCP4_C_PORT 68 |
Definition at line 17 of file PxeBcDhcp4.h.
#define PXEBC_DHCP4_MAGIC 0x63538263 |
Definition at line 23 of file PxeBcDhcp4.h.
#define PXEBC_DHCP4_MSG_TYPE_REQUEST 3 |
Definition at line 22 of file PxeBcDhcp4.h.
#define PXEBC_DHCP4_OPCODE_REPLY 2 |
Definition at line 21 of file PxeBcDhcp4.h.
#define PXEBC_DHCP4_OPCODE_REQUEST 1 |
Definition at line 20 of file PxeBcDhcp4.h.
#define PXEBC_DHCP4_OPTION_MAX_NUM 16 |
Definition at line 13 of file PxeBcDhcp4.h.
#define PXEBC_DHCP4_OPTION_MAX_SIZE 312 |
Definition at line 14 of file PxeBcDhcp4.h.
#define PXEBC_DHCP4_OVERLOAD_FILE 1 |
Definition at line 45 of file PxeBcDhcp4.h.
#define PXEBC_DHCP4_OVERLOAD_SERVER_NAME 2 |
Definition at line 46 of file PxeBcDhcp4.h.
#define PXEBC_DHCP4_PACKET_MAX_SIZE (sizeof (EFI_PXE_BASE_CODE_PACKET)) |
Definition at line 15 of file PxeBcDhcp4.h.
#define PXEBC_DHCP4_S_PORT 67 |
Definition at line 16 of file PxeBcDhcp4.h.
#define PXEBC_DHCP4_TAG_INDEX_BOOTFILE 6 |
Definition at line 57 of file PxeBcDhcp4.h.
#define PXEBC_DHCP4_TAG_INDEX_BOOTFILE_LEN 0 |
Definition at line 51 of file PxeBcDhcp4.h.
#define PXEBC_DHCP4_TAG_INDEX_CLASS_ID 5 |
Definition at line 56 of file PxeBcDhcp4.h.
#define PXEBC_DHCP4_TAG_INDEX_MAX 7 |
Definition at line 58 of file PxeBcDhcp4.h.
#define PXEBC_DHCP4_TAG_INDEX_MSG_TYPE 3 |
Definition at line 54 of file PxeBcDhcp4.h.
#define PXEBC_DHCP4_TAG_INDEX_OVERLOAD 2 |
Definition at line 53 of file PxeBcDhcp4.h.
#define PXEBC_DHCP4_TAG_INDEX_SERVER_ID 4 |
Definition at line 55 of file PxeBcDhcp4.h.
#define PXEBC_DHCP4_TAG_INDEX_VENDOR 1 |
Definition at line 52 of file PxeBcDhcp4.h.
#define PXEBC_VENDOR_TAG_BOOT_ITEM 71 |
Definition at line 40 of file PxeBcDhcp4.h.
#define PXEBC_VENDOR_TAG_BOOT_MENU 9 |
Definition at line 36 of file PxeBcDhcp4.h.
#define PXEBC_VENDOR_TAG_BOOT_SERVERS 8 |
Definition at line 35 of file PxeBcDhcp4.h.
#define PXEBC_VENDOR_TAG_CREDENTIAL_TYPES 12 |
Definition at line 39 of file PxeBcDhcp4.h.
#define PXEBC_VENDOR_TAG_DISCOVER_CTRL 6 |
Definition at line 33 of file PxeBcDhcp4.h.
#define PXEBC_VENDOR_TAG_DISCOVER_MCAST 7 |
Definition at line 34 of file PxeBcDhcp4.h.
#define PXEBC_VENDOR_TAG_MCAST_ALLOC 11 |
Definition at line 38 of file PxeBcDhcp4.h.
#define PXEBC_VENDOR_TAG_MENU_PROMPT 10 |
Definition at line 37 of file PxeBcDhcp4.h.
#define PXEBC_VENDOR_TAG_MTFTP_CPORT 2 |
Definition at line 29 of file PxeBcDhcp4.h.
#define PXEBC_VENDOR_TAG_MTFTP_DELAY 5 |
Definition at line 32 of file PxeBcDhcp4.h.
#define PXEBC_VENDOR_TAG_MTFTP_IP 1 |
Definition at line 28 of file PxeBcDhcp4.h.
#define PXEBC_VENDOR_TAG_MTFTP_SPORT 3 |
Definition at line 30 of file PxeBcDhcp4.h.
#define PXEBC_VENDOR_TAG_MTFTP_TIMEOUT 4 |
Definition at line 31 of file PxeBcDhcp4.h.
#define SET_VENDOR_OPTION_BIT_MAP | ( | x, | |
y | |||
) | (*(x + ((y) / 32)) = (UINT32) ((UINT32) ((x)[(y) / 32]) | BIT ((y) % 32))) |
Definition at line 130 of file PxeBcDhcp4.h.
enum PXEBC_OFFER_TYPE |
Definition at line 69 of file PxeBcDhcp4.h.
EFI_STATUS PxeBcDhcp4Discover | ( | IN PXEBC_PRIVATE_DATA * | Private, |
IN UINT16 | Type, | ||
IN UINT16 * | Layer, | ||
IN BOOLEAN | UseBis, | ||
IN EFI_IP_ADDRESS * | DestIp, | ||
IN UINT16 | IpCount, | ||
IN EFI_PXE_BASE_CODE_SRVLIST * | SrvList | ||
) |
Build and send out the request packet for the bootfile, and parse the reply.
[in] | Private | Pointer to PxeBc private data. |
[in] | Type | PxeBc option boot item type. |
[in] | Layer | Pointer to option boot item layer. |
[in] | UseBis | Use BIS or not. |
[in] | DestIp | Pointer to the server address. |
[in] | IpCount | The total count of the server address. |
[in] | SrvList | Pointer to EFI_PXE_BASE_CODE_SRVLIST. |
EFI_SUCCESS | Successfully discovered boot file. |
EFI_OUT_OF_RESOURCES | Failed to allocate resource. |
EFI_NOT_FOUND | Can't get the PXE reply packet. |
Others | Failed to discover boot file. |
Definition at line 1355 of file PxeBcDhcp4.c.
EFI_STATUS PxeBcDhcp4Dora | ( | IN PXEBC_PRIVATE_DATA * | Private, |
IN EFI_DHCP4_PROTOCOL * | Dhcp4 | ||
) |
Start the D.O.R.A DHCPv4 process to acquire the IPv4 address and other PXE boot information.
[in] | Private | Pointer to PxeBc private data. |
[in] | Dhcp4 | Pointer to the EFI_DHCP4_PROTOCOL |
EFI_SUCCESS | The D.O.R.A process successfully finished. |
Others | Failed to finish the D.O.R.A process. |
Definition at line 1657 of file PxeBcDhcp4.c.
EFI_STATUS PxeBcParseDhcp4Packet | ( | IN PXEBC_DHCP4_PACKET_CACHE * | Cache4 | ) |
Parse the cached DHCPv4 packet, including all the options.
[in] | Cache4 | Pointer to cached DHCPv4 packet. |
EFI_SUCCESS | Parsed the DHCPv4 packet successfully. |
EFI_DEVICE_ERROR | Failed to parse and invalid packet. |
Definition at line 445 of file PxeBcDhcp4.c.
VOID PxeBcSeedDhcp4Packet | ( | OUT EFI_DHCP4_PACKET * | Seed, |
IN EFI_UDP4_PROTOCOL * | Udp4 | ||
) |
Create a template DHCPv4 packet as a seed.
[out] | Seed | Pointer to the seed packet. |
[in] | Udp4 | Pointer to EFI_UDP4_PROTOCOL. |
Definition at line 383 of file PxeBcDhcp4.c.
EFI_STATUS PxeBcSetIp4Policy | ( | IN PXEBC_PRIVATE_DATA * | Private | ) |
Switch the Ip4 policy to static.
[in] | Private | The pointer to PXEBC_PRIVATE_DATA. |
EFI_SUCCESS | The policy is already configured to static. |
Others | Other error as indicated.. |
Definition at line 1609 of file PxeBcDhcp4.c.