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",
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",
94 s =
format (s,
"\n%U%U/%U -> %U/%U",
u8 * format_ethernet_arp_opcode(u8 *s, va_list *va)
u8 * format_ethernet_arp_hardware_type(u8 *s, va_list *va)
description fragment has unexpected format
#define foreach_ethernet_arp_opcode
u8 * format_ethernet_type(u8 *s, va_list *args)
ethernet_arp_hardware_type_t
u8 * format_ethernet_arp_header(u8 *s, va_list *va)
u8 * format_mac_address_t(u8 *s, va_list *args)