Crates.io | pcarp |
lib.rs | pcarp |
version | 2.0.0 |
source | src |
created_at | 2018-11-08 10:13:33.523491 |
updated_at | 2023-03-16 07:04:05.284872 |
description | A pure-Rust library for reading pcap-ng files |
homepage | |
repository | https://github.com/asayers/pcarp |
max_upload_size | |
id | 95456 |
size | 108,132 |
A pure-Rust library for reading pcapng files.
tshark
across a [broad test suite][integration_tests/].libpcap
.Read
.Packet
s - no lifetimes.libpcap
is full of features; pcarp
just reads packets out of pcapng files.
Limitations compared to libpcap
:
pcarp
is pcapng-only.pcarp
is read-only.pcarp
gives you the raw packet data.If you want to parse ethernet/IP/TCP/whatever protocol, you need another library. We use etherparse and it works well. There's also pnet or rshark, although I haven't tried them.
pcarp
is designed to be very resilient to errors, even given malformed or
malicious input.
tracing
crate and carry on.pcarp should never panic. It's fuzzed to help ensure that this is the case, but fuzzing isn't perfect. If you experience a crash, please report it!
The software itself is in the public domain.
Some of the documentation is copied from the pcap spec, so the copyright is owned by the IETF; these places are cleary marked. The pcaps used by the integration tests are distributed by the Wireshark Foundation under the terms of the GNU GPL.