Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

PInvoke wrapper for WinDivert

License

NotificationsYou must be signed in to change notification settings

TechnikEmpire/DivertPInvoke

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

PInvoke wrapper forWinDivert.

Notice

You may be interested in the fully-managed wrapper for WinDivert I've written, calledWinDivertSharp. It will be actively maintained, and this repository almost surely will not be.

Be mindful of the fact that the source file(s) in this repo are LGPLv3. Make sure you comply with this license (which is the same license as WinDivert).

This class will append two directories to the env vars of the executing application. It will appendEXE\x86 andEXE\x64. This way, you can drop the WinDivert native executables in arch-specific directories next to your deployed application and keep using AnyCPU, and thanks to this little trick, the .NET assembly resolver will load the proper WinDivert native libraries.

Note that network to host and host to network order conversion is provided transparently by the structures defined here. In WinDivert, this is not the case obviously, but because we have the syntactic sugar to do this, it's done in this wrapper. For example, you can simply read or write theDstPort of a TCP packet to80 likex.DstPort = 80 orx.DstPort == 80, and all necessary order swapping is done under the hood.


[8]ページ先頭

©2009-2025 Movatter.jp