46 int flags = va_arg (*args,
int);
48 s =
format (s,
"0x%02x", flags);
49 #define _(f) if (flags & TCP_FLAG_##f) s = format (s, " %s", #f); 60 u32 max_header_bytes = va_arg (*args,
u32);
65 if (max_header_bytes <
sizeof (tcp[0]))
66 return format (s,
"TCP header truncated");
72 s =
format (s,
"TCP: %d -> %d", clib_net_to_host_u16 (tcp->src),
73 clib_net_to_host_u16 (tcp->dst));
76 clib_net_to_host_u32 (tcp->seq_number),
77 clib_net_to_host_u32 (tcp->ack_number));
83 clib_net_to_host_u16 (tcp->window),
84 clib_net_to_host_u16 (tcp->checksum));
91 u8 *option_start = (
void *) (tcp + 1);
92 u8 *option_end = (
void *) tcp + header_bytes;
94 for (o = option_start; o < option_end;)
114 if (max_header_bytes != 0 && header_bytes < max_header_bytes)
124 (
void *) tcp + header_bytes,
125 max_header_bytes - header_bytes);
vl_api_wireguard_peer_flags_t flags
struct _tcp_header tcp_header_t
description fragment has unexpected format
static tcp_udp_port_info_t * ip_get_tcp_udp_port_info(ip_main_t *im, u32 port)
format_function_t * format_header
static int tcp_header_bytes(tcp_header_t *t)