TianoCore EDK2 master
Loading...
Searching...
No Matches
HttpBootDhcp6.h
Go to the documentation of this file.
1
9#ifndef __EFI_HTTP_BOOT_DHCP6_H__
10#define __EFI_HTTP_BOOT_DHCP6_H__
11
12#define HTTP_BOOT_OFFER_MAX_NUM 16
13#define HTTP_BOOT_DHCP6_OPTION_MAX_NUM 16
14#define HTTP_BOOT_DHCP6_OPTION_MAX_SIZE 312
15#define HTTP_BOOT_DHCP6_PACKET_MAX_SIZE 1472
16#define HTTP_BOOT_IP6_ROUTE_TABLE_TIMEOUT 10
17#define HTTP_BOOT_DEFAULT_HOPLIMIT 64
18#define HTTP_BOOT_DEFAULT_LIFETIME 50000
19
20#define HTTP_BOOT_DHCP6_ENTERPRISE_NUM 343 // TODO: IANA TBD: temporarily using Intel's
21#define HTTP_BOOT_DHCP6_MAX_BOOT_FILE_SIZE 65535 // It's a limitation of bit length, 65535*512 bytes.
22
23#define HTTP_BOOT_DHCP6_IDX_IA_NA 0
24#define HTTP_BOOT_DHCP6_IDX_BOOT_FILE_URL 1
25#define HTTP_BOOT_DHCP6_IDX_BOOT_FILE_PARAM 2
26#define HTTP_BOOT_DHCP6_IDX_VENDOR_CLASS 3
27#define HTTP_BOOT_DHCP6_IDX_DNS_SERVER 4
28#define HTTP_BOOT_DHCP6_IDX_MAX 5
29
30#pragma pack(1)
31typedef struct {
32 UINT16 OpCode[256];
34
35typedef struct {
36 UINT8 Type;
37 UINT8 MajorVer;
38 UINT8 MinorVer;
40
41typedef struct {
42 UINT16 Type;
44
45typedef struct {
46 UINT8 ClassIdentifier[11];
47 UINT8 ArchitecturePrefix[5];
48 UINT8 ArchitectureType[5];
49 UINT8 Lit3[1];
50 UINT8 InterfaceName[4];
51 UINT8 Lit4[1];
52 UINT8 UndiMajor[3];
53 UINT8 UndiMinor[3];
55
56typedef struct {
57 UINT32 Vendor;
58 UINT16 ClassLen;
59 HTTP_BOOT_CLASS_ID ClassId;
61
62#pragma pack()
63
64typedef union {
70
71#define HTTP_CACHED_DHCP6_PACKET_MAX_SIZE (OFFSET_OF (EFI_DHCP6_PACKET, Dhcp6) + HTTP_BOOT_DHCP6_PACKET_MAX_SIZE)
72
73typedef union {
74 EFI_DHCP6_PACKET Offer;
76 UINT8 Buffer[HTTP_CACHED_DHCP6_PACKET_MAX_SIZE];
78
79typedef struct {
81 HTTP_BOOT_OFFER_TYPE OfferType;
82 EFI_DHCP6_PACKET_OPTION *OptList[HTTP_BOOT_DHCP6_IDX_MAX];
83 VOID *UriParser;
85
86#define GET_NEXT_DHCP6_OPTION(Opt) \
87 (EFI_DHCP6_PACKET_OPTION *) ((UINT8 *) (Opt) + \
88 sizeof (EFI_DHCP6_PACKET_OPTION) + (NTOHS ((Opt)->OpLen)) - 1)
89
90#define GET_DHCP6_OPTION_SIZE(Pkt) \
91 ((Pkt)->Length - sizeof (EFI_DHCP6_HEADER))
92
105 );
106
119 );
120
135 IN HTTP_BOOT_PRIVATE_DATA *Private,
136 IN UINTN DataLength,
137 IN VOID *DnsServerData
138 );
139
152 );
153
166 );
167
168#endif
UINT64 UINTN
HTTP_BOOT_OFFER_TYPE
Definition: HttpBootDhcp4.h:56
EFI_STATUS HttpBootSetIp6Gateway(IN HTTP_BOOT_PRIVATE_DATA *Private)
EFI_STATUS HttpBootSetIp6Dns(IN HTTP_BOOT_PRIVATE_DATA *Private, IN UINTN DataLength, IN VOID *DnsServerData)
EFI_STATUS HttpBootSetIp6Policy(IN HTTP_BOOT_PRIVATE_DATA *Private)
EFI_STATUS HttpBootDhcp6Sarr(IN HTTP_BOOT_PRIVATE_DATA *Private)
EFI_STATUS HttpBootSetIp6Address(IN HTTP_BOOT_PRIVATE_DATA *Private)
#define IN
Definition: Base.h:279
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29