Lines Matching full:hp

308 	struct host *hp;  in readtab()  local
377 hp = (struct host *) smalloc(sizeof(struct host)); in readtab()
378 bzero((char *) hp, sizeof(*hp)); in readtab()
384 if (process_entry(hp, buffer) < 0) { in readtab()
385 hp->linkcount = 1; in readtab()
386 free_host((hash_datum *) hp); in readtab()
394 if (goodname(hp->hostname->string)) { in readtab()
395 char *hn = hp->hostname->string; in readtab()
397 if (hp->flags.iaddr == 0) { in readtab()
402 hp->iaddr.s_addr = value; in readtab()
403 hp->flags.iaddr = TRUE; in readtab()
407 if (hp->flags.subnet_mask == 0) { in readtab()
408 if (lookup_netmask(hp->iaddr.s_addr, &value)) { in readtab()
411 hp->subnet_mask.s_addr = value; in readtab()
412 hp->flags.subnet_mask = TRUE; in readtab()
416 if (hp->flags.iaddr) { in readtab()
420 if (hp->flags.htype && hp->flags.haddr) { in readtab()
422 hp->linkcount++; in readtab()
423 hashcode = hash_HashFunction(hp->haddr, haddrlength(hp->htype)); in readtab()
424 if (hash_Insert(hwhashtable, hashcode, hwinscmp, hp, hp) < 0) { in readtab()
426 netname(hp->htype), in readtab()
427 haddrtoa(hp->haddr, haddrlength(hp->htype))); in readtab()
428 free_host((hash_datum *) hp); in readtab()
433 if (hp->flags.iaddr) { in readtab()
434 hashcode = hash_HashFunction((u_char *) & (hp->iaddr.s_addr), 4); in readtab()
435 if (hash_Insert(iphashtable, hashcode, nullcmp, hp, hp) < 0) { in readtab()
440 hp->linkcount++; in readtab()
444 hashcode = hash_HashFunction((u_char *) hp->hostname->string, in readtab()
445 strlen(hp->hostname->string)); in readtab()
447 hp->hostname->string, hp) < 0) { in readtab()
450 hp->hostname->string); in readtab()
453 hp->linkcount++; in readtab()
700 hp->flags.MEMBER = FALSE; \
704 hp->MEMBER.s_addr = value; \
705 hp->flags.MEMBER = TRUE; \
714 if (hp->flags.MEMBER) { \
715 hp->flags.MEMBER = FALSE; \
716 assert(hp->MEMBER); \
717 del_iplist(hp->MEMBER); \
718 hp->MEMBER = NULL; \
721 hp->MEMBER = get_addresses(symbol); \
722 if (hp->MEMBER == NULL) \
724 hp->flags.MEMBER = TRUE; \
733 if (hp->flags.MEMBER) { \
734 hp->flags.MEMBER = FALSE; \
735 assert(hp->MEMBER); \
736 del_string(hp->MEMBER); \
737 hp->MEMBER = NULL; \
740 hp->MEMBER = get_shared_string(symbol); \
741 if (hp->MEMBER == NULL) \
743 hp->flags.MEMBER = TRUE; \
752 hp->flags.MEMBER = FALSE; \
755 hp->MEMBER = value; \
756 hp->flags.MEMBER = TRUE; \
762 * the data in the structure pointed to by "hp". The pointer pointed to
769 eval_symbol(char **symbol, struct host *hp) in eval_symbol() argument
803 if (!(hp->generic)) { in eval_symbol()
804 hp->generic = (struct shared_bindata *) in eval_symbol()
807 if (process_generic(symbol, &(hp->generic), (byte) (value & 0xFF))) in eval_symbol()
809 hp->flags.generic = TRUE; in eval_symbol()
873 hp->flags.haddr = FALSE; in eval_symbol()
876 if (hp->flags.htype == 0) { in eval_symbol()
877 hp->flags.htype = TRUE; in eval_symbol()
878 hp->htype = HTYPE_ETHERNET; in eval_symbol()
880 tmphaddr = prs_haddr(symbol, hp->htype); in eval_symbol()
883 bcopy(tmphaddr, hp->haddr, haddrlength(hp->htype)); in eval_symbol()
884 hp->flags.haddr = TRUE; in eval_symbol()
895 hp->flags.htype = FALSE; in eval_symbol()
919 hp->htype = (byte) (value & 0xFF); in eval_symbol()
920 hp->flags.htype = TRUE; in eval_symbol()
955 hp->flags.time_offset = FALSE; in eval_symbol()
960 hp->time_offset = secondswest; in eval_symbol()
964 hp->time_offset = timeoff; in eval_symbol()
966 hp->flags.time_offset = TRUE; in eval_symbol()
977 hp->flags.vm_cookie = FALSE; in eval_symbol()
982 bcopy(vm_rfc1048, hp->vm_cookie, 4); in eval_symbol()
984 bcopy(vm_cmu, hp->vm_cookie, 4); in eval_symbol()
990 bcopy(&value, hp->vm_cookie, 4); in eval_symbol()
992 hp->flags.vm_cookie = TRUE; in eval_symbol()
1000 fill_defaults(hp, symbol); in eval_symbol()
1012 hp->flags.send_name = FALSE; in eval_symbol()
1013 hp->flags.name_switch = FALSE; in eval_symbol()
1016 hp->flags.send_name = TRUE; in eval_symbol()
1017 hp->flags.name_switch = TRUE; in eval_symbol()
1026 hp->flags.bootsize = TRUE; in eval_symbol()
1027 hp->flags.bootsize_auto = TRUE; in eval_symbol()
1029 hp->bootsize = (unsigned int) get_u_long(symbol); in eval_symbol()
1030 hp->flags.bootsize = TRUE; in eval_symbol()
1031 hp->flags.bootsize_auto = FALSE; in eval_symbol()
1035 hp->flags.bootsize = FALSE; in eval_symbol()
1038 hp->flags.bootsize = TRUE; in eval_symbol()
1039 hp->flags.bootsize_auto = TRUE; in eval_symbol()
1050 if ((hp->tftpdir != NULL) && in eval_symbol()
1051 (hp->tftpdir->string[0] != '/')) in eval_symbol()
1099 if (hp->msg_size < BP_MINPKTSZ || in eval_symbol()
1100 hp->msg_size > MAX_MSG_SIZE) in eval_symbol()
1329 struct host *hp = (struct host *) d2; in nmcmp() local
1331 return !strcmp(name, hp->hostname->string); in nmcmp()
1377 if (!hp->flags.MEMBER) { \
1378 if ((hp->flags.MEMBER = hp2->flags.MEMBER) != 0) { \
1379 hp->MEMBER = hp2->MEMBER; \
1386 if (!hp->flags.MEMBER) { \
1387 if ((hp->flags.MEMBER = hp2->flags.MEMBER) != 0) { \
1389 hp->MEMBER = hp2->MEMBER; \
1390 (hp->MEMBER->linkcount)++; \
1403 fill_defaults(struct host *hp, char **src) in fill_defaults() argument
1437 if (!hp->flags.vm_cookie) { in fill_defaults()
1438 if ((hp->flags.vm_cookie = hp2->flags.vm_cookie)) { in fill_defaults()
1439 bcopy(hp2->vm_cookie, hp->vm_cookie, 4); in fill_defaults()
1442 if (!hp->flags.name_switch) { in fill_defaults()
1443 if ((hp->flags.name_switch = hp2->flags.name_switch)) { in fill_defaults()
1444 hp->flags.send_name = hp2->flags.send_name; in fill_defaults()
1447 if (!hp->flags.bootsize) { in fill_defaults()
1448 if ((hp->flags.bootsize = hp2->flags.bootsize)) { in fill_defaults()
1449 hp->flags.bootsize_auto = hp2->flags.bootsize_auto; in fill_defaults()
1450 hp->bootsize = hp2->bootsize; in fill_defaults()