working on enviroment variables
change compiler from gcc to cc for more plat. ind.
add licence banner
fix a compiling waring and add licence header
fix choosing of address family
using cause variable for error printing