-
- Downloads
net: log packets going through loopback and virtio-net.
There was no way to sniff packets going through OSv's loopback interface. I faced a need to debug in-guest TCP traffic. Packets are logged using tracing infrastructure. Packet data is serialized as sample data up to a limit, which is currently hardcoded to 128 bytes. To enable capturing of packets just enable tracepoints named: - net_packet_loopback - net_packet_eth Raw data can be seen in `trace list` output. Better presentation methods will be added in the following patches. This may also become useful when debugging network problems in the cloud, as we have no ability to run tcpdump on the host there. Signed-off-by:Tomasz Grabiec <tgrabiec@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
Showing
- bsd/sys/net/if_loop.cc 2 additions, 0 deletionsbsd/sys/net/if_loop.cc
- build.mk 1 addition, 0 deletionsbuild.mk
- core/net_trace.cc 148 additions, 0 deletionscore/net_trace.cc
- drivers/virtio-net.cc 6 additions, 2 deletionsdrivers/virtio-net.cc
- include/osv/net_trace.hh 17 additions, 0 deletionsinclude/osv/net_trace.hh
Loading
Please register or sign in to comment