Lines Matching refs:domain
41 * Trim the current domain name from fullhost, but only if the result
48 * trimdomain("abcde.my.domain", 5) -> "abcde"
49 * trimdomain("abcde.my.domain", 4) -> "abcde.my.domain"
50 * trimdomain("abcde.my.domain:0.0", 9) -> "abcde:0.0"
51 * trimdomain("abcde.my.domain:0.0", 8) -> "abcde.my.domain:0.0"
58 static char domain[MAXHOSTNAMELEN];
63 /* XXX: Should we assume that our domain is this persistent ? */
65 if (gethostname(domain, sizeof(domain) - 1) == 0 &&
66 (s = strchr(domain, '.')) != NULL)
67 memmove(domain, s + 1, strlen(s + 1) + 1);
69 domain[0] = '\0';
70 dlen = strlen(domain);
73 if (domain[0] == '\0')
79 if (strncasecmp(s + 1, domain, dlen) == 0) {
81 /* Found -- lose the domain. */