NetworkPkg/IpSecDxe/IkePacket.h File Reference


Defines

#define IKE_PACKET_REF(p)   ((p)->RefCount++)

Functions

IKE_PACKETIkePacketAlloc (VOID)
VOID IkePacketFree (IN IKE_PACKET *IkePacket)
IKE_PACKETIkePacketFromNetbuf (IN NET_BUF *Netbuf)
NET_BUF * IkeNetbufFromPacket (IN UINT8 *SessionCommon, IN IKE_PACKET *IkePacket, IN UINTN IkeType)

Detailed Description

IKE Packet related definitions and function declarations.

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.


Define Documentation

#define IKE_PACKET_REF (  )     ((p)->RefCount++)

Referenced by Ikev2SendIkePacket().


Function Documentation

NET_BUF* IkeNetbufFromPacket ( IN UINT8 *  SessionCommon,
IN IKE_PACKET IkePacket,
IN UINTN  IkeType 
)

Convert the format from IKE_PACKET to NetBuf.

Parameters:
[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.
Returns:
A pointer of Netbuff which contains the contents of the IKE_PACKE in network order.
Convert the format from IKE_PACKET to NetBuf.

Parameters:
[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.
Returns:
a pointer of Netbuff which contains the IKE_PACKE in network order.

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.

Returns:
The pointer of the IKE_PACKET.

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  ) 

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.

Parameters:
[in] Netbuf The pointer of the Netbuf which contains the whole received IKE packet.
Returns:
The pointer of the IKE_PACKET which contains the received packet.

References IKE_PACKET::Header, IkeHdrNetToHost(), IkePacketAlloc(), IkePacketFree(), IKE_HEADER::Length, IKE_PACKET::PayloadsBuf, and IKE_PACKET::PayloadTotalSize.

Referenced by IkeDispatch().


Generated on Mon Sep 28 08:49:06 2015 for NetworkPkg[ALL] by  doxygen 1.5.7.1