node-pcap / node_pcap

libpcap bindings for node
MIT License
930 stars 254 forks source link

Packet payload always null #229

Open robsontenorio opened 7 years ago

robsontenorio commented 7 years ago

Hi,

var pcap = require('pcap')
var pcapSession = pcap.createSession('en1', 'tcp port 2201 or 2202')

pcapSession.on('packet', function (rawPacket) {
      var packet = pcap.decode.packet(rawPacket)
      console.log(packet)
    })

Each packet from filter (tcp port 2201 or 2202) is captured, but packet.payload.payload.payload.data is null

Even runing with no filter (all tcp packets) results the same.

Am i missing something?

captura_de_tela_2017-07-22_as_13_26_45

Nomeyho commented 5 years ago

Same issue, any workaround?

tylers-username commented 3 years ago

sudo sysctl -w net.inet.tcp.tso=0 seems to help. However, some data properties continue to be null 🤷