[C#] Capture loopback packets

I'm getting the impression Microsoft developers aren't required to document anything they do.

I had the chance to ask an Microsoft Head-Dev this question.
And he told me it's quite the contrary. But they have two branches of documentation: an internal and a public one. They keep most of it internal. "It's policy" he told me. I guess they lost their internal ones on the ME and Vista projects, hence the outcome :laugh:

Yeah, back on topic:
@Angra: I believe you've mistaken NetworkInterface.Description for NetworkInterface.Name
Or you could check if NetworkInterface.NetworkInterfaceType matches NetworkInterface.Loopback

But with both solutions you could deal with a custom loopback adapter. Solution: Use the default UID of the loopback interface.
The UID (or NetworkInterface.Id) for loopback in Windows XP - 7 is {846EE342-7039-11DE-9D20-806E6F6E6963}.
 
Last edited:
I had the chance to ask an Microsoft Head-Dev this question.
And he told me it's quite the contrary. But they have two branches of documentation: an internal and a public one. They keep most of it internal. "It's policy" he told me. I guess they lost their internal ones on the ME and Vista projects, hence the outcome :laugh:

Yeah, back on topic:
@Angra: I believe you've mistaken NetworkInterface.Description for NetworkInterface.Name
Or you could check if NetworkInterface.NetworkInterfaceType matches NetworkInterface.Loopback

But with both solutions you could deal with a custom loopback adapter. Solution: Use the default UID of the loopback interface.
The UID (or NetworkInterface.Id) for loopback in Windows XP - 7 is {846EE342-7039-11DE-9D20-806E6F6E6963}.

NetworkInterfaceType.Loopback refers to localhost and NetworkInterface.Name is the unique name of the adapter, for example Local Area Connection 2. All Loopback adapters' NetworkInterface.Description should contain "Microsoft Loopback Adapter" by default.

If you could provide information about the loopback adapter's configuration (Status -> Details), I can diagnose the problem when I return to my workstation.
 
Last edited:
NetworkInterfaceType.Loopback refers to localhost and NetworkInterface.
It is possible to set up new loopback adapters, which will then be considered NetworkInterfaceType.Loopback.
I, in fact, have multiple loopback interfaces.

Name is the unique name of the adapter, for example Local Area Connection 2.
It is furthermore possible to change both names and description, via netsh or the control panel.
It's stupid, but I've seen a Windows server with a renamed loopback interface. It was called "lo0", former UNIX admin, I suppose.

All Loopback adapters' NetworkInterface.Description should contain "Microsoft Loopback Adapter" by default.
Considering the %windir%\inf\netloop.inf you're right. Still, I'd rather go for the UID + NetworkInterfaceType than trusting that neither name nor description was changed on the target platform.
 
The UID differs with every installation of a new adapter, and the NetworkInterfaceType of loopback adapters is NetworkInterfaceType.Ethernet, as with most network interfaces.
 
Back