Packet Decoding

Decoded .au file from undecoded Rtp Packets getPayload()

Hi,

I followed the below discussion
http://jnetpcap.org/node/195/

I got .au file but its not playing in Windows media player.
I know that getPayload() method will return undecoded packets, how to decode that packet and how will get ".au" audio file from that Payload raw data.

Can you please help me for the same.

Regards,
Gomathi.K

How to decode undecoded packet which we get from getPayload method from PcapPacket?

Hi,

How to decode and get the .au audio file from undecoded packtes which i got from getPayload() method.

Regards,
Gomathi.K

New to packet capture analysis

Hi,

I am new to packet capturing and analysis and I am trying to use jnetpcap libraries with java code to open file.pcap which was captures by wire shark.

I used the code below, but I don't think that I am on the right track. My requirement is to load the pcap file and convert it to byte[].

      System.out.println("In MAIN");
        StringBuilder sb = new StringBuilder();

        int snaplen = 64 * 1024;           // Capture all packets, no trucation
        int flags = Pcap.MODE_PROMISCUOUS; // capture all packets
        int timeout = 10 * 1000;           // 10 seconds in millis

        Pcap pcap=null;

        try {
            pcap = Pcap.openOffline("C:\\myFile.pcap", sb);

        } catch (Exception e) {
            e.printStackTrace();
        }
        System.out.println("After pcap openOffline");

        if (pcap == null) {
            System.out.println("pcap == null");
            return;
        }
        System.out.println("pcap.src: " + sb.toString());
        
    }

Any help will be appreciated and I will continue to look through the tutorials.

Thanks.

Multiple interface Packet order

Hi everyone,

I listen 2 interface and add all packets to queue (FIFO). When I retrieve from queue, packets are not time based ordered (Packets ordered for same interface). I check my thesis using snoop and wireshark (timestamp value). Is there any way to packets arrived to time ordered not depends on interfaces.
I get packets using PcapPacketHandler class nextPacket functions.

Thanks.

thread safety

Hi,

I use JController.nextPacket and AbstractMessageHeader.decodeHeader() in a multithreaded environment, but it is unstable at times.

I just wanted to know whether the inQ, outQ used in JController and AbstractMessageHeader is thread safe or not.

Thanks,
Ujjwal