MCPcopy Index your code
hub / github.com/Rubensei/windivert-rust

github.com/Rubensei/windivert-rust @windivert-sys-0.10.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release windivert-sys-0.10.0 ↗ · + Follow
227 symbols 325 edges 16 files 81 documented · 36%

Browse by type

Functions 186 Types & classes 41
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

WinDivert 2 Rust Wrapper

GitHub

Note: This is a work in process, so the crates won't follow semantic versioning until 1.0.0 release, so any version change below 1.0.0 might introduce breaking changes in the API or the crate usage in general.

This projects allows you to use WinDivert from rust. It consists of two crates:

  • windivert-sys crates.io docs dependency status: Crate providing raw bindings to the WinDivert user mode library.
  • windivert crates.io docs dependency status: (WIP) Built on top of windivert-sys and providing a friendlier Rust API and some abstractions.

Build

To be able to build windivert-sys you require WinDivert library files:

  • It's recommended to specify the path of the folder containing downloaded dll, lib & sys files using the WINDIVERT_PATH environment variable.
  • As a fallback windivert dll & lib files can be compiled from source if the vendored feature is enabled. To avoid multiple compilations set WINDIVERT_DLL_OUTPUT environment variable to save the generated build.
  • It's possible to compile for statically linking to the windivert library by enabling the static feature. Static linking can also be enabled if the WINDIVERT_STATIC is set and it takes priority over the crate features.
  • Any vendoring method will only compile the library. Sys files must always be provided.

Usage

  • windivert-sys shares the same API the native library uses. Read official documentation for more details.
  • windivert WIP

Note: WinDivert dll expects the corresponding driver sys file to be located on the same folder. Since the dll lib & sys files come in the same folder when downloading from official web windivert-sys will search for it on the path provided with WINDIVERT_PATH.

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

Shape

Method 186
Class 25
Enum 14
Interface 2

Languages

Rust100%

Modules by API surface

windivert-sys/src/bindings/header.rs66 symbols
windivert-sys/src/bindings/newtypes.rs42 symbols
windivert/src/address.rs39 symbols
windivert-sys/src/bindings/address.rs28 symbols
windivert/src/divert/mod.rs15 symbols
windivert/src/divert/blocking.rs8 symbols
windivert/src/layer.rs7 symbols
windivert-sys/src/bindings/ioctl.rs7 symbols
windivert-sys/src/bindings/bitfield.rs6 symbols
windivert/src/packet.rs4 symbols
windivert/src/error.rs4 symbols
windivert-sys/src/bindings/error.rs1 symbols

For agents

$ claude mcp add windivert-rust \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page