Lines Matching defs:hp

45 	struct host *hp;
103 for (hp = (struct host *) hash_FirstEntry(nmhashtable); hp != NULL;
104 hp = (struct host *) hash_NextEntry(nmhashtable)) {
105 dump_host(fp, hp);
118 * Dump all the available information on the host pointed to by "hp".
123 dump_host(FILE *fp, struct host *hp)
126 if (hp) {
127 fprintf(fp, "%s:", (hp->hostname ?
128 hp->hostname->string : "?"));
129 if (hp->flags.bootfile) {
130 fprintf(fp, "\\\n\t:bf=%s:", hp->bootfile->string);
132 if (hp->flags.bootsize) {
134 if (hp->flags.bootsize_auto) {
137 fprintf(fp, "%lu:", (u_long)hp->bootsize);
140 if (hp->flags.cookie_server) {
142 list_ipaddresses(fp, hp->cookie_server);
145 if (hp->flags.dump_file) {
146 fprintf(fp, "\\\n\t:df=%s:", hp->dump_file->string);
148 if (hp->flags.domain_name) {
149 fprintf(fp, "\\\n\t:dn=%s:", hp->domain_name->string);
151 if (hp->flags.domain_server) {
153 list_ipaddresses(fp, hp->domain_server);
156 if (hp->flags.exten_file) {
157 fprintf(fp, "\\\n\t:ef=%s:", hp->exten_file->string);
159 if (hp->flags.exec_file) {
160 fprintf(fp, "\\\n\t:ex=%s:", hp->exec_file->string);
162 if (hp->flags.gateway) {
164 list_ipaddresses(fp, hp->gateway);
168 if (hp->flags.homedir) {
169 fprintf(fp, "\\\n\t:hd=%s:", hp->homedir->string);
174 if (hp->flags.name_switch && hp->flags.send_name) {
177 if (hp->flags.htype) {
178 int hlen = haddrlength(hp->htype);
179 fprintf(fp, "\\\n\t:ht=%u:", (unsigned) hp->htype);
180 if (hp->flags.haddr) {
182 haddrtoa(hp->haddr, hlen));
185 if (hp->flags.impress_server) {
187 list_ipaddresses(fp, hp->impress_server);
191 if (hp->flags.iaddr) {
192 fprintf(fp, "\\\n\t:ip=%s:", inet_ntoa(hp->iaddr));
194 if (hp->flags.log_server) {
196 list_ipaddresses(fp, hp->log_server);
199 if (hp->flags.lpr_server) {
201 list_ipaddresses(fp, hp->lpr_server);
204 if (hp->flags.msg_size) {
205 fprintf(fp, "\\\n\t:ms=%lu:", (u_long)hp->msg_size);
207 if (hp->flags.min_wait) {
208 fprintf(fp, "\\\n\t:mw=%lu:", (u_long)hp->min_wait);
210 if (hp->flags.name_server) {
212 list_ipaddresses(fp, hp->name_server);
215 if (hp->flags.ntp_server) {
217 list_ipaddresses(fp, hp->ntp_server);
220 if (hp->flags.reply_addr) {
221 fprintf(fp, "\\\n\t:ra=%s:", inet_ntoa(hp->reply_addr));
223 if (hp->flags.rlp_server) {
225 list_ipaddresses(fp, hp->rlp_server);
228 if (hp->flags.root_path) {
229 fprintf(fp, "\\\n\t:rp=%s:", hp->root_path->string);
231 if (hp->flags.bootserver) {
232 fprintf(fp, "\\\n\t:sa=%s:", inet_ntoa(hp->bootserver));
234 if (hp->flags.subnet_mask) {
235 fprintf(fp, "\\\n\t:sm=%s:", inet_ntoa(hp->subnet_mask));
237 if (hp->flags.swap_server) {
238 fprintf(fp, "\\\n\t:sw=%s:", inet_ntoa(hp->subnet_mask));
240 if (hp->flags.tftpdir) {
241 fprintf(fp, "\\\n\t:td=%s:", hp->tftpdir->string);
246 if (hp->flags.time_offset) {
247 fprintf(fp, "\\\n\t:to=%ld:", (long)hp->time_offset);
249 if (hp->flags.time_server) {
251 list_ipaddresses(fp, hp->time_server);
254 if (hp->flags.vm_cookie) {
256 if (!bcmp(hp->vm_cookie, vm_rfc1048, 4)) {
258 } else if (!bcmp(hp->vm_cookie, vm_cmu, 4)) {
262 (int) ((hp->vm_cookie)[0]),
263 (int) ((hp->vm_cookie)[1]),
264 (int) ((hp->vm_cookie)[2]),
265 (int) ((hp->vm_cookie)[3]));
268 if (hp->flags.nis_domain) {
270 hp->nis_domain->string);
272 if (hp->flags.nis_server) {
274 list_ipaddresses(fp, hp->nis_server);
282 if (hp->flags.generic) {
283 dump_generic(fp, hp->generic);