Commit 417191ce authored by juvancic's avatar juvancic
Browse files

added support cc files

parent cdd1eb07
Loading
Loading
Loading
Loading
+35 −0
Original line number Diff line number Diff line

#include "NAS_EncdecDeclarations.hh"
#include "NAS_CommonTypeDefs.hh" 
#include "SMS_TypeDefs.hh" 

namespace NAS__EncdecDeclarations {

  /****************************************************
   * @desc    External function to encode a ... type
   * @param   value to encode
   * @return  encoded value
   ****************************************************/

  BITSTRING fx__enc__PacketFilterComponent(const NAS__CommonTypeDefs::PacketFilterComponent &p){return int2bit(0,0);}
  BITSTRING fx__enc__QoSParametersList(const NAS__CommonTypeDefs::QoSParametersList &p){return int2bit(0,0);}
  BITSTRING fx__enc__EPS__QualityOfService(const NAS__CommonTypeDefs::EPS__QualityOfService &p){return int2bit(0,0);}
  BITSTRING fx__enc__TrafficFlowTemplate(const NAS__CommonTypeDefs::TrafficFlowTemplate &p){return int2bit(0,0);}
  BITSTRING fx__enc__CP__PDU__Type(const SMS__TypeDefs::CP__PDU__Type &p){return int2bit(0,0);}

  /****************************************************
   * @desc    External function to decode a ... type
   * @param   value to encode
   * @return  encoded value
   ****************************************************/
  INTEGER fx__dec__PacketFilterComponent (BITSTRING &b, NAS__CommonTypeDefs::PacketFilterComponent &p) {return -1;}
  INTEGER fx__dec__QoSParametersList (BITSTRING &b, NAS__CommonTypeDefs::QoSParametersList &p) {return -1;}
  INTEGER fx__dec__EPS__QualityOfService (BITSTRING &b, NAS__CommonTypeDefs::EPS__QualityOfService &p) {return -1;}
  INTEGER fx__dec__TrafficFlowTemplate (BITSTRING &b, NAS__CommonTypeDefs::TrafficFlowTemplate &p) {return -1;}
  INTEGER fx__dec__CP__PDU__Type (BITSTRING &b, SMS__TypeDefs::CP__PDU__Type &p) {return -1;}


} // namespace NAS__EncdecDeclarations


+35 −0
Original line number Diff line number Diff line

#include "NG_NAS_EncdecDeclarations.hh"
#include "NG_NAS_MsgContainers.hh"
#include "NG_NAS_TypeDefs.hh"
#include "EAP_TypeDefs.hh"

namespace NG__NAS__EncdecDeclarations {

  /****************************************************
   * @desc    External function to encode a ... type
   * @param   value to encode
   * @return  encoded value
   ****************************************************/

  BITSTRING fx__enc__NG__NAS__UL__Message__Type(const NG__NAS__MsgContainers::NG__NAS__UL__Message__Type &p){return int2bit(0,0);}
  BITSTRING fx__enc__NG__NAS__DL__Message__Type(const NG__NAS__MsgContainers::NG__NAS__DL__Message__Type &p){return int2bit(0,0);}
  BITSTRING fx__enc__IntraN1TransparentContainer(const NG__NAS__TypeDefs::IntraN1TransparentContainer &p){return int2bit(0,0);}
  BITSTRING fx__enc__CIoTSmallDataContainer(const NG__NAS__TypeDefs::CIoTSmallDataContainer &p){return int2bit(0,0);}
  BITSTRING fx__enc__EAP__Message__Type(const EAP__TypeDefs::EAP__Message__Type &p){return int2bit(0,0);}

  /****************************************************
   * @desc    External function to decode a ... type
   * @param   value to encode
   * @return  encoded value
   ****************************************************/
  INTEGER fx__dec__NG__NAS__UL__Message__Type(BITSTRING &b, NG__NAS__MsgContainers::NG__NAS__UL__Message__Type &p) {return -1;}
  INTEGER fx__dec__NG__NAS__DL__Message__Type(BITSTRING &b, NG__NAS__MsgContainers::NG__NAS__DL__Message__Type &p) {return -1;}
  INTEGER fx__dec__IntraN1TransparentContainer(BITSTRING &b, NG__NAS__TypeDefs::IntraN1TransparentContainer &p) {return -1;}
  INTEGER fx__dec__CIoTSmallDataContainer(BITSTRING &b, NG__NAS__TypeDefs::CIoTSmallDataContainer &p) {return -1;}
  INTEGER fx__dec__EAP__Message__Type(BITSTRING &b, EAP__TypeDefs::EAP__Message__Type &p) {return -1;}


} // namespace NG__NAS__EncdecDeclarations

