]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/Dhcp6Dxe/Dhcp6Utility.h
BaseTools/Capsule: Do not support -o with --dump-info
[mirror_edk2.git] / NetworkPkg / Dhcp6Dxe / Dhcp6Utility.h
index 61bb9f324e9a04156f15c7b3fa863e5738d258ff..8c3151e306c0558adfd1bf0162d7d1a5d3e1180d 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Dhcp6 support functions declaration.\r
 \r
 /** @file\r
   Dhcp6 support functions declaration.\r
 \r
-  Copyright (c) 2009 - 2011, 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
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -17,7 +17,8 @@
 #define __EFI_DHCP6_UTILITY_H__\r
 \r
 \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
 /**\r
   Generate client Duid in the format of Duid-llt.\r
@@ -191,6 +192,7 @@ Dhcp6AppendOption (
   @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]      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
 \r
   @return         Buf           The position to append the next Ia option.\r
 \r
@@ -200,7 +202,8 @@ Dhcp6AppendIaOption (
   IN OUT UINT8                  *Buf,\r
   IN     EFI_DHCP6_IA           *Ia,\r
   IN     UINT32                 T1,\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
 \r
 /**\r
@@ -273,6 +276,7 @@ Dhcp6SeekIaOption (
 /**\r
   Parse the address option and update the address info.\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
   @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
@@ -281,6 +285,7 @@ Dhcp6SeekIaOption (
 **/\r
 VOID\r
 Dhcp6ParseAddrOption (\r
 **/\r
 VOID\r
 Dhcp6ParseAddrOption (\r
+  IN     EFI_DHCP6_IA            *CurrentIa,\r
   IN     UINT8                   *IaInnerOpt,\r
   IN     UINT16                  IaInnerLen,\r
      OUT UINT32                  *AddrNum,\r
   IN     UINT8                   *IaInnerOpt,\r
   IN     UINT16                  IaInnerLen,\r
      OUT UINT32                  *AddrNum,\r
@@ -299,6 +304,7 @@ Dhcp6ParseAddrOption (
   @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_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
 \r
 **/\r
 EFI_STATUS\r
@@ -337,4 +343,18 @@ Dhcp6AppendCacheIa (
   IN DHCP6_INSTANCE           *Instance\r
   );\r
 \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
 #endif\r