FD.io VPP  v19.08.1-401-g8e4ed521a
Vector Packet Processing
sctp.h File Reference
+ Include dependency graph for sctp.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  sctp_buffer_opaque_t
 
struct  sctp_options_t
 

Macros

#define sctp_buffer_opaque(b)
 
#define foreach_sctp_timer
 
#define SCTP_TIMER_HANDLE_INVALID   ((u32) ~0)
 
#define sctp_error(n, s)   SCTP_ERROR_##n,
 
#define NO_FLAG   0
 
#define IS_T_BIT_SET(var)   ((var) & (1))
 
#define IS_E_BIT_SET(var)   ((var) & (1))
 
#define IS_B_BIT_SET(var)   ((var) & (1<<1))
 
#define IS_U_BIT_SET(var)   ((var) & (1<<2))
 
#define MAX_SCTP_CONNECTIONS   8
 
#define SCTP_PRIMARY_PATH_IDX   0
 
#define sctp_trajectory_add_start(b, start)
 
#define SCTP_INITIAL_SSHTRESH   65535
 
#define SET_BIT(A, k)   ( A[(k/32)] |= (1 << (k%32)) )
 
#define CLEAR_BIT(A, k)   ( A[(k/32)] &= ~(1 << (k%32)) )
 
#define TEST_BIT(A, k)   ( A[(k/32)] & (1 << (k%32)) )
 
#define ENDIANESS_SWAP(x)   _bytes_swap(&x, sizeof(x));
 
#define MAX_INFLIGHT_PACKETS   128
 
#define MAX_ENQUEABLE_SACKS   2
 
#define SUGGESTED_COOKIE_LIFE_SPAN_INCREMENT   1000
 
#define IP_PROTOCOL_SCTP   132
 
#define foreach_sctp_fsm_state
 SSCTP FSM state definitions as per RFC4960. More...
 
#define SCTP_TICK   0.001
 SCTP tick period (s) More...
 
#define SHZ   (u32) (1/SCTP_TICK)
 SCTP tick frequency. More...
 
#define SCTP_TSTAMP_RESOLUTION   SCTP_TICK
 Time stamp resolution. More...
 
#define SCTP_RTO_INIT   3 * SHZ /* 3 seconds */
 
#define SCTP_RTO_MIN   1 * SHZ /* 1 second */
 
#define SCTP_RTO_MAX   60 * SHZ /* 60 seconds */
 
#define SCTP_RTO_BURST   4
 
#define SCTP_RTO_ALPHA   1/8
 
#define SCTP_RTO_BETA   1/4
 
#define SCTP_VALID_COOKIE_LIFE   60 * SHZ /* 60 seconds */
 
#define SCTP_ASSOCIATION_MAX_RETRANS   10
 
#define SCTP_PATH_MAX_RETRANS   5
 
#define SCTP_MAX_INIT_RETRANS   8
 
#define SCTP_HB_INTERVAL   30 * SHZ
 
#define SCTP_HB_MAX_BURST   1
 
#define SCTP_DATA_IDLE_INTERVAL   15 * SHZ /* 15 seconds; the time-interval after which the connetion is considered IDLE */
 
#define SCTP_TO_TIMER_TICK   SCTP_TICK*10 /* Period for converting from SCTP_TICK */
 
#define SCTP_CONN_RECOVERY   1 << 1
 
#define SCTP_FAST_RECOVERY   1 << 2
 
#define ABS(x)   ((x) > 0) ? (x) : -(x);
 
#define SELECT_MAX_RETRIES   8
 

Typedefs

typedef enum _sctp_timers sctp_timers_e
 
typedef enum _sctp_error sctp_error_t
 
typedef struct _sctp_sub_connection sctp_sub_connection_t
 
typedef struct _sctp_user_configuration sctp_user_configuration_t
 
typedef struct _sctp_connection sctp_connection_t
 
typedef void() sctp_timer_expiration_handler(u32 conn_index, u32 timer_id)
 
typedef enum _sctp_state sctp_state_t
 
typedef struct _sctp_lookup_dispatch sctp_lookup_dispatch_t
 
typedef struct _sctp_main sctp_main_t
 

Functions

 STATIC_ASSERT (sizeof(sctp_buffer_opaque_t)<=STRUCT_SIZE_OF(vnet_buffer_opaque_t, unused), "sctp_buffer_opaque_t too large for vnet_buffer_opaque_t")
 
static char * sctp_timer_to_string (u8 timer_id)
 
