1KRB5_GET_KRBHST(3) BSD Library Functions Manual KRB5_GET_KRBHST(3)
2
4 krb5_get_krbhst, krb5_get_krb_admin_hst, krb5_get_krb_changepw_hst,
5 krb5_get_krb524hst, krb5_free_krbhst — lookup Kerberos KDC hosts
6
8 Kerberos 5 Library (libkrb5, -lkrb5)
9
11 #include <krb5.h>
12
13 krb5_error_code
14 krb5_get_krbhst(krb5_context context, const krb5_realm *realm,
15 char ***hostlist);
16
17 krb5_error_code
18 krb5_get_krb_admin_hst(krb5_context context, const krb5_realm *realm,
19 char ***hostlist);
20
21 krb5_error_code
22 krb5_get_krb_changepw_hst(krb5_context context, const krb5_realm *realm,
23 char ***hostlist);
24
25 krb5_error_code
26 krb5_get_krb524hst(krb5_context context, const krb5_realm *realm,
27 char ***hostlist);
28
29 krb5_error_code
30 krb5_free_krbhst(krb5_context context, char **hostlist);
31
33 These functions implement the old API to get a list of Kerberos hosts,
34 and are thus similar to the krb5_krbhst_init() functions. However, since
35 these functions returns all hosts in one go, they potentially have to do
36 more lookups than necessary. These functions remain for compatibility
37 reasons.
38
39 After a call to one of these functions, hostlist is a NULL terminated
40 list of strings, pointing to the requested Kerberos hosts. These should
41 be freed with krb5_free_krbhst() when done with.
42
44 The following code will print the KDCs of the realm “MY.REALM”.
45
46 char **hosts, **p;
47 krb5_get_krbhst(context, "MY.REALM", &hosts);
48 for(p = hosts; *p; p++)
49 printf("%s\n", *p);
50 krb5_free_krbhst(context, hosts);
51
53 krb5_krbhst_init(3)
54
55HEIMDAL April 24, 2005 HEIMDAL