OSPF::LSDB::ospfd - parse OpenBSD ospfd link state database
my $ospfd = OSPF::LSDB::ospfd->new();
my $ospfd = OSPF::LSDB::ospfd->new(ssh => "user@host");
The OSPF::LSDB::ospfd module parses the output of OpenBSD ospfctl and fills the OSPF::LSDB base object. The output of
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:
This function takes a hash with file names as value containing the ospfctl output data. The hash keys are named
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.
The methods die if any error occurs.