Lines Matching refs:hostbuf
3347 myhostname(hostbuf, size) in myhostname() argument
3348 char hostbuf[]; in myhostname()
3353 if (gethostname(hostbuf, size) < 0 || hostbuf[0] == '\0')
3354 (void) sm_strlcpy(hostbuf, "localhost", size);
3355 hp = sm_gethostbyname(hostbuf, InetMode);
3365 hp = sm_gethostbyname(hostbuf, AF_INET);
3370 if (strchr(hp->h_name, '.') != NULL || strchr(hostbuf, '.') == NULL)
3371 (void) cleanstrcpy(hostbuf, hp->h_name, size);
3374 if (strchr(hostbuf, '.') == NULL)
3381 strlen(domainname) + strlen(hostbuf) + 1 < size)
3382 (void) sm_strlcat2(hostbuf, ".", domainname, size);
3391 if (strchr(hostbuf, '.') == NULL)
3399 (void) cleanstrcpy(hostbuf, *ha, size - 1);
3400 hostbuf[size - 1] = '\0';
3415 if (strchr(hostbuf, '.') == NULL &&
3416 getcanonname(hostbuf, size, true, NULL) == HOST_NOTFOUND)
3420 hostbuf);
3422 hostbuf);
3424 if (getcanonname(hostbuf, size, true, NULL) == HOST_NOTFOUND)
3428 hostbuf);
3430 hostbuf);