X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/8c296c6278b675036a42df5bf64d9fc29dcac453..8534f3b7bfbb81a76fc110a79bbbfedf35cc4f30:/print-openflow-1.0.c diff --git a/print-openflow-1.0.c b/print-openflow-1.0.c index d1cafc5d..4cf766bc 100644 --- a/print-openflow-1.0.c +++ b/print-openflow-1.0.c @@ -700,7 +700,7 @@ vlan_str(const uint16_t vid) if (vid == OFP_VLAN_NONE) return "NONE"; - nd_snprintf(buf, sizeof(buf), "%u%s", vid, + snprintf(buf, sizeof(buf), "%u%s", vid, (vid > 0 && vid < 0x0fff) ? "" : " (bogus)"); return buf; } @@ -709,7 +709,7 @@ static const char * pcp_str(const uint8_t pcp) { static char buf[sizeof("255 (bogus)")]; - nd_snprintf(buf, sizeof(buf), "%u%s", pcp, + snprintf(buf, sizeof(buf), "%u%s", pcp, pcp <= 7 ? "" : " (bogus)"); return buf; } @@ -1128,7 +1128,7 @@ of10_packet_data_print(netdissect_options *ndo, ND_TCHECK_LEN(cp, len); ndo->ndo_vflag -= 3; ND_PRINT(", frame decoding below\n"); - ether_print(ndo, cp, len, ndo->ndo_snapend - cp, NULL, NULL); + ether_print(ndo, cp, len, ND_BYTES_AVAILABLE_AFTER(cp), NULL, NULL); ndo->ndo_vflag += 3; return cp + len;