Functions | |
IKE_PACKET * | IkePacketAlloc (VOID) |
VOID | IkePacketFree (IN IKE_PACKET *IkePacket) |
VOID EFIAPI | IkePacketNetbufFree (IN VOID *Arg) |
IKE_PACKET * | IkePacketFromNetbuf (IN NET_BUF *Netbuf) |
NET_BUF * | IkeNetbufFromPacket (IN UINT8 *SessionCommon, IN IKE_PACKET *IkePacket, IN UINTN IkeType) |
Copyright (c) 2010, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php.
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
NET_BUF* IkeNetbufFromPacket | ( | IN UINT8 * | SessionCommon, | |
IN IKE_PACKET * | IkePacket, | |||
IN UINTN | IkeType | |||
) |
Convert the format from IKE_PACKET to NetBuf.
[in] | SessionCommon | Pointer of related IKE_COMMON_SESSION |
[in] | IkePacket | Pointer of IKE_PACKET to be copy to NetBuf |
[in] | IkeType | The IKE type to pointer the packet is for which IKE phase. Now it supports IKE_SA_TYPE, IKE_CHILDSA_TYPE, IKE_INFO_TYPE. |
References IKE_PAYLOAD_BY_PACKET, IkePacketNetbufFree(), Ikev2EncodePacket(), IKE_PAYLOAD::PayloadBuf, and IKE_PAYLOAD::PayloadSize.
Referenced by Ikev2SendIkePacket().
IKE_PACKET* IkePacketAlloc | ( | VOID | ) |
Allocate a buffer for the IKE_PACKET and intitalize its Header and payloadlist.
References IKE_PACKET::Header, IKE_PACKET::PayloadList, and IKE_PACKET::RefCount.
Referenced by IkePacketFromNetbuf(), Ikev2AuthCertGenerator(), Ikev2AuthPskGenerator(), Ikev2CreateChildGenerator(), Ikev2InfoGenerator(), and Ikev2InitPskGenerator().
VOID IkePacketFree | ( | IN IKE_PACKET * | IkePacket | ) |
Free the IkePacket by the specified IKE_PACKET pointer.
[in] | IkePacket | The pointer of the IKE_PACKET to be freed. |
References IKE_PAYLOAD_BY_PACKET, and IkePayloadFree().
Referenced by IkeDispatch(), IkePacketFromNetbuf(), Ikev2HandleChildSa(), Ikev2InitPskGenerator(), Ikev2NegotiateChildSa(), Ikev2NegotiateInfo(), Ikev2NegotiateSa(), Ikev2OnPacketSent(), Ikev2SaSessionCommonFree(), Ikev2SendIkePacket(), and Ikev2SessionCommonRefresh().
IKE_PACKET* IkePacketFromNetbuf | ( | IN NET_BUF * | Netbuf | ) |
Copy the NetBuf into a IKE_PACKET sturcture.
Create a IKE_PACKET and fill the received IKE header into the header of IKE_PACKET and copy the recieved packet without IKE HEADER to the PayloadBuf of IKE_PACKET.
[in] | Netbuf | The pointer of the Netbuf which contains the whole received IKE packet. |
References IKE_PACKET::Header, IkeHdrNetToHost(), IkePacketAlloc(), IkePacketFree(), IKE_HEADER::Length, IKE_PACKET::PayloadsBuf, and IKE_PACKET::PayloadTotalSize.
Referenced by IkeDispatch().
VOID EFIAPI IkePacketNetbufFree | ( | IN VOID * | Arg | ) |
Callback funtion of NetbufFromExt()
[in] | Arg | The data passed from the NetBufFromExe(). |
Referenced by IkeNetbufFromPacket().