The FwpsInjectNetworkReceiveAsync0 cooperate with FwpsCalloutRegister0. The classifyFn0 callout function of FWPS_CALLOUT0 structure will receive the information. There is a GitHub sample.
Edit: I also find the PPP_PROJECTION_INFO structure has the SubInterfaceIndex information.
How to obtain network sub-inteface index via user mode WinAPI?
There is network interface index which can be obtained by IP Helper API. Also there is such thing as network sub-interface index which I am struggling to find a way to access.
I am using a third party library which comes with a driver that eventually calls FwpsInjectNetworkReceiveAsync0 function of the Windows Filtering Platform. My user mode code is supposed to deliver this sub-interface index for that function to use, but I do not know where to get it from.
I have looked through the IP Helper API, but all I could find were the functions that return the interface index, not the sub-interface one. Not much information in documentation either it would seem: some enumerations, a few kernel mode functions that require it as argument, but none that would actually deliver it.
Windows development | Windows API - Win32
Windows for business | Windows Client for IT Pros | Networking | Network connectivity and file sharing
Windows for business | Windows Client for IT Pros | User experience | Other
1 answer
Sort by: Most helpful
-
Xiaopo Yang - MSFT 12,736 Reputation points Microsoft External Staff
2021-08-18T02:12:12.753+00:00