|
8 | 8 | "sync" |
9 | 9 | "time" |
10 | 10 |
|
11 | | - "github.com/google/uuid" |
12 | 11 | capture "github.com/kubeshark/api2/pkg/proto/capture/v1" |
13 | 12 | protoCommon "github.com/kubeshark/api2/pkg/proto/common/v1" |
14 | 13 | "github.com/kubeshark/gopacket" |
@@ -723,6 +722,7 @@ type OutputChannelItem struct { |
723 | 722 | Capture *Capture |
724 | 723 | Checksums []string |
725 | 724 | MatcherKey string |
| 725 | + FlowId uint64 |
726 | 726 | } |
727 | 727 |
|
728 | 728 | type ReadProgress struct { |
@@ -757,7 +757,7 @@ type Dissector interface { |
757 | 757 | Dissect(b *bufio.Reader, reader TcpReader) (err error) |
758 | 758 | Analyze(item *OutputChannelItem, resolvedSource *Resolution, resolvedDestination *Resolution) *Entry |
759 | 759 | Summarize(entry *Entry) *BaseEntry |
760 | | - Summarize2(entry *Entry, id uuid.UUID) *capture.BaseEntry |
| 760 | + Summarize2(entry *Entry, id uint64) *capture.BaseEntry |
761 | 761 | Represent(request interface{}, response interface{}, event *Event, data interface{}) (representation *Representation) |
762 | 762 | Macros() map[string]string |
763 | 763 | NewResponseRequestMatcher() RequestResponseMatcher |
@@ -787,6 +787,7 @@ func (e *Emitting) Emit(item *OutputChannelItem) { |
787 | 787 | item.Stream = e.Stream.GetPcapId() |
788 | 788 | item.Index = e.Stream.GetIndex() |
789 | 789 | item.Tls = e.Stream.GetTls() |
| 790 | + item.FlowId = e.Stream.GetFlowID() |
790 | 791 | e.Stream.IncrementItemCount() |
791 | 792 | e.OutputChannel <- item |
792 | 793 | } |
@@ -894,6 +895,7 @@ type Entry struct { |
894 | 895 | NetworkProps *protoCommon.NetworkProperties `json:"networkProps"` |
895 | 896 | CaptureSource protoCommon.CaptureSource `json:"captureSource"` |
896 | 897 | SubProtocol protoCommon.DissectedSubProtocol `json:"subProtocol"` |
| 898 | + FlowId uint64 `json:"flowId"` |
897 | 899 | } |
898 | 900 |
|
899 | 901 | func (e *Entry) BuildId() { |
@@ -1133,6 +1135,7 @@ type TcpStream interface { |
1133 | 1135 | GetChecksums() []string |
1134 | 1136 | GetNetworkProps() *protoCommon.NetworkProperties |
1135 | 1137 | GetCaptureSource() protoCommon.CaptureSource |
| 1138 | + GetFlowID() uint64 |
1136 | 1139 | Lock() |
1137 | 1140 | Unlock() |
1138 | 1141 | } |
|
0 commit comments