l3_centralizedattackdetector.proto 1.53 KB
Newer Older
ldemarcosm's avatar
ldemarcosm committed
syntax = "proto2";

service l3_centralizedattackdetector {
  // Sends a greeting
  rpc send_input (model_input) returns (empty) {}
  // Sends another greeting
  rpc get_output (empty) returns (model_output) {}
}

message model_input {
	/*
	Model input sent to the Inferencer by the client
	There are currently 9 values and 
	*/

    // Machine learning
	required float n_packets_server_seconds = 1;
	required float n_packets_client_seconds = 2;
	required float n_bits_server_seconds = 3;
	required float n_bits_client_seconds = 4;
	required float n_bits_server_n_packets_server = 5;
	required float n_bits_client_n_packets_client = 6;
	required float n_packets_server_n_packets_client = 7;
	required float n_bits_server_n_bits_client = 8;

	// Conection identifier
	required string ip_o = 9;
	required string port_o = 10;
	required string ip_d = 11;
	required string port_d = 12;
	required string flow_id = 13;
	required string protocol = 14;
	optional float time_start = 15;
	optional float time_end = 16;
}

message empty {
	optional string message = 1;
}

message model_output {
	required float confidence = 1;
	required string timestamp = 2;
	required string ip_o = 3;	
	required string tag_name = 4;
	required int32 tag = 5;
	required string flow_id = 6;
	required string protocol = 7;
	required string port_d = 8;
	optional string ml_id = 9;
	optional float time_start = 10;
	optional float time_end = 11;
}

// Collections or streams?
/*
message input_collection {
	repeated model_input = 1;
}

message output_collection {
	repeated model_output = 1;
}
*/