blob: 42f4500a52da5273b9dbd408cc5545dfa7a329da [file] [log] [blame]
///////////////////////////////////////////////////////////////////////////////
// //
// Copyright (c) 2000-2019 Ericsson Telecom AB //
// //
// All rights reserved. This program and the accompanying materials //
// are made available under the terms of the Eclipse Public License v2.0 //
// which accompanies this distribution, and is available at //
// https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html //
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////
// Module: EPTF_CLL_Transport_IPsecHandler_Definitions
//
// Purpose:
// This module contains type definitions that used by EPTF_CLL_Transport_IPsecHandler.
//
// The Transport_IPsecHandler module provides IP sec functionality for EPTF_Transport.
// Only IPL4 is supported. It uses the XFRM API of the TCCUseful Functions.
//
// Module Parameters:
// -
//
// Module depends on:
// <TCCIPsec_XFRM_Definitions>
// <EPTF_CLL_Base_Definitions>
// <EPTF_CLL_HashMap_Definitions>
//
// Current Owner:
// Jozsef Gyurusi (ETHJGI)
//
// Detailed Comments:
// To create IP sec connection from A->B (A and B should be on different machines):
// - add SP by calling the function <f_EPTF_Transport_IPsecHandler_createSP> with the A and B addresses on both hosts
// - add SA with <f_EPTF_Transport_IPsecHandler_createSA> with the A and B addresses on both hosts
// - open listen port with Transport: <EPTF_CLL_Transport_Functions.f_EPTF_Transport_listen> at addr B
// - connect to the listen port with Transport: <EPTF_CLL_Transport_Functions.f_EPTF_Transport_connect> from A to B
// - send messages with <EPTF_CLL_Transport_Functions.f_EPTF_Transport_send> from A to B
// - close connection at A and B with <EPTF_CLL_Transport_Functions.f_EPTF_Transport_close>
// - remove SP on A and B: <f_EPTF_Transport_IPsecHandler_deleteSP>
// - remove SA on A and B: <f_EPTF_Transport_IPsecHandler_deleteSA>
//
// The messages from A and B will be encrypted while the SA and SP exists. If SA and SP is deleted before connection is closed
// The connection close messages will not be encrypted.
//
// If the TCP connection closes the EPTF_TransportIPL4 automatically deletes the SA and SP if exists for the TCP connection
// when the connClosed event is handled
//
///////////////////////////////////////////////////////////////
module EPTF_CLL_Transport_IPsecHandler_Definitions {
import from TCCIPsec_XFRM_Definitions all;
import from EPTF_CLL_Base_Definitions all;
import from EPTF_CLL_HashMap_Definitions all;
import from EPTF_CLL_FBQ_Definitions all;
import from EPTF_CLL_Transport_IPsecHandler_Logging_Client_Definitions all;
///////////////////////////////////////////////////////////
// Type: SAAddInfo_List
//
// Purpose:
// This record of defines the list of <SAAddInfo> elements
//
// Elements:
// <SAAddInfo>
//
// Detailed Comments:
//
///////////////////////////////////////////////////////////
type record of SAAddInfo SAAddInfo_List;
///////////////////////////////////////////////////////////
// Type: SPAddInfo_List
//
// Purpose:
// This record of defines the list of <SPAddInfo> elements
//
// Elements:
// <SPAddInfo>
//
// Detailed Comments:
//
///////////////////////////////////////////////////////////
type record of SPAddInfo SPAddInfo_List;
///////////////////////////////////////////////////////////
// Component: EPTF_Transport_IPsecHandler_CT
//
// Purpose:
// The component that implements the IPSec handling feature in EPTF Transport
//
// Elements:
// c_EPTF_Transport_IPsecHandler_saHashMapName - *charstring* - hashmap name used for SA handling
// v_EPTF_Transport_IPsecHandler_saHashMapId - *integer* - hashmap id used for SA handling
// v_SAAddInfo_List - <SAAddInfo_List> - the database for SA handling
// v_Transport_IPsecHandler_saFBQId - <EPTF_FreeBusyQueue> - FreeBusyQueue for SA handling
//
// c_EPTF_Transport_IPsecHandler_spHashMapName - *charstring* - hashmap name used for SP handling
// v_EPTF_Transport_IPsecHandler_spHashMapId - *integer* - hashmap id used for SP handling
// v_SPAddInfo_List - <SPAddInfo_List> - the database for SP handling
// v_Transport_IPsecHandler_spFBQId - <EPTF_FreeBusyQueue> - FreeBusyQueue for SP handling
//
// v_EPTF_Transport_IPsecHandler_initialized - *boolean* - prevents multiple init by calling <f_EPTF_Transport_IPsecHandler_init_CT> several times
//
// Detailed Comments:
// The <EPTF_TransportIPL4_CT> component extends this component
//
///////////////////////////////////////////////////////////
type component EPTF_Transport_IPsecHandler_CT extends EPTF_Base_CT, EPTF_HashMap_CT, EPTF_CLL_Transport_IPsecHandler_Logging_Client_CT, EPTF_FBQ_CT {
private const charstring c_EPTF_Transport_IPsecHandler_saHashMapName := "v_IPsecHandler_saHashMapName";
private var integer v_EPTF_Transport_IPsecHandler_saHashMapId;
private var SAAddInfo_List v_SAAddInfo_List := {};
private var EPTF_FreeBusyQueue v_Transport_IPsecHandler_saFBQId := c_EPTF_emptyFreeBusyQueue;
private const charstring c_EPTF_Transport_IPsecHandler_spHashMapName := "v_IPsecHandler_spHashMapName";
private var integer v_EPTF_Transport_IPsecHandler_spHashMapId;
private var SPAddInfo_List v_SPAddInfo_List := {};
private var EPTF_FreeBusyQueue v_Transport_IPsecHandler_spFBQId := c_EPTF_emptyFreeBusyQueue;
private var boolean v_EPTF_Transport_IPsecHandler_initialized := false;
}
} // module