- if (eflag) {
- switch (p[0]) {
- case CHDLC_UNICAST:
- printf("unicast ");
- break;
- case CHDLC_BCAST:
- printf("bcast ");
- break;
- default:
- printf("0x%02x ", p[0]);
- break;
- }
- printf("%d %04x: ", length, proto);
+ if (ndo->ndo_eflag) {
+ ND_PRINT((ndo, "%s, ethertype %s (0x%04x), length %u: ",
+ tok2str(chdlc_cast_values, "0x%02x", p[0]),
+ tok2str(ethertype_values, "Unknown", proto),
+ proto,
+ length));