Problems with Loading File
Hi we are trying to use the node pcap library for a network visualization project.
We got the code to run under OSX but I am having difficulty getting it to run on a Ubuntu Server 13. When we execute an live capture it works, but loading a an existing file throws a cryptic error.
Anyone have a resolution?
CODE: var pcap = require("pcap"); var pcap_session = pcap.createOfflineSession("data/eth1_eth2_20120204182604.pcap","");
ERROR:
/home/ubuntu/node_modules/pcap/pcap.js:50
me.link_type = me.session.open_offline(me.device_name, filter || "", m
^
Error: ����
at Pcap.open (/home/ubuntu/node_modules/pcap/pcap.js:50:35)
at Object.exports.createOfflineSession (/home/ubuntu/node_modules/pcap/pcap.js:101:13)
at Object.
It's hard to tell when the error message is cryptic.
Is there any more information I can provide? Is there a specific version of libpcap that the code is known to work with?
I have a clean ubuntu 13 install with the latest nodejs and libpcap-dev available via apt-get.
The only information I could find so far was https://github.com/mranney/node_pcap/issues/71 and https://github.com/mranney/node_pcap/issues/57
Any help would be much appreciated. This is a really cool project and I would love to get it working on our server.
@mikrasov Ok I'm on it. Let me have any more log files or stack traces you can put here will be helpful
So here is the file I am trying to load http://mikrasov.com/cs284/test.pcap
So active capture seems to work fine. When running sample capture here are there first few lines
libpcap version 1.4.0 eth0 10.144.136.136/255.255.255.192fe80::2000:aff:fe90:8888/ffff:ffff:ffff:ffff:: nflog no address nfqueue no address any no address lo 127.0.0.1/255.0.0.0::1/ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff fe:ff:ff:ff:ff:ff -> 22:00:0a:90:88:88 128.111.52.64:52445 -> 10.144.136.136:80 TCP len 60 [syn] 22:00:0a:90:88:88 -> fe:ff:ff:ff:ff:ff 10.144.136.136:80 -> 128.111.52.64:52445 TCP len 60 [ack,syn] 22:00:0a:90:88:88 -> fe:ff:ff:ff:ff:ff 10.144.136.136:37485 -> 172.16.0.23:53 DNS question 64.52.111.128.in-addr.arpa PTR
Is there any specific info I can provide? Is the 1.4 version of libpcap perhaps incompatible?
I'm sorry this will take a couple of days as I'm busy. I will try to find something by 24/25th. If you can resolve this by then then please share the solution and if needed create a PR or email me a patch
No problem,
I think the issue may be with some change in the version of libpcap. The system that has a working version reports libpcap 1.1
Heya, I haven't managed to find a resolution myself. Is there any more info I can provide to be of help.
Do you happen to know how to downgrade to a working version of libpcap. There are a number of libpcap modules and I am not certain what module is used by this project.
There is no particular dependency - I have libpcap 1.3.0 The error occurs at https://github.com/mranney/node_pcap/blob/master/pcap_session.cc#L219 Can't figure out what's the issue since the error message is corrupted itself. I have my exams going on so can't promise much until 9/12/2013 but I'll definitely fix this as soon as I can!
@mikrasov Hi found any solution. If not let's hack this problem together?