Commit c2e535a0 authored by Ricard Vilalta's avatar Ricard Vilalta
Browse files

Preparing for proto freeze

parent 55e5ee56
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
#!/bin/bash
python3 -m grpc_tools.protoc -I=./ --python_out=src/ --grpc_python_out=src/ *.proto
python3 -m grpc_tools.protoc -I=./ --python_out=../src/ --grpc_python_out=../src/ *.proto
#requires installation of protoc-gen-uml
export PATH=${HOME}/protoc-gen-uml/target/universal/stage/bin:$PATH
protoc --uml_out=uml/ -I ./ *.proto
+8 −11
Original line number Diff line number Diff line
syntax = "proto3";

import "context.proto";

service L3Attackmitigator{
  // Sends a greeting
  rpc SendOutput (Output) returns (EmptyMitigator) {}
  rpc SendOutput (L3AttackmitigatorOutput) returns (context.Empty) {}
  // Sends another greeting
  rpc GetMitigation (EmptyMitigator) returns (EmptyMitigator) {}
}


message EmptyMitigator {
	optional string message = 1;
  rpc GetMitigation (context.Empty) returns (context.Empty) {}
}


message Output {
message L3AttackmitigatorOutput {
	float confidence = 1;
	string timestamp = 2;
	string ip_o = 3;	
@@ -22,7 +19,7 @@ message Output {
	string flow_id = 6;
	string protocol = 7;
	string port_d = 8;
	optional string ml_id = 9;
	optional float time_start = 10;
	optional float time_end = 11;
	string ml_id = 9;
	float time_start = 10;
	float time_end = 11;
}
+10 −10
Original line number Diff line number Diff line
@@ -2,12 +2,12 @@ syntax = "proto3";

service L3Centralizedattackdetector {
  // Sends a greeting
  rpc SendInput (ModelInput) returns (Empty) {}
  rpc SendInput (L3CentralizedattackdetectorMetrics) returns (Empty) {}
  // Sends another greeting
  rpc GetOutput (Empty) returns (ModelOutput) {}
  rpc GetOutput (Empty) returns (L3CentralizedattackdetectorModelOutput) {}
}

message ModelInput {
message L3CentralizedattackdetectorMetrics {
	/*
	Model input sent to the Inferencer by the client
	There are currently 9 values and 
@@ -30,15 +30,15 @@ message ModelInput {
	string port_d = 12;
	string flow_id = 13;
	string protocol = 14;
	optional float time_start = 15;
	optional float time_end = 16;
	float time_start = 15;
	float time_end = 16;
}

message Empty {
	optional string message = 1;
	string message = 1;
}

message ModelOutput {
message L3CentralizedattackdetectorModelOutput {
	float confidence = 1;
	string timestamp = 2;
	string ip_o = 3;	
@@ -47,9 +47,9 @@ message ModelOutput {
	string flow_id = 6;
	string protocol = 7;
	string port_d = 8;
	optional string ml_id = 9;
	optional float time_start = 10;
	optional float time_end = 11;
	string ml_id = 9;
	float time_start = 10;
	float time_end = 11;
}

// Collections or streams?

proto/uml/Empty.png

0 → 100644
+4.28 KiB
Loading image diff...
+9.82 KiB
Loading image diff...
Loading