Home | History | Annotate | Download | only in common

Lines Matching refs:hp

319 	struct host *hp;
388 hp = (struct host *) smalloc(sizeof(struct host));
389 bzero((char *) hp, sizeof(*hp));
395 if (process_entry(hp, buffer) < 0) {
396 hp->linkcount = 1;
397 free_host((hash_datum *) hp);
405 if (goodname(hp->hostname->string)) {
406 char *hn = hp->hostname->string;
408 if (hp->flags.iaddr == 0) {
413 hp->iaddr.s_addr = value;
414 hp->flags.iaddr = TRUE;
418 if (hp->flags.subnet_mask == 0) {
419 if (lookup_netmask(hp->iaddr.s_addr, &value)) {
422 hp->subnet_mask.s_addr = value;
423 hp->flags.subnet_mask = TRUE;
427 if (hp->flags.iaddr) {
431 if (hp->flags.htype && hp->flags.haddr) {
433 hp->linkcount++;
434 hashcode = hash_HashFunction(hp->haddr, haddrlength(hp->htype));
435 if (hash_Insert(hwhashtable, hashcode, hwinscmp, hp, hp) < 0) {
437 netname(hp->htype),
438 haddrtoa(hp->haddr, haddrlength(hp->htype)));
439 free_host((hash_datum *) hp);
444 if (hp->flags.iaddr) {
445 hashcode = hash_HashFunction((u_char *) & (hp->iaddr.s_addr), 4);
446 if (hash_Insert(iphashtable, hashcode, nullcmp, hp, hp) < 0) {
451 hp->linkcount++;
455 hashcode = hash_HashFunction((u_char *) hp->hostname->string,
456 strlen(hp->hostname->string));
458 hp->hostname->string, hp) < 0) {
461 hp->hostname->string);
464 hp->linkcount++;
715 hp->flags.MEMBER = FALSE; \
719 hp->MEMBER.s_addr = value; \
720 hp->flags.MEMBER = TRUE; \
729 if (hp->flags.MEMBER) { \
730 hp->flags.MEMBER = FALSE; \
731 assert(hp->MEMBER); \
732 del_iplist(hp->MEMBER); \
733 hp->MEMBER = NULL; \
736 hp->MEMBER = get_addresses(symbol); \
737 if (hp->MEMBER == NULL) \
739 hp->flags.MEMBER = TRUE; \
748 if (hp->flags.MEMBER) { \
749 hp->flags.MEMBER = FALSE; \
750 assert(hp->MEMBER); \
751 del_string(hp->MEMBER); \
752 hp->MEMBER = NULL; \
755 hp->MEMBER = get_shared_string(symbol); \
756 if (hp->MEMBER == NULL) \
758 hp->flags.MEMBER = TRUE; \
767 hp->flags.MEMBER = FALSE; \
770 hp->MEMBER = value; \
771 hp->flags.MEMBER = TRUE; \
777 * the data in the structure pointed to by "hp". The pointer pointed to
784 eval_symbol(char **symbol, struct host *hp)
818 if (!(hp->generic)) {
819 hp->generic = (struct shared_bindata *)
822 if (process_generic(symbol, &(hp->generic), (byte) (value & 0xFF)))
824 hp->flags.generic = TRUE;
888 hp->flags.haddr = FALSE;
891 if (hp->flags.htype == 0) {
892 hp->flags.htype = TRUE;
893 hp->htype = HTYPE_ETHERNET;
895 tmphaddr = prs_haddr(symbol, hp->htype);
898 bcopy(tmphaddr, hp->haddr, haddrlength(hp->htype));
899 hp->flags.haddr = TRUE;
910 hp->flags.htype = FALSE;
934 hp->htype = (byte) (value & 0xFF);
935 hp->flags.htype = TRUE;
970 hp->flags.time_offset = FALSE;
975 hp->time_offset = secondswest;
979 hp->time_offset = ltimeoff;
981 hp->flags.time_offset = TRUE;
992 hp->flags.vm_cookie = FALSE;
997 bcopy(vm_rfc1048, hp->vm_cookie, 4);
999 bcopy(vm_cmu, hp->vm_cookie, 4);
1005 bcopy(&value, hp->vm_cookie, 4);
1007 hp->flags.vm_cookie = TRUE;
1015 fill_defaults(hp, symbol);
1027 hp->flags.send_name = FALSE;
1028 hp->flags.name_switch = FALSE;
1031 hp->flags.send_name = TRUE;
1032 hp->flags.name_switch = TRUE;
1041 hp->flags.bootsize = TRUE;
1042 hp->flags.bootsize_auto = TRUE;
1044 hp->bootsize = (unsigned int) get_u_long(symbol);
1045 hp->flags.bootsize = TRUE;
1046 hp->flags.bootsize_auto = FALSE;
1050 hp->flags.bootsize = FALSE;
1053 hp->flags.bootsize = TRUE;
1054 hp->flags.bootsize_auto = TRUE;
1065 if ((hp->tftpdir != NULL) &&
1066 (hp->tftpdir->string[0] != '/'))
1114 if (hp->msg_size < BP_MINPKTSZ ||
1115 hp->msg_size > MAX_MSG_SIZE)
1121 if (hp->min_wait == 0)
1349 struct host *hp = (struct host *) d2;
1351 return !strcmp(name, hp->hostname->string);
1398 if (!hp->flags.MEMBER) { \
1399 if ((hp->flags.MEMBER = hp2->flags.MEMBER) != 0) { \
1400 hp->MEMBER = hp2->MEMBER; \
1407 if (!hp->flags.MEMBER) { \
1408 if ((hp->flags.MEMBER = hp2->flags.MEMBER) != 0) { \
1410 hp->MEMBER = hp2->MEMBER; \
1411 (hp->MEMBER->linkcount)++; \
1424 fill_defaults(struct host *hp, char **src)
1458 if (!hp->flags.vm_cookie) {
1459 if ((hp->flags.vm_cookie = hp2->flags.vm_cookie)) {
1460 bcopy(hp2->vm_cookie, hp->vm_cookie, 4);
1463 if (!hp->flags.name_switch) {
1464 if ((hp->flags.name_switch = hp2->flags.name_switch)) {
1465 hp->flags.send_name = hp2->flags.send_name;
1468 if (!hp->flags.bootsize) {
1469 if ((hp->flags.bootsize = hp2->flags.bootsize)) {
1470 hp->flags.bootsize_auto = hp2->flags.bootsize_auto;
1471 hp->bootsize = hp2->bootsize;