29 #define _(f) case ETHERNET_ARP_OPCODE_##f: t = #f; break;
34 return format (s,
"unknown 0x%x", o);
37 return format (s,
"%s", t);
47 #define _(n,f) case n: t = #f; break;
52 return format (s,
"unknown 0x%x",
h);
55 return format (s,
"%s", t);
62 u32 max_header_bytes = va_arg (*va,
u32);
66 if (max_header_bytes != 0 &&
sizeof (
a[0]) > max_header_bytes)
67 return format (s,
"ARP header truncated");
69 l2_type = clib_net_to_host_u16 (
a->l2_type);
70 l3_type = clib_net_to_host_u16 (
a->l3_type);
74 s =
format (s,
"%U, type %U/%U, address size %d/%d",
78 a->n_l2_address_bytes,
a->n_l3_address_bytes);
80 if (l2_type == ETHERNET_ARP_HARDWARE_TYPE_ethernet
81 && l3_type == ETHERNET_TYPE_IP4)
83 s =
format (s,
"\n%U%U/%U -> %U/%U",
92 uword n2 =
a->n_l2_address_bytes;
93 uword n3 =
a->n_l3_address_bytes;
94 s =
format (s,
"\n%U%U/%U -> %U/%U",