Commit 0e6bfc47 authored by etsistf's avatar etsistf
Browse files

week46_validation

parent b058ffd0
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
/xsd/*.ttcn3view
/xsd/*.ttcn3view
/ttcn3build/
+2 −0
Original line number Original line Diff line number Diff line
@@ -1967,6 +1967,8 @@ group DefaultsTestStep
            // Process temination on error
            // Process temination on error
            log("*** a_diameter_default() : Process temination on error ***");
            log("*** a_diameter_default() : Process temination on error ***");
            // Terminate component execution
            // Terminate component execution
			f_postambleDiameterBase();
		    
            stop;
            stop;
        }
        }
    }//end altstep a_diameter_default
    }//end altstep a_diameter_default
+69 −3
Original line number Original line Diff line number Diff line
@@ -977,6 +977,7 @@ module LibDiameter_Templates {
            
            
            
            
            template User_Data_AVP m_user_Data_shData (octetstring p_ud) modifies m_user_Data_dummy := {
            template User_Data_AVP m_user_Data_shData (octetstring p_ud) modifies m_user_Data_dummy := {
                aVP_Header := m_aVP_HeaderVid_Mbit1(c_user_Data_Sh_AVP_Code, lengthof(p_ud), c_vendId3gpp),
                aVP_Data := p_ud
                aVP_Data := p_ud
            }
            }
            
            
@@ -1342,7 +1343,7 @@ module LibDiameter_Templates {
                user_Identity := m_user_Identity_dummy,
                user_Identity := m_user_Identity_dummy,
                wildcarded_PSI := omit,
                wildcarded_PSI := omit,
                wildcarded_IMPU := omit,
                wildcarded_IMPU := omit,
                data_Reference := m_data_Reference_dummy,
                data_Reference := {m_data_Reference_dummy},
                user_Data := m_user_Data_dummy,
                user_Data := m_user_Data_dummy,
                proxy_Info := omit,
                proxy_Info := omit,
                route_Record := omit,
                route_Record := omit,
@@ -2492,6 +2493,7 @@ module LibDiameter_Templates {
                wildcarded_PSI := omit,
                wildcarded_PSI := omit,
                wildcarded_IMPU := omit,
                wildcarded_IMPU := omit,
                repository_Data_Id := omit,
                repository_Data_Id := omit,
                data_Reference := omit,
                supported_Features := omit,
                supported_Features := omit,
                redirect_Host := omit,
                redirect_Host := omit,
                redirect_Host_Usage := omit,
                redirect_Host_Usage := omit,
@@ -3066,6 +3068,7 @@ module LibDiameter_Templates {
                wildcarded_PSI := *,
                wildcarded_PSI := *,
                wildcarded_IMPU := *,
                wildcarded_IMPU := *,
                repository_Data_Id := *,
                repository_Data_Id := *,
                data_Reference := *,
                supported_Features := *,
                supported_Features := *,
                redirect_Host := *,
                redirect_Host := *,
                redirect_Host_Usage := *,
                redirect_Host_Usage := *,
@@ -3286,7 +3289,7 @@ module LibDiameter_Templates {
            template UDA_Body_AVP mw_UDA_Body_dummy :=
            template UDA_Body_AVP mw_UDA_Body_dummy :=
            {
            {
                vendor_Specific_Application_Id := ?,
                vendor_Specific_Application_Id := ?,
                result_Code := ?,
                result_Code := *,
                experimental_Result := *,
                experimental_Result := *,
                auth_Session_State := ?,
                auth_Session_State := ?,
                origin_Host := ?,
                origin_Host := ?,
@@ -3724,6 +3727,69 @@ module LibDiameter_Templates {
            
            
        } // End of f_addPaddedBytes2Length
        } // End of f_addPaddedBytes2Length


    }//end group FunctionsForTemplates
    /* Function f_char_to_BCD
    * @desc: Returns BCD code in a hexstring converted from
    *        address digits (p_char) in charstring format 
    *        Filler character '0'H is added where necessary
    *        End-of-Pulsing  charater is added, if p_eop is TRUE
    *        Works for address lengths starting from 0 (i.e. empty string)
    */
    function f_char_to_BCD(in charstring p_char, in boolean p_eop := false) return octetstring {
        var integer v_string_length := lengthof(p_char);
        var charstring v_address_char := p_char;
        var octetstring v_address_oct;
        var hexstring v_address_hex_ASCII;

        var integer i;
        var hexstring v_address_hex_NUM := ''H;
    
        if (p_eop) // End of Pulsing required
        { 

            if (v_string_length mod 2 == 1) // odd number of digits
            {
                v_address_char := v_address_char & "O";  // instead of "?"
                // add End of Pulsing, ASCII code of "O" = '4F'H
                v_string_length := v_string_length + 1;
            }
            else // even number of digits
            {
                v_address_char := v_address_char & "O0";  // instead of "0?"
                // add filler and End of Pulsing, ASCII code of "O" = '4F'H
                v_string_length := v_string_length + 2;
            }
        }
        else // End of Pulsing NOT required
        {
            if (v_string_length mod 2 == 1) // odd number of digits
            {
                v_address_char := v_address_char & "0"; 
                // add filler
                v_string_length := v_string_length + 1;
            }
        }

        v_address_oct := (char2oct(v_address_char)); 
        v_address_hex_ASCII := oct2hex(v_address_oct); 
        /* Examples
           "1234" -> '31323334'H
           "12345O" -> '31323334353F' */
            
        // fill hexstring with adequate number of hex digits
        for (i := 0; i < v_string_length; i := i + 1)
        {
            v_address_hex_NUM := v_address_hex_NUM & '0'H;
        }
        //  fill hexstring with address in BCD format
        for (i := 0; i < v_string_length; i := i + 2)
        {
            v_address_hex_NUM[i] := v_address_hex_ASCII[2*i + 3];
            v_address_hex_NUM[i+1] := v_address_hex_ASCII[2*i + 1];
        }
    
        v_address_oct := hex2oct(v_address_hex_NUM);
        return v_address_oct;                       
    } // End function f_char_to_BCD                                        
    } // End group FunctionsForTemplates


}//end module LibDiameter_Templates
}//end module LibDiameter_Templates
 No newline at end of file
