Questions tagged [jnetpcap]

jNetPcap is an open-source Java wrapper for nearly all libpcap library native calls.

Links

129 questions
6
votes
2 answers

Jnetpcap, preparing UDP/TCP/IP/ICMP packet

Recently, I'm using Jnetpcap to send/receive raw packet over network. Jnetpcap provides sending packets by Pcap.sendPacket(). This method gets raw buffer or bytes to send. On the other hand, there is org.jnetpcap.protocol.* classes which wraps…
masoud
  • 55,379
  • 16
  • 141
  • 208
5
votes
5 answers

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

I am using IntelliJ to run a sample java-jnetpcap application. I have 64 bit JDK in the class path and included the following dependency jnetpcap jnetpcap
thevillageguy
  • 123
  • 2
  • 9
4
votes
3 answers

Program works in eclipse with libraries but not when extracted to jar

I've made a project in Java using Eclipse using the jnetpcap library which needs WinPCap to be installed to work properly. However, there's no winpcap library included in my project only jnetpcap. But when i extract the project into a generated jar…
Anders Lassen
  • 615
  • 2
  • 8
  • 20
3
votes
0 answers

How to read packets in Android using Jnetpcap?

I am working on an Android app where I need to capture the packets. I am using VpnService for this purpose. I am able to write the data to a pcap file. Next I want to decode the pcap file. I am using jnetpcap library version 1.3 for this purpose. I…
thedarkpassenger
  • 7,158
  • 3
  • 37
  • 61
3
votes
1 answer

PCAP nanosecond resolution from Java

Context Current status For performance analysis, my company is interested in nanosecond resolution. So far, we have been using hardware timestamps and the support of nanoseconds was quickly hacked into the C libpcap library. It seems that the…
snooze92
  • 4,178
  • 2
  • 29
  • 38
3
votes
2 answers

Stopping ARP protocol in window

Is there a way to stop ARP protocol in window , i have developed my own ARP protocol which add authentication to ARP using a java api called jnetpcap. but , still haven't found a way to stop the normal ARP. now i am deleting the ARP entry updated…
Mohammed Falha
  • 967
  • 8
  • 22
3
votes
0 answers

JNetPcap send UDP Packet

A have an issue and since i have worked nearly 3 days to get the library and code to work without exceptions, i'm really disapointed now. I just want to create an Udp Package with an spoofed IPv4 address and send it. Sounds easy, dosn't it? But it…
2
votes
0 answers

jNetPcap: Cannot extract Complete Http header

I am using jNetPcap library to extract packet information from an offline Pcap file.When I capture packets on Wi-fi network with Microsoft Interface I am able to extract the Http header with all fields. However with Intel Interface(i.e when I am on…
Rhiya
  • 271
  • 6
  • 21
2
votes
1 answer

Issue capturing packets from pcap file using JNetPcap

I'm using JNetPcap to capture packets from a pcap file in Java. The code works fine sometimes, but other times it doesn't capture any packets even though the pcap file is full of packets. Here's my code: import org.jnetpcap.Pcap; import…
elnino17
  • 31
  • 1
2
votes
1 answer

Winpcap with jnetpcap and Windows 10

According to WinPcap website, they don't support Windows 10 but latest release of famous network analyzer, Wireshark (2.6.6) which can run on Windows 10 still uses WinPcap in its installation. On the other hand, they warn you about WinPcap usage on…
2
votes
2 answers

How to execute maven main class with required user libraries?

I created one maven project in which only one class is available. I want to use jnetpcap API in this class. For this purpose, I followed jnet eclipse setup tutorial with Setup 1 approach (user library) and created one user library and added it to my…
ketan
  • 2,732
  • 11
  • 34
  • 80
2
votes
0 answers

How to install jnetpcap library on Raspberry pi (Rasbian OS)?

Can anyone help. I want to capture packets using jnetpcap library. But I'm getting Java build path errors. I think i have not installed the library properly. I tried with the jnetpcap library for Debian version. What do I have to download and put…
Shan1
  • 21
  • 2
2
votes
1 answer

How to add jnetpcap as dependency in maven project?

I have created app that uses jnetpcap. It should be multiplatform and runs on 32 and 64 platforms. I have never worked with maven befor, so how to add all versions of jnetpcap to project? I found a solution that uses nar…
Troir1
  • 63
  • 3
  • 9
2
votes
1 answer

jnetpcap java.lang.UnsatisfiedLinkError: /usr/lib/libjnetpcap.so: libpcap.so.0.9: cannot open shared object file: No such file or directory

I am trying to run simple program using jnetpcap library in CentOS maching but its giving: java.lang.UnsatisfiedLinkError: /usr/lib/libjnetpcap.so: libpcap.so.0.9: cannot open shared object file: No such file or directory. I have put…
Mohit Jain
  • 357
  • 2
  • 7
  • 18
2
votes
0 answers

Is it a possible what get a PID of running process from given port?

I'm trying to write a packet capturing java program using the jnetpcap library. But I wonder if I can get the PID from a given port? In my case, I'm trying to use Sigar API to get the PID (method name is getProcPort(protocol, port)).…
kmin
  • 21
  • 4
1
2 3
8 9