void *iface_ip;
pool_get (tm->listener_pool, listener);
- memset (listener, 0, sizeof (*listener));
+ clib_memset (listener, 0, sizeof (*listener));
listener->sub_conn[SCTP_PRIMARY_PATH_IDX].subconn_idx =
SCTP_PRIMARY_PATH_IDX;
/* Poison the entry */
if (CLIB_DEBUG > 0)
- memset (sctp_conn, 0xFA, sizeof (*sctp_conn));
+ clib_memset (sctp_conn, 0xFA, sizeof (*sctp_conn));
pool_put_index (tm->listener_pool, listener_index);
}
sctp_connection_t *sctp_conn;
pool_get (sctp_main->connections[thread_index], sctp_conn);
- memset (sctp_conn, 0, sizeof (*sctp_conn));
+ clib_memset (sctp_conn, 0, sizeof (*sctp_conn));
sctp_conn->sub_conn[SCTP_PRIMARY_PATH_IDX].subconn_idx =
SCTP_PRIMARY_PATH_IDX;
sctp_conn->sub_conn[SCTP_PRIMARY_PATH_IDX].c_c_index =
sctp_connection_t *sctp_conn = 0;
ASSERT (vlib_get_thread_index () == 0);
pool_get (tm->half_open_connections, sctp_conn);
- memset (sctp_conn, 0, sizeof (*sctp_conn));
+ clib_memset (sctp_conn, 0, sizeof (*sctp_conn));
sctp_conn->sub_conn[SCTP_PRIMARY_PATH_IDX].c_c_index =
sctp_conn - tm->half_open_connections;
sctp_conn->sub_conn[SCTP_PRIMARY_PATH_IDX].subconn_idx =
}
static inline int
-sctp_connection_open (transport_endpoint_t * rmt)
+sctp_connection_open (transport_endpoint_cfg_t * rmt)
{
sctp_main_t *tm = vnet_get_sctp_main ();
sctp_connection_t *sctp_conn;
clib_spinlock_lock_if_init (&tm->half_open_lock);
sctp_conn = sctp_half_open_connection_new (thread_id);
u32 mtu = rmt->is_ip4 ? vnet_sw_interface_get_mtu (vnet_get_main (),
- rmt->sw_if_index,
+ rmt->peer.sw_if_index,
VNET_MTU_IP4) :
- vnet_sw_interface_get_mtu (vnet_get_main (), rmt->sw_if_index,
+ vnet_sw_interface_get_mtu (vnet_get_main (), rmt->peer.sw_if_index,
VNET_MTU_IP6);
sctp_conn->sub_conn[idx].PMTU = mtu;
/* Poison the entry */
if (CLIB_DEBUG > 0)
- memset (sctp_conn, 0xFA, sizeof (*sctp_conn));
+ clib_memset (sctp_conn, 0xFA, sizeof (*sctp_conn));
pool_put (tm->connections[thread_index], sctp_conn);
}
int
-sctp_session_open (transport_endpoint_t * tep)
+sctp_session_open (transport_endpoint_cfg_t * tep)
{
return sctp_connection_open (tep);
}
update_smallest_pmtu_idx (sctp_conn);
u8 idx = sctp_data_subconn_select (sctp_conn);
-
return sctp_conn->sub_conn[idx].cwnd;
}
VLIB_INIT_FUNCTION (sctp_init);
+static clib_error_t *
+show_sctp_punt_fn (vlib_main_t * vm, unformat_input_t * input,
+ vlib_cli_command_t * cmd_arg)
+{
+ sctp_main_t *tm = &sctp_main;
+ if (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
+ return clib_error_return (0, "unknown input `%U'", format_unformat_error,
+ input);
+ vlib_cli_output (vm, "IPv4 UDP punt: %s",
+ tm->punt_unknown4 ? "enabled" : "disabled");
+ vlib_cli_output (vm, "IPv6 UDP punt: %s",
+ tm->punt_unknown6 ? "enabled" : "disabled");
+ return 0;
+}
+/* *INDENT-OFF* */
+VLIB_CLI_COMMAND (show_tcp_punt_command, static) =
+{
+ .path = "show sctp punt",
+ .short_help = "show sctp punt",
+ .function = show_sctp_punt_fn,
+};
+/* *INDENT-ON* */
+
/*
* fd.io coding-style-patch-verification: ON
*