IPv6 saddr and daddr always undefined?
Whenever I try to parse pcap files of ethertype ipv6, saddr and daddr are always undefined. Why is this happening? saddr and daddr look like this: { o1: undefined, o2: undefined, o3: undefined, o4: undefined, o5: undefined, o6: undefined, o7: undefined, o8: undefined }
Are you running of the release branch or master?
I'm running the master
How are you getting that? master no longer use the o1, o2, o3, etc approach for addresses. saddr and daddr should be arrays.
can you share the code you used to generate that?
var pcap = require('pcap'), tcp_tracker = new pcap.TCPTracker(), pcap_session = pcap.createOfflineSession(filename);
pcap_session.on('packet', function(raw_packet) { var packet = pcap.decode.packet(raw_packet);
if (packet.payload.ethertype == 34525) {
console.log(packet.payload.payload.saddr);
}
}
The console always prints: { o1: undefined, o2: undefined, o3: undefined, o4: undefined, o5: undefined, o6: undefined, o7: undefined, o8: undefined }
Try looking at the addr property on saddr
it("sets #saddr to the senders address", function(){
this.instance.decode(this.example, 0);
this.instance.saddr.should.have.property("addr", [0xfe, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x8d, 0xfe, 0x83, 0x41, 0x14, 0xa5, 0x12]);
});
if it is not there you are not on master. (check which version is in your packages.config and report back if this is the case)
I checked the config and I am actually running the release branch
@pehanson major rewrite in progress which 'should' help with ipv6 support. If need something quickly please submit a pull request for the release branch.