#!/usr/bin/perl # #$Copyright$ # #$Id: C_RFC3646_5_InvDecDnsSchLstOpt.seq,v 1.1 2007/02/08 05:05:14 hide Exp $ ############################################################################### BEGIN{ $V6evalTool::TestVersion = '$Name: $'; } use strict; use V6evalTool; use lib '../.'; use DHCPv6_common; use Client_pktdesc; dhcpExitNS if ChkFuncSupport('DNS'); #--------------------------------------------------------------# # Initialization variables #--------------------------------------------------------------# my $IF0_NUT = $V6evalTool::NutDef{"Link0_device"}; my $IF0 = "Link0"; my $timeout = 20*$DEC_TIMEOUT; vCapture($IF0); #--------------------------------------------------------------# # Initialize DHCPv6 Client #--------------------------------------------------------------# my $ret = initial_ra_w_ping($IF0,'ra_server2_to_all_MO_1'); if($ret == 0){ vLogHTML('Global Address of NUT is assigned by RA!
'); dhcpExitFail; } $ret = vRemote("dhcp6c.rmt", "start", "iana", "iaid=111111", "lst", "link0=$IF0_NUT"); if($ret != 0) { vLogHTML('Cannot Initialize DHCPv6 Client program.
'); dhcpExitFail; }; #--------------------------------------------------------------# #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_NA_OPTION = "opt_IA_NA_Addr_woStatus"; $DNS_LST_OPTION = "opt_DNS_ServerSearchList"; #$OptionRequest_OPTION = "opt_ORO_dns_domainlists"; my ($retadv, %adv) = send_advertise($IF0, "advertise_server1_to_nut", \%sol, ""); if($retadv != 0){ dhcpExitFail; } #--------------------------------------------------------------# #3. Wait until Request arrives #--------------------------------------------------------------# my ($retreq,%req) = wait_for_request($IF0,30); if($retreq != 0){ dhcpExitFail; } vClear($IF0); #--------------------------------------------------------------# #4. send Reply message #--------------------------------------------------------------# $IA_NA_OPTION = "opt_IA_NA_Addr_woStatus"; $DNS_LST_OPTION = "opt_DNS_ServerSearchList"; #$OptionRequest_OPTION = "opt_ORO_dns_domainlists"; $StatusCode_OPTION = "opt_StatusCode"; my ($retrep, %rep) = send_reply($IF0, "reply_server1_to_nut", \%req, ""); if($retrep !=0){ dhcpExitFail; } # wait for DAD completion my %ret = vRecv($IF0, 3, 0, 0, 'dadns_nutga'); if ($ret{"recvFrame"} ne "dadns_nutga"){ vLogHTML("NUT cannot send DAD packet
"); dhcpExitFail; } vSend($IF0, 'dadna_to_nutga'); vLogHTML("NUT send DAD packet
"); vClear($IF0); #--------------------------------------------------------------# #5. wait until Decline arrives #--------------------------------------------------------------# my ($retdec, %dec) = wait_for_decline($IF0, $timeout); if($retdec != 0) { dhcpExitFail; }; $ret = options_exist(\%dec, $CMP_DNS_LST); if($ret == 0){ vLogHTML('DHCPv6 Client should not send Decline with Domain Search List option!
'); dhcpExitFail; } dhcpExitPass; ############################################################################### __END__ =head1 NAME C_RFC3646_5_InvDecDnsSchLstOpt.seq - Check that Decline must not include Domain search list option =head1 TARGET Client =head1 SYNOPSIS =begin html
   C_RFC3646_5_InvDecDnsSchLstOpt.seq [-tooloption...] 
-pkt C_RFC3646_5_InvDecDnsSchLstOpt.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 DHCPv6 Client) | | | ----> |Solicit w/DNS Domain search list option | <---- |Advertise | ----> |Request | <---- |Reply | | | |DAD Errors | | | ----> |Decline (5*) | |
=end html =head1 JUDGEMENT =begin html
  (5*)PASS: NUT transmits Decline without DNS Domain search list option.
=end html =head1 TERMINATION =begin html
  N/A
=end html =head1 REFERENCE =begin html
  Also see RFC3646

5. Appearance of these options
=end html =head1 SEE ALSO =begin html

perldoc V6evalTool
=end html