sctp_connection_tsctp_connection_new (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_add_ip6 (vlib_main_t *vm, ip6_address_t *lcl_addr, ip6_address_t *rmt_addr)
 
u8 sctp_sub_connection_del_ip4 (ip4_address_t *lcl_addr, ip4_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)
 
void sctp_connection_close (sctp_connection_t *sctp_conn)
 
void sctp_connection_cleanup (sctp_connection_t *sctp_conn)
 Cleans up connection state. More...
 
void sctp_connection_del (sctp_connection_t *sctp_conn)
 
u32 sctp_push_header (transport_connection_t *tconn, vlib_buffer_t *b)
 
void sctp_send_init (sctp_connection_t *sctp_conn)
 
void sctp_send_cookie_echo (sctp_connection_t *sctp_conn)
 
void sctp_send_shutdown (sctp_connection_t *sctp_conn)
 
void sctp_send_shutdown_ack (sctp_connection_t *sctp_conn, u8 idx, vlib_buffer_t *b)
 
void sctp_send_shutdown_complete (sctp_connection_t *sctp_conn, u8 idx, vlib_buffer_t *b0)
 
void sctp_send_heartbeat (sctp_connection_t *sctp_conn)
 
void sctp_data_retransmit (sctp_connection_t *sctp_conn)
 
void sctp_flush_frame_to_output (vlib_main_t *vm, u8 thread_index, u8 is_ip4)
 Flush tx frame populated by retransmits and timer pops. More...
 
void sctp_flush_frames_to_output (u8 thread_index)
 Flush v4 and v6 sctp and ip-lookup tx frames for thread index. More...
 
void sctp_punt_unknown (vlib_main_t *vm, u8 is_ip4, u8 is_add)
 
u8format_sctp_connection_id (u8 *s, va_list *args)
 
u8format_sctp_connection (u8 *s, va_list *args)
 
u8format_sctp_scoreboard (u8 *s, va_list *args)
 
u8format_sctp_header (u8 *s, va_list *args)
 
u8format_sctp_tx_trace (u8 *s, va_list *args)
 
clib_error_tsctp_init (vlib_main_t *vm)
 
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...
 
void sctp_init_snd_vars (sctp_connection_t *sctp_conn)
 Initialize connection send variables. More...
 
void sctp_init_mss (sctp_connection_t *sctp_conn)
 
void sctp_prepare_initack_chunk (sctp_connection_t *sctp_conn, u8 idx, vlib_buffer_t *b, ip4_address_t *ip4_addr, u8 add_ip4, ip6_address_t *ip6_addr, u8 add_ip6)
 Convert buffer to INIT-ACK. More...
 
void sctp_prepare_initack_chunk_for_collision (sctp_connection_t *sctp_conn, u8 idx, vlib_buffer_t *b, ip4_address_t *ip4_addr, ip6_address_t *ip6_addr)
 Convert buffer to INIT-ACK. More...
 
void sctp_prepare_abort_for_collision (sctp_connection_t *sctp_conn, u8 idx, vlib_buffer_t *b, ip4_address_t *ip4_addr, ip6_address_t *ip6_addr)
 Convert buffer to ABORT. More...
 
void sctp_prepare_operation_error (sctp_connection_t *sctp_conn, u8 idx, vlib_buffer_t *b, u8 err_cause)
 Convert buffer to ERROR. More...
 
void sctp_prepare_cookie_echo_chunk (sctp_connection_t *sctp_conn, u8 idx, vlib_buffer_t *b, u8 reuse_buffer)
 
void sctp_prepare_cookie_ack_chunk (sctp_connection_t *sctp_conn, u8 idx, vlib_buffer_t *b)
 
void sctp_prepare_sack_chunk (sctp_connection_t *sctp_conn, u8 idx, vlib_buffer_t *b)
 Convert buffer to SACK. More...
 
void sctp_prepare_heartbeat_ack_chunk (sctp_connection_t *sctp_conn, u8 idx, vlib_buffer_t *b)
 Convert buffer to HEARTBEAT_ACK. More...
 
u16 sctp_check_outstanding_data_chunks (sctp_connection_t *sctp_conn)
 
void sctp_api_reference (void)
 
static char * sctp_state_to_string (u8 state)
 
static char * sctp_chunk_to_string (u8 type)
 
static char * sctp_optparam_type_to_string (u8 type)
 
static sctp_main_tvnet_get_sctp_main ()
 
static sctp_header_tsctp_buffer_hdr (vlib_buffer_t *b)
 
clib_error_tvnet_sctp_enable_disable (vlib_main_t *vm, u8 is_en)
 
clib_error_tsctp_plugin_api_hookup (vlib_main_t *vm)
 
static sctp_connection_tsctp_half_open_connection_get (u32 conn_index)
 
static void sctp_half_open_connection_del (sctp_connection_t *tc)
 Cleanup half-open connection. More...
 
static u64 sctp_set_time_now (u32 thread_index)
 
static void sctp_timer_set (sctp_connection_t *tc, u8 conn_idx, u8 timer_id, u32 interval)
 
static void sctp_timer_reset (sctp_connection_t *tc, u8 conn_idx, u8 timer_id)
 
static int sctp_half_open_connection_cleanup (sctp_connection_t *tc)
 Try to cleanup half-open connection. More...
 
static u32 sctp_header_bytes ()
 
static sctp_connection_tsctp_get_connection_from_transport (transport_connection_t *tconn)
 
static u64 sctp_time_now (void)
 
static void sctp_calculate_rto (sctp_connection_t *sctp_conn, u8 conn_idx)
 
static void sctp_timer_update (sctp_connection_t *tc, u8 conn_idx, u8 timer_id, u32 interval)
 
static sctp_connection_tsctp_listener_get (u32 tli)
 
static sctp_connection_tsctp_connection_get (u32 conn_index, u32 thread_index)
 
static u8 sctp_data_subconn_select (sctp_connection_t *sctp_conn)
 
static u8 sctp_sub_conn_id_via_ip6h (sctp_connection_t *sctp_conn, ip6_header_t *ip6h)
 
static u8 sctp_sub_conn_id_via_ip4h (sctp_connection_t *sctp_conn, ip4_header_t *ip4h)
 
static void * vlib_buffer_push_sctp_net_order (vlib_buffer_t *b, u16 sp, u16 dp, u8 sctp_hdr_opts_len)
 Push SCTP header to buffer. More...
 
static void * vlib_buffer_push_sctp (vlib_buffer_t *b, u16 sp_net, u16 dp_net, u8 sctp_hdr_opts_len)
 Push SCTP header to buffer. More...
 
static u8 sctp_next_avail_subconn (sctp_connection_t *sctp_conn)
 
static void update_smallest_pmtu_idx (sctp_connection_t *sctp_conn)
 
static void sctp_init_cwnd (sctp_connection_t *sctp_conn)
 
static u8 sctp_in_cong_recovery (sctp_connection_t *sctp_conn, u8 idx)
 
static u8 cwnd_fully_utilized (sctp_connection_t *sctp_conn, u8 idx)
 
static void update_cwnd (sctp_connection_t *sctp_conn)
 

Variables

format_function_t format_sctp_state
 
unformat_function_t unformat_pg_sctp_header
 
sctp_main_t sctp_main
 
vlib_node_registration_t sctp4_input_node
 (constructor) VLIB_REGISTER_NODE (sctp4_input_node) More...
 
vlib_node_registration_t sctp6_input_node
 (constructor) VLIB_REGISTER_NODE (sctp6_input_node) More...
 
vlib_node_registration_t sctp4_output_node
 (constructor) VLIB_REGISTER_NODE (sctp4_output_node) More...
 
vlib_node_registration_t sctp6_output_node
 (constructor) VLIB_REGISTER_NODE (sctp6_output_node) More...
 

Macro Definition Documentation

◆ ABS

#define ABS (   x)    ((x) > 0) ? (x) : -(x);

Definition at line 707 of file sctp.h.

◆ CLEAR_BIT

#define CLEAR_BIT (   A,
 
)    ( A[(k/32)] &= ~(1 << (k%32)) )

