Loading ttcn/AtsMAPE/AtsMapE_Functions.ttcn3 +208 −0 Original line number Diff line number Diff line Loading @@ -6,5 +6,213 @@ module AtsMapE_Functions { // LibCommon import from LibCommon_BasicTypesAndValues all; import from LibCommon_DataStrings all; import from LibCommon_Sync all; import from LibCommon_VerdictControl all; import from LibCommon_Time all; // LibIpv6 import from LibIpv6_Interface_Templates all; import from LibIpv6_Interface_TypesAndValues all; import from LibIpv6_CommonRfcs_TypesAndValues all; import from AtsCommon_Tcp_Rfc793_TypesAndValues all; import from LibIpv6_CommonRfcsDhcp_TypesAndValues all; import from LibIpv6_CommonRfcsDhcp_Functions all; // AtsCommon import from AtsCommon_TypesAndValues all; import from AtsCommon_DNS_CommonRfcs_TypesAndValues all; import from AtsCommon_Interfaces all; import from AtsCommon_Functions all; // Ats6RD import from AtsMapE_TypesAndValues all; import from AtsMapE_Interfaces all; import from AtsMapE_Pixits all; group initialiseFunctions { /** * @desc Setup communication port for PLAT role * @verdict Unchanged */ function f_cf01Up_br() runs on MapEComponent { // Connect synchronisation ports f_connect4SelfOrClientSync(); // Default activation activate(a_default_MTC()); } // End of function f_cf01Up_br /** * @desc Setup communication port for CLAT role * @verdict Unchanged */ function f_cf01Up_cpe() runs on MapEComponent { // Connect synchronisation ports f_connect4SelfOrClientSync(); // Default activation activate(a_default_MTC()); } // End of function f_cf01Up_cpe } // End of group initialiseFunctions group preambleFunctions { /** * @desc Preamble processing for BRComponent * @verdict Unchanged * @see BRComponent */ function f_preamble_br(Ipv4Address p_ip4Address) runs on BRComponent system TestAdapter { // Connect synchronisation ports f_connect4SelfOrClientSync(); // Map ports map(self:ipv4Port, system:ipv4Port) param (p_ip4Address); map(self:ipPort, system:ipPort); map(self:utPort, system:utPort); activate(a_default_br()); } // End of function f_preamble_br /** * @desc Preamble processing for HostComponent * @verdict Unchanged * @see HostComponent */ function f_preamble_host() runs on HostComponent system TestAdapter { // Connect synchronisation ports f_connect4SelfOrClientSync(); // Map ports map(self:ipPort, system:ipPort); map(self:utPort, system:utPort); activate(a_default_host()); } // End of function f_preamble_host } // End of group preambleFunctions group postambleFunctions { /** * @desc Postamble processing for BRComponent * @verdict Unchanged * @see BRComponent */ function f_postamble_br() runs on BRComponent { // Nothing to do } // End of function f_postamble_br /** * @desc Postamble processing for HostComponent * @verdict Unchanged * @see HostComponent */ function f_postamble_host() runs on HostComponent { // Nothing to do } // End of function f_postamble_host } // End of group postambleFunctions group globalSteps { /** * @desc * TODO enable functionality! */ altstep a_default_MTC() runs on MapEComponent { [] any timer.timeout { log("*** " & __SCOPE__ & "ERROR: Timeout while awaiting the reception of a message ***"); f_selfOrClientSyncAndVerdict("error", e_timeout); } [] a_shutdown() { log("*** " & __SCOPE__ & "INFO: TEST COMPONENT NOW STOPPING ITSELF! ***"); stop; } } // End of altstep a_default_MTC /** * @desc * TODO enable functionality! */ altstep a_default_br() runs on BRComponent { [] 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_wait.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); } [] tc_noac.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_br(); log("*** a_default: INFO: TEST COMPONENT NOW STOPPING ITSELF! ***"); stop; } } // End of altstep a_default_br /** * @desc */ altstep a_default_host() runs on HostComponent { [] ipPort.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_wait.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 } // End of group globalSteps } // End of module AtsMapE_Functions No newline at end of file ttcn/AtsMAPE/AtsMapE_Interfaces.ttcn3 +41 −9 Original line number Diff line number Diff line Loading @@ -6,16 +6,12 @@ module AtsMapE_Interfaces { // LibCommon import from LibCommon_Sync all; import from LibCommon_Time all; // LibIPv6 import from LibIpv6_CommonRfcs_TypesAndValues { type Ipv6Address }; import from LibIpv6_Interface_TypesAndValues { type LibIpv6Node, Ipv4Port, Ipv6Port }; import from LibIpv6_Interface_TypesAndValues all; import from LibIpv6_CommonRfcs_TypesAndValues all; // AtsCommon import from AtsCommon_Interfaces all; Loading @@ -27,15 +23,51 @@ module AtsMapE_Interfaces { group mtcDesc { type component MapEComponent extends UtComponent, LibIpv6Node { /** xLAT component reference */ var BRComponents vc_brComponents := null; /** Host component reference */ var HostComponents vc_hostComponents := null; /** HTTP component reference */ var HostHTTPComponents vc_hostHttpComponents := null; } // End of component MapEComponent type record of BRComponent BRComponents; type record of HostComponent HostComponents; type record of HostHTTPComponent HostHTTPComponents; } // End of group mtcDesc group componentDesc { group componentPorts { /** * @desc */ type component HostComponent extends UtComponent, LibIpv6Node, SelfSyncComp { } // End of component HostComponent /** * @desc */ type component BRComponent extends UtComponent, LibIpv6Node, SelfSyncComp { /** Timer used for unexpected received message */ timer tc_noac:= PX_TNOAC; } // End of component BRComponent type component HostHTTPComponent extends UtComponent, SelfSyncComp { /** HTTP message port */ port HttpPort httpPort; /** Timer used for expected received message */ timer tc_ac:= PX_TAC; /** Timer used for unexpected received message */ timer tc_noac:= PX_TNOAC; /** Timer used for receive message */ timer tc_wait:= PX_TWAIT; } // End of component HostHTTPComponent } // End of group componentPorts } // End of group componentDesc Loading ttcn/AtsMAPE/AtsMapE_Pics.ttcn3 +9 −1 Original line number Diff line number Diff line Loading @@ -5,6 +5,14 @@ */ module AtsMapE_Pics { // LibCommon /** * @desc The SUT is the CLAT equipment */ modulepar boolean PICS_ROLE_IS_BR := false; /** * @desc The SUT is the PLAT equipment */ modulepar boolean PICS_ROLE_IS_PLAT := false; } // End of module AtsMapE_Pics No newline at end of file ttcn/AtsMAPE/AtsMapE_Pixits.ttcn3 +54 −0 Original line number Diff line number Diff line Loading @@ -5,7 +5,61 @@ */ module AtsMapE_Pixits { // LibCommon import from LibCommon_DataStrings all; import from LibCommon_BasicTypesAndValues all; // LibIpv6 import from LibIpv6_CommonRfcs_TypesAndValues all; // AtsCommon import from AtsCommon_TypesAndValues all; /** * @desc Defines the NAT64 prefix. */ modulepar Oct8 PX_MAPE_PREFIX := '0064FF9B00000000'O; modulepar Ipv4IutInfo PX_IPV4_DESTINATION_INFORMATION := { iutAddress := '41d0e4df'O, iutPort := 80, payload := { rawPayload := 'CAFEDECA'O // TODO To be enhanced } } modulepar Ipv4IutInfo PX_IPV4_UNKNOWN_DESTINATION_INFORMATION := { iutAddress := '41d0e4df'O, iutPort := 80, payload := { rawPayload := 'CAFEDECA'O // TODO To be enhanced } } modulepar Ipv4IutInfo PX_IPV4_PRIVATE_DESTINATION_INFORMATION := { iutAddress := '41d0e4df'O, iutPort := 80, payload := { rawPayload := 'CAFEDECA'O // TODO To be enhanced } } /** * @desc Address + Port mapping for hosts */ modulepar NatMappingTable_1_to_1 PX_MAPE_MAPPING_TABLE_A_PLUS_P := { etsPort := 6001, mapInfos := { { ip6Address := '20010db8950000000000000000000001'O, ip4Address := '91fea0ed'O }, { ip6Address := '20010db8950000000000000000000002'O, ip4Address := '91fea0ee'O } } } } // End of module AtsMapE_Pixits No newline at end of file ttcn/AtsMAPE/AtsMapE_TestCases.ttcn3 +646 −17 File changed.Preview size limit exceeded, changes collapsed. Show changes Loading
ttcn/AtsMAPE/AtsMapE_Functions.ttcn3 +208 −0 Original line number Diff line number Diff line Loading @@ -6,5 +6,213 @@ module AtsMapE_Functions { // LibCommon import from LibCommon_BasicTypesAndValues all; import from LibCommon_DataStrings all; import from LibCommon_Sync all; import from LibCommon_VerdictControl all; import from LibCommon_Time all; // LibIpv6 import from LibIpv6_Interface_Templates all; import from LibIpv6_Interface_TypesAndValues all; import from LibIpv6_CommonRfcs_TypesAndValues all; import from AtsCommon_Tcp_Rfc793_TypesAndValues all; import from LibIpv6_CommonRfcsDhcp_TypesAndValues all; import from LibIpv6_CommonRfcsDhcp_Functions all; // AtsCommon import from AtsCommon_TypesAndValues all; import from AtsCommon_DNS_CommonRfcs_TypesAndValues all; import from AtsCommon_Interfaces all; import from AtsCommon_Functions all; // Ats6RD import from AtsMapE_TypesAndValues all; import from AtsMapE_Interfaces all; import from AtsMapE_Pixits all; group initialiseFunctions { /** * @desc Setup communication port for PLAT role * @verdict Unchanged */ function f_cf01Up_br() runs on MapEComponent { // Connect synchronisation ports f_connect4SelfOrClientSync(); // Default activation activate(a_default_MTC()); } // End of function f_cf01Up_br /** * @desc Setup communication port for CLAT role * @verdict Unchanged */ function f_cf01Up_cpe() runs on MapEComponent { // Connect synchronisation ports f_connect4SelfOrClientSync(); // Default activation activate(a_default_MTC()); } // End of function f_cf01Up_cpe } // End of group initialiseFunctions group preambleFunctions { /** * @desc Preamble processing for BRComponent * @verdict Unchanged * @see BRComponent */ function f_preamble_br(Ipv4Address p_ip4Address) runs on BRComponent system TestAdapter { // Connect synchronisation ports f_connect4SelfOrClientSync(); // Map ports map(self:ipv4Port, system:ipv4Port) param (p_ip4Address); map(self:ipPort, system:ipPort); map(self:utPort, system:utPort); activate(a_default_br()); } // End of function f_preamble_br /** * @desc Preamble processing for HostComponent * @verdict Unchanged * @see HostComponent */ function f_preamble_host() runs on HostComponent system TestAdapter { // Connect synchronisation ports f_connect4SelfOrClientSync(); // Map ports map(self:ipPort, system:ipPort); map(self:utPort, system:utPort); activate(a_default_host()); } // End of function f_preamble_host } // End of group preambleFunctions group postambleFunctions { /** * @desc Postamble processing for BRComponent * @verdict Unchanged * @see BRComponent */ function f_postamble_br() runs on BRComponent { // Nothing to do } // End of function f_postamble_br /** * @desc Postamble processing for HostComponent * @verdict Unchanged * @see HostComponent */ function f_postamble_host() runs on HostComponent { // Nothing to do } // End of function f_postamble_host } // End of group postambleFunctions group globalSteps { /** * @desc * TODO enable functionality! */ altstep a_default_MTC() runs on MapEComponent { [] any timer.timeout { log("*** " & __SCOPE__ & "ERROR: Timeout while awaiting the reception of a message ***"); f_selfOrClientSyncAndVerdict("error", e_timeout); } [] a_shutdown() { log("*** " & __SCOPE__ & "INFO: TEST COMPONENT NOW STOPPING ITSELF! ***"); stop; } } // End of altstep a_default_MTC /** * @desc * TODO enable functionality! */ altstep a_default_br() runs on BRComponent { [] 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_wait.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); } [] tc_noac.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_br(); log("*** a_default: INFO: TEST COMPONENT NOW STOPPING ITSELF! ***"); stop; } } // End of altstep a_default_br /** * @desc */ altstep a_default_host() runs on HostComponent { [] ipPort.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_wait.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 } // End of group globalSteps } // End of module AtsMapE_Functions No newline at end of file
ttcn/AtsMAPE/AtsMapE_Interfaces.ttcn3 +41 −9 Original line number Diff line number Diff line Loading @@ -6,16 +6,12 @@ module AtsMapE_Interfaces { // LibCommon import from LibCommon_Sync all; import from LibCommon_Time all; // LibIPv6 import from LibIpv6_CommonRfcs_TypesAndValues { type Ipv6Address }; import from LibIpv6_Interface_TypesAndValues { type LibIpv6Node, Ipv4Port, Ipv6Port }; import from LibIpv6_Interface_TypesAndValues all; import from LibIpv6_CommonRfcs_TypesAndValues all; // AtsCommon import from AtsCommon_Interfaces all; Loading @@ -27,15 +23,51 @@ module AtsMapE_Interfaces { group mtcDesc { type component MapEComponent extends UtComponent, LibIpv6Node { /** xLAT component reference */ var BRComponents vc_brComponents := null; /** Host component reference */ var HostComponents vc_hostComponents := null; /** HTTP component reference */ var HostHTTPComponents vc_hostHttpComponents := null; } // End of component MapEComponent type record of BRComponent BRComponents; type record of HostComponent HostComponents; type record of HostHTTPComponent HostHTTPComponents; } // End of group mtcDesc group componentDesc { group componentPorts { /** * @desc */ type component HostComponent extends UtComponent, LibIpv6Node, SelfSyncComp { } // End of component HostComponent /** * @desc */ type component BRComponent extends UtComponent, LibIpv6Node, SelfSyncComp { /** Timer used for unexpected received message */ timer tc_noac:= PX_TNOAC; } // End of component BRComponent type component HostHTTPComponent extends UtComponent, SelfSyncComp { /** HTTP message port */ port HttpPort httpPort; /** Timer used for expected received message */ timer tc_ac:= PX_TAC; /** Timer used for unexpected received message */ timer tc_noac:= PX_TNOAC; /** Timer used for receive message */ timer tc_wait:= PX_TWAIT; } // End of component HostHTTPComponent } // End of group componentPorts } // End of group componentDesc Loading
ttcn/AtsMAPE/AtsMapE_Pics.ttcn3 +9 −1 Original line number Diff line number Diff line Loading @@ -5,6 +5,14 @@ */ module AtsMapE_Pics { // LibCommon /** * @desc The SUT is the CLAT equipment */ modulepar boolean PICS_ROLE_IS_BR := false; /** * @desc The SUT is the PLAT equipment */ modulepar boolean PICS_ROLE_IS_PLAT := false; } // End of module AtsMapE_Pics No newline at end of file
ttcn/AtsMAPE/AtsMapE_Pixits.ttcn3 +54 −0 Original line number Diff line number Diff line Loading @@ -5,7 +5,61 @@ */ module AtsMapE_Pixits { // LibCommon import from LibCommon_DataStrings all; import from LibCommon_BasicTypesAndValues all; // LibIpv6 import from LibIpv6_CommonRfcs_TypesAndValues all; // AtsCommon import from AtsCommon_TypesAndValues all; /** * @desc Defines the NAT64 prefix. */ modulepar Oct8 PX_MAPE_PREFIX := '0064FF9B00000000'O; modulepar Ipv4IutInfo PX_IPV4_DESTINATION_INFORMATION := { iutAddress := '41d0e4df'O, iutPort := 80, payload := { rawPayload := 'CAFEDECA'O // TODO To be enhanced } } modulepar Ipv4IutInfo PX_IPV4_UNKNOWN_DESTINATION_INFORMATION := { iutAddress := '41d0e4df'O, iutPort := 80, payload := { rawPayload := 'CAFEDECA'O // TODO To be enhanced } } modulepar Ipv4IutInfo PX_IPV4_PRIVATE_DESTINATION_INFORMATION := { iutAddress := '41d0e4df'O, iutPort := 80, payload := { rawPayload := 'CAFEDECA'O // TODO To be enhanced } } /** * @desc Address + Port mapping for hosts */ modulepar NatMappingTable_1_to_1 PX_MAPE_MAPPING_TABLE_A_PLUS_P := { etsPort := 6001, mapInfos := { { ip6Address := '20010db8950000000000000000000001'O, ip4Address := '91fea0ed'O }, { ip6Address := '20010db8950000000000000000000002'O, ip4Address := '91fea0ee'O } } } } // End of module AtsMapE_Pixits No newline at end of file
ttcn/AtsMAPE/AtsMapE_TestCases.ttcn3 +646 −17 File changed.Preview size limit exceeded, changes collapsed. Show changes