updated for compiling
updated for compiling
modifications for private IP and IPv6