change source and dest ip and port across multiple streams / packets

744 views
Skip to first unread message

John Chiasson

unread,
Sep 14, 2011, 7:33:25 PM9/14/11
to ostinato
Hi,

I've got a pcap file with 937 packets. Can want to modify the packets
destination ip and ports across all the packets at one time? I am
able to modify each packet individually, but that will take too long.

Thanks,
John

Srivats P

unread,
Sep 14, 2011, 11:32:07 PM9/14/11
to John Chiasson, ostinato
From the GUI you can only edit one packet at a time. What you can do
is convert the pcap file to pdml (an xml format) using tshark. Open
the pdml in a text editor and make the ip and port changes and then
load the pdml into Ostinato. Note if you need the IP and TCP/UDP
checksums also to be recalculated, you will need to do it in the PDML
file before loading it into Ostinato - or manually go and "uncheck"
the "override checksum" options for each packet.

You might find it simpler to use the tcprewrite tool from the tcpreplay suite -
http://tcpreplay.synfin.net/wiki/tcprewrite

Srivats

> --
> Get Ostinato News and Updates on Twitter - Follow @ostinato (http://twitter.com/ostinato)
> ---------
> You received this message because you are subscribed to the Google Groups "ostinato" group.
> To post to this group, send email to osti...@googlegroups.com
> To unsubscribe from this group, send email to ostinato+u...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/ostinato?hl=en
>

John Chiasson

unread,
Sep 15, 2011, 8:48:54 AM9/15/11
to ostinato
Hi Srivats,

Thanks for the info. Seems my post was a bit garbled, but you found
my meaning. Any chance you'll add a feature allowing
such capability in the future? It would be nice to select arbitrary
packets / streams and make property changes across the selection.

John

On Sep 14, 10:32 pm, Srivats P <pstav...@gmail.com> wrote:
> From the GUI you can only edit one packet at a time. What you can do
> is convert the pcap file to pdml (an xml format) using tshark. Open
> the pdml in a text editor and make the ip and port changes and then
> load the pdml into Ostinato. Note if you need the IP and TCP/UDP
> checksums also to be recalculated, you will need to do it in the PDML
> file before loading it into Ostinato - or manually go and "uncheck"
> the "override checksum" options for each packet.
>
> You might find it simpler to use the tcprewrite tool from the tcpreplay suite -http://tcpreplay.synfin.net/wiki/tcprewrite

Srivats P

unread,
Sep 15, 2011, 9:36:24 AM9/15/11
to John Chiasson, ostinato
I suggest you raise an enhancement request on the tracker for this -
not that I'm saying I will implement it anytime soon or at all ;-)

I'm anyway behind target for the next release which should have been
out in August.

Srivats

Reply all
Reply to author
Forward
0 new messages