Skip to content

Showing stats for an offline PCAP session #264

@lance23au

Description

@lance23au

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions