• Home
  • Raw
  • Download

Lines Matching refs:servers

86 static int config_nameserver(struct server_state **servers, int *nservers,
169 channel->servers = NULL; in ares_init_options()
239 if (channel->servers) in ares_init_options()
240 free(channel->servers); in ares_init_options()
270 struct ares_addr_node *servers; in ares_dup() local
303 if (src->servers[i].addr.family != AF_INET) { in ares_dup()
309 rc = ares_get_servers(src, &servers); in ares_dup()
312 rc = ares_set_servers(*dest, servers); in ares_dup()
313 ares_free_data(servers); in ares_dup()
360 if (channel->servers[i].addr.family == AF_INET) in ares_save_options()
364 options->servers = malloc(ipv4_nservers * sizeof(struct in_addr)); in ares_save_options()
365 if (!options->servers) in ares_save_options()
369 if (channel->servers[i].addr.family == AF_INET) in ares_save_options()
370 memcpy(&options->servers[j++], in ares_save_options()
371 &channel->servers[i].addr.addrV4, in ares_save_options()
372 sizeof(channel->servers[i].addr.addrV4)); in ares_save_options()
455 channel->servers = in init_by_options()
457 if (!channel->servers) in init_by_options()
461 channel->servers[i].addr.family = AF_INET; in init_by_options()
462 memcpy(&channel->servers[i].addr.addrV4, in init_by_options()
463 &options->servers[i], in init_by_options()
464 sizeof(channel->servers[i].addr.addrV4)); in init_by_options()
794 struct server_state *servers = NULL; in init_by_resolv_conf() local
835 status = config_nameserver(&servers, &nservers, buf); in init_by_resolv_conf()
853 status = config_nameserver(&servers, &nservers, line); in init_by_resolv_conf()
858 status = config_nameserver(&servers, &nservers, line); in init_by_resolv_conf()
864 status = config_nameserver(&servers, &nservers, line); in init_by_resolv_conf()
869 status = config_nameserver(&servers, &nservers, line); in init_by_resolv_conf()
897 status = config_nameserver(&servers, &nservers, line); in init_by_resolv_conf()
931 status = config_nameserver(&servers, &nservers, pos); in init_by_resolv_conf()
953 servers = calloc(i, sizeof(struct server_state)); in init_by_resolv_conf()
954 if (!servers) in init_by_resolv_conf()
959 servers[i].addr.addrV4.s_addr = htonl(def_nameservers[i]); in init_by_resolv_conf()
960 servers[i].addr.family = AF_INET; in init_by_resolv_conf()
967 status = config_nameserver(&servers, &nservers, value); in init_by_resolv_conf()
993 status = config_nameserver(&servers, &nservers, p); in init_by_resolv_conf()
1114 if (servers != NULL) in init_by_resolv_conf()
1115 free(servers); in init_by_resolv_conf()
1125 if (servers) in init_by_resolv_conf()
1127 channel->servers = servers; in init_by_resolv_conf()
1166 channel->servers = malloc(sizeof(struct server_state)); in init_by_defaults()
1167 if (!channel->servers) { in init_by_defaults()
1171 channel->servers[0].addr.family = AF_INET; in init_by_defaults()
1172 channel->servers[0].addr.addrV4.s_addr = htonl(INADDR_LOOPBACK); in init_by_defaults()
1252 if(channel->servers) in init_by_defaults()
1253 free(channel->servers); in init_by_defaults()
1320 static int config_nameserver(struct server_state **servers, int *nservers, in config_nameserver() argument
1360 newserv = realloc(*servers, (*nservers + 1) * in config_nameserver()
1375 *servers = newserv; in config_nameserver()
1792 server = &channel->servers[i]; in ares__init_servers_state()