119 lines
3.9 KiB
C
119 lines
3.9 KiB
C
/*
|
|
******************************************************************************
|
|
* HEADER FILE
|
|
*
|
|
* Document no: @(#) $Name: VXWORKS_ITER40_2019102207 $ $RCSfile: ipike_doi.h,v $ $Revision: 1.2 $
|
|
* $Source: /home/interpeak/CVSRoot/ipike/src/ipike_doi.h,v $
|
|
* $Author: edahlber $ $Date: 2010-04-23 15:31:40 $
|
|
* $State: Exp $ $Locker: $
|
|
*
|
|
* INTERPEAK_COPYRIGHT_STRING
|
|
* Design and implementation by Kenneth Jonsson <kenneth@interpeak.se>
|
|
******************************************************************************
|
|
*/
|
|
#ifndef IPIKE_DOI_H
|
|
#define IPIKE_DOI_H
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 1 DESCRIPTION
|
|
****************************************************************************
|
|
*/
|
|
|
|
/* Constants and 'to_string' functions releated to domain of interpretation
|
|
(DOI) */
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 2 CONFIGURATION
|
|
****************************************************************************
|
|
*/
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 3 INCLUDE FILES
|
|
****************************************************************************
|
|
*/
|
|
|
|
#include "ipike_config.h"
|
|
#include "ipike.h"
|
|
#include "ipike_isakmp.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 4 DEFINES
|
|
****************************************************************************
|
|
*/
|
|
|
|
#define IPIKE_DOI_ISAKMP 0
|
|
#define IPIKE_DOI_IPSEC 1
|
|
|
|
#define IPIKE_DOI_COUNT 2
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 5 TYPES
|
|
****************************************************************************
|
|
*/
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 6 FUNCTIONS
|
|
****************************************************************************
|
|
*/
|
|
|
|
/*
|
|
*===========================================================================
|
|
* ipike_doi_to_string
|
|
*===========================================================================
|
|
* Description: Returns the string represenation of the DOI.
|
|
* Parameters: doi - the domain of interpretation.
|
|
* Returns: The string represenation of the DOI.
|
|
*/
|
|
IP_GLOBAL const char*
|
|
ipike_doi_to_string(Ip_u32 doi);
|
|
|
|
/*
|
|
*===========================================================================
|
|
* ipike_doi_from_string
|
|
*===========================================================================
|
|
* Description: Returns the numeric represenation of the DOI, given the string
|
|
* representation.
|
|
* Parameters: str_doi - The string representation of the DOI.
|
|
* doi - Will hold the domain of interpretation.
|
|
* Returns: IPIKE_SUCCESS
|
|
* IPIKE_VALUE_NOT_FOUND
|
|
*/
|
|
IP_GLOBAL Ipike_error
|
|
ipike_doi_from_string(const char* str_doi, Ip_u32* doi);
|
|
|
|
/*
|
|
*===========================================================================
|
|
* ipike_get_doi
|
|
*===========================================================================
|
|
* Description: Gets the DOI from the SA payload in the ISAKMP message,
|
|
* the function succeeds even if no SA payload was found (the
|
|
* doi paramter is left unchanged in that case.
|
|
* Parameters: isakmp - a valid ISAKMP message.
|
|
* doi - will hold the DOI if the call was successful.
|
|
* Returns: IPIKE_SUCCESS
|
|
*/
|
|
IP_GLOBAL Ipike_error
|
|
ipike_get_doi(Ipike_isakmp_header* isakmp, Ip_u32* doi);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|
|
|
|
/*
|
|
****************************************************************************
|
|
* END OF FILE
|
|
****************************************************************************
|
|
*/
|