Questions tagged [jpcap]

Jpcap is a Java Library which enables you to Send and capture Packets.

Jpcap is a library for working on Packet Level using Java. The Jpcap library is based on libpcap/winpcap and therefore Jpcap supports any system which is supported by libpcap/winpcap. Currently those include Windows, Linux, FreeBSD, Mac OS X and Solaris.

Provided functionality:

  1. Sending Network Packets
  2. Capturing Network Packets
  3. It can capture Ethernet, IPv4, IPv6, ARP/RARP, TCP, UDP, and ICMPv4 packets.
134 questions
0
votes
0 answers

Can't use JPCAP in Android project

I want to create an application which can capture packets traffic with my Android device. I use Jpcap library but the LogCat prints the following error: java.lang.NoClassDefFoundError: jpcap.JpcapCaptor My code is: import jpcap.JpcapCaptor; import…
Panagiotis
  • 511
  • 8
  • 26
0
votes
2 answers

anonymous class is not abstract and does not override abstract method

I have this program in java.. it is for captureing network packets by using Winpcap and jpcap...There is a problem at the compile time.. it sends this message: C:\Users\IMAX\Desktop\PacketPirate\PacketPirate\src\PkPirate_GUI.java:95: error:…
0
votes
0 answers

jpcap: how to detect duplicate or retransmitted frames (packets)?

As from title, I am using jpcap and sometimes I get duplicate or retransmitted packets: how to detect and discards such packets? Edit: the code I am using is derived from Packet sniffer using jpcap
Alberto acepsut
  • 1,972
  • 10
  • 41
  • 87
0
votes
1 answer

Java - Getting a project to run with JPcap

I'm trying to set up a project that uses jpcap in order to detect network traffic. I've tried various ways to get it to work, however every way ends up in errors. I run windows 64 bit, but here's what I've done: Installed winpcap Installed jpcap…
Eurater
  • 1
  • 2
0
votes
1 answer

JpcapCaptor.getDeviceList() returns empty array

I have an example of a traffic sniffer and it uses JpcapCaptor.getDeviceList() . The problem is that this method returns an empty array, although it seems it shouldn't. Could it be that i haven't installed jpcap 100% correct? What could be…
user3294601
  • 33
  • 1
  • 4
0
votes
1 answer

How to identify whether a received packet is IPPacket or ARPPacket in java using jpcap?

I am capturing IPPackets and Analyze the captured packet in java using Jpcap Library.But captured packet is ARPPacket my program shows following error. Blockquote Exception in thread "main" java.lang.ClassCastException: jpcap.packet.ARPPacket…
0
votes
0 answers

Jpcap openDevice error

I've installed a 64 bit version of jpcap.dll, it seems to work fine, I can get a list of my devices with JpcapCaptor. But I have an error at openDevice... Here is my code : public class Main { public static void main(String[] args) { …
omaflak
  • 165
  • 1
  • 1
  • 9
0
votes
1 answer

Sender's MAC, Receiver's MAC and Routers MAC - within a LAN: a testing by java jpcap

These days I'm in a "self learning" about a packet switching networking includes TCP, UDP, & other protocols. I have confirmed that the sender's MAC address couldn't be sent directly to receiver since the packets tend to travel via several routers…
0
votes
1 answer

JpcapHandler wont work

So here's the thing. Im trying to let a network sniffer work, but this annoying problem just showed up that says the JpcapHandler cannot be resolved to a type. I've imported the jpcap library already. Dont know how to solve tis issue. Please help me…
OrdinaryProgrammer
  • 213
  • 1
  • 4
  • 13
0
votes
1 answer

Why isnt the chosen device not opening in Jnetpcap (using eclipse)?

I am learning to use jnetpcap (on windows 8, 64bit). I installed Wincap first then set up the library in eclipse and ran this following example (without making any changes): http://jnetpcap.com/examples/classic. It runs without any problems but once…
pinklotus
  • 101
  • 2
  • 13
0
votes
1 answer

capturing network packet and group them according to their process (program) name

I am doing some research and I need to capture every packet leave my computer and determine from which process it come from. in other world, some thing like Microsoft network monitor. please guide me to the right way to start.
0
votes
0 answers

Exception when trying to read packets with jpcap (java.lang.InstantiationException)

I am trying to send udp packets with multicast and receive them with jpcap. The multicast code works and when I sniff with wireshark I receive all the packets which i want to have. But my jpcap code does not work, I get this exception: Exception in…
Ephisray
  • 3
  • 5
0
votes
1 answer

JPCAP Import Issues

I am using Windows 7 64bit. Currently, I have Netbeans 7.3 and jdk1.7.0_25 installed on my PC. I am trying to import JPCAP library to my project which I download from: http://sourceforge.net/projects/jpcap/. But when I try to use the library :…
Zh handry
  • 1
  • 1
  • 1
0
votes
1 answer

Capture ping packets throws exception (too many instances)

I have written a code snippet to cpature ping using JPCAP. the code I have written is given below : while (true) { try { PacketCapture m_pcap; m_pcap = new PacketCapture(); …
Rishabh
  • 199
  • 3
  • 14
0
votes
1 answer

Packet sniffering by jpcap

I am sniffering packets on ethernet (eth0) in java with the help of jpcap library... So, In my project I have a JpcapCaptor ... //Open an interface with openDevice(NetworkInterface intrface, int snaplen, boolean promics, int to_ms) …
timonvlad
  • 1,046
  • 3
  • 13
  • 31
1 2 3
8 9