10#ifndef __EFI_PXEBC_DHCP6_H__
11#define __EFI_PXEBC_DHCP6_H__
13#define PXEBC_DHCP6_OPTION_MAX_NUM 16
14#define PXEBC_DHCP6_OPTION_MAX_SIZE 312
15#define PXEBC_DHCP6_PACKET_MAX_SIZE (sizeof (EFI_PXE_BASE_CODE_PACKET))
16#define PXEBC_IP6_POLICY_MAX 0xff
17#define PXEBC_IP6_ROUTE_TABLE_TIMEOUT 10
19#define PXEBC_DHCP6_S_PORT 547
20#define PXEBC_DHCP6_C_PORT 546
22#define PXEBC_DHCP6_ENTERPRISE_NUM 343
23#define PXEBC_DHCP6_MAX_BOOT_FILE_SIZE 65535
25#define PXEBC_DHCP6_IDX_IA_NA 0
26#define PXEBC_DHCP6_IDX_BOOT_FILE_URL 1
27#define PXEBC_DHCP6_IDX_BOOT_FILE_PARAM 2
28#define PXEBC_DHCP6_IDX_VENDOR_CLASS 3
29#define PXEBC_DHCP6_IDX_DNS_SERVER 4
30#define PXEBC_DHCP6_IDX_MAX 5
32#define PXEBC_DHCP6_BOOT_FILE_URL_PREFIX "tftp://"
33#define PXEBC_TFTP_URL_SEPARATOR '/'
34#define PXEBC_ADDR_START_DELIMITER '['
35#define PXEBC_ADDR_END_DELIMITER ']'
43#define PXEBC_MIN_SIZE_OF_DUID (sizeof(UINT16) + 1)
44#define PXEBC_MAX_SIZE_OF_DUID (sizeof(UINT16) + 128)
50#define PXEBC_COMBINED_SIZE_OF_OPT_CODE_AND_LEN \
51 (sizeof (((EFI_DHCP6_PACKET_OPTION *)0)->OpCode) + \
52 sizeof (((EFI_DHCP6_PACKET_OPTION *)0)->OpLen))
54#define GET_NEXT_DHCP6_OPTION(Opt) \
55 (EFI_DHCP6_PACKET_OPTION *) ((UINT8 *) (Opt) + \
56 sizeof (EFI_DHCP6_PACKET_OPTION) + (NTOHS ((Opt)->OpLen)) - 1)
58#define GET_DHCP6_OPTION_SIZE(Pkt) \
59 ((Pkt)->Length - sizeof (EFI_DHCP6_HEADER))
61#define IS_PROXY_OFFER(Type) \
62 ((Type) == PxeOfferTypeProxyBinl || \
63 (Type) == PxeOfferTypeProxyPxe10 || \
64 (Type) == PxeOfferTypeProxyWfm11a)
82 UINT8 ClassIdentifier[10];
83 UINT8 ArchitecturePrefix[5];
84 UINT8 ArchitectureType[5];
86 UINT8 InterfaceName[4];
113#define PXEBC_CACHED_DHCP6_PACKET_MAX_SIZE (OFFSET_OF (EFI_DHCP6_PACKET, Dhcp6) + PXEBC_DHCP6_PACKET_MAX_SIZE)
118 UINT8 Buffer[PXEBC_CACHED_DHCP6_PACKET_MAX_SIZE];
123 PXEBC_OFFER_TYPE OfferType;
144 OUT UINT8 **FileName,
162 IN CHAR8 *BootFilePara,
163 OUT UINT16 *BootFileSize
EFI_STATUS PxeBcRegisterIp6Address(IN PXEBC_PRIVATE_DATA *Private, IN EFI_IPv6_ADDRESS *Address)
EFI_STATUS PxeBcSetIp6Address(IN PXEBC_PRIVATE_DATA *Private)
VOID PxeBcUnregisterIp6Address(IN PXEBC_PRIVATE_DATA *Private)
EFI_STATUS PxeBcSetIp6Policy(IN PXEBC_PRIVATE_DATA *Private)
EFI_STATUS PxeBcParseDhcp6Packet(IN PXEBC_DHCP6_PACKET_CACHE *Cache6)
EFI_STATUS PxeBcExtractBootFileUrl(IN PXEBC_PRIVATE_DATA *Private, OUT UINT8 **FileName, IN OUT EFI_IPv6_ADDRESS *SrvAddr, IN CHAR8 *BootFile, IN UINT16 Length)
EFI_STATUS PxeBcDhcp6Sarr(IN PXEBC_PRIVATE_DATA *Private, IN EFI_DHCP6_PROTOCOL *Dhcp6)
EFI_STATUS PxeBcExtractBootFileParam(IN CHAR8 *BootFilePara, OUT UINT16 *BootFileSize)
EFI_STATUS PxeBcDhcp6Discover(IN PXEBC_PRIVATE_DATA *Private, IN UINT16 Type, IN UINT16 *Layer, IN BOOLEAN UseBis, IN EFI_IP_ADDRESS *DestIp)