Definition at line 185 of file sctp.h.

◆ ENDIANESS_SWAP

#define ENDIANESS_SWAP (   x)    _bytes_swap(&x, sizeof(x));

Definition at line 201 of file sctp.h.

◆ foreach_sctp_fsm_state

#define foreach_sctp_fsm_state
Value:
_(CLOSED, "CLOSED") \
_(COOKIE_WAIT, "COOKIE_WAIT") \
_(COOKIE_ECHOED, "COOKIE_ECHOED") \
_(ESTABLISHED, "ESTABLISHED") \
_(SHUTDOWN_PENDING, "SHUTDOWN_PENDING") \
_(SHUTDOWN_SENT, "SHUTDOWN_SENT") \
_(SHUTDOWN_RECEIVED, "SHUTDOWN_RECEIVED") \
_(SHUTDOWN_ACK_SENT, "SHUTDOWN_ACK_SENT")

SSCTP FSM state definitions as per RFC4960.

Definition at line 373 of file sctp.h.

◆ foreach_sctp_timer

#define foreach_sctp_timer
Value:
_(T1_INIT, "T1_INIT") \
_(T1_COOKIE, "T1_COOKIE") \
_(T2_SHUTDOWN, "T2_SHUTDOWN") \
_(T3_RXTX, "T3_RXTX") \
_(T4_HEARTBEAT, "T4_HB") \
_(T5_SHUTDOWN_GUARD, "T5_SHUTDOWN_GUARD")

