/** @file\r
Dhcp6 support functions declaration.\r
\r
- Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
#define __EFI_DHCP6_UTILITY_H__\r
\r
\r
-#define DHCP6_10_BIT_MASK 0x3ff\r
+#define DHCP6_10_BIT_MASK 0x3ff\r
+#define DHCP6_DAD_ADDITIONAL_DELAY 30000000 // 3 seconds\r
\r
/**\r
Generate client Duid in the format of Duid-llt.\r
/**\r
The callback routine once message transmitted.\r
\r
- @param[in] Udp6Wrap The pointer to the received net buffer.\r
+ @param[in] Wrap The pointer to the received net buffer.\r
@param[in] EndPoint The pointer to the udp end point.\r
@param[in] IoStatus The return status from udp io.\r
@param[in] Context The opaque parameter to the function.\r
@param[in] Ia The pointer to the Ia.\r
@param[in] T1 The time of T1.\r
@param[in] T2 The time of T2.\r
+ @param[in] MessageType Message type of DHCP6 package.\r
\r
@return Buf The position to append the next Ia option.\r
\r
IN OUT UINT8 *Buf,\r
IN EFI_DHCP6_IA *Ia,\r
IN UINT32 T1,\r
- IN UINT32 T2\r
+ IN UINT32 T2,\r
+ IN UINT32 MessageType\r
);\r
\r
/**\r
/**\r
Parse the address option and update the address info.\r
\r
+ @param[in] CurrentIa The pointer to the Ia Address in control blcok.\r
@param[in] IaInnerOpt The pointer to the buffer.\r
@param[in] IaInnerLen The length to parse.\r
@param[out] AddrNum The number of addresses.\r
**/\r
VOID\r
Dhcp6ParseAddrOption (\r
+ IN EFI_DHCP6_IA *CurrentIa,\r
IN UINT8 *IaInnerOpt,\r
IN UINT16 IaInnerLen,\r
OUT UINT32 *AddrNum,\r
@retval EFI_NOT_FOUND No valid IA option is found.\r
@retval EFI_SUCCESS Create an IA control block successfully.\r
@retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.\r
+ @retval EFI_DEVICE_ERROR An unexpected error.\r
\r
**/\r
EFI_STATUS\r
IN DHCP6_INSTANCE *Instance\r
);\r
\r
+/**\r
+ Calculate the Dhcp6 get mapping timeout by adding additinal delay to the IP6 DAD transmits count.\r
+\r
+ @param[in] Ip6Cfg The pointer to Ip6 config protocol.\r
+ @param[out] TimeOut The time out value in 100ns units.\r
+\r
+ @retval EFI_INVALID_PARAMETER Input parameters are invalid.\r
+ @retval EFI_SUCCESS Calculate the time out value successfully.\r
+**/\r
+EFI_STATUS\r
+Dhcp6GetMappingTimeOut (\r
+ IN EFI_IP6_CONFIG_PROTOCOL *Ip6Cfg,\r
+ OUT UINTN *TimeOut\r
+ );\r
#endif\r