+static void
+tcp46_listen_trace_frame (vlib_main_t *vm, vlib_node_runtime_t *node,
+ u32 *to_next, u32 n_bufs)
+{
+ tcp_connection_t *tc = 0;
+ tcp_rx_trace_t *t;
+ vlib_buffer_t *b;
+ int i;
+
+ for (i = 0; i < n_bufs; i++)
+ {
+ b = vlib_get_buffer (vm, to_next[i]);
+ if (!(b->flags & VLIB_BUFFER_IS_TRACED))
+ continue;
+ if (vnet_buffer (b)->tcp.flags == TCP_STATE_LISTEN)
+ tc = tcp_listener_get (vnet_buffer (b)->tcp.connection_index);
+ t = vlib_add_trace (vm, node, b, sizeof (*t));
+ tcp_set_rx_trace_data (t, tc, tcp_buffer_hdr (b), b, 1);
+ }
+}
+