Fn krb5_krbhst_init krb5_context context const char *realm unsigned int type krb5_krbhst_handle *handle
Fn krb5_krbhst_init_flags krb5_context context const char *realm unsigned int type int flags krb5_krbhst_handle *handle
Fn krb5_krbhst_next krb5_context context krb5_krbhst_handle handle krb5_krbhst_info **host
Fn krb5_krbhst_next_as_string krb5_context context krb5_krbhst_handle handle char *hostname size_t hostlen
Fn krb5_krbhst_reset krb5_context context krb5_krbhst_handle handle
Fn krb5_krbhst_free krb5_context context krb5_krbhst_handle handle
Fn krb5_krbhst_format_string krb5_context context const krb5_krbhst_info *host char *hostname size_t hostlen
Fn krb5_krbhst_get_addrinfo krb5_context context krb5_krbhst_info *host struct addrinfo **ai
These functions are used to sequence through all Kerberos hosts of a
particular realm and service. The service type can be the KDCs, the
administrative servers, the password changing servers, or the servers
for Kerberos 4 ticket conversion.
First a handle to a particular service is obtained by calling
Fn krb5_krbhst_init_flags )
of interest and the type of service to lookup. The
can be one of:
is returned to the caller, and should be passed to the other
is the same flags as
Possible values are:
only talk to master (readwrite) KDC
this is a large message, so use transport that can handle that.
For each call to
information on a new host is returned. The former function returns in
a pointer to a structure containing information about the host, such
as protocol, hostname, and port:
The related function,
Fn krb5_krbhst_next_as_string ,
return the same information as a URL-like string.
When there are no more hosts, these functions return
To re-iterate over all hosts, call
and the next call to
will return the first host.
When done with the handle,
should be called.
To use a
there are two functions:
that will return a printable representation of that struct
that will return a
that can then be used for communicating with the server mentioned.
The following code will print the KDCs of the realm