FreeBSD kernel IPv4 code
|
#include <sys/cdefs.h>
#include <netinet/sctp_os.h>
#include <netinet/sctp_pcb.h>
#include <netinet/sctp_var.h>
#include <netinet/sctp_sysctl.h>
#include <netinet/sctp_timer.h>
#include <netinet/sctputil.h>
#include <netinet/sctp_output.h>
#include <netinet/sctp_header.h>
#include <netinet/sctp_indata.h>
#include <netinet/sctp_asconf.h>
#include <netinet/sctp_input.h>
#include <netinet/sctp.h>
#include <netinet/sctp_uio.h>
Go to the source code of this file.
Macros | |
#define | _IP_VHL |
Functions | |
__FBSDID ("$FreeBSD$") | |
void | sctp_audit_retranmission_queue (struct sctp_association *asoc) |
static int | sctp_threshold_management (struct sctp_inpcb *inp, struct sctp_tcb *stcb, struct sctp_nets *net, uint16_t threshold) |
struct sctp_nets * | sctp_find_alternate_net (struct sctp_tcb *stcb, struct sctp_nets *net, int mode) |
static void | sctp_backoff_on_timeout (struct sctp_tcb *stcb, struct sctp_nets *net, int win_probe, int num_marked, int num_abandoned) |
static void | sctp_recover_sent_list (struct sctp_tcb *stcb) |
static int | sctp_mark_all_for_resend (struct sctp_tcb *stcb, struct sctp_nets *net, struct sctp_nets *alt, int window_probe, int *num_marked, int *num_abandoned) |
int | sctp_t3rxt_timer (struct sctp_inpcb *inp, struct sctp_tcb *stcb, struct sctp_nets *net) |
int | sctp_t1init_timer (struct sctp_inpcb *inp, struct sctp_tcb *stcb, struct sctp_nets *net) |
int | sctp_cookie_timer (struct sctp_inpcb *inp, struct sctp_tcb *stcb, struct sctp_nets *net SCTP_UNUSED) |
int | sctp_strreset_timer (struct sctp_inpcb *inp, struct sctp_tcb *stcb) |
int | sctp_asconf_timer (struct sctp_inpcb *inp, struct sctp_tcb *stcb, struct sctp_nets *net) |
void | sctp_delete_prim_timer (struct sctp_inpcb *inp, struct sctp_tcb *stcb) |
int | sctp_shutdown_timer (struct sctp_inpcb *inp, struct sctp_tcb *stcb, struct sctp_nets *net) |
int | sctp_shutdownack_timer (struct sctp_inpcb *inp, struct sctp_tcb *stcb, struct sctp_nets *net) |
static void | sctp_audit_stream_queues_for_size (struct sctp_inpcb *inp, struct sctp_tcb *stcb) |
int | sctp_heartbeat_timer (struct sctp_inpcb *inp, struct sctp_tcb *stcb, struct sctp_nets *net) |
void | sctp_pathmtu_timer (struct sctp_inpcb *inp, struct sctp_tcb *stcb, struct sctp_nets *net) |
void | sctp_autoclose_timer (struct sctp_inpcb *inp, struct sctp_tcb *stcb) |
#define _IP_VHL |
Definition at line 38 of file sctp_timer.c.
__FBSDID | ( | "$FreeBSD$" | ) |
int sctp_asconf_timer | ( | struct sctp_inpcb * | inp, |
struct sctp_tcb * | stcb, | ||
struct sctp_nets * | net | ||
) |
Definition at line 1181 of file sctp_timer.c.
References sctp_association::asconf_send_queue, sctp_tcb::asoc, CHUNK_FLAGS_FRAGMENT_OK, sctp_tmit_chunk::chunk_id, sctp_association::control_send_queue, sctp_nets::dest_state, sctp_tmit_chunk::flags, chk_id::id, sctp_association::max_send_times, sctp_tmit_chunk::rec, sctp_nets::ref_count, SCTP_ADDR_NOT_LOCKED, SCTP_ADDR_REACHABLE, sctp_asconf_cleanup(), sctp_backoff_on_timeout(), SCTP_DATAGRAM_RESEND, SCTP_DATAGRAM_UNSENT, SCTP_DEBUG_TIMER1, SCTP_ECN_ECHO, sctp_find_alternate_net(), sctp_free_remote_addr, sctp_move_chunks_from_net(), sctp_send_asconf(), sctp_threshold_management(), sctp_ucount_incr, SCTPDBG, sctp_tmit_chunk::sent, sctp_association::sent_queue_retran_cnt, sctp_tmit_chunk::snd_count, and sctp_tmit_chunk::whoTo.
Referenced by sctp_timeout_handler().
void sctp_audit_retranmission_queue | ( | struct sctp_association * | asoc | ) |
Definition at line 59 of file sctp_timer.c.
References sctp_association::asconf_send_queue, sctp_tmit_chunk::asoc, sctp_association::control_send_queue, SCTP_DATAGRAM_RESEND, SCTP_DEBUG_TIMER4, sctp_ucount_incr, SCTPDBG, sctp_tmit_chunk::sent, sctp_association::sent_queue, sctp_association::sent_queue_cnt, and sctp_association::sent_queue_retran_cnt.
|
static |
Definition at line 1347 of file sctp_timer.c.
References sctp_tcb::asoc, sctp_stream_queue_pending::msg_is_complete, next, sctp_stream_out::outqueue, sctp_chunk_output(), SCTP_OUTPUT_FROM_T3, SCTP_PRINTF, SCTP_SO_NOT_LOCKED, sctp_ss_functions::sctp_ss_init, sctp_ss_functions::sctp_ss_is_empty, SCTP_TCB_SEND_LOCK, SCTP_TCB_SEND_UNLOCK, sctp_association::send_queue, sctp_association::sent_queue, sctp_association::sent_queue_retran_cnt, sctp_association::ss_functions, sctp_association::stream_queue_cnt, sctp_association::streamoutcnt, sctp_association::strmout, and sctp_association::total_output_queue_size.
Referenced by sctp_heartbeat_timer().
void sctp_autoclose_timer | ( | struct sctp_inpcb * | inp, |
struct sctp_tcb * | stcb | ||
) |
Definition at line 1536 of file sctp_timer.c.
References sctp_association::alternate, sctp_tcb::asoc, sctp_association::primary_destination, sctp_association::sctp_autoclose_ticks, sctp_chunk_output(), sctp_tcb::sctp_ep, SCTP_GET_STATE, SCTP_GETTIME_TIMEVAL, sctp_is_feature_on, SCTP_OUTPUT_FROM_AUTOCLOSE_TMR, SCTP_PCB_FLAGS_AUTOCLOSE, sctp_secs_to_ticks(), sctp_send_shutdown(), SCTP_SET_STATE, SCTP_SO_NOT_LOCKED, SCTP_STAT_DECR_GAUGE32, SCTP_STATE_OPEN, SCTP_STATE_SHUTDOWN_RECEIVED, SCTP_STATE_SHUTDOWN_SENT, sctp_stop_timers_for_shutdown(), sctp_timer_start(), SCTP_TIMER_TYPE_AUTOCLOSE, SCTP_TIMER_TYPE_SHUTDOWN, SCTP_TIMER_TYPE_SHUTDOWNGUARD, sctp_association::send_queue, sctp_association::sent_queue, sctp_association::time_last_rcvd, and sctp_association::time_last_sent.
Referenced by sctp_timeout_handler().
|
static |
Definition at line 416 of file sctp_timer.c.
References sctp_tcb::asoc, sctp_association::cc_functions, sctp_association::initial_rto, sctp_association::maxrto, sctp_association::minrto, sctp_nets::RTO, sctp_nets::RTO_measured, and sctp_cc_functions::sctp_cwnd_update_after_timeout.
Referenced by sctp_asconf_timer(), sctp_cookie_timer(), sctp_heartbeat_timer(), sctp_shutdown_timer(), sctp_shutdownack_timer(), sctp_strreset_timer(), sctp_t1init_timer(), and sctp_t3rxt_timer().
int sctp_cookie_timer | ( | struct sctp_inpcb * | inp, |
struct sctp_tcb * | stcb, | ||
struct sctp_nets *net | SCTP_UNUSED | ||
) |
Definition at line 1053 of file sctp_timer.c.
References sctp_tcb::asoc, CHUNK_FLAGS_FRAGMENT_OK, sctp_association::control_send_queue, cookie, sctp_association::dropped_special_cnt, sctp_inpcb::last_abort_code, sctp_association::max_init_times, sctp_nets::ref_count, sctp_abort_an_association(), sctp_backoff_on_timeout(), SCTP_BASE_SYSCTL, SCTP_COOKIE_ECHO, SCTP_DATAGRAM_RESEND, sctp_find_alternate_net(), sctp_free_remote_addr, SCTP_FROM_SCTP_TIMER, sctp_generate_cause(), SCTP_GET_STATE, SCTP_LOC_3, SCTP_PRINTF, SCTP_SO_NOT_LOCKED, SCTP_STATE_COOKIE_ECHOED, sctp_threshold_management(), sctp_ucount_incr, and sctp_association::sent_queue_retran_cnt.
Referenced by sctp_timeout_handler().
void sctp_delete_prim_timer | ( | struct sctp_inpcb * | inp, |
struct sctp_tcb * | stcb | ||
) |
Definition at line 1279 of file sctp_timer.c.
References sctp_net_route::_l_addr, sctp_tcb::asoc, sctp_association::deleted_primary, sctp_nets::ro, sctp_sockstore::sa, SCTP_DEBUG_ASCONF1, sctp_free_remote_addr, sctp_mobility_feature_off, SCTP_MOBILITY_PRIM_DELETED, SCTPDBG, and SCTPDBG_ADDR.
Referenced by sctp_handle_heartbeat_ack(), sctp_process_asconf_set_primary(), and sctp_timeout_handler().
struct sctp_nets * sctp_find_alternate_net | ( | struct sctp_tcb * | stcb, |
struct sctp_nets * | net, | ||
int | mode | ||
) |
Definition at line 171 of file sctp_timer.c.
References sctp_net_route::_s_addr, sctp_tcb::asoc, sctp_nets::cwnd, sctp_nets::dest_state, sctp_nets::error_count, sctp_association::hb_ect_randombit, sctp_association::hb_random_idx, sctp_association::hb_random_values, sctp_nets::last_active, sctp_association::nets, sctp_association::numnets, sctp_nets::ro, sctp_net_route::ro_nh, SCTP_ADDR_BEING_DELETED, SCTP_ADDR_PF, SCTP_ADDR_REACHABLE, SCTP_ADDR_UNCONFIRMED, sctp_inpcb::sctp_ep, sctp_tcb::sctp_ep, sctp_free_ifa(), sctp_select_initial_TSN(), and sctp_nets::src_addr_selected.
Referenced by sctp_asconf_timer(), sctp_cookie_timer(), sctp_remove_net(), sctp_send_asconf_ack(), sctp_send_sack(), sctp_shutdown_timer(), sctp_shutdownack_timer(), sctp_strike_gap_ack_chunks(), sctp_strreset_timer(), sctp_t1init_timer(), and sctp_t3rxt_timer().
int sctp_heartbeat_timer | ( | struct sctp_inpcb * | inp, |
struct sctp_tcb * | stcb, | ||
struct sctp_nets * | net | ||
) |
Definition at line 1413 of file sctp_timer.c.
References sctp_net_route::_s_addr, sctp_tcb::asoc, sctp_nets::dest_state, sctp_nets::hb_responded, sctp_nets::heart_beat_delay, sctp_nets::last_sent_time, sctp_association::max_send_times, sctp_stream_queue_pending::net, sctp_nets::partial_bytes_acked, sctp_nets::ro, SCTP_ADDR_NOHB, SCTP_ADDR_PF, sctp_audit_stream_queues_for_size(), sctp_backoff_on_timeout(), sctp_free_ifa(), SCTP_GETTIME_TIMEVAL, sctp_send_hb(), SCTP_SO_NOT_LOCKED, sctp_threshold_management(), sctp_association::send_queue, sctp_association::sent_queue, sctp_nets::src_addr_selected, and sctp_association::total_output_queue_size.
Referenced by sctp_timeout_handler().
|
static |
Definition at line 487 of file sctp_timer.c.
References sctp_tcb::asoc, sctp_tmit_chunk::book_size, CHUNK_FLAGS_FRAGMENT_OK, sctp_tmit_chunk::chunk_id, sctp_data_chunkrec::chunk_was_revoked, sctp_association::control_send_queue, sctp_nets::cwnd, sctp_tmit_chunk::data, sctp_tmit_chunk::do_rtt, sctp_data_chunkrec::doing_fast_retransmit, sctp_nets::fast_retran_ip, sctp_data_chunkrec::fast_retran_tsn, sctp_tmit_chunk::flags, sctp_nets::flight_size, chk_id::id, sctp_association::last_acked_seq, sctp_nets::lastsa, sctp_nets::lastsv, sctp_nets::marked_retrans, sctp_association::marked_retrans, sctp_association::nets, sctp_tmit_chunk::no_fr_allowed, sctp_association::peers_rwnd, PR_SCTP_RTX_ENABLED, PR_SCTP_TTL_ENABLED, sctp_association::prsctp_supported, sctp_tmit_chunk::rec, sctp_nets::ref_count, sctp_nets::rto_needed, SCTP_BASE_SYSCTL, sctp_association::sctp_cmt_on_off, SCTP_DATAGRAM_ACKED, SCTP_DATAGRAM_RESEND, SCTP_DEBUG_TIMER1, SCTP_DEBUG_TIMER4, SCTP_ECN_ECHO, SCTP_FLIGHT_LOG_DOWN_RSND_TO, SCTP_FLIGHT_LOG_UP, SCTP_FLIGHT_LOGGING_ENABLE, sctp_flight_size_decrease, sctp_flight_size_increase, SCTP_FR_CWND_REPORT, SCTP_FR_LOGGING_ENABLE, SCTP_FR_T3_MARK_TIME, SCTP_FR_T3_MARKED, SCTP_FR_T3_STOPPED, SCTP_FR_T3_TIMEOUT, sctp_free_remote_addr, SCTP_GETTIME_TIMEVAL, sctp_log_fr(), sctp_misc_ints(), SCTP_PRINTF, sctp_recover_sent_list(), sctp_release_pr_sctp_chunk(), SCTP_RTT_SHIFT, SCTP_SO_NOT_LOCKED, SCTP_STAT_INCR, sctp_total_flight_decrease, sctp_total_flight_increase, SCTP_TSN_GE, sctp_ucount_incr, SCTPDBG, sctp_association::send_queue, sctp_tmit_chunk::send_size, sctp_association::sending_seq, sctp_tmit_chunk::sent, sctp_association::sent_queue, sctp_association::sent_queue_retran_cnt, sctp_tmit_chunk::sent_rcv_time, sctp_tmit_chunk::snd_count, sctp_data_chunkrec::timetodrop, sctp_association::total_flight, sctp_association::total_flight_count, sctp_data_chunkrec::tsn, and sctp_tmit_chunk::whoTo.
Referenced by sctp_t3rxt_timer().
void sctp_pathmtu_timer | ( | struct sctp_inpcb * | inp, |
struct sctp_tcb * | stcb, | ||
struct sctp_nets * | net | ||
) |
Definition at line 1476 of file sctp_timer.c.
References sctp_net_route::_l_addr, sctp_net_route::_s_addr, sctp_tcb::asoc, sctp_ifa::localifa_flags, MODULE_GLOBAL, sctp_nets::mtu, sctp_nets::port, sctp_nets::ro, sctp_net_route::ro_nh, sctp_sockstore::sa, SCTP_BEING_DELETED, sctp_free_ifa(), SCTP_GATHER_MTU_FROM_ROUTE, sctp_get_next_mtu(), sctp_source_address_selection(), sctp_timer_start(), SCTP_TIMER_TYPE_PATHMTURAISE, sctp_nets::src_addr_selected, and sctp_association::vrf_id.
Referenced by sctp_timeout_handler().
|
static |
Definition at line 441 of file sctp_timer.c.
References sctp_tcb::asoc, sctp_stream_out::chunks_on_queues, sctp_tmit_chunk::data, sctp_association::last_acked_seq, sctp_stream_out::outqueue, PR_SCTP_BUF_ENABLED, sctp_association::pr_sctp_cnt, PR_SCTP_ENABLED, sctp_association::prsctp_supported, sctp_tmit_chunk::rec, SCTP_DATAGRAM_NR_ACKED, sctp_free_a_chunk, sctp_free_bufspace, sctp_m_freem, SCTP_PRINTF, SCTP_SO_NOT_LOCKED, SCTP_STREAM_RESET_PENDING, SCTP_TSN_GE, sctp_association::sent_queue, sctp_association::sent_queue_cnt, sctp_association::sent_queue_cnt_removeable, sctp_stream_out::state, sctp_association::strmout, sctp_association::trigger_reset, and sctp_data_chunkrec::tsn.
Referenced by sctp_mark_all_for_resend().
int sctp_shutdown_timer | ( | struct sctp_inpcb * | inp, |
struct sctp_tcb * | stcb, | ||
struct sctp_nets * | net | ||
) |
Definition at line 1301 of file sctp_timer.c.
References sctp_tcb::asoc, sctp_association::max_send_times, sctp_backoff_on_timeout(), sctp_find_alternate_net(), sctp_send_shutdown(), sctp_threshold_management(), sctp_timer_start(), and SCTP_TIMER_TYPE_SHUTDOWN.
Referenced by sctp_timeout_handler().
int sctp_shutdownack_timer | ( | struct sctp_inpcb * | inp, |
struct sctp_tcb * | stcb, | ||
struct sctp_nets * | net | ||
) |
Definition at line 1324 of file sctp_timer.c.
References sctp_tcb::asoc, sctp_association::max_send_times, sctp_backoff_on_timeout(), sctp_find_alternate_net(), sctp_send_shutdown_ack(), sctp_threshold_management(), sctp_timer_start(), and SCTP_TIMER_TYPE_SHUTDOWNACK.
Referenced by sctp_timeout_handler().
int sctp_strreset_timer | ( | struct sctp_inpcb * | inp, |
struct sctp_tcb * | stcb | ||
) |
Definition at line 1118 of file sctp_timer.c.
References sctp_tcb::asoc, CHUNK_FLAGS_FRAGMENT_OK, sctp_association::control_send_queue, sctp_nets::dest_state, sctp_tmit_chunk::flags, sctp_association::max_send_times, sctp_nets::ref_count, SCTP_ADDR_REACHABLE, sctp_backoff_on_timeout(), SCTP_DATAGRAM_RESEND, SCTP_ECN_ECHO, sctp_find_alternate_net(), sctp_find_stream_reset(), sctp_free_remote_addr, sctp_move_chunks_from_net(), sctp_threshold_management(), sctp_timer_start(), SCTP_TIMER_TYPE_STRRESET, sctp_ucount_incr, sctp_tmit_chunk::sent, sctp_association::sent_queue_retran_cnt, sctp_association::str_reset_seq_out, sctp_association::stream_reset_outstanding, and sctp_tmit_chunk::whoTo.
Referenced by sctp_timeout_handler().
int sctp_t1init_timer | ( | struct sctp_inpcb * | inp, |
struct sctp_tcb * | stcb, | ||
struct sctp_nets * | net | ||
) |
Definition at line 1005 of file sctp_timer.c.
References sctp_tcb::asoc, sctp_association::delayed_connection, sctp_association::dropped_special_cnt, sctp_association::initial_init_rto_max, sctp_association::max_init_times, sctp_association::numnets, sctp_association::primary_destination, sctp_nets::RTO, sctp_backoff_on_timeout(), sctp_find_alternate_net(), SCTP_GET_STATE, sctp_move_chunks_from_net(), sctp_send_initiate(), SCTP_SO_NOT_LOCKED, SCTP_STATE_COOKIE_WAIT, and sctp_threshold_management().
Referenced by sctp_timeout_handler().
int sctp_t3rxt_timer | ( | struct sctp_inpcb * | inp, |
struct sctp_tcb * | stcb, | ||
struct sctp_nets * | net | ||
) |
Definition at line 816 of file sctp_timer.c.
References sctp_net_route::_s_addr, sctp_association::advanced_peer_ack_point, sctp_association::alternate, sctp_tcb::asoc, sctp_association::cc_functions, sctp_nets::cwnd, sctp_nets::dest_state, sctp_nets::failure_threshold, sctp_nets::fast_retran_loss_recovery, sctp_association::fast_retran_loss_recovery, sctp_nets::find_pseudo_cumack, sctp_nets::find_rtx_pseudo_cumack, sctp_nets::flight_size, sctp_association::last_acked_seq, sctp_nets::last_sent_time, sctp_association::max_send_times, sctp_nets::mtu, sctp_association::nets, sctp_association::peers_rwnd, sctp_nets::pf_threshold, sctp_association::primary_destination, sctp_association::prsctp_supported, sctp_nets::ref_count, sctp_nets::ro, sctp_nets::RTO, sctp_association::sat_t3_loss_recovery, sctp_association::sat_t3_recovery_tsn, SCTP_ADDR_PF, SCTP_ADDR_REACHABLE, sctp_backoff_on_timeout(), SCTP_BASE_SYSCTL, sctp_association::sctp_cmt_on_off, SCTP_CWND_LOG_FROM_RTX, SCTP_CWND_LOG_FROM_T3, SCTP_CWND_LOGGING_ENABLE, SCTP_CWND_MONITOR_ENABLE, sctp_cc_functions::sctp_cwnd_new_transmission_begins, sctp_tcb::sctp_ep, sctp_find_alternate_net(), SCTP_FR_LOGGING_ENABLE, SCTP_FR_T3_TIMEOUT, sctp_free_ifa(), sctp_free_remote_addr, SCTP_GET_STATE, SCTP_GETTIME_TIMEVAL, sctp_log_cwnd(), sctp_log_fr(), sctp_mark_all_for_resend(), sctp_move_chunks_from_net(), sctp_send_hb(), SCTP_SO_NOT_LOCKED, SCTP_STAT_INCR, SCTP_STATE_COOKIE_ECHOED, sctp_threshold_management(), sctp_timer_start(), SCTP_TIMER_TYPE_SEND, sctp_try_advance_peer_ack_point(), SCTP_TSN_GT, send_forward_tsn(), sctp_association::sending_seq, sctp_nets::src_addr_selected, sctp_association::total_flight, and sctp_tmit_chunk::whoTo.
Referenced by sctp_assoc_immediate_retrans(), and sctp_timeout_handler().
|
static |
Definition at line 90 of file sctp_timer.c.
References sctp_tcb::asoc, sctp_nets::dest_state, sctp_nets::error_count, sctp_inpcb::last_abort_code, sctp_association::overall_error_count, sctp_abort_an_association(), SCTP_ADDR_PF, SCTP_ADDR_REACHABLE, SCTP_ADDR_UNCONFIRMED, SCTP_BASE_SYSCTL, SCTP_DEBUG_TIMER4, SCTP_FROM_SCTP_TIMER, sctp_generate_cause(), sctp_get_tick_count, SCTP_LOC_1, SCTP_LOC_2, sctp_misc_ints(), SCTP_NOTIFY_INTERFACE_DOWN, sctp_send_hb(), SCTP_SO_NOT_LOCKED, SCTP_THRESHOLD_INCR, SCTP_THRESHOLD_LOGGING, sctp_timer_start(), sctp_timer_stop(), SCTP_TIMER_TYPE_HEARTBEAT, sctp_ulp_notify(), and SCTPDBG.
Referenced by sctp_asconf_timer(), sctp_cookie_timer(), sctp_heartbeat_timer(), sctp_shutdown_timer(), sctp_shutdownack_timer(), sctp_strreset_timer(), sctp_t1init_timer(), and sctp_t3rxt_timer().