Definition at line 52 of file sctp.h.

◆ IP_PROTOCOL_SCTP

#define IP_PROTOCOL_SCTP   132

Definition at line 370 of file sctp.h.

◆ IS_B_BIT_SET

#define IS_B_BIT_SET (   var)    ((var) & (1<<1))

Definition at line 103 of file sctp.h.

◆ IS_E_BIT_SET

#define IS_E_BIT_SET (   var)    ((var) & (1))

Definition at line 102 of file sctp.h.

◆ IS_T_BIT_SET

#define IS_T_BIT_SET (   var)    ((var) & (1))

Definition at line 101 of file sctp.h.

◆ IS_U_BIT_SET

#define IS_U_BIT_SET (   var)    ((var) & (1<<2))

Definition at line 104 of file sctp.h.

◆ MAX_ENQUEABLE_SACKS

#define MAX_ENQUEABLE_SACKS   2

Definition at line 204 of file sctp.h.

◆ MAX_INFLIGHT_PACKETS

#define MAX_INFLIGHT_PACKETS   128

Definition at line 203 of file sctp.h.

◆ MAX_SCTP_CONNECTIONS

#define MAX_SCTP_CONNECTIONS   8

Definition at line 106 of file sctp.h.

◆ NO_FLAG

#define NO_FLAG   0

Definition at line 99 of file sctp.h.

◆ SCTP_ASSOCIATION_MAX_RETRANS

#define SCTP_ASSOCIATION_MAX_RETRANS   10

Definition at line 490 of file sctp.h.

◆ sctp_buffer_opaque

#define sctp_buffer_opaque (   b)
Value:
((sctp_buffer_opaque_t *)((u8 *)((b)->opaque) + \
STRUCT_OFFSET_OF (vnet_buffer_opaque_t, unused)))
unsigned char u8
Definition: types.h:56

Definition at line 46 of file sctp.h.

◆ SCTP_CONN_RECOVERY

#define SCTP_CONN_RECOVERY   1 << 1

Definition at line 498 of file sctp.h.

◆ SCTP_DATA_IDLE_INTERVAL

#define SCTP_DATA_IDLE_INTERVAL   15 * SHZ /* 15 seconds; the time-interval after which the connetion is considered IDLE */

Definition at line 495 of file sctp.h.

◆ sctp_error

#define sctp_error (   n,
 
)    SCTP_ERROR_##n,

Definition at line 93 of file sctp.h.

◆ SCTP_FAST_RECOVERY

#define SCTP_FAST_RECOVERY   1 << 2

Definition at line 499 of file sctp.h.

◆ SCTP_HB_INTERVAL

#define SCTP_HB_INTERVAL   30 * SHZ

Definition at line 493 of file sctp.h.

◆ SCTP_HB_MAX_BURST

#define SCTP_HB_MAX_BURST   1

Definition at line 494 of file sctp.h.

◆ SCTP_INITIAL_SSHTRESH

#define SCTP_INITIAL_SSHTRESH   65535

Definition at line 127 of file sctp.h.

◆ SCTP_MAX_INIT_RETRANS

#define SCTP_MAX_INIT_RETRANS   8

Definition at line 492 of file sctp.h.

◆ SCTP_PATH_MAX_RETRANS

#define SCTP_PATH_MAX_RETRANS   5

Definition at line 491 of file sctp.h.

◆ SCTP_PRIMARY_PATH_IDX

#define SCTP_PRIMARY_PATH_IDX   0

Definition at line 107 of file sctp.h.

◆ SCTP_RTO_ALPHA

#define SCTP_RTO_ALPHA   1/8

Definition at line 487 of file sctp.h.

◆ SCTP_RTO_BETA

#define SCTP_RTO_BETA   1/4

Definition at line 488 of file sctp.h.

◆ SCTP_RTO_BURST

#define SCTP_RTO_BURST   4

Definition at line 486 of file sctp.h.

◆ SCTP_RTO_INIT

