Lines Matching refs:cp

107 	register char *cp;
115 cp = msg + sizeof (HEADER);
144 cp = p_cdname(cp, msg, file);
145 if (cp == NULL)
147 fprintf(file, ", type = %s", p_type(_getshort(cp)));
148 cp += sizeof (u_short);
150 p_class(_getshort(cp)));
151 cp += sizeof (u_short);
161 cp = p_rr(cp, msg, file);
162 if (cp == NULL)
173 cp = p_rr(cp, msg, file);
174 if (cp == NULL)
185 cp = p_rr(cp, msg, file);
186 if (cp == NULL)
193 p_cdname(cp, msg, file)
194 char *cp, *msg;
200 if ((n = dn_expand((u_char *)msg, (u_char *)(msg + 512), (u_char *)cp,
208 return (cp + n);
215 p_rr(cp, msg, file)
216 char *cp, *msg;
223 if ((cp = p_cdname(cp, msg, file)) == NULL)
225 fprintf(file, "\n\ttype = %s", p_type(type = _getshort(cp)));
226 cp += sizeof (u_short);
227 fprintf(file, ", class = %s", p_class(class = _getshort(cp)));
228 cp += sizeof (u_short);
229 fprintf(file, ", ttl = %s", p_time(_getlong(cp)));
230 cp += sizeof (u_long);
231 fprintf(file, ", dlen = %d\n", dlen = _getshort(cp));
232 cp += sizeof (u_short);
233 cp1 = cp;
243 memcpy((void *)&inaddr, (void *)cp, sizeof (inaddr));
245 bcopy(cp, (char *)&inaddr, sizeof (inaddr));
250 cp += dlen;
254 fprintf(file, ", protocol = %d", cp[4]);
256 (cp[5] << 8) + cp[6]);
257 cp += dlen;
261 cp += dlen;
271 cp = p_cdname(cp, msg, file);
276 if (n = *cp++) {
277 fprintf(file, "\tCPU=%.*s\n", n, cp);
278 cp += n;
280 if (n = *cp++) {
281 fprintf(file, "\tOS=%.*s\n", n, cp);
282 cp += n;
288 cp = p_cdname(cp, msg, file);
290 cp = p_cdname(cp, msg, file);
291 fprintf(file, "\n\tserial = %ld", _getlong(cp));
292 cp += sizeof (u_long);
293 fprintf(file, "\n\trefresh = %s", p_time(_getlong(cp)));
294 cp += sizeof (u_long);
295 fprintf(file, "\n\tretry = %s", p_time(_getlong(cp)));
296 cp += sizeof (u_long);
297 fprintf(file, "\n\texpire = %s", p_time(_getlong(cp)));
298 cp += sizeof (u_long);
299 fprintf(file, "\n\tmin = %s\n", p_time(_getlong(cp)));
300 cp += sizeof (u_long);
304 fprintf(file, "\tpreference = %ld,", _getshort(cp));
305 cp += sizeof (u_short);
307 cp = p_cdname(cp, msg, file);
313 while (cp < cp2) {
314 if (n = (unsigned char) *cp++) {
315 for (c = n; c > 0 && cp < cp2; c--)
316 if (*cp == '\n') {
318 (void) putc(*cp++, file);
320 (void) putc(*cp++, file);
328 cp = p_cdname(cp, msg, file);
330 cp = p_cdname(cp, msg, file);
334 fprintf(file, "\t%s\n", cp);
335 cp += dlen;
341 fprintf(file, "\t%ld\n", _getlong(cp));
342 cp += sizeof (int);
350 memcpy((void *)&inaddr, (void *)cp, sizeof (inaddr));
352 bcopy(cp, (char *)&inaddr, sizeof (inaddr));
354 cp += sizeof (u_long);
356 inet_ntoa(inaddr), *cp++);
358 while (cp < cp1 + dlen) {
359 c = *cp++;
379 for (i = 0, DataPtr = cp; i < NumBytes; i++, DataPtr++)
382 cp += dlen;
389 cp += dlen;
391 if (cp != cp1 + dlen) {
392 fprintf(file, "packet size error (%#x != %#x)\n", cp, cp1+dlen);
393 cp = NULL;
396 return (cp);