#include "netdissect-stdinc.h"
-#include <stdio.h>
-
#include "netdissect.h"
#include "extract.h"
#include "addrtoname.h"
u_int hexdump = FALSE;
/*
- * Although AFIs are typically 2 octects wide,
+ * Although AFIs are typically 2 octets wide,
* 802.1ab specifies that this field width
* is only one octet.
*/
hexdump = TRUE;
break;
}
- ND_PRINT(", %s", ipaddr_string(ndo, tptr + 1));
+ ND_PRINT(", %s", GET_IPADDR_STRING(tptr + 1));
break;
case AFNUM_INET6:
hexdump = TRUE;
break;
}
- ND_PRINT(", %s", ip6addr_string(ndo, tptr + 1));
+ ND_PRINT(", %s", GET_IP6ADDR_STRING(tptr + 1));
break;
default:
switch (md_nameformat) {
case CFM_CCM_MD_FORMAT_DNS:
case CFM_CCM_MD_FORMAT_CHAR:
- (void)nd_printzp(ndo, md_name, md_namelength, NULL);
+ nd_printjnp(ndo, md_name, md_namelength);
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)");
}
ND_PRINT("\n\t MA Name: ");
switch (ma_nameformat) {
case CFM_CCM_MA_FORMAT_CHAR:
- (void)nd_printzp(ndo, ma_name, ma_namelength, NULL);
+ nd_printjnp(ndo, ma_name, ma_namelength);
break;
/* FIXME add printers for those MA formats - hexdump for now */
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:
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)",
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:
case CFM_CHASSIS_ID_LOCAL:
case CFM_CHASSIS_ID_CHASSIS_COMPONENT:
case CFM_CHASSIS_ID_PORT_COMPONENT:
- (void)nd_printzp(ndo, tptr + 1, chassis_id_length, NULL);
+ nd_printjnp(ndo, tptr + 1, chassis_id_length);
break;
default: