mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-26 03:09:08 +00:00
Kernel: Record network statistics and expose as JSON
This is comprised of five small changes: * Keep a counter for tx/rx packets/bytes per TCP socket * Keep a counter for tx/rx packets/bytes per network adapter * Expose that data in /proc/net_tcp and /proc/netadapters * Convert /proc/netadapters to JSON * Fix up ifconfig to read the JSON from netadapters
This commit is contained in:
committed by
Andreas Kling
parent
061c092fae
commit
7ed54d86d5
@@ -334,6 +334,8 @@ void handle_tcp(const EthernetFrameHeader& eth, int frame_size)
|
||||
return;
|
||||
}
|
||||
|
||||
socket->record_incoming_data(ipv4_packet.payload_size());
|
||||
|
||||
#ifdef TCP_DEBUG
|
||||
kprintf("handle_tcp: state=%s\n", TCPSocket::to_string(socket->state()));
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user