NAME
Net::Frame::Layer::RIP::v1 - Routing Information Protocol v1 layer object
SYNOPSIS
use Net::Frame::Layer::RIP::v1 qw(:consts);
my $ripv1 = Net::Frame::Layer::RIP::v1->new(
addressFamily => NF_RIP_V1_ADDRESSFAMILY_IPV4,
reserved1 => 0,
address => '0.0.0.0',
reserved2 => 0,
reserved3 => 0,
metric => 1,
);
$ripv1->pack;
print 'RAW: '.$ripv1->dump."\n";
# Read a raw layer
my $layer = Net::Frame::Layer::RIP::v1->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 v1 layer.
RFC: ftp://ftp.rfc-editor.org/in-notes/rfc1058.txt
See also Net::Frame::Layer for other attributes and methods.
ATTRIBUTES
- addressFamily
-
Address family. See CONSTANTS for more information.
- reserved1
-
Default set to 0.
- address
-
Address information for route.
- reserved2
-
Default set to 0.
- reserved3
-
Default set to 0.
- 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 RIPv1 Request header, requests full routing table. You can pass attributes that will overwrite default ones. Default values: all fields 0 with NF_RIP_V1_METRIC_INFINITY set.
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
- dump
CONSTANTS
Load them: use Net::Frame::Layer::RIP::v1 qw(:consts);
- NF_RIP_V1_ADDRESSFAMILY_IPv4
-
Address family.
- NF_RIP_V1_METRIC_INFINITY
-
Infinity metric (16).
SEE ALSO
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.