summaryrefslogtreecommitdiffstats
path: root/src/vnet/sctp/sctp.h
diff options
context:
space:
mode:
authorMarco Varlese <marco.varlese@suse.com>2018-03-05 12:31:45 +0100
committerDamjan Marion <dmarion.lists@gmail.com>2018-03-05 13:46:32 +0000
commit9e09ff394ac0e731b5b33caf4d0cddff8de570b4 (patch)
tree5fdb5784570dadce34afc4cfe824f51a3f00e948 /src/vnet/sctp/sctp.h
parenteac3b11b67a9ee2d5b85c3e2e90220a04cd5db61 (diff)
SCTP: retransmission in INIT/SHUTDOWN phase
This patch addresses the need to handle timers timeouts (e.g. sent chunks not being acked) for both the INIT and SHUTDOWN phases. The INIT phase requires the handling of two timers the T1-init and T1-cookie timers whilst the SHUTDOWN phase requires the handling of the T2-shutdown timer only for the retransmission case. Left to be implemented is the handling of the DATA chunks retransmission (e.g. T3-rxtx expiration) but that will be submitted with a separate patch. Change-Id: I2b2e13dce11000aea3c7d965f02b27b76c97e605 Signed-off-by: Marco Varlese <marco.varlese@suse.com>
Diffstat (limited to 'src/vnet/sctp/sctp.h')
-rw-r--r--src/vnet/sctp/sctp.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/vnet/sctp/sctp.h b/src/vnet/sctp/sctp.h
index 9f17e5337ba..2c649c9538a 100644
--- a/src/vnet/sctp/sctp.h
+++ b/src/vnet/sctp/sctp.h
@@ -200,6 +200,8 @@ typedef struct _sctp_connection
u32 overall_err_treshold; /**< The threshold for this association that if the Overall Error Count
reaches will cause this association to be torn down. */
+ u8 init_retransmit_err; /**< Error counter for the INIT transmission phase */
+
u32 peer_rwnd; /**< Current calculated value of the peer's rwnd. */
u32 next_tsn; /**< The next TSN number to be assigned to a new DATA chunk.
@@ -233,11 +235,12 @@ typedef struct _sctp_connection
1 indicates normal stream
2 indicates last fragment of a user message */
- sctp_options_t snd_opts;
-
u8 forming_association_changed; /**< This is a flag indicating whether the original association has been modified during
the life-span of the association itself. For instance, a new sub-connection might have been added. */
+ sctp_state_cookie_param_t cookie_param; /**< Temporary location to save cookie information; it can be used to
+ when timeout expires and sending again a COOKIE is require. */
+
} sctp_connection_t;
typedef void (sctp_timer_expiration_handler) (u32 conn_index, u32 timer_id);
@@ -268,12 +271,14 @@ 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);
void sctp_flush_frames_to_output (u8 thread_index);
@@ -309,8 +314,7 @@ void
sctp_prepare_operation_error (sctp_connection_t * sctp_conn, u8 idx,
vlib_buffer_t * b, u8 err_cause);
void sctp_prepare_cookie_echo_chunk (sctp_connection_t * sctp_conn, u8 idx,
- vlib_buffer_t * b,
- sctp_state_cookie_param_t * sc);
+ 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,