I want to forward data read from a socket. The consumer is not a socket. It expects an IP packet. Hence I have to write an IPv4 or IPv6 header. I also need to add a UDP or TCP header.
What is the best way to do this?
I know there are big libraries (such as Jpcap?) to do this and more.
Any recommendations as to where I can find a small piece of java code?
I want to forward data read from a socket. The consumer is not a
Share
How about this? It’s C# and should be easy to convert. It’s GPLed though so might not fit….
http://www.koders.com/csharp/fid9D119B4DA2575D7C03F5523345AEDB8B282EF5E4.aspx
IPv6
http://happystudy.info/jiaocheng/winsocketdotnetworkprogramming/clientserversocketnetworkcommunication8f_1a.html