+7 −5
Original line number Original line Diff line number Diff line
@@ -216,7 +216,7 @@ group BasicTypesAndConstants{
          const integer c_digest_URI_AVP_Code := 109;                                 //Ref: RFC4590 3.7.  Digest-URI Attribute
          const integer c_digest_URI_AVP_Code := 109;                                 //Ref: RFC4590 3.7.  Digest-URI Attribute
          const integer c_digest_Username_AVP_Code := 115;                         //Ref: RFC4590 3.13. Digest-Username Attribute
          const integer c_digest_Username_AVP_Code := 115;                         //Ref: RFC4590 3.13. Digest-Username Attribute
           } // End of group AVPCodeConstantsDigest
           } // End of group AVPCodeConstantsDigest
           group AVPCodeConstantsSh{
           group AVPCodeConstantsShDh_TS129_329{
          const integer c_current_Location_AVP_Code := 707;                         //Ref: 3GPP TS 29.329 6.3.8 Current-Location AVP
          const integer c_current_Location_AVP_Code := 707;                         //Ref: 3GPP TS 29.329 6.3.8 Current-Location AVP
          const integer c_data_Reference_AVP_Code := 703;                             //Ref: 3GPP TS 29.329 6.3.4 Data-Reference AVP
          const integer c_data_Reference_AVP_Code := 703;                             //Ref: 3GPP TS 29.329 6.3.4 Data-Reference AVP
          const integer c_dSAI_Tag_AVP_Code := 711;                                 //Ref: 3GPP TS 29.329 6.3.18 DSAI-Tag AVP
          const integer c_dSAI_Tag_AVP_Code := 711;                                 //Ref: 3GPP TS 29.329 6.3.18 DSAI-Tag AVP
@@ -233,7 +233,8 @@ group BasicTypesAndConstants{
          const integer c_subs_Req_Type_AVP_Code := 705;                             //Ref: 3GPP TS 29.329 6.3.6 Subs-Req-Type AVP
          const integer c_subs_Req_Type_AVP_Code := 705;                             //Ref: 3GPP TS 29.329 6.3.6 Subs-Req-Type AVP
          const integer c_user_Identity_AVP_Code := 700;                             //Ref: 3GPP TS 29.329 6.3.1 User-Identity AVP
          const integer c_user_Identity_AVP_Code := 700;                             //Ref: 3GPP TS 29.329 6.3.1 User-Identity AVP
          const integer c_wildcarded_IMPU_AVP_Code := 636;                         //Ref: 3GPP TS 29.329 6.3.20 Wildcarded-IMPU AVP 
          const integer c_wildcarded_IMPU_AVP_Code := 636;                         //Ref: 3GPP TS 29.329 6.3.20 Wildcarded-IMPU AVP 
           } // End of group AVPCodeConstantsSh
          const integer c_user_Data_Sh_AVP_Code :=  702;                            //Ref: TS 129.329  6.3.3  User_Data
           } // End of group AVPCodeConstantsShDh_TS129_329
           group AVPCodeConstantsRFC4005{
           group AVPCodeConstantsRFC4005{
          const integer c_called_Station_Id_AVP_Code := 30;                         //Ref: RFC4005 4.5  Called_Station_Id AVP
          const integer c_called_Station_Id_AVP_Code := 30;                         //Ref: RFC4005 4.5  Called_Station_Id AVP
          const integer c_framed_IP_Address_AVP_Code := 8;                         //Ref: RFC4005 6.11.1 Framed_IP_Address AVP
          const integer c_framed_IP_Address_AVP_Code := 8;                         //Ref: RFC4005 6.11.1 Framed_IP_Address AVP
@@ -1841,7 +1842,7 @@ group BasicTypesAndConstants{
                    Destination_Host_AVP                   destination_Host optional,
                    Destination_Host_AVP                   destination_Host optional,
                    Destination_Realm_AVP                  destination_Realm,//requi.
                    Destination_Realm_AVP                  destination_Realm,//requi.
                    set of Supported_Features_AVP          supported_Features optional,
                    set of Supported_Features_AVP          supported_Features optional,
                    User_Identity_AVP                      user_Identity,//requi.
                    User_Identity_AVP                      user_Identity optional,//requi. but for testing set to optional TP_Sh_HSS_MS_01
                    Wildcarded_PSI_AVP                     wildcarded_PSI optional,
                    Wildcarded_PSI_AVP                     wildcarded_PSI optional,
                    Wildcarded_IMPU_AVP                    wildcarded_IMPU optional,
                    Wildcarded_IMPU_AVP                    wildcarded_IMPU optional,
                    Server_Name_AVP                        server_Name optional,
                    Server_Name_AVP                        server_Name optional,
@@ -1878,7 +1879,7 @@ group BasicTypesAndConstants{


                type set  UDA_Body_AVP {
                type set  UDA_Body_AVP {
                    Vendor_Specific_Appl_Id_AVP            vendor_Specific_Application_Id,
                    Vendor_Specific_Appl_Id_AVP            vendor_Specific_Application_Id,
                    Result_Code_AVP                        result_Code,
                    Result_Code_AVP                        result_Code optional,
                    Experimental_Result_AVP                experimental_Result optional,
                    Experimental_Result_AVP                experimental_Result optional,
                    Auth_Session_State_AVP                 auth_Session_State,//requi.
                    Auth_Session_State_AVP                 auth_Session_State,//requi.
                    Origin_Host_AVP                        origin_Host,//requi.
                    Origin_Host_AVP                        origin_Host,//requi.
@@ -1924,7 +1925,7 @@ group BasicTypesAndConstants{
                    User_Identity_AVP                      user_Identity,//requi.
                    User_Identity_AVP                      user_Identity,//requi.
                    Wildcarded_PSI_AVP                     wildcarded_PSI optional,
                    Wildcarded_PSI_AVP                     wildcarded_PSI optional,
                    Wildcarded_IMPU_AVP                    wildcarded_IMPU optional,
                    Wildcarded_IMPU_AVP                    wildcarded_IMPU optional,
                    Data_Reference_AVP                     data_Reference,//requi.
                    set of Data_Reference_AVP              data_Reference,                         //ETSI TS 129 329
                    User_Data_AVP                          user_Data,//Requi.
                    User_Data_AVP                          user_Data,//Requi.
                    set of Proxy_Info_AVP                  proxy_Info optional,
                    set of Proxy_Info_AVP                  proxy_Info optional,
                    set of Route_Record_AVP                route_Record optional,
                    set of Route_Record_AVP                route_Record optional,
@@ -1957,6 +1958,7 @@ group BasicTypesAndConstants{
                    Wildcarded_PSI_AVP                     wildcarded_PSI optional,
                    Wildcarded_PSI_AVP                     wildcarded_PSI optional,
                    Wildcarded_IMPU_AVP                    wildcarded_IMPU optional,
                    Wildcarded_IMPU_AVP                    wildcarded_IMPU optional,
                    Repository_Data_ID_AVP                 repository_Data_Id optional,
                    Repository_Data_ID_AVP                 repository_Data_Id optional,
                    Data_Reference_AVP                     data_Reference optional,                //ETSI TS 129 329
                    set of Supported_Features_AVP          supported_Features optional,
                    set of Supported_Features_AVP          supported_Features optional,
                    Redirect_Host_AVP                      redirect_Host optional,                 //RFC4740
                    Redirect_Host_AVP                      redirect_Host optional,                 //RFC4740
                    Redirect_Host_Usage_AVP                redirect_Host_Usage optional,           //RFC4740
                    Redirect_Host_Usage_AVP                redirect_Host_Usage optional,           //RFC4740
+1 −1
Original line number Original line Diff line number Diff line
@@ -396,7 +396,7 @@ module LibDiameter_Types_Base_AVPs {
                LOCATION_INFORMATION_E (14),
                LOCATION_INFORMATION_E (14),
                USER_STATE_E (15),
                USER_STATE_E (15),
                CHARGING_INFORMATION_E (16),
                CHARGING_INFORMATION_E (16),
                MSISDN_E (17),
                MSISDN (17),
                PSI_ACTIVATION_E (18),
                PSI_ACTIVATION_E (18),
                DSAI_E (19),
                DSAI_E (19),
                SERVICE_LEVEL_TRACE_INFO_E (21),
                SERVICE_LEVEL_TRACE_INFO_E (21),