I am using the jNetPcap java library (v.1.4.r1425) for network packet capture. At this time I am using the dump(PcapPktHdr hdr, java.nio.ByteBuffer packet) method to write packets of interest to a dump file. This works great, however if my service gets restarted, the existing data in the file gets overwritten with new packet data. I was wondering if there is a way to append data to the file?
It looks like there is native ability in libpcap to do so using the pcap_dump_fopen method. The jNetPcap java wrapper does not seem to have this capability from what I can tell.
Any help is greatly appreciated!