FD.io VPP  v19.08-27-gf4dcae4
Vector Packet Processing
sctp.c File Reference
+ Include dependency graph for sctp.c:

Go to the source code of this file.

Functions

static u32 sctp_connection_bind (u32 session_index, transport_endpoint_t *tep)
 
u32 sctp_session_bind (u32 session_index, transport_endpoint_t *tep)
 
static void sctp_connection_unbind (u32 listener_index)
 
u32 sctp_session_unbind (u32 listener_index)
 
void sctp_punt_unknown (vlib_main_t *vm, u8 is_ip4, u8 is_add)
 
static int sctp_alloc_custom_local_endpoint (sctp_main_t *tm, ip46_address_t *lcl_addr, u16 *lcl_port, u8 is_ip4)
 
void sctp_connection_timers_init (sctp_connection_t *sctp_conn)
 Initialize all connection timers as invalid. More...
 
void sctp_connection_timers_reset (sctp_connection_t *sctp_conn)
 Stop all connection timers. More...
 
u8format_sctp_state (u8 *s, va_list *args)
 
u8format_sctp_connection_id (u8 *s, va_list *args)
 
u8format_sctp_connection (u8 *s, va_list *args)
 
void sctp_init_snd_vars (sctp_connection_t *sctp_conn)
 Initialize connection send variables. More...
 
static sctp_connection_tsctp_sub_connection_add (u8 thread_index)
 
u8 sctp_sub_connection_add_ip4 (vlib_main_t *vm, ip4_address_t *lcl_addr, ip4_address_t *rmt_addr)
 
u8 sctp_sub_connection_del_ip4 (ip4_address_t *lcl_addr, ip4_address_t *rmt_addr)
 
u8 sctp_sub_connection_add_ip6 (vlib_main_t *vm, ip6_address_t *lcl_addr, ip6_address_t *rmt_addr)
 
u8 sctp_sub_connection_del_ip6 (ip6_address_t *lcl_addr, ip6_address_t *rmt_addr)
 
u8 sctp_configure (sctp_user_configuration_t config)
 
sctp_connection_tsctp_connection_new (u8 thread_index)
 
sctp_connection_tsctp_half_open_connection_new (u8 thread_index)
 
static int sctp_connection_open (transport_endpoint_cfg_t *rmt)
 
void sctp_connection_cleanup (sctp_connection_t *sctp_conn)
 Cleans up connection state. More...
 
int sctp_session_open (transport_endpoint_cfg_t *tep)
 
u16 sctp_check_outstanding_data_chunks (sctp_connection_t *sctp_conn)
 
void sctp_connection_close (sctp_connection_t *sctp_conn)
 
void sctp_session_close (u32 conn_index, u32 thread_index)
 
void sctp_session_cleanup (u32 conn_index, u32 thread_index)
 
u16 sctp_session_send_mss (transport_connection_t *trans_conn)
 Compute maximum segment size for session layer. More...
 
u16 sctp_snd_space (sctp_connection_t *sctp_conn)
 
u32 sctp_session_send_space (transport_connection_t *trans_conn)
 Compute TX window session is allowed to fill. More...
 
transport_connection_tsctp_session_get_transport (u32 conn_index, u32 thread_index)
 
transport_connection_tsctp_session_get_listener (u32 listener_index)
 
u8format_sctp_session (u8 *s, va_list *args)
 
u8format_sctp_listener_session (u8 *s, va_list *args)
 
void sctp_expired_timers_cb (u32 conn_index, u32 timer_id)
 
static void sctp_expired_timers_dispatch (u32 *expired_timers)
 
void sctp_initialize_timer_wheels (sctp_main_t *tm)
 
clib_error_tsctp_main_enable (vlib_main_t *vm)
 
clib_error_tsctp_transport_enable_disable (vlib_main_t *vm, u8 is_en)
 
transport_connection_tsctp_half_open_session_get_transport (u32 conn_index)
 
u8format_sctp_half_open (u8 *s, va_list *args)
 
void sctp_update_time (f64 now, u8 thread_index)
 
clib_error_tsctp_enable_disable (vlib_main_t *vm, u8 is_en)
 
static u8sctp_format_buffer_opaque_helper (const vlib_buffer_t *b, u8 *s)
 
clib_error_tsctp_init (vlib_main_t *vm)
 
static clib_error_tshow_sctp_punt_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd_arg)
 
static clib_error_tsctp_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd_arg)
 
 VLIB_PLUGIN_REGISTER ()
 

Variables

sctp_main_t sctp_main
 
const char * sctp_fsm_states []
 
static const transport_proto_vft_t sctp_proto
 
static vlib_cli_command_t show_tcp_punt_command
 (constructor) VLIB_CLI_COMMAND (show_tcp_punt_command) More...
 
static vlib_cli_command_t show_sctp_command
 (constructor) VLIB_CLI_COMMAND (show_sctp_command) More...
 

Function Documentation

u8* format_sctp_connection ( u8 s,
va_list *  args 
)

Definition at line 237 of file sctp.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8* format_sctp_connection_id ( u8 s,
va_list *  args 
)