#define SCTP_RTO_INIT   3 * SHZ /* 3 seconds */

Definition at line 483 of file sctp.h.

◆ SCTP_RTO_MAX

#define SCTP_RTO_MAX   60 * SHZ /* 60 seconds */

Definition at line 485 of file sctp.h.

◆ SCTP_RTO_MIN

#define SCTP_RTO_MIN   1 * SHZ /* 1 second */

Definition at line 484 of file sctp.h.

◆ SCTP_TICK

#define SCTP_TICK   0.001

SCTP tick period (s)

Definition at line 478 of file sctp.h.

◆ SCTP_TIMER_HANDLE_INVALID

#define SCTP_TIMER_HANDLE_INVALID   ((u32) ~0)

Definition at line 68 of file sctp.h.

◆ SCTP_TO_TIMER_TICK

#define SCTP_TO_TIMER_TICK   SCTP_TICK*10 /* Period for converting from SCTP_TICK */

Definition at line 496 of file sctp.h.

◆ sctp_trajectory_add_start

#define sctp_trajectory_add_start (   b,
  start 
)

Definition at line 115 of file sctp.h.

◆ SCTP_TSTAMP_RESOLUTION

#define SCTP_TSTAMP_RESOLUTION   SCTP_TICK

Time stamp resolution.

Definition at line 480 of file sctp.h.

◆ SCTP_VALID_COOKIE_LIFE

#define SCTP_VALID_COOKIE_LIFE   60 * SHZ /* 60 seconds */

Definition at line 489 of file sctp.h.

◆ SELECT_MAX_RETRIES

#define SELECT_MAX_RETRIES   8

Definition at line 796 of file sctp.h.

◆ SET_BIT

#define SET_BIT (   A,
 
)    ( A[(k/32)] |= (1 << (k%32)) )

Definition at line 184 of file sctp.h.

◆ SHZ

#define SHZ   (u32) (1/SCTP_TICK)

SCTP tick frequency.

Definition at line 479 of file sctp.h.

◆ SUGGESTED_COOKIE_LIFE_SPAN_INCREMENT

#define SUGGESTED_COOKIE_LIFE_SPAN_INCREMENT   1000

Definition at line 210 of file sctp.h.

◆ TEST_BIT

#define TEST_BIT (   A,
 
)    ( A[(k/32)] & (1 << (k%32)) )

Definition at line 186 of file sctp.h.

Typedef Documentation

◆ sctp_connection_t

typedef struct _sctp_connection sctp_connection_t

◆ sctp_error_t

typedef enum _sctp_error sctp_error_t

◆ sctp_lookup_dispatch_t

typedef struct _sctp_lookup_dispatch sctp_lookup_dispatch_t

◆ sctp_main_t

typedef struct _sctp_main sctp_main_t

◆ sctp_state_t

typedef enum _sctp_state sctp_state_t

◆ sctp_sub_connection_t

typedef struct _sctp_sub_connection sctp_sub_connection_t

◆ sctp_timer_expiration_handler

typedef void() sctp_timer_expiration_handler(u32 conn_index, u32 timer_id)

Definition at line 285 of file sctp.h.

◆ sctp_timers_e

typedef enum _sctp_timers sctp_timers_e

◆ sctp_user_configuration_t

typedef struct _sctp_user_configuration sctp_user_configuration_t

Function Documentation

◆ cwnd_fully_utilized()

static u8 cwnd_fully_utilized ( sctp_connection_t sctp_conn,
u8  idx 
)
inlinestatic

Definition at line 959 of file sctp.h.

+ Here is the caller graph for this function:

◆ format_sctp_connection()

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:

◆ format_sctp_connection_id()

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:

◆ format_sctp_header()

u8* format_sctp_header ( u8 s,
va_list *  args 
)

Definition at line 20 of file sctp_format.c.

+ Here is the caller graph for this function:

◆ format_sctp_scoreboard()

u8* format_sctp_scoreboard ( u8 s,
va_list *  args 
)

◆ format_sctp_tx_trace()

u8* format_sctp_tx_trace ( u8 s,
va_list *  args 
)

Definition at line 26 of file sctp_format.c.

◆ sctp_api_reference()

void sctp_api_reference ( void  )

◆ sctp_buffer_hdr()

static sctp_header_t* sctp_buffer_hdr ( vlib_buffer_t b)
inlinestatic

Definition at line 580 of file sctp.h.

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

◆ sctp_calculate_rto()

static void sctp_calculate_rto ( sctp_connection_t sctp_conn,
u8  conn_idx 
)
inlinestatic

