]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/IpSecDxe/IkeService.h
NetworkPkg: Fix hang issue after system reconnected when IPSec has set up
[mirror_edk2.git] / NetworkPkg / IpSecDxe / IkeService.h
index 215fb93fdd2abeadcf80bc6bf8a2d0e14b3ab632..0e05dfe9764a1e2a712a95575d8cd92ec7861e55 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Prototypes definitions of IKE service.\r
-  \r
-  Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>\r
+\r
+  Copyright (c) 2010 - 2015, 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
@@ -19,6 +19,7 @@
 #include "Ike.h"\r
 #include "IpSecImpl.h"\r
 #include "IkeCommon.h"\r
+#include "Ikev2/Utility.h"\r
 \r
 #define IPSEC_CRYPTO_LIB_MEMORY 128 * 1024\r
 \r
@@ -44,7 +45,7 @@ EFI_STATUS
   );\r
 \r
 /**\r
-  This is prototype definition fo general interface to start a IKE negotiation at Quick Mode. \r
+  This is prototype definition fo general interface to start a IKE negotiation at Quick Mode.\r
 \r
   This function will be called when the related IKE SA is existed and start to\r
   create a Child SA.\r
@@ -81,7 +82,7 @@ EFI_STATUS
   );\r
 \r
 /**\r
-  This is prototype definition of the general interface when recived a IKE Pakcet \r
+  This is prototype definition of the general interface when recived a IKE Pakcet\r
   for the IKE SA establishing.\r
 \r
   @param[in]  UdpService      Point to UDP service used to send IKE Packet.\r
@@ -97,8 +98,8 @@ VOID
 \r
 /**\r
   This is prototyp definition of the general interface when recived a IKE Packet\r
-  xfor the Child SA establishing. \r
\r
+  xfor the Child SA establishing.\r
+\r
   @param[in]  UdpService      Point to UDP service used to send IKE packet.\r
   @param[in]  IkePacket       Point to received IKE packet.\r
 \r
@@ -111,7 +112,7 @@ VOID
   );\r
 \r
 /**\r
-  This is prototype definition of the general interface when received a IKE \r
+  This is prototype definition of the general interface when received a IKE\r
   information Packet.\r
 \r
   @param[in]  UdpService      Point to UDP service used to send IKE packet.\r
@@ -137,55 +138,59 @@ typedef struct _IKE_EXCHANGE_INTERFACE {
 \r
 /**\r
   Open and configure a UDPIO of Udp4 for IKE packet receiving.\r
-  \r
-  This function is called at the IPsecDriverBinding start. IPsec create a UDP4 and  \r
+\r
+  This function is called at the IPsecDriverBinding start. IPsec create a UDP4 and\r
   a UDP4 IO for each NIC handle.\r
-  \r
+\r
   @param[in] Private        Point to IPSEC_PRIVATE_DATA\r
   @param[in] Controller     Handler for NIC card.\r
-  \r
+  @param[in] ImageHandle    The handle that contains the EFI_DRIVER_BINDING_PROTOCOL instance.\r
+\r
   @retval EFI_SUCCESS             The Operation is successful.\r
   @retval EFI_OUT_OF_RESOURCE     The required system resource can't be allocated.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 IkeOpenInputUdp4 (\r
   IN IPSEC_PRIVATE_DATA             *Private,\r
-  IN EFI_HANDLE                     Controller\r
+  IN EFI_HANDLE                     Controller,\r
+  IN EFI_HANDLE                     ImageHandle\r
   );\r
 \r
 /**\r
   Open and configure a UDPIO of Udp6 for IKE packet receiving.\r
-  \r
+\r
   This function is called at the IPsecDriverBinding start. IPsec create a UDP6 and UDP6\r
   IO for each NIC handle.\r
-  \r
+\r
   @param[in] Private        Point to IPSEC_PRIVATE_DATA\r
   @param[in] Controller     Handler for NIC card.\r
-  \r
+  @param[in] ImageHandle    The handle that contains the EFI_DRIVER_BINDING_PROTOCOL instance.\r
+\r
   @retval EFI_SUCCESS             The Operation is successful.\r
   @retval EFI_OUT_OF_RESOURCE     The required system resource can't be allocated.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 IkeOpenInputUdp6 (\r
   IN IPSEC_PRIVATE_DATA             *Private,\r
-  IN EFI_HANDLE                     Controller\r
+  IN EFI_HANDLE                     Controller,\r
+  IN EFI_HANDLE                     ImageHandle\r
   );\r
 \r
 /**\r
   The general interface of starting IPsec Key Exchange.\r
-  \r
+\r
   This function is called when start a IKE negotiation to get a Key.\r
-  \r
-  @param[in] UdpService   Point to IKE_UDP_SERVICE which will be used for \r
+\r
+  @param[in] UdpService   Point to IKE_UDP_SERVICE which will be used for\r
                           IKE packet sending.\r
   @param[in] SpdEntry     Point to the SPD entry related to the IKE negotiation.\r
   @param[in] RemoteIp     Point to EFI_IP_ADDRESS related to the IKE negotiation.\r
-  \r
+\r
   @retval EFI_SUCCESS          The Operation is successful.\r
   @retval EFI_ACCESS_DENIED    No related PAD entry was found.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 IkeNegotiate (\r
@@ -196,15 +201,15 @@ IkeNegotiate (
 \r
 /**\r
   The general interface when receive a IKE packet.\r
-  \r
+\r
   This function is called when UDP IO receives a IKE packet.\r
-  \r
+\r
   @param[in] Packet       Point to received IKE packet.\r
-  @param[in] EndPoint     Point to UDP_END_POINT which contains the information of \r
+  @param[in] EndPoint     Point to UDP_END_POINT which contains the information of\r
                           Remote IP and Port.\r
   @param[in] IoStatus     The Status of Recieve Token.\r
   @param[in] Context      Point to data passed from the caller.\r
-    \r
+\r
 **/\r
 VOID\r
 EFIAPI\r
@@ -235,17 +240,19 @@ IkeLookupUdp (
 \r
 /**\r
   Delete all established IKE SAs and related Child SAs.\r
-  \r
-  This function is the subfunction of the IpSecCleanupAllSa(). It first calls  \r
-  IkeDeleteChildSa() to delete all Child SAs then send out the related \r
+\r
+  This function is the subfunction of the IpSecCleanupAllSa(). It first calls\r
+  IkeDeleteChildSa() to delete all Child SAs then send out the related\r
   Information packet.\r
 \r
-  @param[in]  Private  Pointer of the IPSEC_PRIVATE_DATA.\r
+  @param[in]  Private           Pointer of the IPSEC_PRIVATE_DATA.\r
+  @param[in]  IsDisableIpsec    Indicate whether needs to disable IPsec.\r
 \r
 **/\r
 VOID\r
 IkeDeleteAllSas (\r
-  IN IPSEC_PRIVATE_DATA             *Private\r
+  IN IPSEC_PRIVATE_DATA             *Private,\r
+  IN BOOLEAN                        IsDisableIpsec\r
   );\r
 \r
 \r