/** @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
#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
);\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
);\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
\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
);\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
\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
\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
\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