Lines Matching refs:cp

105 	register char *cp;
113 cp = msg + sizeof (HEADER);
142 cp = p_cdname(cp, msg, file);
143 if (cp == NULL)
145 fprintf(file, ", type = %s", p_type(_getshort(cp)));
146 cp += sizeof (u_short);
148 p_class(_getshort(cp)));
149 cp += sizeof (u_short);
159 cp = p_rr(cp, msg, file);
160 if (cp == NULL)
171 cp = p_rr(cp, msg, file);
172 if (cp == NULL)
183 cp = p_rr(cp, msg, file);
184 if (cp == NULL)
191 p_cdname(cp, msg, file)
192 char *cp, *msg;
198 if ((n = dn_expand(msg, msg + 512, cp, name, sizeof (name))) < 0)
205 return (cp + n);
212 p_rr(cp, msg, file)
213 char *cp, *msg;
220 if ((cp = p_cdname(cp, msg, file)) == NULL)
222 fprintf(file, "\n\ttype = %s", p_type(type = _getshort(cp)));
223 cp += sizeof (u_short);
224 fprintf(file, ", class = %s", p_class(class = _getshort(cp)));
225 cp += sizeof (u_short);
226 fprintf(file, ", ttl = %s", p_time(_getlong(cp)));
227 cp += sizeof (u_long);
228 fprintf(file, ", dlen = %d\n", dlen = _getshort(cp));
229 cp += sizeof (u_short);
230 cp1 = cp;
240 memcpy((void *)&inaddr, (void *)cp, sizeof (inaddr));
242 bcopy(cp, (char *)&inaddr, sizeof (inaddr));
247 cp += dlen;
251 fprintf(file, ", protocol = %d", cp[4]);
253 (cp[5] << 8) + cp[6]);
254 cp += dlen;
258 cp += dlen;
268 cp = p_cdname(cp, msg, file);
273 if (n = *cp++) {
274 fprintf(file, "\tCPU=%.*s\n", n, cp);
275 cp += n;
277 if (n = *cp++) {
278 fprintf(file, "\tOS=%.*s\n", n, cp);
279 cp += n;
285 cp = p_cdname(cp, msg, file);
287 cp = p_cdname(cp, msg, file);
288 fprintf(file, "\n\tserial = %ld", _getlong(cp));
289 cp += sizeof (u_long);
290 fprintf(file, "\n\trefresh = %s", p_time(_getlong(cp)));
291 cp += sizeof (u_long);
292 fprintf(file, "\n\tretry = %s", p_time(_getlong(cp)));
293 cp += sizeof (u_long);
294 fprintf(file, "\n\texpire = %s", p_time(_getlong(cp)));
295 cp += sizeof (u_long);
296 fprintf(file, "\n\tmin = %s\n", p_time(_getlong(cp)));
297 cp += sizeof (u_long);
301 fprintf(file, "\tpreference = %ld,", _getshort(cp));
302 cp += sizeof (u_short);
304 cp = p_cdname(cp, msg, file);
310 while (cp < cp2) {
311 if (n = (unsigned char) *cp++) {
312 for (c = n; c > 0 && cp < cp2; c--)
313 if (*cp == '\n') {
315 (void) putc(*cp++, file);
317 (void) putc(*cp++, file);
325 cp = p_cdname(cp, msg, file);
327 cp = p_cdname(cp, msg, file);
331 fprintf(file, "\t%s\n", cp);
332 cp += dlen;
338 fprintf(file, "\t%ld\n", _getlong(cp));
339 cp += sizeof (int);
347 memcpy((void *)&inaddr, (void *)cp, sizeof (inaddr));
349 bcopy(cp, (char *)&inaddr, sizeof (inaddr));
351 cp += sizeof (u_long);
353 inet_ntoa(inaddr), *cp++);
355 while (cp < cp1 + dlen) {
356 c = *cp++;
376 for (i = 0, DataPtr = cp; i < NumBytes; i++, DataPtr++)
379 cp += dlen;
386 cp += dlen;
388 if (cp != cp1 + dlen) {
389 fprintf(file, "packet size error (%#x != %#x)\n", cp, cp1+dlen);
390 cp = NULL;
393 return (cp);