Version 1.2: Added IPv6 support