Implemented most of getprotoent()