X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/b30f3843b93c11e897e6d8888a91abf709a716ae..refs/heads/mcr-macro-update-1:/print.c?ds=inline diff --git a/print.c b/print.c index 5b776d61..864e9ddd 100644 --- a/print.c +++ b/print.c @@ -201,8 +201,8 @@ static const struct printer printers[] = { { ppp_hdlc_if_print, DLT_PPP_SERIAL }, #endif { ppp_if_print, DLT_PPP }, -#ifdef DLT_PPP_WITHDIRECTION - { ppp_if_print, DLT_PPP_WITHDIRECTION }, +#ifdef DLT_PPP_PPPD + { ppp_if_print, DLT_PPP_PPPD }, #endif #ifdef DLT_PPP_ETHER { pppoe_if_print, DLT_PPP_ETHER }, @@ -398,12 +398,15 @@ pretty_print_packet(netdissect_options *ndo, const struct pcap_pkthdr *h, ndo->ndo_protocol = ""; ndo->ndo_ll_hdr_len = 0; - if (setjmp(ndo->ndo_truncated) == 0) { + switch (setjmp(ndo->ndo_early_end)) { + case 0: /* Print the packet. */ (ndo->ndo_if_printer)(ndo, h, sp); - } else { + break; + case ND_TRUNCATED: /* A printer quit because the packet was truncated; report it */ - ND_PRINT(" [|%s]", ndo->ndo_protocol); + nd_print_trunc(ndo); + break; } hdrlen = ndo->ndo_ll_hdr_len;