10#ifndef __EFI_DHCP6_IMPL_H__
11#define __EFI_DHCP6_IMPL_H__
45#define DHCP6_SERVICE_SIGNATURE SIGNATURE_32 ('D', 'H', '6', 'S')
46#define DHCP6_INSTANCE_SIGNATURE SIGNATURE_32 ('D', 'H', '6', 'I')
48#define DHCP6_PACKET_ALL 0
49#define DHCP6_PACKET_STATEFUL 1
50#define DHCP6_PACKET_STATELESS 2
52#define DHCP6_BASE_PACKET_SIZE 1024
54#define DHCP6_PORT_CLIENT 546
55#define DHCP6_PORT_SERVER 547
57#define DHCP_CHECK_MEDIA_WAITING_TIME EFI_TIMER_PERIOD_SECONDS(20)
59#define DHCP6_INSTANCE_FROM_THIS(Instance) CR ((Instance), DHCP6_INSTANCE, Dhcp6, DHCP6_INSTANCE_SIGNATURE)
60#define DHCP6_SERVICE_FROM_THIS(Service) CR ((Service), DHCP6_SERVICE, ServiceBinding, DHCP6_SERVICE_SIGNATURE)
76#define DHCP6_SIZE_OF_OPT_CODE (sizeof (((EFI_DHCP6_PACKET_OPTION *)0)->OpCode))
77#define DHCP6_SIZE_OF_OPT_LEN (sizeof (((EFI_DHCP6_PACKET_OPTION *)0)->OpLen))
80#define DHCP6_SIZE_OF_COMBINED_CODE_AND_LEN (DHCP6_SIZE_OF_OPT_CODE + \
81 DHCP6_SIZE_OF_OPT_LEN)
84 DHCP6_SIZE_OF_COMBINED_CODE_AND_LEN == 4,
85 "Combined size of Code and Length must be 4 per RFC 8415"
89#define DHCP6_OFFSET_OF_OPT_LEN(a) (a + DHCP6_SIZE_OF_OPT_CODE)
91 DHCP6_OFFSET_OF_OPT_LEN (0) == 2,
92 "Offset of length is + 2 past start of option"
95#define DHCP6_OFFSET_OF_OPT_DATA(a) (a + DHCP6_SIZE_OF_COMBINED_CODE_AND_LEN)
97 DHCP6_OFFSET_OF_OPT_DATA (0) == 4,
98 "Offset to option data should be +4 from start of option"
124#define DHCP6_SIZE_OF_IAID (sizeof(UINT32))
125#define DHCP6_SIZE_OF_TIME_INTERVAL (sizeof(UINT32))
128#define DHCP6_SIZE_OF_COMBINED_IAID_T1_T2 (DHCP6_SIZE_OF_IAID + \
129 DHCP6_SIZE_OF_TIME_INTERVAL + \
130 DHCP6_SIZE_OF_TIME_INTERVAL)
132 DHCP6_SIZE_OF_COMBINED_IAID_T1_T2 == 12,
133 "Combined size of IAID, T1, T2 must be 12 per RFC 8415"
137#define DHCP6_MIN_SIZE_OF_IA_TA (DHCP6_SIZE_OF_COMBINED_CODE_AND_LEN + \
140 DHCP6_MIN_SIZE_OF_IA_TA == 8,
141 "Minimum combined size of IA_TA per RFC 8415"
145#define DHCP6_OFFSET_OF_IA_TA_INNER_OPT(a) (a + DHCP6_MIN_SIZE_OF_IA_TA)
147 DHCP6_OFFSET_OF_IA_TA_INNER_OPT (0) == 8,
148 "Offset of IA_TA Inner option is + 8 past start of option"
152#define DHCP6_MIN_SIZE_OF_IA_NA DHCP6_SIZE_OF_COMBINED_CODE_AND_LEN + \
153 DHCP6_SIZE_OF_COMBINED_IAID_T1_T2
155 DHCP6_MIN_SIZE_OF_IA_NA == 16,
156 "Minimum combined size of IA_TA per RFC 8415"
159#define DHCP6_OFFSET_OF_IA_NA_INNER_OPT(a) (a + DHCP6_MIN_SIZE_OF_IA_NA)
161 DHCP6_OFFSET_OF_IA_NA_INNER_OPT (0) == 16,
162 "Offset of IA_NA Inner option is + 16 past start of option"
165#define DHCP6_OFFSET_OF_IA_NA_T1(a) (a + \
166 DHCP6_SIZE_OF_COMBINED_CODE_AND_LEN + \
169 DHCP6_OFFSET_OF_IA_NA_T1 (0) == 8,
170 "Offset of IA_NA Inner option is + 8 past start of option"
173#define DHCP6_OFFSET_OF_IA_NA_T2(a) (a + \
174 DHCP6_SIZE_OF_COMBINED_CODE_AND_LEN +\
175 DHCP6_SIZE_OF_IAID + \
176 DHCP6_SIZE_OF_TIME_INTERVAL)
178 DHCP6_OFFSET_OF_IA_NA_T2 (0) == 12,
179 "Offset of IA_NA Inner option is + 12 past start of option"
199#define DHCP6_OFFSET_OF_STATUS_CODE(a) (a + DHCP6_SIZE_OF_COMBINED_CODE_AND_LEN)
201 DHCP6_OFFSET_OF_STATUS_CODE (0) == 4,
202 "Offset of status is + 4 past start of option"
215 UINT32 AllExpireTime;
232 BOOLEAN SolicitRetry;
242 VOID *CallbackContext;
266 BOOLEAN MediaPresent;
452 IN BOOLEAN SendClientId,
454 IN UINT32 OptionCount,
459 IN VOID *CallbackContext OPTIONAL
511 IN BOOLEAN RebindRequest
550 IN UINT32 AddressCount,
591 IN UINT32 AddressCount,
616 IN OUT UINT32 *OptionCount,
EFI_STATUS(EFIAPI * EFI_DHCP6_INFO_CALLBACK)(IN EFI_DHCP6_PROTOCOL *This, IN VOID *Context, IN EFI_DHCP6_PACKET *Packet)
EFI_STATUS EFIAPI EfiDhcp6Release(IN EFI_DHCP6_PROTOCOL *This, IN UINT32 AddressCount, IN EFI_IPv6_ADDRESS *Addresses)
EFI_STATUS EFIAPI EfiDhcp6Decline(IN EFI_DHCP6_PROTOCOL *This, IN UINT32 AddressCount, IN EFI_IPv6_ADDRESS *Addresses)
EFI_STATUS EFIAPI EfiDhcp6Parse(IN EFI_DHCP6_PROTOCOL *This, IN EFI_DHCP6_PACKET *Packet, IN OUT UINT32 *OptionCount, OUT EFI_DHCP6_PACKET_OPTION *PacketOptionList[] OPTIONAL)
EFI_STATUS EFIAPI EfiDhcp6Configure(IN EFI_DHCP6_PROTOCOL *This, IN EFI_DHCP6_CONFIG_DATA *Dhcp6CfgData OPTIONAL)
EFI_STATUS EFIAPI EfiDhcp6InfoRequest(IN EFI_DHCP6_PROTOCOL *This, IN BOOLEAN SendClientId, IN EFI_DHCP6_PACKET_OPTION *OptionRequest, IN UINT32 OptionCount, IN EFI_DHCP6_PACKET_OPTION *OptionList[] OPTIONAL, IN EFI_DHCP6_RETRANSMISSION *Retransmission, IN EFI_EVENT TimeoutEvent OPTIONAL, IN EFI_DHCP6_INFO_CALLBACK ReplyCallback, IN VOID *CallbackContext OPTIONAL)
EFI_STATUS EFIAPI EfiDhcp6RenewRebind(IN EFI_DHCP6_PROTOCOL *This, IN BOOLEAN RebindRequest)
EFI_STATUS EFIAPI EfiDhcp6Start(IN EFI_DHCP6_PROTOCOL *This)
EFI_STATUS EFIAPI EfiDhcp6GetModeData(IN EFI_DHCP6_PROTOCOL *This, OUT EFI_DHCP6_MODE_DATA *Dhcp6ModeData OPTIONAL, OUT EFI_DHCP6_CONFIG_DATA *Dhcp6ConfigData OPTIONAL)
EFI_STATUS EFIAPI EfiDhcp6Stop(IN EFI_DHCP6_PROTOCOL *This)