Net-Frame-Layer-ICMPv6-1.11/0000755000175000017500000000000013471432376014330 5ustar gomorgomorNet-Frame-Layer-ICMPv6-1.11/README0000644000175000017500000000115713471432074015207 0ustar gomorgomorNet::Frame::Layer::ICMPv6 ========================= INSTALLATION To install this module type the following: perl Makefile.PL make make test make install DEPENDENCIES This module requires these other modules and libraries: Perl v5.6.1 Net::Frame GETTING HELP A mailing list is available for all questions concerning Net::Frame::*. https://www.secure-side.com/lists/mailman/listinfo/netframe COPYRIGHT AND LICENSE You may distribute this module under the terms of the Artistic license. See LICENSE.Artistic file in the source distribution archive. Copyright (c) 2006-2019, Patrice Auffret Net-Frame-Layer-ICMPv6-1.11/Makefile.PL0000644000175000017500000000073513165346631016305 0ustar gomorgomor# # $Id: Makefile.PL,v d43531dca816 2012/11/10 15:29:12 gomor $ # use ExtUtils::MakeMaker; require v5.6.1; WriteMakefile( NAME => 'Net::Frame::Layer::ICMPv6', VERSION_FROM => 'lib/Net/Frame/Layer/ICMPv6.pm', LICENSE => 'artistic', ABSTRACT_FROM => 'lib/Net/Frame/Layer/ICMPv6.pm', AUTHOR => 'GomoR ', PREREQ_PM => { Net::Frame => 0, Bit::Vector => 0, }, MIN_PERL_VERSION => '5.6.1', ); Net-Frame-Layer-ICMPv6-1.11/META.json0000644000175000017500000000201613471432376015750 0ustar gomorgomor{ "abstract" : "Internet Control Message Protocol v6 layer object", "author" : [ "GomoR " ], "dynamic_config" : 1, "generated_by" : "ExtUtils::MakeMaker version 7.24, CPAN::Meta::Converter version 2.150010", "license" : [ "artistic_1" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : "2" }, "name" : "Net-Frame-Layer-ICMPv6", "no_index" : { "directory" : [ "t", "inc" ] }, "prereqs" : { "build" : { "requires" : { "ExtUtils::MakeMaker" : "0" } }, "configure" : { "requires" : { "ExtUtils::MakeMaker" : "0" } }, "runtime" : { "requires" : { "Bit::Vector" : "0", "Net::Frame" : "0", "perl" : "5.006001" } } }, "release_status" : "stable", "version" : "1.11", "x_serialization_backend" : "JSON::PP version 2.27400_02" } Net-Frame-Layer-ICMPv6-1.11/META.yml0000644000175000017500000000116413471432376015603 0ustar gomorgomor--- abstract: 'Internet Control Message Protocol v6 layer object' author: - 'GomoR ' build_requires: ExtUtils::MakeMaker: '0' configure_requires: ExtUtils::MakeMaker: '0' dynamic_config: 1 generated_by: 'ExtUtils::MakeMaker version 7.24, CPAN::Meta::Converter version 2.150010' license: artistic meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: '1.4' name: Net-Frame-Layer-ICMPv6 no_index: directory: - t - inc requires: Bit::Vector: '0' Net::Frame: '0' perl: '5.006001' version: '1.11' x_serialization_backend: 'CPAN::Meta::YAML version 0.018' Net-Frame-Layer-ICMPv6-1.11/Changes0000644000175000017500000000521313471432321015612 0ustar gomorgomorRevision history for Perl extension Net::Frame::Layer::ICMPv6. 1.11 Thu 23 May 07:51:04 CEST 2019 - bugfix: NF_ICMPv6_OPTION_SOURCELINKLAYERADDRESS => https://rt.cpan.org/Ticket/Display.html?id=105569 - update: copyright notice 1.10 Fri 6 Oct 18:26:34 CEST 2017 - patch: multicast listener discovery extensions by vinsworld.com - update: copyright notice 1.09 Wed Apr 9 08:31:41 CEST 2014 - bugfix: https://rt.cpan.org/Ticket/Display.html?id=93405 - update: copyright notice 1.08 Sun Dec 2 17:10:28 CET 2012 - bugfix: ICMPv6::Option: some systems do not set length as others. We added a check on option type so we set manually length while unpacking. 1.07 Wed Nov 14 21:48:47 CET 2012 - bugfix: on length calculation for ICMPv6::Option - new: support for HopByHop, Destination and Mobility extension headers => thanks to Vince from vinsworld.com - update: more tests 1.06 Thu Feb 23 20:10:45 CET 2012 - new: computeChecksum() takes into account IPv6Routing and IPv6fragment => contributed by vinsworld.com (Thanks Vince) - new: ICMPv6::DestUnreach, ICMPv6::TimeExceed, ICMPv6::TooBig and ICMPv6::ParameterProblem => contributed by vinsworld.com (Thanks Vince) - update: copyright notice 1.05 Mon Nov 16 20:43:50 CET 2009 - bugfix: permission on namespace for RouterAdvertisement and RouterSolicitation - cosmetics 1.04 Fri Nov 13 07:46:21 CET 2009 - bugfix: some new files were not put in MANIFEST :( 1.03 Thu Nov 12 22:36:35 CET 2009 - new: ICMPv6 RouterAdvertisement and RouterSolicitation => Contributed by Paolo Vanni M. Venegas 1.02 Sun May 31 17:12:08 CEST 2009 - UPDATE: payload is no more an attribute in ICMPv6 modules, it is handled in a generic way like any other layer - UPDATE: icmpType is no more an attribute in ICMPv6 module, it is handled in a generic way like any other layer - UPDATE: options is no more an attribute in ICMPv6 module, it is handled in a generic way like any other layer - UPDATE: options are handled also in specific ICMPv6 layers, with options attribbute (ARRAYREF) and getOptionsLength() function - REMOVED: getPayloadLength() functions - REMOVED: getOptionsLength() functions - update: computeChecksum() and computeLengths() to reflect new computation scheme from Net::Frame::Simple - update: copyright notice 1.01 Thu Dec 28 16:58:44 CET 2006 - bugfix: computeChecksums() now handles ICMPv6 options - bugfix: recv() on Neighbor Solicitation messages - update: examples/lookup-mac.pl 1.00 Thu Dec 21 23:53:20 CET 2006 - first public release Net-Frame-Layer-ICMPv6-1.11/LICENSE0000644000175000017500000000026513165346631015336 0ustar gomorgomorLICENSE This program is free software. You can redistribute it and/or modify it under the following terms: - the Perl Artistic License (in the file LICENSE.Artistic), Net-Frame-Layer-ICMPv6-1.11/lib/0000755000175000017500000000000013471432376015076 5ustar gomorgomorNet-Frame-Layer-ICMPv6-1.11/lib/Net/0000755000175000017500000000000013471432376015624 5ustar gomorgomorNet-Frame-Layer-ICMPv6-1.11/lib/Net/Frame/0000755000175000017500000000000013471432376016656 5ustar gomorgomorNet-Frame-Layer-ICMPv6-1.11/lib/Net/Frame/Layer/0000755000175000017500000000000013471432376017732 5ustar gomorgomorNet-Frame-Layer-ICMPv6-1.11/lib/Net/Frame/Layer/ICMPv6.pm0000644000175000017500000003574413471432361021303 0ustar gomorgomor# # $Id: ICMPv6.pm,v bc01789674fd 2019/05/23 05:51:45 gomor $ # package Net::Frame::Layer::ICMPv6; use strict; use warnings; our $VERSION = '1.11'; use Net::Frame::Layer qw(:consts :subs); use Exporter; our @ISA = qw(Net::Frame::Layer Exporter); our %EXPORT_TAGS = ( consts => [qw( NF_ICMPv6_CODE_ZERO NF_ICMPv6_TYPE_DESTUNREACH NF_ICMPv6_CODE_NOROUTE NF_ICMPv6_CODE_ADMINPROHIBITED NF_ICMPv6_CODE_NOTASSIGNED NF_ICMPv6_CODE_ADDRESSUNREACH NF_ICMPv6_CODE_PORTUNREACH NF_ICMPv6_CODE_FAILPOLICY NF_ICMPv6_CODE_REJECTROUTE NF_ICMPv6_TYPE_TOOBIG NF_ICMPv6_TYPE_TIMEEXCEED NF_ICMPv6_CODE_HOPLIMITEXCEED NF_ICMPv6_CODE_FRAGREASSEMBLYEXCEEDED NF_ICMPv6_TYPE_PARAMETERPROBLEM NF_ICMPv6_CODE_ERRONEOUSHERDERFIELD NF_ICMPv6_CODE_UNKNOWNNEXTHEADER NF_ICMPv6_CODE_UNKNOWNOPTION NF_ICMPv6_TYPE_ECHO_REQUEST NF_ICMPv6_TYPE_ECHO_REPLY NF_ICMPv6_TYPE_MLDQUERY NF_ICMPv6_TYPE_MLDREPORTv1 NF_ICMPv6_TYPE_MLDDONE NF_ICMPv6_TYPE_ROUTERSOLICITATION NF_ICMPv6_TYPE_ROUTERADVERTISEMENT NF_ICMPv6_TYPE_NEIGHBORSOLICITATION NF_ICMPv6_TYPE_NEIGHBORADVERTISEMENT NF_ICMPv6_TYPE_MLDREPORTv2 NF_ICMPv6_OPTION_SOURCELINKLAYERADDRESS NF_ICMPv6_OPTION_TARGETLINKLAYERADDRESS NF_ICMPv6_OPTION_PREFIXINFORMATION NF_ICMPv6_OPTION_REDIRECTEDHEADER NF_ICMPv6_OPTION_MTU NF_ICMPv6_FLAG_ROUTER NF_ICMPv6_FLAG_SOLICITED NF_ICMPv6_FLAG_OVERRIDE NF_ICMPv6_FLAG_MANAGEDADDRESSCONFIGURATION NF_ICMPv6_FLAG_OTHERCONFIGURATION )], ); our @EXPORT_OK = ( @{$EXPORT_TAGS{consts}}, ); use constant NF_ICMPv6_CODE_ZERO => 0; use constant NF_ICMPv6_TYPE_DESTUNREACH => 1; use constant NF_ICMPv6_CODE_NOROUTE => 0; use constant NF_ICMPv6_CODE_ADMINPROHIBITED => 1; use constant NF_ICMPv6_CODE_NOTASSIGNED => 2; use constant NF_ICMPv6_CODE_ADDRESSUNREACH => 3; use constant NF_ICMPv6_CODE_PORTUNREACH => 4; use constant NF_ICMPv6_CODE_FAILPOLICY => 5; use constant NF_ICMPv6_CODE_REJECTROUTE => 6; use constant NF_ICMPv6_TYPE_TOOBIG => 2; use constant NF_ICMPv6_TYPE_TIMEEXCEED => 3; use constant NF_ICMPv6_CODE_HOPLIMITEXCEED => 0; use constant NF_ICMPv6_CODE_FRAGREASSEMBLYEXCEEDED => 1; use constant NF_ICMPv6_TYPE_PARAMETERPROBLEM => 4; use constant NF_ICMPv6_CODE_ERRONEOUSHERDERFIELD => 0; use constant NF_ICMPv6_CODE_UNKNOWNNEXTHEADER => 1; use constant NF_ICMPv6_CODE_UNKNOWNOPTION => 2; use constant NF_ICMPv6_TYPE_ECHO_REQUEST => 128; use constant NF_ICMPv6_TYPE_ECHO_REPLY => 129; use constant NF_ICMPv6_TYPE_MLDQUERY => 130; use constant NF_ICMPv6_TYPE_MLDREPORTv1 => 131; use constant NF_ICMPv6_TYPE_MLDDONE => 132; use constant NF_ICMPv6_TYPE_ROUTERSOLICITATION => 133; use constant NF_ICMPv6_TYPE_ROUTERADVERTISEMENT => 134; use constant NF_ICMPv6_TYPE_NEIGHBORSOLICITATION => 135; use constant NF_ICMPv6_TYPE_NEIGHBORADVERTISEMENT => 136; use constant NF_ICMPv6_TYPE_MLDREPORTv2 => 143; use constant NF_ICMPv6_OPTION_SOURCELINKLAYERADDRESS => 0x01; use constant NF_ICMPv6_OPTION_TARGETLINKLAYERADDRESS => 0x02; use constant NF_ICMPv6_OPTION_PREFIXINFORMATION => 0x03; use constant NF_ICMPv6_OPTION_REDIRECTEDHEADER => 0x04; use constant NF_ICMPv6_OPTION_MTU => 0x05; use constant NF_ICMPv6_FLAG_ROUTER => 0x04; use constant NF_ICMPv6_FLAG_SOLICITED => 0x02; use constant NF_ICMPv6_FLAG_OVERRIDE => 0x01; use constant NF_ICMPv6_FLAG_MANAGEDADDRESSCONFIGURATION => 1 << 5; use constant NF_ICMPv6_FLAG_OTHERCONFIGURATION => 1 << 4; use constant NF_ICMPv6_FLAG_MOBILEIPv6HOMEAGENT => 1 << 3; use constant NF_ICMPv6_FLAG_ROUTERSELECTIONPREFHIGH => 1 << 1; # 01b use constant NF_ICMPv6_FLAG_ROUTERSELECTIONPREFMEDIUM => 0; # 00b use constant NF_ICMPv6_FLAG_ROUTERSELECTIONPREFLOW => 3 << 1; # 11b use constant NF_ICMPv6_FLAG_ROUTERSELECTIONPREFRESERVED => 2 << 1; # 10b use constant NF_ICMPv6_FLAG_NEIGHBORDISCOVERYPROXY => 1; our @AS = qw( type code checksum ); __PACKAGE__->cgBuildIndices; __PACKAGE__->cgBuildAccessorsScalar(\@AS); use Bit::Vector; sub new { shift->SUPER::new( type => NF_ICMPv6_TYPE_ECHO_REQUEST, code => NF_ICMPv6_CODE_ZERO, checksum => 0, @_, ); } # XXX: may be better, by keying on type also sub getKey { shift->layer } sub getKeyReverse { shift->layer } sub match { my $self = shift; my ($with) = @_; my $sType = $self->type; my $wType = $with->type; if ($sType eq NF_ICMPv6_TYPE_ECHO_REQUEST && $wType eq NF_ICMPv6_TYPE_ECHO_REPLY) { return 1; } elsif ($sType eq NF_ICMPv6_TYPE_NEIGHBORSOLICITATION && $wType eq NF_ICMPv6_TYPE_NEIGHBORADVERTISEMENT) { return 1; } elsif ($sType eq NF_ICMPv6_TYPE_ROUTERSOLICITATION && $wType eq NF_ICMPv6_TYPE_ROUTERADVERTISEMENT) { return 1; } elsif ($sType eq NF_ICMPv6_TYPE_MLDQUERY && (($wType eq NF_ICMPv6_TYPE_MLDREPORTv1) || ($wType eq NF_ICMPv6_TYPE_MLDREPORTv2)) ) { return 1; } return 0; } sub getLength { 4 } sub pack { my $self = shift; my $raw = $self->SUPER::pack('CCn', $self->type, $self->code, $self->checksum, ) or return; return $self->raw($raw); } sub unpack { my $self = shift; my ($type, $code, $checksum, $payload) = $self->SUPER::unpack('CCn a*', $self->raw) or return; $self->type($type); $self->code($code); $self->checksum($checksum); $self->payload($payload); return $self; } sub computeChecksums { my $self = shift; my ($layers) = @_; my $ip; my $rh0; my $hbh; # Hop-by-hop Ext Hdr my $dst; # Destination Ext Hdr my $mob; # Mobility Ext Hdr my $lastNextHeader; my $fragmentFlag = 0; my $start = 0; my $last = $self; my $payload = ''; for my $l (@$layers) { if (! $ip && $l->layer eq 'IPv6') { $ip = $l; } if (! $rh0 && $l->layer eq 'IPv6::Routing') { $rh0 = $l; } if (! $hbh && $l->layer eq 'IPv6::HopByHop') { $hbh = $l; } if (! $dst && $l->layer eq 'IPv6::Destination') { $dst = $l; } if (! $mob && $l->layer eq 'IPv6::Mobility') { $mob = $l; } if ($l->can('nextHeader')) { $lastNextHeader = $l->nextHeader; } if ($l->layer eq 'IPv6::Fragment') { $fragmentFlag = 1; } $last = $l; if (! $start) { $start++ if $l->layer eq 'ICMPv6'; next; } $payload .= $l->pack; } my $lastIpDst = $ip->dst; my $ipPayloadLength = $ip->payloadLength; # If RH0, need to set $ip->dst to last $rh0->addresses # unless segmentsLeft == 0 (RFC 2460 sec 8.1) if ($rh0 && $rh0->segmentsLeft != 0) { for ($rh0->addresses) { $lastIpDst = $_; } # Pseudo header length is upper layer minus any EH (RFC 2460 sec 8.1) $ipPayloadLength -= $rh0->getLength; } # Pseudo header length is upper layer minus any EH (RFC 2460 sec 8.1) if ($fragmentFlag) { $ipPayloadLength -= 8; # 8 = length of fragment EH } if ($hbh) { $ipPayloadLength -= $hbh->getLength; } if ($dst) { $ipPayloadLength -= $dst->getLength; } if ($mob) { $ipPayloadLength -= $mob->getLength; } # Build pseudo-header and pack ICMPv6 packet my $zero = Bit::Vector->new_Dec(24, 0); my $nextHeader = Bit::Vector->new_Dec( 8, $lastNextHeader); my $v32 = $zero->Concat_List($nextHeader); my $packed = $self->SUPER::pack('a*a*NNCCn', inet6Aton($ip->src), inet6Aton($lastIpDst), $ipPayloadLength, $v32->to_Dec, $self->type, $self->code, 0 ) or return; if (defined($last->payload) && length($last->payload)) { $payload .= $last->payload; } if (length($payload)) { $packed .= $self->SUPER::pack('a*', $payload) or return; } $self->checksum(inetChecksum($packed)); return 1; } sub encapsulate { my $self = shift; return $self->nextLayer if $self->nextLayer; if ($self->payload) { my $type = $self->type; # if ($type eq NF_ICMPv6_TYPE_REDIRECT) { # return 'IPv6'; # } if ($type eq NF_ICMPv6_TYPE_ECHO_REQUEST || $type eq NF_ICMPv6_TYPE_ECHO_REPLY) { return 'ICMPv6::Echo'; } elsif ($type eq NF_ICMPv6_TYPE_NEIGHBORSOLICITATION) { return 'ICMPv6::NeighborSolicitation'; } elsif ($type eq NF_ICMPv6_TYPE_NEIGHBORADVERTISEMENT) { return 'ICMPv6::NeighborAdvertisement'; } elsif ($type eq NF_ICMPv6_TYPE_ROUTERSOLICITATION) { return 'ICMPv6::RouterSolicitation'; } elsif ($type eq NF_ICMPv6_TYPE_ROUTERADVERTISEMENT) { return 'ICMPv6::RouterAdvertisement'; } elsif ($type eq NF_ICMPv6_TYPE_DESTUNREACH) { return 'ICMPv6::DestUnreach'; } elsif ($type eq NF_ICMPv6_TYPE_TIMEEXCEED) { return 'ICMPv6::TimeExceed'; } elsif ($type eq NF_ICMPv6_TYPE_TOOBIG) { return 'ICMPv6::TooBig'; } elsif ($type eq NF_ICMPv6_TYPE_PARAMETERPROBLEM) { return 'ICMPv6::ParameterProblem'; } elsif ($type eq NF_ICMPv6_TYPE_MLDQUERY || $type eq NF_ICMPv6_TYPE_MLDREPORTv1 || $type eq NF_ICMPv6_TYPE_MLDDONE) { return 'ICMPv6::MLD'; } elsif ($type eq NF_ICMPv6_TYPE_MLDREPORTv2) { return 'ICMPv6::MLD::Report'; } } return NF_LAYER_NONE; } sub print { my $self = shift; my $l = $self->layer; my $buf = sprintf "$l: type:%d code:%d checksum:0x%04x", $self->type, $self->code, $self->checksum; return $buf; } 1; __END__ =head1 NAME Net::Frame::Layer::ICMPv6 - Internet Control Message Protocol v6 layer object =head1 SYNOPSIS use Net::Frame::Simple; use Net::Frame::Layer::ICMPv6 qw(:consts); my $icmp = Net::Frame::Layer::ICMPv6->new( type => NF_ICMPv6_TYPE_ECHO_REQUEST, code => NF_ICMPv6_CODE_ZERO, checksum => 0, ); # Build an ICMPv6 echo-request use Net::Frame::Layer::ICMPv6::Echo; my $echo = Net::Frame::Layer::ICMPv6::Echo->new(payload => 'echo'); my $echoReq = Net::Frame::Simple->new(layers => [ $icmp, $echo ]); print $echoReq->print."\n"; # Build an ICMPv6 neighbor-solicitation use Net::Frame::Layer::ICMPv6::NeighborSolicitation; my $solicit = Net::Frame::Layer::ICMPv6::NeighborSolicitation->new( targetAddress => $targetIpv6Address, ); $icmp->type(NF_ICMPv6_TYPE_NEIGHBORSOLICITATION); my $nsReq = Net::Frame::Simple->new(layers => [ $icmp, $solicit ]); print $nsReq->print."\n"; # # Read a raw layer # my $layer = Net::Frame::Layer::ICMPv6->new(raw => $raw); print $layer->print."\n"; print 'PAYLOAD: '.unpack('H*', $layer->payload)."\n" if $layer->payload; =head1 DESCRIPTION This modules implements the encoding and decoding of the ICMPv6 layer. RFC: http://www.rfc-editor.org/rfc/rfc4861.txt RFC: http://www.rfc-editor.org/rfc/rfc4389.txt RFC: http://www.rfc-editor.org/rfc/rfc4191.txt RFC: http://www.rfc-editor.org/rfc/rfc3775.txt RFC: http://www.rfc-editor.org/rfc/rfc2463.txt RFC: http://www.rfc-editor.org/rfc/rfc2461.txt RFC: http://www.rfc-editor.org/rfc/rfc2460.txt See also B for other attributes and methods. =head1 ATTRIBUTES =over 4 =item B =item B Type and code fields. See B. =item B The checksum of ICMPv6 header. =back The following are inherited attributes. See B for more information. =over 4 =item B =item B =item B =back =head1 METHODS =over 4 =item B =item B (hash) Object constructor. You can pass attributes that will overwrite default ones. See B for default values. =item B Computes the ICMPv6 checksum. =item B =item B These two methods are basically used to increase the speed when using B method from B. Usually, you write them when you need to write B method. =item B (Net::Frame::Layer::ICMPv6 object) This method is mostly used internally. You pass a B layer as a parameter, and it returns true if this is a response corresponding for the request, or returns false if not. =back The following are inherited methods. Some of them may be overridden in this layer, and some others may not be meaningful in this layer. See B for more information. =over 4 =item B =item B =item B =item B =item B =item B =item B =item B =item B =item B =back =head1 CONSTANTS Load them: use Net::Frame::Layer::ICMPv6 qw(:consts); Various types and codes for ICMPv6 header. =over 4 =item B =item B =item B =item B =item B =item B =item B =item B =item B =item B =item B =item B =item B =item B =item B =item B =item B =item B =item B =item B =item B =item B =item B =item B =item B =item B =item B =item B =item B =item B =item B =item B =back Various flags for some ICMPv6 messages. =over 4 =item B =item B =item B =item B =item B =item B =item B =item B =item B =item B =item B =back =head1 SEE ALSO L =head1 AUTHOR Patrice EGomoRE Auffret =head1 COPYRIGHT AND LICENSE Copyright (c) 2006-2019, Patrice EGomoRE Auffret You may distribute this module under the terms of the Artistic license. See LICENSE.Artistic file in the source distribution archive. =cut Net-Frame-Layer-ICMPv6-1.11/lib/Net/Frame/Layer/ICMPv6/0000755000175000017500000000000013471432376020736 5ustar gomorgomorNet-Frame-Layer-ICMPv6-1.11/lib/Net/Frame/Layer/ICMPv6/Option.pm0000644000175000017500000000661613471432361022547 0ustar gomorgomor# # $Id: Option.pm,v bc01789674fd 2019/05/23 05:51:45 gomor $ # package Net::Frame::Layer::ICMPv6::Option; use strict; use warnings; use Net::Frame::Layer qw(:consts :subs); our @ISA = qw(Net::Frame::Layer); our @AS = qw( type length value ); __PACKAGE__->cgBuildIndices; __PACKAGE__->cgBuildAccessorsScalar(\@AS); use Net::Frame::Layer::ICMPv6 qw(:consts); sub new { shift->SUPER::new( type => 0, length => 0, value => '', @_, ); } sub getLength { my $self = shift; return length($self->value) + 2; } sub pack { my $self = shift; $self->raw($self->SUPER::pack('CCa*', $self->type, $self->length, $self->value, )) or return; return $self->raw; } sub unpack { my $self = shift; my ($type, $length, $tail) = $self->SUPER::unpack('CC a*', $self->raw) or return; $self->type($type); $self->length($length); # Dirty hack. Some systems does not set the length correctly if ($type == NF_ICMPv6_OPTION_TARGETLINKLAYERADDRESS || $type == NF_ICMPv6_OPTION_SOURCELINKLAYERADDRESS) { $length = 6; } my ($value, $payload) = $self->SUPER::unpack("a$length a*", $tail) or return; $self->value($value); $self->payload($payload); return $self; } sub print { my $self = shift; my $l = $self->layer; sprintf "$l: type:%02x length:%02x value:%s", $self->type, $self->length, CORE::unpack('H*', $self->value); } 1; __END__ =head1 NAME Net::Frame::Layer::ICMPv6::Option - ICMPv6 Option object =head1 SYNOPSIS use Net::Frame::Layer::ICMPv6::Option; my $layer = Net::Frame::Layer::ICMPv6::Option->new( type => 0, length => 0, value => '', ); $layer->pack; print 'RAW: '.$layer->dump."\n"; # Read a raw layer my $layer = Net::Frame::Layer::ICMPv6::Option->new( raw => $raw, ); print $layer->print."\n"; print 'PAYLOAD: '.unpack('H*', $layer->payload)."\n" if $layer->payload; =head1 DESCRIPTION This modules implements the encoding and decoding of ICMPv6 Options. See also B for other attributes and methods. =head1 ATTRIBUTES =over 4 =item B The type of ICMPv6 option. =item B The length of ICMPv6 option (a number of bytes), including B and B fields. =item B The value. =back The following are inherited attributes. See B for more information. =over 4 =item B =item B =item B =back =head1 METHODS =over 4 =item B =item B (hash) Object constructor. You can pass attributes that will overwrite default ones. See B for default values. =back The following are inherited methods. Some of them may be overridden in this layer, and some others may not be meaningful in this layer. See B for more information. =over 4 =item B =item B =item B =item B =item B =item B =item B =item B =item B =item B =back =head1 CONSTANTS No constants here. =head1 SEE ALSO L, L =head1 AUTHOR Patrice EGomoRE Auffret =head1 COPYRIGHT AND LICENSE Copyright (c) 2006-2019, Patrice EGomoRE Auffret You may distribute this module under the terms of the Artistic license. See LICENSE.Artistic file in the source distribution archive. =cut Net-Frame-Layer-ICMPv6-1.11/lib/Net/Frame/Layer/ICMPv6/DestUnreach.pm0000644000175000017500000000623013471432361023474 0ustar gomorgomor# # Contributed by Vince http://www.vinsworld.com/ # # $Id: DestUnreach.pm,v bc01789674fd 2019/05/23 05:51:45 gomor $ # package Net::Frame::Layer::ICMPv6::DestUnreach; use strict; use warnings; use Net::Frame::Layer qw(:consts); our @ISA = qw(Net::Frame::Layer); our @AS = qw( unused ); __PACKAGE__->cgBuildIndices; __PACKAGE__->cgBuildAccessorsScalar(\@AS); sub new { my $self = shift->SUPER::new( unused => 0, @_, ); return $self; } sub getLength { 4 } sub pack { my $self = shift; $self->raw($self->SUPER::pack('N', $self->unused)) or return; return $self->raw; } sub unpack { my $self = shift; my ($unused, $payload) = $self->SUPER::unpack('N a*', $self->raw) or return undef; $self->unused($unused); $self->payload($payload); return $self; } sub encapsulate { my $self = shift; return $self->nextLayer if $self->nextLayer; if ($self->payload) { my $pLen = length($self->payload); if ($pLen < 40) { $self->payload($self->payload.("\x00" x (40 - $pLen))); } elsif ($pLen > 1240) { $self->payload(substr $self->payload, 0, 1240); } return 'IPv6'; } return NF_LAYER_NONE; } sub print { my $self = shift; my $l = $self->layer; return sprintf "$l: unused:%d", $self->unused; } 1; __END__ =head1 NAME Net::Frame::Layer::ICMPv6::DestUnreach - ICMPv6 DestUnreach type object =head1 SYNOPSIS use Net::Frame::Layer::ICMPv6::DestUnreach; my $layer = Net::Frame::Layer::ICMPv6::DestUnreach->new( unused => 0, payload => '', ); $layer->pack; print 'RAW: '.$layer->dump."\n"; # Read a raw layer my $layer = Net::Frame::Layer::ICMPv6::DestUnreach->new(raw => $raw); print $layer->print."\n"; print 'PAYLOAD: '.unpack('H*', $layer->payload)."\n" if $layer->payload; =head1 DESCRIPTION This modules implements the encoding and decoding of the ICMPv6 DestUnreach object. See also B for other attributes and methods. =head1 ATTRIBUTES =over 4 =item B Zero value field. =back The following are inherited attributes. See B for more information. =over 4 =item B =item B =item B =back =head1 METHODS =over 4 =item B =item B (hash) Object constructor. You can pass attributes that will overwrite default ones. See B for default values. =back The following are inherited methods. Some of them may be overridden in this layer, and some others may not be meaningful in this layer. See B for more information. =over 4 =item B =item B =item B =item B =item B =item B =item B =item B =item B =item B =back =head1 CONSTANTS No constants here. =head1 SEE ALSO L, L =head1 AUTHOR Patrice EGomoRE Auffret =head1 COPYRIGHT AND LICENSE Copyright (c) 2006-2019, Patrice EGomoRE Auffret You may distribute this module under the terms of the Artistic license. See LICENSE.Artistic file in the source distribution archive. =cut Net-Frame-Layer-ICMPv6-1.11/lib/Net/Frame/Layer/ICMPv6/TooBig.pm0000644000175000017500000000616313471432361022457 0ustar gomorgomor# # Contributed by Vince http://www.vinsworld.com/ # # $Id: TooBig.pm,v bc01789674fd 2019/05/23 05:51:45 gomor $ # package Net::Frame::Layer::ICMPv6::TooBig; use strict; use warnings; use Net::Frame::Layer qw(:consts); our @ISA = qw(Net::Frame::Layer); our @AS = qw( mtu ); __PACKAGE__->cgBuildIndices; __PACKAGE__->cgBuildAccessorsScalar(\@AS); sub new { my $self = shift->SUPER::new( mtu => 0, @_, ); return $self; } sub getLength { 4 } sub pack { my $self = shift; $self->raw($self->SUPER::pack('N', $self->mtu)) or return; return $self->raw; } sub unpack { my $self = shift; my ($mtu, $payload) = $self->SUPER::unpack('N a*', $self->raw) or return undef; $self->mtu($mtu); $self->payload($payload); return $self; } sub encapsulate { my $self = shift; return $self->nextLayer if $self->nextLayer; if ($self->payload) { my $pLen = length($self->payload); if ($pLen < 40) { $self->payload($self->payload.("\x00" x (40 - $pLen))); } elsif ($pLen > 1240) { $self->payload(substr $self->payload, 0, 1240); } return 'IPv6'; } return NF_LAYER_NONE; } sub print { my $self = shift; my $l = $self->layer; return sprintf "$l: mtu:%d", $self->mtu; } 1; __END__ =head1 NAME Net::Frame::Layer::ICMPv6::TooBig - ICMPv6 TooBig type object =head1 SYNOPSIS use Net::Frame::Layer::ICMPv6::TooBig; my $layer = Net::Frame::Layer::ICMPv6::TooBig->new( mtu => 0, payload => '', ); $layer->pack; print 'RAW: '.$layer->dump."\n"; # Read a raw layer my $layer = Net::Frame::Layer::ICMPv6::TooBig->new(raw => $raw); print $layer->print."\n"; print 'PAYLOAD: '.unpack('H*', $layer->payload)."\n" if $layer->payload; =head1 DESCRIPTION This modules implements the encoding and decoding of the ICMPv6 TooBig object. See also B for other attributes and methods. =head1 ATTRIBUTES =over 4 =item B Maximum Transmission Unit of the next-hop link. =back The following are inherited attributes. See B for more information. =over 4 =item B =item B =item B =back =head1 METHODS =over 4 =item B =item B (hash) Object constructor. You can pass attributes that will overwrite default ones. See B for default values. =back The following are inherited methods. Some of them may be overridden in this layer, and some others may not be meaningful in this layer. See B for more information. =over 4 =item B =item B =item B =item B =item B =item B =item B =item B =item B =item B =back =head1 CONSTANTS No constants here. =head1 SEE ALSO L, L =head1 AUTHOR Patrice EGomoRE Auffret =head1 COPYRIGHT AND LICENSE Copyright (c) 2006-2019, Patrice EGomoRE Auffret You may distribute this module under the terms of the Artistic license. See LICENSE.Artistic file in the source distribution archive. =cut Net-Frame-Layer-ICMPv6-1.11/lib/Net/Frame/Layer/ICMPv6/RouterAdvertisement.pm0000644000175000017500000001241113471432361025300 0ustar gomorgomor# # Router Advertisement message wrapper # pvenegas@infoweapons.com # # # $Id: RouterAdvertisement.pm,v bc01789674fd 2019/05/23 05:51:45 gomor $ # package Net::Frame::Layer::ICMPv6::RouterAdvertisement; use strict; use warnings; use Net::Frame::Layer qw(:consts :subs); our @ISA = qw(Net::Frame::Layer); our @AS = qw( curHopLimit flags reserved routerLifetime reachableTime retransTimer ); our @AA = qw( options ); __PACKAGE__->cgBuildIndices; __PACKAGE__->cgBuildAccessorsScalar(\@AS); __PACKAGE__->cgBuildAccessorsArray (\@AA); use Net::Frame::Layer::ICMPv6 qw(:consts); use Bit::Vector; use Net::Frame::Layer::ICMPv6::Option; # TODO: Double-check if defaults are sane sub new { shift->SUPER::new( curHopLimit => 0, flags => 0, reserved => 0, routerLifetime => 0, reachableTime => 0, retransTimer => 0, options => [], @_, ); } sub getOptionsLength { my $self = shift; my $len = 0; $len += $_->getLength for $self->options; return $len; } sub getLength { my $self = shift; return 12 + $self->getOptionsLength; } sub pack { my $self = shift; my $flags = Bit::Vector->new_Dec(6, $self->flags); my $reserved = Bit::Vector->new_Dec(2, $self->reserved); my $v8 = $flags->Concat_List($reserved); my $raw = $self->SUPER::pack("CcnLL", $self->curHopLimit, $v8->to_Dec, $self->routerLifetime, $self->reachableTime, $self->retransTimer ) or return; for ($self->options) { $raw .= $_->pack; } $self->raw($raw); } sub _unpackOptions { my $self = shift; my ($payload) = @_; my @options = (); while (defined($payload) && length($payload)) { my $opt = Net::Frame::Layer::ICMPv6::Option->new(raw => $payload)->unpack; push @options, $opt; $payload = $opt->payload; $opt->payload(undef); } $self->options(\@options); return $payload; } sub unpack { my $self = shift; my ($curHopLimit, $flagsReserved, $routerLifetime, $reachableTime, $retransTimer, $payload) = $self->SUPER::unpack("CcnLL a*", $self->raw); my $v8 = Bit::Vector->new_Dec(8, $flagsReserved); $self->curHopLimit($curHopLimit); $self->reserved($v8->Chunk_Read(2, 0)); $self->flags ($v8->Chunk_Read(6, 2)); $self->routerLifetime($routerLifetime); $self->reachableTime($reachableTime); $self->retransTimer($retransTimer); if (defined($payload) && length($payload)) { $payload = $self->_unpackOptions($payload); } $self->payload($payload); return $self; } sub print { my $self = shift; my $l = $self->layer; my $buf = sprintf "$l: curHopLimit: %d flags: 0x%02x reserved: 0x%02x\n" . "$l: routerLifetime: %d reachableTime: %d retransTimer: %d", $self->curHopLimit, $self->flags, $self->reserved, $self->routerLifetime, $self->reachableTime, $self->retransTimer; for ($self->options) { $buf .= "\n" . $_->print; } return $buf; } 1; __END__ =head1 NAME Net::Frame::Layer::ICMPv6::RouterAdvertisement - ICMPv6 Router Advertisement type object =head1 SYNOPSIS use Net::Frame::Layer::ICMPv6::RouterAdvertisement; my $layer = Net::Frame::Layer::ICMPv6::RouterAdvertisement->new( curHopLimit => 64, flags => NF_ICMPv6_FLAG_MANAGEDADDRESSCONFIGURATION, ); $layer->pack; print 'RAW: '.$layer->dump."\n"; # Read a raw layer my $layer = Net::Frame::Layer::ICMPv6::RouterAdvertisement->new( raw => $raw, ); print $layer->print."\n"; print 'PAYLOAD: '.unpack('H*', $layer->payload)."\n" if $layer->payload; =head1 DESCRIPTION This modules implements the encoding and decoding of the ICMPv6 Router Advertisement object. See also B for other attributes and methods. =head1 ATTRIBUTES Refer to RFC 5175 for information on these attributes =over 4 =item B =item B =item B =item B =item B =item B =item B =back The following are inherited attributes. See B for more information. =over 4 =item B =item B =item B =back =head1 METHODS =over 4 =item B =item B (hash) Object constructor. You can pass attributes that will overwrite default ones. See B for default values. =item B Returns the length in bytes of options, 0 if none. =back The following are inherited methods. Some of them may be overridden in this layer, and some others may not be meaningful in this layer. See B for more information. =over 4 =item B =item B =item B =item B =item B =item B =item B =item B =item B =item B =back =head1 CONSTANTS No constants here. =head1 SEE ALSO L, L =head1 AUTHOR Patrice EGomoRE Auffret Paolo Vanni Venegas =head1 COPYRIGHT AND LICENSE Copyright (c) 2006-2019, Patrice EGomoRE Auffret Copyright (c) 2009-2019, Paolo Vanni Venegas You may distribute this module under the terms of the Artistic license. See LICENSE.Artistic file in the source distribution archive. =cut Net-Frame-Layer-ICMPv6-1.11/lib/Net/Frame/Layer/ICMPv6/TimeExceed.pm0000644000175000017500000000621113471432361023302 0ustar gomorgomor# # Contributed by Vince http://www.vinsworld.com/ # # $Id: TimeExceed.pm,v bc01789674fd 2019/05/23 05:51:45 gomor $ # package Net::Frame::Layer::ICMPv6::TimeExceed; use strict; use warnings; use Net::Frame::Layer qw(:consts); our @ISA = qw(Net::Frame::Layer); our @AS = qw( unused ); __PACKAGE__->cgBuildIndices; __PACKAGE__->cgBuildAccessorsScalar(\@AS); sub new { my $self = shift->SUPER::new( unused => 0, @_, ); return $self; } sub getLength { 4 } sub pack { my $self = shift; $self->raw($self->SUPER::pack('N', $self->unused)) or return; return $self->raw; } sub unpack { my $self = shift; my ($unused, $payload) = $self->SUPER::unpack('N a*', $self->raw) or return; $self->unused($unused); $self->payload($payload); return $self; } sub encapsulate { my $self = shift; return $self->nextLayer if $self->nextLayer; if ($self->payload) { my $pLen = length($self->payload); if ($pLen < 40) { $self->payload($self->payload.("\x00" x (40 - $pLen))); } elsif ($pLen > 1240) { $self->payload(substr $self->payload, 0, 1240); } return 'IPv6'; } return NF_LAYER_NONE; } sub print { my $self = shift; my $l = $self->layer; return sprintf "$l: unused:%d", $self->unused; } 1; __END__ =head1 NAME Net::Frame::Layer::ICMPv6::TimeExceed - ICMPv6 TimeExceed type object =head1 SYNOPSIS use Net::Frame::Layer::ICMPv6::TimeExceed; my $layer = Net::Frame::Layer::ICMPv6::TimeExceed->new( unused => 0, payload => '', ); $layer->pack; print 'RAW: '.$layer->dump."\n"; # Read a raw layer my $layer = Net::Frame::Layer::ICMPv6::TimeExceed->new(raw => $raw); print $layer->print."\n"; print 'PAYLOAD: '.unpack('H*', $layer->payload)."\n" if $layer->payload; =head1 DESCRIPTION This modules implements the encoding and decoding of the ICMPv6 TimeExceed object. See also B for other attributes and methods. =head1 ATTRIBUTES =over 4 =item B Zero value field. =back The following are inherited attributes. See B for more information. =over 4 =item B =item B =item B =back =head1 METHODS =over 4 =item B =item B (hash) Object constructor. You can pass attributes that will overwrite default ones. See B for default values. =back The following are inherited methods. Some of them may be overridden in this layer, and some others may not be meaningful in this layer. See B for more information. =over 4 =item B =item B =item B =item B =item B =item B =item B =item B =item B =item B =back =head1 CONSTANTS No constants here. =head1 SEE ALSO L, L =head1 AUTHOR Patrice EGomoRE Auffret =head1 COPYRIGHT AND LICENSE Copyright (c) 2006-2019, Patrice EGomoRE Auffret You may distribute this module under the terms of the Artistic license. See LICENSE.Artistic file in the source distribution archive. =cut Net-Frame-Layer-ICMPv6-1.11/lib/Net/Frame/Layer/ICMPv6/RouterSolicitation.pm0000644000175000017500000001006513471432361025132 0ustar gomorgomor# # Router Solicitation message wrapper, compliant to RFC 4861 # pvenegas@infoweapons.com # # # $Id: RouterSolicitation.pm,v bc01789674fd 2019/05/23 05:51:45 gomor $ # package Net::Frame::Layer::ICMPv6::RouterSolicitation; use strict; use warnings; use Net::Frame::Layer qw(:consts :subs); our @ISA = qw(Net::Frame::Layer); our @AS = qw( reserved ); our @AA = qw( options ); __PACKAGE__->cgBuildIndices; __PACKAGE__->cgBuildAccessorsScalar(\@AS); __PACKAGE__->cgBuildAccessorsArray (\@AA); use Net::Frame::Layer::ICMPv6 qw(:consts); use Bit::Vector; use Net::Frame::Layer::ICMPv6::Option; sub new { shift->SUPER::new( reserved => 0, options => [], @_, ); } sub getOptionsLength { my $self = shift; my $len = 0; $len += $_->getLength for $self->options; return $len; } sub getLength { my $self = shift; return 4 + $self->getOptionsLength; } sub pack { my $self = shift; my $raw = $self->SUPER::pack('L', $self->reserved) or return; for ($self->options) { $raw .= $_->pack; } return $self->raw($raw); } sub _unpackOptions { my $self = shift; my ($payload) = @_; my @options = (); while (defined($payload) && length($payload)) { my $opt = Net::Frame::Layer::ICMPv6::Option->new(raw => $payload)->unpack; push @options, $opt; $payload = $opt->payload; $opt->payload(undef); } $self->options(\@options); return $payload; } sub unpack { my $self = shift; my ($reserved, $payload) = $self->SUPER::unpack('L a*', $self->raw) or return; $self->reserved($reserved); $self->payload($payload); if (defined($payload) && length($payload)) { $payload = $self->_unpackOptions($payload); } $self->payload($payload); return $self; } sub print { my $self = shift; my $l = $self->layer; my $buf = sprintf "$l: reserved: 0x%02x", $self->reserved; for ($self->options) { $buf .= "\n" . $_->print; } return $buf; } 1; __END__ =head1 NAME Net::Frame::Layer::ICMPv6::RouterSolicitation - ICMPv6 Router Solicitation type object =head1 SYNOPSIS use Net::Frame::Layer::ICMPv6::RouterSolicitation; my $layer = Net::Frame::Layer::ICMPv6::RouterSolicitation->new( reserved => 0, ); $layer->pack; print 'RAW: '.$layer->dump."\n"; # Read a raw layer my $layer = Net::Frame::Layer::ICMPv6::RouterSolicitation->new( raw => $raw, ); print $layer->print."\n"; print 'PAYLOAD: '.unpack('H*', $layer->payload)."\n" if $layer->payload; =head1 DESCRIPTION This modules implements the encoding and decoding of the ICMPv6 Router Solicitation object. See also B for other attributes and methods. =head1 ATTRIBUTES Refer to RFC 4861 for information on these attributes =over 4 =item B =item B =back The following are inherited attributes. See B for more information. =over 4 =item B =item B =item B =back =head1 METHODS =over 4 =item B =item B (hash) Object constructor. You can pass attributes that will overwrite default ones. See B for default values. =item B Returns the length in bytes of options, 0 if none. =back The following are inherited methods. Some of them may be overridden in this layer, and some others may not be meaningful in this layer. See B for more information. =over 4 =item B =item B =item B =item B =item B =item B =item B =item B =item B =item B =back =head1 CONSTANTS No constants here. =head1 SEE ALSO L, L =head1 AUTHOR Patrice EGomoRE Auffret Paolo Vanni Venegas =head1 COPYRIGHT AND LICENSE Copyright (c) 2006-2019, Patrice EGomoRE Auffret Copyright (c) 2009-2019, Paolo Vanni Venegas You may distribute this module under the terms of the Artistic license. See LICENSE.Artistic file in the source distribution archive. =cut Net-Frame-Layer-ICMPv6-1.11/lib/Net/Frame/Layer/ICMPv6/NeighborSolicitation.pm0000644000175000017500000001024213471432361025404 0ustar gomorgomor# # $Id: NeighborSolicitation.pm,v bc01789674fd 2019/05/23 05:51:45 gomor $ # package Net::Frame::Layer::ICMPv6::NeighborSolicitation; use strict; use warnings; use Net::Frame::Layer qw(:consts :subs); our @ISA = qw(Net::Frame::Layer); our @AS = qw( reserved targetAddress ); our @AA = qw( options ); __PACKAGE__->cgBuildIndices; __PACKAGE__->cgBuildAccessorsScalar(\@AS); __PACKAGE__->cgBuildAccessorsArray (\@AA); use Net::Frame::Layer::ICMPv6::Option; sub new { shift->SUPER::new( reserved => 0, targetAddress => '::1', options => [], @_, ); } sub getOptionsLength { my $self = shift; my $len = 0; $len += $_->getLength for $self->options; return $len; } sub getLength { my $self = shift; return 20 + $self->getOptionsLength; } sub pack { my $self = shift; my $raw = $self->SUPER::pack('Na16', $self->reserved, inet6Aton($self->targetAddress), ) or return; for ($self->options) { $raw .= $_->pack; } return $self->raw($raw); } sub _unpackOptions { my $self = shift; my ($payload) = @_; my @options = (); while (defined($payload) && length($payload)) { my $opt = Net::Frame::Layer::ICMPv6::Option->new(raw => $payload)->unpack; push @options, $opt; $payload = $opt->payload; $opt->payload(undef); } $self->options(\@options); return $payload; } sub unpack { my $self = shift; my ($reserved, $targetAddress, $payload) = $self->SUPER::unpack('Na16 a*', $self->raw) or return; $self->reserved($reserved); $self->targetAddress(inet6Ntoa($targetAddress)); if (defined($payload) && length($payload)) { $payload = $self->_unpackOptions($payload); } $self->payload($payload); return $self; } sub print { my $self = shift; my $l = $self->layer; my $buf = sprintf "$l: reserved:%d\n". "$l: targetAddress:%s", $self->reserved, $self->targetAddress; for ($self->options) { $buf .= "\n".$_->print; } return $buf; } 1; __END__ =head1 NAME Net::Frame::Layer::ICMPv6::NeighborSolicitation - ICMPv6 Neighbor Solicitation type object =head1 SYNOPSIS use Net::Frame::Layer::ICMPv6::NeighborSolicitation; my $layer = Net::Frame::Layer::ICMPv6::NeighborSolicitation->new( reserved => 0, targetAddress => '::1', ); $layer->pack; print 'RAW: '.$layer->dump."\n"; # Read a raw layer my $layer = Net::Frame::Layer::ICMPv6::NeighborSolicitation->new( raw => $raw, ); print $layer->print."\n"; print 'PAYLOAD: '.unpack('H*', $layer->payload)."\n" if $layer->payload; =head1 DESCRIPTION This modules implements the encoding and decoding of the ICMPv6 Neighbor Solicitation object. See also B for other attributes and methods. =head1 ATTRIBUTES =over 4 =item B Should be zeroed. =item B An IPv6 address. =item B An arrayref of B objects. =back The following are inherited attributes. See B for more information. =over 4 =item B =item B =item B =back =head1 METHODS =over 4 =item B =item B (hash) Object constructor. You can pass attributes that will overwrite default ones. See B for default values. =item B Returns the length in bytes of options, 0 if none. =back The following are inherited methods. Some of them may be overridden in this layer, and some others may not be meaningful in this layer. See B for more information. =over 4 =item B =item B =item B =item B =item B =item B =item B =item B =item B =item B =back =head1 CONSTANTS No constants here. =head1 SEE ALSO L, L =head1 AUTHOR Patrice EGomoRE Auffret =head1 COPYRIGHT AND LICENSE Copyright (c) 2006-2019, Patrice EGomoRE Auffret You may distribute this module under the terms of the Artistic license. See LICENSE.Artistic file in the source distribution archive. =cut Net-Frame-Layer-ICMPv6-1.11/lib/Net/Frame/Layer/ICMPv6/Echo.pm0000644000175000017500000000601213471432361022143 0ustar gomorgomor# # $Id: Echo.pm,v bc01789674fd 2019/05/23 05:51:45 gomor $ # package Net::Frame::Layer::ICMPv6::Echo; use strict; use warnings; use Net::Frame::Layer qw(:consts :subs); our @ISA = qw(Net::Frame::Layer); our @AS = qw( identifier sequenceNumber ); __PACKAGE__->cgBuildIndices; __PACKAGE__->cgBuildAccessorsScalar(\@AS); sub new { shift->SUPER::new( identifier => getRandom16bitsInt(), sequenceNumber => getRandom16bitsInt(), @_, ); } sub getLength { 4 } sub pack { my $self = shift; $self->raw($self->SUPER::pack('nn', $self->identifier, $self->sequenceNumber, )) or return; return $self->raw; } sub unpack { my $self = shift; my ($identifier, $sequenceNumber, $payload) = $self->SUPER::unpack('nn a*', $self->raw) or return; $self->identifier($identifier); $self->sequenceNumber($sequenceNumber); $self->payload($payload); return $self; } sub print { my $self = shift; my $l = $self->layer; sprintf "$l: identifier:%d sequenceNumber:%d", $self->identifier, $self->sequenceNumber; } 1; __END__ =head1 NAME Net::Frame::Layer::ICMPv6::Echo - ICMPv6 Echo type object =head1 SYNOPSIS use Net::Frame::Layer::ICMPv6::Echo; my $layer = Net::Frame::Layer::ICMPv6::Echo->new( identifier => getRandom16bitsInt(), sequenceNumber => getRandom16bitsInt(), payload => '', ); $layer->pack; print 'RAW: '.$layer->dump."\n"; # Read a raw layer my $layer = Net::Frame::Layer::ICMPv6::Echo->new(raw => $raw); print $layer->print."\n"; print 'PAYLOAD: '.unpack('H*', $layer->payload)."\n" if $layer->payload; =head1 DESCRIPTION This modules implements the encoding and decoding of the ICMPv6 Echo object. See also B for other attributes and methods. =head1 ATTRIBUTES =over 4 =item B Identification number. =item B Sequence number. =back The following are inherited attributes. See B for more information. =over 4 =item B =item B =item B =back =head1 METHODS =over 4 =item B =item B (hash) Object constructor. You can pass attributes that will overwrite default ones. See B for default values. =back The following are inherited methods. Some of them may be overridden in this layer, and some others may not be meaningful in this layer. See B for more information. =over 4 =item B =item B =item B =item B =item B =item B =item B =item B =item B =item B =back =head1 CONSTANTS No constants here. =head1 SEE ALSO L, L =head1 AUTHOR Patrice EGomoRE Auffret =head1 COPYRIGHT AND LICENSE Copyright (c) 2006-2019, Patrice EGomoRE Auffret You may distribute this module under the terms of the Artistic license. See LICENSE.Artistic file in the source distribution archive. =cut Net-Frame-Layer-ICMPv6-1.11/lib/Net/Frame/Layer/ICMPv6/NeighborAdvertisement.pm0000644000175000017500000001137413471432361025564 0ustar gomorgomor# # $Id: NeighborAdvertisement.pm,v bc01789674fd 2019/05/23 05:51:45 gomor $ # package Net::Frame::Layer::ICMPv6::NeighborAdvertisement; use strict; use warnings; use Net::Frame::Layer qw(:consts :subs); our @ISA = qw(Net::Frame::Layer); our @AS = qw( flags reserved targetAddress ); our @AA = qw( options ); __PACKAGE__->cgBuildIndices; __PACKAGE__->cgBuildAccessorsScalar(\@AS); __PACKAGE__->cgBuildAccessorsArray (\@AA); use Net::Frame::Layer::ICMPv6 qw(:consts); use Bit::Vector; use Net::Frame::Layer::ICMPv6::Option; sub new { shift->SUPER::new( flags => NF_ICMPv6_FLAG_SOLICITED, reserved => 0, targetAddress => '::1', options => [], @_, ); } sub getOptionsLength { my $self = shift; my $len = 0; $len += $_->getLength for $self->options; return $len; } sub getLength { my $self = shift; return 20 + $self->getOptionsLength; } sub pack { my $self = shift; my $flags = Bit::Vector->new_Dec( 3, $self->flags); my $reserved = Bit::Vector->new_Dec(29, $self->reserved); my $v32 = $flags->Concat_List($reserved); my $raw = $self->SUPER::pack('Na16', $v32->to_Dec, inet6Aton($self->targetAddress), ) or return; for ($self->options) { $raw .= $_->pack; } return $self->raw($raw); } sub _unpackOptions { my $self = shift; my ($payload) = @_; my @options = (); while (defined($payload) && length($payload)) { my $opt = Net::Frame::Layer::ICMPv6::Option->new(raw => $payload)->unpack; push @options, $opt; $payload = $opt->payload; $opt->payload(undef); } $self->options(\@options); return $payload; } sub unpack { my $self = shift; my ($flagsReserved, $targetAddress, $payload) = $self->SUPER::unpack('Na16 a*', $self->raw) or return undef; my $v32 = Bit::Vector->new_Dec(32, $flagsReserved); $self->reserved($v32->Chunk_Read(29, 0)); $self->flags ($v32->Chunk_Read( 3, 29)); $self->targetAddress(inet6Ntoa($targetAddress)); if (defined($payload) && length($payload)) { $payload = $self->_unpackOptions($payload); } $self->payload($payload); return $self; } sub print { my $self = shift; my $l = $self->layer; my $buf = sprintf "$l: flags:%02x reserved:%d\n". "$l: targetAddress:%s", $self->flags, $self->reserved, $self->targetAddress; for ($self->options) { $buf .= "\n".$_->print; } return $buf; } 1; __END__ =head1 NAME Net::Frame::Layer::ICMPv6::NeighborAdvertisement - ICMPv6 Neighbor Advertisement type object =head1 SYNOPSIS use Net::Frame::Layer::ICMPv6::NeighborAdvertisement; my $layer = Net::Frame::Layer::ICMPv6::NeighborAdvertisement->new( flags => NF_ICMPv6_FLAG_SOLICITED, reserved => 0, targetAddress => '::1', ); $layer->pack; print 'RAW: '.$layer->dump."\n"; # Read a raw layer my $layer = Net::Frame::Layer::ICMPv6::NeighborAdvertisement->new( raw => $raw, ); print $layer->print."\n"; print 'PAYLOAD: '.unpack('H*', $layer->payload)."\n" if $layer->payload; =head1 DESCRIPTION This modules implements the encoding and decoding of the ICMPv6 Neighbor Advertisement object. See also B for other attributes and methods. =head1 ATTRIBUTES =over 4 =item B ICMPv6 Neighbor Advertisement flags. See B. =item B Should be zeroed. =item B The IPv6 address you want to lookup (for example). =item B An arrayref of B objects. =back The following are inherited attributes. See B for more information. =over 4 =item B =item B =item B =back =head1 METHODS =over 4 =item B =item B (hash) Object constructor. You can pass attributes that will overwrite default ones. See B for default values. =item B Returns the length in bytes of options, 0 if none. =back The following are inherited methods. Some of them may be overridden in this layer, and some others may not be meaningful in this layer. See B for more information. =over 4 =item B =item B =item B =item B =item B =item B =item B =item B =item B =item B =back =head1 CONSTANTS No constants here. =head1 SEE ALSO L, L =head1 AUTHOR Patrice EGomoRE Auffret =head1 COPYRIGHT AND LICENSE Copyright (c) 2006-2019, Patrice EGomoRE Auffret You may distribute this module under the terms of the Artistic license. See LICENSE.Artistic file in the source distribution archive. =cut Net-Frame-Layer-ICMPv6-1.11/lib/Net/Frame/Layer/ICMPv6/ParameterProblem.pm0000644000175000017500000000642013471432361024531 0ustar gomorgomor# # Contributed by Vince http://www.vinsworld.com/ # # $Id: ParameterProblem.pm,v bc01789674fd 2019/05/23 05:51:45 gomor $ # package Net::Frame::Layer::ICMPv6::ParameterProblem; use strict; use warnings; use Net::Frame::Layer qw(:consts); our @ISA = qw(Net::Frame::Layer); our @AS = qw( pointer ); __PACKAGE__->cgBuildIndices; __PACKAGE__->cgBuildAccessorsScalar(\@AS); sub new { my $self = shift->SUPER::new( pointer => 0, @_, ); return $self; } sub getLength { 4 } sub pack { my $self = shift; $self->raw($self->SUPER::pack('N', $self->pointer)) or return; return $self->raw; } sub unpack { my $self = shift; my ($pointer, $payload) = $self->SUPER::unpack('N a*', $self->raw) or return undef; $self->pointer($pointer); $self->payload($payload); return $self; } sub encapsulate { my $self = shift; return $self->nextLayer if $self->nextLayer; if ($self->payload) { my $pLen = length($self->payload); if ($pLen < 40) { $self->payload($self->payload.("\x00" x (40 - $pLen))); } elsif ($pLen > 1240) { $self->payload(substr $self->payload, 0, 1240); } return 'IPv6'; } return NF_LAYER_NONE; } sub print { my $self = shift; my $l = $self->layer; return sprintf "$l: pointer:0x%04x", $self->pointer; } 1; __END__ =head1 NAME Net::Frame::Layer::ICMPv6::ParameterProblem - ICMPv6 ParameterProblem type object =head1 SYNOPSIS use Net::Frame::Layer::ICMPv6::ParameterProblem; my $layer = Net::Frame::Layer::ICMPv6::ParameterProblem->new( pointer => 0, payload => '', ); $layer->pack; print 'RAW: '.$layer->dump."\n"; # Read a raw layer my $layer = Net::Frame::Layer::ICMPv6::ParameterProblem->new(raw => $raw); print $layer->print."\n"; print 'PAYLOAD: '.unpack('H*', $layer->payload)."\n" if $layer->payload; =head1 DESCRIPTION This modules implements the encoding and decoding of the ICMPv6 ParameterProblem object. See also B for other attributes and methods. =head1 ATTRIBUTES =over 4 =item B Identifies the octet offset within the invoking packet where the error was detected. =back The following are inherited attributes. See B for more information. =over 4 =item B =item B =item B =back =head1 METHODS =over 4 =item B =item B (hash) Object constructor. You can pass attributes that will overwrite default ones. See B for default values. =back The following are inherited methods. Some of them may be overridden in this layer, and some others may not be meaningful in this layer. See B for more information. =over 4 =item B =item B =item B =item B =item B =item B =item B =item B =item B =item B =back =head1 CONSTANTS No constants here. =head1 SEE ALSO L, L =head1 AUTHOR Patrice EGomoRE Auffret =head1 COPYRIGHT AND LICENSE Copyright (c) 2006-2019, Patrice EGomoRE Auffret You may distribute this module under the terms of the Artistic license. See LICENSE.Artistic file in the source distribution archive. =cut Net-Frame-Layer-ICMPv6-1.11/t/0000755000175000017500000000000013471432376014573 5ustar gomorgomorNet-Frame-Layer-ICMPv6-1.11/t/03-test-pod.t0000644000175000017500000000023113165346631016731 0ustar gomorgomoreval "use Test::Pod 1.00"; if ($@) { use Test; plan(tests => 1); skip("Test::Pod 1.00 required for testing"); } else { all_pod_files_ok(); } Net-Frame-Layer-ICMPv6-1.11/t/01-use.t0000644000175000017500000000110513165346631015765 0ustar gomorgomoruse Test; BEGIN { plan(tests => 1) } use Net::Frame::Layer::ICMPv6 qw(:consts); use Net::Frame::Layer::ICMPv6::Echo; use Net::Frame::Layer::ICMPv6::NeighborAdvertisement; use Net::Frame::Layer::ICMPv6::NeighborSolicitation; use Net::Frame::Layer::ICMPv6::RouterAdvertisement; use Net::Frame::Layer::ICMPv6::RouterSolicitation; use Net::Frame::Layer::ICMPv6::Option; use Net::Frame::Layer::ICMPv6::TooBig; use Net::Frame::Layer::ICMPv6::ParameterProblem; use Net::Frame::Layer::ICMPv6::DestUnreach; use Net::Frame::Layer::ICMPv6::TimeExceed; use Net::Frame::Layer::ICMPv6; ok(1); Net-Frame-Layer-ICMPv6-1.11/t/04-layer-create.t0000644000175000017500000000210313165346631017550 0ustar gomorgomoruse Test; BEGIN { plan(tests => 1) } use Net::Frame::Layer::ICMPv6 qw(:consts); use Net::Frame::Layer::ICMPv6::DestUnreach; use Net::Frame::Layer::ICMPv6::Echo; use Net::Frame::Layer::ICMPv6::NeighborAdvertisement; use Net::Frame::Layer::ICMPv6::NeighborSolicitation; use Net::Frame::Layer::ICMPv6::ParameterProblem; use Net::Frame::Layer::ICMPv6::RouterSolicitation; use Net::Frame::Layer::ICMPv6::RouterAdvertisement; use Net::Frame::Layer::ICMPv6::TimeExceed; use Net::Frame::Layer::ICMPv6::TooBig; use Net::Frame::Layer::ICMPv6::Option; for my $m (qw( Net::Frame::Layer::ICMPv6 Net::Frame::Layer::ICMPv6::DestUnreach Net::Frame::Layer::ICMPv6::Echo Net::Frame::Layer::ICMPv6::NeighborAdvertisement Net::Frame::Layer::ICMPv6::NeighborSolicitation Net::Frame::Layer::ICMPv6::ParameterProblem Net::Frame::Layer::ICMPv6::RouterSolicitation Net::Frame::Layer::ICMPv6::RouterAdvertisement Net::Frame::Layer::ICMPv6::TimeExceed Net::Frame::Layer::ICMPv6::TooBig Net::Frame::Layer::ICMPv6::Option )) { my $l = $m->new; $l->pack; $l->unpack; } ok(1); Net-Frame-Layer-ICMPv6-1.11/t/02-pod-coverage.t0000644000175000017500000000103113165346631017543 0ustar gomorgomoreval "use Test::Pod::Coverage tests => 6"; if ($@) { use Test; plan(tests => 1); skip("Test::Pod::Coverage required for testing"); } else { pod_coverage_ok("Net::Frame::Layer::ICMPv6"); pod_coverage_ok("Net::Frame::Layer::ICMPv6::Echo"); pod_coverage_ok("Net::Frame::Layer::ICMPv6::NeighborAdvertisement"); pod_coverage_ok("Net::Frame::Layer::ICMPv6::NeighborSolicitation"); pod_coverage_ok("Net::Frame::Layer::ICMPv6::RouterAdvertisement"); pod_coverage_ok("Net::Frame::Layer::ICMPv6::RouterSolicitation"); } Net-Frame-Layer-ICMPv6-1.11/examples/0000755000175000017500000000000013471432376016146 5ustar gomorgomorNet-Frame-Layer-ICMPv6-1.11/examples/lookup-mac.pl0000644000175000017500000000506213165346631020553 0ustar gomorgomor#!/usr/bin/perl use strict; use warnings; use Net::Frame::Layer qw(:subs); my $target = shift || die("Specify target IPv6 address\n"); my $dev = shift; if ($target) { $target = getHostIpv6Addr($target) || die("Unable to revolv hostname\n"); } use Net::Frame::Device; use Net::Frame::Simple; use Net::Frame::Layer::ETH qw(:consts); use Net::Frame::Layer::IPv6 qw(:consts); use Net::Frame::Layer::ICMPv6 qw(:consts); use Net::Frame::Layer::ICMPv6::NeighborSolicitation; my $oDevice; if ($dev) { $oDevice = Net::Frame::Device->new(target6 => $target, dev => $dev); } else { $oDevice = Net::Frame::Device->new(target6 => $target); } use Net::Frame::Dump::Online; my $oDump = Net::Frame::Dump::Online->new( dev => $oDevice->dev, filter => 'icmp6', ); $oDump->start; require Net::IPv6Addr; my $target6 = Net::IPv6Addr->new($target)->to_string_preferred; my @dst = split(':', $target6); my $str = $dst[-2]; $str =~ s/^.*(..)$/$1/; $target6 = 'ff02::1:ff'.$str.':'.$dst[-1]; #my $str2 = $dst[-1]; #$str2 =~ s/^(..)(..)$/$1:$2/; #my $mac6 = '33:33:ff:'.$str.':'.$str2; print $target6."\n"; #print $mac6."\n"; my $eth = Net::Frame::Layer::ETH->new( src => $oDevice->mac, #dst => $mac6, type => NF_ETH_TYPE_IPv6, ); my $ip = Net::Frame::Layer::IPv6->new( src => $oDevice->ip6, dst => $target6, nextHeader => NF_IPv6_PROTOCOL_ICMPv6, ); my $icmp = Net::Frame::Layer::ICMPv6->new( type => NF_ICMPv6_TYPE_NEIGHBORSOLICITATION, ); my $ns = Net::Frame::Layer::ICMPv6::NeighborSolicitation->new( targetAddress => $target, options => [ Net::Frame::Layer::ICMPv6::Option->new( type => NF_ICMPv6_OPTION_SOURCELINKLAYERADDRESS, value => pack('H2H2H2H2H2H2', split(':', $oDevice->mac)), ), ], ); my $oSimple = Net::Frame::Simple->new( layers => [ $eth, $ip, $icmp, $ns, ], ); print $oSimple->print."\n"; use Net::Write::Layer2; my $oWrite = Net::Write::Layer2->new(dev => $oDevice->dev); $oWrite->open; my $reply; for (1..3) { print 'Try number: '.$_."\n"; $oWrite->send($oSimple->raw); until ($oDump->timeout) { if ($reply = $oSimple->recv($oDump)) { last; } } last if $reply; $oDump->timeoutReset; } $oWrite->close; if ($reply) { print 'RECV:'."\n".$reply->print."\n" if $reply; for ($reply->ref->{'ICMPv6::NeighborAdvertisement'}->options) { if ($_->type eq NF_ICMPv6_OPTION_TARGETLINKLAYERADDRESS) { my $mac = unpack('H*', $_->value); print convertMac($mac)."\n"; } } } END { $oDump && $oDump->isRunning && $oDump->stop } Net-Frame-Layer-ICMPv6-1.11/examples/icmp-echo-send.pl0000644000175000017500000000300313165346631021270 0ustar gomorgomor#!/usr/bin/perl use strict; use warnings; my $dev = shift || die("Specify network interface to use\n"); my $target = shift || die("Specify target IPv6 address\n"); my $mac = shift || die("Specify target MAC address\n"); use Net::Frame::Layer qw(:subs); if ($target) { $target = getHostIpv6Addr($target) || die("Unable to resolve hostname\n"); } use Net::Frame::Device; use Net::Frame::Simple; use Net::Frame::Layer::ETH qw(:consts); use Net::Frame::Layer::IPv6 qw(:consts); use Net::Frame::Layer::ICMPv6; use Net::Frame::Layer::ICMPv6::Echo; my $oDevice = Net::Frame::Device->new(dev => $dev); my $eth = Net::Frame::Layer::ETH->new( src => $oDevice->mac, dst => $mac, type => NF_ETH_TYPE_IPv6, ); my $ip = Net::Frame::Layer::IPv6->new( src => $oDevice->ip6, dst => $target, nextHeader => NF_IPv6_PROTOCOL_ICMPv6, ); my $icmp = Net::Frame::Layer::ICMPv6->new; my $echo = Net::Frame::Layer::ICMPv6::Echo->new(payload => 'test'); my $oSimple = Net::Frame::Simple->new( layers => [ $eth, $ip, $icmp, $echo, ], ); print $oSimple->print."\n"; use Net::Write::Layer2; use Net::Frame::Dump::Online; my $oDump = Net::Frame::Dump::Online->new( dev => $oDevice->dev, filter => 'icmp6', ); $oDump->start; my $oWrite = Net::Write::Layer2->new(dev => $oDevice->dev); $oWrite->open; $oWrite->send($oSimple->raw); $oWrite->close; while (1) { if (my $recv = $oSimple->recv($oDump)) { print 'RECV:'."\n".$recv->print."\n"; last; } } END { $oDump && $oDump->isRunning && $oDump->stop } Net-Frame-Layer-ICMPv6-1.11/examples/icmp-echo.pl0000644000175000017500000000143513165346631020350 0ustar gomorgomor#!/usr/bin/perl use strict; use warnings; use Net::Frame::Simple; use Net::Frame::Layer::ETH qw(:consts); use Net::Frame::Layer::IPv6 qw(:consts); use Net::Frame::Layer::ICMPv6; use Net::Frame::Layer::ICMPv6::Echo; my $eth = Net::Frame::Layer::ETH->new(type => NF_ETH_TYPE_IPv6); my $ip = Net::Frame::Layer::IPv6->new(nextHeader => NF_IPv6_PROTOCOL_ICMPv6); my $icmp = Net::Frame::Layer::ICMPv6->new; my $echo = Net::Frame::Layer::ICMPv6::Echo->new(payload => 'test'); my $oSimple = Net::Frame::Simple->new( layers => [ $eth, $ip, $icmp, $echo, ], ); print $oSimple->print."\n"; print unpack('H*', $oSimple->raw)."\n"; my $oSimple2 = Net::Frame::Simple->new( raw => $oSimple->raw, firstLayer => 'ETH', ); print $oSimple2->print."\n"; print unpack('H*', $oSimple2->raw)."\n"; Net-Frame-Layer-ICMPv6-1.11/LICENSE.Artistic0000644000175000017500000001373413165346631017124 0ustar gomorgomor The "Artistic License" Preamble The intent of this document is to state the conditions under which a Package may be copied, such that the Copyright Holder maintains some semblance of artistic control over the development of the package, while giving the users of the package the right to use and distribute the Package in a more-or-less customary fashion, plus the right to make reasonable modifications. Definitions: "Package" refers to the collection of files distributed by the Copyright Holder, and derivatives of that collection of files created through textual modification. "Standard Version" refers to such a Package if it has not been modified, or has been modified in accordance with the wishes of the Copyright Holder as specified below. "Copyright Holder" is whoever is named in the copyright or copyrights for the package. "You" is you, if you're thinking about copying or distributing this Package. "Reasonable copying fee" is whatever you can justify on the basis of media cost, duplication charges, time of people involved, and so on. (You will not be required to justify it to the Copyright Holder, but only to the computing community at large as a market that must bear the fee.) "Freely Available" means that no fee is charged for the item itself, though there may be fees involved in handling the item. It also means that recipients of the item may redistribute it under the same conditions they received it. 1. You may make and give away verbatim copies of the source form of the Standard Version of this Package without restriction, provided that you duplicate all of the original copyright notices and associated disclaimers. 2. You may apply bug fixes, portability fixes and other modifications derived from the Public Domain or from the Copyright Holder. A Package modified in such a way shall still be considered the Standard Version. 3. You may otherwise modify your copy of this Package in any way, provided that you insert a prominent notice in each changed file stating how and when you changed that file, and provided that you do at least ONE of the following: a) place your modifications in the Public Domain or otherwise make them Freely Available, such as by posting said modifications to Usenet or an equivalent medium, or placing the modifications on a major archive site such as uunet.uu.net, or by allowing the Copyright Holder to include your modifications in the Standard Version of the Package. b) use the modified Package only within your corporation or organization. c) rename any non-standard executables so the names do not conflict with standard executables, which must also be provided, and provide a separate manual page for each non-standard executable that clearly documents how it differs from the Standard Version. d) make other distribution arrangements with the Copyright Holder. 4. You may distribute the programs of this Package in object code or executable form, provided that you do at least ONE of the following: a) distribute a Standard Version of the executables and library files, together with instructions (in the manual page or equivalent) on where to get the Standard Version. b) accompany the distribution with the machine-readable source of the Package with your modifications. c) give non-standard executables non-standard names, and clearly document the differences in manual pages (or equivalent), together with instructions on where to get the Standard Version. d) make other distribution arrangements with the Copyright Holder. 5. You may charge a reasonable copying fee for any distribution of this Package. You may charge any fee you choose for support of this Package. You may not charge a fee for this Package itself. However, you may distribute this Package in aggregate with other (possibly commercial) programs as part of a larger (possibly commercial) software distribution provided that you do not advertise this Package as a product of your own. You may embed this Package's interpreter within an executable of yours (by linking); this shall be construed as a mere form of aggregation, provided that the complete Standard Version of the interpreter is so embedded. 6. The scripts and library files supplied as input to or produced as output from the programs of this Package do not automatically fall under the copyright of this Package, but belong to whoever generated them, and may be sold commercially, and may be aggregated with this Package. If such scripts or library files are aggregated with this Package via the so-called "undump" or "unexec" methods of producing a binary executable image, then distribution of such an image shall neither be construed as a distribution of this Package nor shall it fall under the restrictions of Paragraphs 3 and 4, provided that you do not represent such an executable image as a Standard Version of this Package. 7. C subroutines (or comparably compiled subroutines in other languages) supplied by you and linked into this Package in order to emulate subroutines and variables of the language defined by this Package shall not be considered part of this Package, but are the equivalent of input as in Paragraph 6, provided these subroutines do not change the language in any way that would cause it to fail the regression tests for the language. 8. Aggregation of this Package with a commercial distribution is always permitted provided that the use of this Package is embedded; that is, when no overt attempt is made to make this Package's interfaces visible to the end user of the commercial distribution. Such use shall not be construed as a distribution of this Package. 9. The name of the Copyright Holder may not be used to endorse or promote products derived from this software without specific prior written permission. 10. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. The End Net-Frame-Layer-ICMPv6-1.11/MANIFEST0000644000175000017500000000153413471432376015464 0ustar gomorgomorChanges examples/icmp-echo.pl examples/icmp-echo-send.pl examples/lookup-mac.pl lib/Net/Frame/Layer/ICMPv6/DestUnreach.pm lib/Net/Frame/Layer/ICMPv6/Echo.pm lib/Net/Frame/Layer/ICMPv6/NeighborAdvertisement.pm lib/Net/Frame/Layer/ICMPv6/NeighborSolicitation.pm lib/Net/Frame/Layer/ICMPv6/Option.pm lib/Net/Frame/Layer/ICMPv6/ParameterProblem.pm lib/Net/Frame/Layer/ICMPv6.pm lib/Net/Frame/Layer/ICMPv6/RouterAdvertisement.pm lib/Net/Frame/Layer/ICMPv6/RouterSolicitation.pm lib/Net/Frame/Layer/ICMPv6/TimeExceed.pm lib/Net/Frame/Layer/ICMPv6/TooBig.pm LICENSE LICENSE.Artistic Makefile.PL MANIFEST This list of files README t/01-use.t t/02-pod-coverage.t t/03-test-pod.t t/04-layer-create.t META.yml Module YAML meta-data (added by MakeMaker) META.json Module JSON meta-data (added by MakeMaker)