api/proto/rpc/v1/pcap.proto

54 lines
1.4 KiB
Protocol Buffer
Raw Normal View History

2021-02-16 15:50:23 +00:00
syntax = "proto3";
2021-02-21 16:10:22 +00:00
package inetmock.rpc.v1;
2021-02-21 09:09:35 +00:00
option csharp_namespace = "INetMock.Client.Rpc";
2021-02-22 09:59:40 +00:00
option go_package = "gitlab.com/inetmock/inetmock/pkg/rpc/v1";
2021-02-16 15:50:23 +00:00
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;
}
2021-02-21 16:10:22 +00:00
repeated PCAPDevice available_devices = 1;
2021-02-16 15:50:23 +00:00
}
2021-02-21 16:10:22 +00:00
message ListActiveRecordingsRequest {}
2021-02-16 15:50:23 +00:00
2021-02-21 16:10:22 +00:00
message ListActiveRecordingsResponse {
2021-02-21 09:09:35 +00:00
repeated string subscriptions = 1;
2021-02-16 15:50:23 +00:00
}
2021-02-21 16:10:22 +00:00
message StartPCAPFileRecordingRequest {
2021-02-21 09:09:35 +00:00
string device = 1;
2021-02-21 16:10:22 +00:00
string target_path = 2;
2021-02-21 09:09:35 +00:00
bool promiscuous = 3;
2021-02-21 16:10:22 +00:00
google.protobuf.Duration read_timeout = 4;
2021-02-16 15:50:23 +00:00
}
2021-02-21 16:10:22 +00:00
message StartPCAPFileRecordingResponse {
string resolved_path = 1;
2021-02-16 15:50:23 +00:00
}
message StopPCAPFileRecordingRequest {
2021-02-21 16:10:22 +00:00
string consumer_key = 1;
2021-02-16 15:50:23 +00:00
}
message StopPCAPFileRecordingResponse {
2021-02-21 09:09:35 +00:00
bool removed = 1;
2021-02-16 15:50:23 +00:00
}
2021-02-21 16:10:22 +00:00
service PCAPService {
2021-02-21 09:09:35 +00:00
rpc ListAvailableDevices(ListAvailableDevicesRequest) returns (ListAvailableDevicesResponse);
2021-02-21 16:10:22 +00:00
rpc ListActiveRecordings(ListActiveRecordingsRequest) returns (ListActiveRecordingsResponse);
rpc StartPCAPFileRecording(StartPCAPFileRecordingRequest) returns (StartPCAPFileRecordingResponse);
rpc StopPCAPFileRecording(StopPCAPFileRecordingRequest) returns (StopPCAPFileRecordingResponse);
2021-02-17 14:39:06 +00:00
}