Lines Matching refs:hp

75 	struct hostent	*hp;
149 dns_puthostent(struct hostent *hp, time_t timeout)
163 if (hp == NULL) {
164 dprint("hp is NULL - return -1\n");
167 if (hp->h_addr_list == NULL) {
169 freehost(hp);
172 if (hp->h_addr_list[0] == NULL) {
174 freehost(hp);
177 if (hp->h_name == NULL) {
179 freehost(hp);
182 if (hp->h_name[0] == '\0') {
184 freehost(hp);
187 if (hp->h_addrtype != AF_INET) {
189 hp->h_addrtype);
190 freehost(hp);
193 if (hp->h_length != sizeof (struct in_addr)) {
195 hp->h_length);
196 freehost(hp);
200 dprint("dns_puthostent(%s, %d)\n", hp->h_name, (int)timeout);
204 freehost(hp);
210 freehost(hp);
215 * From this point on, both hp and sp are cleaned up and freed via
220 sp->hp = hp;
284 dprint("update for %s timed out\n", hp->h_name);
306 struct hostent *hp;
328 hp = sp->hp;
334 for (p = hp->h_name; *p != NULL; p++)
341 hp->h_name, ntoab);
343 if (send_update(hp, &ia)) {
356 dprint("update for %s returning %d\n", hp->h_name, num_updated);
380 HEADER *hp;
440 hp = (HEADER *)&abuf;
441 data = (unsigned char *)&hp[1]; /* a DNS paradigm - actually abuf.buf */
443 qdcount = ntohs(hp->qdcount);
444 ancount = ntohs(hp->ancount);
445 nscount = ntohs(hp->nscount);
446 arcount = ntohs(hp->arcount);
616 * Do the work of updating DNS to have the <hp->h_name <-> hp->h_addr>
620 send_update(struct hostent *hp, struct in_addr *to_server)
641 if (strchr(hp->h_name, '.') == NULL) {
642 dprint("send_update handed non-FQDN: %s\n", hp->h_name);
646 forfqhost = hp->h_name;
650 netaddr.s_addr = ((struct in_addr *)hp->h_addr)->s_addr;
655 dprint("send_update %s: revname %s\n", hp->h_name, revnamebuf);
887 freehost(sp->hp);
910 freehost(struct hostent *hp)
912 free(hp->h_addr);
913 free(hp->h_addr_list);
914 free(hp->h_name);
915 free(hp);