Commit 7c25c346 authored by rennoch's avatar rennoch
Browse files

- introduction of length calculation of avp-paramters and msg

- update/new ST tests
parent 050ac9c8
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -42,6 +42,9 @@ module LibDiameter_Interface
      var Destination_Host_AVP vc_destinationHost;
      var Destination_Realm_AVP vc_destinationRealm;
      var Auth_Application_Id_AVP vc_authApplicationId;
      var Termination_Cause_AVP vc_terminationCause;
      var Result_Code_AVP vc_resultCode;
      var Media_Component_Description_AVP vc_mediaComponentDescription;
	    
      //TODO general timers have to be defined
      timer tc_wait  := 5.0;  //TODO define PIXIT if needed
+93 −3
Original line number Diff line number Diff line
@@ -154,6 +154,20 @@ group AwaitingMessage {
        //store specific parameter for ASA if needed
    }
    
    
    function f_awaiting_RAR(template (present)RAR_MSG p_RAR) runs on DiameterComponent
    {
        f_awaitingDiameterMsg({rAR_MSG:=p_RAR});
        //store specific parameter for RAR if needed
    }
    
    
    function f_awaiting_RAA(template (present)RAA_MSG p_RAA) runs on DiameterComponent
    {
        f_awaitingDiameterMsg({rAA_MSG:=p_RAA});
        //store specific parameter for RAA if needed
    }
	
} // end AwaitingMessage

