OSPF::LSDB::View - display OSPF database as graphviz dot
my $ospf = OSPF::LSDB->new();
my $view = OSPF::LSDB::View->new($ospf);
my $dot = view->graph();
The OSPF::LSDB::View module converts the content of a OSPF::LSDB instance into a graphviz dot string. Routers and Networks become nodes, the links between them are directed edges. The different OSPF vertices are displayed with drawing styles that are documented in the legend.
During conversion the link state database is checked. Each inconsistency is reported as OSPF::LSDB error and the color of the object changes. The colors are prioritized by severity.
All areas and ASE have unique gray levels.
Vertex is in multiple areas.
An area is not in the list of all areas.
Asymmetric designated router.
Conflicting AS external network.
Conflicting stub network.
Normally the OSPF::LSDB copy constructor creates the object. The public methods are:
Convert the internal database into graphviz dot format. The output for the dot program is returned as string.
The %todo parameter allows to tune the displayed details. It consists of the subkeys:
Display the summary AS boundary routers. If the additional subkey aggregate is given, multiple AS boundary routers are aggregated in one node.
Display the AS external networks. If the additional subkey aggregate is given, multiple AS external networks are aggregated in one node.
The same network is always displayed in the same rectangular cluster, even if is belongs to different LSA types.
Display the summary networks. If the additional subkey aggregate is given, multiple networks are aggregated in one node.
Write the most severe warning about OSPF inconsistencies into the label of the dot graph. This warning determines also the color of the node or edge. If the additional subkey all is given, all warnings are added.
Return a string of a dot graphic containing drawing and description of possible nodes and edges.
The methods die if any error occures.
Inconsistencies within the OSPF link state database are visualized with different colors. The error message may be printed into the graph as warnings. All warnings may be optained with the get_errors method.
RFC 2328 - OSPF Version 2 - April 1998