github.com/google/fleetspeak@v0.1.15-0.20240426164851-4f31f62c1aea/fleetspeak/src/inttesting/frr/proto/fleetspeak_frr/frr.proto (about)

     1  syntax = "proto3";
     2  
     3  package fleetspeak.frr;
     4  
     5  import "fleetspeak/src/common/proto/fleetspeak/common.proto";
     6  
     7  option go_package = "github.com/google/fleetspeak/fleetspeak/src/inttesting/frr/proto/fleetspeak_frr";
     8  
     9  // Contains the information needed to configure a frr server component.
    10  message Config {
    11    // The address to reach the master frr server over grpc.
    12    string master_server = 1;
    13  }
    14  
    15  // A TrafficRequest message is sent from the server to the client which tells
    16  // the client to send random data back.
    17  message TrafficRequestData {
    18    // An identifier used to identify the frr master instance responsible for
    19    // this.
    20    int64 master_id = 1;
    21  
    22    // An identifier used to link responses to requests.
    23    int64 request_id = 2;
    24  
    25    // How many messages to send back for this request. Defaults to 1.
    26    int64 num_messages = 3;
    27  
    28    // How large should each message be, in bytes. Defaults to 1024.
    29    int64 message_size = 4;
    30  
    31    // How long to wait between messages. Defaults to 0.
    32    int64 message_delay_ms = 5;
    33  
    34    // How much to jitter the previous parameters - all parameters will be
    35    // multiplied by a number between 1.0 and 1.0 + jitter.
    36    float jitter = 6;
    37  }
    38  
    39  message TrafficResponseData {
    40    int64 master_id = 1;
    41    int64 request_id = 2;
    42    int64 response_index = 3;
    43    bytes data = 4;
    44  
    45    // Set when this is the last message responsive to the given request.
    46    bool fin = 5;
    47  }
    48  
    49  // A FileRequest is sent from the server to the client and tells
    50  // the client to attempt to download a file from the server.
    51  message FileRequestData {
    52    // An identifier used to identify the frr master instance
    53    // responsible for this.
    54    int64 master_id = 1;
    55  
    56    // The name of the file to download.
    57    string name = 2;
    58  }
    59  
    60  // A FileResponse is sent from the client to the server and
    61  // reports that the client successfully downloaded a file from the
    62  // server.
    63  message FileResponseData {
    64    // An identifier used to identify the frr master instance
    65    // responsible for the underlying request.
    66    int64 master_id = 1;
    67  
    68    // The name of the file that was downloaded.
    69    string name = 2;
    70  
    71    // The size of the file that was downloaded.
    72    uint64 size = 3;
    73  }
    74  
    75  message MessageInfo {
    76    bytes client_id = 1;
    77    TrafficResponseData data = 2;
    78  }
    79  
    80  message FileResponseInfo {
    81    bytes client_id = 1;
    82    FileResponseData data = 2;
    83  }
    84  
    85  message CompletedRequestsRequest {
    86    string client_id = 1;
    87  }
    88  
    89  message CompletedRequestsResponse {
    90    repeated int64 request_ids = 1;
    91  }
    92  
    93  message CreateHuntRequest {
    94    TrafficRequestData data = 1;
    95    uint64 limit = 2;
    96    // If client_ids is empty, the request is considered a broadcast request with
    97    // specified limit, otherwise unicast requests are sent to the provided
    98    // clients.
    99    repeated string client_ids = 3;
   100  }
   101  
   102  message CreateHuntResponse {}
   103  
   104  // The service implemented by the FRR master server to collect data from the FRR
   105  // Fleetspeak server services.
   106  service Master {
   107    // RecordMessage records that a TrafficResponse message was received by
   108    // the FS server.
   109    rpc RecordTrafficResponse(MessageInfo) returns (fleetspeak.EmptyMessage) {}
   110  
   111    // RecordFileResponse records that a FileResponse message was received
   112    // by the FS server.
   113    rpc RecordFileResponse(FileResponseInfo) returns (fleetspeak.EmptyMessage) {}
   114  
   115    // CompletedRequests returns a list of requests made to a client which have
   116    // been completed.
   117    rpc CompletedRequests(CompletedRequestsRequest)
   118        returns (CompletedRequestsResponse) {}
   119  
   120    // CreateHunt initiates a hunt which sends the provided TrafficRequestData to
   121    // every client, up to limit.
   122    rpc CreateHunt(CreateHuntRequest) returns (CreateHuntResponse) {}
   123  }