11#ifndef __EFI_UEFI_HTTP_BOOT_DHCP4_H__
12#define __EFI_UEFI_HTTP_BOOT_DHCP4_H__
14#define HTTP_BOOT_DHCP4_OPTION_MAX_NUM 16
15#define HTTP_BOOT_DHCP4_OPTION_MAX_SIZE 312
16#define HTTP_BOOT_DHCP4_PACKET_MAX_SIZE 1472
18#define HTTP_BOOT_DHCP4_OPCODE_REQUEST 1
19#define HTTP_BOOT_DHCP4_OPCODE_REPLY 2
20#define HTTP_BOOT_DHCP4_MSG_TYPE_REQUEST 3
21#define HTTP_BOOT_DHCP4_MAGIC 0x63538263
23#define HTTP_BOOT_DHCP4_OVERLOAD_FILE 1
24#define HTTP_BOOT_DHCP4_OVERLOAD_SERVER_NAME 2
32#if defined (MDE_CPU_IA32)
33#define EFI_HTTP_BOOT_CLIENT_SYSTEM_ARCHITECTURE HTTP_CLIENT_ARCH_IA32
34#elif defined (MDE_CPU_X64)
35#define EFI_HTTP_BOOT_CLIENT_SYSTEM_ARCHITECTURE HTTP_CLIENT_ARCH_X64
36#elif defined (MDE_CPU_ARM)
37#define EFI_HTTP_BOOT_CLIENT_SYSTEM_ARCHITECTURE HTTP_CLIENT_ARCH_ARM
38#elif defined (MDE_CPU_AARCH64)
39#define EFI_HTTP_BOOT_CLIENT_SYSTEM_ARCHITECTURE HTTP_CLIENT_ARCH_AARCH64
40#elif defined (MDE_CPU_RISCV64)
41#define EFI_HTTP_BOOT_CLIENT_SYSTEM_ARCHITECTURE HTTP_CLIENT_ARCH_RISCV64
42#elif defined (MDE_CPU_EBC)
43#define EFI_HTTP_BOOT_CLIENT_SYSTEM_ARCHITECTURE HTTP_CLIENT_ARCH_EBC
44#elif defined (MDE_CPU_LOONGARCH64)
45#define EFI_HTTP_BOOT_CLIENT_SYSTEM_ARCHITECTURE HTTP_CLIENT_ARCH_LOONGARCH64
60 HttpOfferTypeDhcpIpUri,
64 HttpOfferTypeDhcpIpUriDns,
68 HttpOfferTypeDhcpNameUriDns,
76 HttpOfferTypeDhcpOnly,
81 HttpOfferTypeProxyNameUri,
86 HttpOfferTypeProxyIpUri,
90 HttpOfferTypeDhcpNameUri,
94#define HTTP_BOOT_DHCP_RETRIES 4
95#define HTTP_BOOT_OFFER_MAX_NUM 16
99#define HTTP_BOOT_DHCP4_TAG_INDEX_BOOTFILE_LEN 0
100#define HTTP_BOOT_DHCP4_TAG_INDEX_OVERLOAD 1
101#define HTTP_BOOT_DHCP4_TAG_INDEX_MSG_TYPE 2
102#define HTTP_BOOT_DHCP4_TAG_INDEX_SERVER_ID 3
103#define HTTP_BOOT_DHCP4_TAG_INDEX_CLASS_ID 4
104#define HTTP_BOOT_DHCP4_TAG_INDEX_BOOTFILE 5
105#define HTTP_BOOT_DHCP4_TAG_INDEX_DNS_SERVER 6
106#define HTTP_BOOT_DHCP4_TAG_INDEX_MAX 7
133 UINT8 ClassIdentifier[11];
134 UINT8 ArchitecturePrefix[5];
135 UINT8 ArchitectureType[5];
137 UINT8 InterfaceName[4];
165#define GET_NEXT_DHCP_OPTION(Opt) \
166 (EFI_DHCP4_PACKET_OPTION *) ((UINT8 *) (Opt) + \
167 sizeof (EFI_DHCP4_PACKET_OPTION) + (Opt)->Length - 1)
169#define GET_OPTION_BUFFER_LEN(Pkt) \
170 ((Pkt)->Length - sizeof (EFI_DHCP4_HEADER) - 4)
172#define DEFAULT_CLASS_ID_DATA "HTTPClient:Arch:xxxxx:UNDI:003000"
173#define DEFAULT_UNDI_TYPE 1
174#define DEFAULT_UNDI_MAJOR 3
175#define DEFAULT_UNDI_MINOR 0
181#define HTTP_CACHED_DHCP4_PACKET_MAX_SIZE (OFFSET_OF (EFI_DHCP4_PACKET, Dhcp4) + HTTP_BOOT_DHCP4_PACKET_MAX_SIZE)
186 UINT8 Buffer[HTTP_CACHED_DHCP4_PACKET_MAX_SIZE];
253 IN VOID *DnsServerData
VOID HttpBootSelectDhcpOffer(IN HTTP_BOOT_PRIVATE_DATA *Private)
EFI_STATUS HttpBootDhcp4Dora(IN HTTP_BOOT_PRIVATE_DATA *Private)
EFI_STATUS HttpBootRegisterIp4Dns(IN HTTP_BOOT_PRIVATE_DATA *Private, IN UINTN DataLength, IN VOID *DnsServerData)
BOOLEAN AddrIsOk
Point to somewhere in Authority.
CHAR8 * RegName
TODO: may not required in HTTP URL.