$ 0 0 archived from http://stackoverflow.com/questions/2989419/how-can-i-programmatically-find-the-ip-address-netmask-gateway-configured-for-a/2989470#2989470