core-extra/daemon/proto/core.proto

83 lines
1.3 KiB
Protocol Buffer

syntax = "proto3";
package core;
service CoreApi {
rpc GetSessions (SessionsRequest) returns (SessionsResponse) {}
rpc GetSession (SessionRequest) returns (SessionResponse) {}
}
message SessionsRequest {
}
message SessionsResponse {
repeated Session sessions = 1;
}
message SessionRequest {
int32 id = 1;
}
message SessionResponse {
int32 state = 1;
repeated Node nodes = 2;
repeated Link links = 3;
}
message Session {
int32 id = 1;
int32 state = 2;
int32 nodes = 3;
}
message Node {
int32 id = 1;
string name = 2;
int32 type = 3;
string model = 4;
Position position = 5;
repeated string services = 6;
string emane = 7;
}
message Link {
int32 node_one = 1;
int32 node_two = 2;
int32 type = 3;
Interface interface_one = 4;
Interface interface_two = 5;
LinkOptions options = 6;
}
message LinkOptions {
string opaque = 1;
float jitter = 2;
string key = 3;
float mburst = 4;
float mer = 5;
float per = 6;
float bandwidth = 7;
float burst = 8;
float delay = 9;
float dup = 10;
bool unidirectional = 11;
}
message Interface {
int32 id = 1;
string name = 2;
string mac = 3;
string ip4 = 4;
int32 ip4mask = 5;
string ip6 = 6;
int32 ip6mask = 7;
}
message Position {
int32 x = 1;
int32 y = 2;
int32 z = 3;
float lat = 4;
float lon = 5;
float alt = 6;
}