Definition at line 710 of file sctp.h.

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

+ Here is the caller graph for this function:

◆ sctp_chunk_to_string()

static char* sctp_chunk_to_string ( u8  type)
inlinestatic

Definition at line 417 of file sctp.h.

+ Here is the caller graph for this function:

◆ sctp_configure()

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:

◆ sctp_connection_cleanup()

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:

◆ sctp_connection_close()

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_del()

void sctp_connection_del ( sctp_connection_t sctp_conn)

◆ sctp_connection_get()

static sctp_connection_t* sctp_connection_get ( u32  conn_index,
u32  thread_index 
)
inlinestatic

Definition at line 788 of file sctp.h.

+ Here is the caller graph for this function:

◆ sctp_connection_new()

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:

◆ sctp_connection_timers_init()

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:

◆ sctp_connection_timers_reset()

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:

◆ sctp_data_retransmit()

void sctp_data_retransmit ( sctp_connection_t sctp_conn)

Definition at line 1493 of file sctp_output.c.

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

◆ sctp_data_subconn_select()

static u8 sctp_data_subconn_select ( sctp_connection_t sctp_conn)
inlinestatic

Definition at line 799 of file sctp.h.

+ Here is the caller graph for this function:

◆ sctp_flush_frame_to_output()

void sctp_flush_frame_to_output ( vlib_main_t vm,
u8  thread_index,
u8  is_ip4 
)

Flush tx frame populated by retransmits and timer pops.

Definition at line 24 of file sctp_output.c.

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

◆ sctp_flush_frames_to_output()

void sctp_flush_frames_to_output ( u8  thread_index)

Flush v4 and v6 sctp and ip-lookup tx frames for thread index.

Definition at line 57 of file sctp_output.c.

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

◆ sctp_get_connection_from_transport()

static sctp_connection_t* sctp_get_connection_from_transport ( transport_connection_t tconn)
inlinestatic

Definition at line 683 of file sctp.h.

+ Here is the caller graph for this function:

◆ sctp_half_open_connection_cleanup()

static int sctp_half_open_connection_cleanup ( sctp_connection_t tc)
inlinestatic

Try to cleanup half-open connection.

If called from a thread that doesn't own tc, the call won't have any effect.

Parameters
tc- connection to be cleaned up
Returns
non-zero if cleanup failed.

Definition at line 665 of file sctp.h.

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

◆ sctp_half_open_connection_del()

static void sctp_half_open_connection_del ( sctp_connection_t tc)
inlinestatic

Cleanup half-open connection.

Definition at line 607 of file sctp.h.

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

◆ sctp_half_open_connection_get()

static sctp_connection_t* sctp_half_open_connection_get ( u32  conn_index)
inlinestatic

Definition at line 591 of file sctp.h.

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

◆ sctp_header_bytes()

static u32 sctp_header_bytes ( )
inlinestatic

Definition at line 677 of file sctp.h.

+ Here is the caller graph for this function:

◆ sctp_in_cong_recovery()

static u8 sctp_in_cong_recovery ( sctp_connection_t sctp_conn,
u8  idx 
)
inlinestatic

Definition at line 953 of file sctp.h.

+ Here is the caller graph for this function:

◆ sctp_init()

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:

◆ sctp_init_cwnd()

static void sctp_init_cwnd ( sctp_connection_t sctp_conn)
inlinestatic

Definition at line 934 of file sctp.h.

+ Here is the caller graph for this function:

◆ sctp_init_mss()

void sctp_init_mss ( sctp_connection_t sctp_conn)

◆ sctp_init_snd_vars()

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:

◆ sctp_listener_get()

static sctp_connection_t* sctp_listener_get ( u32  tli)
inlinestatic

Definition at line 780 of file sctp.h.

+ Here is the caller graph for this function:

◆ sctp_next_avail_subconn()

static u8 sctp_next_avail_subconn ( sctp_connection_t sctp_conn)
inlinestatic

Definition at line 901 of file sctp.h.

+ Here is the caller graph for this function:

◆ sctp_optparam_type_to_string()

static char* sctp_optparam_type_to_string ( u8  type)
inlinestatic

Definition at line 456 of file sctp.h.

◆ sctp_plugin_api_hookup()

clib_error_t* sctp_plugin_api_hookup ( vlib_main_t vm)

Definition at line 119 of file sctp_api.c.

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

◆ sctp_prepare_abort_for_collision()

void sctp_prepare_abort_for_collision ( sctp_connection_t sctp_conn,
u8  idx,
vlib_buffer_t b,
ip4_address_t ip4_addr,
ip6_address_t ip6_addr 
)

Convert buffer to ABORT.

Definition at line 659 of file sctp_output.c.

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

◆ sctp_prepare_cookie_ack_chunk()

void sctp_prepare_cookie_ack_chunk ( sctp_connection_t sctp_conn,
u8  idx,
vlib_buffer_t b 
)

Definition at line 497 of file sctp_output.c.

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

◆ sctp_prepare_cookie_echo_chunk()

void sctp_prepare_cookie_echo_chunk ( sctp_connection_t sctp_conn,
u8  idx,
vlib_buffer_t b,
u8  reuse_buffer 
)

Definition at line 531 of file sctp_output.c.

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

◆ sctp_prepare_heartbeat_ack_chunk()

void sctp_prepare_heartbeat_ack_chunk ( sctp_connection_t sctp_conn,
u8  idx,
vlib_buffer_t b 
)

Convert buffer to HEARTBEAT_ACK.

Definition at line 1132 of file sctp_output.c.

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

◆ sctp_prepare_initack_chunk()

void sctp_prepare_initack_chunk ( sctp_connection_t sctp_conn,
u8  idx,
vlib_buffer_t b,
ip4_address_t ip4_addr,
u8  add_ip4,
ip6_address_t ip6_addr,
u8  add_ip6 
)

Convert buffer to INIT-ACK.

Definition at line 840 of file sctp_output.c.

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

◆ sctp_prepare_initack_chunk_for_collision()

void sctp_prepare_initack_chunk_for_collision ( sctp_connection_t sctp_conn,
u8  idx,
vlib_buffer_t b,
ip4_address_t ip4_addr,
ip6_address_t ip6_addr 
)

Convert buffer to INIT-ACK.

Definition at line 700 of file sctp_output.c.

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

◆ sctp_prepare_operation_error()

void sctp_prepare_operation_error ( sctp_connection_t sctp_conn,
u8  idx,
vlib_buffer_t b,
u8  err_cause 
)

Convert buffer to ERROR.

Definition at line 614 of file sctp_output.c.

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

◆ sctp_prepare_sack_chunk()

void sctp_prepare_sack_chunk ( sctp_connection_t sctp_conn,
u8  idx,
vlib_buffer_t b 
)

Convert buffer to SACK.

Definition at line 1094 of file sctp_output.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 101 of file sctp.c.

◆ sctp_push_header()

u32 sctp_push_header ( transport_connection_t tconn,
vlib_buffer_t b 
)

Definition at line 1419 of file sctp_output.c.

+ Here is the call graph for this function:

◆ sctp_send_cookie_echo()

void sctp_send_cookie_echo ( sctp_connection_t sctp_conn)

Definition at line 569 of file sctp_output.c.

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

◆ sctp_send_heartbeat()

void sctp_send_heartbeat ( sctp_connection_t sctp_conn)

Definition at line 1203 of file sctp_output.c.

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

◆ sctp_send_init()

void sctp_send_init ( sctp_connection_t sctp_conn)

Definition at line 1285 of file sctp_output.c.

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

◆ sctp_send_shutdown()

void sctp_send_shutdown ( sctp_connection_t sctp_conn)

Definition at line 1019 of file sctp_output.c.

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

◆ sctp_send_shutdown_ack()

void sctp_send_shutdown_ack ( sctp_connection_t sctp_conn,
u8  idx,
vlib_buffer_t b 
)

Definition at line 1077 of file sctp_output.c.

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

◆ sctp_send_shutdown_complete()

void sctp_send_shutdown_complete ( sctp_connection_t sctp_conn,
u8  idx,
vlib_buffer_t b0 
)

Definition at line 1268 of file sctp_output.c.

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

◆ sctp_set_time_now()

static u64 sctp_set_time_now ( u32  thread_index)
inlinestatic

Definition at line 619 of file sctp.h.

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

◆ sctp_state_to_string()

static char* sctp_state_to_string ( u8  state)
inlinestatic

Definition at line 392 of file sctp.h.

+ Here is the caller graph for this function:

◆ sctp_sub_conn_id_via_ip4h()

static u8 sctp_sub_conn_id_via_ip4h ( sctp_connection_t sctp_conn,
ip4_header_t ip4h 
)
inlinestatic

Definition at line 840 of file sctp.h.

+ Here is the caller graph for this function:

◆ sctp_sub_conn_id_via_ip6h()

