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
1 answer

what is the difference between packets Ajax sends and normal http packets?

is there any difference between the packets being sent by Ajax, and normal packets (in attributes like source port,...)? or how can I distinguish Ajax packets from others when I'm capturing packets with jpcap? How Ajax sends packets? is it by an…
Alireza
  • 4,347
  • 3
  • 20
  • 31
0
votes
2 answers

why my browser sends two packets with the same attributes except push?

I was writting a java (jpcap) application that distinguishes which response packet was for which request packet. suddenly I encounter these two http packets that my browser sent exactly the same (seq number, ack number, ...) except one of them has…
Alireza
  • 4,347
  • 3
  • 20
  • 31
0
votes
2 answers

How can I speed up packet capturing and packet send with jpcap

DSP send raw ethernet packets to PC than PC capturing these packets and send ack response. They are messaging MAC to MAC so there are no ip layer. I want to make real-time messaging in every 1ms. DSP send message every 1 milisecond but PC can not…
Leo Eroz
  • 13
  • 4
0
votes
1 answer

JpcapWriter causes app to crash

I am working on a relatively simple packet capture application, and I am using the Jpcap library. Everything has been working until I added in the save feature to my program. My write function public void write() { try { writer =…
Rob Wagner
  • 4,391
  • 15
  • 24
0
votes
1 answer

Saving locally an altered packet

I'm trying to develop a software in which I'm capturing packets from my network interface, changing them, and writing the altered packets to my local disc (to an output file). Thing is, when I open the output file, I see that the changes that I made…
Mark268
  • 78
  • 1
  • 8
0
votes
1 answer

Jpcap: IP packet header length

In JPCap i obtain the header length of the IP packet by the following code IPPacket IP_pac = (IPPacket) packet; System.out.println(IP_pac.len); // header length i obtain the data length of the IP packet by …
Xara
  • 8,748
  • 16
  • 52
  • 82
0
votes
0 answers

JPCAP: EXCEPTION_ACCESS_VIOLATION

I am using JPCAP code for writing packets in pcap file (I am using JDK 1.7).Here is the code JpcapCaptor captor=JpcapCaptor.openDevice(device[index], 65535, false, 20); //open a file to save captured packets JpcapWriter…
Xara
  • 8,748
  • 16
  • 52
  • 82
0
votes
2 answers

given a pcap file, how to find if a src ip address is local or remote using jpcap

Given a pcap file, how can I find out which src ip addresses are local and which are remote using jpcap? Can any one guide me?
blackfyre
  • 2,549
  • 5
  • 39
  • 58
-1
votes
1 answer

Java: File not opening 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
votes
1 answer

How to extract the ip address from the captured packet in java in windows?

I am working on Network Monitoring. I wish to monitor the data and check the network usage details of the client PC from the admin PC. I have figured that I can fulfill this with the help of captured the packets of the browser as shown below.…
Shachi
  • 1,858
  • 3
  • 23
  • 41
-1
votes
3 answers

Network Intrusion Detection System in Java..!

I am planning on implementing a NIDS (Net Intrusion Detection System) in the Java programming language. After searching, I found two libraries for this. 1) Jpcap 2) jNetPcap Which one should I use and why? Which is more preferable to use?
veenit33
  • 79
  • 2
  • 8
-1
votes
1 answer

What's the best classification method for capturing packets in heavy traffic

I want to capture packets from a crowded network and classify it by user request. I use java and jpcap for capturing packets. now I'm using array threads for each req packet. it's realy slow and there is many conflicts among threads. what's the best…
Alireza
  • 4,347
  • 3
  • 20
  • 31
-2
votes
2 answers

Writting an object in a file. Best way

I have a problem with time. I currently develop an app in Java where I have to make a network analyzer. For that I use JPCAP to capture all the packets, and write them in a file, and from there I will put them bulk in DB. The problem is when I am…
Paul F.
  • 17
  • 1
  • 8
-3
votes
1 answer

Writing a Personal Firewall in Java that drop network packet

I would like to write a Personal Firewall on Java that can drop network packet. Is it possible? I want to capture a packet on jpcap, but how can i do drop packet? Is there a library in this event on java? And sorry for my bad English.
1 2 3
8
9