]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/IpSecDxe/IkeService.h
NetworkPkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / NetworkPkg / IpSecDxe / IkeService.h
index 232ecf3d96953eed6d1288d1f90c1d413b758d5d..36c925bdd2d3bd9ec6564e41572b05ddb1f95b96 100644 (file)
@@ -1,15 +1,9 @@
 /** @file\r
   Prototypes definitions of IKE service.\r
-  \r
-  Copyright (c) 2010, 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
-  which accompanies this distribution.  The full text of the license may be found at\r
-  http://opensource.org/licenses/bsd-license.php.\r
+  Copyright (c) 2010 - 2015, Intel Corporation. All rights reserved.<BR>\r
 \r
-  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+  SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 \r
@@ -19,6 +13,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 +39,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 +76,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 +92,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 +106,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 +132,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 +195,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
@@ -219,7 +218,7 @@ IkeDispatch (
   Check if the NIC handle is binded to a Udp service.\r
 \r
   @param[in]  Private    Pointer of IPSEC_PRIVATE_DATA\r
-  @param[in]  NicHandle  The Handle of the NIC card\r
+  @param[in]  Handle     The Handle of the NIC card\r
   @param[in]  IpVersion  The version of the IP stack.\r
 \r
   @return a pointer of IKE_UDP_SERVICE.\r
@@ -235,17 +234,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