X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/c754d30dbd366699ae11ea53655bbef398b83c5c..a63600a1fc28dbc7ae7ce9f996829c49a25fb33c:/print-stp.c?ds=sidebyside diff --git a/print-stp.c b/print-stp.c index b8973ace..bfaf3782 100644 --- a/print-stp.c +++ b/print-stp.c @@ -144,7 +144,7 @@ stp_print_config_bpdu(netdissect_options *ndo, const struct stp_bpdu_ *stp_bpdu, * * 2 - bytes Protocol Id * 1 - byte Protocol Ver. - * 1 - byte BPDU tye + * 1 - byte BPDU type * 1 - byte Flags * 8 - bytes CIST Root Identifier * 4 - bytes CIST External Path Cost @@ -203,7 +203,7 @@ stp_print_config_bpdu(netdissect_options *ndo, const struct stp_bpdu_ *stp_bpdu, #define MST_BPDU_MSTI_LENGTH 16 #define MST_BPDU_CONFIG_INFO_LENGTH 64 -/* Offsets of fields from the begginning for the packet */ +/* Offsets of fields from the beginning for the packet */ #define MST_BPDU_VER3_LEN_OFFSET 36 #define MST_BPDU_CONFIG_NAME_OFFSET 39 #define MST_BPDU_CONFIG_DIGEST_OFFSET 73 @@ -276,7 +276,7 @@ stp_print_mstp_bpdu(netdissect_options *ndo, const struct stp_bpdu_ *stp_bpdu, ND_PRINT("\n\tv3len %u, ", GET_BE_U_2(ptr + MST_BPDU_VER3_LEN_OFFSET)); ND_PRINT("MCID Name "); - (void)nd_printzp(ndo, ptr + MST_BPDU_CONFIG_NAME_OFFSET, 32, NULL); + nd_printjnp(ndo, ptr + MST_BPDU_CONFIG_NAME_OFFSET, 32); ND_PRINT(", rev %u," "\n\t\tdigest %08x%08x%08x%08x, ", GET_BE_U_2(ptr + MST_BPDU_CONFIG_NAME_OFFSET + 32), @@ -340,7 +340,7 @@ stp_print_spb_bpdu(netdissect_options *ndo, const struct stp_bpdu_ *stp_bpdu, ND_PRINT("\n\tv4len %u, ", GET_BE_U_2(ptr + offset)); ND_PRINT("AUXMCID Name "); - (void)nd_printzp(ndo, ptr + offset + SPB_BPDU_CONFIG_NAME_OFFSET, 32, NULL); + nd_printjnp(ndo, ptr + offset + SPB_BPDU_CONFIG_NAME_OFFSET, 32); ND_PRINT(", Rev %u,\n\t\tdigest %08x%08x%08x%08x", GET_BE_U_2(ptr + offset + SPB_BPDU_CONFIG_REV_OFFSET), GET_BE_U_4(ptr + offset + SPB_BPDU_CONFIG_DIGEST_OFFSET), @@ -443,8 +443,7 @@ stp_print(netdissect_options *ndo, const u_char *p, u_int length) } stp_print_mstp_bpdu(ndo, stp_bpdu, length); - if (protocol_version == STP_PROTO_SPB) - { + if (protocol_version == STP_PROTO_SPB) { /* Validate v4 length */ spb_len = GET_BE_U_2(p + MST_BPDU_VER3_LEN_OFFSET + mstp_len); spb_len += 2;