rust-pcap / pcap

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

Expose the raw module with a feature or move raw code to a different crate #361

Open flaviojs opened 1 week ago

flaviojs commented 1 week ago

I'd like some way to access the code in the raw module. Anything works for me, #96 already mentions the possibility of using a feature or moving raw code to a different crate.

Rationale: I'm converting code from C to rust bit by bit. There is lots of code, in the current stage I'm trying to stay as close to the unsafe original as possible to avoid introducing new bugs. At a later stage I'll be converting unsafe code to safe code.

Right now I'm working on code that uses libpcap. I want to use this crate later, so to avoid incompatibilities I should use stuff from the raw module.

Stargateur commented 1 week ago

I advice you to fork temporary and expose this just for you so you can do as you want. And later switch to rust-pcap of crates.io directly.

flaviojs commented 1 week ago

Nope, not a good idea in terms of (temporary) maintenance. For now I'm just copy-pasting what I need.

If this crate wants to be a rust replacement for using libpcap then it should facilitate the transition from C/C++ to rust. I don't mind doing the actual programming work, but the decision of where the crate wants to go should belong to the repo owners/maintainers.