March 2016

TCP reassembly is not being taken care by JNetPcap

When I read a .pcap file I see that there are

1. Duplicate packets.
2. Retransmitted packets
3. Lost packets.

I see that JNetPcap library I am using to read the .pcap file is printing the duplicate packets also. Is there any way jNetPcap library takes care of not to print the duplicate packets.


A fatal error has been detected by the Java Runtime Environment:


I just trying to create own Packets for a Pcapfile, but I get a fatal JRE Error like this:
Before the fatal Error i had a Nullpointer Exception on the line where i'm filling the udp.source(udpSource);
After 4 tries the error switched to the fatal JRE Error.

I hope you can help me. Sad I don't know how to fix error... -.-

# A fatal error has been detected by the Java Runtime Environment:
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0000000063b51cf4, pid=5844, tid=4040
# JRE version: Java(TM) SE Runtime Environment (8.0_73-b02) (build 1.8.0_73-b02)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.73-b02 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# C [jnetpcap.dll+0x11cf4]
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
# An error report file with more information is saved as:
# C:\Users\Ownage\git\fw-ds\hs_err_pid5844.log
# If you would like to submit a bug report, please visit:
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.

THis is my Code:

import java.nio.ByteOrder;

import org.jnetpcap.packet.JMemoryPacket;
import org.jnetpcap.packet.JPacket;
import org.jnetpcap.packet.Payload;
import org.jnetpcap.protocol.JProtocol;
import org.jnetpcap.protocol.lan.Ethernet;
import org.jnetpcap.protocol.tcpip.*;

import fds.Controller.Controller;

public class NewOwnPCap{

private String[] contentPCapView;
private Controller controller = new Controller(null,null);
private Tcp tcp = new Tcp();
private Ip4 ip4;
private Udp udp;;
private Ethernet eth;
private Payload payload = new Payload();
private JPacket packet = new JMemoryPacket(1400);

public NewOwnPCap(String[] content, Controller controll){
this.contentPCapView = content;
this.controller = controll;