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

November 2015

payload.toHexdump()

Hi Mark

Just wondering how to remove the offset and extra text from the payload.toHexdump().

i.e if we have the following Hexdump:

0000: 80 63 00 3e 00 e2 04 a0 00 00 0a 4a 02 04 02 00 .c.>.......J....
0010: 10 00 00 00 05 00 00 00 29 00 00 02 bc 00 01 00 ........).......
0020: 15 3e 22 93 02 00 00 00 00 00 00 00 00 00 00 17 .>".............
0030: 71 00 02 bc q...

How would we get just the payload parts:

80 63 00 3e 00 e2 04 a0 00 00 0a 4a 02 04 02 00
10 00 00 00 05 00 00 00 29 00 00 02 bc 00 01 00
15 3e 22 93 02 00 00 00 00 00 00 00 00 00 00 17
71 00 02 bc

Thank you

Decode DynamicType 99 RTP packet

Hi there

I am looking to decode RTP packets with dynamic payload (type 99).

I have had a look at the TestVoip.java program you have written and was wondering if you had any suggestions on how to go about decoding Dynamic payloads with jNetPcap?

Any help would be greatly appreciated.

Kind regards
Shiv

Read Packet Protocol

Hi all.

I just use this lib for some week, and i want to ask about get packet protocol.

I want to get last protocol of packet, but I have no way to find this. I followed this topic http://jnetpcap.com/?q=node/737, but in this line, seems have no getStaticLastHeader() method.
Header last = JPacket.getStaticLastHeader(packet);

So how i can get protocol of the packet?

Thank all for reading, and sorry for my bad english. Thank you very much.

extract smtp, dns and ftp headers from pcap file

dear all
hello
i have a pcap file and i want to read the smtp,ftp and dns headers in human readable format. for http i ca do it in this way:
if (packet.hasHeader(http)) {
Http h = packet.getHeader(http);
String s = new String(h.getHeader());
System.out.println(s);
}

output is like this:

GET /show.aspx?s=4&u=635202019766428367 HTTP/1.1
Host: ads.goldiran.ir
Connection: keep-alive
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Upgrade-Insecure-Requests: 1

for other application layer protocols how can i do it??
could anyone please help me?
thanks a lot

Using Jnetpcap in Spring

Hi,

I'm Trying to use Jnetpcap in a Web Application. It is working fine with the first startup of the Application Server.
i.e., The Native Libraries are registering Correctly and it able to parse the Input files.

But, once I do redeployment of code or enable/disable of the WAR file. (i.e., Application server is not restarted, only the application is redeployed) it fails to startup, the native libraries are not registered and throwing

java.lang.UnsatisfiedLinkError: com.slytechs.library.NativeLibrary.dlopen(Ljava/lang/String;)

Once, wee restart the Application Server, It works Fine.

Please let me know how to un-register the Native Library?

I'm Trying some thing like this..

NativeLibrary.loadLibrary(Pcap.LIBRARY).ref.dispose();

But it doesn't Help....

"Unable To Satisfy Dependency" problem

Hi,

I'm getting exception as given below when I try to deploy my project into the virgo server. Kindly help me out.

Cannot satisfy constraints for bundle 'jAgent-bl' version '1.1.5.SNAPSHOT'. Cannot resolve: jAgent-bl
Resolver report:
An Import-Package could not be resolved. Resolver error data . Caused by missing constraint in bundle
constraint:
An Import-Package could not be resolved. Resolver error data . Caused by missing constraint in bundle
constraint:
. org.eclipse.virgo.kernel.osgi.framework.UnableToSatisfyBundleDependenciesException: Unable to satisfy dependencies of bundle 'jAgent-bl' at version '1.1.5.SNAPSHOT': Cannot resolve: jAgent-bl
Resolver report:
An Import-Package could not be resolved. Resolver error data . Caused by missing constraint in bundle
constraint:
An Import-Package could not be resolved. Resolver error data . Caused by missing constraint in bundle
constraint:

at org.eclipse.virgo.kernel.install.pipeline.stage.resolve.internal.QuasiResolveStage.process(QuasiResolveStage.java:46)
at org.eclipse.virgo.kernel.install.pipeline.internal.StandardPipeline.doProcessGraph(StandardPipeline.java:62)
at org.eclipse.virgo.kernel.install.pipeline.internal.CompensatingPipeline.doProcessGraph(CompensatingPipeline.java:73)

DHCP/Radius

I have a need to decode radius and dhcp traffic for a large number of devices (approx 6 million). Due to the amount of data this needs to be run across multiple servers so it is preferable to be written in Java or Scala. Can jNetPcap grab fields out of DHCP and Radius packets? Happy to purchase the commercial version if it is available and does what we need. It would need to decode v6 information also.

Thanks