pcpdb
— state databases for the PCP server
pcpdb
The pcpd PCP server keeps its state in stable
storage in two databases tunnels.db
and
snats.db
. These databases can be dumped
by the db_dump utility. Alternatively
sending a SIGUSR1 signal to the process creates a dump of
the current state into tunnels.dump
and
snats.dump
in a similar format.
The pcpdump.pl perl script uses db_dump or the dump files. It prints in a human friendly the content of databases.
An entry is a pair of lines key and data with a leading space. Values are in hexadecimal, scalars are in the host order, addresses are considered as octet arrays so appear in the network order. Structures are packed.
Key fields are the B4 IPv6 address (aka tunnel address). Size is 16 octets.
Data fields are:
natted IPv4 address
UTC date of creation
Size is 4 + 4 = 8 octets. The date is used for the seconds since start of the Epoch.