ccsrc/EncDec/module.mk

0 → 100644
+14 −0
Original line number Diff line number Diff line
sources := \
    NAS_EncDec.cc \
    NG_NAS_EncDec.cc


    #Dhcpv4_Encdec.cc \
    #Dns_Encdec.cc \
    #ICMPv6_Encdec.cc \
    #HTTP_ASP_Encdec.cc \
    #NR_Encdec.cc \
    #LPP_PDU_EncDec.cc \
    #NAS_EncDec.cc \
    #NG_NAS_EncDec.cc
    #NR_PDCP_Encdec.cc
+42 −0
Original line number Diff line number Diff line
#include <math.h>
#include <sstream>
#include <iomanip>
#include <random>

#include "NG_SecurityDefinitionsAndExternalFunctions.hh"
#include "NR_RRC_ASN1_Definitions.hh"
#include "CommonDefs.hh"

#include "base_time.hh"
//#include "converter.hh"
#include "loggers.hh"
//#include "xml_converters.hh"


namespace NG__SecurityDefinitionsAndExternalFunctions {

   /**
   * @desc    This external function ... 
   * @return  The ...
   * @see     fx_get...() return ...
   */

BITSTRING fx__NR__AsIntegrityAlgorithm(const OCTETSTRING &a, const NR__RRC__ASN1__Definitions::IntegrityProtAlgorithm& b, const BITSTRING &c, const OCTETSTRING &d, const BITSTRING &e, const INTEGER &f){
return int2bit(0, 0);
}

OCTETSTRING fx__NG__NasIntegrityAlgorithm(const OCTETSTRING& p_EncodedNasPdu, const BITSTRING& p_IntegrityAlgorithm, const BITSTRING& p_KNASint, const OCTETSTRING& p_NasCount, const BITSTRING& p_BearerId, const INTEGER& p_Direction){
return int2oct(0, 0);
}

OCTETSTRING fx__NG__NasCiphering(const OCTETSTRING& p_EncodedNasPdu,const  BITSTRING& p_CipheringAlgorithm, const BITSTRING& p_KNASenc, const OCTETSTRING& p_NasCount, const  BITSTRING& p_BearerId){
return int2oct(0, 0);
}

OCTETSTRING fx__NG__NasDeciphering(const OCTETSTRING& p_CipheredNasMsg, const BITSTRING& p_CipheringAlgorithm, const BITSTRING& p_KNASenc, const OCTETSTRING& p_NasCount, const BITSTRING& p_BearerId){
return int2oct(0, 0);
}



} // namespace NG__SecurityDefinitionsAndExternalFunctions 
+44 −0
Original line number Diff line number Diff line
#include <math.h>
#include <sstream>
#include <iomanip>
#include <random>

#include "CommonDefs.hh"

#include "base_time.hh"
//#include "converter.hh"
#include "loggers.hh"
//#include "xml_converters.hh"

#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif
#define earthRadius 6378137.0L
#define rbis = ((double)(earthRadius * M_PI / 180))

namespace CommonDefs {

	/**
   * @desc    This external function gets KEY
   * @return  The KEY
   * @see     fx_get...() return UInt64
   */
//INTEGER fx__KeyDerivationFunction(INTEGER const&, BITSTRING const&, OCTETSTRING const&){
BITSTRING fx__KeyDerivationFunction(const INTEGER& p__KDF, const BITSTRING& p__Key, const OCTETSTRING& p__String){
return int2bit(0, 0);
}
	/**
   * @desc    This external function gets the current time since 01/01/1970 in UTC format
   * @return  The current time since 01/01/1970 in UTC format in milliseconds
   * @see     fx_getSystemTime() return UInt64
   */
//INTEGER fx__GetSystemTime(CommonDefs::Struct__tm__Type&, INTEGER&){
void  fx__GetSystemTime(CommonDefs::Struct__tm__Type& p__Struct__tm, INTEGER& p__TimezoneInfo){
return;
}
//void fx__CalculateFCS32(BITSTRING const&)   {
 BITSTRING fx__CalculateFCS32(const BITSTRING& p__TMSI){
return int2bit(0, 0);
}   

} // namespace CommonDefs
Loading