Copy of the original source, modified for TCP/IP, use some Typedefs ... 
and more 
