node_pcap icon indicating copy to clipboard operation
node_pcap copied to clipboard

Changes for Windows compilation.

Open LiamKarlMitchell opened this issue 10 years ago • 4 comments

Tested on Windows 7, Could compile in release mode with winpcap developer kit. Need to use wpcap.lib instead of pcap.lib. I am not sure how to change this in the binding gyp file.

LiamKarlMitchell avatar May 07 '14 10:05 LiamKarlMitchell

Darn I am now just getting the error.

WinPcap version 4.1.3 (packet.dll version 4.1.0.2980), based on libpcap version 1.0 branch 1_0_rel0b (20091008)
\Device\NPF_{0E1FCFD9-0532-45C5-A3EB-7179F7830653} /192.168.196.1/255.255.255.0
\Device\NPF_{1F57BC32-DCE2-4437-ABEB-8C87D9849E65} /0.0.0.0/255.0.0.0
\Device\NPF_{3FDF918A-C004-4786-9321-9DEA5B7382CD} /192.168.111.1/255.255.255.0
* \Device\NPF_{9E0F1C3E-59DD-4948-9560-E40CEB96B781} 10.1.1.10/255.255.255.0
Assertion failed: 0, file g:\jenkins\workspace\nodejs-msi\d73b0901\deps\uv\src\win\req-inl.h, line 219

Which I have narrowed down as being effective when uv_poll_start is called in SocketWatcher::Start.

Which means there is an event that is not handled in the switch case there.

UV_READ, UV_WRITE, UV_ACCEPT, UV_CONNECT, UV_SHUTDOWN, UV_UDP_RECV, UV_UDP_SEND, UV_WAKEUP, UV_SIGNAL_REQ, UV_POLL_REQ, UV_GETADDRINFO, UV_PROCESS_EXIT, UV_FS, UV_WORK, UV_FS_EVENT_REQ

Will continue to investigate.

LiamKarlMitchell avatar May 07 '14 12:05 LiamKarlMitchell

Upgraded to node v0.10.28 and it works. Just have to figure out why I am not getting addresses such as addr, netmask, broadaddr, dstaddr. Possibly the workaround i am using for inet_ntop is wrong.

LiamKarlMitchell avatar May 07 '14 20:05 LiamKarlMitchell

Or maybe we can reuse node's function for inet_ntop? https://github.com/joyent/node/blob/master/deps/uv/src/inet.c Thoughts?

LiamKarlMitchell avatar May 07 '14 21:05 LiamKarlMitchell

Hi there. Thanks for the contribution. I've added you as a collaborator on this project. Feel free to merge as you see fit. Getting proper Windows support would be great for this project.

mranney avatar Jan 11 '16 19:01 mranney