KRB5_GET_KRBHST(3) BSD Library Functions Manual KRB5_GET_KRBHST(3) NNAAMMEE kkrrbb55__ggeett__kkrrbbhhsstt, kkrrbb55__ggeett__kkrrbb__aaddmmiinn__hhsstt, kkrrbb55__ggeett__kkrrbb__cchhaannggeeppww__hhsstt, kkrrbb55__ggeett__kkrrbb552244hhsstt, kkrrbb55__ffrreeee__kkrrbbhhsstt -- lookup Kerberos KDC hosts LLIIBBRRAARRYY Kerberos 5 Library (libkrb5, -lkrb5) SSYYNNOOPPSSIISS ##iinncclluuddee <> _k_r_b_5___e_r_r_o_r___c_o_d_e kkrrbb55__ggeett__kkrrbbhhsstt(_k_r_b_5___c_o_n_t_e_x_t _c_o_n_t_e_x_t, _c_o_n_s_t _k_r_b_5___r_e_a_l_m _*_r_e_a_l_m, _c_h_a_r _*_*_*_h_o_s_t_l_i_s_t); _k_r_b_5___e_r_r_o_r___c_o_d_e kkrrbb55__ggeett__kkrrbb__aaddmmiinn__hhsstt(_k_r_b_5___c_o_n_t_e_x_t _c_o_n_t_e_x_t, _c_o_n_s_t _k_r_b_5___r_e_a_l_m _*_r_e_a_l_m, _c_h_a_r _*_*_*_h_o_s_t_l_i_s_t); _k_r_b_5___e_r_r_o_r___c_o_d_e kkrrbb55__ggeett__kkrrbb__cchhaannggeeppww__hhsstt(_k_r_b_5___c_o_n_t_e_x_t _c_o_n_t_e_x_t, _c_o_n_s_t _k_r_b_5___r_e_a_l_m _*_r_e_a_l_m, _c_h_a_r _*_*_*_h_o_s_t_l_i_s_t); _k_r_b_5___e_r_r_o_r___c_o_d_e kkrrbb55__ggeett__kkrrbb552244hhsstt(_k_r_b_5___c_o_n_t_e_x_t _c_o_n_t_e_x_t, _c_o_n_s_t _k_r_b_5___r_e_a_l_m _*_r_e_a_l_m, _c_h_a_r _*_*_*_h_o_s_t_l_i_s_t); _k_r_b_5___e_r_r_o_r___c_o_d_e kkrrbb55__ffrreeee__kkrrbbhhsstt(_k_r_b_5___c_o_n_t_e_x_t _c_o_n_t_e_x_t, _c_h_a_r _*_*_h_o_s_t_l_i_s_t); DDEESSCCRRIIPPTTIIOONN These functions implement the old API to get a list of Kerberos hosts, and are thus similar to the kkrrbb55__kkrrbbhhsstt__iinniitt() functions. However, since these functions returns _a_l_l hosts in one go, they potentially have to do more lookups than necessary. These functions remain for compatibility reasons. After a call to one of these functions, _h_o_s_t_l_i_s_t is a NULL terminated list of strings, pointing to the requested Kerberos hosts. These should be freed with kkrrbb55__ffrreeee__kkrrbbhhsstt() when done with. EEXXAAMMPPLLEESS The following code will print the KDCs of the realm ``MY.REALM''. char **hosts, **p; krb5_get_krbhst(context, "MY.REALM", &hosts); for(p = hosts; *p; p++) printf("%s\n", *p); krb5_free_krbhst(context, hosts); SSEEEE AALLSSOO krb5_krbhst_init(3) HEIMDAL April 24, 2005 HEIMDAL