Definition at line 193 of file sctp.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8* format_sctp_half_open ( u8 s,
va_list *  args 
)

Definition at line 932 of file sctp.c.

+ Here is the call graph for this function:

u8* format_sctp_listener_session ( u8 s,
va_list *  args 
)

Definition at line 713 of file sctp.c.

+ Here is the call graph for this function:

u8* format_sctp_session ( u8 s,
va_list *  args 
)

Definition at line 697 of file sctp.c.

+ Here is the call graph for this function:

u8* format_sctp_state ( u8 s,
va_list *  args 
)

Definition at line 181 of file sctp.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int sctp_alloc_custom_local_endpoint ( sctp_main_t tm,
ip46_address_t *  lcl_addr,
u16 lcl_port,
u8  is_ip4 
)
static

Definition at line 111 of file sctp.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u16 sctp_check_outstanding_data_chunks ( sctp_connection_t sctp_conn)

Definition at line 562 of file sctp.c.

+ Here is the caller graph for this function:

u8 sctp_configure ( sctp_user_configuration_t  config)

Definition at line 415 of file sctp.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u32 sctp_connection_bind ( u32  session_index,
transport_endpoint_t tep 
)
static

Definition at line 25 of file sctp.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void sctp_connection_cleanup ( sctp_connection_t sctp_conn)

Cleans up connection state.

No notifications.

Definition at line 532 of file sctp.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void sctp_connection_close ( sctp_connection_t sctp_conn)

Definition at line 584 of file sctp.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

sctp_connection_t* sctp_connection_new ( u8  thread_index)

Definition at line 430 of file sctp.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int sctp_connection_open ( transport_endpoint_cfg_t rmt)
inlinestatic

Definition at line 463 of file sctp.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void sctp_connection_timers_init ( sctp_connection_t sctp_conn)

Initialize all connection timers as invalid.

Definition at line 144 of file sctp.c.

+ Here is the caller graph for this function:

void sctp_connection_timers_reset ( sctp_connection_t sctp_conn)

Stop all connection timers.

Definition at line 164 of file sctp.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void sctp_connection_unbind ( u32  listener_index)
static

Definition at line 79 of file sctp.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* sctp_enable_disable ( vlib_main_t vm,
u8  is_en 
)

Definition at line 975 of file sctp.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void sctp_expired_timers_cb ( u32  conn_index,
u32  timer_id 
)

Definition at line 722 of file sctp.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void sctp_expired_timers_dispatch ( u32 expired_timers)
static

Definition at line 792 of file sctp.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static clib_error_t* sctp_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd_arg 
)
static

Definition at line 1077 of file sctp.c.

+ Here is the call graph for this function:

static u8* sctp_format_buffer_opaque_helper ( const vlib_buffer_t b,
u8 s 
)
static

Definition at line 1011 of file sctp.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

sctp_connection_t* sctp_half_open_connection_new ( u8  thread_index)

Definition at line 448 of file sctp.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

transport_connection_t* sctp_half_open_session_get_transport ( u32  conn_index)

Definition at line 925 of file sctp.c.

+ Here is the call graph for this function:

clib_error_t* sctp_init ( vlib_main_t vm)

Definition at line 1035 of file sctp.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void sctp_init_snd_vars ( sctp_connection_t sctp_conn)

Initialize connection send variables.

Definition at line 259 of file sctp.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void sctp_initialize_timer_wheels ( sctp_main_t tm)

Definition at line 811 of file sctp.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* sctp_main_enable ( vlib_main_t vm)

Definition at line 825 of file sctp.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void sctp_punt_unknown ( vlib_main_t vm,
u8  is_ip4,
u8  is_add 
)

Definition at line 101 of file sctp.c.

u32 sctp_session_bind ( u32  session_index,
transport_endpoint_t tep 
)

Definition at line 73 of file sctp.c.

+ Here is the call graph for this function:

void sctp_session_cleanup ( u32  conn_index,
u32  thread_index 
)

Definition at line 606 of file sctp.c.

+ Here is the call graph for this function:

void sctp_session_close ( u32  conn_index,
u32  thread_index 
)

Definition at line 595 of file sctp.c.

+ Here is the call graph for this function:

transport_connection_t* sctp_session_get_listener ( u32  listener_index)

Definition at line 688 of file sctp.c.

+ Here is the call graph for this function:

transport_connection_t* sctp_session_get_transport ( u32  conn_index,
u32  thread_index 
)

Definition at line 676 of file sctp.c.

+ Here is the call graph for this function:

int sctp_session_open ( transport_endpoint_cfg_t tep)

Definition at line 556 of file sctp.c.

+ Here is the call graph for this function:

u16 sctp_session_send_mss ( transport_connection_t trans_conn)

Compute maximum segment size for session layer.

Definition at line 623 of file sctp.c.

+ Here is the call graph for this function:

u32 sctp_session_send_space ( transport_connection_t trans_conn)

Compute TX window session is allowed to fill.

Definition at line 667 of file sctp.c.

+ Here is the call graph for this function:

u32 sctp_session_unbind ( u32  listener_index)

Definition at line 94 of file sctp.c.

