Lines Matching refs:ndo
45 hncp_print_rec(netdissect_options *ndo,
49 hncp_print(netdissect_options *ndo, in hncp_print() argument
52 ND_PRINT((ndo, "hncp (%d)", length)); in hncp_print()
53 hncp_print_rec(ndo, cp, length, 1); in hncp_print()
195 format_ip6addr(netdissect_options *ndo, const u_char *cp) in format_ip6addr() argument
198 return ipaddr_string(ndo, cp + IPV4_MAPPED_HEADING_LEN); in format_ip6addr()
200 return ip6addr_string(ndo, cp); in format_ip6addr()
204 print_prefix(netdissect_options *ndo, const u_char *prefix, u_int max_length) in print_prefix() argument
228 snprintf(buf, sizeof(buf), "%s/%d", ipaddr_string(ndo, &addr), plen); in print_prefix()
231 plenbytes = decode_prefix6(ndo, prefix, max_length, buf, sizeof(buf)); in print_prefix()
234 ND_PRINT((ndo, "%s", buf)); in print_prefix()
239 print_dns_label(netdissect_options *ndo, in print_dns_label() argument
248 safeputchar(ndo, '.'); in print_dns_label()
251 safeputs(ndo, cp+length, max_length-length); in print_dns_label()
255 safeputs(ndo, cp+length, lab_length); in print_dns_label()
259 ND_PRINT((ndo, "[|DNS]")); in print_dns_label()
264 dhcpv4_print(netdissect_options *ndo, in dhcpv4_print() argument
280 ND_PRINT((ndo, "\n")); in dhcpv4_print()
282 ND_PRINT((ndo, "\t")); in dhcpv4_print()
284 ND_PRINT((ndo, "%s", tok2str(dh4opt_str, "Unknown", type))); in dhcpv4_print()
285 ND_PRINT((ndo," (%u)", optlen + 2 )); in dhcpv4_print()
296 ND_PRINT((ndo, " %s", ipaddr_string(ndo, value + t))); in dhcpv4_print()
302 ND_PRINT((ndo, " ")); in dhcpv4_print()
303 if ((tp = ns_nprint(ndo, tp, value + optlen)) == NULL) in dhcpv4_print()
316 dhcpv6_print(netdissect_options *ndo, in dhcpv6_print() argument
332 ND_PRINT((ndo, "\n")); in dhcpv6_print()
334 ND_PRINT((ndo, "\t")); in dhcpv6_print()
336 ND_PRINT((ndo, "%s", tok2str(dh6opt_str, "Unknown", type))); in dhcpv6_print()
337 ND_PRINT((ndo," (%u)", optlen + 4 )); in dhcpv6_print()
345 ND_PRINT((ndo, " %s", istr)); in dhcpv6_print()
349 ND_PRINT((ndo, " %s", ip6addr_string(ndo, value + t))); in dhcpv6_print()
355 ND_PRINT((ndo, " ")); in dhcpv6_print()
356 if ((tp = ns_nprint(ndo, tp, value + optlen)) == NULL) in dhcpv6_print()
370 is_in_line(netdissect_options *ndo, int indent) in is_in_line() argument
372 return indent - 1 >= ndo->ndo_vflag && ndo->ndo_vflag < 3; in is_in_line()
376 print_type_in_line(netdissect_options *ndo, in print_type_in_line() argument
384 ND_PRINT((ndo, "\n")); in print_type_in_line()
386 ND_PRINT((ndo, "\t")); in print_type_in_line()
388 ND_PRINT((ndo, " ")); in print_type_in_line()
391 ND_PRINT((ndo, ", ")); in print_type_in_line()
393 ND_PRINT((ndo, "%s", tok2str(type_values, "Easter Egg", type))); in print_type_in_line()
395 ND_PRINT((ndo, " (x%d)", count)); in print_type_in_line()
400 hncp_print_rec(netdissect_options *ndo, in hncp_print_rec() argument
403 const int in_line = is_in_line(ndo, indent); in hncp_print_rec()
420 ND_PRINT((ndo, "\n")); in hncp_print_rec()
422 ND_PRINT((ndo, "\t")); in hncp_print_rec()
462 print_type_in_line(ndo, last_type_mask, last_type_count, indent, &first_one); in hncp_print_rec()
470 ND_PRINT((ndo,"%s", tok2str(type_values, "Easter Egg (42)", type_mask) )); in hncp_print_rec()
472 ND_PRINT((ndo,": type=%u", type )); in hncp_print_rec()
473 ND_PRINT((ndo," (%u)", bodylen + 4 )); in hncp_print_rec()
479 ND_PRINT((ndo, " %s", istr)); in hncp_print_rec()
486 ND_PRINT((ndo, " %s", istr)); in hncp_print_rec()
490 ND_PRINT((ndo, " NID: %s", node_identifier)); in hncp_print_rec()
498 ND_PRINT((ndo, " %s", istr)); in hncp_print_rec()
503 ND_PRINT((ndo, " NID: %s EPID: %08x", in hncp_print_rec()
513 ND_PRINT((ndo, " %s", istr)); in hncp_print_rec()
517 ND_PRINT((ndo, " hash: %016" PRIx64, hash)); in hncp_print_rec()
526 ND_PRINT((ndo, " %s", istr)); in hncp_print_rec()
533 ND_PRINT((ndo, " NID: %s seqno: %u %s hash: %016" PRIx64, in hncp_print_rec()
539 hncp_print_rec(ndo, value+20, bodylen-20, indent+1); in hncp_print_rec()
547 ND_PRINT((ndo, " %s", istr)); in hncp_print_rec()
553 ND_PRINT((ndo, " Peer-NID: %s Peer-EPID: %08x Local-EPID: %08x", in hncp_print_rec()
565 ND_PRINT((ndo, " %s", istr)); in hncp_print_rec()
570 ND_PRINT((ndo, " EPID: %08x Interval: %s", in hncp_print_rec()
579 ND_PRINT((ndo, " %s", istr)); in hncp_print_rec()
582 ND_PRINT((ndo, " Verdict: %u Fingerprint: %s Common Name: ", in hncp_print_rec()
585 safeputs(ndo, value + 36, bodylen - 36); in hncp_print_rec()
593 ND_PRINT((ndo, " %s", istr)); in hncp_print_rec()
601 ND_PRINT((ndo, " M: %u P: %u H: %u L: %u User-agent: ", in hncp_print_rec()
604 safeputs(ndo, value + 4, bodylen - 4); in hncp_print_rec()
610 hncp_print_rec(ndo, value, bodylen, indent+1); in hncp_print_rec()
617 ND_PRINT((ndo, " %s", istr)); in hncp_print_rec()
620 ND_PRINT((ndo, " VLSO: %s PLSO: %s Prefix: ", in hncp_print_rec()
624 l = print_prefix(ndo, value + 8, bodylen - 8); in hncp_print_rec()
626 ND_PRINT((ndo, "(length is invalid)")); in hncp_print_rec()
639 ND_PRINT((ndo, " %s", istr)); in hncp_print_rec()
645 hncp_print_rec(ndo, value + l, bodylen - l, indent+1); in hncp_print_rec()
653 ND_PRINT((ndo, " %s", istr)); in hncp_print_rec()
657 ND_PRINT((ndo, " type: ")); in hncp_print_rec()
660 ND_PRINT((ndo, " %s", istr)); in hncp_print_rec()
663 ND_PRINT((ndo, "Internet connectivity")); in hncp_print_rec()
665 ND_PRINT((ndo, "Dest-Prefix: ")); in hncp_print_rec()
666 l = print_prefix(ndo, value, bodylen); in hncp_print_rec()
668 ND_PRINT((ndo, "(length is invalid)")); in hncp_print_rec()
681 ND_PRINT((ndo, " %s", istr)); in hncp_print_rec()
685 ND_PRINT((ndo, "DNS domain: ")); in hncp_print_rec()
686 print_dns_label(ndo, value+1, bodylen-1, 1); in hncp_print_rec()
688 ND_PRINT((ndo, "Opaque UTF-8: ")); in hncp_print_rec()
689 safeputs(ndo, value + 1, bodylen - 1); in hncp_print_rec()
692 ND_PRINT((ndo, " %s", istr)); in hncp_print_rec()
695 ND_PRINT((ndo, "Restrictive assignment")); in hncp_print_rec()
697 ND_PRINT((ndo, "Unknown (%u)", policy)); /* Reserved for future additions */ in hncp_print_rec()
704 ND_PRINT((ndo, " %s", istr)); in hncp_print_rec()
707 if (dhcpv4_print(ndo, value, bodylen, indent+1) != 0) in hncp_print_rec()
714 ND_PRINT((ndo, " %s", istr)); in hncp_print_rec()
717 if (dhcpv6_print(ndo, value, bodylen, indent+1) != 0) { in hncp_print_rec()
718 ND_PRINT((ndo, " %s", istr)); in hncp_print_rec()
728 ND_PRINT((ndo, " %s", istr)); in hncp_print_rec()
732 ND_PRINT((ndo, " EPID: %08x Prty: %u", in hncp_print_rec()
736 ND_PRINT((ndo, " Prefix: ")); in hncp_print_rec()
737 if ((l = print_prefix(ndo, value + 5, bodylen - 5)) < 0) { in hncp_print_rec()
738 ND_PRINT((ndo, " %s", istr)); in hncp_print_rec()
745 hncp_print_rec(ndo, value + l, bodylen - l, indent+1); in hncp_print_rec()
753 ND_PRINT((ndo, " %s", istr)); in hncp_print_rec()
757 ip_address = format_ip6addr(ndo, value + 4); in hncp_print_rec()
758 ND_PRINT((ndo, " EPID: %08x IP Address: %s", in hncp_print_rec()
763 hncp_print_rec(ndo, value + 20, bodylen - 20, indent+1); in hncp_print_rec()
771 ND_PRINT((ndo, " %s", istr)); in hncp_print_rec()
774 ip_address = format_ip6addr(ndo, value); in hncp_print_rec()
775 ND_PRINT((ndo, " IP-Address: %s %c%c%c ", in hncp_print_rec()
781 len = print_dns_label(ndo, value+17, bodylen-17, 1); in hncp_print_rec()
783 ND_PRINT((ndo, " %s", istr)); in hncp_print_rec()
789 hncp_print_rec(ndo, value+len, bodylen-len, indent+1); in hncp_print_rec()
795 ND_PRINT((ndo, " %s", istr)); in hncp_print_rec()
798 ND_PRINT((ndo, " Domain: ")); in hncp_print_rec()
799 print_dns_label(ndo, value, bodylen, 1); in hncp_print_rec()
806 ND_PRINT((ndo, " %s", istr)); in hncp_print_rec()
811 ND_PRINT((ndo, " %s", istr)); in hncp_print_rec()
814 ND_PRINT((ndo, " IP-Address: %s Name: ", in hncp_print_rec()
815 format_ip6addr(ndo, value) in hncp_print_rec()
818 safeputchar(ndo, '"'); in hncp_print_rec()
819 safeputs(ndo, value + 17, l); in hncp_print_rec()
820 safeputchar(ndo, '"'); in hncp_print_rec()
822 ND_PRINT((ndo, "%s", istr)); in hncp_print_rec()
827 hncp_print_rec(ndo, value + l, bodylen - l, indent+1); in hncp_print_rec()
833 ND_PRINT((ndo, " %s", istr)); in hncp_print_rec()
836 ND_PRINT((ndo, " PSK: %s", format_256(value))); in hncp_print_rec()
837 hncp_print_rec(ndo, value + 32, bodylen - 32, indent+1); in hncp_print_rec()
852 print_type_in_line(ndo, last_type_mask, last_type_count, indent, &first_one); in hncp_print_rec()
857 ND_PRINT((ndo, "%s", "[|hncp]")); in hncp_print_rec()
861 ND_PRINT((ndo, "%s", istr)); in hncp_print_rec()