EDK2 doxygen online documents - Firmware Encoding Index 1
EDK2 doxygen online documents - Firmware Encoding Index
Defines | Functions

NetworkPkg/IpSecDxe/IkePacket.h File Reference

#include "Ike.h"

Go to the source code of this file.

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_BUFIkeNetbufFromPacket (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.

Definition in file IkePacket.h.


Define Documentation

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

Definition at line 21 of file IkePacket.h.


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]SessionCommonPointer of related IKE_COMMON_SESSION
[in]IkePacketPointer of IKE_PACKET to be copy to NetBuf
[in]IkeTypeThe 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]SessionCommonPointer of related IKE_COMMON_SESSION
[in]IkePacketPointer of IKE_PACKET to be copy to NetBuf
[in]IkeTypeThe 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.

Definition at line 185 of file IkePacket.c.

IKE_PACKET* IkePacketAlloc ( VOID  )

Allocate a buffer for the IKE_PACKET and intitalize its Header and payloadlist.

Returns:
The pointer of the IKE_PACKET.

Definition at line 26 of file IkePacket.c.

VOID IkePacketFree ( IN IKE_PACKET IkePacket)

Free the IkePacket by the specified IKE_PACKET pointer.

Parameters:
[in]IkePacketThe pointer of the IKE_PACKET to be freed.

Definition at line 55 of file IkePacket.c.

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]NetbufThe pointer of the Netbuf which contains the whole received IKE packet.
Returns:
The pointer of the IKE_PACKET which contains the received packet.

Definition at line 125 of file IkePacket.c.

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Defines