forked from jbenc/plotnetcfg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
plotnetcfg-json.5
293 lines (241 loc) · 5.88 KB
/
plotnetcfg-json.5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
.TH plotnetcfg-json 5 "10 June 2015"
.SH NAME
plotnetcfg \- json output format
.SH DESCRIPTION
.SS Root object fields
.TP
format
.I (number)
Currently 2. 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.
.TP
version
.I (string)
Plotnetcfg version.
.TP
date
.I (string)
Time and date when the data were gathered, in
.BR ctime (3)
format.
.TP
namespaces
.I (object)
Associative array of name space objects. Key is the namespace id.
.TP
root
.I (object)
The id and key of root namespace.
.SS Name space object fields
.TP
id
.I (string)
An arbitrary identifier, unique among other namespaces.
.TP
name
.I (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.
.TP
interfaces
.I (object)
Associative array of interface objects. Key is the interface id.
.TP
warnings
.I (array)
If present, an array of strings. Contains error messages encountered when
gathering data in the given name space.
.TP
routes
.I (array)
An array of existing routing tables.
.SS Interface object fields
.TP
id
.I (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.
.TP
name
.I (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.
.TP
driver
.I (string)
The kernel module (driver) behind the interface. May be empty in some
specific cases.
.TP
info
.I (object)
Contains additional information about the interface. Values are formatted
strings, e.g. tunnel endpoints. The exact content is dependent on the
type of the interface.
.TP
addresses
.I (array)
Array of address objects.
.TP
mac
.I (string)
Link-layer address of the interface.
.TP
mtu
.I (number)
Interface MTU.
.TP
type
.I (string)
.RS
"device": normal interface. Most interfaces are of this type.
.P
"internal": this interface is not backed up by a Linux interface. Can be
often found with Open vSwitch.
.P
Further types are possible with future plotnetcfg versions. Adding them will
not be considered a format change.
.RE
.TP
state
.I (string)
.RS
"down": the interface is administratively disabled.
.P
"up": the interface is up and operating.
.P
"up_no_link": the interface is up but has no link.
.P
"none": state cannot be determined or is not applicable to this kind of
interface.
.P
More states are possible to be added in future plotnetcfg versions. Adding
them will not be considered a format change.
.RE
.TP
warning
.I (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.
.TP
parents
.I (array)
Array of parent interfaces, as connection objects. Not present if there
are no parents.
.TP
children
.I (array)
Array of children interfaces, as connection objects. Not present if there
are no children.
.TP
peer
.I (object)
The peer interface, as a connection object. Not present if there's no peer.
.SS Connection object fields
.TP
info
.I (array)
Array of strings. Contains additional information about the connection
between the two interfaces, formatted. May be an empty array.
.TP
target
.I (string)
Id of the interface that is being linked to.
.SS Address object fields
.TP
family
.I (string)
Currently only "INET" or "INET6". More types will be added in the future
(without considering it a format change).
.TP
address
.I (string)
Address formatted for user consumption. May include net mask. This field
should be generally machine parseable.
.TP
peer
.I (object)
If present, the peer address corresponding to this address. It's of the
address object type but cannot contain futher peer field.
.SS Routing table object fields
.TP
name
.I (string)
The well-known name of the table, if there is such.
.TP
routes
.I (array)
An array of route objects.
.SS Route object fields
.TP
destination
.I (string)
Formatted prefix of the route destination.
.TP
family
.I (string)
A family of all addresses in this route. Currently only "INET" or "INET6".
.TP
gateway
.I (string)
Formatted address of the gateway, if this is a next-hop route.
.TP
iif
.I (string)
Interface id of the input interface, if any.
.TP
metrics
.I (object)
Associative array of integers, containing all integer metrics that kernel
reports, if any. Keys are one of the following: mtu, window, rtt, rttvar,
sshthresh, cwnd, advmss, reordering, hoplimit, initcwnd, features, rto_min,
initrwnd, quickack.
.TP
oif
.I (string)
Interface id of the output interface, if any.
.TP
priority
.I (integer)
Kernel reported priority of this route.
.TP
protocol
.I (string)
An origin of the route. Currently one of redirect, kernel, boot, static, gated,
ra, mrt, zebra, bird, dnrouted, xorp, ntk, dhcp, mrouted or babel, but others
may be added in the future.
.TP
scope
.I (string)
A scope of the route.
.TP
source
.I (string)
A formatted source prefix.
.TP
preferred-source
.I (string)
A formatted preferred source address.
.TP
tos
.I (integer)
The type of service.
.TP
type
.I (string)
Route type, one of the following: unspec, unicast, local, broadcast, anycast,
multicast, blackhole, unreachable, prohibit, throw, nat. Others may be added in
the future, without breaking the format.
.SH SEE ALSO
.BR plotnetcfg (8)
.SH AUTHOR
.B plotnetcfg
was written and is maintained by Jiri Benc <[email protected]>.