api/proto/rpc/pcap.proto

54 lines
1.3 KiB
Protocol Buffer
Raw Normal View History

2021-02-16 15:50:23 +00:00
syntax = "proto3";
2021-02-21 09:09:35 +00:00
package inetmock.rpc;
option csharp_namespace = "INetMock.Client.Rpc";
2021-02-16 15:50:23 +00:00
option go_package = "gitlab.com/inetmock/inetmock/pkg/rpc";
option java_multiple_files = true;
option java_outer_classname = "AuditProto";
2021-02-21 09:09:35 +00:00
option java_package = "com.github.baez90.inetmock.rpc";
2021-02-16 15:50:23 +00:00
2021-02-17 14:39:06 +00:00
import "google/protobuf/duration.proto";
2021-02-21 09:09:35 +00:00
message ListAvailableDevicesRequest {}
2021-02-16 15:50:23 +00:00
message ListAvailableDevicesResponse {
2021-02-21 09:09:35 +00:00
message PCAPDevice {
string name = 1;
repeated bytes addresses = 2;
}
repeated PCAPDevice availableDevices = 1;
2021-02-16 15:50:23 +00:00
}
2021-02-21 09:09:35 +00:00
message ListRecordingsRequest {}
2021-02-16 15:50:23 +00:00
message ListRecordingsResponse {
2021-02-21 09:09:35 +00:00
repeated string subscriptions = 1;
2021-02-16 15:50:23 +00:00
}
2021-02-19 12:59:14 +00:00
message StartPCAPFileRecordRequest {
2021-02-21 09:09:35 +00:00
string device = 1;
string targetPath = 2;
bool promiscuous = 3;
google.protobuf.Duration readTimeout = 4;
2021-02-16 15:50:23 +00:00
}
2021-02-19 12:59:14 +00:00
message StartPCAPFileRecordResponse {
2021-02-21 09:09:35 +00:00
string resolvedPath = 1;
2021-02-16 15:50:23 +00:00
}
2021-02-19 12:59:14 +00:00
message StopPCAPFileRecordRequest {
2021-02-21 09:09:35 +00:00
string consumerKey = 1;
2021-02-16 15:50:23 +00:00
}
2021-02-19 12:59:14 +00:00
message StopPCAPFileRecordResponse {
2021-02-21 09:09:35 +00:00
bool removed = 1;
2021-02-16 15:50:23 +00:00
}
service PCAP {
2021-02-21 09:09:35 +00:00
rpc ListAvailableDevices(ListAvailableDevicesRequest) returns (ListAvailableDevicesResponse);
rpc ListActiveRecordings(ListRecordingsRequest) returns (ListRecordingsResponse);
rpc StartPCAPFileRecording(StartPCAPFileRecordRequest) returns (StartPCAPFileRecordResponse);
rpc StopPCAPFileRecord(StopPCAPFileRecordRequest) returns (StopPCAPFileRecordResponse);
2021-02-17 14:39:06 +00:00
}