+ Here is the call graph for this function:

u16 sctp_snd_space ( sctp_connection_t sctp_conn)

Definition at line 642 of file sctp.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static sctp_connection_t* sctp_sub_connection_add ( u8  thread_index)
inlinestatic

Definition at line 281 of file sctp.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8 sctp_sub_connection_add_ip4 ( vlib_main_t vm,
ip4_address_t lcl_addr,
ip4_address_t rmt_addr 
)

Definition at line 299 of file sctp.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8 sctp_sub_connection_add_ip6 ( vlib_main_t vm,
ip6_address_t lcl_addr,
ip6_address_t rmt_addr 
)

Definition at line 356 of file sctp.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8 sctp_sub_connection_del_ip4 ( ip4_address_t lcl_addr,
ip4_address_t rmt_addr 
)

Definition at line 322 of file sctp.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8 sctp_sub_connection_del_ip6 ( ip6_address_t lcl_addr,
ip6_address_t rmt_addr 
)

Definition at line 379 of file sctp.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* sctp_transport_enable_disable ( vlib_main_t vm,
u8  is_en 
)

Definition at line 907 of file sctp.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void sctp_update_time ( f64  now,
u8  thread_index 
)

Definition at line 941 of file sctp.c.

+ Here is the call graph for this function:

static clib_error_t* show_sctp_punt_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd_arg 
)
static

Definition at line 1054 of file sctp.c.

+ Here is the call graph for this function:

VLIB_PLUGIN_REGISTER ( )

Variable Documentation

const char* sctp_fsm_states[]
Initial value:
= {
#define _(sym, str)
}
#define foreach_sctp_fsm_state
SSCTP FSM state definitions as per RFC4960.
Definition: sctp.h:373

Definition at line 174 of file sctp.c.

sctp_main_t sctp_main

Definition at line 22 of file sctp.c.

const transport_proto_vft_t sctp_proto
static
Initial value:
= {
.start_listen = sctp_session_bind,
.stop_listen = sctp_session_unbind,
.connect = sctp_session_open,
.push_header = sctp_push_header,
.send_mss = sctp_session_send_mss,
.send_space = sctp_session_send_space,
.update_time = sctp_update_time,
.get_connection = sctp_session_get_transport,
.get_listener = sctp_session_get_listener,
.format_connection = format_sctp_session,
.format_listener = format_sctp_listener_session,
.format_half_open = format_sctp_half_open,
.transport_options = {
.service_type = TRANSPORT_SERVICE_VC,
},
}
transport_connection_t * sctp_half_open_session_get_transport(u32 conn_index)
Definition: sctp.c:925
clib_error_t * sctp_transport_enable_disable(vlib_main_t *vm, u8 is_en)
Definition: sctp.c:907
u8 * format_sctp_half_open(u8 *s, va_list *args)
Definition: sctp.c:932
u16 sctp_session_send_mss(transport_connection_t *trans_conn)
Compute maximum segment size for session layer.
Definition: sctp.c:623
int sctp_session_open(transport_endpoint_cfg_t *tep)
Definition: sctp.c:556
u8 * format_sctp_listener_session(u8 *s, va_list *args)
Definition: sctp.c:713
u32 sctp_session_unbind(u32 listener_index)
Definition: sctp.c:94
transport_connection_t * sctp_session_get_transport(u32 conn_index, u32 thread_index)
Definition: sctp.c:676
u8 * format_sctp_session(u8 *s, va_list *args)
Definition: sctp.c:697
void sctp_session_cleanup(u32 conn_index, u32 thread_index)
Definition: sctp.c:606
u32 sctp_session_bind(u32 session_index, transport_endpoint_t *tep)
Definition: sctp.c:73
transport_connection_t * sctp_session_get_listener(u32 listener_index)
Definition: sctp.c:688
virtual circuit service
u32 sctp_push_header(transport_connection_t *tconn, vlib_buffer_t *b)
Definition: sctp_output.c:1419
void sctp_update_time(f64 now, u8 thread_index)
Definition: sctp.c:941
unreliable transport protos
void sctp_session_close(u32 conn_index, u32 thread_index)
Definition: sctp.c:595
u32 sctp_session_send_space(transport_connection_t *trans_conn)
Compute TX window session is allowed to fill.
Definition: sctp.c:667

Definition at line 950 of file sctp.c.

vlib_cli_command_t show_sctp_command
static
Initial value:
=
{
.path = "sctp",
.short_help = "sctp [enable | disable]",
.function = sctp_fn,
}
static clib_error_t * sctp_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd_arg)
Definition: sctp.c:1077

(constructor) VLIB_CLI_COMMAND (show_sctp_command)

Definition at line 1108 of file sctp.c.

vlib_cli_command_t show_tcp_punt_command
static
Initial value:
=
{
.path = "show sctp punt",
.short_help = "show sctp punt",
.function = show_sctp_punt_fn,
}
static clib_error_t * show_sctp_punt_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd_arg)
Definition: sctp.c:1054

(constructor) VLIB_CLI_COMMAND (show_tcp_punt_command)

Definition at line 1068 of file sctp.c.