Skip to content

Commit c5011e3

Browse files
author
Bill Fenner
committed
proto updates for PROBE (RFC8335)
1 parent db8b53b commit c5011e3

File tree

1 file changed

+83
-0
lines changed

1 file changed

+83
-0
lines changed

system/system.proto

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ service System {
4040
// and must provide summary statistics.
4141
rpc Ping(PingRequest) returns (stream PingResponse) {}
4242

43+
// Probe executes the RFC8335 PROBE command on the target and
44+
// streams back the results. Some targets may not stream any results
45+
// until all results are in.
46+
rpc Probe(ProbeRequest) returns (stream ProbeResponse) {}
47+
4348
// Traceroute executes the traceroute command on the target and streams back
4449
// the results. Some targets may not stream any results until all
4550
// results are in. If a hop count is not explicitly provided,
@@ -227,6 +232,84 @@ message PingResponse {
227232
int32 ttl = 13; // Remaining time to live value.
228233
}
229234

235+
// A ProbeRequest describes the probe operation to perform. The
236+
// destination field and exactly one of the probe_target fields
237+
// are required. Any field not specified is set to a reasonable server
238+
// specified value. Not all fields are supported by all vendors.
239+
message ProbeRequest {
240+
string destination = 1; // Proxy address to probe. required.
241+
string source = 2; // Source address to probe from.
242+
oneof probe_target {
243+
// exactly one of the next 4 items must be present.
244+
int32 ifindex = 3; // ifIndex to probe, if present.
245+
string ifname = 4; // ifName to probe, if present.
246+
string ifaddr = 5; // ifAddr to probe, if present.
247+
string remote = 6; // remote address to probe, if present.
248+
}
249+
int32 count = 7; // Number of requests to make, default 3.
250+
int64 interval = 8; // Nanoseconds between requests.
251+
int64 wait = 9; // Nanoseconds to wait for a response.
252+
253+
string network_instance = 10; // Network instance to probe the proxy node in.
254+
}
255+
256+
// A ProbeResponse represents either the response to a single probe packet
257+
// (the code field is non-zero) or the summary statistics (sent is non-zero).
258+
//
259+
// For a single probe packet, time is the round trip time, in nanoseconds. For
260+
// summary statistics, it is the time spent by the ping operation. The time is
261+
// not always present in summary statistics.
262+
//
263+
// In the summary, each map is keyed by the enum values referred to by that map.
264+
// The codes map is keyed by the Code enum, the states map is keyed by the State
265+
// enum, and the actives map is keyed by the Active enum.
266+
message ProbeResponse {
267+
enum Code {
268+
CODE_UNKNOWN = 0;
269+
CODE_NO_ERROR = 1;
270+
CODE_MALFORMED_QUERY = 2;
271+
CODE_NO_SUCH_INTERFACE = 3;
272+
CODE_NO_SUCH_TABLE_ENTRY = 4;
273+
CODE_MULTIPLE_INTERFACES = 5;
274+
}
275+
enum State {
276+
STATE_UNKNOWN = 0;
277+
STATE_INCOMPLETE = 1;
278+
STATE_REACHABLE = 2;
279+
STATE_STALE = 3;
280+
STATE_DELAY = 4;
281+
STATE_PROBE = 5;
282+
STATE_FAILED = 6;
283+
}
284+
enum Active {
285+
ACTIVE_UNKNOWN = 0;
286+
ACTIVE_INACTIVE = 1;
287+
ACTIVE_NOV4_NOV6 = 2;
288+
ACTIVE_V4 = 3;
289+
ACTIVE_V6 = 4;
290+
ACTIVE_V4_V6 = 5;
291+
}
292+
string source = 1;
293+
int64 time = 2;
294+
295+
// For individual responses
296+
int32 sequence = 3;
297+
Code code = 4;
298+
State state = 5; // only present if code is CODE_NO_ERROR
299+
// and request was remote
300+
Active active = 6; // only present if code is CODE_NO_ERROR
301+
// and request was not remote
302+
303+
// summary
304+
int32 sent = 7; // Total packets sent.
305+
int32 errors = 8; // Count of errors received when sending packets.
306+
int32 received = 9; // Total packets received.
307+
// histograms in summary
308+
map <uint32,uint32> codes = 10; // Keys are values of Code enum
309+
map <uint32,uint32> states = 11; // Keys are values of State enum
310+
map <uint32,uint32> actives = 12; // Keys are values of Active enum
311+
}
312+
230313
// A TracerouteRequest describes the traceroute operation to perform. Only the
231314
// destination field is required. Any field not specified is set to a
232315
// reasonable server specified value. Not all fields are supported by all

0 commit comments

Comments
 (0)