- /*
- sctp_connection_t *tc = va_arg (*args, sctp_connection_t *);
- if (!tc)
- return s;
- if (tc->c_is_ip4)
- {
- s = format (s, "[#%d][%s] %U:%d->%U:%d", tc->c_thread_index, "T",
- format_ip4_address, &tc->c_lcl_ip4,
- clib_net_to_host_u16 (tc->c_lcl_port), format_ip4_address,
- &tc->c_rmt_ip4, clib_net_to_host_u16 (tc->c_rmt_port));
- }
- else
- {
- s = format (s, "[#%d][%s] %U:%d->%U:%d", tc->c_thread_index, "T",
- format_ip6_address, &tc->c_lcl_ip6,
- clib_net_to_host_u16 (tc->c_lcl_port), format_ip6_address,
- &tc->c_rmt_ip6, clib_net_to_host_u16 (tc->c_rmt_port));
- }
- */
+ sctp_connection_t *sctp_conn = va_arg (*args, sctp_connection_t *);
+ if (!sctp_conn)
+ return s;
+
+ u8 i;
+ for (i = 0; i < MAX_SCTP_CONNECTIONS; i++)
+ {
+ if (sctp_conn->sub_conn[i].connection.is_ip4)
+ {
+ s = format (s, "%U[#%d][%s] %U:%d->%U:%d",
+ s,
+ sctp_conn->sub_conn[i].connection.thread_index,
+ "T",
+ format_ip4_address,
+ &sctp_conn->sub_conn[i].connection.lcl_ip.ip4,
+ clib_net_to_host_u16 (sctp_conn->sub_conn[i].
+ connection.lcl_port),
+ format_ip4_address,
+ &sctp_conn->sub_conn[i].connection.rmt_ip.ip4,
+ clib_net_to_host_u16 (sctp_conn->sub_conn[i].
+ connection.rmt_port));
+ }
+ else
+ {
+ s = format (s, "%U[#%d][%s] %U:%d->%U:%d",
+ s,
+ sctp_conn->sub_conn[i].connection.thread_index,
+ "T",
+ format_ip6_address,
+ &sctp_conn->sub_conn[i].connection.lcl_ip.ip6,
+ clib_net_to_host_u16 (sctp_conn->sub_conn[i].
+ connection.lcl_port),
+ format_ip6_address,
+ &sctp_conn->sub_conn[i].connection.rmt_ip.ip6,
+ clib_net_to_host_u16 (sctp_conn->sub_conn[i].
+ connection.rmt_port));
+ }
+ }