Added function to compute the netmask from CIDR