{"id":18408274,"url":"https://github.com/protectwise/pcap-async","last_synced_at":"2025-04-07T08:33:01.463Z","repository":{"id":53322941,"uuid":"159876314","full_name":"protectwise/pcap-async","owner":"protectwise","description":"Pure rust wrapper around pcap-sys","archived":false,"fork":false,"pushed_at":"2021-03-31T13:11:24.000Z","size":3940,"stargazers_count":9,"open_issues_count":5,"forks_count":4,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-22T16:02:10.043Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/protectwise.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-11-30T20:40:53.000Z","updated_at":"2022-03-15T20:32:32.000Z","dependencies_parsed_at":"2022-09-02T04:22:59.320Z","dependency_job_id":null,"html_url":"https://github.com/protectwise/pcap-async","commit_stats":null,"previous_names":["dbcfd/pcap-async"],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/protectwise%2Fpcap-async","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/protectwise%2Fpcap-async/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/protectwise%2Fpcap-async/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/protectwise%2Fpcap-async/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/protectwise","download_url":"https://codeload.github.com/protectwise/pcap-async/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247620832,"owners_count":20968295,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T03:18:06.156Z","updated_at":"2025-04-07T08:32:56.444Z","avatar_url":"https://github.com/protectwise.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pcap-async\n\n[![build status][travis-badge]][travis-url]\n[![crates.io version][crates-badge]][crates-url]\n[![docs.rs docs][docs-badge]][docs-url]\n[![MIT licensed][mit-badge]][mit-url]\n\nRust async wrapper around [pcap-sys](https://github.com/protectwise/pcap-sys). Utilizes [Futures 0.3](https://github.com/rust-lang-nursery/futures-rs) and [Smol](https://github.com/stjepang/smol).\n\n[Documentation](https://docs.rs/pcap-async/latest/)\n\n[travis-badge]: https://travis-ci.com/protectwise/pcap-async.svg?branch=master\n[travis-url]: https://travis-ci.com/protectwise/pcap-async\n[crates-badge]: https://img.shields.io/crates/v/pcap-async.svg?style=flat-square\n[crates-url]: https://crates.io/crates/pcap-async\n[docs-badge]: https://img.shields.io/badge/docs.rs-latest-blue.svg?style=flat-square\n[docs-url]: https://docs.rs/pcap-async\n[mit-badge]: https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square\n[mit-url]: LICENSE-MIT\n\n## Usage\n\nFirst, add this to your `Cargo.toml`:\n\n```toml\n[dependencies]\npcap-async = \"0.3\"\n```\n\nNext, add this to your crate:\n\n```rust\nuse futures::StreamExt;\nuse pcap_async::{Config, Handle, PacketStream};\n\nfn main() {\n    smol::run(async move {\n        let handle = Handle::lookup().expect(\"No handle created\");\n        let mut provider = PacketStream::new(Config::default(), handle)\n            .expect(\"Could not create provider\")\n            .fuse();\n        while let Some(packets) = provider.next().await {\n    \n        }\n        handle.interrupt();\n    })\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprotectwise%2Fpcap-async","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprotectwise%2Fpcap-async","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprotectwise%2Fpcap-async/lists"}