Search code examples
pythoncperlnetwork-programmingtcpreplay

How to add Tcpreplay as a library in C language or any other programming language?


I am trying to add tcpreplay library in C so that I can rewrite the data in the packet. I have been searching for a library in C programming. The result was to add TCPreplay and start using it's methods. Unfortunately it is not there for C language. If there is way to add the Tcpreplay to my program, let me know.

If this is not feasible, Please let me know how I can proceed. Also in Perl, it Net-Pcap is available but it cannot be used to write data into the packets.

Also let me know which programming language to use, if C is not compatible.

Thanks in advance. :)


Solution

  • If you look at this branch: https://github.com/synfinatic/tcpreplay you'll find my code to create a C library for tcpreplay & tcprewrite/etc. It's not complete, doesn't completely work and I have no intentions of completing it (I've since handed off Tcpreplay to Fred @ Appneta who is the new maintainer) but depending on what you need it might work.