It is scene dependent. To elaborate, what you want to achieve is important here. Sure we can understand you need to modify the packets on the fly. But it will be good if you can state what is the purpose of doing so.
Sometimes, you may need to modify an existing tool, or under certain circumstances you may need to create your own as well.

Alongwith this you should state the operating system in question, on which you want to run the tool.

I think ettercap can server the purpose on *nix
http://www.networkchemistry.com/products/packetyzer/ for windows.