Lines Matching refs:file

51 void fp_query(char *msg, FILE *file);
103 fp_query(msg, file) in fp_query() argument
105 FILE *file;
116 fprintf(file, "HEADER:\n");
117 fprintf(file, "\topcode = %s", _res_opcodes[hp->opcode]);
118 fprintf(file, ", id = %d", ntohs(hp->id));
119 fprintf(file, ", rcode = %s\n", _res_resultcodes[hp->rcode]);
120 fprintf(file, "\theader flags: ");
122 fprintf(file, " qr");
124 fprintf(file, " aa");
126 fprintf(file, " tc");
128 fprintf(file, " rd");
130 fprintf(file, " ra");
132 fprintf(file, " pr");
133 fprintf(file, "\n\tqdcount = %d", ntohs(hp->qdcount));
134 fprintf(file, ", ancount = %d", ntohs(hp->ancount));
135 fprintf(file, ", nscount = %d", ntohs(hp->nscount));
136 fprintf(file, ", arcount = %d\n\n", ntohs(hp->arcount));
141 fprintf(file, "QUESTIONS:\n");
143 fprintf(file, "\t");
144 cp = p_cdname(cp, msg, file);
147 fprintf(file, ", type = %s", p_type(_getshort(cp)));
149 fprintf(file, ", class = %s\n\n",
158 fprintf(file, "ANSWERS:\n");
160 fprintf(file, "\t");
161 cp = p_rr(cp, msg, file);
170 fprintf(file, "NAME SERVERS:\n");
172 fprintf(file, "\t");
173 cp = p_rr(cp, msg, file);
182 fprintf(file, "ADDITIONAL RECORDS:\n");
184 fprintf(file, "\t");
185 cp = p_rr(cp, msg, file);
193 p_cdname(cp, msg, file) in p_cdname() argument
195 FILE *file;
207 fputs(name, file);
215 p_rr(cp, msg, file) in p_rr() argument
217 FILE *file;
223 if ((cp = p_cdname(cp, msg, file)) == NULL)
225 fprintf(file, "\n\ttype = %s", p_type(type = _getshort(cp)));
227 fprintf(file, ", class = %s", p_class(class = _getshort(cp)));
229 fprintf(file, ", ttl = %s", p_time(_getlong(cp)));
231 fprintf(file, ", dlen = %d\n", dlen = _getshort(cp));
248 fprintf(file, "\tinternet address = %s\n",
252 fprintf(file, "\tinternet address = %s",
254 fprintf(file, ", protocol = %d", cp[4]);
255 fprintf(file, ", port = %d\n",
270 fprintf(file, "\tdomain name = ");
271 cp = p_cdname(cp, msg, file);
272 fprintf(file, "\n");
277 fprintf(file, "\tCPU=%.*s\n", n, cp);
281 fprintf(file, "\tOS=%.*s\n", n, cp);
287 fprintf(file, "\torigin = ");
288 cp = p_cdname(cp, msg, file);
289 fprintf(file, "\n\tmail addr = ");
290 cp = p_cdname(cp, msg, file);
291 fprintf(file, "\n\tserial = %ld", _getlong(cp));
293 fprintf(file, "\n\trefresh = %s", p_time(_getlong(cp)));
295 fprintf(file, "\n\tretry = %s", p_time(_getlong(cp)));
297 fprintf(file, "\n\texpire = %s", p_time(_getlong(cp)));
299 fprintf(file, "\n\tmin = %s\n", p_time(_getlong(cp)));
304 fprintf(file, "\tpreference = %ld,", _getshort(cp));
306 fprintf(file, " name = ");
307 cp = p_cdname(cp, msg, file);
311 (void) fputs("\t\"", file);
317 (void) putc('\\', file);
318 (void) putc(*cp++, file);
320 (void) putc(*cp++, file);
323 (void) fputs("\"\n", file);
327 fprintf(file, "\trequests = ");
328 cp = p_cdname(cp, msg, file);
329 fprintf(file, "\n\terrors = ");
330 cp = p_cdname(cp, msg, file);
334 fprintf(file, "\t%s\n", cp);
341 fprintf(file, "\t%ld\n", _getlong(cp));
355 fprintf(file, "\tinternet address = %s, protocol = %d\n\t",
362 fprintf(file, " %d", n);
366 putc('\n', file);
377 fprintf(file, "\tFirst %d bytes of hex data:",
380 fprintf(file, " %x", *DataPtr);
381 fputs("\n", file);
388 fprintf(file, "\t???\n");
392 fprintf(file, "packet size error (%#x != %#x)\n", cp, cp1+dlen);
395 fprintf(file, "\n");