Lines Matching full:hi

117 	    krb5_krbhst_info *hi;  in srv_find_realm()  local
120 hi = calloc(1, sizeof(*hi) + len); in srv_find_realm()
121 if(hi == NULL) { in srv_find_realm()
129 (*res)[num_srv++] = hi; in srv_find_realm()
131 hi->proto = proto_num; in srv_find_realm()
133 hi->def_port = def_port; in srv_find_realm()
135 hi->port = port; in srv_find_realm()
137 hi->port = rr->u.srv->port; in srv_find_realm()
139 strlcpy(hi->hostname, rr->u.srv->target, len + 1); in srv_find_realm()
208 struct krb5_krbhst_info *hi; in parse_hostspec() local
210 hi = calloc(1, sizeof(*hi) + strlen(spec)); in parse_hostspec()
211 if(hi == NULL) in parse_hostspec()
214 hi->proto = krbhst_get_default_proto(kd); in parse_hostspec()
217 hi->proto = KRB5_KRBHST_HTTP; in parse_hostspec()
220 hi->proto = KRB5_KRBHST_HTTP; in parse_hostspec()
224 hi->proto = KRB5_KRBHST_TCP; in parse_hostspec()
233 memcpy(hi->hostname, &p[1], q - p - 1); in parse_hostspec()
234 hi->hostname[q - p - 1] = '\0'; in parse_hostspec()
239 } else if(strsep_copy(&p, ":", hi->hostname, strlen(spec) + 1) < 0) { in parse_hostspec()
241 free(hi); in parse_hostspec()
245 hi->hostname[strcspn(hi->hostname, "/")] = '\0'; in parse_hostspec()
246 strlwr(hi->hostname); in parse_hostspec()
248 hi->port = hi->def_port = def_port; in parse_hostspec()
251 hi->port = strtol(p, &end, 0); in parse_hostspec()
253 free(hi); in parse_hostspec()
258 hi->port = port; in parse_hostspec()
259 return hi; in parse_hostspec()
263 _krb5_free_krbhst_info(krb5_krbhst_info *hi) in _krb5_free_krbhst_info() argument
265 if (hi->ai != NULL) in _krb5_free_krbhst_info()
266 freeaddrinfo(hi->ai); in _krb5_free_krbhst_info()
267 free(hi); in _krb5_free_krbhst_info()
315 struct krb5_krbhst_info *hi; in append_host_string() local
317 hi = parse_hostspec(context, kd, host, def_port, port); in append_host_string()
318 if(hi == NULL) in append_host_string()
321 append_host_hostinfo(kd, hi); in append_host_string()
430 struct krb5_krbhst_info *hi = *kd->index; in get_next() local
431 if(hi != NULL) { in get_next()
432 *host = hi; in get_next()
530 struct krb5_krbhst_info *hi; in fallback_get_hosts() local
533 hi = calloc(1, sizeof(*hi) + hostlen); in fallback_get_hosts()
534 if(hi == NULL) { in fallback_get_hosts()
539 hi->proto = proto; in fallback_get_hosts()
540 hi->port = hi->def_port = port; in fallback_get_hosts()
541 hi->ai = ai; in fallback_get_hosts()
542 memmove(hi->hostname, host, hostlen); in fallback_get_hosts()
543 hi->hostname[hostlen] = '\0'; in fallback_get_hosts()
545 append_host_hostinfo(kd, hi); in fallback_get_hosts()
558 struct krb5_krbhst_info *hi; in add_locate() local
580 hi = calloc(1, sizeof(*hi) + hostlen); in add_locate()
581 if(hi == NULL) in add_locate()
584 hi->proto = krbhst_get_default_proto(kd); in add_locate()
585 hi->port = hi->def_port = socket_get_port(addr); in add_locate()
586 hi->ai = ai; in add_locate()
587 memmove(hi->hostname, host, hostlen); in add_locate()
588 hi->hostname[hostlen] = '\0'; in add_locate()
589 append_host_hostinfo(kd, hi); in add_locate()