Michael Vincent > Net-Frame-Layer-RIP-1.02 > Net::Frame::Layer::RIP

Download:
Net-Frame-Layer-RIP-1.02.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 1.02   Source  

NAME ^

Net::Frame::Layer::RIP - Routing Information Protocol layer object

SYNOPSIS ^

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

   my $layer = Net::Frame::Layer::RIP->new(
      command  => NF_RIP_V2_COMMAND_REQUEST,
      version  => 2,
      reserved => 0,
   );

   #
   # Read a raw layer
   #

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

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

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

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

ATTRIBUTES ^

command

RIP command. See CONSTANTS for more information.

version

RIP protocol version: 1 or 2 valid.

reserved

Default set to 0.

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.

getKey
getKeyReverse

These two methods are basically used to increase the speed when using recv method from Net::Frame::Simple. Usually, you write them when you need to write match method.

match (Net::Frame::Layer::RIP object)

This method is mostly used internally. You pass a Net::Frame::Layer::RIP layer as a parameter, and it returns true if this is a response corresponding for the request, or returns false if not.

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::RIP qw(:consts);

NF_RIP_V1_DEST_HWADDR
NF_RIP_V1_DEST_ADDR
NF_RIP_V1_DEST_PORT
NF_RIP_V2_DEST_HWADDR
NF_RIP_V2_DEST_ADDR
NF_RIP_V2_DEST_PORT

Default destination Ethernet address, IPv4 address and UDP port.

NF_RIP_V1_COMMAND_REQUEST
NF_RIP_V1_COMMAND_RESPONSE
NF_RIP_V1_COMMAND_TRACEON
NF_RIP_V1_COMMAND_TRACEOFF
NF_RIP_V1_COMMAND_SUNRESV
NF_RIP_V1_COMMAND_TRIGGEREDREQUEST
NF_RIP_V1_COMMAND_TRIGGEREDRESPONSE
NF_RIP_V1_COMMAND_TRIGGEREDACK
NF_RIP_V1_COMMAND_UPDATEREQUEST
NF_RIP_V1_COMMAND_UPDATERESPONSE
NF_RIP_V1_COMMAND_UPDATEACK
NF_RIP_V2_COMMAND_REQUEST
NF_RIP_V2_COMMAND_RESPONSE
NF_RIP_V2_COMMAND_TRACEON
NF_RIP_V2_COMMAND_TRACEOFF
NF_RIP_V2_COMMAND_SUNRESV
NF_RIP_V2_COMMAND_TRIGGEREDREQUEST
NF_RIP_V2_COMMAND_TRIGGEREDRESPONSE
NF_RIP_V2_COMMAND_TRIGGEREDACK
NF_RIP_V2_COMMAND_UPDATEREQUEST
NF_RIP_V2_COMMAND_UPDATERESPONSE
NF_RIP_V2_COMMAND_UPDATEACK

Commands.

SEE ALSO ^

Net::Frame::Layer

AUTHOR ^

Michael Vincent

COPYRIGHT AND LICENSE ^

Copyright (c) 2012, Michael Vincent

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

syntax highlighting: