I want to build a testbed including a client and a web server, where I can replay some logged http get requests to the web server. So I am planning to exactly simulating the actual traffic with requests with their original source address and port number.
To build the client, I am hopping that I can use the socket option IP_FREEBIND to bind to any possible source address and port number. Is there any known code for this purpose? (I really do not want to reinvent the wheel) Should I use the raw sockets as this thread is suggesting?
Any help will be greatly appreciated.