style="display:inline-block;width:728px;height:90px"
data-ad-client="ca-pub-7505528228218001"
data-ad-slot="1225241371">

September 2014

ubuntu 12.04 installation not working

I am trying to install JNetPcap and followed the instructions given at http://jnetpcap.com/compile/debian. At step 12 i am unable to run the ant command and i see the error

"We cannot execute /usr/lib/jvm/java-6-sun/bin/java".

As am able to run Java classes from eclipse or from command line i don't think its a problem with JAVA_HOME. Kindly let me know if am missing something here.

Thanks in advance

How to identify http request/resposne if they are coming from same client

Hello,

if client sents 2 requests and server sents 2 response in diffrent intervals of time.

How to indentify them,i am using src port ,src IP address and dst port,dst IP address as a key.But it was not working for the same server responses and same client requests deffrentiation.

Looking forward for your suggestion..

Bandwith use speed

Good morning, my name is juan carlos, I'm doing my thesis in college and am using jnetpcap, not much jnetpcap so I ask comprencion take weeks looking for a concrete example, and reading about the examples and documentation, I am using JAVA with JNetpCap, I've read the documentation of jnetpcap but not understand much, I'm not very good with networking, but database if it makes me easier, the big problem I have to solve this day is that I find how to calculate the internet speed that I am using in my open device, the formula for calculating the speed I'm using is:

(totalSize / 1024) / totalTime

I have based this on an example of the documentation but I need to calculate the speed I'm using my broadband, my actual code is:

package org.jnetpcap.examples;  
import java.util.ArrayList;  
import java.util.Date;  
import java.util.List;  
  
import org.jnetpcap.Pcap;  
import org.jnetpcap.PcapIf;  
import org.jnetpcap.packet.PcapPacket;  
import org.jnetpcap.packet.PcapPacketHandler;  
  
public class PcapDumperExample {  
  
    public static void main(String[] args) {  
        List alldevs = new ArrayList(); // Will be filled with NICs  
        StringBuilder errbuf = new StringBuilder(); // For any error msgs  
        int r = Pcap.findAllDevs(alldevs, errbuf);  
        if (r == Pcap.NOT_OK || alldevs.isEmpty()) {  
            System.err.printf("Can't read list of devices, error is %s", errbuf  
                .toString());  
            return;  
        }  
  
        System.out.println("Network devices found:");  
  
        int i = 0;  
        for (PcapIf device : alldevs) {  
            String description =  
                (device.getDescription() != null) ? device.getDescription()  
                    : "No description available";  
            System.out.printf("#%d: %s [%s]\n", i++, device.getName(), description);  
        }  
  
        PcapIf device = alldevs.get(0); // We know we have atleast 1 device  

TCP Reassembly using 1.3 JnetPcap library

Hello,

I am using jnetpcap 1.3 version.

Can anybody suggest how to reassemble these TCP packets using Jnetpcap (1.3)?

I had a look at the examples but couldn't get them working. Examples I found with version 12. but it seems to be depreceted.

I am still trying with TcpReassembler.

I will try to brief my requirement and if anybody have any suggestions more welcome.

1). Read pcap packets.
2). Save to data store.
3). Retrieve packets from datastore and reassemble.

Thanks in advance.