Skip to content

Commit e81ec0e

Browse files
authored
Merge pull request #110 from CESNET/tcp_seq_ack_fix
FIX: Parsing TCP SEQ and TCP ACK numbers
2 parents 0594d27 + 5b846ba commit e81ec0e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

input/parser.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,8 +382,11 @@ inline uint16_t parse_tcp_hdr(const u_char *data_ptr, uint16_t data_len, Packet
382382
throw "Parser detected malformed packet";
383383
}
384384

385+
385386
pkt->src_port = ntohs(tcp->source);
386387
pkt->dst_port = ntohs(tcp->dest);
388+
pkt->tcp_seq = ntohl(tcp->seq);
389+
pkt->tcp_ack = ntohl(tcp->ack_seq);
387390
pkt->tcp_flags = (uint8_t) *(data_ptr + 13) & 0xFF;
388391
pkt->tcp_window = ntohs(tcp->window);
389392

0 commit comments

Comments
 (0)