manipulating an org.jnetpcap.protocol.network.Arp header - no setters


I'm trying to capture and manipulate ARP headers within my LAN.

I;ve managed to filter and capture the right packets.

When trying to manipulate them (e.g. - change from reply to request or vice versa, modify sender/target addresses etc.) I find the Arp header class has only getters but NO setters so I'm forced to manually modify the actual Bytes in the Buffer..

I found this link: http://jnetpcap.com/?q=node/563 in which you've stated:
You can use existing ethernet and ARP setters to change any of the fields or do it manually in the hexdump string or buffer.

Please help me - are there any setters for the Arp class or must I manually modify each byte according to the Field's offset and length..?

Ubuntu 14.04 LTS has a null TCP header - solution found

The problem I am seeing is identical to http://jnetpcap.com/?q=node/1066 but that topic was closed. I am using the jnetpcap 1.3.0-1 Ubuntu 64 bit version. I also have the same version of jnetpcap for a 32 bit Windows box. I have a simple application which creates a TCP/IP Packet and ultimately sends it to another machine. This program works flawlessly on Windows, however on my Ubuntu box it fails when I attempt to get my Tcp object via packet.getHeader
public void buildTCPHeader() {
  packet.setUByte(46, 0x50);
  tcp = packet.getHeader(new Tcp());
Is there some sort of known issue with Ubuntu or have I forgotten to do something that Windows is more forgiving on, but Ubuntu is not? Thanks Phil

How to find the ip address of an interface/device and not the packet's dest source ip addresses

I want to find the ip address of an interface using jnetpcap. How can I find it ?

Is there a method in jnetpcap like this example to find the interface and not the packet ip address

Enumeration nets = NetworkInterface.getNetworkInterfaces();
for (NetworkInterface netint : Collections.list(nets))

Thank u!!

Error while Pcap.openOffline(file, user)

Hi all,

I am trying to follow the classic example offline capture. While I am using Pcap.openOffline, there is always an error:"Error while opening device for capture: truncated dump file; tried to read 24 file header bytes, only got 0". Can anybody help me on it?

Thank you so much

outofmemory issue while reading 13MB pcap file.

I am using jnetpcap1.3 version,when jnetpcap trying to read the pcap packets,it is throwig out of memory issue.

It is thowing error while reading 13MB file,please suggest how to resolve issue.

I am using netbeans 8.0 + ubuntu 14.04.

jvm version-1.7
Jnetpcap version 1.3
Ubuntu version -14.04
bit version -64 bit
uname -a:
Linux ep-3 3.13.0-35-generic #62-Ubuntu SMP Fri Aug 15 01:58:42 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

i tried to add jvm memory settings,but t dosn't impacted.

Could anyone suggest me how to resolve outofmemory issue in JnetPcap.

error throwing here..

offlinePackets.loop(-1, jpacketHandler, packetList);

help me if anyone fixed this kind of issue....

filename =snort.log, size =13MB

Thank you....

Syndicate content