• Home
  • Raw
  • Download

Lines Matching refs:ndo

54 ns_nskip(netdissect_options *ndo,  in ns_nskip()  argument
87 blabel_print(netdissect_options *ndo, in blabel_print() argument
102 ND_PRINT((ndo, "\\[x")); in blabel_print()
105 ND_PRINT((ndo, "%02x", *bitp)); in blabel_print()
110 ND_PRINT((ndo, "%02x", tc & (0xff << (8 - b)))); in blabel_print()
114 ND_PRINT((ndo, "%1x", ((tc >> 4) & 0x0f) & (0x0f << (4 - b)))); in blabel_print()
116 ND_PRINT((ndo, "/%d]", bitlen)); in blabel_print()
119 ND_PRINT((ndo, ".../%d]", bitlen)); in blabel_print()
124 labellen(netdissect_options *ndo, in labellen() argument
135 ND_PRINT((ndo, "<ELT %d>", elt)); in labellen()
148 ns_nprint(netdissect_options *ndo, in ns_nprint() argument
157 if ((l = labellen(ndo, cp)) == (u_int)-1) in ns_nprint()
168 while (i && cp < ndo->ndo_snapend) { in ns_nprint()
188 ND_PRINT((ndo, "<BAD PTR>")); in ns_nprint()
193 if ((l = labellen(ndo, cp)) == (u_int)-1) in ns_nprint()
204 if (blabel_print(ndo, cp) == NULL) in ns_nprint()
209 ND_PRINT((ndo, "<ELT %d>", elt)); in ns_nprint()
213 if (fn_printn(ndo, cp, l, ndo->ndo_snapend)) in ns_nprint()
218 ND_PRINT((ndo, ".")); in ns_nprint()
219 if ((l = labellen(ndo, cp)) == (u_int)-1) in ns_nprint()
228 ND_PRINT((ndo, ".")); in ns_nprint()
234 ns_cprint(netdissect_options *ndo, in ns_cprint() argument
242 if (fn_printn(ndo, cp, i, ndo->ndo_snapend)) in ns_cprint()
323 ns_qprint(netdissect_options *ndo, in ns_qprint() argument
329 cp = ns_nskip(ndo, cp); in ns_qprint()
337 ND_PRINT((ndo, " %s", tok2str(ns_type2str, "Type%d", i))); in ns_qprint()
346 ND_PRINT((ndo, " %s", tok2str(ns_class2str, "(Class %d)", class))); in ns_qprint()
348 ND_PRINT((ndo, i & C_QU ? " (QU)" : " (QM)")); in ns_qprint()
351 ND_PRINT((ndo, "? ")); in ns_qprint()
352 cp = ns_nprint(ndo, np, bp); in ns_qprint()
358 ns_rprint(netdissect_options *ndo, in ns_rprint() argument
365 if (ndo->ndo_vflag) { in ns_rprint()
366 ND_PRINT((ndo, " ")); in ns_rprint()
367 if ((cp = ns_nprint(ndo, cp, bp)) == NULL) in ns_rprint()
370 cp = ns_nskip(ndo, cp); in ns_rprint()
373 return (ndo->ndo_snapend); in ns_rprint()
386 ND_PRINT((ndo, " %s", tok2str(ns_class2str, "(Class %d)", class))); in ns_rprint()
389 ND_PRINT((ndo, " (Cache flush)")); in ns_rprint()
398 } else if (ndo->ndo_vflag > 2) { in ns_rprint()
400 ND_PRINT((ndo, " [")); in ns_rprint()
401 unsigned_relts_print(ndo, EXTRACT_32BITS(cp)); in ns_rprint()
402 ND_PRINT((ndo, "]")); in ns_rprint()
414 ND_PRINT((ndo, " %s", tok2str(ns_type2str, "Type%d", typ))); in ns_rprint()
415 if (rp > ndo->ndo_snapend) in ns_rprint()
422 ND_PRINT((ndo, " %s", intoa(htonl(EXTRACT_32BITS(cp))))); in ns_rprint()
431 ND_PRINT((ndo, " ")); in ns_rprint()
432 if (ns_nprint(ndo, cp, bp) == NULL) in ns_rprint()
437 if (!ndo->ndo_vflag) in ns_rprint()
439 ND_PRINT((ndo, " ")); in ns_rprint()
440 if ((cp = ns_nprint(ndo, cp, bp)) == NULL) in ns_rprint()
442 ND_PRINT((ndo, " ")); in ns_rprint()
443 if ((cp = ns_nprint(ndo, cp, bp)) == NULL) in ns_rprint()
447 ND_PRINT((ndo, " %u", EXTRACT_32BITS(cp))); in ns_rprint()
449 ND_PRINT((ndo, " %u", EXTRACT_32BITS(cp))); in ns_rprint()
451 ND_PRINT((ndo, " %u", EXTRACT_32BITS(cp))); in ns_rprint()
453 ND_PRINT((ndo, " %u", EXTRACT_32BITS(cp))); in ns_rprint()
455 ND_PRINT((ndo, " %u", EXTRACT_32BITS(cp))); in ns_rprint()
459 ND_PRINT((ndo, " ")); in ns_rprint()
462 if (ns_nprint(ndo, cp + 2, bp) == NULL) in ns_rprint()
464 ND_PRINT((ndo, " %d", EXTRACT_16BITS(cp))); in ns_rprint()
469 ND_PRINT((ndo, " \"")); in ns_rprint()
470 cp = ns_cprint(ndo, cp); in ns_rprint()
473 ND_PRINT((ndo, "\"")); in ns_rprint()
478 ND_PRINT((ndo, " ")); in ns_rprint()
481 if (ns_nprint(ndo, cp + 6, bp) == NULL) in ns_rprint()
483 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()
529 ND_PRINT((ndo, " UDPsize=%u", class)); in ns_rprint()
531 ND_PRINT((ndo, " DO")); in ns_rprint()
537 if (fn_printn(ndo, cp, len, ndo->ndo_snapend)) in ns_rprint()
543 if (cp + len > ndo->ndo_snapend) in ns_rprint()
545 if (!ndo->ndo_vflag) in ns_rprint()
547 ND_PRINT((ndo, " ")); in ns_rprint()
548 if ((cp = ns_nprint(ndo, cp, bp)) == NULL) in ns_rprint()
553 ND_PRINT((ndo, " fudge=%u", EXTRACT_16BITS(cp))); in ns_rprint()
557 ND_PRINT((ndo, " maclen=%u", EXTRACT_16BITS(cp))); in ns_rprint()
561 ND_PRINT((ndo, " origid=%u", EXTRACT_16BITS(cp))); in ns_rprint()
565 ND_PRINT((ndo, " error=%u", EXTRACT_16BITS(cp))); in ns_rprint()
569 ND_PRINT((ndo, " otherlen=%u", EXTRACT_16BITS(cp))); in ns_rprint()
577 ns_print(netdissect_options *ndo, in ns_print() argument
595 ND_PRINT((ndo, "%d%s%s%s%s%s%s", in ns_print()
605 ND_PRINT((ndo, " [%dq]", qdcount)); in ns_print()
610 ND_PRINT((ndo, ",")); in ns_print()
611 if (ndo->ndo_vflag > 1) { in ns_print()
612 ND_PRINT((ndo, " q:")); in ns_print()
613 if ((cp = ns_qprint(ndo, cp, bp, is_mdns)) == NULL) in ns_print()
616 if ((cp = ns_nskip(ndo, cp)) == NULL) in ns_print()
621 ND_PRINT((ndo, " %d/%d/%d", ancount, nscount, arcount)); in ns_print()
623 if ((cp = ns_rprint(ndo, cp, bp, is_mdns)) == NULL) in ns_print()
625 while (cp < ndo->ndo_snapend && ancount--) { in ns_print()
626 ND_PRINT((ndo, ",")); in ns_print()
627 if ((cp = ns_rprint(ndo, cp, bp, is_mdns)) == NULL) in ns_print()
634 if (ndo->ndo_vflag > 1) { in ns_print()
635 if (cp < ndo->ndo_snapend && nscount--) { in ns_print()
636 ND_PRINT((ndo, " ns:")); in ns_print()
637 if ((cp = ns_rprint(ndo, cp, bp, is_mdns)) == NULL) in ns_print()
639 while (cp < ndo->ndo_snapend && nscount--) { in ns_print()
640 ND_PRINT((ndo, ",")); in ns_print()
641 if ((cp = ns_rprint(ndo, cp, bp, is_mdns)) == NULL) in ns_print()
647 if (cp < ndo->ndo_snapend && arcount--) { in ns_print()
648 ND_PRINT((ndo, " ar:")); in ns_print()
649 if ((cp = ns_rprint(ndo, cp, bp, is_mdns)) == NULL) in ns_print()
651 while (cp < ndo->ndo_snapend && arcount--) { in ns_print()
652 ND_PRINT((ndo, ",")); in ns_print()
653 if ((cp = ns_rprint(ndo, cp, bp, is_mdns)) == NULL) in ns_print()
663 ND_PRINT((ndo, "%d%s%s%s", EXTRACT_16BITS(&np->id), ns_ops[DNS_OPCODE(np)], in ns_print()
670 ND_PRINT((ndo, " [b2&3=0x%x]", b2)); in ns_print()
674 ND_PRINT((ndo, " [%dq]", qdcount)); in ns_print()
676 ND_PRINT((ndo, " [%da]", ancount)); in ns_print()
680 ND_PRINT((ndo, " [%da]", ancount)); in ns_print()
682 ND_PRINT((ndo, " [%dq]", qdcount)); in ns_print()
685 ND_PRINT((ndo, " [%dn]", nscount)); in ns_print()
687 ND_PRINT((ndo, " [%dau]", arcount)); in ns_print()
691 cp = ns_qprint(ndo, cp, (const u_char *)np, is_mdns); in ns_print()
694 while (cp < ndo->ndo_snapend && qdcount--) { in ns_print()
695 cp = ns_qprint(ndo, (const u_char *)cp, in ns_print()
706 if (ndo->ndo_vflag > 1) { in ns_print()
708 if ((cp = ns_rprint(ndo, cp, bp, is_mdns)) == NULL) in ns_print()
710 while (cp < ndo->ndo_snapend && ancount--) { in ns_print()
711 ND_PRINT((ndo, ",")); in ns_print()
712 if ((cp = ns_rprint(ndo, cp, bp, is_mdns)) == NULL) in ns_print()
718 if (cp < ndo->ndo_snapend && nscount--) { in ns_print()
719 ND_PRINT((ndo, " ns:")); in ns_print()
720 if ((cp = ns_rprint(ndo, cp, bp, is_mdns)) == NULL) in ns_print()
722 while (nscount-- && cp < ndo->ndo_snapend) { in ns_print()
723 ND_PRINT((ndo, ",")); in ns_print()
724 if ((cp = ns_rprint(ndo, cp, bp, is_mdns)) == NULL) in ns_print()
730 if (cp < ndo->ndo_snapend && arcount--) { in ns_print()
731 ND_PRINT((ndo, " ar:")); in ns_print()
732 if ((cp = ns_rprint(ndo, cp, bp, is_mdns)) == NULL) in ns_print()
734 while (cp < ndo->ndo_snapend && arcount--) { in ns_print()
735 ND_PRINT((ndo, ",")); in ns_print()
736 if ((cp = ns_rprint(ndo, cp, bp, is_mdns)) == NULL) in ns_print()
744 ND_PRINT((ndo, " (%d)", length)); in ns_print()
748 ND_PRINT((ndo, "[|domain]")); in ns_print()