NetworkPkg/Application/IpsecConfig/Helper.h File Reference


Defines

#define FORMAT_NUMBER   0x1
#define FORMAT_STRING   0x2

Functions

EFI_STATUS GetNumber (IN CHAR16 *FlagStr, IN UINT64 Maximum, IN OUT VOID *ValuePtr, IN UINTN ByteCount, IN STR2INT *Map, IN LIST_ENTRY *ParamPackage, IN UINT32 FormatMask)
EFI_STATUS EfiInetAddr2 (IN CHAR16 *Ptr, OUT EFI_IP_ADDRESS *Ip)
EFI_STATUS EfiInetAddrRange (IN CHAR16 *Ptr, OUT EFI_IP_ADDRESS_INFO *Addr)
EFI_STATUS EfiInetPortRange (IN CHAR16 *Ptr, OUT UINT16 *Port, OUT UINT16 *PortRange)
UINT64 StrToUInteger (IN CONST CHAR16 *Str, OUT EFI_STATUS *Status)
UINT32 MapStringToInteger (IN CONST CHAR16 *Str, IN STR2INT *Map)
CHAR16 * MapIntegerToString (IN UINT32 Integer, IN STR2INT *Map)

Detailed Description

The assistant function declaration for IpSecConfig application.

Copyright (c) 2009 - 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 FORMAT_NUMBER   0x1

#define FORMAT_STRING   0x2


Function Documentation

EFI_STATUS EfiInetAddr2 ( IN CHAR16 *  Ptr,
OUT EFI_IP_ADDRESS *  Ip 
)

Helper function called to convert a string containing an (Ipv4) Internet Protocol dotted address into a proper address for the EFI_IP_ADDRESS structure.

Parameters:
[in] Ptr The pointer to the string containing an (Ipv4) Internet Protocol dotted address.
[out] Ip The pointer to the Ip address structure to contain the result.
Return values:
EFI_SUCCESS The operation completed successfully.
EFI_INVALID_PARAMETER Invalid parameter.
Helper function called to convert a string containing an Ipv4 or Ipv6 Internet Protocol address into a proper address for the EFI_IP_ADDRESS structure.

Parameters:
[in] Ptr The pointer to the string containing an Ipv4 or Ipv6 Internet Protocol address.
[out] Ip The pointer to the EFI_IP_ADDRESS structure to contain the result.
Return values:
EFI_SUCCESS The operation completed successfully.
EFI_INVALID_PARAMETER Invalid parameter.

Referenced by ConstructSadIndexer(), CreateSadEntry(), and CreateSpdEntry().

EFI_STATUS EfiInetAddrRange ( IN CHAR16 *  Ptr,
OUT EFI_IP_ADDRESS_INFO *  Addr 
)

Helper function called to calculate the prefix length associated with the string containing an Ipv4 or Ipv6 Internet Protocol address.

Parameters:
[in] Ptr The pointer to the string containing an Ipv4 or Ipv6 Internet Protocol address.
[out] Addr The pointer to the EFI_IP_ADDRESS_INFO structure to contain the result.
Return values:
EFI_SUCCESS The operation completed successfully.
EFI_INVALID_PARAMETER Invalid parameter.
Others Other mistake case.

Referenced by ConstructPadIndexer(), CreatePadEntry(), and CreateSpdSelector().

EFI_STATUS EfiInetPortRange ( IN CHAR16 *  Ptr,
OUT UINT16 *  Port,
OUT UINT16 *  PortRange 
)

Helper function called to calculate the port range associated with the string.

Parameters:
[in] Ptr The pointer to the string containing a port and range.
[out] Port The pointer to the Port to contain the result.
[out] PortRange The pointer to the PortRange to contain the result.
Return values:
EFI_SUCCESS The operation completed successfully.
EFI_INVALID_PARAMETER Invalid parameter.
Others Other mistake case.

References StrToUInteger().

Referenced by CreateSpdSelector().

