Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Showing stats for an offline PCAP session #264

Open
lance23au opened this issue May 20, 2020 · 3 comments
Open

Showing stats for an offline PCAP session #264

lance23au opened this issue May 20, 2020 · 3 comments

Comments

@lance23au
Copy link

Hi All,
Does the pcap stats function - pcap_session.stats work for an offline session?
I get the following error when using it.
Ideally I would like to count the packets in my pcap file, do some processing with pcap.decode.packet() then close the session with pcap_session.close().

.../node_modules/pcap/pcap.js:119
return this.session.stats();
^
Error: Error in pcap_stats
at PcapSession.stats (.../node_modules/pcap/pcap.js:119:25)
at Object. (.../routes/nodediscovery.js:58:26)
at Module._compile (internal/modules/cjs/loader.js:1133:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1153:10)
at Module.load (internal/modules/cjs/loader.js:977:32)
at Function.Module._load (internal/modules/cjs/loader.js:877:14)
at Module.require (internal/modules/cjs/loader.js:1019:19)
at require (internal/modules/cjs/helpers.js:77:18)
at Object. (.../app.js:20:27)
at Module._compile (internal/modules/cjs/loader.js:1133:30)

Thanks in advance.
Lance.

@TincaTibo
Copy link

TincaTibo commented May 20, 2020 via email

@lance23au
Copy link
Author

Is there any other way to work out how many packets are in the pcap file?

Cheers,
Lance.

@TincaTibo
Copy link

TincaTibo commented May 20, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants