2

I am in need of a virtual network adapter driver for Windows XP SP2+ that has an API, preferably one that supports c#. I need to be able to access the bytes that have been sent over the interface and send bytes over it myself. The general idea of what I am looking for is similar to virtual serial ports like this one http://www.fabulatech.com/virtual-serial-port-control.html but for Ethernet instead of serial.

I am looking for a commercial grade product and would love to hear of any you have seen or tried.

Digital Powers
  • 460
  • 6
  • 23
  • Check this question on SO. Might help http://stackoverflow.com/questions/2234102/how-to-create-a-virtual-network-adapter-in-net –  Sep 21 '11 at 11:38

1 Answers1

3

I realize it's not quite the answer you're looking for, there is winpcap, which allows you to capture and transmit packets over an actual network interface. There are bindings available for C#, which makes it useful for your purposes.

You can make use of the loopback interface device, which will allow you to have a local only interface to make use of.

Anya Shenanigans
  • 91,618
  • 3
  • 107
  • 122
  • this is an idea i can try, still would love to hear of a commercial package if anyone knows of one. – Digital Powers Aug 05 '11 at 21:31
  • winpcap is what you would use to get all the packets that traverse an interface.. but if you are looking for "virtual serial port, but for ethernet", then just open a socket and push out your data. – Sam Axe Aug 05 '11 at 23:11
  • @boo i don't want a socket, i want a virtual interface. The idea being I want to allow people to pretend they are using a network interface but in reality I will be intercepting their packets and doing something else with them. It is the same thing VPN software does. – Digital Powers Aug 05 '11 at 23:26
  • also, Petesh is right, you could mock together something that would work using winpcap and a loopback adapter but it would be a lot more work and more prone to errors which is why I don't want to use it. The problem is that with this method I would have to monitor and capture packets, what I want to do is have the software only driver capture and queue up packets sent to it. Then let me query it to get them out of its buffer. – Digital Powers Aug 05 '11 at 23:36