Scroll to navigation

Net::Frame::Layer::IPv6(3pm) User Contributed Perl Documentation Net::Frame::Layer::IPv6(3pm)

NAME

Net::Frame::Layer::IPv6 - Internet Protocol v6 layer object

SYNOPSIS

   use Net::Frame::Layer::IPv6 qw(:consts);
   # Build a layer
   my $layer = Net::Frame::Layer::IPv6->new(
      version       => 6,
      trafficClass  => 0,
      flowLabel     => 0,
      nextHeader    => NF_IPv6_PROTOCOL_TCP,
      hopLimit      => 0xff,
      src           => '::1',
      dst           => '::1',
      payloadLength => 0,
   );
   $layer->pack;
   print 'RAW: '.$layer->dump."\n";
   # Read a raw layer
   my $layer = Net::Frame::Layer::IPv6->new(raw = $raw);
   print $layer->print."\n";
   print 'PAYLOAD: '.unpack('H*', $layer->payload)."\n"
      if $layer->payload;

DESCRIPTION

This modules implements the encoding and decoding of the IPv6 layer.

RFC: ftp://ftp.rfc-editor.org/in-notes/rfc2460.txt

See also Net::Frame::Layer for other attributes and methods.

ATTRIBUTES

Version of Internet Protocol header.
Traffic class field. Was Type of Service in IPv4.
Flow label class field. Was IP ID in IPv4.
The type of next header. Was protocol in IPv4.
Is an alias for nextHeader.
Length in bytes of encapsulated layers (usually, that is layer 4 + layer 7).
Was TTL field in IPv4.
Source and destination addresses.

The following are inherited attributes. See Net::Frame::Layer for more information.

METHODS

Object constructor. You can pass attributes that will overwrite default ones. See SYNOPSIS for default values.
In order to compute lengths attributes within IPv6 header, you need to pass via a hashref the number of bytes contained in IPv6 payload (that is, the sum of all layers after the IPv6 one).

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 Net::Frame::Layer for more information.

CONSTANTS

Load them: use Net::Frame::Layer::IPv6 qw(:consts);

Constants for nextHeader attribute.

SEE ALSO

Net::Frame::Layer

AUTHOR

Patrice <GomoR> Auffret

COPYRIGHT AND LICENSE

Copyright (c) 2006-2017, Patrice <GomoR> Auffret

You may distribute this module under the terms of the Artistic license. See LICENSE.Artistic file in the source distribution archive.

2022-06-16 perl v5.34.0