Root object fields
(number) Currently 1. Will be increased if incompatible changes are introduced. A tool parsing the json output should refuse any format it's not aware of. Note that adding of new fields is not considered to be an incompatible change.
(string) Plotnetcfg version.
(string) Time and date when the data were gathered, in ctime(3) format.
(array) Array of name space objects. The first one is always the root name space.
Name space object fields
(string) Name of the name space suitable for user consumption. This in general cannot be used for machine consumption, e.g. switching to the name space. The root name space has an empty name.
(array) Array of interface objects.
(array) If present, an array of strings. Contains error messages encountered when gathering data in the given name space.
Interface object fields
(string) Unique identifier of the interface. This is an arbitrary opaque string and the consumer should not make any assumption of its contents (apart of not containing null characters). It should not be displayed to the user, the sole purpose of this field is linking to other interfaces. The identifier is globally unique, it is safe to assume that interfaces with the same name in different name spaces have a different id.
(string) User visible name of the interface. Usually (but not always) the name of the corresponding Linux interface. This is not unique between name spaces.
(string) The kernel module (driver) behind the interface. May be empty in some specific cases.
(array) Array of strings. Contains additional information about the interface, formatted. An example is tunnel endpoints. The exact content is dependent on the type of the interface.
(array) Array of address objects.
(number) Interface MTU.
"device": normal interface. Most interfaces are of this type.
"internal": this interface is not backed up by a Linux interface. Can be often found with Open vSwitch.
Further types are possible with future plotnetcfg versions. Adding them will not be considered a format change.
"down": the interface is administratively disabled.
"up": the interface is up and operating.
"up_no_link": the interface is up but has no link.
"none": state cannot be determined or is not applicable to this kind of interface.
More states are possible to be added in future plotnetcfg versions. Adding them will not be considered a format change.
(bool) There was a problem gathering data about this interface. Details are in the name space warnings field. The purpose of this flag is for visual representation of this interface as not having complete data available. Not present if there was no error.
(object) The parent interface, as a connection object. Not present if there's no parent.
(array) Array of children interfaces, as connection objects. Not present if there are no children.
(object) The peer interface, as a connection object. Not present if there's no peer.
Connection object fields
(array) Array of strings. Contains additional information about the connection between the two interfaces, formatted. May be an empty array.
(string) Id of the interface that is being linked to.
Address object fields
(string) Currently only "INET" or "INET6". More types will be added in the future (without considering it a format change).
(string) Address formatted for user consumption. May include net mask. This field should be generally machine parseable.
(object) If present, the peer address corresponding to this address. It's of the address object type but cannot contain futher peer field.
plotnetcfg was written and is maintained by Jiri Benc <email@example.com>.