rust-pcap / pcap

Rust language pcap library
Apache License 2.0
595 stars 138 forks source link

Why deprecated pcap_loop method #293

Closed guoxiangCN closed 1 year ago

Stargateur commented 1 year ago

can you be more precise ? this method doesn't exist.

guoxiangCN commented 1 year ago

Thanks for you reply! It appears in the source code, but it is not released to users Perhaps it is an api introduced by a higher version? https://github.com/rust-pcap/pcap/blob/main/src/raw.rs#L122

Stargateur commented 1 year ago

this pcap function is not very useful, this pcap crate purpose is not to expose low level pcap call, you can find an exemple of how to loop over packets here https://github.com/rust-pcap/pcap/blob/main/examples/iterprint.rs

Wojtek242 commented 1 year ago

@Stargateur is correct. So far, everybody's needs are satisfied with what's in this crate.

If you think there is a use for pcap_loop beyond what this crate already provides and that can be exposed through the crate's Rust API, please submit a PR.