Commit d1335513 authored by rennoch's avatar rennoch
Browse files

initial definitions

parent e7627675
Loading
Loading
Loading
Loading
+37 −0
Original line number Diff line number Diff line
/**
 *	@author   STF 443
 *  @version  $Id: LibGtp_TypesAndValues.ttcn 459 2012-04-16 08:53:33Z pintar $
 *	@desc     This module defines message, header, structured and simple GTP
 *            types as well constants used by LipDiameter constructs. <br>
 *            Note that any changes made to the definitions in this module
 *            may be overwritten by future releases of this library
 *            End users are encouraged to contact the distributers of this  
 *            module regarding their modifications or additions
 *  @remark   Adding of new message and header types is ok;
 *            Existing message or header types shall not be changed or removed 
 */
module LibGtp_Interface {	
    
    import from LibCommon_BasicTypesAndValues all;
    import from LibCommon_DataStrings all;
    import from LibCommon_AbstractData all;
    import from LibCommon_Sync all;
    
    // GPRS tunneling protocol 
    import from LibGtp_TypesAndValues all;
    
    type component GtpComponent {
        port GtpPort GTP;
        
        // parts needed for Client/SelfSyncComp type compatibility
        var 	StringStack v_stateStack := c_initStringStack;
        port 	SyncPort 	syncSendPort;
        port 	SyncPort 	syncPort;
        timer tc_sync 	:= PX_TSYNC_TIME_LIMIT;
        }

    type port GtpPort message {
          inout GTPv1_MSG}; //GTPv1-H
            

}
 No newline at end of file
+25 −0
Original line number Diff line number Diff line
/**
 *	@author   STF 443
 *  @version  $Id: LibGtp_Steps.ttcn 459 2012-04-16 08:53:33Z pintar $
 *	@desc     This module defines functions used for GTP.<br>
 *            Note that any changes made to the definitions in this module
 *            may be overwritten by future releases of this library
 *            End users are encouraged to contact the distributers of this  
 *            module regarding their modifications or additions
 */
module LibGtp_Steps {	
    
    import from LibCommon_BasicTypesAndValues all;
    import from LibCommon_DataStrings all;
    import from LibCommon_AbstractData all;
    import from LibCommon_Sync all;
	import from LibGtp_TypesAndValues all;
	import from LibGtp_Interface all;
    
    altstep a_echoResponse () runs on GtpComponent {
        var GTPv1_MSG v_echo;
        
        [] GTP.receive (GTPv1_MSG:?) -> value v_echo {GTP.send (v_echo)}
    }

}
 No newline at end of file
+37 −0
Original line number Diff line number Diff line
/**
 *	@author   STF 443
 *  @version  $Id: LibGtp_TypesAndValues.ttcn 459 2012-04-16 08:53:33Z pintar $
 *	@desc     This module defines message, header, structured and simple GTP
 *            types as well constants used by LipDiameter constructs. <br>
 *            Note that any changes made to the definitions in this module
 *            may be overwritten by future releases of this library
 *            End users are encouraged to contact the distributers of this  
 *            module regarding their modifications or additions
 *  @remark   Adding of new message and header types is ok;
 *            Existing message or header types shall not be changed or removed 
 */
module LibGtp_Templates {	
    
    import from LibCommon_BasicTypesAndValues all;
    import from LibCommon_DataStrings all;
    import from LibCommon_AbstractData all;
    import from LibCommon_Sync all;
    import from LibGtp_TypesAndValues all;
 
   
    template GTPv1_MSG m_gtp_v1_dummy := {
    	header := {
    		version := '0001'B,
    		messagetype := '01'O,
    		len := '10'O,
    		teid := '01020304'O,
    		seqnum := omit,
    		npdu_num := omit,
    		extensionheader := omit
    	},
    	body := omit
    }



}
 No newline at end of file
+40 −0
Original line number Diff line number Diff line
/**
 *	@author   STF 443
 *  @version  $Id: LibGtp_TypesAndValues.ttcn 459 2012-04-16 08:53:33Z pintar $
 *	@desc     This module defines message, header, structured and simple GTP
 *            types as well constants used by LipDiameter constructs. <br>
 *            Note that any changes made to the definitions in this module
 *            may be overwritten by future releases of this library
 *            End users are encouraged to contact the distributers of this  
 *            module regarding their modifications or additions
 *  @remark   Adding of new message and header types is ok;
 *            Existing message or header types shall not be changed or removed 
 */
module LibGtp_TypesAndValues {	
    
    import from LibCommon_BasicTypesAndValues all;
    import from LibCommon_DataStrings all;
    import from LibCommon_AbstractData all;
    import from LibCommon_Sync all;
    
          
/**
 * @reference ETSI TS 129281 v10.3.0, section 5.1
 */
    type record GTPv1_Header {
    bitstring version,
    octetstring messagetype,
    octetstring len,
    octetstring teid,
    octetstring seqnum optional,
    octetstring npdu_num optional,
    octetstring extensionheader optional
    }
    
    type record GTPv1_MSG {
        GTPv1_Header  header,
        octetstring	  body optional
    }    


}
 No newline at end of file