//System.out.println("link:"+info.linktype);
//System.out.println(lastJpcap);
JpcapWriter writer = JpcapWriter.openDumpFile(jpcap,file.getPath());
for (Packet p:packets) {
writer.writePacket(p);
}
writer.close();
isSaved = true;
//JOptionPane.showMessageDialog(frame,file+" was saved correctly.");