Initial import from FreeBSD RELENG_4:
[dragonfly.git] / crypto / heimdal / lib / krb5 / krb5_get_krbhst.3
1 .\" Copyright (c) 2001 Kungliga Tekniska Högskolan
2 .\" $Id: krb5_get_krbhst.3,v 1.4 2002/08/28 15:30:53 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 LIBRARY
14 Kerberos 5 Library (libkrb5, -lkrb5)
15 .Sh SYNOPSIS
16 .Fd #include <krb5.h>
17 .Ft krb5_error_code
18 .Fn krb5_get_krbhst "krb5_context context" "const krb5_realm *realm" "char ***hostlist"
19 .Ft krb5_error_code
20 .Fn krb5_get_krb_admin_hst "krb5_context context" "const krb5_realm *realm" "char ***hostlist"
21 .Ft krb5_error_code
22 .Fn krb5_get_krb_changepw_hst "krb5_context context" "const krb5_realm *realm" "char ***hostlist"
23 .Ft krb5_error_code
24 .Fn krb5_get_krb524hst "krb5_context context" "const krb5_realm *realm" "char ***hostlist"
25 .Ft krb5_error_code
26 .Fn krb5_free_krbhst "krb5_context context" "char **hostlist"
27 .Sh DESCRIPTION
28 These functions implement the old API to get a list of Kerberos hosts,
29 and are thus similar to the
30 .Fn krb5_krbhst_init
31 functions. However, since these functions returns
32 .Em all
33 hosts in one go, they potentially have to do more lookups than
34 necessary. These functions remain for compatibility reasons.
35 .Pp
36 After a call to one of these functions,
37 .Fa hostlist
38 is a
39 .Dv NULL
40 terminated list of strings, pointing to the requested Kerberos hosts. These should be freed with
41 .Fn krb5_free_krbhst
42 when done with.
43 .Sh EXAMPLE
44 The following code will print the KDCs of the realm
45 .Dq MY.REALM .
46 .Bd -literal -offset indent
47 char **hosts, **p;
48 krb5_get_krbhst(context, "MY.REALM", &hosts);
49 for(p = hosts; *p; p++)
50     printf("%s\\n", *p);
51 krb5_free_krbhst(context, hosts);
52 .Ed
53 .\" .Sh BUGS
54 .Sh SEE ALSO
55 .Xr krb5_krbhst_init 3