#tcp-stream #capture #packet #libpcap #devices #list #reassemble

tcp-stream-capture

Capture TCP packets from libpcap and reassemble them into TCP streams

2 unstable releases

0.2.0 May 27, 2024
0.1.0 May 26, 2024

#4 in #libpcap

Unlicense

1.5MB
33K SLoC

C++ 28K SLoC // 0.0% comments C 3K SLoC // 0.2% comments Python 1K SLoC // 0.1% comments Rust 463 SLoC // 0.0% comments Shell 8 SLoC

tcp-stream-capture

Capture TCP packets from libpcap and reassemble them into TCP streams.

To run example 1 (list available capture devices):

cargo run --example list_devices

To run example 2 (capture from first available device):

cargo build --example cap_live
sudo setcap cap_net_raw,cap_net_admin=ep target/debug/examples/cap_live
RUST_LOG=debug target/debug/examples/cap_live

References:

Dependencies

~0.8–2.4MB
~36K SLoC