1.\" Copyright (c) 2001 Kungliga Tekniska H�gskolan 2.\" $Id: krb5_get_krbhst.3,v 1.2 2001/11/09 09:34:46 joda Exp $ 3.Dd June 17, 2001 4.Dt KRB5_GET_KRBHST 3 5.Os HEIMDAL 6.Sh NAME 7.Nm krb5_get_krbhst 8.Nm krb5_get_krb_admin_hst 9.Nm krb5_get_krb_changepw_hst 10.Nm krb5_get_krb524hst 11.Nm krb5_free_krbhst 12.Nd lookup Kerberos KDC hosts 13.Sh SYNOPSIS 14.Fd #include <krb5.h> 15 16.Ft krb5_error_code 17.Fn krb5_get_krbhst "krb5_context context" "const krb5_realm *realm" "char ***hostlist" 18.Ft krb5_error_code 19.Fn krb5_get_krb_admin_hst "krb5_context context" "const krb5_realm *realm" "char ***hostlist" 20.Ft krb5_error_code 21.Fn krb5_get_krb_changepw_hst "krb5_context context" "const krb5_realm *realm" "char ***hostlist" 22.Ft krb5_error_code 23.Fn krb5_get_krb524hst "krb5_context context" "const krb5_realm *realm" "char ***hostlist" 24.Ft krb5_error_code 25.Fn krb5_free_krbhst "krb5_context context" "char **hostlist" 26.Sh DESCRIPTION 27These functions implement the old API to get a list of Kerberos hosts, 28and are thus similar to the 29.Fn krb5_krbhst_init 30functions. However, since these functions returns 31.Em all 32hosts in one go, they potentially have to do more lookups than 33necessary. These functions remain for compatibility reasons. 34.Pp 35After a call to one of these functions, 36.Fa hostlist 37is a 38.Dv NULL 39terminated list of strings, pointing to the requested Kerberos hosts. These should be freed with 40.Fn krb5_free_krbhst 41when done with. 42.Sh EXAMPLE 43The following code will print the KDCs of the realm 44.Dq MY.REALM . 45.Bd -literal -offset indent 46char **hosts, **p; 47krb5_get_krbhst(context, "MY.REALM", &hosts); 48for(p = hosts; *p; p++) 49 printf("%s\\n", *p); 50krb5_free_krbhst(context, hosts); 51.Ed 52.\" .Sh BUGS 53.Sh SEE ALSO 54.Xr krb5_krbhst_init 3 55