group SendMessage {
@@ -165,6 +179,7 @@ group SendMessage {
	*/	
	function f_sendDiameterMsg(template DIAMETER_MSG p_diameterMSG) runs on DiameterComponent
	{
        
        if (PX_DIAM_LLP_ENABLED)
        {
            if(f_gtZero(vc_ETS_conn))
@@ -186,36 +201,54 @@ group SendMessage {
    function f_send_CER(template CER_MSG p_CER) runs on DiameterComponent
    {
        //set specific parameter for CER if needed
        
        //insert length of message        
        p_CER.header.msglen := lengthof(encvalue(p_CER));                
        f_sendDiameterMsg({cER_MSG:=p_CER});
    }  
    
    function f_send_CEA(template CEA_MSG p_CEA) runs on DiameterComponent
    {
        //set specific parameter for CEA if needed
        
        //insert length of message        
        p_CEA.header.msglen := lengthof(encvalue(p_CEA));                
        f_sendDiameterMsg({cEA_MSG:=p_CEA});
    }
    
    function f_send_DWR(template DWR_MSG p_DWR) runs on DiameterComponent
    {
        //set specific parameter for DWR if needed
        
        //insert length of message        
        p_DWR.header.msglen := lengthof(encvalue(p_DWR));                
        f_sendDiameterMsg({dWR_MSG:=p_DWR});
    }
    
    function f_send_DWA(template DWA_MSG p_DWA) runs on DiameterComponent
    {
        //set specific parameter for DWA if needed
        
        //insert length of message        
        p_DWA.header.msglen := lengthof(encvalue(p_DWA));                
        f_sendDiameterMsg({dWA_MSG:=p_DWA});
    }
    
    function f_send_DPR(template DPR_MSG p_DPR) runs on DiameterComponent
    {
        //set specific parameter for DPR if needed
        
        //insert length of message        
        p_DPR.header.msglen := lengthof(encvalue(p_DPR));                
        f_sendDiameterMsg({dPR_MSG:=p_DPR});
    }
    
    function f_send_DPA(template DPA_MSG p_DPA) runs on DiameterComponent
    {
        //set specific parameter for DPA if needed
        
        //insert length of message        
        p_DPA.header.msglen := lengthof(encvalue(p_DPA));                
        f_sendDiameterMsg({dPA_MSG:=p_DPA});
    }
    
@@ -223,12 +256,21 @@ group SendMessage {
    {
        //set specific parameter for AAR if needed
        vc_sessionId := m_sessionId(PX_SessionID);
        p_AAR.session_Id := vc_sessionId;
        vc_originHost := m_originHost(PX_OriginHost);
        p_AAR.origin_Host := vc_originHost;
        vc_originRealm := m_originRealm(PX_OriginRealm); // realm of the originator (TS)
        p_AAR.origin_Realm := vc_originRealm;
        vc_destinationHost := m_destinationHost(PX_DestinationHost);
        p_AAR.destination_Host := vc_destinationHost;
        vc_destinationRealm := m_destinationRealm(PX_DestinationRealm);
        p_AAR.destination_Realm := vc_destinationRealm;
        vc_authApplicationId := m_authApplicationId(PX_AuthApplicationId); 
        p_AAR.auth_Application_Id := vc_authApplicationId;
        //TODO: setting of optional AVPs
        
        //insert length of message        
        p_AAR.header.msglen := lengthof(encvalue(p_AAR));                
        f_sendDiameterMsg({aAR_MSG:=p_AAR});
    }

@@ -237,40 +279,88 @@ group SendMessage {
        //set specific parameter for AAA if needed
        // sessionId used from AAR
        vc_originHost := m_originHost(PX_OriginHost);
        p_AAA.origin_Host := vc_originHost;
        vc_originRealm := m_originRealm(PX_OriginRealm); // realm of the originator (TS)
        p_AAA.origin_Realm := vc_originRealm;
        vc_authApplicationId := m_authApplicationId(PX_AuthApplicationId); 
        p_AAA.auth_Application_Id := vc_authApplicationId;
        //TODO: setting of optional AVPs
        
        //insert length of message        
        p_AAA.header.msglen := lengthof(encvalue(p_AAA));                
        f_sendDiameterMsg({aAA_MSG:=p_AAA});
    }
    
    function f_send_STR(template STR_MSG p_STR) runs on DiameterComponent
    {
        //set specific parameter for STR if needed
        
        //insert length of message        
        p_STR.header.msglen := lengthof(encvalue(p_STR));                
        f_sendDiameterMsg({sTR_MSG:=p_STR});
    }
    
    function f_send_STA(template STA_MSG p_STA) runs on DiameterComponent
    {
        //set specific parameter for STA if needed
        
        //insert length of message        
        p_STA.header.msglen := lengthof(encvalue(p_STA));                
        f_sendDiameterMsg({sTA_MSG:=p_STA});
    }
    
    function f_send_ASR(template ASR_MSG p_ASR) runs on DiameterComponent
    {
        //set specific parameter for ASR if needed
        
        //insert length of message        
        p_ASR.header.msglen := lengthof(encvalue(p_ASR));                
        f_sendDiameterMsg({aSR_MSG:=p_ASR});
    }
    
    function f_send_ASA(template ASA_MSG p_ASA) runs on DiameterComponent
    {
        //set specific parameter for ASA if needed
        
        //insert length of message        
        p_ASA.header.msglen := lengthof(encvalue(p_ASA));                
        f_sendDiameterMsg({aSA_MSG:=p_ASA});
    }
    function f_send_RAR(template RAR_MSG p_RAR) runs on DiameterComponent
    {
        //set specific parameter for RAR if needed
        
        //insert length of message        
        p_RAR.header.msglen := lengthof(encvalue(p_RAR));                
        f_sendDiameterMsg({rAR_MSG:=p_RAR});
    }
    
    function f_send_RAA(template RAA_MSG p_RAA) runs on DiameterComponent
    {
        //set specific parameter for RAA if needed
        
        //insert length of message        
        p_RAA.header.msglen := lengthof(encvalue(p_RAA));                
        f_sendDiameterMsg({rAA_MSG:=p_RAA});
    }		

} // end SendMessage

group GlobalSteps {

    /*
    *  @desc	This is a test step that awaits session esthablishment by the IUT
    *  @param	
    */
            function f_IUT_session_esthablishment()
            runs on DiameterComponent {
				
                f_awaiting_AAR(mw_AAR_dummy); // IUT esthablish Diameter session
                    
                f_send_AAA(m_AAA_modified_ResultCode_ANCA(vc_sessionId, vc_originHost, vc_originRealm, vc_authApplicationId, m_resultCode(m_resultCode_diameterSuccess), omit)); 

            } // end function f_AF_IUT_session_esthablishment
                

}// end group GlobalSteps

+441 −90

File changed.

Preview size limit exceeded, changes collapsed.