Commit a4f8915d authored by tepelmann's avatar tepelmann
Browse files

Initial version of TC_NAT64_LSN_ALG_BV_005.

parent dbb98439
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@ module AtsCommon_Interfaces {
            map param (in Ipv4Address p_ip4Address);
            inout
            //Ipv4
            Ipv4Packet
            Ipv4Packet, Ipv4EchoRequest
        }
        
        /**
+341 −0
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@ module AtsNat64_Functions {
    import from AtsCommon_Interfaces all;
    import from AtsCommon_TypesAndValues all;
    import from AtsCommon_Templates all;
    import from AtsCommon_Functions all;
    
    // AtsNat64
    import from AtsNat64_Pixits all;
@@ -78,6 +79,7 @@ module AtsNat64_Functions {
            map(self:ipv4Port, system:ipv4Port) param (p_ip4Address);
            map(self:utPort, system:utPort);
            
            activate(a_default_lsn());
        } // End of function f_preamble_lsn
        
        /**
@@ -92,6 +94,7 @@ module AtsNat64_Functions {
            map(self:ftpPort, system:ftpPort);
            map(self:utPort, system:utPort);
            
            activate(a_default_lsn_ftp());
        } // End of function f_preamble_lsn_ftp
        
        /**
@@ -106,6 +109,7 @@ module AtsNat64_Functions {
            map(self:sipPort, system:sipPort);
            map(self:utPort, system:utPort);
            
            activate(a_default_lsn_sip());
        } // End of function f_preamble_lsn_sip
        
        /**
@@ -120,6 +124,7 @@ module AtsNat64_Functions {
            map(self:rtspPort, system:rtspPort);
            map(self:utPort, system:utPort);
            
            activate(a_default_lsn_rtsp());
        } // End of function f_preamble_lsn_rtsp
        
        /**
@@ -134,6 +139,7 @@ module AtsNat64_Functions {
            map(self:pptpPort, system:pptpPort);
            map(self:utPort, system:utPort);
            
            activate(a_default_lsn_pptp());
        } // End of function f_preamble_lsn_pptp
        
        /**
@@ -149,6 +155,7 @@ module AtsNat64_Functions {
            map(self:ipv6Port, system:ipPort);
            map(self:utPort, system:utPort);
            
            activate(a_default_host());
        } // End of function f_preamble_host
        
        /**
@@ -163,6 +170,7 @@ module AtsNat64_Functions {
            map(self:ftpPort, system:ftpPort);
            map(self:utPort, system:utPort);
            
            activate(a_default_host_ftp());
        } // End of function f_preamble_host_ftp
        
        /**
@@ -177,6 +185,7 @@ module AtsNat64_Functions {
            map(self:sipPort, system:sipPort);
            map(self:utPort, system:utPort);
            
            activate(a_default_host_sip());
        } // End of function f_preamble_host_sip
        
        /**
@@ -191,6 +200,7 @@ module AtsNat64_Functions {
            map(self:rtspPort, system:rtspPort);
            map(self:utPort, system:utPort);
            
            activate(a_default_host_rtsp());
        } // End of function f_preamble_host_rtsp
        
        /**
@@ -205,6 +215,7 @@ module AtsNat64_Functions {
            map(self:pptpPort, system:pptpPort);
            map(self:utPort, system:utPort);
            
            activate(a_default_host_pptp());
        } // End of function f_preamble_host_pptp
        
    } // End of group preambleFunctions
@@ -569,8 +580,338 @@ module AtsNat64_Functions {
                log("*** " & __SCOPE__ & "ERROR: Timeout while awaiting the reception of a message ***");
                f_selfOrClientSyncAndVerdict("error", e_timeout);
            }
            [] a_shutdown() {
                f_down();
                log("*** a_default: INFO: TEST COMPONENT NOW STOPPING ITSELF! ***");
                stop;
            }
        } // End of altstep a_default_MTC 
        
        /**
         * @desc 
         */
        altstep a_default_lsn() runs on LSNComponent {
            [] ipv4Port.receive  { // Unsolicited messages
                tc_ac.stop;
                log("*** " & __SCOPE__ & "ERROR: Received an unexpected IPv4 message, process it as an error ***");
                f_selfOrClientSyncAndVerdict("error", e_error);
            }
            [] utPort.receive {
                log("*** " & __SCOPE__ & "ERROR: Received an unexpected UT command, ignoring it ***");
                repeat;
            }
            [] tc_twait.timeout {
                log("*** " & __SCOPE__ & "ERROR: Timeout while awaiting reaction of the IUT prior to Upper Tester action ***");
                f_selfOrClientSyncAndVerdict("error", e_timeout);
            }
            [] tc_ac.timeout {
                log("*** " & __SCOPE__ & "ERROR: Timeout while awaiting the reception of a message ***");
                f_selfOrClientSyncAndVerdict("error", e_timeout);
            }
            [] any timer.timeout {
                log("*** " & __SCOPE__ & "ERROR: Timeout while awaiting the reception of a message ***");
                f_selfOrClientSyncAndVerdict("error", e_timeout);
            }
            [] a_shutdown() {
                f_postamble_lsn();
                log("*** a_default: INFO: TEST COMPONENT NOW STOPPING ITSELF! ***");
                stop;
            }
        } // End of altstep a_default_lsn
        
        /**
         * @desc 
         */
        altstep a_default_lsn_ftp() runs on LSNFTPComponent {
            [] ftpPort.receive  { // Unsolicited messages
                tc_ac.stop;
                log("*** " & __SCOPE__ & "ERROR: Received an unexpected IPv4 message, process it as an error ***");
                f_selfOrClientSyncAndVerdict("error", e_error);
            }
            [] utPort.receive {
                log("*** " & __SCOPE__ & "ERROR: Received an unexpected UT command, ignoring it ***");
                repeat;
            }
            [] tc_twait.timeout {
                log("*** " & __SCOPE__ & "ERROR: Timeout while awaiting reaction of the IUT prior to Upper Tester action ***");
                f_selfOrClientSyncAndVerdict("error", e_timeout);
            }
            [] tc_ac.timeout {
                log("*** " & __SCOPE__ & "ERROR: Timeout while awaiting the reception of a message ***");
                f_selfOrClientSyncAndVerdict("error", e_timeout);
            }
            [] any timer.timeout {
                log("*** " & __SCOPE__ & "ERROR: Timeout while awaiting the reception of a message ***");
                f_selfOrClientSyncAndVerdict("error", e_timeout);
            }
            [] a_shutdown() {
                f_postamble_lsn_ftp();
                log("*** a_default: INFO: TEST COMPONENT NOW STOPPING ITSELF! ***");
                stop;
            }
        } // End of altstep a_default_lsn_ftp
        
        /**
         * @desc 
         */
        altstep a_default_lsn_sip() runs on LSNSIPComponent {
            [] sipPort.receive  { // Unsolicited messages
                tc_ac.stop;
                log("*** " & __SCOPE__ & "ERROR: Received an unexpected IPv4 message, process it as an error ***");
                f_selfOrClientSyncAndVerdict("error", e_error);
            }
            [] utPort.receive {
                log("*** " & __SCOPE__ & "ERROR: Received an unexpected UT command, ignoring it ***");
                repeat;
            }
            [] tc_twait.timeout {
                log("*** " & __SCOPE__ & "ERROR: Timeout while awaiting reaction of the IUT prior to Upper Tester action ***");
                f_selfOrClientSyncAndVerdict("error", e_timeout);
            }
            [] tc_ac.timeout {
                log("*** " & __SCOPE__ & "ERROR: Timeout while awaiting the reception of a message ***");
                f_selfOrClientSyncAndVerdict("error", e_timeout);
            }
            [] any timer.timeout {
                log("*** " & __SCOPE__ & "ERROR: Timeout while awaiting the reception of a message ***");
                f_selfOrClientSyncAndVerdict("error", e_timeout);
            }
            [] a_shutdown() {
                f_postamble_lsn_sip();
                log("*** a_default: INFO: TEST COMPONENT NOW STOPPING ITSELF! ***");
                stop;
            }
        } // End of altstep a_default_lsn_sip
        
        /**
         * @desc 
         */
        altstep a_default_lsn_rtsp() runs on LSNRTSPComponent {
            [] rtspPort.receive  { // Unsolicited messages
                tc_ac.stop;
                log("*** " & __SCOPE__ & "ERROR: Received an unexpected IPv4 message, process it as an error ***");
                f_selfOrClientSyncAndVerdict("error", e_error);
            }
            [] utPort.receive {
                log("*** " & __SCOPE__ & "ERROR: Received an unexpected UT command, ignoring it ***");
                repeat;
            }
            [] tc_twait.timeout {
                log("*** " & __SCOPE__ & "ERROR: Timeout while awaiting reaction of the IUT prior to Upper Tester action ***");
                f_selfOrClientSyncAndVerdict("error", e_timeout);
            }
            [] tc_ac.timeout {
                log("*** " & __SCOPE__ & "ERROR: Timeout while awaiting the reception of a message ***");
                f_selfOrClientSyncAndVerdict("error", e_timeout);
            }
            [] any timer.timeout {
                log("*** " & __SCOPE__ & "ERROR: Timeout while awaiting the reception of a message ***");
                f_selfOrClientSyncAndVerdict("error", e_timeout);
            }
            [] a_shutdown() {
                f_postamble_lsn_rtsp();
                log("*** a_default: INFO: TEST COMPONENT NOW STOPPING ITSELF! ***");
                stop;
            }
        } // End of altstep a_default_lsn_rtsp
        
        /**
         * @desc 
         */
        altstep a_default_lsn_pptp() runs on LSNPPTPComponent {
            [] pptpPort.receive  { // Unsolicited messages
                tc_ac.stop;
                log("*** " & __SCOPE__ & "ERROR: Received an unexpected IPv4 message, process it as an error ***");
                f_selfOrClientSyncAndVerdict("error", e_error);
            }
            [] utPort.receive {
                log("*** " & __SCOPE__ & "ERROR: Received an unexpected UT command, ignoring it ***");
                repeat;
            }
            [] tc_twait.timeout {
                log("*** " & __SCOPE__ & "ERROR: Timeout while awaiting reaction of the IUT prior to Upper Tester action ***");
                f_selfOrClientSyncAndVerdict("error", e_timeout);
            }
            [] tc_ac.timeout {
                log("*** " & __SCOPE__ & "ERROR: Timeout while awaiting the reception of a message ***");
                f_selfOrClientSyncAndVerdict("error", e_timeout);
            }
            [] any timer.timeout {
                log("*** " & __SCOPE__ & "ERROR: Timeout while awaiting the reception of a message ***");
                f_selfOrClientSyncAndVerdict("error", e_timeout);
            }
            [] a_shutdown() {
                f_postamble_lsn_pptp();
                log("*** a_default: INFO: TEST COMPONENT NOW STOPPING ITSELF! ***");
                stop;
            }
        } // End of altstep a_default_lsn_pptp
        
        /**
         * @desc 
         */
        altstep a_default_host() runs on HostComponent {
            [] ipv6Port.receive  { // Unsolicited messages
                tc_ac.stop;
                log("*** " & __SCOPE__ & "ERROR: Received an unexpected IPv6 message, process it as an error ***");
                f_selfOrClientSyncAndVerdict("error", e_error);
            }
            [] ipv4Port.receive  { // Unsolicited messages
                tc_ac.stop;
                log("*** " & __SCOPE__ & "ERROR: Received an unexpected IPv4 message, process it as an error ***");
                f_selfOrClientSyncAndVerdict("error", e_error);
            }
            [] utPort.receive {
                log("*** " & __SCOPE__ & "ERROR: Received an unexpected UT command, ignoring it ***");
                repeat;
            }
            [] tc_twait.timeout {
                log("*** " & __SCOPE__ & "ERROR: Timeout while awaiting reaction of the IUT prior to Upper Tester action ***");
                f_selfOrClientSyncAndVerdict("error", e_timeout);
            }
            [] tc_ac.timeout {
                log("*** " & __SCOPE__ & "ERROR: Timeout while awaiting the reception of a message ***");
                f_selfOrClientSyncAndVerdict("error", e_timeout);
            }
            [] any timer.timeout {
                log("*** " & __SCOPE__ & "ERROR: Timeout while awaiting the reception of a message ***");
                f_selfOrClientSyncAndVerdict("error", e_timeout);
            }
            [] a_shutdown() {
                f_postamble_host();
                log("*** a_default: INFO: TEST COMPONENT NOW STOPPING ITSELF! ***");
                stop;
            }
        } // End of altstep a_default_host
        
        /**
         * @desc 
         */
        altstep a_default_host_ftp() runs on HostFTPComponent {
            [] ftpPort.receive  { // Unsolicited messages
                tc_ac.stop;
                log("*** " & __SCOPE__ & "ERROR: Received an unexpected IPv6 message, process it as an error ***");
                f_selfOrClientSyncAndVerdict("error", e_error);
            }
            [] utPort.receive {
                log("*** " & __SCOPE__ & "ERROR: Received an unexpected UT command, ignoring it ***");
                repeat;
            }
            [] tc_twait.timeout {
                log("*** " & __SCOPE__ & "ERROR: Timeout while awaiting reaction of the IUT prior to Upper Tester action ***");
                f_selfOrClientSyncAndVerdict("error", e_timeout);
            }
            [] tc_ac.timeout {
                log("*** " & __SCOPE__ & "ERROR: Timeout while awaiting the reception of a message ***");
                f_selfOrClientSyncAndVerdict("error", e_timeout);
            }
            [] any timer.timeout {
                log("*** " & __SCOPE__ & "ERROR: Timeout while awaiting the reception of a message ***");
                f_selfOrClientSyncAndVerdict("error", e_timeout);
            }
            [] a_shutdown() {
                f_postamble_host_ftp();
                log("*** a_default: INFO: TEST COMPONENT NOW STOPPING ITSELF! ***");
                stop;
            }
        } // End of altstep a_default_host_ftp
        
        /**
         * @desc 
         */
        altstep a_default_host_sip() runs on HostSIPComponent {
            [] sipPort.receive  { // Unsolicited messages
                tc_ac.stop;
                log("*** " & __SCOPE__ & "ERROR: Received an unexpected IPv6 message, process it as an error ***");
                f_selfOrClientSyncAndVerdict("error", e_error);
            }
            [] utPort.receive {
                log("*** " & __SCOPE__ & "ERROR: Received an unexpected UT command, ignoring it ***");
                repeat;
            }
            [] tc_twait.timeout {
                log("*** " & __SCOPE__ & "ERROR: Timeout while awaiting reaction of the IUT prior to Upper Tester action ***");
                f_selfOrClientSyncAndVerdict("error", e_timeout);
            }
            [] tc_ac.timeout {
                log("*** " & __SCOPE__ & "ERROR: Timeout while awaiting the reception of a message ***");
                f_selfOrClientSyncAndVerdict("error", e_timeout);
            }
            [] any timer.timeout {
                log("*** " & __SCOPE__ & "ERROR: Timeout while awaiting the reception of a message ***");
                f_selfOrClientSyncAndVerdict("error", e_timeout);
            }
            [] a_shutdown() {
                f_postamble_host_sip();
                log("*** a_default: INFO: TEST COMPONENT NOW STOPPING ITSELF! ***");
                stop;
            }
        } // End of altstep a_default_host_sip
        
        /**
         * @desc 
         */
        altstep a_default_host_rtsp() runs on HostRTSPComponent {
            [] rtspPort.receive  { // Unsolicited messages
                tc_ac.stop;
                log("*** " & __SCOPE__ & "ERROR: Received an unexpected IPv6 message, process it as an error ***");
                f_selfOrClientSyncAndVerdict("error", e_error);
            }
            [] utPort.receive {
                log("*** " & __SCOPE__ & "ERROR: Received an unexpected UT command, ignoring it ***");
                repeat;
            }
            [] tc_twait.timeout {
                log("*** " & __SCOPE__ & "ERROR: Timeout while awaiting reaction of the IUT prior to Upper Tester action ***");
                f_selfOrClientSyncAndVerdict("error", e_timeout);
            }
            [] tc_ac.timeout {
                log("*** " & __SCOPE__ & "ERROR: Timeout while awaiting the reception of a message ***");
                f_selfOrClientSyncAndVerdict("error", e_timeout);
            }
            [] any timer.timeout {
                log("*** " & __SCOPE__ & "ERROR: Timeout while awaiting the reception of a message ***");
                f_selfOrClientSyncAndVerdict("error", e_timeout);
            }
            [] a_shutdown() {
                f_postamble_host_rtsp();
                log("*** a_default: INFO: TEST COMPONENT NOW STOPPING ITSELF! ***");
                stop;
            }
        } // End of altstep a_default_host_rtsp
        
        /**
         * @desc 
         */
        altstep a_default_host_pptp() runs on HostPPTPComponent {
            [] pptpPort.receive  { // Unsolicited messages
                tc_ac.stop;
                log("*** " & __SCOPE__ & "ERROR: Received an unexpected IPv6 message, process it as an error ***");
                f_selfOrClientSyncAndVerdict("error", e_error);
            }
            [] utPort.receive {
                log("*** " & __SCOPE__ & "ERROR: Received an unexpected UT command, ignoring it ***");
                repeat;
            }
            [] tc_twait.timeout {
                log("*** " & __SCOPE__ & "ERROR: Timeout while awaiting reaction of the IUT prior to Upper Tester action ***");
                f_selfOrClientSyncAndVerdict("error", e_timeout);
            }
            [] tc_ac.timeout {
                log("*** " & __SCOPE__ & "ERROR: Timeout while awaiting the reception of a message ***");
                f_selfOrClientSyncAndVerdict("error", e_timeout);
            }
            [] any timer.timeout {
                log("*** " & __SCOPE__ & "ERROR: Timeout while awaiting the reception of a message ***");
                f_selfOrClientSyncAndVerdict("error", e_timeout);
            }
            [] a_shutdown() {
                f_postamble_host_pptp();
                log("*** a_default: INFO: TEST COMPONENT NOW STOPPING ITSELF! ***");
                stop;
            }
        } // End of altstep a_default_host_pptp
        
    } // End of group globalSteps
    
    group getFunctions {
+26 −0
Original line number Diff line number Diff line
@@ -6,5 +6,31 @@
module AtsNat64_Templates {
    
    // LibIPv6
    import from LibIpv6_Interface_TypesAndValues all;
    import from LibIpv6_Interface_Templates all;
    import from LibIpv6_Rfc792Icmpv4_TypesAndValues all;
    import from LibIpv6_CommonRfcs_TypesAndValues all;
    
    group icmp {
        
        template(present) Ipv4EchoRequest mw_ipv4EchoRequest(
            template(present) Ipv4Address p_src,
            template(present) Ipv4Address p_dst,
            template octetstring data
        ) := {
            ipv4Hdr := mw_ipv4Hdr_protocol_srcDst(c_protocol_icmp, p_src, p_dst),
            ipv4Payload := {
                ipv4EchoRequestMsg := {
                    icmpType := c_icmpType_ipv4EReq,
                    icmpCode := c_ipv4IcmpCode0,
                    checksum := ?,
                    identifier := ?,
                    sequenceNumber := ?,
                    data := omit
                }
            }
        }
    
    } // End of group icmp
    
} // End of module AtsNat64_Templates
 No newline at end of file
+153 −0

File changed.

Preview size limit exceeded, changes collapsed.