FD.io VPP  v18.11-rc0-18-g2a3fb1a
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_options_t
 

Macros

#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 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)
 
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 u32 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 u32 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
 
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

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

Definition at line 674 of file sctp.h.

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

Definition at line 159 of file sctp.h.

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

Definition at line 175 of file sctp.h.

#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 346 of file sctp.h.

#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 26 of file sctp.h.

#define IP_PROTOCOL_SCTP   132

Definition at line 343 of file sctp.h.

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

Definition at line 77 of file sctp.h.

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

Definition at line 76 of file sctp.h.

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

Definition at line 75 of file sctp.h.

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

Definition at line 78 of file sctp.h.

#define MAX_ENQUEABLE_SACKS   2

Definition at line 178 of file sctp.h.

#define MAX_INFLIGHT_PACKETS   128

Definition at line 177 of file sctp.h.

#define MAX_SCTP_CONNECTIONS   8

Definition at line 80 of file sctp.h.

#define NO_FLAG   0

Definition at line 73 of file sctp.h.

#define SCTP_ASSOCIATION_MAX_RETRANS   10

Definition at line 463 of file sctp.h.

#define SCTP_CONN_RECOVERY   1 << 1

Definition at line 471 of file sctp.h.

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

Definition at line 468 of file sctp.h.

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

Definition at line 67 of file sctp.h.

#define SCTP_FAST_RECOVERY   1 << 2

Definition at line 472 of file sctp.h.

#define SCTP_HB_INTERVAL   30 * SHZ

Definition at line 466 of file sctp.h.

#define SCTP_HB_MAX_BURST   1

Definition at line 467 of file sctp.h.

#define SCTP_INITIAL_SSHTRESH   65535

Definition at line 101 of file sctp.h.

#define SCTP_MAX_INIT_RETRANS   8

Definition at line 465 of file sctp.h.

#define SCTP_PATH_MAX_RETRANS   5

Definition at line 464 of file sctp.h.

#define SCTP_PRIMARY_PATH_IDX   0

Definition at line 81 of file sctp.h.

#define SCTP_RTO_ALPHA   1/8

Definition at line 460 of file sctp.h.

#define SCTP_RTO_BETA   1/4

Definition at line 461 of file sctp.h.

#define SCTP_RTO_BURST   4

Definition at line 459 of file sctp.h.

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

Definition at line 456 of file sctp.h.

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

Definition at line 458 of file sctp.h.

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

Definition at line 457 of file sctp.h.

#define SCTP_TICK   0.001

SCTP tick period (s)

Definition at line 451 of file sctp.h.

#define SCTP_TIMER_HANDLE_INVALID   ((u32) ~0)

Definition at line 42 of file sctp.h.

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

Definition at line 469 of file sctp.h.

#define sctp_trajectory_add_start (   b,
  start 
)

Definition at line 89 of file sctp.h.

#define SCTP_TSTAMP_RESOLUTION   SCTP_TICK

Time stamp resolution.

Definition at line 453 of file sctp.h.

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

Definition at line 462 of file sctp.h.

#define SELECT_MAX_RETRIES   8

Definition at line 763 of file sctp.h.

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

Definition at line 158 of file sctp.h.

#define SHZ   (u32) (1/SCTP_TICK)

SCTP tick frequency.

Definition at line 452 of file sctp.h.

#define SUGGESTED_COOKIE_LIFE_SPAN_INCREMENT   1000

Definition at line 184 of file sctp.h.

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

Definition at line 160 of file sctp.h.

Typedef Documentation

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

Definition at line 259 of file sctp.h.

typedef enum _sctp_timers sctp_timers_e
typedef struct _sctp_user_configuration sctp_user_configuration_t

Function Documentation

static u8 cwnd_fully_utilized ( sctp_connection_t sctp_conn,
u8  idx 
)
inlinestatic

Definition at line 926 of file sctp.h.

+ Here is the caller graph for this function:

u8* format_sctp_connection ( u8 s,
va_list *  args 
)

Definition at line 230 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 186 of file sctp.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8* format_sctp_header ( u8 s,
va_list *  args 
)

Definition at line 20 of file sctp_format.c.

u8* format_sctp_scoreboard ( u8 s,
va_list *  args 
)
u8* format_sctp_tx_trace ( u8 s,
va_list *  args 
)

