If you want to generate custom IP packets (Specifying source IP address), you will need something like
libnet and/or
winpcap (For Windows) - there is also a *nix pcap (Which Windows shamelessly copied).
"When you are faced with a dilemma, might as well make dilemmanade.
"