From 451a320920c6e2f60445938aa98d4fe817c3d36a Mon Sep 17 00:00:00 2001 From: Mosder Date: Tue, 15 Sep 2026 15:52:47 +0200 Subject: formatting: run codebase through new .clang-format --- analyzer/utils/tcp.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'analyzer/utils/tcp.c') diff --git a/analyzer/utils/tcp.c b/analyzer/utils/tcp.c index a5d0366..8979483 100644 --- a/analyzer/utils/tcp.c +++ b/analyzer/utils/tcp.c @@ -56,7 +56,8 @@ TCPSegment get_segment_from_packet(const byte_t *packet, const struct pcap_pkthd return segment; // get TCP header - const struct tcphdr *tcp_header = (const struct tcphdr *)(packet + eth_header_len + ip_header_len); + const struct tcphdr *tcp_header = + (const struct tcphdr *)(packet + eth_header_len + ip_header_len); int tcp_header_len = tcp_header->th_off * 4; // get TCP sequence number and client port @@ -91,8 +92,9 @@ void remove_parsed_data(TCPStream *stream, size_t parsed_len) { stream->seq += parsed_len; } -// get the index of the first relevant byte in segment (its tcp sequence number is the one stream is expecting) -// return the index of the first relevant byte in payload or -1 if segment isn't directly connected to stream +// get the index of the first relevant byte in segment (its tcp sequence number is the one stream is +// expecting) return the index of the first relevant byte in payload or -1 if segment isn't directly +// connected to stream int get_first_relevant_byte_index(TCPStream stream, TCPSegment segment) { // expected tcp sequence numbers for stream and segment uint32_t stream_expected = stream.seq + stream.bytes.count; @@ -124,7 +126,8 @@ void add_pending_segments(TCPStream *stream) { top_changed = 1; } - // remove top if it was just added or no longer is in acceptable range (e.g. was contained within another one pending) + // remove top if it was just added or no longer is in acceptable range (e.g. was contained + // within another one pending) if (top_changed || !in_acceptable_range(*stream, *top)) { heap_top_remove(stream->pending); } -- cgit v1.2.3