[jnetpcap-users] Help regarding packet replay
A java PCAP and DPI library
Brought to you by:
voytechs
From: Steven .. <al...@ms...> - 2011-03-30 06:29:58
|
Hello, First off, I would like congratulate and thank everyone on the JnetPcap team for such an awesome development. I am trying to write code that would replay a saved pcap file in order to simulate the packets as if they came from an original source (i.e as if originated from the new source and destination IP and port values). I originally capture the packets using wireshark, save as pcap, then read and replay the packets from the saved file to simulate the original packets as if they came from the source. Here are the steps I follow: Use Pcap.openOffline to allow for reading packets from the pcap file Use Pcap.openLive to allow for writing the packets out to the interface device Loop over the saved pcap file and read the packets using the handler and nextPacket method Peer and scan the packet Update the packet source and destination IP and port values Recalculate the packet checksum Finally, write the modified packet out the interface device Scan again But, when I write to the wire and use Wireshark to verify the packets, Wireshark shows that the packets are both as: Retransmitted packets, and Fragmented with lost segments Can you please help. Best Regards > Subject: Welcome to the "jnetpcap-users" mailing list > From: jne...@li... > To: al...@ms... > Date: Tue, 29 Mar 2011 03:20:49 +0000 > > Welcome to the jne...@li... mailing list! > > To post to this list, send your email to: > > jne...@li... > > General information about the mailing list is at: > > https://lists.sourceforge.net/lists/listinfo/jnetpcap-users > > If you ever want to unsubscribe or change your options (eg, switch to > or from digest mode, change your password, etc.), visit your > subscription page at: > > https://lists.sourceforge.net/lists/options/jnetpcap-users/alfaxo%40msn.com > > > You can also make such adjustments via email by sending a message to: > > jne...@li... > > with the word `help' in the subject or body (don't include the > quotes), and you will get back a message with instructions. > > You must know your password to change your options (including changing > the password, itself) or to unsubscribe. It is: > > asaxexax > > Normally, Mailman will remind you of your lists.sourceforge.net > mailing list passwords once every month, although you can disable this > if you prefer. This reminder will also include instructions on how to > unsubscribe or change your account options. There is also a button on > your options page that will email your current password to you. |