WSCInstallProvider() vs FwpmProviderAdd0()

I want to implement my own network provider to implement my protocols via WinAPI socket :
socket(MY_SOCKET_FAMILY, MY_SOCKET_TYPE, MY_SOCKET_PROTOCOL)
Previously WSCInstallProvider() function was used for this purpose, but now MSDN indicates that this is deprecated and not supported anymore, and you need to use FwpmProviderAdd0() function,however, I did not find any examples to implement your provider with the same functionality as WSCInstallProvider(), besides, I don’t quite understand how Fwpmxxx () works.
Can someone tell me how I can achieve my goal? Thank!

I gather that you have an existing Layered Service Provider (LSP) and want to migrate it to newer OS versions? At a high level, what does your LSP do?

The guidance to move to windows filtering platform is very generic. Many and probably most LSPs were developed to filter connections or packets in some way and WFP is a much easier way to do that. But your description of a custom address family does not jive with that. Usually though, custom address family requires a NDIS protocol driver and not an LSP so I am confused

1 Like

my LSP doesn’t intercept or filter anything, but just implements the windows sockets interface in user mode for my own transport, and I don’t want to depend on the TCP/IP stack, which precludes the use of NDIS…

If you don’t do filtering, then a filtering platform is not what you need

I don’t think you understand how NDIS works if you think that the use of it in any way ties you to TCP/IP. It is specifically designed to be multi-protocol, but implementing an NDIS protocol driver is a very large task.

I have not looked into this in some time, but I am not aware of a way to implement a network protocol in UM on modern Windows