This family of functions allows you to retrieve service to port
mappings using Hesiod. To perform lookups, you need an initialized
Hesiod context; see hesiod(3) for details. Information is returned in
the same format as by
It is the caller's responsibility to call
with the returned service entry to free the resources used by the
Hesiod queries for service information are made using the ``service''
Hesiod type, using the service name as the Hesiod name. The
corresponding records should be space-separated lists of strings
giving the service name, protocol, port number (in decimal), and zero
or more aliases for the service. There may be multiple records per
will pick the first one whose protocol matches
returns NULL and sets the global variable
to indicate the error.
may fail for any of the reasons the routine