diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-12-14 13:03:26 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-12-14 13:03:26 +0100 |
commit | 8de5a0be4164e0db4401c9b6d5fd0c2799c52feb (patch) | |
tree | c598fb3348dbcde60729017e92278d3d296a70f1 /Kernel | |
parent | 9d67a6ba342bb156a8362593ed90c25aa3134cf1 (diff) | |
download | serenity-8de5a0be4164e0db4401c9b6d5fd0c2799c52feb.zip |
TCP: Log packet metadata when receiving a TCP packet with no socket
Diffstat (limited to 'Kernel')
-rw-r--r-- | Kernel/Net/NetworkTask.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Kernel/Net/NetworkTask.cpp b/Kernel/Net/NetworkTask.cpp index 3e6f44f231..fcbff30eaa 100644 --- a/Kernel/Net/NetworkTask.cpp +++ b/Kernel/Net/NetworkTask.cpp @@ -367,6 +367,20 @@ void handle_tcp(const IPv4Packet& ipv4_packet) auto socket = TCPSocket::from_tuple(tuple); if (!socket) { kprintf("handle_tcp: No TCP socket for tuple %s\n", tuple.to_string().characters()); + kprintf("handle_tcp: source=%s:%u, destination=%s:%u seq_no=%u, ack_no=%u, flags=%w (%s%s%s%s), window_size=%u, payload_size=%u\n", + ipv4_packet.source().to_string().characters(), + tcp_packet.source_port(), + ipv4_packet.destination().to_string().characters(), + tcp_packet.destination_port(), + tcp_packet.sequence_number(), + tcp_packet.ack_number(), + tcp_packet.flags(), + tcp_packet.has_syn() ? "SYN " : "", + tcp_packet.has_ack() ? "ACK " : "", + tcp_packet.has_fin() ? "FIN " : "", + tcp_packet.has_rst() ? "RST " : "", + tcp_packet.window_size(), + payload_size); return; } |