ospfd2yaml - convert OpenBSD ospfd or ospf6d LSDB to YAML file
ospfd2yaml [-B boundary] [-E external] [-h] [-H user@host] [-I selfid] [-N network] [-R router] [-S summary] [ospf.yaml]
ospfd2yaml takes the OSPF link state database of the OpenBSD ospfd or ospf6d and converts it into a YAML file.
The several input files containing the LSDB can be passed via command line. If a file is not given, the ospfctl or ospf6ctl command line tool is invoked on the local machine to gather the information dynamically. For that the user must be root or in group wheel to access the ospfd.sock or ospf6d.sock. If necessary sudo is used for calling ospfctl or ospf6ctl to gain privileges.
Optionally one output file can be given on command line, otherwise stdout is used.
The options are as follows:
Use ospfd and ospfctl as input for the OSPF v2 database. This is the default.
Use ospf6d and ospf6ctl as input for the OSPF v3 database.
- -B boundary
File describing the AS boundary routers summary-LSAs. It can be obtained with ospfctl show database asbr.
- -E external
File describing the AS-external-LSAs. It can be obtained with ospfctl show database external.
Show help message and exit.
- -H user@host
The specified user and host are used for ssh login and run ospfctl there.
- -I selfid
File describing the router from witch the LSDB has been taken. It can be obtained with ospfctl show summary.
File describing the Link-LSAs. It can be obtained with ospf6ctl show database link. This option may only be used with -6.
- -N network
File describing the network-LSAs. It can be obtained with ospfctl show database network.
- -P intra
File describing the Intra-Area-Prefix-LSAs. It can be obtained with ospf6ctl show database intra. This option may only be used with -6.
- -R router
File describing the router-LSAs. It can be obtained with ospfctl show database router.
- -S summary
File describing the network summary-LSAs. It can be obtained with ospfctl show database summary.
ospfd2yaml | ospf2dot | dot
The program dies if an error occurs. Typical errors are ospfctl or ospf6ctl failure or parsing errors of the LSDB files.