Skip to content
Snippets Groups Projects
Commit 27248a0e authored by Michael Tüxen's avatar Michael Tüxen
Browse files

Improve printing of UDP encapulated TCP segments.

Ensure that there is no space before /udp().
parent 01308663
No related branches found
No related tags found
No related merge requests found
......@@ -202,23 +202,23 @@ static int tcp_packet_to_string(FILE *s, struct packet *packet, int i,
if (packet->tcp->cwr)
fputc('W', s); /* Congestion *W*indow reduced (ECN) */
fprintf(s, " %u:%u(%u) ",
fprintf(s, " %u:%u(%u)",
ntohl(packet->tcp->seq),
ntohl(packet->tcp->seq) + packet_payload_len(packet),
packet_payload_len(packet));
if (packet->tcp->ack)
fprintf(s, "ack %u ", ntohl(packet->tcp->ack_seq));
fprintf(s, " ack %u", ntohl(packet->tcp->ack_seq));
if (!(packet->flags & FLAG_WIN_NOCHECK))
fprintf(s, "win %u ", ntohs(packet->tcp->window));
fprintf(s, " win %u", ntohs(packet->tcp->window));
if (packet_tcp_options_len(packet) > 0) {
char *tcp_options = NULL;
if (tcp_options_to_string(packet, &tcp_options, error))
result = STATUS_ERR;
else
fprintf(s, "<%s>", tcp_options);
fprintf(s, " <%s>", tcp_options);
free(tcp_options);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment