node-pcap / node_pcap

libpcap bindings for node
MIT License
928 stars 253 forks source link

General improvements (reduced from #256) #257

Closed mildsunrise closed 4 years ago

roccomuso commented 4 years ago

Should be good for merge, can you confirm?

mildsunrise commented 4 years ago

I confirm :)

roccomuso commented 4 years ago

I'm gonna push a new release

mildsunrise commented 4 years ago

wait, before doing that... it would be good to document the new options and radiotap api

roccomuso commented 4 years ago

ok. Also feel free to bump package.json version and then I'll publish

mildsunrise commented 4 years ago

and if we are going to release a major version, maybe it would be a good idea to change the createSession API to accept options instead of arguments, so you specify what you need:

pcap.createSession('eth0', {
    filter: '...',
    buffer_size: ...,
    monitor: ...,
    snap_length: ...,
    buffer_timeout: ...,
});

pcap.createOfflineSession('/path/to.pcap', {
    filter: '...',
});
roccomuso commented 4 years ago

let's change and document it.