First of all - thank you for building Vanara - this library is an absolute lifesaver!
I am currently working with the Windows Filtering Platform using RPC Filters. Specifically, adding filters using the FwpUClnt PInvoke library.
A number of structures in this subsystem have union field types, and some are missing in Vanara. This means the structures are larger than they are supposed to be, and causes issues inside WFP when it attempts to parse the structures that Vanara creates.
Describe the bug and how to reproduce
Hi!
First of all - thank you for building Vanara - this library is an absolute lifesaver!
I am currently working with the Windows Filtering Platform using RPC Filters. Specifically, adding filters using the
FwpUClnt
PInvoke library.A number of structures in this subsystem have union field types, and some are missing in Vanara. This means the structures are larger than they are supposed to be, and causes issues inside WFP when it attempts to parse the structures that Vanara creates.
What code is involved
In FWPM_FILTER0:
UINT64 rawContext
andGUID providerContextKey
should be overlapped in the struct memory.In FWPM_ACTION0:
Guid filterType
andGuid calloutKey
should be overlapped in the struct memory.I may have missed others, but these are the first two that are obvious to me.
Expected behavior
When creating an new
FWPM_FILTER0
and passing it toFwpmFilterAdd0()
, the library is unable to parse the structure.See this Sample Code for an example that fails.
Initializing this class with
dynamic=true
should be enough to trigger the failure.Thanks!