From 9e874301350a70a1ba40b5508878d559f68f8f4a Mon Sep 17 00:00:00 2001 From: Mosder Date: Tue, 28 Jul 2026 16:38:04 +0200 Subject: refactor: generalized dynamic arrays with structures/array.h --- analyzer/utils/tcp.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'analyzer/utils/tcp.h') diff --git a/analyzer/utils/tcp.h b/analyzer/utils/tcp.h index 382c585..55cbf3e 100644 --- a/analyzer/utils/tcp.h +++ b/analyzer/utils/tcp.h @@ -4,6 +4,7 @@ #include #include "structures/heap.h" +#include "structures/array.h" #ifndef TCP_H #define TCP_H @@ -32,9 +33,7 @@ extern TCPSegment get_segment_from_packet(const byte_t *packet, const struct pca // struct that stores all the information about stream typedef struct { - byte_t *data; // bytes in the stream - size_t len; // length of the stream - size_t capacity; // capacity of the data buffer + DynArray bytes; // bytes in the stream uint32_t seq; // TCP sequence number of the first byte in the stream uint16_t port; // client port of currently analyzed connection ConnectionSource src; // stream's source -- cgit v1.2.3