So I used tcpdump to capture my UDP packets into a file. I now have my pcap file with my packets. Now I need:
A Java program to open this file, parse it and place the packet contents, one at a time, into a ByteBuffer so my protocol parser can process each packet as it was getting them from the network. My protocol parser must not care whether it is being called by the network reader or by the pcap processor.
Is there a library or a standard way in Java to do that? Can you give me or point me out to some source code example? Thanks!