Lines Matching refs:ndo
283 bootp_print(netdissect_options *ndo, in bootp_print() argument
293 ND_PRINT((ndo, "BOOTP/DHCP, %s", in bootp_print()
299 ND_PRINT((ndo, " from %s", etheraddr_string(ndo, bp->bp_chaddr))); in bootp_print()
302 ND_PRINT((ndo, ", length %u", length)); in bootp_print()
304 if (!ndo->ndo_vflag) in bootp_print()
311 ND_PRINT((ndo, ", htype %d", bp->bp_htype)); in bootp_print()
315 ND_PRINT((ndo, ", hlen %d", bp->bp_hlen)); in bootp_print()
319 ND_PRINT((ndo, ", hops %d", bp->bp_hops)); in bootp_print()
321 ND_PRINT((ndo, ", xid 0x%x", EXTRACT_32BITS(&bp->bp_xid))); in bootp_print()
323 ND_PRINT((ndo, ", secs %d", EXTRACT_16BITS(&bp->bp_secs))); in bootp_print()
326 ND_PRINT((ndo, ", Flags [%s]", in bootp_print()
328 if (ndo->ndo_vflag > 1) in bootp_print()
329 ND_PRINT((ndo, " (0x%04x)", EXTRACT_16BITS(&bp->bp_flags))); in bootp_print()
334 ND_PRINT((ndo, "\n\t Client-IP %s", ipaddr_string(ndo, &bp->bp_ciaddr))); in bootp_print()
339 ND_PRINT((ndo, "\n\t Your-IP %s", ipaddr_string(ndo, &bp->bp_yiaddr))); in bootp_print()
344 ND_PRINT((ndo, "\n\t Server-IP %s", ipaddr_string(ndo, &bp->bp_siaddr))); in bootp_print()
349 ND_PRINT((ndo, "\n\t Gateway-IP %s", ipaddr_string(ndo, &bp->bp_giaddr))); in bootp_print()
354 ND_PRINT((ndo, "\n\t Client-Ethernet-Address %s", etheraddr_string(ndo, bp->bp_chaddr))); in bootp_print()
359 ND_PRINT((ndo, "\n\t sname \"")); in bootp_print()
360 if (fn_printztn(ndo, bp->bp_sname, (u_int)sizeof bp->bp_sname, in bootp_print()
361 ndo->ndo_snapend)) { in bootp_print()
362 ND_PRINT((ndo, "\"")); in bootp_print()
363 ND_PRINT((ndo, "%s", tstr + 1)); in bootp_print()
366 ND_PRINT((ndo, "\"")); in bootp_print()
370 ND_PRINT((ndo, "\n\t file \"")); in bootp_print()
371 if (fn_printztn(ndo, bp->bp_file, (u_int)sizeof bp->bp_file, in bootp_print()
372 ndo->ndo_snapend)) { in bootp_print()
373 ND_PRINT((ndo, "\"")); in bootp_print()
374 ND_PRINT((ndo, "%s", tstr + 1)); in bootp_print()
377 ND_PRINT((ndo, "\"")); in bootp_print()
384 rfc1048_print(ndo, bp->bp_vend); in bootp_print()
387 cmu_print(ndo, bp->bp_vend); in bootp_print()
393 ND_PRINT((ndo, "\n\t Vendor-#0x%x", ul)); in bootp_print()
398 ND_PRINT((ndo, "%s", tstr)); in bootp_print()
595 rfc1048_print(netdissect_options *ndo, in rfc1048_print() argument
607 ND_PRINT((ndo, "\n\t Vendor-rfc1048 Extensions")); in rfc1048_print()
610 ND_PRINT((ndo, "\n\t Magic Cookie 0x%08x", EXTRACT_32BITS(bp))); in rfc1048_print()
616 if (tag == TAG_PAD && ndo->ndo_vflag < 3) in rfc1048_print()
618 if (tag == TAG_END && ndo->ndo_vflag < 3) in rfc1048_print()
640 ND_PRINT((ndo, "\n\t %s Option %u, length %u%s", cp, tag, len, in rfc1048_print()
643 if (tag == TAG_PAD && ndo->ndo_vflag > 2) { in rfc1048_print()
650 ND_PRINT((ndo, ", occurs %u", ntag)); in rfc1048_print()
654 ND_PRINT((ndo, "[|rfc1048 %u]", len)); in rfc1048_print()
660 ND_PRINT((ndo, "%s", tok2str(dhcp_msg_values, "Unknown (%u)", uc))); in rfc1048_print()
670 ND_PRINT((ndo, "\n\t ")); in rfc1048_print()
672 ND_PRINT((ndo, ", ")); in rfc1048_print()
673 ND_PRINT((ndo, "%s", cp + 1)); in rfc1048_print()
687 ND_PRINT((ndo, "+")); in rfc1048_print()
688 ND_PRINT((ndo, "%s", cp + 1)); in rfc1048_print()
709 ND_PRINT((ndo, "\"")); in rfc1048_print()
710 if (fn_printn(ndo, bp, len, ndo->ndo_snapend)) { in rfc1048_print()
711 ND_PRINT((ndo, "\"")); in rfc1048_print()
714 ND_PRINT((ndo, "\"")); in rfc1048_print()
725 ND_PRINT((ndo, ",")); in rfc1048_print()
729 ND_PRINT((ndo, "%s", ipaddr_string(ndo, &ul))); in rfc1048_print()
731 ND_PRINT((ndo, "%d", ul)); in rfc1048_print()
733 ND_PRINT((ndo, "%u", ul)); in rfc1048_print()
744 ND_PRINT((ndo, ",")); in rfc1048_print()
746 ND_PRINT((ndo, "(%s:", ipaddr_string(ndo, &ul))); in rfc1048_print()
749 ND_PRINT((ndo, "%s)", ipaddr_string(ndo, &ul))); in rfc1048_print()
760 ND_PRINT((ndo, ",")); in rfc1048_print()
762 ND_PRINT((ndo, "%u", us)); in rfc1048_print()
773 ND_PRINT((ndo, ",")); in rfc1048_print()
776 ND_PRINT((ndo, "N")); in rfc1048_print()
779 ND_PRINT((ndo, "Y")); in rfc1048_print()
782 ND_PRINT((ndo, "%u?", *bp)); in rfc1048_print()
797 ND_PRINT((ndo, c == 'x' ? ":" : ".")); in rfc1048_print()
799 ND_PRINT((ndo, "%02x", *bp)); in rfc1048_print()
801 ND_PRINT((ndo, "%u", *bp)); in rfc1048_print()
815 ND_PRINT((ndo, "ERROR: length < 1 bytes")); in rfc1048_print()
820 ND_PRINT((ndo, "%s", tok2str(nbo2str, NULL, tag))); in rfc1048_print()
826 ND_PRINT((ndo, "ERROR: length < 1 bytes")); in rfc1048_print()
831 ND_PRINT((ndo, "%s", tok2str(oo2str, NULL, tag))); in rfc1048_print()
837 ND_PRINT((ndo, "ERROR: length < 3 bytes")); in rfc1048_print()
843 ND_PRINT((ndo, "[%s] ", client_fqdn_flags(*bp))); in rfc1048_print()
846 ND_PRINT((ndo, "%u/%u ", *bp, *(bp+1))); in rfc1048_print()
848 ND_PRINT((ndo, "\"")); in rfc1048_print()
849 if (fn_printn(ndo, bp, len - 3, ndo->ndo_snapend)) { in rfc1048_print()
850 ND_PRINT((ndo, "\"")); in rfc1048_print()
853 ND_PRINT((ndo, "\"")); in rfc1048_print()
864 ND_PRINT((ndo, "ERROR: length < 1 bytes")); in rfc1048_print()
870 ND_PRINT((ndo, "\"")); in rfc1048_print()
871 if (fn_printn(ndo, bp, len, ndo->ndo_snapend)) { in rfc1048_print()
872 ND_PRINT((ndo, "\"")); in rfc1048_print()
875 ND_PRINT((ndo, "\"")); in rfc1048_print()
880 ND_PRINT((ndo, "%s ", tok2str(arp2str, "hardware-type %u,", type))); in rfc1048_print()
883 ND_PRINT((ndo, ":")); in rfc1048_print()
884 ND_PRINT((ndo, "%02x", *bp)); in rfc1048_print()
899 ND_PRINT((ndo, "\n\t %s SubOption %u, length %u: length goes past end of option", in rfc1048_print()
907 ND_PRINT((ndo, "\n\t %s SubOption %u, length %u: ", in rfc1048_print()
916 if (fn_printn(ndo, bp, suboptlen, ndo->ndo_snapend)) in rfc1048_print()
921 print_unknown_data(ndo, bp, "\n\t\t", suboptlen); in rfc1048_print()
936 ND_PRINT((ndo, "ERROR: length < 5 bytes")); in rfc1048_print()
943 ND_PRINT((ndo, ",")); in rfc1048_print()
948 ND_PRINT((ndo, "[ERROR: Mask width (%d) > 32]", mask_width)); in rfc1048_print()
956 ND_PRINT((ndo, "[ERROR: Remaining length (%u) < %u bytes]", len, significant_octets + 4)); in rfc1048_print()
961 ND_PRINT((ndo, "(")); in rfc1048_print()
963 ND_PRINT((ndo, "default")); in rfc1048_print()
967 ND_PRINT((ndo, ".")); in rfc1048_print()
968 ND_PRINT((ndo, "%d", *bp++)); in rfc1048_print()
971 ND_PRINT((ndo, ".0")); in rfc1048_print()
972 ND_PRINT((ndo, "/%d", mask_width)); in rfc1048_print()
975 ND_PRINT((ndo, ":%s)", ipaddr_string(ndo, &ul))); in rfc1048_print()
989 ND_PRINT((ndo, "ERROR: length < 2 bytes")); in rfc1048_print()
997 ND_PRINT((ndo, "\n\t ")); in rfc1048_print()
998 ND_PRINT((ndo, "instance#%u: ", suboptnumber)); in rfc1048_print()
1000 ND_PRINT((ndo, "ERROR: suboption length must be non-zero")); in rfc1048_print()
1006 ND_PRINT((ndo, "ERROR: invalid option")); in rfc1048_print()
1011 ND_PRINT((ndo, "\"")); in rfc1048_print()
1012 if (fn_printn(ndo, bp, suboptlen, ndo->ndo_snapend)) { in rfc1048_print()
1013 ND_PRINT((ndo, "\"")); in rfc1048_print()
1016 ND_PRINT((ndo, "\"")); in rfc1048_print()
1017 ND_PRINT((ndo, ", length %d", suboptlen)); in rfc1048_print()
1026 ND_PRINT((ndo, "[unknown special tag %u, size %u]", in rfc1048_print()
1036 ND_PRINT((ndo, "\n\t trailing data length %u", len)); in rfc1048_print()
1042 ND_PRINT((ndo, "|[rfc1048]")); in rfc1048_print()
1046 cmu_print(netdissect_options *ndo, in cmu_print() argument
1053 ND_PRINT((ndo, " %s:%s", s, ipaddr_string(ndo, &cmu->m.s_addr))); } in cmu_print()
1055 ND_PRINT((ndo, " vend-cmu")); in cmu_print()
1061 ND_PRINT((ndo, " F:0x%x", cmu->v_flags)); in cmu_print()
1073 ND_PRINT((ndo, "%s", tstr)); in cmu_print()