Skip to content

0 bytes packets capture only #100

Description

@Azperin

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 ?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions