ndis

NDIS Intermediate driver interface to C#

≯℡__Kan透↙ 提交于 2019-12-06 08:07:35
问题 I'm developing what is essentially a specialized firewall application. The solution needs to be 32 and 64-bit compatible. My company wants to keep the current program interface, which is written in C#. What I need is this: a way to monitor and manipulate all network traffic on the system. My research has led me to believe that a NDIS (Network Driver Interface Specification) Intermediate driver is the way to go. If I can write this kind of driver in C#, great, but I'm not sure that's possible.

NDIS and miniport driver

六月ゝ 毕业季﹏ 提交于 2019-12-06 07:15:38
I am trying to modify a ethernet driver using WDK tools provided in Visual Studio 2012. The samples provided in the WDK are 'miniport adapter' and 'NDIS Light Weight Filter' among others. I am still at the very beginning of driver writing and hence finding it tough to navigate through the code. I was able to install the miniport adapter after building it in Visual Studio 2012 [Shows up as 'Microsoft Virtual Miniport Adapter' in my network adapters list.] I am able to assign it a IP address and Subnet mask also.[I found out that this does not connect to any physical device on my PC]. I also

Is FilterSendNetBufferLists handler a must for an NDIS filter to use NdisFSendNetBufferLists?

三世轮回 提交于 2019-12-04 21:50:11
everyone, I am porting the WinPcap from NDIS6 protocol to NDIS6 filter. It is nearly finished, but I still have a bit of questions: The comment of ndislwf said "A filter that doesn't provide a FilerSendNetBufferList handler can not originate a send on its own." Does it mean if I used the NdisFSendNetBufferLists function, I have to provide the FilerSendNetBufferList handler? My driver will send self-constructed packets by NdisFSendNetBufferLists, but I don't want to filter other programs' sent packets. The same as the FilterReturnNetBufferLists, it said "A filter that doesn't provide a

NDIS Intermediate driver interface to C#

做~自己de王妃 提交于 2019-12-04 13:53:53
I'm developing what is essentially a specialized firewall application. The solution needs to be 32 and 64-bit compatible. My company wants to keep the current program interface, which is written in C#. What I need is this: a way to monitor and manipulate all network traffic on the system. My research has led me to believe that a NDIS (Network Driver Interface Specification) Intermediate driver is the way to go. If I can write this kind of driver in C#, great, but I'm not sure that's possible. At the very least, I need an interface in C# to a driver written in any language. I found a great

Detecting 'Network Cable Unplugged' in the Compact Framework

徘徊边缘 提交于 2019-12-03 00:41:30
I've been through all of the Stack Overflow answers search comes up with, and neither Google or Bing are showing me any love. I need to know when a network cable has been connected or disconnected on a Windows CE device, preferrably, from a Compact Framework application. I realize I'm answering my own question here, but it was actually a question asked of via email, and I actually spent quite a while finding the answer, so I'm posting it here. So the general answer for how this is detected is that you have to call down into the NDIS driver via an IOCTL and tell it that you're interested in

Windows NDIS Driver: Concurrent Read/Write on a single device (IRP_MJ_READ/WRITE)

做~自己de王妃 提交于 2019-12-01 12:59:34
问题 Starting with the ndisprot sample from Microsoft I try to write a NDIS protocol driver. From User space I try to read and write to the device simultaneous (out of two threads). Since I don't receive any packets, the ReadFile system call blocks. I'm not able to complete a WriteFile system call in this state. CHAR NdisProtDevice[] = "\\\\.\\\\NDISprot"; CHAR * pNdisProtDevice = &NdisProtDevice[0]; this.iHandle = CreateFile(pNdisProtDevice, GENERIC_WRITE | GENERIC_READ, 0, 0, OPEN_EXISTING, FILE

How to get hardware MAC address on Windows

梦想的初衷 提交于 2019-11-30 06:48:24
I'm playing around with retrieving the MAC address from the NIC - there are a variety of ways to get it, this article covers the most common: http://www.codeguru.com/Cpp/I-N/network/networkinformation/article.php/c5451 I'm currently using the GetAdaptersInfo method, which seems the most bulletproof, but if the MAC address has been set via the registry: http://www.mydigitallife.info/2008/06/30/how-to-change-or-spoof-mac-address-in-windows-xp-vista-server-20032008-mac-os-x-unix-and-linux/ Then it reports the MAC address that it has been changed to. The only way I've found to actually get the

How to get hardware MAC address on Windows

折月煮酒 提交于 2019-11-29 06:47:41
问题 I'm playing around with retrieving the MAC address from the NIC - there are a variety of ways to get it, this article covers the most common: http://www.codeguru.com/Cpp/I-N/network/networkinformation/article.php/c5451 I'm currently using the GetAdaptersInfo method, which seems the most bulletproof, but if the MAC address has been set via the registry: http://www.mydigitallife.info/2008/06/30/how-to-change-or-spoof-mac-address-in-windows-xp-vista-server-20032008-mac-os-x-unix-and-linux/ Then