47 u32 max_header_bytes = va_arg (*args,
u32);
49 u32 header_bytes =
sizeof (udp[0]);
52 if (max_header_bytes <
sizeof (udp[0]))
53 return format (s,
"UDP header truncated");
58 s =
format (s,
"UDP: %d -> %d",
59 clib_net_to_host_u16 (udp->
src_port),
60 clib_net_to_host_u16 (udp->
dst_port));
62 s =
format (s,
"\n%Ulength %d, checksum 0x%04x",
64 clib_net_to_host_u16 (udp->
length),
65 clib_net_to_host_u16 (udp->
checksum));
68 if (max_header_bytes != 0 && header_bytes < max_header_bytes)
79 max_header_bytes - sizeof (udp[0]));
88 u16 *result = va_arg (*args,
u16 *);
94 if (port <= 0 || port >= (1 << 16))