GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  NET::PACKET::IGMPV4 (3)

.ds Aq ’

NAME

Net::Packet::IGMPv4 - Internet Group Management Protocol v4 layer 4 object

CONTENTS

SYNOPSIS



   use Net::Packet::Consts qw(:igmpv4);
   require Net::Packet::IGMPv4;

   # Build a layer
   my $layer = Net::Packet::IGMPv4->new(
      version      => 2,
      type         => NP_IGMPv4_v2_TYPE_QUERY,
      maxRespTime  => 10,
      checksum     => 0,
      groupAddress => NP_IGMPv4_GROUP_ADDRESS_ALL_HOSTS,
   );
   $layer->pack;

   print RAW: .unpack(H*, $layer->raw)."\n";

   # Read a raw layer
   my $layer = Net::Packet::IGMPv4->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 Internet Group Management Protocol v4 (version 1 and 2) layer.

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

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

See also <B>Net::Packet::LayerB> and <B>Net::Packet::Layer4B> for other attributes and methods.

ATTRIBUTES

<B>versionB> - 4 bits (or 0 for version 2)
<B>typeB> - 4 bits (or 8 bits for version 2)
<B>unusedB> - 8 bits (or 0 for version 2)
<B>maxRespTimeB> - 8 bits (or 0 for version 1)
<B>checksumB> - 16 bits
<B>groupAddressB> - 32 bits For version 1, you use the following attributes: version, type, unused, checksum, groupAddress.

For version 2, you use the following attributes: type, maxRespTime, checksum, groupAddress.

METHODS

<B>newB> Object constructor. You can pass attributes that will overwrite default ones. Default values:

version: 2

type: NP_IGMPv4_v2_TYPE_QUERY

maxRespTime: 10

checksum: 0

groupAddress: NP_IGMPv4_GROUP_ADDRESS_ALL_HOSTS

<B>packB> Packs all attributes into a raw format, in order to inject to network. Returns 1 on success, undef otherwise.
<B>unpackB> Unpacks raw data from network and stores attributes into the object. Returns 1 on success, undef otherwise.

CONSTANTS

Load them: use Net::Packet::Consts qw(:igmpv4);
<B>NP_IGMPv4_HDR_LENB> IGMPv4 header length.
<B>NP_IGMPv4_v1_TYPE_QUERYB>
<B>NP_IGMPv4_v1_TYPE_REPORTB> Various types supported by version 1 of the protocol.
<B>NP_IGMPv4_v2_TYPE_QUERYB>
<B>NP_IGMPv4_v2_TYPE_QUERY_v1B>
<B>NP_IGMPv4_v2_TYPE_REPORTB>
<B>NP_IGMPv4_v2_TYPE_LEAVE_GROUPB> Various types supported by version 2 of the protocol.
<B>NP_IGMPv4_GROUP_ADDRESS_NO_HOSTSB>
<B>NP_IGMPv4_GROUP_ADDRESS_ALL_HOSTSB>
<B>NP_IGMPv4_GROUP_ADDRESS_ALL_ROUTERSB> Various group addresses supported by all versions of the protocol.

AUTHOR

Patrice <GomoR> Auffret

COPYRIGHT AND LICENSE

Copyright (c) 2004-2009, Patrice <GomoR> Auffret

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

RELATED MODULES

NetPacket, Net::RawIP, Net::RawSock
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 NET::PACKET::IGMPV4 (3) 2009-11-09

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.