0 bytes packets capture only
Win10, npcap-0.9991, dhcp network (no ip) Tried every device in deviceList, same result with no packet capture.
var Cap = require('cap').Cap;
var device = Cap.deviceList()[2].name; // physical realtek card
var buffer = Buffer.alloc(65535);
var linkType = c.open(device, '', (10 * 1024 * 1024), buffer);
c.setMinBytes && c.setMinBytes(0);
c.on('packet', function(nbytes, trunc) {
console.log('packet: length ' + nbytes + ' bytes, truncated? ' + (trunc ? 'yes' : 'no'));
});
A lot of: packet: length 0 bytes, truncated? no in console.
How to make it work ?
Does bumping up the value passed to setMinBytes() help at all? What about passing a non-empty filter?
Tried many filters, as well as setMinBytes > 0, none helps, constantly packet: length 0 bytes, truncated? no, not a single packet with length > 0
Not sure then, maybe something changed in npcap or their WinPcap compatibility layer?
CI is using version npcap 0.98, with tests passing.
And CI using node version <= 12, there is already 14+
Right, but that shouldn't matter as long as the binding compiles correctly.
So it's only compilation test, not for actual packet capture one ?
No, I mean the difference in node versions used in CI shouldn't matter. The unit tests do capture actual packets.
Is there any public result for unit tests with win10, node14, npcap-0.9991 ? Because I don't have a clue why it's not working
If you try with npcap-0.98 do you get the same result?
Looks like npcap-0.98 working, at least got non-zero length bytes flow. But would be nice to have latest npcap version support. Thank you.
Well, it's not capturing any TCP packets, with or without filters. Network device https://i.imgur.com/R86LguP.jpg