X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/b1e5f800b368548e4cd47169a514209e62637f5d..1bcd37991fa57d9e966a6f96e7cbff59b16c28bd:/print-cfm.c diff --git a/print-cfm.c b/print-cfm.c index 63d58e39..27e72a23 100644 --- a/print-cfm.c +++ b/print-cfm.c @@ -247,7 +247,7 @@ cfm_network_addr_print(netdissect_options *ndo, hexdump = TRUE; break; } - ND_PRINT(", %s", ipaddr_string(ndo, tptr + 1)); + ND_PRINT(", %s", GET_IPADDR_STRING(tptr + 1)); break; case AFNUM_INET6: @@ -256,7 +256,7 @@ cfm_network_addr_print(netdissect_options *ndo, hexdump = TRUE; break; } - ND_PRINT(", %s", ip6addr_string(ndo, tptr + 1)); + ND_PRINT(", %s", GET_IP6ADDR_STRING(tptr + 1)); break; default: @@ -407,9 +407,8 @@ cfm_print(netdissect_options *ndo, break; case CFM_CCM_MD_FORMAT_MAC: - if (md_namelength == 6) { - ND_PRINT("\n\t MAC %s", etheraddr_string(ndo, - md_name)); + if (md_namelength == MAC_ADDR_LEN) { + ND_PRINT("\n\t MAC %s", GET_ETHERADDR_STRING(md_name)); } else { ND_PRINT("\n\t MAC (length invalid)"); } @@ -487,8 +486,8 @@ cfm_print(netdissect_options *ndo, GET_U_1(msg_ptr.cfm_ltm->ttl)); ND_PRINT("\n\t Original-MAC %s, Target-MAC %s", - etheraddr_string(ndo, msg_ptr.cfm_ltm->original_mac), - etheraddr_string(ndo, msg_ptr.cfm_ltm->target_mac)); + GET_ETHERADDR_STRING(msg_ptr.cfm_ltm->original_mac), + GET_ETHERADDR_STRING(msg_ptr.cfm_ltm->target_mac)); break; case CFM_OPCODE_LTR: @@ -535,7 +534,6 @@ cfm_print(netdissect_options *ndo, cfm_tlv_header = (const struct cfm_tlv_header_t *)tptr; /* Enough to read the tlv type ? */ - ND_TCHECK_1(cfm_tlv_header->type); cfm_tlv_type = GET_U_1(cfm_tlv_header->type); ND_PRINT("\n\t%s TLV (0x%02x)", @@ -649,7 +647,7 @@ cfm_print(netdissect_options *ndo, hexdump = TRUE; break; } - ND_PRINT("\n\t MAC %s", etheraddr_string(ndo, tptr + 1)); + ND_PRINT("\n\t MAC %s", GET_ETHERADDR_STRING(tptr + 1)); break; case CFM_CHASSIS_ID_NETWORK_ADDRESS: