Loading ttcn/AtsDSlite/AtsDSLite_Interfaces.ttcn3 +3 −5 Original line number Diff line number Diff line Loading @@ -166,11 +166,10 @@ module AtsDSLite_Interfaces { * @member tc_wait */ type component DHCPv6Component extends SelfSyncComp { /** DHCPv6 port */ /** DHCPv6 message port */ port DHCPv6Port dhcpv6Port; /** Inter-component communication port */ port InterCompDataPort dataPort; /** Timer used for expected received message */ timer tc_ac:= PX_TAC; /** Timer used for unexpected received message */ Loading @@ -189,9 +188,8 @@ module AtsDSLite_Interfaces { type component DNSComponent extends SelfSyncComp { /** IPv4 message port */ port DNSPort dnsPort; /** Inter-component communication port */ port InterCompDataPort dataPort; /** Timer used for expected received message */ timer tc_ac:= PX_TAC; /** Timer used for unexpected received message */ Loading ttcn/AtsDSlite/AtsDSLite_Templates.ttcn3 +105 −6 Original line number Diff line number Diff line Loading @@ -7,7 +7,8 @@ module AtsDSLite_Templates { import from LibIpv6_CommonRfcsDhcp_TypesAndValues { type DHCPv6Msg, MsgType, DHCPv6Options, DHCPv6Option, DHCPv6OptionRaw DHCPv6Options, DHCPv6Option, DHCPv6OptionRaw, DomainName }; import from LibIpv6_Rfc3315Dhcp_TypesAndValues { type Loading @@ -30,7 +31,9 @@ module AtsDSLite_Templates { // DS-Lite import from AtsCommon_DNS_CommonRfcs_TypesAndValues { type DnsMsg, DnsHeader, DnsData type DnsMsg, DnsHeader, DnsData, Flags, Question, OpCode }; group dhcpv6MessageTemplates { Loading Loading @@ -201,6 +204,10 @@ module AtsDSLite_Templates { * } // End of template mw_dhcpv6_aftr_dsl_options template (present) DomainSearchListOption mw_domainSearchListOption_dummy := { searchList := ? } // End of template mw_domainSearchListOption_dummy } // End of group dhcpv6OptionsRecvTemplates } // End of group dhcpv6Templates Loading @@ -224,7 +231,7 @@ module AtsDSLite_Templates { template (present) DnsHeader mw_dnsHeader_dummy := { transactionId := ?, flags := ?, flags := mw_dnsFlags_recursive, questionsCount := ?, answerRRs := ?, nameServerRRs := ?, Loading @@ -238,6 +245,98 @@ module AtsDSLite_Templates { additionalRRs := * } // // End of template mw_dnsData_dummy template (present) Flags mw_dnsFlags_recursive := { qr := ?, opCode := ?, authoritativeAnswer := ?, truncation := ?, recursionDesired := ?, recursionAvailable := '1'B, z := ?, rCode := ? } // End of template mw_dnsFlags_recursive /** * @desc Receive DNS Query message * @reference */ template (present) DnsMsg mdw_dns_query( in template (present) DnsData p_data ) modifies mw_dns_dummy := { header := mdw_dnsHeader_query, data := p_data } // End of template mw_dns_query template (present) DnsHeader mdw_dnsHeader_query modifies mw_dnsHeader_dummy := { transactionId := ?, flags := mdw_dnsFlags_query_recursive, questionsCount := ?, answerRRs := ?, nameServerRRs := ?, additionalRRs := ? } // End of template mw_dnsHeader_query template (present) Flags mdw_dnsFlags_query_recursive modifies mw_dnsFlags_recursive := { opCode := e_QUERY } // End of template mdw_dnsFlags_query_recursive template (present) DnsData mdw_dnsData_query( in template (present) Question p_question ) modifies mw_dnsData_dummy := { questions := superset(p_question), answerRRs := *, authorityRRs := *, additionalRRs := * } // End of template mw_dnsData_query template (present) Question mw_question_aftr( in template (present) DomainName p_aftrName ) := { name := p_aftrName, rrType := e_AAAA, class := e_IN } // End of template mw_question_aftr /** * @desc Receive DNS Query message * @reference */ template (present) DnsMsg mdw_dns_response( in template (present) DnsData p_data ) modifies mw_dns_dummy := { header := mdw_dnsHeader_response, data := p_data } // End of template mdw_dns_response template (present) DnsHeader mdw_dnsHeader_response modifies mw_dnsHeader_dummy := { transactionId := ?, flags := mdw_dnsFlags_response_recursive, questionsCount := ?, answerRRs := ?, nameServerRRs := ?, additionalRRs := ? } // End of template mw_dnsHeader_response template (present) Flags mdw_dnsFlags_response_recursive modifies mw_dnsFlags_recursive := { qr := '1'B, opCode := e_QUERY, recursionAvailable := '1'B, rCode := e_noError } // End of template mdw_dnsFlags_response_recursive template (present) DnsData mdw_dnsData_response( in template (present) Question p_question ) modifies mw_dnsData_dummy := { questions := superset(p_question), answerRRs := ?, authorityRRs := ?, additionalRRs := * } // End of template mw_dnsData_query } // End of group dnsMessagesDummyRecvTemplates } // End of group dnsMessageTemplates Loading ttcn/AtsDSlite/AtsDSLite_TestCases.ttcn3 +42 −13 Original line number Diff line number Diff line Loading @@ -218,7 +218,11 @@ module AtsDSLite_TestCases { tc_ac.stop; // Nothing to do f_selfOrClientSyncAndVerdict(c_prDone, e_success); log("*** " & __SCOPE__ & ": INFO: Preamble done. ***"); } [] dhcpv6Port.receive(DHCPv6Msg:?) { // Skip unprocessed DHCPv6 message // Do not re-start timer log("*** " & __SCOPE__ & ": INFO: Skip unprocessed DHCPv6 message. ***"); repeat; } [] tc_ac.timeout { f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); Loading @@ -232,7 +236,8 @@ module AtsDSLite_TestCases { alt { [] dhcpv6Port.receive( // Await Reply DHCPv6 message to store IPv6 addresses mdw_dhcpv6_reply_ipv6Address( mw_dhcpv6_aftr_dsl_options(? // TODO mw_dhcpv6_aftr_dsl_options( mw_domainSearchListOption_dummy // containing the DomainSearchList field ))) -> value v_dhcpMsg { tc_ac.stop; // Prepare data to be sent to the DNS component Loading @@ -245,6 +250,11 @@ module AtsDSLite_TestCases { // Send data to the DNS component dataPort.send(v_data); } [] dhcpv6Port.receive(DHCPv6Msg:?) { // Skip unprocessed DHCPv6 message // Do not re-start timer log("*** " & __SCOPE__ & ": INFO: Skip unprocessed DHCPv6 message. ***"); repeat; } [] tc_ac.timeout { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); log("*** " & __SCOPE__ & ": INCONC: Message was not received in time. ***"); Loading Loading @@ -279,12 +289,15 @@ module AtsDSLite_TestCases { log("*** " & __SCOPE__ & ": INFO: Preamble done. ***"); // Test Body // Clause 'then': the IUT sends a DNS query // Clause 'then': the IUT sends tc_ac.start; alt { [v_dataReceived == true] dnsPort.receive( mw_dns_dummy // TODO To be refined ) { mdw_dns_query( // Await a DNS query mdw_dnsData_query( mw_question_aftr( // containing the Resolver request name v_data.aftrName // indicating the AFTR-name received in the DHCPv6 Reply )))) { tc_ac.stop; // TODO DNS query template using v_data f_selfOrClientSyncAndVerdict(c_tbDone, e_success); Loading @@ -294,6 +307,11 @@ module AtsDSLite_TestCases { v_dataReceived := true; log("*** " & __SCOPE__ & ": INFO: Receive DHCPv6 Reply data. ***"); } [] dnsPort.receive(DnsMsg:?) { // Do not re-start timer log("*** " & __SCOPE__ & ": INFO: Skip unprocessed DNS message. ***"); repeat; } [] tc_ac.timeout { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); log("*** " & __SCOPE__ & ": INCONC: Message was not received in due time. ***"); Loading Loading @@ -328,6 +346,7 @@ module AtsDSLite_TestCases { * } * } * </pre> * @remark To check the default route configuration for DS-Lite a HTML IPv4 packet is sent from Test System to the IUT * * @version 0.0.1 * @reference RFC6334 [1] clause 5 Loading Loading @@ -378,13 +397,20 @@ module AtsDSLite_TestCases { tc_ac.start; alt { [] dnsPort.receive( mw_dns_dummy // TODO To be refined ) { mdw_dns_query( // Await a DNS query mdw_dnsData_query( mw_question_aftr( ? )))) { tc_ac.stop; // TODO f_selfOrClientSyncAndVerdict(c_prDone, e_success); log("*** " & __SCOPE__ & ": INFO: Preamble done. ***"); } [] dnsPort.receive(DnsMsg:?) { // Do not re-start timer log("*** " & __SCOPE__ & ": INFO: Skip unprocessed DNS message. ***"); repeat; } [] tc_ac.timeout { f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); log("*** " & __SCOPE__ & ": INCONC: Message was not received in due time. ***"); Loading @@ -396,10 +422,13 @@ module AtsDSLite_TestCases { tc_ac.start; alt { [] dnsPort.receive( mw_dns_dummy // TODO To be refined ) { mdw_dns_response( mdw_dnsData_response( mw_question_aftr( ? )))) { tc_ac.stop; // TODO // TODO Check the default route configuration for DS-Lite a HTML IPv4 packet is sent from Test System to the IUT f_selfOrClientSyncAndVerdict(c_tbDone, e_success); log("*** " & __SCOPE__ & ": PASS: DNS query was sent by the IUT. ***"); } Loading Loading
ttcn/AtsDSlite/AtsDSLite_Interfaces.ttcn3 +3 −5 Original line number Diff line number Diff line Loading @@ -166,11 +166,10 @@ module AtsDSLite_Interfaces { * @member tc_wait */ type component DHCPv6Component extends SelfSyncComp { /** DHCPv6 port */ /** DHCPv6 message port */ port DHCPv6Port dhcpv6Port; /** Inter-component communication port */ port InterCompDataPort dataPort; /** Timer used for expected received message */ timer tc_ac:= PX_TAC; /** Timer used for unexpected received message */ Loading @@ -189,9 +188,8 @@ module AtsDSLite_Interfaces { type component DNSComponent extends SelfSyncComp { /** IPv4 message port */ port DNSPort dnsPort; /** Inter-component communication port */ port InterCompDataPort dataPort; /** Timer used for expected received message */ timer tc_ac:= PX_TAC; /** Timer used for unexpected received message */ Loading
ttcn/AtsDSlite/AtsDSLite_Templates.ttcn3 +105 −6 Original line number Diff line number Diff line Loading @@ -7,7 +7,8 @@ module AtsDSLite_Templates { import from LibIpv6_CommonRfcsDhcp_TypesAndValues { type DHCPv6Msg, MsgType, DHCPv6Options, DHCPv6Option, DHCPv6OptionRaw DHCPv6Options, DHCPv6Option, DHCPv6OptionRaw, DomainName }; import from LibIpv6_Rfc3315Dhcp_TypesAndValues { type Loading @@ -30,7 +31,9 @@ module AtsDSLite_Templates { // DS-Lite import from AtsCommon_DNS_CommonRfcs_TypesAndValues { type DnsMsg, DnsHeader, DnsData type DnsMsg, DnsHeader, DnsData, Flags, Question, OpCode }; group dhcpv6MessageTemplates { Loading Loading @@ -201,6 +204,10 @@ module AtsDSLite_Templates { * } // End of template mw_dhcpv6_aftr_dsl_options template (present) DomainSearchListOption mw_domainSearchListOption_dummy := { searchList := ? } // End of template mw_domainSearchListOption_dummy } // End of group dhcpv6OptionsRecvTemplates } // End of group dhcpv6Templates Loading @@ -224,7 +231,7 @@ module AtsDSLite_Templates { template (present) DnsHeader mw_dnsHeader_dummy := { transactionId := ?, flags := ?, flags := mw_dnsFlags_recursive, questionsCount := ?, answerRRs := ?, nameServerRRs := ?, Loading @@ -238,6 +245,98 @@ module AtsDSLite_Templates { additionalRRs := * } // // End of template mw_dnsData_dummy template (present) Flags mw_dnsFlags_recursive := { qr := ?, opCode := ?, authoritativeAnswer := ?, truncation := ?, recursionDesired := ?, recursionAvailable := '1'B, z := ?, rCode := ? } // End of template mw_dnsFlags_recursive /** * @desc Receive DNS Query message * @reference */ template (present) DnsMsg mdw_dns_query( in template (present) DnsData p_data ) modifies mw_dns_dummy := { header := mdw_dnsHeader_query, data := p_data } // End of template mw_dns_query template (present) DnsHeader mdw_dnsHeader_query modifies mw_dnsHeader_dummy := { transactionId := ?, flags := mdw_dnsFlags_query_recursive, questionsCount := ?, answerRRs := ?, nameServerRRs := ?, additionalRRs := ? } // End of template mw_dnsHeader_query template (present) Flags mdw_dnsFlags_query_recursive modifies mw_dnsFlags_recursive := { opCode := e_QUERY } // End of template mdw_dnsFlags_query_recursive template (present) DnsData mdw_dnsData_query( in template (present) Question p_question ) modifies mw_dnsData_dummy := { questions := superset(p_question), answerRRs := *, authorityRRs := *, additionalRRs := * } // End of template mw_dnsData_query template (present) Question mw_question_aftr( in template (present) DomainName p_aftrName ) := { name := p_aftrName, rrType := e_AAAA, class := e_IN } // End of template mw_question_aftr /** * @desc Receive DNS Query message * @reference */ template (present) DnsMsg mdw_dns_response( in template (present) DnsData p_data ) modifies mw_dns_dummy := { header := mdw_dnsHeader_response, data := p_data } // End of template mdw_dns_response template (present) DnsHeader mdw_dnsHeader_response modifies mw_dnsHeader_dummy := { transactionId := ?, flags := mdw_dnsFlags_response_recursive, questionsCount := ?, answerRRs := ?, nameServerRRs := ?, additionalRRs := ? } // End of template mw_dnsHeader_response template (present) Flags mdw_dnsFlags_response_recursive modifies mw_dnsFlags_recursive := { qr := '1'B, opCode := e_QUERY, recursionAvailable := '1'B, rCode := e_noError } // End of template mdw_dnsFlags_response_recursive template (present) DnsData mdw_dnsData_response( in template (present) Question p_question ) modifies mw_dnsData_dummy := { questions := superset(p_question), answerRRs := ?, authorityRRs := ?, additionalRRs := * } // End of template mw_dnsData_query } // End of group dnsMessagesDummyRecvTemplates } // End of group dnsMessageTemplates Loading
ttcn/AtsDSlite/AtsDSLite_TestCases.ttcn3 +42 −13 Original line number Diff line number Diff line Loading @@ -218,7 +218,11 @@ module AtsDSLite_TestCases { tc_ac.stop; // Nothing to do f_selfOrClientSyncAndVerdict(c_prDone, e_success); log("*** " & __SCOPE__ & ": INFO: Preamble done. ***"); } [] dhcpv6Port.receive(DHCPv6Msg:?) { // Skip unprocessed DHCPv6 message // Do not re-start timer log("*** " & __SCOPE__ & ": INFO: Skip unprocessed DHCPv6 message. ***"); repeat; } [] tc_ac.timeout { f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); Loading @@ -232,7 +236,8 @@ module AtsDSLite_TestCases { alt { [] dhcpv6Port.receive( // Await Reply DHCPv6 message to store IPv6 addresses mdw_dhcpv6_reply_ipv6Address( mw_dhcpv6_aftr_dsl_options(? // TODO mw_dhcpv6_aftr_dsl_options( mw_domainSearchListOption_dummy // containing the DomainSearchList field ))) -> value v_dhcpMsg { tc_ac.stop; // Prepare data to be sent to the DNS component Loading @@ -245,6 +250,11 @@ module AtsDSLite_TestCases { // Send data to the DNS component dataPort.send(v_data); } [] dhcpv6Port.receive(DHCPv6Msg:?) { // Skip unprocessed DHCPv6 message // Do not re-start timer log("*** " & __SCOPE__ & ": INFO: Skip unprocessed DHCPv6 message. ***"); repeat; } [] tc_ac.timeout { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); log("*** " & __SCOPE__ & ": INCONC: Message was not received in time. ***"); Loading Loading @@ -279,12 +289,15 @@ module AtsDSLite_TestCases { log("*** " & __SCOPE__ & ": INFO: Preamble done. ***"); // Test Body // Clause 'then': the IUT sends a DNS query // Clause 'then': the IUT sends tc_ac.start; alt { [v_dataReceived == true] dnsPort.receive( mw_dns_dummy // TODO To be refined ) { mdw_dns_query( // Await a DNS query mdw_dnsData_query( mw_question_aftr( // containing the Resolver request name v_data.aftrName // indicating the AFTR-name received in the DHCPv6 Reply )))) { tc_ac.stop; // TODO DNS query template using v_data f_selfOrClientSyncAndVerdict(c_tbDone, e_success); Loading @@ -294,6 +307,11 @@ module AtsDSLite_TestCases { v_dataReceived := true; log("*** " & __SCOPE__ & ": INFO: Receive DHCPv6 Reply data. ***"); } [] dnsPort.receive(DnsMsg:?) { // Do not re-start timer log("*** " & __SCOPE__ & ": INFO: Skip unprocessed DNS message. ***"); repeat; } [] tc_ac.timeout { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); log("*** " & __SCOPE__ & ": INCONC: Message was not received in due time. ***"); Loading Loading @@ -328,6 +346,7 @@ module AtsDSLite_TestCases { * } * } * </pre> * @remark To check the default route configuration for DS-Lite a HTML IPv4 packet is sent from Test System to the IUT * * @version 0.0.1 * @reference RFC6334 [1] clause 5 Loading Loading @@ -378,13 +397,20 @@ module AtsDSLite_TestCases { tc_ac.start; alt { [] dnsPort.receive( mw_dns_dummy // TODO To be refined ) { mdw_dns_query( // Await a DNS query mdw_dnsData_query( mw_question_aftr( ? )))) { tc_ac.stop; // TODO f_selfOrClientSyncAndVerdict(c_prDone, e_success); log("*** " & __SCOPE__ & ": INFO: Preamble done. ***"); } [] dnsPort.receive(DnsMsg:?) { // Do not re-start timer log("*** " & __SCOPE__ & ": INFO: Skip unprocessed DNS message. ***"); repeat; } [] tc_ac.timeout { f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); log("*** " & __SCOPE__ & ": INCONC: Message was not received in due time. ***"); Loading @@ -396,10 +422,13 @@ module AtsDSLite_TestCases { tc_ac.start; alt { [] dnsPort.receive( mw_dns_dummy // TODO To be refined ) { mdw_dns_response( mdw_dnsData_response( mw_question_aftr( ? )))) { tc_ac.stop; // TODO // TODO Check the default route configuration for DS-Lite a HTML IPv4 packet is sent from Test System to the IUT f_selfOrClientSyncAndVerdict(c_tbDone, e_success); log("*** " & __SCOPE__ & ": PASS: DNS query was sent by the IUT. ***"); } Loading