• Home
  • Raw
  • Download

Lines Matching refs:ndo

52 ns_nskip(netdissect_options *ndo,  in ns_nskip()  argument
85 blabel_print(netdissect_options *ndo, in blabel_print() argument
100 ND_PRINT((ndo, "\\[x")); in blabel_print()
103 ND_PRINT((ndo, "%02x", *bitp)); in blabel_print()
108 ND_PRINT((ndo, "%02x", tc & (0xff << (8 - b)))); in blabel_print()
112 ND_PRINT((ndo, "%1x", ((tc >> 4) & 0x0f) & (0x0f << (4 - b)))); in blabel_print()
114 ND_PRINT((ndo, "/%d]", bitlen)); in blabel_print()
117 ND_PRINT((ndo, ".../%d]", bitlen)); in blabel_print()
122 labellen(netdissect_options *ndo, in labellen() argument
133 ND_PRINT((ndo, "<ELT %d>", elt)); in labellen()
146 ns_nprint(netdissect_options *ndo, in ns_nprint() argument
154 int data_size = ndo->ndo_snapend - bp; in ns_nprint()
156 if ((l = labellen(ndo, cp)) == (u_int)-1) in ns_nprint()
167 while (i && cp < ndo->ndo_snapend) { in ns_nprint()
176 if ((l = labellen(ndo, cp)) == (u_int)-1) in ns_nprint()
190 ND_PRINT((ndo, "<LOOP>")); in ns_nprint()
199 if (blabel_print(ndo, cp) == NULL) in ns_nprint()
204 ND_PRINT((ndo, "<ELT %d>", elt)); in ns_nprint()
208 if (fn_printn(ndo, cp, l, ndo->ndo_snapend)) in ns_nprint()
214 ND_PRINT((ndo, ".")); in ns_nprint()
215 if ((l = labellen(ndo, cp)) == (u_int)-1) in ns_nprint()
225 ND_PRINT((ndo, ".")); in ns_nprint()
231 ns_cprint(netdissect_options *ndo, in ns_cprint() argument
239 if (fn_printn(ndo, cp, i, ndo->ndo_snapend)) in ns_cprint()
320 ns_qprint(netdissect_options *ndo, in ns_qprint() argument
326 cp = ns_nskip(ndo, cp); in ns_qprint()
334 ND_PRINT((ndo, " %s", tok2str(ns_type2str, "Type%d", i))); in ns_qprint()
343 ND_PRINT((ndo, " %s", tok2str(ns_class2str, "(Class %d)", class))); in ns_qprint()
345 ND_PRINT((ndo, i & C_QU ? " (QU)" : " (QM)")); in ns_qprint()
348 ND_PRINT((ndo, "? ")); in ns_qprint()
349 cp = ns_nprint(ndo, np, bp); in ns_qprint()
355 ns_rprint(netdissect_options *ndo, in ns_rprint() argument
362 if (ndo->ndo_vflag) { in ns_rprint()
363 ND_PRINT((ndo, " ")); in ns_rprint()
364 if ((cp = ns_nprint(ndo, cp, bp)) == NULL) in ns_rprint()
367 cp = ns_nskip(ndo, cp); in ns_rprint()
370 return (ndo->ndo_snapend); in ns_rprint()
383 ND_PRINT((ndo, " %s", tok2str(ns_class2str, "(Class %d)", class))); in ns_rprint()
386 ND_PRINT((ndo, " (Cache flush)")); in ns_rprint()
395 } else if (ndo->ndo_vflag > 2) { in ns_rprint()
397 ND_PRINT((ndo, " [")); in ns_rprint()
398 relts_print(ndo, EXTRACT_32BITS(cp)); in ns_rprint()
399 ND_PRINT((ndo, "]")); in ns_rprint()
411 ND_PRINT((ndo, " %s", tok2str(ns_type2str, "Type%d", typ))); in ns_rprint()
412 if (rp > ndo->ndo_snapend) in ns_rprint()
419 ND_PRINT((ndo, " %s", intoa(htonl(EXTRACT_32BITS(cp))))); in ns_rprint()
428 ND_PRINT((ndo, " ")); in ns_rprint()
429 if (ns_nprint(ndo, cp, bp) == NULL) in ns_rprint()
434 if (!ndo->ndo_vflag) in ns_rprint()
436 ND_PRINT((ndo, " ")); in ns_rprint()
437 if ((cp = ns_nprint(ndo, cp, bp)) == NULL) in ns_rprint()
439 ND_PRINT((ndo, " ")); in ns_rprint()
440 if ((cp = ns_nprint(ndo, cp, bp)) == NULL) in ns_rprint()
444 ND_PRINT((ndo, " %u", EXTRACT_32BITS(cp))); in ns_rprint()
446 ND_PRINT((ndo, " %u", EXTRACT_32BITS(cp))); in ns_rprint()
448 ND_PRINT((ndo, " %u", EXTRACT_32BITS(cp))); in ns_rprint()
450 ND_PRINT((ndo, " %u", EXTRACT_32BITS(cp))); in ns_rprint()
452 ND_PRINT((ndo, " %u", EXTRACT_32BITS(cp))); in ns_rprint()
456 ND_PRINT((ndo, " ")); in ns_rprint()
459 if (ns_nprint(ndo, cp + 2, bp) == NULL) in ns_rprint()
461 ND_PRINT((ndo, " %d", EXTRACT_16BITS(cp))); in ns_rprint()
466 ND_PRINT((ndo, " \"")); in ns_rprint()
467 cp = ns_cprint(ndo, cp); in ns_rprint()
470 ND_PRINT((ndo, "\"")); in ns_rprint()
475 ND_PRINT((ndo, " ")); in ns_rprint()
478 if (ns_nprint(ndo, cp + 6, bp) == NULL) in ns_rprint()
480 ND_PRINT((ndo, ":%d %d %d", EXTRACT_16BITS(cp + 4), in ns_rprint()
493 ND_PRINT((ndo, " %s", in ns_rprint()
510 ND_PRINT((ndo, " %u(bad plen)", pbit)); in ns_rprint()
517 ND_PRINT((ndo, " %u %s", pbit, in ns_rprint()
521 ND_PRINT((ndo, " ")); in ns_rprint()
522 if (ns_nprint(ndo, cp + 1 + sizeof(a) - pbyte, bp) == NULL) in ns_rprint()
530 ND_PRINT((ndo, " UDPsize=%u", class)); in ns_rprint()
532 ND_PRINT((ndo, " OK")); in ns_rprint()
538 if (fn_printn(ndo, cp, len, ndo->ndo_snapend)) in ns_rprint()
544 if (cp + len > ndo->ndo_snapend) in ns_rprint()
546 if (!ndo->ndo_vflag) in ns_rprint()
548 ND_PRINT((ndo, " ")); in ns_rprint()
549 if ((cp = ns_nprint(ndo, cp, bp)) == NULL) in ns_rprint()
554 ND_PRINT((ndo, " fudge=%u", EXTRACT_16BITS(cp))); in ns_rprint()
558 ND_PRINT((ndo, " maclen=%u", EXTRACT_16BITS(cp))); in ns_rprint()
562 ND_PRINT((ndo, " origid=%u", EXTRACT_16BITS(cp))); in ns_rprint()
566 ND_PRINT((ndo, " error=%u", EXTRACT_16BITS(cp))); in ns_rprint()
570 ND_PRINT((ndo, " otherlen=%u", EXTRACT_16BITS(cp))); in ns_rprint()
578 ns_print(netdissect_options *ndo, in ns_print() argument
596 ND_PRINT((ndo, "%d%s%s%s%s%s%s", in ns_print()
606 ND_PRINT((ndo, " [%dq]", qdcount)); in ns_print()
611 ND_PRINT((ndo, ",")); in ns_print()
612 if (ndo->ndo_vflag > 1) { in ns_print()
613 ND_PRINT((ndo, " q:")); in ns_print()
614 if ((cp = ns_qprint(ndo, cp, bp, is_mdns)) == NULL) in ns_print()
617 if ((cp = ns_nskip(ndo, cp)) == NULL) in ns_print()
622 ND_PRINT((ndo, " %d/%d/%d", ancount, nscount, arcount)); in ns_print()
624 if ((cp = ns_rprint(ndo, cp, bp, is_mdns)) == NULL) in ns_print()
626 while (cp < ndo->ndo_snapend && ancount--) { in ns_print()
627 ND_PRINT((ndo, ",")); in ns_print()
628 if ((cp = ns_rprint(ndo, cp, bp, is_mdns)) == NULL) in ns_print()
635 if (ndo->ndo_vflag > 1) { in ns_print()
636 if (cp < ndo->ndo_snapend && nscount--) { in ns_print()
637 ND_PRINT((ndo, " ns:")); in ns_print()
638 if ((cp = ns_rprint(ndo, cp, bp, is_mdns)) == NULL) in ns_print()
640 while (cp < ndo->ndo_snapend && nscount--) { in ns_print()
641 ND_PRINT((ndo, ",")); in ns_print()
642 if ((cp = ns_rprint(ndo, cp, bp, is_mdns)) == NULL) in ns_print()
648 if (cp < ndo->ndo_snapend && arcount--) { in ns_print()
649 ND_PRINT((ndo, " ar:")); in ns_print()
650 if ((cp = ns_rprint(ndo, cp, bp, is_mdns)) == NULL) in ns_print()
652 while (cp < ndo->ndo_snapend && arcount--) { in ns_print()
653 ND_PRINT((ndo, ",")); in ns_print()
654 if ((cp = ns_rprint(ndo, cp, bp, is_mdns)) == NULL) in ns_print()
664 ND_PRINT((ndo, "%d%s%s%s", EXTRACT_16BITS(&np->id), ns_ops[DNS_OPCODE(np)], in ns_print()
671 ND_PRINT((ndo, " [b2&3=0x%x]", b2)); in ns_print()
675 ND_PRINT((ndo, " [%dq]", qdcount)); in ns_print()
677 ND_PRINT((ndo, " [%da]", ancount)); in ns_print()
681 ND_PRINT((ndo, " [%da]", ancount)); in ns_print()
683 ND_PRINT((ndo, " [%dq]", qdcount)); in ns_print()
686 ND_PRINT((ndo, " [%dn]", nscount)); in ns_print()
688 ND_PRINT((ndo, " [%dau]", arcount)); in ns_print()
692 cp = ns_qprint(ndo, cp, (const u_char *)np, is_mdns); in ns_print()
695 while (cp < ndo->ndo_snapend && qdcount--) { in ns_print()
696 cp = ns_qprint(ndo, (const u_char *)cp, in ns_print()
707 if (ndo->ndo_vflag > 1) { in ns_print()
709 if ((cp = ns_rprint(ndo, cp, bp, is_mdns)) == NULL) in ns_print()
711 while (cp < ndo->ndo_snapend && ancount--) { in ns_print()
712 ND_PRINT((ndo, ",")); in ns_print()
713 if ((cp = ns_rprint(ndo, cp, bp, is_mdns)) == NULL) in ns_print()
719 if (cp < ndo->ndo_snapend && nscount--) { in ns_print()
720 ND_PRINT((ndo, " ns:")); in ns_print()
721 if ((cp = ns_rprint(ndo, cp, bp, is_mdns)) == NULL) in ns_print()
723 while (nscount-- && cp < ndo->ndo_snapend) { in ns_print()
724 ND_PRINT((ndo, ",")); in ns_print()
725 if ((cp = ns_rprint(ndo, cp, bp, is_mdns)) == NULL) in ns_print()
731 if (cp < ndo->ndo_snapend && arcount--) { in ns_print()
732 ND_PRINT((ndo, " ar:")); in ns_print()
733 if ((cp = ns_rprint(ndo, cp, bp, is_mdns)) == NULL) in ns_print()
735 while (cp < ndo->ndo_snapend && arcount--) { in ns_print()
736 ND_PRINT((ndo, ",")); in ns_print()
737 if ((cp = ns_rprint(ndo, cp, bp, is_mdns)) == NULL) in ns_print()
745 ND_PRINT((ndo, " (%d)", length)); in ns_print()
749 ND_PRINT((ndo, "[|domain]")); in ns_print()