Commit 97fa5373 authored by garciay's avatar garciay
Browse files

Start to make LibDiameter codecs

parent 466c1ba7
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@
#include "sdp_codets.h"
#include "isup_codets.h"
#include "msrp_codets.h"
#include "diameter_codets.h"

namespace t3devlib {
namespace gen {
+15 −0
Original line number Diff line number Diff line
@@ -33,6 +33,21 @@ namespace t3devlib { namespace gen {
#define SIPREG_QUOTED_PAIR	"[\\x5C][\\x00-\\x09\\x0B\\x0C\\x0E-\\x7F]"
#define SIPREG_QUOTED_STRING	"[\"]((" SIPREG_LWS ")|[]!#-[^-~" SIPCHARS_UTF8_NONASCII"]|(" SIPREG_QUOTED_PAIR "))*[\"]"

//CRLF 
#define CRLF "\r\n"

//SP = %x20
#define SP "\x20"

//HTAB = %x09; horizontal tab
#define HTAB "\x09"

//DQUOTE = %x22; " (Double Quote)
#define DQUOTE "\x22"

//HEXDIG = DIGIT / "A" / "B" / "C" / "D" / "E" / "F"
#define HEXDIG_IN_SET DIGIT_IN_SET "A" "B" "C" "D" "E" "F"

// IPv6
#define SIPREG_HEX4		"[" SIPCHARS_HEXA "]{1,4}"
#define SIPREG_HEXSEQ		SIPREG_HEX4 "([:]" SIPREG_HEX4 ")*"
+28 −8
Original line number Diff line number Diff line
#include "common_sip_msrp.h"
#include "diameter_codets.h"
#include <iostream>
#include <fstream>

namespace t3devlib { namespace gen {

// YGA: For debug purpose
/*{
	std::ofstream logfile("C:\\Temp\\LibDiameter.log", ios::app);
	logfile << "CaptureSource::PreEncodeField: " << field_id << std::endl;
	logfile.close();
}*/

//
// Implementation of the decoder for DIAMETER
//

// DIAMETER quoted strings messages allow multiple ways of representing
// some characters (raw unicode or escaped). This function is used
// to normalise the content so that two equivalent representation
// will result in the same TTCN-3 charstring.
//

// Diameter header RFC3588 Clause 3


}} // namespaces
+1245 −12

File changed.

Preview size limit exceeded, changes collapsed.

+2 −0
Original line number Diff line number Diff line
@@ -152,6 +152,7 @@ T3DEVLIB_INTEGER_DEFINITION(LibCommon_BasicTypesAndValues, UInt30, Unsigned, 30)
T3DEVLIB_INTEGER_DEFINITION(LibCommon_BasicTypesAndValues, UInt31, Unsigned, 31)
T3DEVLIB_INTEGER_DEFINITION(LibCommon_BasicTypesAndValues, UInt32, Unsigned, 32)
T3DEVLIB_INTEGER_DEFINITION(LibCommon_BasicTypesAndValues, UInt48, Unsigned, 48)
T3DEVLIB_INTEGER_DEFINITION(LibCommon_BasicTypesAndValues, UInt64, Unsigned, 48)

T3DEVLIB_INTEGER_DEFINITION(LibCommon_BasicTypesAndValues, Int, Signed, 64) // limit
T3DEVLIB_INTEGER_DEFINITION(LibCommon_BasicTypesAndValues, Int1, Signed, 1)
@@ -186,6 +187,7 @@ T3DEVLIB_INTEGER_DEFINITION(LibCommon_BasicTypesAndValues, Int29, Signed, 29)
T3DEVLIB_INTEGER_DEFINITION(LibCommon_BasicTypesAndValues, Int30, Signed, 30)
T3DEVLIB_INTEGER_DEFINITION(LibCommon_BasicTypesAndValues, Int31, Signed, 31)
T3DEVLIB_INTEGER_DEFINITION(LibCommon_BasicTypesAndValues, Int32, Signed, 32)
T3DEVLIB_INTEGER_DEFINITION(LibCommon_BasicTypesAndValues, Int64, Signed, 64)


}} // namespaces
Loading