Commit 923babe7 authored by borowski's avatar borowski
Browse files

- hopid/endid non optional in Diameter Header

- type address corrected
- Time as UInt32 not UInt64
- Diameter URI corrected
- Generic Param taken from SIP (with SIP import of Types)
-templates adapted
- steps adapted 
parent 6c64e656
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -667,8 +667,8 @@ group GlobalSteps {
                return template Address
                {
                    var template Address v_ipv4, v_ipv6;
                    v_ipv4 := {ipv4:= p_ipv4 };
                    v_ipv6 := {ipv6:= p_ipv6 };
                    v_ipv4.ipAddress := {ipv4:= p_ipv4 };
                    v_ipv6.ipAddress := {ipv6:= p_ipv6 };
                    if (PX_IPv6)
                    {
                        return(v_ipv6) 
@@ -701,7 +701,7 @@ group GlobalSteps {
                               num:="0"#
                           }
                           //addr[addr_i]:=oct2int(str2oct(num));
                           v_ip.ipv6[addr_i]:=oct2int(str2oct(num));
                           v_ip.ipAddress.ipv6[addr_i]:=oct2int(str2oct(num));
                           addr_i:=addr_i+1;
                           num:="";
                       }
@@ -717,7 +717,7 @@ group GlobalSteps {
                           num:="0"#
                       }
                       //addr[addr_i]:=oct2int(str2oct(num));
                       v_ip.ipv6[addr_i]:=oct2int(str2oct(num));
                       v_ip.ipAddress.ipv6[addr_i]:=oct2int(str2oct(num));
                       num:="";
                   }
                           
@@ -729,7 +729,7 @@ group GlobalSteps {
                       current:=substr(p_addr,i,1);
                       if(current=="."){
                           //addr[addr_i]:=str2int(num);
                           v_ip.ipv4[addr_i]:=str2int(num);
                           v_ip.ipAddress.ipv4[addr_i]:=str2int(num);
                           addr_i:=addr_i+1;
                           num:="";
                       }else{
@@ -740,7 +740,7 @@ group GlobalSteps {
                       log("IPV4 parse ERROR");
                   }else{
                       //addr[addr_i]:=str2int(num);
                       v_ip.ipv4[addr_i]:=str2int(num);
                       v_ip.ipAddress.ipv4[addr_i]:=str2int(num);
                       num:="";
                   }
                            
+29 −19
Original line number Diff line number Diff line
@@ -188,8 +188,8 @@ module LibDiameter_Templates {
                cmdflags := m_cmdFlagsReq,		//RPETrrrr 
                cmdcode := p_cmdcode,			//Command code
                applid := p_applid,			//Diameter common messages =0, Vendor specific applications = 16777216 - 4294967294(0x01000000-0xfffffffe) -Gx=16777238,Rx=16777236, 3GPP Cx/Dx=13777216,3GPP Sh=16777217
                hopid := omit,
                endid := omit
                hopid := 0,
                endid := 0
            }
            
            template DiameterHeader mw_diameterHeaderReq_dummy(Command_Code p_cmdcode, template (present) UInt32 p_applid) := {
@@ -198,8 +198,8 @@ module LibDiameter_Templates {
                cmdflags := mw_cmdFlags,			//RPETrrrr 
                cmdcode := p_cmdcode,			//Command code
                applid := p_applid,				//Diameter common messages =0, Vendor specific applications = 16777216 - 4294967294(0x01000000-0xfffffffe) -Gx=16777238,Rx=16777236, 3GPP Cx/Dx=13777216,3GPP Sh=16777217
                hopid := *,
                endid := *
                hopid := ?,
                endid := ?
            }
            
            template DiameterHeader m_diameterHeaderAns_dummy(Command_Code p_cmdcode, UInt32 p_applid) := {
@@ -208,8 +208,8 @@ module LibDiameter_Templates {
                cmdflags := m_cmdFlagsAns,		//RPETrrrr 
                cmdcode := p_cmdcode,			//Command code
                applid := p_applid,			//Diameter common messages =0, Vendor specific applications = 16777216 - 4294967294(0x01000000-0xfffffffe) -Gx=16777238,Rx=16777236, 3GPP Cx/Dx=13777216,3GPP Sh=16777217
                hopid := omit,
                endid := omit
                hopid := 0,
                endid := 0
            }
            
            template DiameterHeader mw_diameterHeaderAns_dummy(Command_Code p_cmdcode, template (present) UInt32 p_applid) := {
@@ -218,8 +218,8 @@ module LibDiameter_Templates {
                cmdflags := mw_cmdFlags,		//RPETrrrr 
                cmdcode := p_cmdcode,			//Command code
                applid := p_applid,			//Diameter common messages =0, Vendor specific applications = 16777216 - 4294967294(0x01000000-0xfffffffe) -Gx=16777238,Rx=16777236, 3GPP Cx/Dx=13777216,3GPP Sh=16777217
                hopid := *,
                endid := *
                hopid := ?,
                endid := ?
            }
            
            template AVP_Flags m_avpFlags := {
@@ -295,7 +295,7 @@ module LibDiameter_Templates {
            
            template Host_IP_Address_AVP m_hostIPAddress_dummy := {
				aVP_Header := m_aVP_Header(c_vendIdHost_IP_Address_AVP),
                aVP_Data := {ipv4 := {0,0,0,0}} 
				aVP_Data := {addressFamily := int2oct(1,2), ipAddress := {ipv4 := {127, 0, 0, 0}}}
			}        
            
            template Origin_Host_AVP m_originHost_dummy := {
@@ -373,13 +373,23 @@ module LibDiameter_Templates {
            	aVP_Data := STATE_MAINTAINED_E
			}
			
//			template SIP_AOR_AVP m_sIP_AOR_dummy := {
//            	aVP_Header := m_aVP_Header(c_vendIdSIP_AOR_AVP),
//            	aVP_Data := {
//                    scheme := "aaa://",
//                    diameterId_FQDN := "",
//                    portField := omit,
//                    uriParameters := omit
//                }
//            }
            
            template SIP_AOR_AVP m_sIP_AOR_dummy := {
                aVP_Header := m_aVP_Header(c_vendIdSIP_AOR_AVP),
                aVP_Data := {
                    scheme := "aaa://",
                    diameterId_FQDN := "",
                    portField := omit,
                    uriParameters := omit
                    userInfo := {""},
                    hostPort := omit,
                    urlParameters := omit
                }
            }
            
@@ -748,7 +758,7 @@ module LibDiameter_Templates {
				header := m_diameterHeaderReq_dummy(CER_E, c_applIdCommonMsg),
				origin_Host := m_originHost_dummy,
				origin_Realm := m_originRealm_dummy,
				host_IP_Address := {},
				host_IP_Address := {m_hostIPAddress(Address:{'0001'O, {ipv4 := {127, 0, 0,1}}})},
				vendor_Id := m_vendorId_dummy,
				product_Name := m_productName_dummy,
				origin_State_Id := omit,
@@ -1499,7 +1509,7 @@ module LibDiameter_Templates {
				result_Code := m_resultCode_dummy,
            	origin_Host := m_originHost_dummy,
            	origin_Realm := m_originRealm_dummy,
				host_IP_Address := {},
				host_IP_Address := {m_hostIPAddress(Address:{'0001'O, {ipv4 := {127, 0, 0,1}}})},
				vendor_Id := m_vendorId_dummy,
				product_Name := m_productName_dummy,
				origin_State_Id := omit,
+24 −31
Original line number Diff line number Diff line
@@ -14,6 +14,7 @@ module LibDiameter_TypesAndValues {
    
    import from LibCommon_BasicTypesAndValues all;
    import from LibCommon_DataStrings all;
    import from LibSip_SIPTypesAndValues all; 
    
group BasicTypesAndConstants{
   
@@ -406,7 +407,7 @@ group BasicTypesAndConstants{
		type record length (4) of UInt8  IPv4Addr;
		type record length (8) of UInt16 IPv6Addr;
		
        type /*universal*/ charstring UTF8String;
        type charstring UTF8String;
        
	}// end group NumberTypes

@@ -425,8 +426,8 @@ group BasicTypesAndConstants{
    			Command_Flags  		cmdflags, //command flags
    			Command_Code 		cmdcode,  //command code
                UInt32  			applid,   //application id
                UInt32	        	hopid optional, //hop_by_hop_id
                UInt32   	        endid optional  //end_to_end_id
                UInt32	        	hopid, //hop_by_hop_id
                UInt32   	        endid  //end_to_end_id
    	    }//end DiameterHeader
    	    
	    }//end group HeaderTypes 
@@ -455,11 +456,15 @@ group BasicTypesAndConstants{
    			};
    
               	/* Ref: FRC3588 p.4.3 Derived Avp Data Formats */
    			type union Address{
                type record Address{
                     Oct2 addressFamily,
                     IpAddress ipAddress
                 }
                type union IpAddress {
                    IPv4Addr ipv4,
                    IPv6Addr ipv6
    			};
                type UInt32 Time;//TODO:rfc3588 Time format "The string MUST contain four octets"
                }
                type UInt32 Time; 
    
    /* Diameter_Identity is FQDN - Fully Qualified Domain Name. 
    * host 
@@ -474,17 +479,6 @@ group BasicTypesAndConstants{
    * host
    */
                type charstring Diameter_Identity;              		         	
         		type record Diameter_GenericParam{
         		/* pid :  ";transport=" or ";protocol="
         		 * paramValue : 
         		 * 	- for pid ";transport=" paramValue can be "tcp" / "udp" / "sctp"
         		 *  - for pid ";protocol=" paramValue can be "diameter" / "radius" / "tacacs+"
         		 *  */
          		  charstring	pid optional,
          		  charstring	paramValue optional
          		}
               	
    			type set of Diameter_GenericParam Diameter_SemicolonParam_List;           	
    			type record DiameterURI{
    /* 	The DiameterURI MUST follow the Uniform Resource Identifiers (URI)
    * 	syntax [URI] rules specified below:
@@ -503,13 +497,12 @@ group BasicTypesAndConstants{
    *     	aaa://host.example.com:1813;transport=udp;protocol=radius
    */	
    			charstring scheme, // "aaa://"
    				charstring diameterId_FQDN,
          			UInt16 portField optional,
    				Diameter_SemicolonParam_List	uriParameters optional
    			UserInfo		userInfo,
    			HostPort		hostPort optional,
    			SemicolonParam_List	urlParameters optional
				}
    			
    			type record IP_AddressMask{    				
    				//integer ipno, //ipv4 or ipv6
    				UTF8String addr,
    				UTF8String mask optional,
    				UTF8String ports optional
@@ -2479,7 +2472,7 @@ group BasicTypesAndConstants{
                     Specific_Action_Type	aVP_Data
                 }; 
                 
                type set of Specific_Action_AVP set_of_Specific_Action_AVP;     
                type set of Specific_Action_AVP Setof_Specific_Action_AVP;    
 
                type record Max_Requested_Bandwidth_DL_AVP{
                //Ref: ETSI TS 129 214 FMax_Requested_Bandwidth_DL AVP
@@ -3605,7 +3598,7 @@ group BasicTypesAndConstants{
                    set of AVP_Type			aVP_Type optional
                }
                
				type set of Host_IP_Address_AVP set_of_Host_IP_Address_AVP;
				type set length (1..infinity) of Host_IP_Address_AVP set_of_Host_IP_Address_AVP;
				type set of Origin_State_Id_AVP set_of_Origin_State_Id_AVP;
				type set of Supported_Vendor_Id_AVP set_of_Supported_Vendor_Id_AVP;
				type set of Inband_Security_Id_AVP set_of_Inband_Security_Id_AVP;
@@ -3616,7 +3609,7 @@ group BasicTypesAndConstants{
            		DiameterHeader 						header,//<CER> ::= < Diameter Header: 257, REQ >     		
    				Origin_Host_AVP 					origin_Host,//required
    				Origin_Realm_AVP 					origin_Realm,
    				set of Host_IP_Address_AVP 			host_IP_Address,
                    set length (1..infinity) of Host_IP_Address_AVP host_IP_Address,
    				Vendor_Id_AVP 						vendor_Id,
    				Product_Name_AVP 					product_Name,//required
    				set of Origin_State_Id_AVP			origin_State_Id optional,
@@ -3637,7 +3630,7 @@ group BasicTypesAndConstants{
    				Result_Code_AVP						result_Code,//required
    				Origin_Host_AVP 					origin_Host,
    				Origin_Realm_AVP 					origin_Realm,
    				set of Host_IP_Address_AVP 			host_IP_Address,
                    set length (1..infinity) of Host_IP_Address_AVP host_IP_Address,
    				Vendor_Id_AVP 						vendor_Id,
    				Product_Name_AVP 					product_Name,//required
    				Origin_State_Id_AVP					origin_State_Id optional,