Lines Matching defs:hostname
286 * Allocate hash tables for hardware address, ip address, and hostname
397 if (goodname(hp->hostname->string)) {
398 char *hn = hp->hostname->string;
447 hashcode = hash_HashFunction((u_char *) hp->hostname->string,
448 strlen(hp->hostname->string));
450 hp->hostname->string, hp) < 0) {
452 "hash_Insert() failed on insertion of hostname: \"%s\"",
453 hp->hostname->string);
638 host->hostname = get_shared_string(&src);
641 if (!goodname(host->hostname->string)) {
642 report(LOG_ERR, "bad hostname: \"%s\"", host->hostname->string);
643 del_string(host->hostname);
647 current_hostname = host->hostname->string;
1285 * Verify that the given string makes sense as a hostname (according to
1292 goodname(char *hostname)
1295 if (!isalpha(*hostname++)) { /* First character must be a letter */
1298 while (isalnum(*hostname) ||
1299 (*hostname == '-') ||
1300 (*hostname == '_') )
1302 hostname++; /* Alphanumeric or a hyphen */
1304 if (!isalnum(hostname[-1])) { /* Last must be alphanumeric */
1307 if (*hostname == '\0') {/* Done? */
1310 } while (*hostname++ == '.'); /* Dot, loop for next label */
1332 * Function for comparing a string with the hostname field of a host
1342 return !strcmp(name, hp->hostname->string);
1766 /* Lookup Hardware Address for hostname. */
1905 del_string(hostptr->hostname);