Lines Matching defs:hp
51 struct host *hp;
109 for (hp = (struct host *) hash_FirstEntry(nmhashtable); hp != NULL;
110 hp = (struct host *) hash_NextEntry(nmhashtable)) {
111 dump_host(fp, hp);
124 * Dump all the available information on the host pointed to by "hp".
129 dump_host(FILE *fp, struct host *hp)
132 if (hp) {
133 fprintf(fp, "%s:", (hp->hostname ?
134 hp->hostname->string : "?"));
135 if (hp->flags.bootfile) {
136 fprintf(fp, "\\\n\t:bf=%s:", hp->bootfile->string);
138 if (hp->flags.bootsize) {
140 if (hp->flags.bootsize_auto) {
143 fprintf(fp, "%d:", hp->bootsize);
146 if (hp->flags.cookie_server) {
148 list_ipaddresses(fp, hp->cookie_server);
151 if (hp->flags.dump_file) {
152 fprintf(fp, "\\\n\t:df=%s:", hp->dump_file->string);
154 if (hp->flags.domain_name) {
155 fprintf(fp, "\\\n\t:dn=%s:", hp->domain_name->string);
157 if (hp->flags.domain_server) {
159 list_ipaddresses(fp, hp->domain_server);
162 if (hp->flags.exten_file) {
163 fprintf(fp, "\\\n\t:ef=%s:", hp->exten_file->string);
165 if (hp->flags.exec_file) {
166 fprintf(fp, "\\\n\t:ex=%s:", hp->exec_file->string);
168 if (hp->flags.gateway) {
170 list_ipaddresses(fp, hp->gateway);
174 if (hp->flags.homedir) {
175 fprintf(fp, "\\\n\t:hd=%s:", hp->homedir->string);
180 if (hp->flags.name_switch && hp->flags.send_name) {
183 if (hp->flags.htype) {
184 int hlen = haddrlength(hp->htype);
185 fprintf(fp, "\\\n\t:ht=%u:", (unsigned) hp->htype);
186 if (hp->flags.haddr) {
188 haddrtoa(hp->haddr, hlen));
191 if (hp->flags.impress_server) {
193 list_ipaddresses(fp, hp->impress_server);
197 if (hp->flags.iaddr) {
198 fprintf(fp, "\\\n\t:ip=%s:", inet_ntoa(hp->iaddr));
200 if (hp->flags.log_server) {
202 list_ipaddresses(fp, hp->log_server);
205 if (hp->flags.lpr_server) {
207 list_ipaddresses(fp, hp->lpr_server);
210 if (hp->flags.msg_size) {
211 fprintf(fp, "\\\n\t:ms=%d:", hp->msg_size);
213 if (hp->flags.min_wait) {
214 fprintf(fp, "\\\n\t:mw=%d:", hp->min_wait);
216 if (hp->flags.name_server) {
218 list_ipaddresses(fp, hp->name_server);
221 if (hp->flags.ntp_server) {
223 list_ipaddresses(fp, hp->ntp_server);
226 if (hp->flags.reply_addr) {
227 fprintf(fp, "\\\n\t:ra=%s:", inet_ntoa(hp->reply_addr));
229 if (hp->flags.rlp_server) {
231 list_ipaddresses(fp, hp->rlp_server);
234 if (hp->flags.root_path) {
235 fprintf(fp, "\\\n\t:rp=%s:", hp->root_path->string);
237 if (hp->flags.bootserver) {
238 fprintf(fp, "\\\n\t:sa=%s:", inet_ntoa(hp->bootserver));
240 if (hp->flags.subnet_mask) {
241 fprintf(fp, "\\\n\t:sm=%s:", inet_ntoa(hp->subnet_mask));
243 if (hp->flags.swap_server) {
244 fprintf(fp, "\\\n\t:sw=%s:", inet_ntoa(hp->subnet_mask));
246 if (hp->flags.tftpdir) {
247 fprintf(fp, "\\\n\t:td=%s:", hp->tftpdir->string);
252 if (hp->flags.time_offset) {
253 fprintf(fp, "\\\n\t:to=%ld:", (long)hp->time_offset);
255 if (hp->flags.time_server) {
257 list_ipaddresses(fp, hp->time_server);
260 if (hp->flags.vm_cookie) {
262 if (!bcmp(hp->vm_cookie, vm_rfc1048, 4)) {
264 } else if (!bcmp(hp->vm_cookie, vm_cmu, 4)) {
268 (int) ((hp->vm_cookie)[0]),
269 (int) ((hp->vm_cookie)[1]),
270 (int) ((hp->vm_cookie)[2]),
271 (int) ((hp->vm_cookie)[3]));
274 if (hp->flags.nis_domain) {
276 hp->nis_domain->string);
278 if (hp->flags.nis_server) {
280 list_ipaddresses(fp, hp->nis_server);
288 if (hp->flags.generic) {
289 dump_generic(fp, hp->generic);