libpcap

jNetPcap vs Jpcap

江枫思渺然 提交于 2019-11-28 10:01:36
wondering any of you can give me a bit of comments + insights please. In term of performance, which one should I use, jNetPcap or Jpcap? Thanks! The referenced post contains an admittedly biased opinion by the owner of the jNetPcap project. It is hardly a reliable source for a true comparison. One difference that is obvious between the two projects is that jNetPcap uses JNI for access to native code. PCap4j ( http://www.pcap4j.org/ ) uses JNA for access to native code and a "com.sun" JNA compatibility library ( https://github.com/twall/jna ). Also, the latest version of jNetPcap does not build

ctypes and passing a by reference to a function

不羁的心 提交于 2019-11-27 16:42:59
问题 I'm trying to use libpcap in python3 using ctypes. given the following function in C pcap_lookupnet(dev, &net, &mask, errbuf) in python I have the following pcap_lookupnet = pcap.pcap_lookupnet mask = ctypes.c_uint32 net = ctypes.c_int32 if(pcap_lookupnet(dev,net,mask,errbuf) == -1): print("Error could not get netmask for device {0}".format(errbuf)) sys.exit(0) and the error i get is File "./libpcap.py", line 63, in <module> if(pcap_lookupnet(dev,net,mask,errbuf) == -1): ctypes.ArgumentError:

Parsing WiFi Packets (libpcap)

冷暖自知 提交于 2019-11-27 11:43:34
问题 I've been working on a way to have an OpenWRT router log WiFi probe requests to a MySQL db (it stores MAC address and RSSI info for each probe request packet along with other, router-specific data). After researching libpcap quite a bit, I've been able to cobble together a basic little program that simply sniffs packets on a monitor interface (mon0) using a filter expression ('wlan subtype probe-req') and then prints out the raw packets in hex. With the info that's available online on libpcap

jNetPcap vs Jpcap

跟風遠走 提交于 2019-11-27 03:21:46
问题 wondering any of you can give me a bit of comments + insights please. In term of performance, which one should I use, jNetPcap or Jpcap? Thanks! 回答1: The referenced post contains an admittedly biased opinion by the owner of the jNetPcap project. It is hardly a reliable source for a true comparison. One difference that is obvious between the two projects is that jNetPcap uses JNI for access to native code. PCap4j (http://www.pcap4j.org/) uses JNA for access to native code and a "com.sun" JNA