/** @file\r
IKE Packet related operation.\r
\r
- Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2010 - 2018, 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
-\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
\r
IkePacket->RefCount = 1;\r
InitializeListHead (&IkePacket->PayloadList);\r
- \r
+\r
IkePacket->Header = (IKE_HEADER *) AllocateZeroPool (sizeof (IKE_HEADER));\r
if (IkePacket->Header == NULL) {\r
FreePool (IkePacket);\r
\r
/**\r
Callback funtion of NetbufFromExt()\r
- \r
- @param[in] Arg The data passed from the NetBufFromExe(). \r
+\r
+ @param[in] Arg The data passed from the NetBufFromExe().\r
\r
**/\r
VOID\r
\r
/**\r
Copy the NetBuf into a IKE_PACKET sturcture.\r
- \r
- Create a IKE_PACKET and fill the received IKE header into the header of IKE_PACKET \r
+\r
+ Create a IKE_PACKET and fill the received IKE header into the header of IKE_PACKET\r
and copy the recieved packet without IKE HEADER to the PayloadBuf of IKE_PACKET.\r
\r
- @param[in] Netbuf The pointer of the Netbuf which contains the whole received \r
+ @param[in] Netbuf The pointer of the Netbuf which contains the whole received\r
IKE packet.\r
\r
@return The pointer of the IKE_PACKET which contains the received packet.\r
\r
@param[in] SessionCommon Pointer of related IKE_COMMON_SESSION\r
@param[in] IkePacket Pointer of IKE_PACKET to be copy to NetBuf\r
- @param[in] IkeType The IKE type to pointer the packet is for which IKE \r
- phase. Now it supports IKE_SA_TYPE, IKE_CHILDSA_TYPE, \r
+ @param[in] IkeType The IKE type to pointer the packet is for which IKE\r
+ phase. Now it supports IKE_SA_TYPE, IKE_CHILDSA_TYPE,\r
IKE_INFO_TYPE.\r
\r
@return a pointer of Netbuff which contains the IKE_PACKE in network order.\r
- \r
+\r
**/\r
NET_BUF *\r
IkeNetbufFromPacket (\r
if (EFI_ERROR (RetStatus)) {\r
return NULL;\r
}\r
- \r
+\r
} else {\r
//\r
// If IKEv1 support, check it here.\r
// Get the number of the payloads\r
//\r
NET_LIST_FOR_EACH (PacketEntry, &(IkePacket)->PayloadList) {\r
- \r
+\r
NumPayloads++;\r
}\r
//\r
IkePacketNetbufFree,\r
NULL\r
);\r
- \r
+\r
FreePool (Fragments);\r
return Netbuf;\r
}\r