Port scanner Ansi C code