Definition at line 26 of file sctp_format.c.

void sctp_api_reference ( void  )

Definition at line 137 of file sctp_api.c.

+ Here is the caller graph for this function:

static sctp_header_t* sctp_buffer_hdr ( vlib_buffer_t b)
inlinestatic

Definition at line 548 of file sctp.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void sctp_calculate_rto ( sctp_connection_t sctp_conn,
u8  conn_idx 
)
inlinestatic

Definition at line 677 of file sctp.h.

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

+ Here is the caller graph for this function:

static char* sctp_chunk_to_string ( u8  type)
inlinestatic

Definition at line 390 of file sctp.h.

+ Here is the caller graph for this function:

u8 sctp_configure ( sctp_user_configuration_t  config)

Definition at line 406 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 521 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 573 of file sctp.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void sctp_connection_del ( sctp_connection_t sctp_conn)
static sctp_connection_t* sctp_connection_get ( u32  conn_index,
u32  thread_index 
)
inlinestatic

Definition at line 755 of file sctp.h.

+ Here is the caller graph for this function:

sctp_connection_t* sctp_connection_new ( u8  thread_index)

Definition at line 421 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 137 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 157 of file sctp.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void sctp_data_retransmit ( sctp_connection_t sctp_conn)

Definition at line 1515 of file sctp_output.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u8 sctp_data_subconn_select ( sctp_connection_t sctp_conn)
inlinestatic

Definition at line 766 of file sctp.h.

+ Here is the caller graph for this function:

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 54 of file sctp_output.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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 87 of file sctp_output.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static sctp_connection_t* sctp_get_connection_from_transport ( transport_connection_t tconn)
inlinestatic

Definition at line 650 of file sctp.h.

+ Here is the caller graph for this function:

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 632 of file sctp.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void sctp_half_open_connection_del ( sctp_connection_t tc)
inlinestatic

Cleanup half-open connection.

Definition at line 574 of file sctp.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static sctp_connection_t* sctp_half_open_connection_get ( u32  conn_index)
inlinestatic

Definition at line 558 of file sctp.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u32 sctp_header_bytes ( )
inlinestatic

Definition at line 644 of file sctp.h.

+ Here is the caller graph for this function:

static u8 sctp_in_cong_recovery ( sctp_connection_t sctp_conn,
u8  idx 
)
inlinestatic

Definition at line 920 of file sctp.h.

+ Here is the caller graph for this function:

clib_error_t* sctp_init ( vlib_main_t vm)

Definition at line 963 of file sctp.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void sctp_init_cwnd ( sctp_connection_t sctp_conn)
inlinestatic

Definition at line 901 of file sctp.h.

+ Here is the caller graph for this function:

void sctp_init_mss ( sctp_connection_t sctp_conn)
void sctp_init_snd_vars ( sctp_connection_t sctp_conn)

Initialize connection send variables.

Definition at line 250 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_listener_get ( u32  tli)
inlinestatic

Definition at line 747 of file sctp.h.

+ Here is the caller graph for this function:

static u8 sctp_next_avail_subconn ( sctp_connection_t sctp_conn)
inlinestatic

Definition at line 868 of file sctp.h.

+ Here is the caller graph for this function:

static char* sctp_optparam_type_to_string ( u8  type)
inlinestatic

Definition at line 429 of file sctp.h.

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 690 of file sctp_output.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 528 of file sctp_output.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 562 of file sctp_output.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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 1163 of file sctp_output.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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 871 of file sctp_output.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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 731 of file sctp_output.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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 645 of file sctp_output.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Convert buffer to SACK.

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

+ Here is the caller graph for this function:

u32 sctp_push_header ( transport_connection_t tconn,
vlib_buffer_t b 
)

Definition at line 1441 of file sctp_output.c.

+ Here is the call graph for this function:

void sctp_send_cookie_echo ( sctp_connection_t sctp_conn)

Definition at line 600 of file sctp_output.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void sctp_send_heartbeat ( sctp_connection_t sctp_conn)

Definition at line 1234 of file sctp_output.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void sctp_send_init ( sctp_connection_t sctp_conn)

Definition at line 1316 of file sctp_output.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void sctp_send_shutdown ( sctp_connection_t sctp_conn)

Definition at line 1050 of file sctp_output.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 1108 of file sctp_output.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 1299 of file sctp_output.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u32 sctp_set_time_now ( u32  thread_index)
inlinestatic

Definition at line 586 of file sctp.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static char* sctp_state_to_string ( u8  state)
inlinestatic

Definition at line 365 of file sctp.h.

+ Here is the caller graph for this function:

static u8 sctp_sub_conn_id_via_ip4h ( sctp_connection_t sctp_conn,
ip4_header_t ip4h 
)
inlinestatic

Definition at line 807 of file sctp.h.

+ Here is the caller graph for this function:

static u8 sctp_sub_conn_id_via_ip6h ( sctp_connection_t sctp_conn,
ip6_header_t ip6h 
)
inlinestatic

Definition at line 785 of file sctp.h.

+ 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 290 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 347 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 313 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 370 of file sctp.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u32 sctp_time_now ( void  )
inlinestatic

Definition at line 669 of file sctp.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 609 of file sctp.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 594 of file sctp.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static char* sctp_timer_to_string ( u8  timer_id)
inlinestatic

Definition at line 45 of file sctp.h.

+ Here is the caller graph for this function:

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

Definition at line 730 of file sctp.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void update_cwnd ( sctp_connection_t sctp_conn)
inlinestatic

Definition at line 935 of file sctp.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void update_smallest_pmtu_idx ( sctp_connection_t sctp_conn)
inlinestatic

Definition at line 881 of file sctp.h.

+ Here is the caller graph for this function:

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 860 of file sctp.h.

+ Here is the call graph for this function:

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 836 of file sctp.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static sctp_main_t* vnet_get_sctp_main ( )
inlinestatic

Definition at line 542 of file sctp.h.

+ Here is the caller graph for this function:

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_function_t format_sctp_state

Definition at line 302 of file sctp.h.

vlib_node_registration_t sctp4_input_node

(constructor) VLIB_REGISTER_NODE (sctp4_input_node)

Definition at line 2326 of file sctp_input.c.

vlib_node_registration_t sctp4_output_node
Initial value:
=
{
.function = sctp4_output,.name = "sctp4-output",
.vector_size = sizeof (u32),
.n_errors = SCTP_N_ERROR,
.error_strings = sctp_error_strings,
.n_next_nodes = SCTP_OUTPUT_N_NEXT,
.next_nodes = {
#define _(s,n)
},
.format_buffer = format_sctp_header,
.format_trace = format_sctp_tx_trace,
}
#define foreach_sctp4_output_next
Definition: sctp_output.c:30
static char * sctp_error_strings[]
Definition: sctp_input.c:22
unsigned int u32
Definition: types.h:88
u8 * format_sctp_tx_trace(u8 *s, va_list *args)
Definition: sctp_format.c:26
u8 * format_sctp_header(u8 *s, va_list *args)
Definition: sctp_format.c:20
static uword sctp4_output(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
Definition: sctp_output.c:1869

(constructor) VLIB_REGISTER_NODE (sctp4_output_node)

Definition at line 1883 of file sctp_output.c.

vlib_node_registration_t sctp6_input_node

(constructor) VLIB_REGISTER_NODE (sctp6_input_node)

Definition at line 2327 of file sctp_input.c.

vlib_node_registration_t sctp6_output_node
Initial value:
=
{
.function = sctp6_output,
.name = "sctp6-output",
.vector_size = sizeof (u32),
.n_errors = SCTP_N_ERROR,
.error_strings = sctp_error_strings,
.n_next_nodes = SCTP_OUTPUT_N_NEXT,
.next_nodes = {
#define _(s,n)
},
.format_buffer = format_sctp_header,
.format_trace = format_sctp_tx_trace,
}
static char * sctp_error_strings[]
Definition: sctp_input.c:22
static uword sctp6_output(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
Definition: sctp_output.c:1876
unsigned int u32
Definition: types.h:88
u8 * format_sctp_tx_trace(u8 *s, va_list *args)
Definition: sctp_format.c:26
u8 * format_sctp_header(u8 *s, va_list *args)
Definition: sctp_format.c:20
#define foreach_sctp6_output_next
Definition: sctp_output.c:34

(constructor) VLIB_REGISTER_NODE (sctp6_output_node)

Definition at line 1904 of file sctp_output.c.

sctp_main_t sctp_main

Definition at line 18 of file sctp.c.