ospfview.cgi - publish the OSPF LSDB graph on a web server
The cgi script ospfview.cgi allows to publish the link-state database of an OSPF router on a web server running there.
The router must run the OpenBSD ospfd or ospf6d routing daemon. To make this cgi script work, the web server must have access to the /var/run/ospfd.sock and /var/run/ospf6d.sock UNIX domain sockets. This can be achieved by file permissions or sudo permissions for ospfctl and ospf6ctl. The web server must not run chrooted.
The following parameters control the format and content of the generated graph. The content parameters have numerical values,
0 disables the feature and is the default.
Specify the file format of the generated image. The value is passed to the dot -T option. Available choices are
svgz. Default is
1turns on IPv6,
1displays the legend instead of the current OSPF LSDB.
1adds the network summary-LSAs to the graph. With
2these LSAs get aggregated. Inter-area-prefix-LSAs have not been implemented for IPv6.
1adds the boundary router summary-LSAs to the graph. With
2these LSAs get aggregated. Inter-area-router-LSAs have not been implemented for IPv6.
1adds the AS-external-LSAs to the graph. With
2these LSAs get aggregated.
1adds the link-LSAs to the graph. These LSAs exist only for IPv6.
1adds the network and router intra-area-prefix-LSAs to the graph. These LSAs exist only for IPv6.
1clusters LSAs containing the same network into a common rectangle. This feature has not been implemented for IPv6.
1prints the area and all warnings corresponding to the color of the nodes and edges. With
2only the area or the most severe warning is printed. Note that with the
svgformat, the messages are always available as tool tip.
The program dies if an error occurs. Check your web server's error log for messages.
It is probably not the best idea to publish one's routing topology on a public web server. This cgi script is intended to debug OSPF in a controlled environment.
The perl taint mode is used to make this cgi script secure.