PackageTrack
Sign in Get early access

pcap

A packet capture API around pcap/wpcap

2.5.0 7.7M downloads/mo #3578 most downloaded on crates.io rust-pcap/pcap

What this package is like to depend on

Last release 8 days ago

15 Aug 2026

Ships fairly regularly

a new release about every 4 months

Some releases are documented

notes for 19 of 46 stable releases

Nothing withdrawn

no release was ever pulled

11 years old

46 releases · first in 2015

2 releases in the last 12 months

see the full history below

Release timeline

46 releases · Mar 2015 to Aug 2026
2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 46
  1. 2.5.0 15 Aug 2026
    Release notes

    Added

    • Binding for pcap_dispatch added. It can be accessed via the dispatch call on Activated captures and processes a batch of packets per call, making packet loss less likely in high traffic situations.
    Open source →
  2. 2.4.0 26 Nov 2025
    Release notes

    Changed

    • MSRV is now 1.64.
    • Binding for pcap_breakloop added. It can be accessed via the breakloop_handle call on Activated captures.
    Open source →
  3. 2.3.0 19 Jul 2025
    Release notes

    Added

    • Added packet_header_size() for applications that need to know the size of internal type pcap_pkthdr (for instance to calculate exact send queue sizes).
    Open source →
  4. 2.2.0 01 Sep 2024
    Release notes

    Added

    • Added an implementation of AsFd on Capture<Active> on non-Windows.
    Open source →
  5. 2.1.0 27 Aug 2024
    Release notes

    Added

    • Add want_pktap on Capture<Inactive> for Mac OS.
    Open source →
  6. 2.0.0 21 Apr 2024
    Release notes

    Changed

    • Rust Edition is now 2021.
    • MSRV is now 1.63.0.
    Open source →
  7. 1.3.0 15 Mar 2024
    Release notes

    Added

    • Binding for pcap_loop added. It can be accessed via the for_each call on Activated captures.
    Open source →
  8. 1.2.0 19 Jan 2024
    Release notes

    Added

    • capture-stream support added for Windows.
    Open source →
  9. 1.1.0 12 May 2023
    Release notes

    Added

    • lending-iter UNSTABLE feature that introduces lending iterator using GATs.

    Changed

    • Examples in the docs have been fixed.
    Open source →
  10. 1.0.0 19 Nov 2022
    Release notes

    Changed

    • Public API declared stable.
    Open source →
  11. 0.11.0 01 Oct 2022
    Release notes

    Added

    • SendQueue::queue_sg() can add scattered packets, as a slice of std::io::IoSlices, to SendQueues.

    Changed

    • Rename sendqueue::Sync to sendqueue::SendSync to avoid collision with Sync in std's prelude.
    • Build script will fall back to pkg-config if available and LIBPCAP_LIBDIR hasn't been explicitly set.
    Open source →
  12. 0.10.1 17 Aug 2022
    Release notes

    Changed

    • MSRV is now 1.46.0.
    Open source →
  13. 0.10.0 16 Aug 2022
    Release notes

    Added

    • doc will now include all features.
    • Support for sendqueues on Windows.
    • PacketStream::capture_mut to still be able to inject packets when using PacketStream.
    • Capture::iter() that return an iterator that use a codec like Capture::stream().
    • Packet<Dead>::dead_with_precision to enable creating a pcap with nanosecond precision.
    • flags field to Device.

    Removed

    • BpfProgram no longer have Clone implementation see #261

    Changed

    • MSRV is now 1.41.0.
    • PacketStream has been moved from mod stream to the root of the crate.
    • PacketCodec has been moved from mod stream to the root of the crate.
    • PacketCodec::decode() no longer returns a Result.
    • PacketCodec::Type has been renamed to PacketCodec::Item.
    • Device::lookup now returns Result<Option<Device>, Error> rather than Result<Device, Error>. Ok(None) means that the lookup succeeded, but no suitable devices were available. This is consistent with libpcap.
    • Capture and Savefile no longer implement the Sync trait. The underlying libpcap library does not promise thread-safe access for the same capture object from multiple threads.
    • Switched from winapi to windows-sys for Windows builds. windows-sys requires rustc 1.46.0.
    • Capture::next have been rename next_packet to avoid any confusion with Iterator::next.

    Removed

    • mod stream is no longer public.
    • docs-rs feature.
    • full feature.
    • stream::SelectableFd and stream::PacketStream::new as they were only meant to be used internally.
    Open source →
  14. 0.9.2 14 Apr 2022
    Release notes

    Changed

    • capture-stream requires rustc version 1.49.0 due to dependency on tokio.
    Open source →
  15. 0.9.1 07 Nov 2021
    Release notes

    Added

    • Support for device addresses.
    Open source →
  16. 0.9.0 12 Sep 2021
    Release notes

    Added

    • savefile.flush support.

    Changed

    • Updated dependency tokio from version 0.2 to 1.0.
    • capture-stream requires rustc version 1.45.0 due to dependency on tokio.
    Open source →
  17. 0.8.1 30 Dec 2020
    Release notes

    Changed

    • Fix docs.rs build.
    Open source →
  18. 0.8.0 30 Dec 2020
    Release notes

    Added

    • Derive(Clone) to Device struct (#100).
    • Build-time libpcap version detection.
    • Support for immediate mode.
    • Const value for Linktype (#145).
    • Support for BPF compile.

    Changed

    • Opt into Rust 2018.
    • Now minimum supported rustc version is 1.40.0.
    • Updated dependency from deprecated tokio-core to tokio 0.2.
    • Updated dependency futures from version 0.1 to 0.3.
    • Feature tokio renamed to capture-stream because Cargo does not allow features and dependencies to have the same name.
    • PCAP_LIBDIR renamed to LIBPCAP_LIBDIR to distinguish the pcap crate from the libpcap library.
    • All methods that construct objects out of a RawFd are now unsafe.
    • All methods that take a raw pointer are now unsafe. Some of these functions were renamed from new to from_handle to underline this.

    Removed

    • Feature flags pcap-savefile-append, pcap-fopen-offline-precision (replaced by build-time libpcap version detection).
    Open source →
  19. 0.7.0 04 Aug 2017
    Release notes

    No Changelog entries for <= 0.7.0.

    Open source →
  20. 0.6.1 19 Jun 2017

    Nothing published for this version

  21. 0.6.0 20 May 2017

    Nothing published for this version

  22. 0.5.7 26 Apr 2016

    Nothing published for this version

  23. 0.5.6 21 Apr 2016

    Nothing published for this version

  24. 0.5.5 14 Apr 2016

    Nothing published for this version

  25. 0.5.4 07 Mar 2016

    Nothing published for this version

  26. 0.5.3 28 Feb 2016

    Nothing published for this version

  27. 0.5.2 14 Dec 2015

    Nothing published for this version

  28. 0.5.1 13 Dec 2015

    Nothing published for this version

  29. 0.5.0 29 Oct 2015

    Nothing published for this version

  30. 0.4.2 17 Sep 2015

    Nothing published for this version

  31. 0.4.1 12 Sep 2015

    Nothing published for this version

  32. 0.4.0 10 Sep 2015

    Nothing published for this version

  33. 0.3.3 07 Sep 2015

    Nothing published for this version

  34. 0.3.2 06 Aug 2015

    Nothing published for this version

  35. 0.3.1 04 Aug 2015

    Nothing published for this version

  36. 0.3.0 31 Jul 2015

    Nothing published for this version

  37. 0.2.3 27 Jul 2015

    Nothing published for this version

  38. 0.2.2 27 Jul 2015

    Nothing published for this version

  39. 0.2.1 20 Jul 2015

    Nothing published for this version

  40. 0.2.0 15 Jul 2015

    Nothing published for this version

  41. 0.1.3 17 Jun 2015

    Nothing published for this version

  42. 0.1.2 20 May 2015

    Nothing published for this version

  43. 0.1.1 03 Apr 2015

    Nothing published for this version

  44. 0.1.0 26 Mar 2015

    Nothing published for this version

  45. 0.0.2 11 Mar 2015

    Nothing published for this version

  46. 0.0.1 10 Mar 2015

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive