FD.io VPP  v19.04.4-rc0-5-ge88582fac
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_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_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)
 

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...
 

Function Documentation

◆ format_sctp_connection()

u8* format_sctp_connection ( u8 s,
va_list *  args 
)

Definition at line 233 of file sctp.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ format_sctp_connection_id()

u8* format_sctp_connection_id ( u8 s,
va_list *  args 
)

Definition at line 189 of file sctp.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ format_sctp_half_open()

u8* format_sctp_half_open ( u8 s,
va_list *  args 
)

Definition at line 927 of file sctp.c.

+ Here is the call graph for this function:

◆ format_sctp_listener_session()

u8* format_sctp_listener_session ( u8 s,
va_list *  args 
)

Definition at line 709 of file sctp.c.

+ Here is the call graph for this function:

◆ format_sctp_session()

u8* format_sctp_session ( u8 s,
va_list *  args 
)

Definition at line 693 of file sctp.c.

+ Here is the call graph for this function:

◆ format_sctp_state()

u8* format_sctp_state ( u8 s,
va_list *  args 
)

Definition at line 177 of file sctp.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sctp_alloc_custom_local_endpoint()

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 107 of file sctp.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sctp_check_outstanding_data_chunks()

u16 sctp_check_outstanding_data_chunks ( sctp_connection_t sctp_conn)

Definition at line 558 of file sctp.c.

+ Here is the caller graph for this function:

◆ sctp_configure()

u8 sctp_configure ( sctp_user_configuration_t  config)

Definition at line 411 of file sctp.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sctp_connection_bind()

static u32 sctp_connection_bind ( u32  session_index,
transport_endpoint_t tep 
)
static

Definition at line 21 of file sctp.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sctp_connection_cleanup()

void sctp_connection_cleanup ( sctp_connection_t sctp_conn)

Cleans up connection state.

No notifications.

Definition at line 528 of file sctp.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sctp_connection_close()

void sctp_connection_close ( sctp_connection_t sctp_conn)

Definition at line 580 of file sctp.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sctp_connection_new()

sctp_connection_t* sctp_connection_new ( u8  thread_index)

Definition at line 426 of file sctp.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sctp_connection_open()

static int sctp_connection_open ( transport_endpoint_cfg_t rmt)
inlinestatic

Definition at line 459 of file sctp.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sctp_connection_timers_init()

void sctp_connection_timers_init ( sctp_connection_t sctp_conn)

Initialize all connection timers as invalid.

Definition at line 140 of file sctp.c.

+ Here is the caller graph for this function:

◆ sctp_connection_timers_reset()

void sctp_connection_timers_reset ( sctp_connection_t sctp_conn)

Stop all connection timers.

Definition at line 160 of file sctp.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sctp_connection_unbind()

static void sctp_connection_unbind ( u32  listener_index)
static

Definition at line 75 of file sctp.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sctp_enable_disable()

clib_error_t* sctp_enable_disable ( vlib_main_t vm,
u8  is_en 
)

Definition at line 902 of file sctp.c.

+ Here is the call graph for this function:

◆ sctp_expired_timers_cb()

void sctp_expired_timers_cb ( u32  conn_index,
u32  timer_id 
)

Definition at line 717 of file sctp.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sctp_expired_timers_dispatch()

static void sctp_expired_timers_dispatch ( u32 expired_timers)
static

Definition at line 787 of file sctp.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sctp_half_open_connection_new()

sctp_connection_t* sctp_half_open_connection_new ( u8  thread_index)

Definition at line 444 of file sctp.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sctp_half_open_session_get_transport()

transport_connection_t* sctp_half_open_session_get_transport ( u32  conn_index)

Definition at line 920 of file sctp.c.

+ Here is the call graph for this function:

◆ sctp_init()

clib_error_t* sctp_init ( vlib_main_t vm)

Definition at line 968 of file sctp.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sctp_init_snd_vars()

void sctp_init_snd_vars ( sctp_connection_t sctp_conn)

Initialize connection send variables.

Definition at line 255 of file sctp.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sctp_initialize_timer_wheels()

void sctp_initialize_timer_wheels ( sctp_main_t tm)

Definition at line 806 of file sctp.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sctp_main_enable()

clib_error_t* sctp_main_enable ( vlib_main_t vm)

Definition at line 820 of file sctp.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sctp_punt_unknown()

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

Definition at line 97 of file sctp.c.

+ Here is the caller graph for this function:

◆ sctp_session_bind()

u32 sctp_session_bind ( u32  session_index,
transport_endpoint_t tep 
)

Definition at line 69 of file sctp.c.

+ Here is the call graph for this function:

◆ sctp_session_cleanup()

void sctp_session_cleanup ( u32  conn_index,
u32  thread_index 
)

Definition at line 602 of file sctp.c.

+ Here is the call graph for this function:

◆ sctp_session_close()

void sctp_session_close ( u32  conn_index,
u32  thread_index 
)

Definition at line 591 of file sctp.c.

+ Here is the call graph for this function:

◆ sctp_session_get_listener()

transport_connection_t* sctp_session_get_listener ( u32  listener_index)

Definition at line 684 of file sctp.c.

+ Here is the call graph for this function:

◆ sctp_session_get_transport()

transport_connection_t* sctp_session_get_transport ( u32  conn_index,
u32  thread_index 
)

Definition at line 672 of file sctp.c.

+ Here is the call graph for this function:

◆ sctp_session_open()

int sctp_session_open ( transport_endpoint_cfg_t tep)

Definition at line 552 of file sctp.c.

+ Here is the call graph for this function:

◆ sctp_session_send_mss()

u16 sctp_session_send_mss ( transport_connection_t trans_conn)

Compute maximum segment size for session layer.

Definition at line 619 of file sctp.c.

+ Here is the call graph for this function:

◆ sctp_session_send_space()

u32 sctp_session_send_space ( transport_connection_t trans_conn)

Compute TX window session is allowed to fill.

Definition at line 663 of file sctp.c.

+ Here is the call graph for this function:

◆ sctp_session_unbind()

u32 sctp_session_unbind ( u32  listener_index)

Definition at line 90 of file sctp.c.

+ Here is the call graph for this function:

◆ sctp_snd_space()

u16 sctp_snd_space ( sctp_connection_t sctp_conn)

Definition at line 638 of file sctp.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sctp_sub_connection_add()

static sctp_connection_t* sctp_sub_connection_add ( u8  thread_index)
inlinestatic

Definition at line 277 of file sctp.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sctp_sub_connection_add_ip4()

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

Definition at line 295 of file sctp.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sctp_sub_connection_add_ip6()

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

Definition at line 352 of file sctp.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sctp_sub_connection_del_ip4()

u8 sctp_sub_connection_del_ip4 ( ip4_address_t lcl_addr,
ip4_address_t rmt_addr 
)

Definition at line 318 of file sctp.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sctp_sub_connection_del_ip6()

u8 sctp_sub_connection_del_ip6 ( ip6_address_t lcl_addr,
ip6_address_t rmt_addr 
)

Definition at line 375 of file sctp.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sctp_update_time()

void sctp_update_time ( f64  now,
u8  thread_index 
)

Definition at line 935 of file sctp.c.

+ Here is the call graph for this 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 
)
static

Definition at line 1003 of file sctp.c.

+ Here is the call graph for this function:

Variable Documentation

◆ sctp_fsm_states

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:346

Definition at line 170 of file sctp.c.

◆ sctp_main

sctp_main_t sctp_main

Definition at line 18 of file sctp.c.

◆ sctp_proto

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,
.service_type = TRANSPORT_SERVICE_VC,
}
transport_connection_t * sctp_half_open_session_get_transport(u32 conn_index)
Definition: sctp.c:920
clib_error_t * sctp_enable_disable(vlib_main_t *vm, u8 is_en)
Definition: sctp.c:902
u8 * format_sctp_half_open(u8 *s, va_list *args)
Definition: sctp.c:927
u16 sctp_session_send_mss(transport_connection_t *trans_conn)
Compute maximum segment size for session layer.
Definition: sctp.c:619
int sctp_session_open(transport_endpoint_cfg_t *tep)
Definition: sctp.c:552
u8 * format_sctp_listener_session(u8 *s, va_list *args)
Definition: sctp.c:709
u32 sctp_session_unbind(u32 listener_index)
Definition: sctp.c:90
transport_connection_t * sctp_session_get_transport(u32 conn_index, u32 thread_index)
Definition: sctp.c:672
u8 * format_sctp_session(u8 *s, va_list *args)
Definition: sctp.c:693
void sctp_session_cleanup(u32 conn_index, u32 thread_index)
Definition: sctp.c:602
u32 sctp_session_bind(u32 session_index, transport_endpoint_t *tep)
Definition: sctp.c:69
transport_connection_t * sctp_session_get_listener(u32 listener_index)
Definition: sctp.c:684
virtual circuit service
u32 sctp_push_header(transport_connection_t *tconn, vlib_buffer_t *b)
Definition: sctp_output.c:1418
void sctp_update_time(f64 now, u8 thread_index)
Definition: sctp.c:935
unreliable transport protos
void sctp_session_close(u32 conn_index, u32 thread_index)
Definition: sctp.c:591
u32 sctp_session_send_space(transport_connection_t *trans_conn)
Compute TX window session is allowed to fill.
Definition: sctp.c:663

Definition at line 944 of file sctp.c.

◆ show_tcp_punt_command

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:1003

(constructor) VLIB_CLI_COMMAND (show_tcp_punt_command)

Definition at line 1017 of file sctp.c.