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

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

Dependencies

Annotate this POD

View/Report Bugs
Source  

NAME ^

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

SYNOPSIS ^

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

   my $ripv2 = Net::Frame::Layer::RIP::v2->new(
      addressFamily => NF_RIP_V2_ADDRESSFAMILY_IPV4,
      routeTag      => 0,
      address       => '0.0.0.0',
      subnetMask    => '0.0.0.0',
      nextHop       => '0.0.0.0',
      metric        => 1,
   );
   $ripv2->pack;

   print 'RAW: '.$ripv2->dump."\n";

   # Read a raw layer
   my $layer = Net::Frame::Layer::RIP::v2->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 v2 layer.

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

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

ATTRIBUTES ^

addressFamily

Address family. See CONSTANTS for more information.

routeTag

Attribute assigned to a route for separating routes within RIP domain.

address

Address information for route.

subnetMask

Subnet mask for address.

nextHop

Next hop for address.

metric

Metric for 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.

full
full (hash)

Object constructor. Same as new but with RIPv2 Request header, requests full routing table. You can pass attributes that will overwrite default ones. Default values: all fields 0 with NF_RIP_V2_METRIC_INFINITY set.

auth
auth (hash)

Object constructor. RIPv2 authentication entry. Only need to set authentication.

addressFamily

Authentication. See CONSTANTS for values.

authType

Authentication type. See CONSTANTS for values.

authentication

Authentication string. (Max 16 characters).

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

NF_RIP_V2_ADDRESSFAMILY_IPv4
NF_RIP_V2_ADDRESSFAMILY_AUTH

Address family. Auth isn't really an address family, but indicates authentication. If used, this must be the first Route Table Entry after the RIPv2 header.

NF_RIP_V2_AUTHTYPE_SIMPLE

Authentication type. Only Simple (cleartext password) currently supported.

NF_RIP_V2_METRIC_INFINITY

Infinity metric (16).

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: