njh / node-red-contrib-pcap

Network packet capture for Node-RED
http://flows.nodered.org/node/node-red-contrib-pcap
Apache License 2.0
8 stars 7 forks source link

Update to pcap2 library #2

Closed gfcittolin closed 7 years ago

gfcittolin commented 7 years ago

Hi,

It looks like the pcap node does not install in newer versions of nodejs (6.x), and is not updated in a while. Changing to pcap2 seems to work, and seems to have a compatible api (it is a fork of the former). What about using the newer one?

P.S.: Still need to bump the package's version number

njh commented 7 years ago

Hi,

Sorry @gfcittolin, this is the second PR I have completely missed because 'Watch' was turned off for (my own!) repo.

Looks like a very simple change, so I will merge it now and test later this evening.

Thanks!

nick.

gfcittolin commented 7 years ago

Well, I've already missed issues for the same reason.. shame on us! :)

Thanks anyway, let me know if you need me to test/change something

njh commented 7 years ago

Hm, just got a crash on my MacBook, which I should probably try and crash:

17 Aug 23:47:35 - [red] Uncaught Exception:
17 Aug 23:47:35 - Error: Don't know how to process TCP option 34

The 'pcap' module was last published 3 years ago. And 'pcap2' module was last published 2 years ago.

The pcap2 README doesn't really explain why he forked it: https://github.com/andygreenegrass/node-pcap

He has also disabled the Issue tracker, which is slightly alarming.

Not feeling very comfortable about this...

gfcittolin commented 7 years ago

Oh. Now I'm also not sure what to do. If this broke something then maybe we should revert it.

Also just took a look at the Git repos, and it looks like 'pcap' is being refactored and therefore is "more active" than 'pcap2'. Should we just stick to 'pcap' and wait till a new version is released?

njh commented 7 years ago

Yeah, the whole thing is very puzzling.

I think andygreengrass just took a snapshot from node-pcap/node_pcap and published it as pcap2 but isn't actively developing it.

Who knows if/when a new 'pcap' will be published.

I am no wondering if node-shark is better/more stable.

njh commented 7 years ago

I decided to switch back to node_pcap and allow any 2.x.x version.

Loosening the version restriction should allow the current GitHub version to be used, if desired.