X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/ba857360fcf8f411ef5a9884e45ce4ac2383d6b3..cc2d4cbd8ca150504127f375d8b51b194958d95b:/print-fr.c diff --git a/print-fr.c b/print-fr.c index cfd1747d..8565dae5 100644 --- a/print-fr.c +++ b/print-fr.c @@ -220,14 +220,15 @@ fr_if_print(netdissect_options *ndo, u_int length = h->len; u_int caplen = h->caplen; + ndo->ndo_protocol = "fr_if"; ND_TCHECK_4(p); /* minimum frame header length */ if ((length = fr_print(ndo, p, length)) == 0) return (0); else return length; - trunc: - ND_PRINT("[|fr]"); +trunc: + nd_print_trunc(ndo); return caplen; } @@ -243,6 +244,7 @@ fr_print(netdissect_options *ndo, u_int hdr_len; uint32_t flags; + ndo->ndo_protocol = "fr"; ret = parse_q922_header(ndo, p, &dlci, &addr_len, &flags, length); if (ret == -1) goto trunc; @@ -363,8 +365,8 @@ fr_print(netdissect_options *ndo, return hdr_len; - trunc: - ND_PRINT("[|fr]"); +trunc: + nd_print_trunc(ndo); return 0; } @@ -376,14 +378,15 @@ mfr_if_print(netdissect_options *ndo, u_int length = h->len; u_int caplen = h->caplen; + ndo->ndo_protocol = "mfr_if"; ND_TCHECK_2(p); /* minimum frame header length */ if ((length = mfr_print(ndo, p, length)) == 0) return (0); else return length; - trunc: - ND_PRINT("[|mfr]"); +trunc: + nd_print_trunc(ndo); return caplen; } @@ -454,6 +457,7 @@ mfr_print(netdissect_options *ndo, * +----+----+----+----+----+----+----+----+ */ + ndo->ndo_protocol = "mfr"; ND_TCHECK_4(p); /* minimum frame header length */ if ((EXTRACT_U_1(p) & MFR_BEC_MASK) == MFR_CTRL_FRAME && EXTRACT_U_1(p + 1) == 0) { @@ -498,7 +502,7 @@ mfr_print(netdissect_options *ndo, case MFR_CTRL_IE_LINK_ID: for (idx = 0; idx < ie_len && idx < MFR_ID_STRING_MAXLEN; idx++) { if (EXTRACT_U_1(tptr + idx) != 0) /* don't print null termination */ - safeputchar(ndo, EXTRACT_U_1(tptr + idx)); + fn_print_char(ndo, EXTRACT_U_1(tptr + idx)); else break; } @@ -570,8 +574,8 @@ mfr_print(netdissect_options *ndo, return hdr_len; - trunc: - ND_PRINT("[|mfr]"); +trunc: + nd_print_trunc(ndo); return length; } @@ -622,7 +626,7 @@ frf15_print(netdissect_options *ndo, return; trunc: - ND_PRINT("[|frf.15]"); + nd_print_trunc(ndo); } /* @@ -798,6 +802,7 @@ q933_print(netdissect_options *ndo, u_int non_locking_shift; u_int unshift_codeset; + ndo->ndo_protocol = "q.933"; ND_PRINT("%s", ndo->ndo_eflag ? "" : "Q.933"); if (length == 0 || !ND_TTEST_1(p)) { @@ -1059,7 +1064,7 @@ q933_print(netdissect_options *ndo, return; trunc: - ND_PRINT("[|q.933]"); + nd_print_trunc(ndo); } static int @@ -1135,9 +1140,3 @@ fr_q933_print_ie_codeset_0_5(netdissect_options *ndo, u_int iecode, return 0; } -/* - * Local Variables: - * c-style: whitesmith - * c-basic-offset: 8 - * End: - */