37 lines
1.7 KiB
Protocol Buffer
37 lines
1.7 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package gus;
|
|
|
|
import "google/protobuf/timestamp.proto"; // Import the well-known type for Timestamp
|
|
|
|
enum GusEventType {
|
|
Connect = 0; // a socket connect attempt
|
|
Disconnect = 1; // a socket closed
|
|
Enable = 2; // listening on a port was enabled
|
|
Disable = 3; // listening on a port was disabled
|
|
}
|
|
|
|
message GusSocket {
|
|
string srcHostname = 1; // the hostname
|
|
string srcIp = 2; // the IPv4 or IPv6 address
|
|
string srcPort = 3; // the port
|
|
string destHostname = 4; // the hostname
|
|
string destIp = 5; // the IPv4 or IPv6 address
|
|
string destPort = 6; // the port
|
|
}
|
|
|
|
message Event {
|
|
string Hostname = 1; // the hostname
|
|
int64 localPort = 2; // the port gus was listening on
|
|
GusEventType etype = 3; // what kind of event was this
|
|
GusSocket sock = 4; // socket details if event needs them
|
|
google.protobuf.Timestamp ctime = 5; // event create time
|
|
google.protobuf.Timestamp etime = 6; // event end time
|
|
}
|
|
|
|
message Events { // `autogenpb:marshal` `autogenpb:gui` `autogenpb:nomutex`
|
|
string uuid = 1; // `autogenpb:uuid:4e91f9e6-f545-4c72-bec4-ab951276da1d`
|
|
string version = 2; // `autogenpb:version:v0.0.1`
|
|
repeated Event events = 3;
|
|
}
|