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
2
votes
2 answers

Efficient Searching Algorithm for Capture File

I am currently developing a tool in java that will help track and interpret data being sent across an ethernet connection. I have already successfully developed both the packet sniffer and the packet data interpreter. I run into a problem when…
Rob Wagner
  • 4,391
  • 15
  • 24
2
votes
2 answers

Programming with Java jpcap on Eclipse Indigo IDE on Windows 7 platform

I'm programming in Java and new to jpcap. I have installed Jpcap for Microsoft Windows. My PC runs on Windows 7 Platform. I have an Eclipse Indigo IDE. When i created a new Java Project using the Eclipse Indigo IDE, i created a class with a main…
user1284808
  • 61
  • 2
  • 9
1
vote
1 answer

problems downloading openjdk on gumstix

From the jpcap installation instructions http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/install.html, I understand that I need JRE 6 in order for jpcap to work on my Gumstix board. (Is that correct?) When I tried downloading openjdk-6-java using…
1
vote
3 answers

How to identify whether a received packet is using TCP or UDP, in java using jpcap?

I want to parse my received packet in TCPPacket or UDPPacket, but if I write "TCPPacket pac3 = (TCPPacket) packet;" for a packet that is using UDP as transport layer protocol then I get an exception "Exception in thread "main"…
blackfyre
  • 2,549
  • 5
  • 39
  • 58
1
vote
1 answer

opening file in java giving exceptions

I am taking a file name via filenamechooser and sending it it my desired method for processing but the problem is that it is not accepting the filename.I am using JPcap for opening up the file.When i hard code it ,It gives me perfect results but…
Xara
  • 8,748
  • 16
  • 52
  • 82
1
vote
0 answers

Program not capturing

I have a program running as an alerting system in my station. I am brand new to Java and learning as I go. Anyway the program compiles and runs but does not capture any of the packets. Im hoping you all can give me a little input on what I am…
pgfdbug
  • 11
  • 1
1
vote
2 answers

Error while using jpcap java library

I am using jpcap library to read network traffic and getting exception while executing the following code: NetworkInterface[] devices = JpcapCaptor.getDeviceList(); Following is the error message: Exception in thread "main"…
Nav Ali
  • 1,232
  • 6
  • 17
  • 26
1
vote
2 answers

java jpcap java.lang.UnsatisfiedLinkError

I have got a problem with jpcap and winpcap. I used to run it before but I do not know what is happening now. I have installed winpcap and downloaded jpcap. On the first run of the example code, I got the following error. PacketCapture: loading…
user403295
  • 818
  • 3
  • 15
  • 19
1
vote
0 answers

How to implement tcp syn scanning with java code?Fastest way to scan ports with Java

I usually use the socket method to check if a port is open public class NewClass { public static void main(String[] args) throws IOException, InterruptedException { long startTime = System.currentTimeMillis(); List ips =…
Touya Akira
  • 67
  • 1
  • 7
1
vote
1 answer

java Swing Application Freezes when call to jpcapCaptor.openDevice method

I am developing some bandwidth utilization monitor tool using jpcap. what am i doing:- 1. i created a radio buttons panel containing the list of all the network interfaces that is present on system, and user has to choose one of them. 2. a…
Deepak
  • 335
  • 1
  • 7
  • 21
1
vote
0 answers

Jpcap crashes when trying to open device

I use Jpcap in order to create ARP requests but when calling the method JpcapCaptor.openDevice(interface,snaplen,promisc,to_ms);, I get the following error : java.lang.NoSuchMethodError: setPacketValue at jpcap.JpcapCaptor.nativeOpenLive(Native…
GoldenBolt
  • 51
  • 8
1
vote
0 answers

Packet sniffing on another system

I'm developing a packet sniffer program that captures the packets going through a system using protocols(TCP,UDP,HTTP). The packet sniffer program will run on a system and captures the packets on another system using the other system's ip address.…
vamsi
  • 344
  • 5
  • 22
1
vote
4 answers

How does HTTP response relate to request?

I'm packet sniffing using jpcap, and I'm wondering how I can find out which request the response is for. The HTTP header fields don't even state the address of the server, and there are no ID's. Do I need to check ports or something?
Matt
  • 11,157
  • 26
  • 81
  • 110
1
vote
1 answer

Java jpcap opendevice error, setRoutingOption

I was messing a lot around with networking and raw sockets. I installed Jpcap and I tried some example code. When I tried the code to send a message with UDP, I got some errors with opening a device. First, the devices are getting stored. …
steef2000
  • 11
  • 3
1
vote
0 answers

Java Networking (Help for my project)

This code list all connected ip's on network (localhost) but I would like that the list of ip's depends to the interface name. Please help me! Example: Interfaces: eth1 eth2 Enter the interface number: public static void main(String[] args)…
Med
  • 2,772
  • 1
  • 11
  • 14
1 2
3
8 9