NetworkPkg/IpSecDxe/IkeCommon.c File Reference


Functions

UINT64 IkeGenerateCookie (VOID)
UINT8 * IkeGenerateNonce (IN UINTN NonceSize)
VOID IkeHdrNetToHost (IN OUT IKE_HEADER *Header)
VOID IkeHdrHostToNet (IN OUT IKE_HEADER *Header)
IKE_PAYLOADIkePayloadAlloc (VOID)
VOID IkePayloadFree (IN IKE_PAYLOAD *IkePayload)
UINT32 IkeGenerateSpi (VOID)
EFI_STATUS IkeGenerateIv (IN UINT8 *IvBuffer, IN UINTN IvSize)
IPSEC_SPD_ENTRYIkeSearchSpdEntry (IN EFI_IPSEC_SPD_SELECTOR *SpdSel)
UINT8 IkeGetVersionFromSession (IN UINT8 *Session)

Variables

UINT32 mNextSpi = IKE_SPI_BASE

Detailed Description

Common operation of the IKE

Copyright (c) 2010 - 2015, 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.


Function Documentation

UINT64 IkeGenerateCookie ( VOID   ) 

Call Crypto Lib to generate a random value with eight-octet length.

Returns:
the 64 byte vaule.

References IpSecCryptoIoGenerateRandomBytes().

Referenced by Ikev2InitPskParser(), and Ikev2SaSessionAlloc().

EFI_STATUS IkeGenerateIv ( IN UINT8 *  IvBuffer,
IN UINTN  IvSize 
)

Generate a random data for IV

Parameters:
[in] IvBuffer The pointer of the IV buffer.
[in] IvSize The IV size.
Return values:
EFI_SUCCESS Create a random data for IV.
otherwise Failed.

References IpSecCryptoIoGenerateRandomBytes().

Referenced by Ikev2EncryptPacket().

UINT8* IkeGenerateNonce ( IN UINTN  NonceSize  ) 

Generate the random data for Nonce payload.

Parameters:
[in] NonceSize Size of the data in bytes.
Returns:
Buffer which contains the random data of the spcified size.

References IpSecCryptoIoGenerateRandomBytes().

Referenced by Ikev2InitPskGenerator(), and Ikev2InitPskParser().

UINT32 IkeGenerateSpi ( VOID   ) 

Generate an new SPI.

Returns:
a SPI in 4 bytes.

References mNextSpi.

Referenced by Ikev2ChildSaSessionAlloc().

UINT8 IkeGetVersionFromSession ( IN UINT8 *  Session  ) 

Get the IKE Version from the IKE_SA_SESSION.

Parameters:
[in] Session Pointer of the IKE_SA_SESSION.

References IKEV2_SA_SESSION_SIGNATURE.

Referenced by IkeDeleteAllSas(), and IkeNegotiate().

VOID IkeHdrHostToNet ( IN OUT IKE_HEADER Header  ) 

Convert the IKE Header from Host order to Network order.

Parameters:
[in,out] Header The pointer of the IKE_HEADER.

Referenced by Ikev2DecryptPacket(), Ikev2EncodePacket(), and Ikev2EncryptPacket().

VOID IkeHdrNetToHost ( IN OUT IKE_HEADER Header  ) 

Convert the IKE Header from Network order to Host order.

Parameters:
[in,out] Header The pointer of the IKE_HEADER.

Referenced by IkePacketFromNetbuf(), and Ikev2DecodePacket().

IKE_PAYLOAD* IkePayloadAlloc ( VOID   ) 

VOID IkePayloadFree ( IN IKE_PAYLOAD IkePayload  ) 

IPSEC_SPD_ENTRY* IkeSearchSpdEntry ( IN EFI_IPSEC_SPD_SELECTOR *  SpdSel  ) 

Find SPD entry by a specified SPD selector.

Parameters:
[in] SpdSel Point to SPD Selector to be searched for.
Return values:
Point to SPD Entry if the SPD entry found.
NULL if not found.

References CompareSpdSelector(), IPSEC_SPD_ENTRY_FROM_LIST, mConfigData, and _IPSEC_SPD_ENTRY::Selector.

Referenced by Ikev2MatchSpdEntry().


Variable Documentation

UINT32 mNextSpi = IKE_SPI_BASE

Referenced by IkeGenerateSpi().


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