Commit 839cf052 authored by garciay's avatar garciay
Browse files

Session Week #33:

- Continue TPs implementation for Tunnel Management
- Enhance templates values & PIXITs
parent 773b07ac
Loading
Loading
Loading
Loading
+95 −29
Original line number Original line Diff line number Diff line
@@ -16,7 +16,6 @@ module LibGtpv2C_Configuration {
    // LibGtpv2C
    // LibGtpv2C
    import from LibGtpv2C_TypesAndValues all;
    import from LibGtpv2C_TypesAndValues all;
    import from LibGtpv2C_TestSystem all;
    import from LibGtpv2C_TestSystem all;
    import from LibGtpv2C_Templates all;
    import from LibGtpv2C_Pics all;
    import from LibGtpv2C_Pics all;
    
    
    group configurationFunctions {
    group configurationFunctions {
@@ -32,6 +31,10 @@ module LibGtpv2C_Configuration {
         * @reference ETSI TS 103 202-3 V0.0.2 (2015-06) Figure 1: Test configuration CF_MME
         * @reference ETSI TS 103 202-3 V0.0.2 (2015-06) Figure 1: Test configuration CF_MME
         */
         */
        function f_cf01_S11Up_MME() runs on Gtpv2CComponent {
        function f_cf01_S11Up_MME() runs on Gtpv2CComponent {
            
            // Create component
            vc_sgw := Gtpv2CComponent.create; 
            
            // Map ports
            // Map ports
            map(vc_sgw:acPort, system:acPort);
            map(vc_sgw:acPort, system:acPort);
            map(vc_sgw:s11Port, system:s11Port);
            map(vc_sgw:s11Port, system:s11Port);
@@ -42,10 +45,9 @@ module LibGtpv2C_Configuration {
            // Activate sync default for MTC
            // Activate sync default for MTC
            activate(a_mtc_shutdown());
            activate(a_mtc_shutdown());
            
            
            vc_sgw := Gtpv2CComponent.create; 
            
            vc_sequenceNumber := 0;
            vc_sequenceNumber := 0;
            vc_restartCounter := 0;
            vc_restartCounter := 0;
            vc_teidGreCounter := 0;
        } // End of function f_cf01_S11Up_MME 
        } // End of function f_cf01_S11Up_MME 
        
        
        /**
        /**
@@ -60,6 +62,13 @@ module LibGtpv2C_Configuration {
         * @reference ETSI TS 103 202-3 V0.0.2 (2015-06) Figure 2: Test configuration CF_MME_ENB
         * @reference ETSI TS 103 202-3 V0.0.2 (2015-06) Figure 2: Test configuration CF_MME_ENB
         */
         */
        function f_cf02_S11Up_MME() runs on Gtpv2CComponent {
        function f_cf02_S11Up_MME() runs on Gtpv2CComponent {
            
            // Create components
            vc_sgw := Gtpv2CComponent.create; 
            if (PICS_SUPPORT_S1_MME_TRIGGERS) {
                vc_s1mme := Gtpv2CComponent.create; 
            }
            
            // Map ports
            // Map ports
            map(vc_sgw:acPort, system:acPort);
            map(vc_sgw:acPort, system:acPort);
            map(vc_sgw:s11Port, system:s11Port);
            map(vc_sgw:s11Port, system:s11Port);
@@ -76,11 +85,9 @@ module LibGtpv2C_Configuration {
                activate(a_s1mme_default());
                activate(a_s1mme_default());
            }
            }
            
            
            vc_sgw := Gtpv2CComponent.create; 
            vc_s1mme := Gtpv2CComponent.create; 
            
            vc_sequenceNumber := 0;
            vc_sequenceNumber := 0;
            vc_restartCounter := 0;
            vc_restartCounter := 0;
            vc_teidGreCounter := 0;
        } // End of function f_cf02_S11Up_MME 
        } // End of function f_cf02_S11Up_MME 
        
        
        /**
        /**
@@ -97,9 +104,10 @@ module LibGtpv2C_Configuration {
            f_disconnect4SelfOrClientSync();
            f_disconnect4SelfOrClientSync();
            
            
            // Unmap ports
            // Unmap ports
            unmap(self:acPort, system:acPort);
            unmap(vc_sgw:acPort, system:acPort);
            unmap(self:s11Port, system:s11Port);
            unmap(vc_sgw:s11Port, system:s11Port);
            
            
            // Terminate component
            vc_sgw.done;
            vc_sgw.done;
            
            
        } // End of function f_cf01_S11Down_MME 
        } // End of function f_cf01_S11Down_MME 
@@ -124,8 +132,12 @@ module LibGtpv2C_Configuration {
                unmap(vc_s1mme:s1MmePort, system:s11Port);
                unmap(vc_s1mme:s1MmePort, system:s11Port);
            }
            }
            
            
            // Terminate components
            vc_sgw.done; 
            vc_sgw.done; 
            if (PICS_SUPPORT_S1_MME_TRIGGERS) {
                vc_s1mme.done; 
                vc_s1mme.done; 
            }
            
            
            
        } // End of function f_cf01_S11Down_MME 
        } // End of function f_cf01_S11Down_MME 
        
        
@@ -140,6 +152,10 @@ module LibGtpv2C_Configuration {
         * @reference ETSI TS 103 202-3 V0.0.2 (2015-06) Figure 3: Test configuration CF_SGW
         * @reference ETSI TS 103 202-3 V0.0.2 (2015-06) Figure 3: Test configuration CF_SGW
         */
         */
        function f_cf01_S11Up_SGW() runs on Gtpv2CComponent {
        function f_cf01_S11Up_SGW() runs on Gtpv2CComponent {
            
            // Create component
            vc_mme := Gtpv2CComponent.create; 
            
            // Map ports
            // Map ports
            map(vc_mme:acPort, system:acPort);
            map(vc_mme:acPort, system:acPort);
            map(vc_mme:s11Port, system:s11Port);
            map(vc_mme:s11Port, system:s11Port);
@@ -150,10 +166,9 @@ module LibGtpv2C_Configuration {
            // Activate sync default for MTC
            // Activate sync default for MTC
            activate(a_mtc_shutdown());
            activate(a_mtc_shutdown());
            
            
            vc_mme := Gtpv2CComponent.create; 
            
            vc_sequenceNumber := 0;
            vc_sequenceNumber := 0;
            vc_restartCounter := 0;
            vc_restartCounter := 0;
            vc_teidGreCounter := 0;
        } // End of function f_cf01_S11Up_SGW 
        } // End of function f_cf01_S11Up_SGW 
        
        
        /**
        /**
@@ -168,6 +183,11 @@ module LibGtpv2C_Configuration {
         * @reference ETSI TS 103 202-3 V0.0.2 (2015-06) Figure 4: Test configuration CF_SGW_PGW
         * @reference ETSI TS 103 202-3 V0.0.2 (2015-06) Figure 4: Test configuration CF_SGW_PGW
         */
         */
        function f_cf02_S11Up_SGW() runs on Gtpv2CComponent {
        function f_cf02_S11Up_SGW() runs on Gtpv2CComponent {
            
            // Create components
            vc_s5 := Gtpv2CComponent.create; 
            vc_mme := Gtpv2CComponent.create; 
            
            // Map ports
            // Map ports
            map(vc_mme:acPort, system:acPort);
            map(vc_mme:acPort, system:acPort);
            map(vc_mme:s11Port, system:s11Port);
            map(vc_mme:s11Port, system:s11Port);
@@ -180,11 +200,9 @@ module LibGtpv2C_Configuration {
            activate(a_mtc_shutdown());
            activate(a_mtc_shutdown());
            activate(a_s5_default());
            activate(a_s5_default());
            
            
            vc_s5 := Gtpv2CComponent.create; 
            vc_mme := Gtpv2CComponent.create; 
            
            vc_sequenceNumber := 0;
            vc_sequenceNumber := 0;
            vc_restartCounter := 0;
            vc_restartCounter := 0;
            vc_teidGreCounter := 0;
        } // End of function f_cf02_S11Up_SGW 
        } // End of function f_cf02_S11Up_SGW 
        
        
        /**
        /**
@@ -200,6 +218,12 @@ module LibGtpv2C_Configuration {
         * @reference ETSI TS 103 202-3 V0.0.2 (2015-06) Figure 5: Test configuration CF_SGW_PGW_SGSN
         * @reference ETSI TS 103 202-3 V0.0.2 (2015-06) Figure 5: Test configuration CF_SGW_PGW_SGSN
         */
         */
        function f_cf03_S11Up_SGW() runs on Gtpv2CComponent {
        function f_cf03_S11Up_SGW() runs on Gtpv2CComponent {
            
            // Create components
            vc_mme := Gtpv2CComponent.create; 
            vc_s4 := Gtpv2CComponent.create; 
            vc_s5 := Gtpv2CComponent.create; 
            
            // Map ports
            // Map ports
            map(vc_mme:acPort, system:acPort);
            map(vc_mme:acPort, system:acPort);
            map(vc_mme:s11Port, system:s11Port);
            map(vc_mme:s11Port, system:s11Port);
@@ -214,12 +238,9 @@ module LibGtpv2C_Configuration {
            activate(a_s4_default());
            activate(a_s4_default());
            activate(a_s5_default());
            activate(a_s5_default());
            
            
            vc_s4 := Gtpv2CComponent.create; 
            vc_s5 := Gtpv2CComponent.create; 
            vc_mme := Gtpv2CComponent.create; 
            
            vc_sequenceNumber := 0;
            vc_sequenceNumber := 0;
            vc_restartCounter := 0;
            vc_restartCounter := 0;
            vc_teidGreCounter := 0;
        } // End of function f_cf03_S11Up_SGW 
        } // End of function f_cf03_S11Up_SGW 
        
        
        /**
        /**
@@ -239,6 +260,7 @@ module LibGtpv2C_Configuration {
            unmap(vc_mme:acPort, system:acPort);
            unmap(vc_mme:acPort, system:acPort);
            unmap(vc_mme:s11Port, system:s11Port);
            unmap(vc_mme:s11Port, system:s11Port);
            
            
            // Terminate component
            vc_mme.done;
            vc_mme.done;
            
            
        } // End of function f_cf01_S11Down_SGW 
        } // End of function f_cf01_S11Down_SGW 
@@ -261,6 +283,7 @@ module LibGtpv2C_Configuration {
            unmap(vc_mme:s11Port, system:s11Port);
            unmap(vc_mme:s11Port, system:s11Port);
            unmap(vc_s5:s5Port, system:s5Port);
            unmap(vc_s5:s5Port, system:s5Port);
            
            
            // Terminate components
            vc_s5.done;
            vc_s5.done;
            vc_mme.done;
            vc_mme.done;
            
            
@@ -285,9 +308,10 @@ module LibGtpv2C_Configuration {
            unmap(vc_s4:s4Port, system:s4Port);
            unmap(vc_s4:s4Port, system:s4Port);
            unmap(vc_s5:s5Port, system:s5Port);
            unmap(vc_s5:s5Port, system:s5Port);
            
            
            // Terminate components
            vc_mme.done;
            vc_s4.done;
            vc_s4.done;
            vc_s5.done;
            vc_s5.done;
            vc_mme.done;
            
            
        } // End of function f_cf03_S11Down_SGW 
        } // End of function f_cf03_S11Down_SGW 
        
        
@@ -354,20 +378,62 @@ module LibGtpv2C_Configuration {
            return vc_restartCounter;
            return vc_restartCounter;
        } // End of function f_getNextRestartCounter
        } // End of function f_getNextRestartCounter
        
        
        /**
         * @desc Increment and return the TEID/GRE counter
         * @return The new restart counter value
         * @verdict Unchanged
         */
        function f_getNextTeidGre() runs on Gtpv2CComponent return UInt32 {
            vc_teidGreCounter := (vc_teidGreCounter + 1) mod c_uInt32Max;
            return vc_teidGreCounter;
        } // End of function f_getNextTeidGre
        
        group extractInformationElementFunctions { 
        group extractInformationElementFunctions { 
            
            
            function f_extract_teid(in Gtpv2CPdu p_gtpv2Pdu) return Oct4 { 
            group headers {
                // Sanity check
                if (not(ispresent(p_gtpv2Pdu.extHeader.teid))) { 
                    return '00000000'O;
                }
                
                
                function f_extract_teid(in Gtpv2CPdu p_gtpv2Pdu) return Oct4 { 
                    return p_gtpv2Pdu.extHeader.teid;
                    return p_gtpv2Pdu.extHeader.teid;
            }
                } // End of function f_extract_teid
                
                
                function f_extract_sequenceNumber(in Gtpv2CPdu p_gtpv2Pdu) return UInt24 {
                function f_extract_sequenceNumber(in Gtpv2CPdu p_gtpv2Pdu) return UInt24 {
                    return p_gtpv2Pdu.extHeader.sequenceNumber;
                    return p_gtpv2Pdu.extHeader.sequenceNumber;
            }
                } // End of function f_extract_sequenceNumber
                
            } // End of group headers 
            
            group ieCreateSessionRequest {
            	
                function f_extract_recovery(in Gtpv2CPdu p_gtpv2Pdu) return template (omit) Recovery {
                    // Sanity check
    //                if (not(ispresent(p_gtpv2Pdu.payload.ieCreateSessionRequest.recovery))) { 
    //                    return omit;
    //                }
    //                
                    return p_gtpv2Pdu.payload.ieCreateSessionRequest.recovery;
                } // End of function f_extract_recovery
                
                function f_extract_epsBearerId_from_createdBearerContext(in Gtpv2CPdu p_gtpv2Pdu) return template (omit) EpsBearerId {
                    return p_gtpv2Pdu.payload.ieCreateSessionRequest.bearerContextsCreated.groupedIes.createdContextWithinCreateSessionRequest.linkedEpsBearerId;
                } // End of function f_extract_epsBearerId_from_createdBearerContext
                
            } // End of group ieCreateSessionRequest 
            
            group ieCreateSessionResponse {
            	
                function f_extract_chargingId_from_createdBearerContext(in Gtpv2CPdu p_gtpv2Pdu) return template (omit) ChargingId {
                    return p_gtpv2Pdu.payload.ieCreateSessionResponse.bearerContextsCreated.groupedIes.createdContextWithinCreateSessionResponse.chargingId;
                } // End of function f_extract_chargingId_from_createdBearerContext
                
                function f_extract_s5_S8UPgw_from_createdBearerContext(in Gtpv2CPdu p_gtpv2Pdu) return template (omit) FullyQualifiedTeid {
                    return p_gtpv2Pdu.payload.ieCreateSessionResponse.bearerContextsCreated.groupedIes.createdContextWithinCreateSessionResponse.s5_S8UPgw;
                } // End of function f_extract_chargingId_from_createdBearerContext
                
            } // End of group ieCreateSessionResponse 
            
            function f_extract_digit(bitstring p_value, integer p_index) return Bit4 {
                return (p_value >> (p_index - 1) * 4) and4b '1111'B;
            } // End of function f_extract_digit
            
            
        } // End of group extractInformationElementFunctions 
        } // End of group extractInformationElementFunctions 
        
        
+1242 −721

File changed.

Preview size limit exceeded, changes collapsed.

+66 −0
Original line number Original line Diff line number Diff line
@@ -108,6 +108,42 @@ module LibGtpv2C_Pics {
         */
         */
        modulepar boolean PICS_MME_DELETE_BEARER_RESPONSE := true;
        modulepar boolean PICS_MME_DELETE_BEARER_RESPONSE := true;
        
        
        /**
         * @desc Does the IUT support Downlink Data Notification Acknowledge?
         * @see  ETSI TS 103 202-1 V0.0.3 (2013-10) Table A.3/10
         */
        modulepar boolean PICS_MME_DOWNLINK_DATA_NOTIFICATION_ACKNOWLEDGE := true;
        
        /**
         * @desc Does the IUT support Downlink Data Failure Indication?
         * @see  ETSI TS 103 202-1 V0.0.3 (2013-10) Table A.3/11
         */
        modulepar boolean PICS_MME_DOWNLINK_DATA_FAILURE_INDICATION := true;
        
        /**
         * @desc Does the IUT support Delete Indirect Data Forwarding Tunnel Request?
         * @see  ETSI TS 103 202-1 V0.0.3 (2013-10) Table A.3/12
         */
        modulepar boolean PICS_MME_DELETE_INDIRECT_DATA_FORWARDING_TUNNEL_REQUEST := true;
        
        /**
         * @desc Does the IUT support Modify Bearer Command?
         * @see  ETSI TS 103 202-1 V0.0.3 (2013-10) Table A.3/13
         */
        modulepar boolean PICS_MME_MODIFY_BEARER_COMMAND := true;
        
        /**
         * @desc Does the IUT support Update Bearer Response?
         * @see  ETSI TS 103 202-1 V0.0.3 (2013-10) Table A.3/14
         */
        modulepar boolean PICS_MME_UPDATE_BEARER_RESPONSE := true;
        
        /**
         * @desc Does the IUT support Delete Bearer Command?
         * @see  ETSI TS 103 202-1 V0.0.3 (2013-10) Table A.3/15
         */
        modulepar boolean PICS_MME_DELETE_BEARER_COMMAND := true;
        
    } // End of group mmeSystemCapabilities
    } // End of group mmeSystemCapabilities
    
    
    group sgwSystemCapabilities {
    group sgwSystemCapabilities {
@@ -148,6 +184,36 @@ module LibGtpv2C_Pics {
         */
         */
        modulepar boolean PICS_SGW_DELETE_SESSION_RESPONSE := true;
        modulepar boolean PICS_SGW_DELETE_SESSION_RESPONSE := true;
        
        
        /**
         * @desc Does the IUT support Downlink Data Notification?
         * @see  ETSI TS 103 202-1 V0.0.3 (2013-10) Table A.4/10
         */
        modulepar boolean PICS_SGW_DOWNLINK_DATA_NOTIFICATION := true;
        
        /**
         * @desc Does the IUT support Delete Indirect Data Forwarding Tunnel Response?
         * @see  ETSI TS 103 202-1 V0.0.3 (2013-10) Table A.4/11
         */
        modulepar boolean PICS_SGW_DELETE_INDIRECT_DATA_FORWARDING_TUNNEL_RESPONSE := true;
        
        /**
         * @desc Does the IUT support Modify Bearer Failure Indication?
         * @see  ETSI TS 103 202-1 V0.0.3 (2013-10) Table A.4/12
         */
        modulepar boolean PICS_SGW_MODIFY_BEARER_FAILURE_INDICATION := true;
        
        /**
         * @desc Does the IUT support Update Bearer Request?
         * @see  ETSI TS 103 202-1 V0.0.3 (2013-10) Table A.4/13
         */
        modulepar boolean PICS_SGW_UPDATE_BEARER_REQUEST := true;
        
        /**
         * @desc Does the IUT support Delete Bearer Failure Indication?
         * @see  ETSI TS 103 202-1 V0.0.3 (2013-10) Table A.4/14
         */
        modulepar boolean PICS_SGW_DELETE_BEARER_FAILURE_INDICATION := true;
        
    } // End of sgwSystemCapabilities
    } // End of sgwSystemCapabilities
    
    
} // End of module LibGtpv2C_Pics 
} // End of module LibGtpv2C_Pics 
+91 −1
Original line number Original line Diff line number Diff line
@@ -100,14 +100,50 @@ module LibGtpv2C_Pixits {
    
    
    modulepar charstring PX_VISITED_APN := "visited.com";
    modulepar charstring PX_VISITED_APN := "visited.com";
    
    
    /**
     * @desc International Mobile Subscriber Identity (IMSI) for the caller
     */
    modulepar charstring PX_CALLER_IMSI := "33614000000001";
    modulepar charstring PX_CALLER_IMSI := "33614000000001";
    
    
    modulepar charstring PX_CALLER_MSISDN := "337000000001";
    /**
     * @desc Mobile Station ISDN Number (MSISDN) for the caller
     */
    modulepar charstring PX_CALLER_MSISDN := "3937930357";
    
    
    /**
     * @desc Mobile Equipment Identity (MEI) for the caller
     */
    modulepar charstring PX_CALLER_MEI := "99990000000100";
    modulepar charstring PX_CALLER_MEI := "99990000000100";
    
    
    /**
     * @desc Mobile Country Code (MCC) for the caller
     */
    modulepar bitstring PX_CALLER_MCC := int2bit(999, 12); // ETSI TS 129 274 V9.13.0 (2015-01) Clause 8.21.4    TAI field
    
    
    /**
     * @desc Mobile Network Code (MNC) for the caller
     */
    modulepar bitstring PX_CALLER_MNC := int2bit(99, 12); // ETSI TS 129 274 V9.13.0 (2015-01) Clause 8.21.4    TAI field
    
    
    /**
     * @desc Tracking Area Code (TAC) for the caller
     */
    modulepar Oct2 PX_CALLER_TAC := '000f'O; // ETSI TS 129 274 V9.13.0 (2015-01) Clause 8.21.4    TAI field
    
    /**
     * @desc E-UTRAN Cell Identifier (ECI)
     */
    modulepar Oct3 PX_EUTRAN_CELL_ID := '000101'O;
     
    /**
     * @desc Cell Identity (CI)
     */
    modulepar Oct2 PX_CELL_IDENTITY := '0101'O;
     
    /**
     * @desc Location Area Code (LAC)
     */
    modulepar Oct2 PX_LOCATION_AREA_CODE := '0000'O;
    
    
    modulepar charstring PX_CALLEE_IMSI := "220614000000002";
    modulepar charstring PX_CALLEE_IMSI := "220614000000002";
    
    
@@ -115,9 +151,63 @@ module LibGtpv2C_Pixits {
    
    
    modulepar charstring PX_CALLEE_MEI := "99990000000200";
    modulepar charstring PX_CALLEE_MEI := "99990000000200";
    
    
    /**
     * @desc S11 MME F-TEID (IPv4)
     */
    modulepar Oct4 PX_SENDER_F_TEID_IPv4ADDRESS := 'ac1e0e01'O; // 172.30.14.1 - S11 MME
    
    
    /**
     * @desc S11/S4 S-GW F-TEID (IPv4)
     */
    modulepar Oct4 PX_S11S4_SGW_F_TEID_IPv4ADDRESS := 'ac1e8e01'O; // 172.30.142.1 - S-GW
    
    /**
     * @desc S5/S8 P-GW F-TEID (IPv4)
     */
    modulepar Oct4 PX_S5S8_PGW_F_TEID_IPv4ADDRESS := 'ac1e9001'O; // 172.30.144.1 - P-GW
    
    /**
     * @desc PDN Address and Prefix (IPv4)
     */
    modulepar Oct4 PX_PAA_IPV4ADDRESS := 'ac1e2143'O; // 172.30.33.67
    
    /**
     * @desc S1-U eNodeB GTP-U interface F-TEID (IPv4)
     */
     modulepar Oct4 PX_S1_U_eNodeB_F_TEID_IPv4ADDRESS := 'ac148ae4'O; // 172.20.138.228
    
    /**
     * @desc S1-U SGW GTP-U interface F-TEID (IPv4)
     */
     modulepar Oct4 PX_S1_U_SGW_F_TEID_IPv4ADDRESS := 'ac1e1001'O; // 172.30.16.1
    
    /**
     * @desc S5/S8 PGW GTP-U interface F-TEID (IPv4)
     */
     modulepar Oct4 PX_S5S8_U_PGW_F_TEID_IPv4ADDRESS := 'ac1e9001'O; // 172.30.144.1
    
    /**
     * @desc Aggregate Maximum Bit Rate for Uplink (AMBR Uplink)
     */
    modulepar UInt32 PX_AMBR_UL := 200;
    
    /**
     * @desc Aggregate Maximum Bit Rate for Downlink (AMBR Downlink)
     */
    modulepar UInt32 PX_AMBR_DL := 500;
    
    
    
    
    modulepar octetstring PX_PCO_PAYLOAD := '80000d040808080880210a0300000a81060808080880210a0400000a830600000000'O;
    
    /**
     * @desc TFT payload
     * ==> TFT operation code: Create new TFT
     *     Number of packet filters: 1
     *     Packet evaluation precedence: 0x30
     *     Packet filter length: 0x02
     *     Packet filter component type identifier: Protocol identifier/Next header type 
     */
    modulepar octetstring PX_TFT_PAYLOAD := '213030023001'O;
    
    
    /**
    /**
     * @desc MAC address of the system under test acting as MME
     * @desc MAC address of the system under test acting as MME
+1327 −872

File changed.

Preview size limit exceeded, changes collapsed.

Loading