* needed to be allocated large enough to hold a decent size packet.
* To break out of the Pcap.loop we call Pcap.breakLoop().
********************************************************************/
if (i++ == index) {
PcapPacket packet = new PcapPacket(header, buffer);
packet.scan(JRegistry.mapDLTToId(pcap.datalink()));
System.out.println(packet.getState().toDebugString());
packet.transferStateAndDataTo(result);
pcap.breakloop();
return;