Used ipcheck function to compare both ipv6 and ipv4 values.