Lines Matching defs:servers
86 static int config_nameserver(struct server_state **servers, int *nservers,
169 channel->servers = NULL;
239 if (channel->servers)
240 free(channel->servers);
270 struct ares_addr_node *servers;
303 if (src->servers[i].addr.family != AF_INET) {
309 rc = ares_get_servers(src, &servers);
312 rc = ares_set_servers(*dest, servers);
313 ares_free_data(servers);
356 /* Copy IPv4 servers */
360 if (channel->servers[i].addr.family == AF_INET)
364 options->servers = malloc(ipv4_nservers * sizeof(struct in_addr));
365 if (!options->servers)
369 if (channel->servers[i].addr.family == AF_INET)
370 memcpy(&options->servers[j++],
371 &channel->servers[i].addr.addrV4,
372 sizeof(channel->servers[i].addr.addrV4));
449 /* Copy the IPv4 servers, if given. */
455 channel->servers =
457 if (!channel->servers)
461 channel->servers[i].addr.family = AF_INET;
462 memcpy(&channel->servers[i].addr.addrV4,
463 &options->servers[i],
464 sizeof(channel->servers[i].addr.addrV4));
602 * The only ordering requirement is that primary servers are listed
609 * Finally, we need to return the total number of DNS servers located.
750 printf ("DNS Servers:\n"
794 struct server_state *servers = NULL;
835 status = config_nameserver(&servers, &nservers, buf);
853 status = config_nameserver(&servers, &nservers, line);
858 status = config_nameserver(&servers, &nservers, line);
864 status = config_nameserver(&servers, &nservers, line);
869 status = config_nameserver(&servers, &nservers, line);
897 status = config_nameserver(&servers, &nservers, line);
915 /* Under RISC OS, name servers are listed in the
931 status = config_nameserver(&servers, &nservers, pos);
953 servers = calloc(i, sizeof(struct server_state));
954 if (!servers)
959 servers[i].addr.addrV4.s_addr = htonl(def_nameservers[i]);
960 servers[i].addr.family = AF_INET;
967 status = config_nameserver(&servers, &nservers, value);
993 status = config_nameserver(&servers, &nservers, p);
1114 if (servers != NULL)
1115 free(servers);
1125 if (servers)
1127 channel->servers = servers;
1165 /* If nobody specified servers, try a local named. */
1166 channel->servers = malloc(sizeof(struct server_state));
1167 if (!channel->servers) {
1171 channel->servers[0].addr.family = AF_INET;
1172 channel->servers[0].addr.addrV4.s_addr = htonl(INADDR_LOOPBACK);
1252 if(channel->servers)
1253 free(channel->servers);
1320 static int config_nameserver(struct server_state **servers, int *nservers,
1359 /* Resize servers state array. */
1360 newserv = realloc(*servers, (*nservers + 1) *
1375 *servers = newserv;
1792 server = &channel->servers[i];