EFI_STATUS GetNumber ( IN CHAR16 *  FlagStr,
IN UINT64  Maximum,
IN OUT VOID *  ValuePtr,
IN UINTN  ByteCount,
IN STR2INT Map,
IN LIST_ENTRY *  ParamPackage,
IN UINT32  FormatMask 
)

Helper function called to change input parameter in string format to number.

Parameters:
[in] FlagStr The pointer to the flag string.
[in] Maximum most value number.
[in,out] ValuePtr The pointer to the input parameter in string format.
[in] ByteCount The valid byte count
[in] Map The pointer to the STR2INT table.
[in] ParamPackage The pointer to the ParamPackage list.
[in] FormatMask The bit mask. BIT 0 set indicates the value of flag might be number. BIT 1 set indicates the value of flag might be a string that needs to be looked up.
Return values:
EFI_SUCCESS The operation completed successfully.
EFI_NOT_FOUND The input parameter can't be found.
EFI_INVALID_PARAMETER The input parameter is an invalid input.
Helper function called to change an input parameter in the string format to a number.

Parameters:
[in] FlagStr The pointer to the flag string.
[in] Maximum Greatest value number.
[in,out] ValuePtr The pointer to the input parameter in string format.
[in] ByteCount The valid byte count
[in] Map The pointer to the STR2INT table.
[in] ParamPackage The pointer to the ParamPackage list.
[in] FormatMask The bit mask. BIT 0 set indicates the value of a flag might be a number. BIT 1 set indicates the value of a flag might be a string that needs to be looked up.
Return values:
EFI_SUCCESS The operation completed successfully.
EFI_NOT_FOUND The input parameter can't be found.
EFI_INVALID_PARAMETER The input parameter is an invalid input.

References FORMAT_NUMBER, FORMAT_STRING, mAppName, MapStringToInteger(), mHiiHandle, and StrToUInteger().

Referenced by ConstructSadIndexer(), CreatePadEntry(), CreateSadEntry(), CreateSpdEntry(), and CreateSpdSelector().

CHAR16* MapIntegerToString ( IN UINT32  Integer,
IN STR2INT Map 
)

Helper function called to transfer an unsigned integer to a string according to the map table.

Parameters:
[in] Integer The pointer to the string.
[in] Map The pointer to the map table.
Returns:
The converted str. If not found, then return NULL.
Helper function called to transfer an unsigned integer to a string according to the map table.

Parameters:
[in] Integer The pointer to the string.
[in] Map The pointer to the map table.
Returns:
The converted Str. If not found, then return NULL.

References STR2INT::Integer, and STR2INT::String.

Referenced by DumpPadEntry(), DumpSadEntry(), DumpSpdEntry(), and DumpSpdSelector().

UINT32 MapStringToInteger ( IN CONST CHAR16 *  Str,
IN STR2INT Map 
)

Helper function called to transfer a string to an unsigned integer according to the map table.

Parameters:
[in] Str The pointer to the string.
[in] Map The pointer to the map table.
Returns:
The integer value of converted str. If not found, then return -1.
Helper function called to transfer a string to an unsigned integer according to the map table.

Parameters:
[in] Str The pointer to the string.
[in] Map The pointer to the map table.
Returns:
The integer value of converted Str. If not found, then return -1.

References STR2INT::Integer, and STR2INT::String.

Referenced by GetNumber(), and InitializeIpSecConfig().

UINT64 StrToUInteger ( IN CONST CHAR16 *  Str,
OUT EFI_STATUS *  Status 
)

Helper function called to transfer a string to an unsigned integer.

Parameters:
[in] Str The pointer to the string.
[out] Status The operation status.
Returns:
The integer value of a converted str.
Helper function called to transfer a string to an unsigned integer.

Parameters:
[in] Str The pointer to the string.
[out] Status The operation status.
Returns:
The integer value of converted Str.

Referenced by ConstructPadIndexer(), ConstructSadIndexer(), ConstructSpdIndexer(), EfiInetPortRange(), and GetNumber().


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