blob: 6b17526c8af444b15c31b6837185a6e34e067eb2 (
plain)
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
  | 
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;
}
  |