Supporting multiple pcap sessions #27

Open
wants to merge 6 commits into
from

Conversation

Projects
None yet
4 participants
@rgulewich
Collaborator

rgulewich commented May 26, 2011

I refactored the pcap binding to use a class so that it can support multiple sessions (and moved some code from JS to C++ in the process). I also improved some of the error messages.

I tested capturing on both Ubuntu 10.04 and OSX in live and offline modes, and haven't noticed any problems so far.

If you have any feedback or suggestions, let me know - I'd be happy to make any changes required.

rgulewich added some commits May 26, 2011

Refactor into a class to support multiple pcap sessions
Added error handling for setting BIOCIMMEDIATE on OSX
Only set BIOCIMMEDIATE for live captures. It fails when offline
Use pcap_geterr to get pcap_stats errors
Emit an 'empty_read' event on empty read.
This can be useful for detecting when an interface has been unplumbed
out from underneath you, which causes the readWatcher to spin non-stop
(since the fd is constantly reporting data as available).
@kandsten

This comment has been minimized.

Show comment
Hide comment
@kandsten

kandsten Apr 1, 2012

This would be pretty damn useful to see pulled - the current limitation of only one interface is neither documented nor friendly.

kandsten commented Apr 1, 2012

This would be pretty damn useful to see pulled - the current limitation of only one interface is neither documented nor friendly.

@ujjwalt ujjwalt closed this Apr 9, 2013

@ujjwalt ujjwalt reopened this Apr 9, 2013

@mranney

This comment has been minimized.

Show comment
Hide comment
@mranney

mranney Jan 11, 2016

Collaborator

Hi there. Thanks for the contribution. I've added you as a collaborator on this project. Feel free to merge as you see fit.

Collaborator

mranney commented Jan 11, 2016

Hi there. Thanks for the contribution. I've added you as a collaborator on this project. Feel free to merge as you see fit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment