#!/usr/bin/perl
#
# $Copyright$
#
# $TAHI: ct/icmp/destination_unreachable_code_zero.seq,v 1.7 2001/10/05 06:38:51 masaxmasa Exp $
########################################################################
BEGIN { $V6evalTool::TestVersion = '$Name: $'; }
use V6evalTool;
use icmp;
$IF=Link0;
checkNUT(router);
#
#
#
vLogHTML("Initialization
");
vCapture($IF);
$ret=makeNCE_TN_LLA();
if( $ret !=0) {
vLog("NUT can not be initialized !!");
exit $V6evalTool::exitFail;
}else {
vLog("*** TN can make TN's link local address NCE in TN ***");
}
$ret=makeNCE_TN_GA();
if( $ret !=0) {
vLog("NUT can not be initialized !!");
exit $V6evalTool::exitFail;
}else {
vLog("*** TN can make TN's global address NCE in TN ***");
}
#
#
#
vLogHTML("Test
");
vSend($IF, echo_request_tn2nut_OFFLINKA);
%ret=vRecv($IF,$icmp::wait_address_resolution,0,0,destination_unreachable_nut2tn_any_code_zero);
if( $ret{status} !=0) {
vLog("TN can not receive ICMPv6 error message from NUT");
goto error;
}elsif($ret{recvFrame} eq 'destination_unreachable_nut2tn_any_code_zero') {
vLog("TN can receive Echo Reply from NUT");
vLog("OK");
exit $V6evalTool::exitPass;
}else {
vLog("TN receive unexpected packets from NUT");
goto error;
}
error:
vLog("FAIL");
exit $V6evalTool::exitFail;
########################################################################
__END__
=head1 NAME
destination_unreachable_code_zero.seq - check ICMPv6 Destination
Unreachable code 0
=head1 TARGET
Host and Router
=head1 SYNOPSIS
destination_unreachable_code_zero.seq [-tooloption ...] -p
destination_unreachable_code_zero.def
=head1 INITIALIZATION
When test stars, states of Neighbor Cache Entry for TN's
addresses are reachable.
=head1 TEST PROCEDURE
This test verifies that NUT sends valid ICMPv6 Destination
Unreachable (code 0) in response to a packet which can not
be delivered to destination address because NUT have no route.
TN NUT
---------------------------
1.
=== Echo Request ===>
src address : TN global address
dst address : OFFLINK address
2.
NUT has no route for this echo request packet.
3.
<< JUDGMENT >>
<=== ICMPv6 Destination Unreachable ===
Code is 0
=head1 JUDGMENT
<< PASS >>
NUT send ICMPv6 Destination Unreachable.
<< FAIL >>
NUT do not send ICMPv6 Destination Unreachable.
=head1 SEE ALSO
perldoc V6evalTool
=cut