hosts file manipulation functions