Loading ttcn/AtsDSlite/AtsDSLite_Functions.ttcn3 +2 −2 Original line number Diff line number Diff line Loading @@ -105,7 +105,7 @@ module AtsDSLite_Functions { * @verdict Unchanged * @see DNSComponent */ function f_preamble_dns() runs on DHCPv6Component { function f_preamble_dns() runs on DNSComponent { // Connect synchronisation ports f_connect4SelfOrClientSync(); Loading @@ -129,7 +129,7 @@ module AtsDSLite_Functions { * @verdict Unchanged * @see DNSComponent */ function f_postamble_dns() runs on DHCPv6Component { function f_postamble_dns() runs on DNSComponent { // Nothing to do } // End of function f_postamble_dns Loading ttcn/AtsDSlite/AtsDSLite_Interfaces.ttcn3 +27 −3 Original line number Diff line number Diff line Loading @@ -6,6 +6,9 @@ module AtsDSLite_Interfaces { // LibCommon import from LibCommon_DataStrings { const c_16ZeroBytes }; import from LibCommon_Sync { type SelfSyncComp }; Loading @@ -14,6 +17,9 @@ module AtsDSLite_Interfaces { }; // LibIPv6 import from LibIpv6_CommonRfcs_TypesAndValues { type Ipv6Address }; import from LibIpv6_Interface_TypesAndValues { type LibIpv6Node, Loading Loading @@ -124,6 +130,13 @@ module AtsDSLite_Interfaces { timer tc_twait:= PX_TWAIT; } // End of component AFTRComponent /** * @desc * @member dhcpv6Port * @member tc_ac * @member tc_noac * @member tc_wait */ type component DHCPv6Component extends SelfSyncComp { /** DHCPv6 port */ port DHCPv6Port dhcpv6Port; Loading @@ -133,8 +146,19 @@ module AtsDSLite_Interfaces { timer tc_noac:= PX_TNOAC; /** Timer used for receive meceige */ timer tc_wait:= PX_TWAIT; /** The AFTR IPv6 address */ var Ipv6Address vc_aftrIPv6Address := c_16ZeroBytes; /** The DNS IPv6 address */ var Ipv6Address vc_dnsIPv6Address := c_16ZeroBytes; } // End of component DHCPv6Component /** * @desc * @member dnsPort * @member tc_ac * @member tc_noac * @member tc_twait */ type component DNSComponent extends SelfSyncComp { port DNSv4Port dnsPort; /** Timer used for expected received message */ Loading ttcn/AtsDSlite/AtsDSLite_Templates.ttcn3 +90 −17 Original line number Diff line number Diff line Loading @@ -7,7 +7,11 @@ module AtsDSLite_Templates { import from LibIpv6_CommonRfcsDhcp_TypesAndValues { type DHCPv6Msg, MsgType, DHCPv6Option DHCPv6Options, DHCPv6Option }; import from LibIpv6_Rfc3315Dhcp_TypesAndValues { type OptionRequestOption }; import from LibIpv6_Rfc6334Dhcp_TypesAndValues { type AFTRNameOption Loading @@ -20,13 +24,13 @@ module AtsDSLite_Templates { template mw_ipHdr_nextHdr }; group dhcpv6Templates { group dhcpv6MessageTemplates { group dhcpv6DummySendTemplates { } // End of group dhcpv6DummySendTemplates group dhcpv6DummyRecvTemplates { group dhcpv6MessagesDummyRecvTemplates { /** * @desc Genercic receive DHCP Client/Server message Loading @@ -49,39 +53,108 @@ module AtsDSLite_Templates { } // End of template mdw_dhcpv6_Sollicit_dummy /** * @desc Receive DHCP Client/Sollicit message to check AFTR-name option * @param p_aftrName * @desc Genercic receive DHCP Client/Reply message * @reference http://tools.ietf.org/html/rfc3315#section-6 */ template (present) DHCPv6Msg mdw_dhcpv6_Sollicit_aftrName( in template (present) AFTRNameOption p_aftrName ) modifies mw_dhcpv6_dummy := { // TODO aftrName := p_aftrName } // End of template mdw_dhcpv6_Sollicit_aftrName template (present) DHCPv6Msg mdw_dhcpv6_reply_dummy modifies mw_dhcpv6_dummy := { msgType := e_REPLY } // End of template mdw_dhcpv6_reply_dummy } // End of group dhcpv6MessagesDummyRecvTemplates group dhcpv6OptionsDummyRecvTemplates { /** * @desc Genercic receive DHCPv6 options * @reference http://tools.ietf.org/html/rfc3315#section-22 */ template (present) DHCPv6Options mw_dhcpv6_options_dummy := { { ia_address := ? }, { optionRequest := ? }, { aftrName := ? }, * } // End of template mw_dhcpv6_options_dummy /** * @desc Genercic receive DHCPv6 ORO option * @reference http://tools.ietf.org/html/rfc3315#section-22.7 */ template (present) OptionRequestOption mw_dhcpv6_optionRequestOption_dummy := { optionCode := e_OPTION_ORO, optionLen := ?, requestedOptionCodes := ? } // End of template mw_dhcpv6_optionRequestOption_dummy /** * @desc Genercic receive DHCP AFTR-name option * @reference https://tools.ietf.org/html/rfc6334#section-3 */ template (present) AFTRNameOption mw_dhcpv6_aftrName_dummy := { optionCode := e_OPTION_AFTR_NAME, optionLen := ?, tunnelEndpointName := ? } // End of template mw_dhcpv6_aftrName_dummy } // End of group dhcpv6OptionsDummyRecvTemplates group dhcpv6MessagesRecvTemplates { /** * @desc Genercic receive DHCP Client/Reply message * @desc Receive DHCP Client/Sollicit message to check DHCPv6 options values * @param p_options Expected DHCPv6 options * @reference http://tools.ietf.org/html/rfc3315#section-6 */ template (present) DHCPv6Msg mdw_dhcpv6_reply_dummy modifies mw_dhcpv6_dummy := { msgType := e_REPLY } // End of template mdw_dhcpv6_reply_dummy template (present) DHCPv6Msg mdw_dhcpv6_Sollicit_options( in template (present) DHCPv6Options p_options ) modifies mw_dhcpv6_dummy := { options := p_options } // End of template mdw_dhcpv6_Sollicit_options /** * @desc Receive DHCP Client/Reply message to retrieve IPv6 address provided by the DHCPv6 server * @reference http://tools.ietf.org/html/rfc3315#section-6 */ template (present) DHCPv6Msg mdw_dhcpv6_reply_ipv6Address modifies mw_dhcpv6_dummy := { // TODO template (present) DHCPv6Msg mdw_dhcpv6_reply_ipv6Address( in template (present) DHCPv6Options p_options ) modifies mw_dhcpv6_dummy := { options := p_options } // End of template mdw_dhcpv6_reply_dummy } // End of group dhcpv6DummyRecvTemplates } // End of group dhcpv6MessagesRecvTemplates group dhcpv6OptionsRecvTemplates { /** * @desc Receive template for DHCPv6 options 'ORO' * @param p_optionRequest * @reference */ template (present) DHCPv6Options mdw_dhcpv6_options_optionRequest( in template (present) OptionRequestOption p_optionRequest ) modifies mw_dhcpv6_options_dummy := { { optionRequest := p_optionRequest }, * } // End of template mdw_dhcpv6_options_optionRequest /** * @desc Genercic receive DHCPv6 AFTR-name option */ template (present) OptionRequestOption mw_dhcpv6_optionRequestOption_aftrName modifies mw_dhcpv6_optionRequestOption_dummy := { requestedOptionCodes := superset(e_OPTION_AFTR_NAME) } // End of template mw_dhcpv6_optionRequestOption_aftrName } // End of group dhcpv6OptionsRecvTemplates } // End of group dhcpv6Templates Loading ttcn/AtsDSlite/AtsDSLite_TestCases.ttcn3 +144 −21 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ module AtsDSLite_TestCases { // LibCommon import from LibCommon_Sync { function f_selfOrClientSyncAndVerdictPreamble, f_selfOrClientSyncAndVerdictTestBody, f_selfOrClientSyncAndVerdict, f_selfOrClientSyncAndVerdict, f_serverSyncNClientsAndStop; group standardSyncPointNames }; Loading @@ -11,8 +11,7 @@ module AtsDSLite_TestCases { // LibIPv6 import from LibIpv6_CommonRfcsDhcp_TypesAndValues { type DHCPv6Msg; group dhcpConstants DHCPv6Msg }; // DSLitefrom Loading Loading @@ -105,17 +104,134 @@ module AtsDSLite_TestCases { // Clause 'when': the IUT sends a DHCPv6 Request to DHCPv6 Server tc_ac.start; alt { [] dhcpv6Port.receive( // Await Sollicit DHCPv6 Request to DHCPv6 Server mdw_dhcpv6_Sollicit_aftrName( // containing the Option field mw_dhcpv6_aftrName_dummy // indicating the AFTR-name DHCPv6 Option (value 64) )) { [] dhcpv6Port.receive( mdw_dhcpv6_Sollicit_options( // Await Sollicit DHCPv6 Request to DHCPv6 Server mdw_dhcpv6_options_optionRequest( // containing the Option field mw_dhcpv6_optionRequestOption_aftrName // indicating the AFTR-name DHCPv6 Option (value 64) ))) { tc_ac.stop; // Nothing to do f_selfOrClientSyncAndVerdict(c_tbDone, e_success); log("*** " & __SCOPE__ & ": PASS: Sollicit DHCPv6 Request with AFT-name option set was sent by the IUT. ***"); } [] dhcpv6Port.receive( // Await Reply message mdw_dhcpv6_reply_ipv6Address ) -> value v_dhcpMsg { // TODO Store the IPv6 address for future uses [] tc_ac.timeout { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); log("*** " & __SCOPE__ & ": INCONC: Message was not received in due time. ***"); } } // End of 'altstep' statement // Postamble f_postamble_dhcpv6(); f_selfOrClientSyncAndVerdict(c_poDone, e_success); log("*** " & __SCOPE__ & ": INFO: Postamble done. ***"); } // End of function f_TC_DSLITE_B4_GWA_BV_001_dhcpv6 } // End of group f_TC_DSLITE_B4_GWA_BV_001 /** * @desc Check that IUT sends a DNS Query to the DNS Server * @verdict pass on success, inconc on timeout, fail otherwise * <pre> * PICS Selection: none * Initial conditions: * with { * the IUT having sent a DHCPv6 Request to the DHCPv6 Server * } * Expected behaviour: * ensure that { * when { * the IUT receives a DHCPv6 Reply from the DHCPv6 Server * } * then { * the IUT sends a DNS query * containing the Resolver request name * indicating the AFTR-name received in the DHCPv6 Reply * } * } * </pre> * * @version 0.0.1 * @reference RFC6334 [1] clause 5 * @see ETSI TS xxx xxx-x V0.0.1.5a-draft (2014-01) TP/DSLITE/B4/GWA/BV/002 */ testcase TC_DSLITE_B4_GWA_BV_002() runs on DSLiteComponent system TestAdapter { // Local variables var boolean v_exitLoop := false; var DHCPv6Msg v_dHCPv6Msg; vc_dhcpv6Component := DHCPv6Component.create("DHCPv6"); vc_dnsComponent := DNSComponent.create("DNS"); // Test control // Test component configuration f_cf01Up_B4(); // Test adapter configuration // Start all components vc_dhcpv6Component.start(f_TC_DSLITE_B4_GWA_BV_002_dhcpv6()); vc_dnsComponent.start(f_TC_DSLITE_B4_GWA_BV_002_dns()); f_serverSyncNClientsAndStop(1, { c_prDone, c_tbDone, c_poDone }); // Test Body // Clause 'when': action("the IUT goes online"); // Clause 'then': Nothing to do, refer to a_default // Postamble f_cf01Down_B4(); } // End of testcase TC_DSLITE_B4_GWA_BV_002 group f_TC_DSLITE_B4_GWA_BV_002 { /** * @desc Implement DHCPv6 client/server protocol * @verdict 'pass' on success, 'inconc' on 'timeout', fail otherwise */ function f_TC_DSLITE_B4_GWA_BV_002_dhcpv6() runs on DHCPv6Component { // Local variables var DHCPv6Msg v_dhcpMsg; // Preamble // Clause 'Initial conditions': the IUT having sent a DHCPv6 Request to the DHCPv6 Server f_preamble_dhcpv6(); tc_ac.start; alt { [] dhcpv6Port.receive( mdw_dhcpv6_Sollicit_options( // Await Sollicit DHCPv6 Request to DHCPv6 Server mdw_dhcpv6_options_optionRequest( // containing the Option field mw_dhcpv6_optionRequestOption_aftrName // indicating the AFTR-name DHCPv6 Option (value 64) ))) { tc_ac.stop; // Nothing to do f_selfOrClientSyncAndVerdict(c_prDone, e_success); log("*** " & __SCOPE__ & ": INFO: Preamblue done. ***"); } [] tc_ac.timeout { f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); log("*** " & __SCOPE__ & ": INCONC: Message was not received in due time. ***"); } } // End of 'altstep' statement // Test Body // Clause 'when': the IUT receives a DHCPv6 Reply from the DHCPv6 Server tc_ac.start; alt { [] dhcpv6Port.receive( // Await Reply DHCPv6 message to store IPv6 addresses mdw_dhcpv6_reply_ipv6Address( mw_dhcpv6_options_dummy )) -> value v_dhcpMsg { tc_ac.stop; // Store the IPv6 addresses for future uses vc_aftrIPv6Address := v_dhcpMsg.options[0].ia_address.ipv6Address; // FIXME To be checke // TODO vc_dnsIPv6Address := } [] tc_ac.timeout { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); Loading @@ -128,11 +244,16 @@ module AtsDSLite_TestCases { f_selfOrClientSyncAndVerdict(c_poDone, e_success); log("*** " & __SCOPE__ & ": INFO: Postamble done. ***"); } // End of function f_TC_DSLITE_B4_GWA_BV_001_dhcpv6 } // End of function f_TC_DSLITE_B4_GWA_BV_002_dhcpv6 /* TODO function f_TC_DSLITE_B4_GWA_BV_001_dns() runs on DNSComponent { /** * @desc Implement DNS protocol * @verdict 'pass' on success, 'inconc' on 'timeout', fail otherwise */ function f_TC_DSLITE_B4_GWA_BV_002_dns() runs on DNSComponent { // Local variables // TODO var DNSMsg v_dnsMsg; // Preamble // Clause 'Initial conditions' Loading @@ -141,12 +262,14 @@ module AtsDSLite_TestCases { log("*** " & __SCOPE__ & ": INFO: Preamblue done. ***"); // Test Body // Clause 'when': the IUT receives a UL-Request // Clause 'then': the IUT sends a UL-Answer // Clause 'when': the IUT sends a DNS query tc_ac.start; alt { [] dnsPort.receive { // TODO To ne continued [] dnsPort.receive { // TODO tc_ac.stop; // TODO f_selfOrClientSyncAndVerdict(c_tbDone, e_success); log("*** " & __SCOPE__ & ": PASS: DNS query was sent by the IUT. ***"); } [] tc_ac.timeout { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); Loading @@ -159,9 +282,9 @@ module AtsDSLite_TestCases { f_selfOrClientSyncAndVerdict(c_poDone, e_success); log("*** " & __SCOPE__ & ": INFO: Postamble done. ***"); } // End of function f_TC_DSLITE_B4_GWA_BV_001_dns */ } // End of group f_TC_DSLITE_B4_GWA_BV_001 } // End of function f_TC_DSLITE_B4_GWA_BV_002_dns } // End of group f_TC_DSLITE_B4_GWA_BV_002 } // End of group validBehaviour Loading Loading
ttcn/AtsDSlite/AtsDSLite_Functions.ttcn3 +2 −2 Original line number Diff line number Diff line Loading @@ -105,7 +105,7 @@ module AtsDSLite_Functions { * @verdict Unchanged * @see DNSComponent */ function f_preamble_dns() runs on DHCPv6Component { function f_preamble_dns() runs on DNSComponent { // Connect synchronisation ports f_connect4SelfOrClientSync(); Loading @@ -129,7 +129,7 @@ module AtsDSLite_Functions { * @verdict Unchanged * @see DNSComponent */ function f_postamble_dns() runs on DHCPv6Component { function f_postamble_dns() runs on DNSComponent { // Nothing to do } // End of function f_postamble_dns Loading
ttcn/AtsDSlite/AtsDSLite_Interfaces.ttcn3 +27 −3 Original line number Diff line number Diff line Loading @@ -6,6 +6,9 @@ module AtsDSLite_Interfaces { // LibCommon import from LibCommon_DataStrings { const c_16ZeroBytes }; import from LibCommon_Sync { type SelfSyncComp }; Loading @@ -14,6 +17,9 @@ module AtsDSLite_Interfaces { }; // LibIPv6 import from LibIpv6_CommonRfcs_TypesAndValues { type Ipv6Address }; import from LibIpv6_Interface_TypesAndValues { type LibIpv6Node, Loading Loading @@ -124,6 +130,13 @@ module AtsDSLite_Interfaces { timer tc_twait:= PX_TWAIT; } // End of component AFTRComponent /** * @desc * @member dhcpv6Port * @member tc_ac * @member tc_noac * @member tc_wait */ type component DHCPv6Component extends SelfSyncComp { /** DHCPv6 port */ port DHCPv6Port dhcpv6Port; Loading @@ -133,8 +146,19 @@ module AtsDSLite_Interfaces { timer tc_noac:= PX_TNOAC; /** Timer used for receive meceige */ timer tc_wait:= PX_TWAIT; /** The AFTR IPv6 address */ var Ipv6Address vc_aftrIPv6Address := c_16ZeroBytes; /** The DNS IPv6 address */ var Ipv6Address vc_dnsIPv6Address := c_16ZeroBytes; } // End of component DHCPv6Component /** * @desc * @member dnsPort * @member tc_ac * @member tc_noac * @member tc_twait */ type component DNSComponent extends SelfSyncComp { port DNSv4Port dnsPort; /** Timer used for expected received message */ Loading
ttcn/AtsDSlite/AtsDSLite_Templates.ttcn3 +90 −17 Original line number Diff line number Diff line Loading @@ -7,7 +7,11 @@ module AtsDSLite_Templates { import from LibIpv6_CommonRfcsDhcp_TypesAndValues { type DHCPv6Msg, MsgType, DHCPv6Option DHCPv6Options, DHCPv6Option }; import from LibIpv6_Rfc3315Dhcp_TypesAndValues { type OptionRequestOption }; import from LibIpv6_Rfc6334Dhcp_TypesAndValues { type AFTRNameOption Loading @@ -20,13 +24,13 @@ module AtsDSLite_Templates { template mw_ipHdr_nextHdr }; group dhcpv6Templates { group dhcpv6MessageTemplates { group dhcpv6DummySendTemplates { } // End of group dhcpv6DummySendTemplates group dhcpv6DummyRecvTemplates { group dhcpv6MessagesDummyRecvTemplates { /** * @desc Genercic receive DHCP Client/Server message Loading @@ -49,39 +53,108 @@ module AtsDSLite_Templates { } // End of template mdw_dhcpv6_Sollicit_dummy /** * @desc Receive DHCP Client/Sollicit message to check AFTR-name option * @param p_aftrName * @desc Genercic receive DHCP Client/Reply message * @reference http://tools.ietf.org/html/rfc3315#section-6 */ template (present) DHCPv6Msg mdw_dhcpv6_Sollicit_aftrName( in template (present) AFTRNameOption p_aftrName ) modifies mw_dhcpv6_dummy := { // TODO aftrName := p_aftrName } // End of template mdw_dhcpv6_Sollicit_aftrName template (present) DHCPv6Msg mdw_dhcpv6_reply_dummy modifies mw_dhcpv6_dummy := { msgType := e_REPLY } // End of template mdw_dhcpv6_reply_dummy } // End of group dhcpv6MessagesDummyRecvTemplates group dhcpv6OptionsDummyRecvTemplates { /** * @desc Genercic receive DHCPv6 options * @reference http://tools.ietf.org/html/rfc3315#section-22 */ template (present) DHCPv6Options mw_dhcpv6_options_dummy := { { ia_address := ? }, { optionRequest := ? }, { aftrName := ? }, * } // End of template mw_dhcpv6_options_dummy /** * @desc Genercic receive DHCPv6 ORO option * @reference http://tools.ietf.org/html/rfc3315#section-22.7 */ template (present) OptionRequestOption mw_dhcpv6_optionRequestOption_dummy := { optionCode := e_OPTION_ORO, optionLen := ?, requestedOptionCodes := ? } // End of template mw_dhcpv6_optionRequestOption_dummy /** * @desc Genercic receive DHCP AFTR-name option * @reference https://tools.ietf.org/html/rfc6334#section-3 */ template (present) AFTRNameOption mw_dhcpv6_aftrName_dummy := { optionCode := e_OPTION_AFTR_NAME, optionLen := ?, tunnelEndpointName := ? } // End of template mw_dhcpv6_aftrName_dummy } // End of group dhcpv6OptionsDummyRecvTemplates group dhcpv6MessagesRecvTemplates { /** * @desc Genercic receive DHCP Client/Reply message * @desc Receive DHCP Client/Sollicit message to check DHCPv6 options values * @param p_options Expected DHCPv6 options * @reference http://tools.ietf.org/html/rfc3315#section-6 */ template (present) DHCPv6Msg mdw_dhcpv6_reply_dummy modifies mw_dhcpv6_dummy := { msgType := e_REPLY } // End of template mdw_dhcpv6_reply_dummy template (present) DHCPv6Msg mdw_dhcpv6_Sollicit_options( in template (present) DHCPv6Options p_options ) modifies mw_dhcpv6_dummy := { options := p_options } // End of template mdw_dhcpv6_Sollicit_options /** * @desc Receive DHCP Client/Reply message to retrieve IPv6 address provided by the DHCPv6 server * @reference http://tools.ietf.org/html/rfc3315#section-6 */ template (present) DHCPv6Msg mdw_dhcpv6_reply_ipv6Address modifies mw_dhcpv6_dummy := { // TODO template (present) DHCPv6Msg mdw_dhcpv6_reply_ipv6Address( in template (present) DHCPv6Options p_options ) modifies mw_dhcpv6_dummy := { options := p_options } // End of template mdw_dhcpv6_reply_dummy } // End of group dhcpv6DummyRecvTemplates } // End of group dhcpv6MessagesRecvTemplates group dhcpv6OptionsRecvTemplates { /** * @desc Receive template for DHCPv6 options 'ORO' * @param p_optionRequest * @reference */ template (present) DHCPv6Options mdw_dhcpv6_options_optionRequest( in template (present) OptionRequestOption p_optionRequest ) modifies mw_dhcpv6_options_dummy := { { optionRequest := p_optionRequest }, * } // End of template mdw_dhcpv6_options_optionRequest /** * @desc Genercic receive DHCPv6 AFTR-name option */ template (present) OptionRequestOption mw_dhcpv6_optionRequestOption_aftrName modifies mw_dhcpv6_optionRequestOption_dummy := { requestedOptionCodes := superset(e_OPTION_AFTR_NAME) } // End of template mw_dhcpv6_optionRequestOption_aftrName } // End of group dhcpv6OptionsRecvTemplates } // End of group dhcpv6Templates Loading
ttcn/AtsDSlite/AtsDSLite_TestCases.ttcn3 +144 −21 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ module AtsDSLite_TestCases { // LibCommon import from LibCommon_Sync { function f_selfOrClientSyncAndVerdictPreamble, f_selfOrClientSyncAndVerdictTestBody, f_selfOrClientSyncAndVerdict, f_selfOrClientSyncAndVerdict, f_serverSyncNClientsAndStop; group standardSyncPointNames }; Loading @@ -11,8 +11,7 @@ module AtsDSLite_TestCases { // LibIPv6 import from LibIpv6_CommonRfcsDhcp_TypesAndValues { type DHCPv6Msg; group dhcpConstants DHCPv6Msg }; // DSLitefrom Loading Loading @@ -105,17 +104,134 @@ module AtsDSLite_TestCases { // Clause 'when': the IUT sends a DHCPv6 Request to DHCPv6 Server tc_ac.start; alt { [] dhcpv6Port.receive( // Await Sollicit DHCPv6 Request to DHCPv6 Server mdw_dhcpv6_Sollicit_aftrName( // containing the Option field mw_dhcpv6_aftrName_dummy // indicating the AFTR-name DHCPv6 Option (value 64) )) { [] dhcpv6Port.receive( mdw_dhcpv6_Sollicit_options( // Await Sollicit DHCPv6 Request to DHCPv6 Server mdw_dhcpv6_options_optionRequest( // containing the Option field mw_dhcpv6_optionRequestOption_aftrName // indicating the AFTR-name DHCPv6 Option (value 64) ))) { tc_ac.stop; // Nothing to do f_selfOrClientSyncAndVerdict(c_tbDone, e_success); log("*** " & __SCOPE__ & ": PASS: Sollicit DHCPv6 Request with AFT-name option set was sent by the IUT. ***"); } [] dhcpv6Port.receive( // Await Reply message mdw_dhcpv6_reply_ipv6Address ) -> value v_dhcpMsg { // TODO Store the IPv6 address for future uses [] tc_ac.timeout { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); log("*** " & __SCOPE__ & ": INCONC: Message was not received in due time. ***"); } } // End of 'altstep' statement // Postamble f_postamble_dhcpv6(); f_selfOrClientSyncAndVerdict(c_poDone, e_success); log("*** " & __SCOPE__ & ": INFO: Postamble done. ***"); } // End of function f_TC_DSLITE_B4_GWA_BV_001_dhcpv6 } // End of group f_TC_DSLITE_B4_GWA_BV_001 /** * @desc Check that IUT sends a DNS Query to the DNS Server * @verdict pass on success, inconc on timeout, fail otherwise * <pre> * PICS Selection: none * Initial conditions: * with { * the IUT having sent a DHCPv6 Request to the DHCPv6 Server * } * Expected behaviour: * ensure that { * when { * the IUT receives a DHCPv6 Reply from the DHCPv6 Server * } * then { * the IUT sends a DNS query * containing the Resolver request name * indicating the AFTR-name received in the DHCPv6 Reply * } * } * </pre> * * @version 0.0.1 * @reference RFC6334 [1] clause 5 * @see ETSI TS xxx xxx-x V0.0.1.5a-draft (2014-01) TP/DSLITE/B4/GWA/BV/002 */ testcase TC_DSLITE_B4_GWA_BV_002() runs on DSLiteComponent system TestAdapter { // Local variables var boolean v_exitLoop := false; var DHCPv6Msg v_dHCPv6Msg; vc_dhcpv6Component := DHCPv6Component.create("DHCPv6"); vc_dnsComponent := DNSComponent.create("DNS"); // Test control // Test component configuration f_cf01Up_B4(); // Test adapter configuration // Start all components vc_dhcpv6Component.start(f_TC_DSLITE_B4_GWA_BV_002_dhcpv6()); vc_dnsComponent.start(f_TC_DSLITE_B4_GWA_BV_002_dns()); f_serverSyncNClientsAndStop(1, { c_prDone, c_tbDone, c_poDone }); // Test Body // Clause 'when': action("the IUT goes online"); // Clause 'then': Nothing to do, refer to a_default // Postamble f_cf01Down_B4(); } // End of testcase TC_DSLITE_B4_GWA_BV_002 group f_TC_DSLITE_B4_GWA_BV_002 { /** * @desc Implement DHCPv6 client/server protocol * @verdict 'pass' on success, 'inconc' on 'timeout', fail otherwise */ function f_TC_DSLITE_B4_GWA_BV_002_dhcpv6() runs on DHCPv6Component { // Local variables var DHCPv6Msg v_dhcpMsg; // Preamble // Clause 'Initial conditions': the IUT having sent a DHCPv6 Request to the DHCPv6 Server f_preamble_dhcpv6(); tc_ac.start; alt { [] dhcpv6Port.receive( mdw_dhcpv6_Sollicit_options( // Await Sollicit DHCPv6 Request to DHCPv6 Server mdw_dhcpv6_options_optionRequest( // containing the Option field mw_dhcpv6_optionRequestOption_aftrName // indicating the AFTR-name DHCPv6 Option (value 64) ))) { tc_ac.stop; // Nothing to do f_selfOrClientSyncAndVerdict(c_prDone, e_success); log("*** " & __SCOPE__ & ": INFO: Preamblue done. ***"); } [] tc_ac.timeout { f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); log("*** " & __SCOPE__ & ": INCONC: Message was not received in due time. ***"); } } // End of 'altstep' statement // Test Body // Clause 'when': the IUT receives a DHCPv6 Reply from the DHCPv6 Server tc_ac.start; alt { [] dhcpv6Port.receive( // Await Reply DHCPv6 message to store IPv6 addresses mdw_dhcpv6_reply_ipv6Address( mw_dhcpv6_options_dummy )) -> value v_dhcpMsg { tc_ac.stop; // Store the IPv6 addresses for future uses vc_aftrIPv6Address := v_dhcpMsg.options[0].ia_address.ipv6Address; // FIXME To be checke // TODO vc_dnsIPv6Address := } [] tc_ac.timeout { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); Loading @@ -128,11 +244,16 @@ module AtsDSLite_TestCases { f_selfOrClientSyncAndVerdict(c_poDone, e_success); log("*** " & __SCOPE__ & ": INFO: Postamble done. ***"); } // End of function f_TC_DSLITE_B4_GWA_BV_001_dhcpv6 } // End of function f_TC_DSLITE_B4_GWA_BV_002_dhcpv6 /* TODO function f_TC_DSLITE_B4_GWA_BV_001_dns() runs on DNSComponent { /** * @desc Implement DNS protocol * @verdict 'pass' on success, 'inconc' on 'timeout', fail otherwise */ function f_TC_DSLITE_B4_GWA_BV_002_dns() runs on DNSComponent { // Local variables // TODO var DNSMsg v_dnsMsg; // Preamble // Clause 'Initial conditions' Loading @@ -141,12 +262,14 @@ module AtsDSLite_TestCases { log("*** " & __SCOPE__ & ": INFO: Preamblue done. ***"); // Test Body // Clause 'when': the IUT receives a UL-Request // Clause 'then': the IUT sends a UL-Answer // Clause 'when': the IUT sends a DNS query tc_ac.start; alt { [] dnsPort.receive { // TODO To ne continued [] dnsPort.receive { // TODO tc_ac.stop; // TODO f_selfOrClientSyncAndVerdict(c_tbDone, e_success); log("*** " & __SCOPE__ & ": PASS: DNS query was sent by the IUT. ***"); } [] tc_ac.timeout { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); Loading @@ -159,9 +282,9 @@ module AtsDSLite_TestCases { f_selfOrClientSyncAndVerdict(c_poDone, e_success); log("*** " & __SCOPE__ & ": INFO: Postamble done. ***"); } // End of function f_TC_DSLITE_B4_GWA_BV_001_dns */ } // End of group f_TC_DSLITE_B4_GWA_BV_001 } // End of function f_TC_DSLITE_B4_GWA_BV_002_dns } // End of group f_TC_DSLITE_B4_GWA_BV_002 } // End of group validBehaviour Loading