Net::Frame::Layer::OSPF - Open Shortest Path First layer object
use Net::Frame::Layer::OSPF qw(:consts); # Build a layer my $layer = Net::Frame::Layer::OSPF->new( version => 2, type => 0, length => NF_OSPF_HDR_LEN, routerId => '127.0.0.1', areaId => '127.0.0.1', checksum => 0, authType => NF_OSPF_AUTHTYPE_NULL, authData => "0000000000000000", ); $layer->pack; print 'RAW: '.$layer->dump."\n"; # Read a raw layer my $layer = Net::Frame::Layer::OSPF->new(raw => $raw); print $layer->print."\n"; print 'PAYLOAD: '.unpack('H*', $layer->payload)."\n" if $layer->payload;
This modules implements the encoding and decoding of the Open Shortest Path First layer.
RFC: http://www.rfc-editor.org/rfc/rfc2328.txt
RFC: http://www.rfc-editor.org/rfc/rfc2370.txt
See also Net::Frame::Layer for other attributes and methods.
The following are inherited attributes. See Net::Frame::Layer for more information.
Object constructor. You can pass attributes that will overwrite default ones. See SYNOPSIS for default values.
This method is mostly used internally. You pass a Net::Frame::Layer::OSPF 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.
Load them: use Net::Frame::Layer::OSPF qw(:consts);
Various OSPF layer types header length.
Supported OSPF authentication schemes.
Supported OSPF message types.
Supported OSPF LinkState types.
OSPF Hello header options flags.
OSPF DatabaseDesc header options flags.
OSPF DatabaseDesc header flags.
Net::Frame::Layer
Patrice <GomoR> Auffret
Copyright (c) 2006-2015, Patrice <GomoR> Auffret
You may distribute this module under the terms of the Artistic license. See LICENSE.Artistic file in the source distribution archive.
To install Net::Frame::Layer::OSPF, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::Frame::Layer::OSPF
CPAN shell
perl -MCPAN -e shell install Net::Frame::Layer::OSPF
For more information on module installation, please visit the detailed CPAN module installation guide.