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.