NAME
Net::Frame::Layer::HSRP - Hot Standby Router Protocol layer object
SYNOPSIS
use Net::Frame::Simple;
use Net::Frame::Layer::HSRP qw(:consts);
my $layer = Net::Frame::Layer::HSRP->new(
version => NF_HSRP_VERSION_1,
opcode => NF_HSRP_OPCODE_HELLO,
state => NF_HSRP_STATE_STANDBY,
helloTime => 3,
holdTime => 10,
priority => 100,
group => 1,
reserved => 0,
authData => "cisco\0\0\0",
virtualIp => '127.0.0.1',
);
#
# Read a raw layer
#
my $layer = Net::Frame::Layer::HSRP->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 HSRP layer.
RFC: ftp://ftp.rfc-editor.org/in-notes/rfc2281.txt
See also Net::Frame::Layer for other attributes and methods.
ATTRIBUTES
- version
-
HSRP protocol version. See CONSTANTS for more information.
- opcode
-
HSRP opcode. See CONSTANTS for more information.
- state
-
HSRP state. See CONSTANTS for more information.
- helloTime
-
Default set to 3.
- holdTime
-
Default set to 10.
- priority
-
Default set to 100.
- group
-
HSRP group.
- reserved
- authData
-
Clear text authentication data. Default set to "cisco\0\0\0".
- virtualIp
-
HSRP virtual IP.
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.
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::HSRP qw(:consts);
- NF_HSRP_ALLHSRPRTRS_MAC
-
Default Layer 2 destination addresses.
- NF_HSRP_ALLHSRPRTRS
-
Default Layer 3 destination addresses.
- NF_HSRP_UDP_PORT
-
Default UDP port.
- NF_HSRP_VERSION_1
-
HSRP version.
- NF_HSRP_OPCODE_HELLO
- NF_HSRP_OPCODE_COUP
- NF_HSRP_OPCODE_RESIGN
-
HSRP opcodes.
- NF_HSRP_STATE_INITIAL
- NF_HSRP_STATE_LEARN
- NF_HSRP_STATE_LISTEN
- NF_HSRP_STATE_SPEAK
- NF_HSRP_STATE_STANDBY
- NF_HSRP_STATE_ACTIVE
-
HSRP states.
LIMITATIONS
Currently only supports HSRP version 1.
SEE ALSO
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.