hosts
static const char hosts[][MAXHOSTNAMELEN] = {
for (i = 0; i < __arraycount(hosts); i++) {
ATF_REQUIRE(sethostname(hosts[i], sizeof(hosts[i])) == 0);
ATF_REQUIRE(strcmp(hosts[i], name) == 0);
hosts = sl_init();
if (hosts->sl_cur == 0)
if ((ask = calloc(hosts->sl_cur, sizeof(int))) == NULL)
if ((got = calloc(hosts->sl_cur, sizeof(int))) == NULL)
for (i = 0; i < (int)hosts->sl_cur; i++) {
hosts->sl_str[i], ask[i], got[i]);
sl_free(hosts, 1);
static StringList *hosts = NULL;
sl_add(hosts, strdup(ptr));
size_t i = (random() & 0x0fffffff) % hosts->sl_cur;
char *host = hosts->sl_str[i];
static int hosts(int, char *[]);
{ "hosts", hosts, },
insert(char *label, struct namelist *files, struct namelist *hosts,
hosts = expand(hosts, E_ALL);
for (h = hosts; h != NULL; nexth = h->n_next, free(h), h = nexth) {
struct namelist *files, *hosts;
hosts = expand(&tnl, E_ALL);
prnames(hosts);
insert(NULL, files, hosts, cmds);
freenl(hosts);
hp->next = hosts;
hosts = hp;
} *hosts;
if (!hosts)
for (hp = hosts; hp != NULL; hp = hp->next) {
hp->next = hosts;
hosts = hp;
} *hosts;
if (!hosts)
for (hp = hosts; hp != NULL; hp = hp->next) {
if (hosts == 0)
free((char *)hosts), hosts = 0;
for (p = hosts; p < hosts+nhosts; p++)
if (reallocarr(&hosts, nhosts + 1, sizeof(*p)) != 0) {
p = &hosts[nhosts++];
if (hosts)
for (p = hosts; p < hosts+nhosts; p++) {
if (hosts)
for (p = hosts; p < hosts+nhosts; p++) {
for (p = hosts; p < hosts+nhosts; p++) {
} *hosts = NULL;
static char **hosts = NULL;
if (reallocarr(&hosts, nhostsbak, sizeof(*hosts)) != 0) {
hosts[0] = __UNCONST("*");
hosts[nhostsbak - 1] = __UNCONST("127.0.0.1");
hosts[nhostsbak - 1] = __UNCONST("::1");
if (inet_pton(AF_INET, hosts[nhostsbak],
hosts[nhostsbak], host_addr) == 1) {
if (inet_pton(AF_INET6, hosts[nhostsbak],
if (inet_pton(AF_INET, hosts[nhostsbak],
if (strcmp("*", hosts[nhostsbak]) == 0)
hosts[nhostsbak] = NULL;
if ((aicode = getaddrinfo(hosts[nhostsbak],
(hosts[nhostsbak] == NULL) ? "*" :
hosts[nhostsbak], nconf->nc_netid);
if (getaddrinfo(hosts[i], NULL, &hints, &res) != 0)
if (reallocarr(&hosts, nhosts, sizeof(*hosts)) != 0)
hosts[nhosts - 1] = strdup(optarg);
if (hosts[nhosts - 1] == NULL)
FILE *hosts;
hosts = target_fopen("/etc/hosts", "a");
if (hosts != 0) {
write_etc_hosts(hosts);
(void)fclose(hosts);
if (hosts != -1) {
hosts = 0;
if (hosts != -1) {
hosts = 1;
if (hosts == -1)
if (hosts) {
int hosts = -1;