#!/usr/bin/perl # #$Copyright$ # #$Id: C_RFC3633_11_1_AdvWStatusCodeNoPrefixAvail.seq,v 1.10 2005/12/09 08:25:03 zhang Exp $ ############################################################################### BEGIN{ $V6evalTool::TestVersion = '$Name: $'; } use V6evalTool; use DHCPv6_common; use Client_pktdesc; dhcpExitNS if ChkFuncSupport('PD'); #--------------------------------------------------------------# # Initialization variables #--------------------------------------------------------------# $IF0_NUT = $V6evalTool::NutDef{Link0_device}; $IF0 = Link0; #--------------------------------------------------------------# # Initialize DHCPv6 Client #--------------------------------------------------------------# my $ret = vRemote("dhcp6c.rmt", "start", "prefix", "link0=$IF0_NUT"); if($ret != 0){ vLogHTML('Cannot Initialize DHCPv6 Client program.
'); dhcpExitFail; }; vCapture($IF0); #--------------------------------------------------------------# #1. Wait until Solicit arrives #--------------------------------------------------------------# my ($retsol,%sol) = wait_for_solicit($IF0,30) ; if($retsol != 0){ dhcpExitFail; } vClear($IF0); #--------------------------------------------------------------# # 2. send Advertise message #--------------------------------------------------------------# #$CID_OPTION = "opt_CID_LLT_nut"; $SID_OPTION = "opt_SID_LLT_server1"; #$IA_PD_OPTION = "opt_IA_PD_Status"; $IA_PD_OPTION = "opt_IA_PD_NoAvail"; #$StatusCode_OPTION = "opt_Prefix_StatusCode "; my ($retadv, %adv) = send_advertise($IF0, "advertise_server1_to_nut", \%sol, "-DIA_PREFIX_STATUSCODE=6"); if($retadv != 0){ dhcpExitFail; } #--------------------------------------------------------------# # 3. wait for Request message #--------------------------------------------------------------# #my ($retreq, %req) = wait_for_request($IF0,30); #if($retreq !=0){ # dhcpExitFail; #} #vClear($IF0); #--------------------------------------------------------------# # 4.send Reply message with status of NoPrefixAvail #--------------------------------------------------------------# #$IA_PD_OPTION = "opt_IA_PD_Status"; #$IA_PD_OPTION = "opt_IA_PD_config"; #my ($retrep, %rep) = send_reply($IF0, "reply_server1_to_nut", \%req, "-DIA_PREFIX_STATUSCODE=6"); #if($retrep != 0){ # dhcpExitFail; #} #--------------------------------------------------------------# # 5. wait for retransmitted Solicit with IA_PD options #--------------------------------------------------------------# my ($retsol,%sol) = wait_for_solicit($IF0,30) ; if($retsol != 0){ dhcpExitFail; } dhcpExitpass; ############################################################################### __END__ =head1 NAME C_RFC3633_11_1_AdvWStatusCodeNoPrefixAvail.seq - Test when receiving Advertise with status code of NoPrefixAvail =head1 TARGET Client =head1 SYNOPSIS =begin html
   C_RFC3633_11_1_AdvWStatusCodeNoPrefixAvail.seq [-tooloption...] -pkt   C_RFC3633_11_1_AdvWStatusCodeNoPrefixAvail.def -tooloption : v6eval tool option

See Also DHCPv6.def
=end html =head1 INITIALIZATION =begin html =end html =head1 TEST PROCEDURE =begin html

NUT TN | | | |Initialize NUT(as a Requesting router) | ----> |Solicit(W/IA_PD option) (1*) | <---- |Advertise(W/IA_PD option/Status code/NoPrefixAvail) (2*) | ----> |Solicit (3*) | |
(1*)NUT sends Solicit with IA_PD option. (2*)As a Delegating router, TN transmits Advertise with status code of NoPrefxiAvail. (3*)NUT should retransmit Solicit.
=end html =head1 JUDGEMENT =begin html
  If content of retransmitted Solicit(1*) conforms to Verification Points, test will PASS.
  Or else, FAIL.
=end html =head1 TERMINATION =begin html
  N/A
=end html =head1 REFERENCE =begin html
  Also see RFC3633

11.1. Requesting router behavior
From line 589 to line 590.
=end html =head1 SEE ALSO =begin html

perldoc V6evalTool
=end html