Cargo Features

Rscap has no features set by default.

[dependencies]
rscap = { version = "0.2.2", features = ["npcap", "npcap-runtime"] }
npcap npcap-runtime?

Enables use of the npcap driver on Windows systems when the necessary dll libraries are present.

If Packet.dll is not present on the system, this option will gracefully return runtime errors for any npcap APIs used and revert to pktmon for platform-agnostic APIs on Windows. Note that this will incur a runtime performance hit, but only at the time of socket creation--the socket will load Packet.dll as a runtime library when it is constructed and unload the dll when the socket is destroyed. This has no performance hit during packet capture or transmission, but opening several sockets in this mode will produce a significant memory footprint from the repeatedly loaded dlls.

Affects rscap::npcap

npcap-runtime = npcap

Requires the npcap driver for Windows systems.

Unlike npcap, this option will not immediately abort the process if Packet.dll cannot be loaded on program start. The dll is loaded once on program startup, so socket creation does not incur any additional overheads.