2

I am trying to use Sharppcap in order to pack and send UDP packages. I am able to send packages by Windows Loopback Adapter but it limits the byte length to 1500. However, I need to send larger packages in order to be faster. I installed Npcap to increase this number but it made me uninstall Winpcap driver and now an exception is thrown when I try to open the Npcap Loopback adapter:

CurrDev.Open(DeviceMode.Promiscuous, readTimeoutMilliseconds);

Exception: SharpPcap.PcapException: 'Unable to activate the adapter (rpcap://\Device\NPF_{DB15D668-E692-46D9-9A6F-FD6747CD11AD}). Return code: -1'

Bonus Question: I am aiming to send 10 Gb/sec with Ethernet. Any other ideas how can I reach that speed?

Matt Davis
  • 45,297
  • 16
  • 93
  • 124
Learner
  • 21
  • 3

1 Answers1

2

I had the same problem on Windows 10 as you have. The solution that worked for me:

  1. Remove the currently installed npcap driver (0.995)
  2. Install version 0.991 (https://nmap.org/npcap/dist/npcap-0.991.exe)

I've found this solution on https://github.com/chmorgan/sharppcap/issues/71 Credits to https://github.com/larswilliam Hope it helps.

Ruben
  • 21
  • 1
  • Yes, I solved the problem that way recently. However, I couldn't solve the speed issue. The server is able to send the packets around 0.1 Gb/sec but the client can not capture its speed, lots of packages drop in the way... My purpose was to send and receive 10Gb/sec with Ethernet however I can only do receive packages at 1 Mb/sec without any drops! – Learner Jul 29 '19 at 12:04