static u8 sctp_sub_conn_id_via_ip6h ( sctp_connection_t sctp_conn,
ip6_header_t ip6h 
)
inlinestatic

Definition at line 818 of file sctp.h.

+ 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 299 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 356 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 322 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 379 of file sctp.c.

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

◆ sctp_time_now()

static u64 sctp_time_now ( void  )
inlinestatic

Definition at line 702 of file sctp.h.

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

◆ sctp_timer_reset()

static void sctp_timer_reset ( sctp_connection_t tc,
u8  conn_idx,
u8  timer_id 
)
inlinestatic

Definition at line 642 of file sctp.h.

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

◆ sctp_timer_set()

static void sctp_timer_set ( sctp_connection_t tc,
u8  conn_idx,
u8  timer_id,
u32  interval 
)
inlinestatic

Definition at line 627 of file sctp.h.

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

◆ sctp_timer_to_string()

static char* sctp_timer_to_string ( u8  timer_id)
inlinestatic

Definition at line 71 of file sctp.h.

+ Here is the caller graph for this function:

◆ sctp_timer_update()

static void sctp_timer_update ( sctp_connection_t tc,
u8  conn_idx,
u8  timer_id,
u32  interval 
)
inlinestatic

Definition at line 763 of file sctp.h.

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

◆ STATIC_ASSERT()

STATIC_ASSERT ( sizeof(sctp_buffer_opaque_t)<=STRUCT_SIZE_OF(vnet_buffer_opaque_t, unused)  ,
"sctp_buffer_opaque_t too large for vnet_buffer_opaque_t  
)

◆ update_cwnd()

static void update_cwnd ( sctp_connection_t sctp_conn)
inlinestatic

Definition at line 968 of file sctp.h.

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

◆ update_smallest_pmtu_idx()

static void update_smallest_pmtu_idx ( sctp_connection_t sctp_conn)
inlinestatic

Definition at line 914 of file sctp.h.

+ Here is the caller graph for this function:

◆ vlib_buffer_push_sctp()

static void* vlib_buffer_push_sctp ( vlib_buffer_t b,
u16  sp_net,
u16  dp_net,
u8  sctp_hdr_opts_len 
)
inlinestatic

Push SCTP header to buffer.

Parameters
b- buffer to write the header to
sp_net- source port net order
dp_net- destination port net order
sctp_hdr_opts_len- header and options length in bytes
Returns
- pointer to start of SCTP header

Definition at line 893 of file sctp.h.

+ Here is the call graph for this function:

◆ vlib_buffer_push_sctp_net_order()

static void* vlib_buffer_push_sctp_net_order ( vlib_buffer_t b,
u16  sp,
u16  dp,
u8  sctp_hdr_opts_len 
)
inlinestatic

Push SCTP header to buffer.

Parameters
vm- vlib_main
b- buffer to write the header to
sp_net- source port net order
dp_net- destination port net order
sctp_hdr_opts_len- header and options length in bytes
Returns
- pointer to start of SCTP header

Definition at line 869 of file sctp.h.

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

◆ vnet_get_sctp_main()

static sctp_main_t* vnet_get_sctp_main ( )
inlinestatic

Definition at line 574 of file sctp.h.

+ Here is the caller graph for this function:

◆ vnet_sctp_enable_disable()

clib_error_t* vnet_sctp_enable_disable ( vlib_main_t vm,
u8  is_en 
)
+ Here is the caller graph for this function:

Variable Documentation

◆ format_sctp_state

format_function_t format_sctp_state

Definition at line 328 of file sctp.h.

◆ sctp4_input_node

vlib_node_registration_t sctp4_input_node

(constructor) VLIB_REGISTER_NODE (sctp4_input_node)

Definition at line 2281 of file sctp_input.c.

◆ sctp4_output_node

vlib_node_registration_t sctp4_output_node

(constructor) VLIB_REGISTER_NODE (sctp4_output_node)

Definition at line 354 of file sctp_output_node.c.

◆ sctp6_input_node

vlib_node_registration_t sctp6_input_node

(constructor) VLIB_REGISTER_NODE (sctp6_input_node)

Definition at line 2301 of file sctp_input.c.

◆ sctp6_output_node

vlib_node_registration_t sctp6_output_node

(constructor) VLIB_REGISTER_NODE (sctp6_output_node)

Definition at line 373 of file sctp_output_node.c.

◆ sctp_main

sctp_main_t sctp_main

Definition at line 22 of file sctp.c.

◆ unformat_pg_sctp_header

unformat_function_t unformat_pg_sctp_header

Definition at line 335 of file sctp.h.