OSPF::LSDB::ospfd - parse OpenBSD ospfd link state database
use OSPF::LSDB::ospfd;
my $ospfd = OSPF::LSDB::ospfd->new();
my $ospfd = OSPF::LSDB::ospfd->new(ssh => "user@host");
$ospfd->parse(%files);
The OSPF::LSDB::ospfd module parses the output of OpenBSD ospfctl and fills the OSPF::LSDB base object. The output of show summary, show database router, show database network, show database summary, show database asbr, show database external is needed. It can be given as separate files or obtained dynamically. In the latter case doas is invoked if permissions are not sufficient to run ospfctl. If the object has been created with the ssh argument, the specified user and host are used to login and run ospfctl there.
show summary
show database router
show database network
show database summary
show database asbr
show database external
ssh
There is only one public method:
This function takes a hash with file names as value containing the ospfctl output data. The hash keys are named selfid, router, network, summary, boundary, external. If a hash entry is missing, ospfctl is run instead to obtain the information dynamically.
selfid
router
network
summary
boundary
external
The complete OSPF link state database is stored in the ospf field of the base class.
This module has been tested with OpenBSD 4.8 and 5.1. If it works with other versions is unknown.
The methods die if any error occurs.
OSPF::LSDB, OSPF::LSDB::ospf6d
ospfd2yaml
Alexander Bluhm
To install OSPF::LSDB, copy and paste the appropriate command in to your terminal.
cpanm
cpanm OSPF::LSDB
CPAN shell
perl -MCPAN -e shell install OSPF::LSDB
For more information on module installation, please visit the detailed CPAN module installation guide.