The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Net::Frame::Layer::IGMP - Internet Group Management Protocol layer object

SYNOPSIS

   use Net::Frame::Simple;
   use Net::Frame::Layer::IGMP qw(:consts);

   my $layer = Net::Frame::Layer::IGMP->new(
      type         => NF_IGMP_TYPE_QUERY,
      maxResp      => 0,
      checksum     => 0,
      groupAddress => '0.0.0.0',
   );

   # v3 Report
   my $layer = Net::Frame::Layer::IGMP->new(
      type         => NF_IGMP_TYPE_REPORTv3,
      maxResp      => 0,
      checksum     => 0,
      reserved     => 0,
      numGroupRecs => 0,
   );

   #
   # Read a raw layer
   #

   my $layer = Net::Frame::Layer::IGMP->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 IGMP layer.

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

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

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

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

ATTRIBUTES

type

IGMP message type. See CONSTANTS for more information.

maxResp

Max response time (version 2) or code (version 3). Unused in version 1.

checksum

Message checksum.

groupAddress

Multicast group address.

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

raw
payload
nextLayer

METHODS

new
new (hash)

Object constructor. You can pass attributes that will overwrite default ones. See SYNOPSIS for default values.

v3report
v3report (hash)

Object constructor. You can pass attributes that will overwrite default ones. Default values:

   my $layer = Net::Frame::Layer::IGMP->new(
      type         => NF_IGMP_TYPE_REPORTv3,
      maxResp      => 0,
      checksum     => 0,
      reserved     => 0,
      numGroupRecs => 0,
   );
computeChecksums

Computes the IGMP checksum.

The following are inherited methods. Some of them may be overriden in this layer, and some others may not be meaningful in this layer. See Net::Frame::Layer for more information.

layer
computeLengths
pack
unpack
encapsulate
getLength
getPayloadLength
print
dump

CONSTANTS

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

NF_IGMP_ALLIGMPRTRS_MAC

Default Layer 2 destination addresses.

NF_IGMP_ALLIGMPRTRS

Default Layer 3 destination addresses.

NF_IGMP_TYPE_QUERY
NF_IGMP_TYPE_DVMRP
NF_IGMP_TYPE_REPORTv1
NF_IGMP_TYPE_REPORTv2
NF_IGMP_TYPE_REPORTv3
NF_IGMP_TYPE_LEAVE

IGMP message types.

SEE ALSO

Net::Frame::Layer

AUTHOR

Michael Vincent

COPYRIGHT AND LICENSE

Copyright (c) 2013, Michael Vincent

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