syntax = "proto3"; import "google/protobuf/timestamp.proto"; option java_multiple_files = true; option java_package = "org.opensearch.migrations.trafficcapture.protos"; option java_outer_classname = "TrafficCapture"; //message InetAddr { // oneof ip_addr { // fixed32 v4 = 1; // bytes v6 = 2; // } //} message BindObservation { //InetAddr addr = 1; } message ConnectObservation {} message ReadObservation { bytes data = 1; } message ReadSegmentObservation { int32 count = 1; bytes data = 2; } message ProxyFinishesForwardingRequestObservation { bool timedOut = 1; } message WriteObservation { bytes data = 1; } message WriteSegmentObservation { int32 count = 1; bytes data = 2; } message CloseObservation {} message DisconnectObservation {} message ConnectionExceptionObservation { string message = 1; } message EndOfSegmentsIndication {} message EndOfMessageIndication { optional int32 firstLineByteLength = 1; optional int32 headersByteLength = 2; } message TrafficObservation { google.protobuf.Timestamp ts = 1; oneof Capture { BindObservation bind = 2; ConnectObservation connect = 3; ReadObservation read = 4; ReadSegmentObservation readSegment = 5; ProxyFinishesForwardingRequestObservation requestReleasedDownstream = 6; WriteObservation write = 8; WriteSegmentObservation writeSegment = 9; DisconnectObservation disconnect = 10; CloseObservation close = 11; ConnectionExceptionObservation connectionException = 12; // This seems a bit easier than adding a count of the number of segments that will be needed, // especially since the first segment might be smaller due to other observations already // having been committed to the stream. EndOfSegmentsIndication segmentEnd = 14; EndOfMessageIndication endOfMessageIndicator = 15; } } message TrafficStream { string connectionId = 1; // persistent identifier for all stream objects within a single connection string nodeId = 5; // unique namespace such as a nodeId or computer mac address repeated TrafficObservation subStream = 2; oneof index { int32 number = 3; int32 numberOfThisLastChunk = 4; } }