NAME
OSPF::LSDB::ospfd - parse OpenBSD ospfd link state database
SYNOPSIS
use OSPF::LSDB::ospfd;
my $ospfd = OSPF::LSDB::ospfd->new();
my $ospfd = OSPF::LSDB::ospfd->new(ssh => "user@host");
$ospfd->parse(%files);
DESCRIPTION
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 sudo 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.
There is only one public method:
- $self->parse(%files)
-
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.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.
ERRORS
The methods die if any error occurs.
SEE ALSO
OSPF::LSDB, OSPF::LSDB::ospf6d
AUTHORS
Alexander Bluhm