FreeBSD kernel IPv4 code
sctp_input.c File Reference
#include <sys/cdefs.h>
#include <netinet/sctp_os.h>
#include <netinet/sctp_var.h>
#include <netinet/sctp_sysctl.h>
#include <netinet/sctp_pcb.h>
#include <netinet/sctp_header.h>
#include <netinet/sctputil.h>
#include <netinet/sctp_output.h>
#include <netinet/sctp_input.h>
#include <netinet/sctp_auth.h>
#include <netinet/sctp_indata.h>
#include <netinet/sctp_asconf.h>
#include <netinet/sctp_bsd_addr.h>
#include <netinet/sctp_timer.h>
#include <netinet/sctp_crc32.h>
#include <netinet/sctp_kdtrace.h>
#include <sys/smp.h>
Include dependency graph for sctp_input.c:

Go to the source code of this file.

Functions

 __FBSDID ("$FreeBSD$")
 
static void sctp_stop_all_cookie_timers (struct sctp_tcb *stcb)
 
static void sctp_handle_init (struct mbuf *m, int iphlen, int offset, struct sockaddr *src, struct sockaddr *dst, struct sctphdr *sh, struct sctp_init_chunk *cp, struct sctp_inpcb *inp, struct sctp_tcb *stcb, struct sctp_nets *net, uint8_t mflowtype, uint32_t mflowid, uint32_t vrf_id, uint16_t port)
 
int sctp_is_there_unsent_data (struct sctp_tcb *stcb, int so_locked)
 
static int sctp_process_init (struct sctp_init_chunk *cp, struct sctp_tcb *stcb)
 
static int sctp_process_init_ack (struct mbuf *m, int iphlen, int offset, struct sockaddr *src, struct sockaddr *dst, struct sctphdr *sh, struct sctp_init_ack_chunk *cp, struct sctp_tcb *stcb, struct sctp_nets *net, int *abort_no_unlock, uint8_t mflowtype, uint32_t mflowid, uint32_t vrf_id)
 
static void sctp_handle_heartbeat_ack (struct sctp_heartbeat_chunk *cp, struct sctp_tcb *stcb, struct sctp_nets *net)
 
static int sctp_handle_nat_colliding_state (struct sctp_tcb *stcb)
 
static int sctp_handle_nat_missing_state (struct sctp_tcb *stcb, struct sctp_nets *net)
 
static int sctp_handle_abort (struct sctp_abort_chunk *abort, struct sctp_tcb *stcb, struct sctp_nets *net)
 
static void sctp_start_net_timers (struct sctp_tcb *stcb)
 
static void sctp_handle_shutdown (struct sctp_shutdown_chunk *cp, struct sctp_tcb *stcb, struct sctp_nets *net, int *abort_flag)
 
static void sctp_handle_shutdown_ack (struct sctp_shutdown_ack_chunk *cp SCTP_UNUSED, struct sctp_tcb *stcb, struct sctp_nets *net)
 
static void sctp_process_unrecog_chunk (struct sctp_tcb *stcb, uint8_t chunk_type)
 
static void sctp_process_unrecog_param (struct sctp_tcb *stcb, uint16_t parameter_type)
 
static int sctp_handle_error (struct sctp_chunkhdr *ch, struct sctp_tcb *stcb, struct sctp_nets *net, uint32_t limit)
 
static int sctp_handle_init_ack (struct mbuf *m, int iphlen, int offset, struct sockaddr *src, struct sockaddr *dst, struct sctphdr *sh, struct sctp_init_ack_chunk *cp, struct sctp_tcb *stcb, struct sctp_nets *net, int *abort_no_unlock, uint8_t mflowtype, uint32_t mflowid, uint32_t vrf_id)
 
static struct sctp_tcbsctp_process_cookie_new (struct mbuf *m, int iphlen, int offset, struct sockaddr *src, struct sockaddr *dst, struct sctphdr *sh, struct sctp_state_cookie *cookie, int cookie_len, struct sctp_inpcb *inp, struct sctp_nets **netp, struct sockaddr *init_src, int *notification, int auth_skipped, uint32_t auth_offset, uint32_t auth_len, uint8_t mflowtype, uint32_t mflowid, uint32_t vrf_id, uint16_t port)
 
static struct sctp_tcbsctp_process_cookie_existing (struct mbuf *m, int iphlen, int offset, struct sockaddr *src, struct sockaddr *dst, struct sctphdr *sh, struct sctp_state_cookie *cookie, int cookie_len, struct sctp_inpcb *inp, struct sctp_tcb *stcb, struct sctp_nets **netp, struct sockaddr *init_src, int *notification, int auth_skipped, uint32_t auth_offset, uint32_t auth_len, uint8_t mflowtype, uint32_t mflowid, uint32_t vrf_id, uint16_t port)
 
static struct mbuf * sctp_handle_cookie_echo (struct mbuf *m, int iphlen, int offset, struct sockaddr *src, struct sockaddr *dst, struct sctphdr *sh, struct sctp_cookie_echo_chunk *cp, struct sctp_inpcb **inp_p, struct sctp_tcb **stcb, struct sctp_nets **netp, int auth_skipped, uint32_t auth_offset, uint32_t auth_len, struct sctp_tcb **locked_tcb, uint8_t mflowtype, uint32_t mflowid, uint32_t vrf_id, uint16_t port)
 
static void sctp_handle_cookie_ack (struct sctp_cookie_ack_chunk *cp SCTP_UNUSED, struct sctp_tcb *stcb, struct sctp_nets *net)
 
static void sctp_handle_ecn_echo (struct sctp_ecne_chunk *cp, struct sctp_tcb *stcb)
 
static void sctp_handle_ecn_cwr (struct sctp_cwr_chunk *cp, struct sctp_tcb *stcb, struct sctp_nets *net)
 
static void sctp_handle_shutdown_complete (struct sctp_shutdown_complete_chunk *cp SCTP_UNUSED, struct sctp_tcb *stcb, struct sctp_nets *net)
 
static int process_chunk_drop (struct sctp_tcb *stcb, struct sctp_chunk_desc *desc, struct sctp_nets *net, uint8_t flg)
 
void sctp_reset_in_stream (struct sctp_tcb *stcb, uint32_t number_entries, uint16_t *list)
 
static void sctp_reset_out_streams (struct sctp_tcb *stcb, uint32_t number_entries, uint16_t *list)
 
static void sctp_reset_clear_pending (struct sctp_tcb *stcb, uint32_t number_entries, uint16_t *list)
 
struct sctp_stream_reset_requestsctp_find_stream_reset (struct sctp_tcb *stcb, uint32_t seq, struct sctp_tmit_chunk **bchk)
 
static void sctp_clean_up_stream_reset (struct sctp_tcb *stcb)
 
static int sctp_handle_stream_reset_response (struct sctp_tcb *stcb, uint32_t seq, uint32_t action, struct sctp_stream_reset_response *respin)
 
static void sctp_handle_str_reset_request_in (struct sctp_tcb *stcb, struct sctp_tmit_chunk *chk, struct sctp_stream_reset_in_request *req, int trunc)
 
static int sctp_handle_str_reset_request_tsn (struct sctp_tcb *stcb, struct sctp_tmit_chunk *chk, struct sctp_stream_reset_tsn_request *req)
 
static void sctp_handle_str_reset_request_out (struct sctp_tcb *stcb, struct sctp_tmit_chunk *chk, struct sctp_stream_reset_out_request *req, int trunc)
 
static void sctp_handle_str_reset_add_strm (struct sctp_tcb *stcb, struct sctp_tmit_chunk *chk, struct sctp_stream_reset_add_strm *str_add)
 
static void sctp_handle_str_reset_add_out_strm (struct sctp_tcb *stcb, struct sctp_tmit_chunk *chk, struct sctp_stream_reset_add_strm *str_add)
 
static int sctp_handle_stream_reset (struct sctp_tcb *stcb, struct mbuf *m, int offset, struct sctp_chunkhdr *ch_req)
 
static void sctp_handle_packet_dropped (struct sctp_pktdrop_chunk *cp, struct sctp_tcb *stcb, struct sctp_nets *net, uint32_t limit)
 
static struct sctp_tcbsctp_process_control (struct mbuf *m, int iphlen, int *offset, int length, struct sockaddr *src, struct sockaddr *dst, struct sctphdr *sh, struct sctp_chunkhdr *ch, struct sctp_inpcb *inp, struct sctp_tcb *stcb, struct sctp_nets **netp, int *fwd_tsn_seen, uint8_t mflowtype, uint32_t mflowid, uint16_t fibnum, uint32_t vrf_id, uint16_t port)
 
void sctp_common_input_processing (struct mbuf **mm, int iphlen, int offset, int length, struct sockaddr *src, struct sockaddr *dst, struct sctphdr *sh, struct sctp_chunkhdr *ch, uint8_t compute_crc, uint8_t ecn_bits, uint8_t mflowtype, uint32_t mflowid, uint16_t fibnum, uint32_t vrf_id, uint16_t port)
 

Function Documentation

◆ __FBSDID()

__FBSDID ( "$FreeBSD$"  )

◆ process_chunk_drop()

static int process_chunk_drop ( struct sctp_tcb stcb,
struct sctp_chunk_desc desc,
struct sctp_nets net,
uint8_t  flg 
)
static

Definition at line 3052 of file sctp_input.c.

References sctp_tcb::asoc, sctp_tmit_chunk::book_size, sctp_tmit_chunk::chunk_id, sctp_chunk_desc::chunk_type, sctp_association::control_send_queue, cookie, sctp_tmit_chunk::data, sctp_chunk_desc::data_bytes, sctp_tmit_chunk::do_rtt, sctp_data_chunkrec::doing_fast_retransmit, sctp_association::dropped_special_cnt, sctp_data_chunkrec::fast_retran_tsn, sctp_nets::flight_size, chk_id::id, sctp_association::max_send_times, sctp_association::overall_error_count, sctp_association::peers_rwnd, sctp_tmit_chunk::rec, sctp_nets::rto_needed, SCTP_ABORT_ASSOCIATION, SCTP_ASCONF, SCTP_ASCONF_ACK, SCTP_BADCRC, SCTP_BASE_SYSCTL, SCTP_BUF_LEN, SCTP_COOKIE_ACK, SCTP_COOKIE_ECHO, SCTP_DATA, SCTP_DATA_CHUNK_OVERHEAD, SCTP_DATAGRAM_ACKED, SCTP_DATAGRAM_RESEND, SCTP_ECN_CWR, SCTP_ECN_ECHO, sctp_tcb::sctp_ep, SCTP_FLIGHT_LOG_DOWN_PDRP, SCTP_FLIGHT_LOGGING_ENABLE, sctp_flight_size_decrease, SCTP_FORWARD_CUM_TSN, SCTP_FROM_MIDDLE_BOX, SCTP_FROM_SCTP_INPUT, SCTP_HEARTBEAT_ACK, SCTP_HEARTBEAT_REQUEST, SCTP_IDATA, SCTP_IFORWARD_CUM_TSN, SCTP_INITIATION, SCTP_INITIATION_ACK, SCTP_LOC_26, SCTP_LOC_27, sctp_misc_ints(), SCTP_NR_SELECTIVE_ACK, SCTP_NUM_DB_TO_VERIFY, SCTP_OPERATION_ERROR, SCTP_PACKET_DROPPED, SCTP_PRINTF, SCTP_RETRY_DROPPED_THRESH, SCTP_SELECTIVE_ACK, sctp_send_asconf_ack(), sctp_send_cookie_ack(), sctp_send_hb(), sctp_send_initiate(), sctp_send_sack(), sctp_send_shutdown(), sctp_send_shutdown_ack(), SCTP_SHUTDOWN, SCTP_SHUTDOWN_ACK, SCTP_SHUTDOWN_COMPLETE, SCTP_SO_NOT_LOCKED, SCTP_STAT_INCR, sctp_stop_all_cookie_timers(), sctp_timer_start(), sctp_timer_stop(), SCTP_TIMER_TYPE_INIT, SCTP_TIMER_TYPE_SEND, sctp_total_flight_decrease, SCTP_TSN_GT, sctp_ucount_incr, send_forward_tsn(), sctp_association::send_queue, sctp_association::sending_seq, sctp_tmit_chunk::sent, sctp_association::sent_queue, sctp_association::sent_queue_retran_cnt, sctp_tmit_chunk::snd_count, sctp_ecne_chunk::tsn, sctp_data_chunkrec::tsn, sctp_chunk_desc::tsn_ifany, and sctp_tmit_chunk::whoTo.

Referenced by sctp_handle_packet_dropped().

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

◆ sctp_clean_up_stream_reset()

static void sctp_clean_up_stream_reset ( struct sctp_tcb stcb)
static

◆ sctp_common_input_processing()

void sctp_common_input_processing ( struct mbuf **  mm,
int  iphlen,
int  offset,
int  length,
struct sockaddr *  src,
struct sockaddr *  dst,
struct sctphdr sh,
struct sctp_chunkhdr ch,
uint8_t  compute_crc,
uint8_t  ecn_bits,
uint8_t  mflowtype,
uint32_t  mflowid,
uint16_t  fibnum,
uint32_t  vrf_id,
uint16_t  port 
)

Definition at line 5252 of file sctp_input.c.

References sctp_association::asconf_send_queue, sctp_tcb::asoc, sctp_association::authenticated, badport_bandlim(), BANDLIM_SCTP_OOTB, sctphdr::checksum, sctp_chunkhdr::chunk_type, sctp_association::control_send_queue, sctp_association::ctrl_queue_cnt, sctp_association::cumulative_tsn, sctphdr::dest_port, sctp_association::ecn_echo_cnt_onq, sctp_association::ecn_supported, sctp_inpcb::fibnum, sctp_nets::flowid, sctp_nets::flowtype, sctp_association::highest_tsn_inside_map, sctp_association::highest_tsn_inside_nr_map, sctp_inpcb::inp, IS_SCTP_CONTROL, sctp_association::local_auth_chunks, sctp_nets::mtu, sctp_association::my_vtag, sctp_association::peers_rwnd, sctp_nets::port, SCTP_ABORT_ASSOCIATION, sctp_auth_is_required_chunk, SCTP_BASE_SYSCTL, sctp_calculate_cksum(), SCTP_CE_BITS, sctp_chunk_output(), SCTP_DATA, SCTP_DEBUG_AUTH1, SCTP_DEBUG_INPUT1, SCTP_DEBUG_INPUT3, SCTP_DIAG_INFO_LEN, sctp_tcb::sctp_ep, sctp_findassociation_addr(), sctp_generate_cause(), SCTP_GET_STATE, sctp_handle_cookie_ack(), sctp_handle_ootb(), SCTP_INIT, SCTP_INITIATION, SCTP_INP_DECR_REF, SCTP_INP_WLOCK, SCTP_INP_WUNLOCK, SCTP_OUTPUT_FROM_CONTROL_PROC, SCTP_OUTPUT_FROM_INPUT_ERROR, sctp_pathmtu_adjustment(), SCTP_PROBE5, sctp_process_control(), sctp_process_data(), sctp_sack_check(), sctp_send_abort(), sctp_send_ecn_echo(), sctp_send_packet_dropped(), sctp_send_shutdown_complete2(), SCTP_SHUTDOWN_ACK, SCTP_SHUTDOWN_COMPLETE, SCTP_SNPRINTF, SCTP_SO_NOT_LOCKED, SCTP_STAT_INCR, SCTP_STAT_INCR_COUNTER32, SCTP_STAT_INCR_COUNTER64, SCTP_STATE_ABOUT_TO_BE_FREED, SCTP_STATE_COOKIE_ECHOED, SCTP_STATE_COOKIE_WAIT, SCTP_STATE_EMPTY, SCTP_STATE_INUSE, SCTP_STATE_OPEN, SCTP_STATE_SHUTDOWN_ACK_SENT, SCTP_STATE_SHUTDOWN_RECEIVED, SCTP_STATE_SHUTDOWN_SENT, SCTP_STATE_WAS_ABORTED, SCTP_TCB_UNLOCK, SCTP_TSN_GT, SCTPDBG, sctp_association::seen_a_sack_this_pkt, sctp_association::send_sack, sctp_association::smallest_mtu, sctp_association::state, sctp_association::total_flight, sctp_association::total_output_queue_size, sctp_association::trigger_reset, and sctphdr::v_tag.

Here is the call graph for this function:

◆ sctp_find_stream_reset()

◆ sctp_handle_abort()

◆ sctp_handle_cookie_ack()

static void sctp_handle_cookie_ack ( struct sctp_cookie_ack_chunk *cp  SCTP_UNUSED,
struct sctp_tcb stcb,
struct sctp_nets net 
)
static

Definition at line 2748 of file sctp_input.c.

References sctp_association::asconf_queue, sctp_association::asconf_supported, sctp_tcb::asoc, sctp_tmit_chunk::asoc, sctp_nets::hb_responded, sctp_association::overall_error_count, sctp_association::primary_destination, SCTP_ADDR_NOT_LOCKED, sctp_association::sctp_autoclose_ticks, SCTP_BASE_SYSCTL, sctp_calculate_rto(), SCTP_DEBUG_INPUT2, sctp_tcb::sctp_ep, sctp_inpcb::sctp_flags, SCTP_FROM_SCTP_INPUT, SCTP_GET_STATE, SCTP_GETTIME_TIMEVAL, sctp_is_feature_on, sctp_misc_ints(), SCTP_NOTIFY_ASSOC_UP, SCTP_PCB_FLAGS_AUTOCLOSE, SCTP_PCB_FLAGS_CONNECTED, SCTP_PCB_FLAGS_DO_ASCONF, SCTP_PCB_FLAGS_IN_TCPPOOL, SCTP_PCB_FLAGS_TCPTYPE, SCTP_RTT_FROM_NON_DATA, sctp_send_asconf(), SCTP_SET_STATE, SCTP_SO_NOT_LOCKED, sctp_tcb::sctp_socket, sctp_start_net_timers(), SCTP_STAT_INCR_COUNTER32, SCTP_STAT_INCR_GAUGE32, SCTP_STATE_CLOSED_SOCKET, SCTP_STATE_COOKIE_ECHOED, SCTP_STATE_OPEN, SCTP_STATE_SHUTDOWN_PENDING, sctp_stop_all_cookie_timers(), SCTP_THRESHOLD_CLEAR, SCTP_THRESHOLD_LOGGING, sctp_timer_start(), SCTP_TIMER_TYPE_ASCONF, SCTP_TIMER_TYPE_AUTOCLOSE, SCTP_TIMER_TYPE_HEARTBEAT, SCTP_TIMER_TYPE_SEND, SCTP_TIMER_TYPE_SHUTDOWNGUARD, sctp_toss_old_cookies(), sctp_ulp_notify(), SCTPDBG, sctp_association::sent_queue, sctp_association::state, sctp_association::time_entered, and sctp_tmit_chunk::whoTo.

Referenced by sctp_common_input_processing(), and sctp_process_control().

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

◆ sctp_handle_cookie_echo()

static struct mbuf * sctp_handle_cookie_echo ( struct mbuf *  m,
int  iphlen,
int  offset,
struct sockaddr *  src,
struct sockaddr *  dst,
struct sctphdr sh,
struct sctp_cookie_echo_chunk cp,
struct sctp_inpcb **  inp_p,
struct sctp_tcb **  stcb,
struct sctp_nets **  netp,
int  auth_skipped,
uint32_t  auth_offset,
uint32_t  auth_len,
struct sctp_tcb **  locked_tcb,
uint8_t  mflowtype,
uint32_t  mflowid,
uint32_t  vrf_id,
uint16_t  port 
)
static

Definition at line 2252 of file sctp_input.c.

References sctp_error_stale_cookie::cause, sctp_cookie_echo_chunk::ch, sctp_chunkhdr::chunk_length, sctp_error_cause::code, cookie, sctp_cookie_echo_chunk::cookie, sctp_pcb::current_secret_number, sctphdr::dest_port, sctp_nets::dest_state, sctp_inpcb::fibnum, sctp_inpcb::inp, sctp_pcb::last_secret_number, sctp_error_cause::length, in_addr::s_addr, sctp_abort_association(), sctp_add_remote_addr(), SCTP_ADD_SUBSTATE, SCTP_ADDR_UNCONFIRMED, SCTP_BASE_SYSCTL, SCTP_BUF_LEN, SCTP_BUF_NEXT, SCTP_CAUSE_OUT_OF_RESC, SCTP_CAUSE_STALE_COOKIE, sctp_copy_chunklist(), sctp_copy_hmaclist(), SCTP_DEBUG_INPUT1, SCTP_DEBUG_INPUT2, SCTP_DONOT_SETSCOPE, sctp_findassociation_ep_addr(), sctp_findnet(), sctp_free_assoc(), sctp_free_chunklist(), sctp_free_hmaclist(), SCTP_FROM_SCTP_INPUT, sctp_generate_cause(), sctp_get_mbuf_for_msg(), SCTP_GETTIME_TIMEVAL, SCTP_HMAC, sctp_hmac_m(), SCTP_IN_COOKIE_PROC, sctp_init_ack_chunk, SCTP_INP_DECR_REF, SCTP_INP_INCR_REF, SCTP_INP_RLOCK, SCTP_INP_RUNLOCK, SCTP_IPV4_ADDRESS, SCTP_IPV6_ADDRESS, SCTP_LOC_23, sctp_m_freem, sctp_m_getptr(), SCTP_MAX_COOKIE_LIFE, SCTP_MBUF_LOGGING_ENABLE, SCTP_MBUF_SPLIT, sctp_move_pcb_and_assoc(), SCTP_NORMAL_PROC, SCTP_NOTIFY_ASSOC_RESTART, SCTP_NOTIFY_INTERFACE_CONFIRMED, SCTP_PCB_COPY_FLAGS, SCTP_PCB_FLAGS_CONNECTED, SCTP_PCB_FLAGS_DONT_WAKE, SCTP_PCB_FLAGS_IN_TCPPOOL, SCTP_PCB_FLAGS_SOCKET_GONE, SCTP_PCB_FLAGS_TCPTYPE, SCTP_PCB_FLAGS_UNBOUND, SCTP_PRINTF, sctp_process_cookie_existing(), sctp_process_cookie_new(), sctp_pull_off_control_to_new_inp(), SCTP_SECRET_SIZE, sctp_send_operr_to(), sctp_set_primary_addr(), SCTP_SIGNATURE_SIZE, SCTP_SO_NOT_LOCKED, sctp_start_net_timers(), SCTP_STATE_IN_ACCEPT_QUEUE, SCTP_TCB_LOCK, SCTP_TCB_UNLOCK, sctp_ticks_to_msecs(), sctp_ticks_to_secs(), sctp_ulp_notify(), SCTPDBG, sctp_pcb::secret_key, sockaddr_in::sin_addr, sockaddr_in::sin_family, sockaddr_in::sin_len, sockaddr_in::sin_port, sctphdr::src_port, sctp_pcb::time_of_secret_change, and sctphdr::v_tag.

Referenced by sctp_process_control().

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

◆ sctp_handle_ecn_cwr()

◆ sctp_handle_ecn_echo()

◆ sctp_handle_error()

static int sctp_handle_error ( struct sctp_chunkhdr ch,
struct sctp_tcb stcb,
struct sctp_nets net,
uint32_t  limit 
)
static

Definition at line 1066 of file sctp_input.c.

References sctp_tcb::asoc, sctp_error_stale_cookie::cause, sctp_error_unrecognized_chunk::cause, sctp_error_unrecognized_chunk::ch, sctp_chunkhdr::chunk_flags, sctp_chunkhdr::chunk_length, sctp_chunkhdr::chunk_type, sctp_error_cause::code, sctp_association::cookie_preserve_req, sctp_error_cause::length, sctp_association::max_init_times, sctp_paramhdr::param_type, sctp_abort_notification(), SCTP_CAUSE_COOKIE_IN_SHUTDOWN, SCTP_CAUSE_DELETING_LAST_ADDR, SCTP_CAUSE_DELETING_SRC_ADDR, SCTP_CAUSE_INVALID_PARAM, SCTP_CAUSE_INVALID_STREAM, SCTP_CAUSE_MISSING_PARAM, SCTP_CAUSE_NAT_COLLIDING_STATE, SCTP_CAUSE_NAT_MISSING_STATE, SCTP_CAUSE_NO_USER_DATA, SCTP_CAUSE_OUT_OF_RESC, SCTP_CAUSE_RESOURCE_SHORTAGE, SCTP_CAUSE_STALE_COOKIE, SCTP_CAUSE_UNRECOG_CHUNK, SCTP_CAUSE_UNRECOG_PARAM, SCTP_CAUSE_UNRESOLVABLE_ADDR, SCTP_DEBUG_INPUT1, SCTP_DEBUG_INPUT2, sctp_tcb::sctp_ep, sctp_free_assoc(), SCTP_FROM_SCTP_INPUT, SCTP_GET_STATE, sctp_handle_nat_colliding_state(), sctp_handle_nat_missing_state(), SCTP_LOC_12, SCTP_NORMAL_PROC, SCTP_NOTIFY_REMOTE_ERROR, sctp_process_unrecog_chunk(), sctp_process_unrecog_param(), sctp_send_initiate(), SCTP_SET_STATE, SCTP_SIZE32, SCTP_SO_NOT_LOCKED, SCTP_STATE_COOKIE_ECHOED, SCTP_STATE_COOKIE_WAIT, sctp_stop_all_cookie_timers(), sctp_toss_old_cookies(), sctp_ulp_notify(), SCTPDBG, sctp_association::stale_cookie_count, and sctp_error_stale_cookie::stale_time.

Referenced by sctp_process_control().

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

◆ sctp_handle_heartbeat_ack()

static void sctp_handle_heartbeat_ack ( struct sctp_heartbeat_chunk cp,
struct sctp_tcb stcb,
struct sctp_nets net 
)
static

Definition at line 528 of file sctp_input.c.

References sctp_heartbeat_info_param::addr_family, sctp_heartbeat_info_param::addr_len, sctp_heartbeat_info_param::address, sctp_association::alternate, sctp_tcb::asoc, sctp_association::cc_functions, sctp_heartbeat_chunk::ch, sctp_chunkhdr::chunk_length, sctp_association::deleted_primary, sctp_nets::dest_state, sctp_nets::error_count, sctp_heartbeat::hb_info, sctp_nets::hb_responded, sctp_heartbeat_chunk::heartbeat, sctp_nets::heartbeat_random1, sctp_nets::heartbeat_random2, sctp_association::nets, sctp_association::overall_error_count, sctp_association::primary_destination, sctp_heartbeat_info_param::random_value1, sctp_heartbeat_info_param::random_value2, sctp_tcb::rport, sctp_sockstore::sa, SCTP_ADDR_PF, SCTP_ADDR_REACHABLE, SCTP_ADDR_REQ_PRIMARY, SCTP_ADDR_UNCONFIRMED, sctp_assoc_immediate_retrans(), SCTP_BASE_SYSCTL, sctp_calculate_rto(), sctp_cc_functions::sctp_cwnd_update_exit_pf, SCTP_DEBUG_INPUT1, sctp_delete_prim_timer(), sctp_tcb::sctp_ep, sctp_findnet(), sctp_free_remote_addr, SCTP_FROM_SCTP_INPUT, sctp_is_mobility_feature_on, SCTP_LOC_4, SCTP_LOC_5, SCTP_LOC_6, sctp_misc_ints(), SCTP_MOBILITY_BASE, SCTP_MOBILITY_FASTHANDOFF, SCTP_MOBILITY_PRIM_DELETED, sctp_move_chunks_from_net(), SCTP_NOTIFY_INTERFACE_CONFIRMED, SCTP_NOTIFY_INTERFACE_UP, SCTP_RTT_FROM_NON_DATA, SCTP_SO_NOT_LOCKED, SCTP_THRESHOLD_CLEAR, SCTP_THRESHOLD_LOGGING, sctp_timer_start(), sctp_timer_stop(), SCTP_TIMER_TYPE_HEARTBEAT, SCTP_TIMER_TYPE_PRIM_DELETED, sctp_ulp_notify(), SCTPDBG, sctp_sockstore::sin, sctp_sockstore::sin6, sockaddr_in::sin_addr, sockaddr_in::sin_family, sockaddr_in::sin_len, sockaddr_in::sin_port, sctp_heartbeat_info_param::time_value_1, and sctp_heartbeat_info_param::time_value_2.

Referenced by sctp_process_control().

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

◆ sctp_handle_init()

◆ sctp_handle_init_ack()

◆ sctp_handle_nat_colliding_state()

◆ sctp_handle_nat_missing_state()

static int sctp_handle_nat_missing_state ( struct sctp_tcb stcb,
struct sctp_nets net 
)
static

Definition at line 729 of file sctp_input.c.

References sctp_tcb::asoc, sctp_association::auth_supported, sctp_asconf_send_nat_state_update(), SCTP_DEBUG_INPUT2, and SCTPDBG.

Referenced by sctp_handle_abort(), and sctp_handle_error().

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

◆ sctp_handle_packet_dropped()

◆ sctp_handle_shutdown()

◆ sctp_handle_shutdown_ack()

◆ sctp_handle_shutdown_complete()

◆ sctp_handle_str_reset_add_out_strm()

◆ sctp_handle_str_reset_add_strm()

◆ sctp_handle_str_reset_request_in()

◆ sctp_handle_str_reset_request_out()

◆ sctp_handle_str_reset_request_tsn()

static int sctp_handle_str_reset_request_tsn ( struct sctp_tcb stcb,
struct sctp_tmit_chunk chk,
struct sctp_stream_reset_tsn_request req 
)
static

◆ sctp_handle_stream_reset()

static int sctp_handle_stream_reset ( struct sctp_tcb stcb,
struct mbuf *  m,
int  offset,
struct sctp_chunkhdr ch_req 
)
static

Definition at line 3957 of file sctp_input.c.

References sctp_tcb::asoc, sctp_tmit_chunk::asoc, sctp_tmit_chunk::book_size, sctp_tmit_chunk::book_size_scale, chk_id::can_take_data, sctp_chunkhdr::chunk_flags, sctp_tmit_chunk::chunk_id, sctp_chunkhdr::chunk_length, sctp_chunkhdr::chunk_type, sctp_association::control_send_queue, sctp_tmit_chunk::copy_by_ref, sctp_association::ctrl_queue_cnt, sctp_tmit_chunk::data, sctp_tmit_chunk::flags, chk_id::id, sctp_tmit_chunk::no_fr_allowed, sctp_paramhdr::param_length, sctp_paramhdr::param_type, sctp_stream_reset_out_request::ph, sctp_stream_reset_in_request::ph, sctp_stream_reset_tsn_request::ph, sctp_stream_reset_response::ph, sctp_stream_reset_add_strm::ph, sctp_tmit_chunk::rec, sctp_stream_reset_out_request::response_seq, sctp_stream_reset_response::response_seq, sctp_stream_reset_response::result, sctp_alloc_a_chunk, SCTP_BUF_LEN, SCTP_BUF_RESV_UF, SCTP_CHUNK_BUFFER_SIZE, SCTP_DATAGRAM_UNSENT, sctp_free_a_chunk, sctp_get_mbuf_for_msg(), sctp_handle_str_reset_add_out_strm(), sctp_handle_str_reset_add_strm(), sctp_handle_str_reset_request_in(), sctp_handle_str_reset_request_out(), sctp_handle_str_reset_request_tsn(), sctp_handle_stream_reset_response(), sctp_m_freem, sctp_m_getptr(), SCTP_MAX_RESET_PARAMS, SCTP_MIN_OVERHEAD, SCTP_SIZE32, SCTP_SO_NOT_LOCKED, SCTP_STR_RESET_ADD_IN_STREAMS, SCTP_STR_RESET_ADD_OUT_STREAMS, SCTP_STR_RESET_IN_REQUEST, SCTP_STR_RESET_OUT_REQUEST, SCTP_STR_RESET_RESPONSE, SCTP_STR_RESET_TSN_REQUEST, SCTP_STREAM_RESET, SCTP_STREAM_RESET_RESULT_PERFORMED, sctp_tmit_chunk::send_size, sctp_tmit_chunk::sent, sctp_tmit_chunk::snd_count, sctp_association::str_reset_seq_out, sctp_association::stream_reset_outstanding, and sctp_tmit_chunk::whoTo.

Referenced by sctp_process_control().

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

◆ sctp_handle_stream_reset_response()

static int sctp_handle_stream_reset_response ( struct sctp_tcb stcb,
uint32_t  seq,
uint32_t  action,
struct sctp_stream_reset_response respin 
)
static

a) Adopt the new in tsn. b) reset the map c) Adopt the new out-tsn

Definition at line 3430 of file sctp_input.c.

References sctp_tcb::asoc, sctp_forward_tsn_chunk::ch, sctp_chunkhdr::chunk_length, sctp_chunkhdr::chunk_type, sctp_association::cumulative_tsn, sctp_association::highest_tsn_inside_map, sctp_association::highest_tsn_inside_nr_map, sctp_association::last_acked_seq, sctp_stream_reset_out_request::list_of_streams, sctp_stream_reset_in_request::list_of_streams, sctp_association::mapping_array, sctp_association::mapping_array_base_tsn, sctp_association::mapping_array_size, sctp_forward_tsn_chunk::new_cumulative_tsn, sctp_association::nr_mapping_array, sctp_paramhdr::param_length, sctp_paramhdr::param_type, sctp_stream_reset_request::ph, sctp_stream_reset_response::ph, sctp_stream_reset_response_tsn::receivers_next_tsn, SCTP_ASSOC_RESET_DENIED, SCTP_ASSOC_RESET_FAILED, SCTP_BASE_SYSCTL, sctp_clean_up_stream_reset(), sctp_find_stream_reset(), SCTP_FORWARD_CUM_TSN, sctp_handle_forward_tsn(), sctp_log_map(), SCTP_MAP_LOGGING_ENABLE, SCTP_MAP_SLIDE_RESULT, SCTP_NOTIFY_STR_RESET_DENIED_IN, SCTP_NOTIFY_STR_RESET_DENIED_OUT, SCTP_NOTIFY_STR_RESET_FAILED_IN, SCTP_NOTIFY_STR_RESET_FAILED_OUT, sctp_notify_stream_reset_add(), sctp_notify_stream_reset_tsn(), sctp_reset_clear_pending(), sctp_reset_in_stream(), sctp_reset_out_streams(), sctp_send_stream_reset_out_if_possible(), SCTP_SO_NOT_LOCKED, SCTP_STR_RESET_ADD_IN_STREAMS, SCTP_STR_RESET_ADD_OUT_STREAMS, SCTP_STR_RESET_IN_REQUEST, SCTP_STR_RESET_OUT_REQUEST, SCTP_STR_RESET_TSN_REQUEST, SCTP_STREAM_CHANGE_DENIED, SCTP_STREAM_CHANGE_FAILED, SCTP_STREAM_OPEN, SCTP_STREAM_RESET_RESULT_DENIED, SCTP_STREAM_RESET_RESULT_IN_PROGRESS, SCTP_STREAM_RESET_RESULT_PERFORMED, sctp_ulp_notify(), sctp_stream_reset_response_tsn::senders_next_tsn, sctp_association::sending_seq, sctp_stream_out::state, sctp_association::str_reset_seq_out, sctp_association::stream_reset_out_is_outstanding, sctp_association::stream_reset_outstanding, sctp_association::streamincnt, sctp_association::streamoutcnt, sctp_association::strm_pending_add_size, sctp_association::strm_realoutsize, sctp_association::strmout, and sctp_association::tsn_last_delivered.

Referenced by sctp_handle_stream_reset().

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

◆ sctp_is_there_unsent_data()

◆ sctp_process_control()

static struct sctp_tcb * sctp_process_control ( struct mbuf *  m,
int  iphlen,
int *  offset,
int  length,
struct sockaddr *  src,
struct sockaddr *  dst,
struct sctphdr sh,
struct sctp_chunkhdr ch,
struct sctp_inpcb inp,
struct sctp_tcb stcb,
struct sctp_nets **  netp,
int *  fwd_tsn_seen,
uint8_t  mflowtype,
uint32_t  mflowid,
uint16_t  fibnum,
uint32_t  vrf_id,
uint16_t  port 
)
static

Definition at line 4314 of file sctp_input.c.

References sctp_sack::a_rwnd, sctp_nr_sack::a_rwnd, sctp_tcb::asoc, sctp_tmit_chunk::asoc, sctp_inpcb::auth_supported, sctp_association::authenticated, sctp_sack_chunk::ch, sctp_nr_sack_chunk::ch, sctp_auth_chunk::ch, sctp_chunkhdr::chunk_flags, sctp_chunkhdr::chunk_length, sctp_chunkhdr::chunk_type, sctp_gen_error_cause::code, sctp_sack::cum_tsn_ack, sctp_nr_sack::cum_tsn_ack, sctp_inpcb::fibnum, IS_SCTP_CONTROL, sctp_association::last_acked_seq, sctp_association::last_control_chunk_from, sctp_gen_error_cause::length, sctp_association::local_auth_chunks, sctp_association::my_vtag, sctp_nr_sack_chunk::nr_sack, sctp_association::nrsack_supported, sctp_sack::num_dup_tsns, sctp_nr_sack::num_dup_tsns, sctp_sack::num_gap_ack_blks, sctp_nr_sack::num_gap_ack_blks, sctp_nr_sack::num_nr_gap_ack_blks, sctp_association::peer_vtag, sctp_association::pr_sctp_cnt, sctp_sack_chunk::sack, sctp_association::saw_sack_with_frags, sctp_association::saw_sack_with_nr_frags, sctp_abort_an_association(), SCTP_ABORT_ASSOCIATION, sctp_abort_association(), SCTP_ASCONF, SCTP_ASCONF_ACK, SCTP_ASOC_CREATE_LOCK, SCTP_ASOC_CREATE_UNLOCK, SCTP_AUTH_DIGEST_LEN_MAX, sctp_auth_is_required_chunk, SCTP_AUTHENTICATION, SCTP_BASE_SYSCTL, SCTP_BUF_LEN, SCTP_BUF_NEXT, SCTP_CAUSE_OUT_OF_RESC, SCTP_CAUSE_PROTOCOL_VIOLATION, SCTP_CAUSE_UNRECOG_CHUNK, SCTP_CHUNK_BUFFER_SIZE, sctp_chunk_output(), SCTP_COOKIE_ACK, SCTP_COOKIE_ECHO, SCTP_DEBUG_INDATA1, SCTP_DEBUG_INPUT1, SCTP_DEBUG_INPUT2, SCTP_DEBUG_INPUT3, SCTP_DIAG_INFO_LEN, SCTP_ECN_CWR, SCTP_ECN_ECHO, sctp_tcb::sctp_ep, sctp_express_handle_sack(), sctp_findassociation_ep_asconf(), sctp_inpcb::sctp_flags, SCTP_FORWARD_CUM_TSN, sctp_free_assoc(), SCTP_FROM_SCTP_INPUT, sctp_generate_cause(), sctp_get_mbuf_for_msg(), SCTP_GET_STATE, SCTP_HAD_NO_TCB, sctp_handle_abort(), sctp_handle_asconf(), sctp_handle_asconf_ack(), sctp_handle_auth(), sctp_handle_cookie_ack(), sctp_handle_cookie_echo(), sctp_handle_ecn_cwr(), sctp_handle_ecn_echo(), sctp_handle_error(), sctp_handle_forward_tsn(), sctp_handle_heartbeat_ack(), sctp_handle_init(), sctp_handle_init_ack(), sctp_handle_ootb(), sctp_handle_packet_dropped(), sctp_handle_sack(), sctp_handle_shutdown(), sctp_handle_shutdown_ack(), sctp_handle_shutdown_complete(), sctp_handle_stream_reset(), SCTP_HEARTBEAT_ACK, SCTP_HEARTBEAT_REQUEST, SCTP_IFORWARD_CUM_TSN, sctp_init_ack_chunk, SCTP_INITIATION, SCTP_INITIATION_ACK, SCTP_INP_DECR_REF, SCTP_INP_INCR_REF, SCTP_IS_LISTENING, SCTP_LARGEST_INIT_ACCEPTED, SCTP_LOC_29, SCTP_LOC_30, SCTP_LOC_31, SCTP_LTRACE_CHK, SCTP_M_COPYM, sctp_m_freem, sctp_m_getptr(), SCTP_MBUF_ICOPY, SCTP_MBUF_LOGGING_ENABLE, sctp_misc_ints(), SCTP_NORMAL_PROC, SCTP_NOTIFY_SENDER_DRY, SCTP_NR_SELECTIVE_ACK, SCTP_OPERATION_ERROR, SCTP_OUTPUT_FROM_CONTROL_PROC, SCTP_PACKET_DROPPED, SCTP_PAD_CHUNK, SCTP_PCB_FLAGS_SOCKET_ALLGONE, SCTP_PCB_FLAGS_SOCKET_GONE, SCTP_PCB_FLAGS_TCPTYPE, SCTP_PCB_FLAGS_UDPTYPE, sctp_queue_op_err(), SCTP_SELECTIVE_ACK, sctp_send_abort(), sctp_send_asconf_ack(), sctp_send_heartbeat_ack(), SCTP_SHUTDOWN, SCTP_SHUTDOWN_ACK, SCTP_SHUTDOWN_COMPLETE, SCTP_SIZE32, SCTP_SNPRINTF, SCTP_SO_NOT_LOCKED, sctp_inpcb::sctp_socket, SCTP_STAT_INCR, SCTP_STAT_INCR_COUNTER64, SCTP_STATE_COOKIE_ECHOED, SCTP_STATE_COOKIE_WAIT, SCTP_STATE_EMPTY, SCTP_STATE_INUSE, SCTP_STATE_SHUTDOWN_ACK_SENT, SCTP_STREAM_RESET, SCTP_TCB_LOCK_ASSERT, SCTP_TCB_UNLOCK, SCTP_THRESHOLD_CLEAR, SCTP_THRESHOLD_LOGGING, sctp_timer_start(), SCTP_TIMER_TYPE_SEND, SCTP_TSN_GE, sctp_ulp_notify(), SCTPDBG, sctp_association::seen_a_sack_this_pkt, sctp_association::send_queue, sctp_association::sent_queue, sctp_association::stream_queue_cnt, sctp_association::total_output_queue_size, sctphdr::v_tag, and sctp_tmit_chunk::whoTo.

Referenced by sctp_common_input_processing().

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

◆ sctp_process_cookie_existing()

static struct sctp_tcb * sctp_process_cookie_existing ( struct mbuf *  m,
int  iphlen,
int  offset,
struct sockaddr *  src,
struct sockaddr *  dst,
struct sctphdr sh,
struct sctp_state_cookie cookie,
int  cookie_len,
struct sctp_inpcb inp,
struct sctp_tcb stcb,
struct sctp_nets **  netp,
struct sockaddr *  init_src,
int *  notification,
int  auth_skipped,
uint32_t  auth_offset,
uint32_t  auth_len,
uint8_t  mflowtype,
uint32_t  mflowid,
uint32_t  vrf_id,
uint16_t  port 
)
static

Definition at line 1332 of file sctp_input.c.

References sctp_stream_out::abandoned_sent, sctp_stream_out::abandoned_unsent, sctp_association::advanced_peer_ack_point, sctp_association::asconf_ack_sent, sctp_association::asconf_queue, sctp_association::asconf_send_queue, sctp_association::asconf_seq_in, sctp_association::asconf_seq_out, sctp_association::asconf_seq_out_acked, sctp_tcb::asoc, sctp_tmit_chunk::auth_keyid, sctp_init_chunk::ch, sctp_chunkhdr::chunk_length, sctp_chunkhdr::chunk_type, sctp_stream_out::chunks_on_queues, sctp_association::control_send_queue, cookie, sctp_association::cookie_how, sctp_association::ctrl_queue_cnt, sctp_tmit_chunk::data, sctp_queued_to_read::data, sctp_asconf_ack::data, sctp_association::data_pkts_seen, sctp_inpcb::fibnum, sctp_nets::hb_responded, sctp_tmit_chunk::holds_key_ref, sctp_init_chunk::init, sctp_association::init_seq_number, sctp_init::initiate_tag, sctp_association::last_acked_seq, sctp_association::last_control_chunk_from, sctp_association::last_data_chunk_from, sctp_stream_out::last_msg_incomplete, sctp_association::last_net_cmt_send_started, sctp_association::mapping_array, sctp_association::mapping_array_size, sctp_association::my_rwnd, sctp_association::my_vtag, sctp_association::my_vtag_nonce, next, sctp_stream_out::next_mid_ordered, sctp_stream_out::next_mid_unordered, sctp_association::nr_mapping_array, sctp_association::peer_supports_nat, sctp_association::peer_vtag, sctp_association::peer_vtag_nonce, sctp_association::pending_reply_queue, sctp_nets::port, sctp_association::port, sctp_association::pre_open_streams, sctp_association::primary_destination, sctp_association::refcnt, sctp_association::resetHead, sctp_abort_association(), sctp_auth_key_release(), sctp_association::sctp_autoclose_ticks, SCTP_BASE_INFO, SCTP_BASE_SYSCTL, sctp_calculate_rto(), SCTP_CAUSE_COOKIE_IN_SHUTDOWN, SCTP_CAUSE_NAT_COLLIDING_STATE, SCTP_CAUSE_OUT_OF_RESC, sctp_chunk_output(), SCTP_DATAGRAM_RESEND, SCTP_DEBUG_INPUT1, SCTP_DECR_CHK_COUNT, sctp_tcb::sctp_ep, sctp_inpcb::sctp_flags, sctp_flight_size_decrease, SCTP_FREE, sctp_free_a_readq, sctp_free_remote_addr, SCTP_FROM_SCTP_INPUT, sctp_generate_cause(), SCTP_GET_STATE, sctp_init_ack_chunk, SCTP_INITIATION, SCTP_INITIATION_ACK, SCTP_INP_INFO_WLOCK, SCTP_INP_INFO_WUNLOCK, SCTP_INP_WLOCK, SCTP_INP_WUNLOCK, sctp_is_feature_on, SCTP_IS_LISTENING, sctp_load_addresses_from_init(), SCTP_LOC_13, SCTP_LOC_14, SCTP_LOC_15, sctp_m_freem, sctp_m_getptr(), SCTP_NOTIFY_ASSOC_RESTART, SCTP_NOTIFY_ASSOC_UP, SCTP_OUTPUT_FROM_COOKIE_ACK, SCTP_PCB_FLAGS_AUTOCLOSE, SCTP_PCB_FLAGS_CONNECTED, SCTP_PCB_FLAGS_IN_TCPPOOL, SCTP_PCB_FLAGS_TCPTYPE, SCTP_PCBHASH_ASOC, SCTP_PR_SCTP_MAX, sctp_process_cookie_new(), sctp_process_init(), sctp_report_all_outbound(), SCTP_RTT_FROM_NON_DATA, sctp_send_abort(), sctp_send_cookie_ack(), sctp_send_operr_to(), sctp_send_shutdown_ack(), SCTP_SET_STATE, SCTP_SIZE32, SCTP_SO_LOCKED, SCTP_SO_NOT_LOCKED, sctp_tcb::sctp_socket, SCTP_STAT_INCR_COUNTER32, SCTP_STAT_INCR_GAUGE32, SCTP_STATE_COOKIE_ECHOED, SCTP_STATE_COOKIE_WAIT, SCTP_STATE_OPEN, SCTP_STATE_SHUTDOWN_ACK_SENT, SCTP_STATE_SHUTDOWN_PENDING, SCTP_STATE_SHUTDOWN_RECEIVED, SCTP_STATE_SHUTDOWN_SENT, sctp_stop_all_cookie_timers(), sctp_stop_association_timers(), SCTP_TCB_LOCK, SCTP_TCB_SEND_LOCK, SCTP_TCB_SEND_UNLOCK, SCTP_TCB_UNLOCK, sctp_timer_start(), sctp_timer_stop(), SCTP_TIMER_TYPE_AUTOCLOSE, SCTP_TIMER_TYPE_HEARTBEAT, SCTP_TIMER_TYPE_INIT, SCTP_TIMER_TYPE_SHUTDOWNGUARD, sctp_toss_old_cookies(), sctp_total_flight_decrease, sctp_ucount_incr, SCTP_ZONE_FREE, SCTPDBG, sctp_association::send_sack, sctp_association::sending_seq, sctp_tmit_chunk::sent, sctp_association::sent_queue, sctp_association::sent_queue_retran_cnt, sctp_stream_out::sid, sctp_association::state, sctp_queued_to_read::stcb, sctp_association::str_reset, sctp_association::str_reset_seq_in, sctp_association::str_reset_seq_out, sctp_association::stream_reset_outstanding, sctp_association::streamoutcnt, sctp_association::strmout, sctp_association::total_flight, sctp_association::total_flight_count, sctp_queued_to_read::whoFrom, and sctp_tmit_chunk::whoTo.

Referenced by sctp_handle_cookie_echo().

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

◆ sctp_process_cookie_new()

static struct sctp_tcb * sctp_process_cookie_new ( struct mbuf *  m,
int  iphlen,
int  offset,
struct sockaddr *  src,
struct sockaddr *  dst,
struct sctphdr sh,
struct sctp_state_cookie cookie,
int  cookie_len,
struct sctp_inpcb inp,
struct sctp_nets **  netp,
struct sockaddr *  init_src,
int *  notification,
int  auth_skipped,
uint32_t  auth_offset,
uint32_t  auth_len,
uint8_t  mflowtype,
uint32_t  mflowid,
uint32_t  vrf_id,
uint16_t  port 
)
static

Definition at line 1963 of file sctp_input.c.

References sctp_tcb::asoc, sctp_association::authenticated, sctp_init_chunk::ch, sctp_chunkhdr::chunk_length, sctp_chunkhdr::chunk_type, cookie, sctp_scoping::ipv4_addr_legal, sctp_scoping::ipv4_local_scope, sctp_scoping::ipv6_addr_legal, sctp_scoping::local_scope, sctp_scoping::loopback_scope, sctp_association::my_rwnd, in_addr::s_addr, sctp_sockstore::sa, sctp_association::scope, sctp_abort_association(), sctp_aloc_assoc(), sctp_auth_get_cookie_params(), sctp_association::sctp_autoclose_ticks, sctp_calculate_rto(), SCTP_CAUSE_OUT_OF_RESC, sctp_check_address_list(), SCTP_CHUNK_BUFFER_SIZE, SCTP_DEBUG_AUTH1, SCTP_DEBUG_INPUT1, SCTP_DEBUG_INPUT2, SCTP_DONT_INITIALIZE_AUTH_PARAMS, sctp_tcb::sctp_ep, sctp_findnet(), sctp_inpcb::sctp_flags, sctp_free_assoc(), SCTP_FROM_SCTP_INPUT, sctp_generate_cause(), SCTP_GETTIME_TIMEVAL, sctp_handle_auth(), sctp_init_ack_chunk, SCTP_INITIATION, SCTP_INITIATION_ACK, SCTP_IPV4_ADDRESS, SCTP_IPV6_ADDRESS, sctp_is_feature_on, SCTP_IS_LISTENING, sctp_load_addresses_from_init(), SCTP_LOC_18, SCTP_LOC_19, SCTP_LOC_20, SCTP_LOC_21, SCTP_LOC_22, sctp_m_getptr(), SCTP_NORMAL_PROC, SCTP_NOTIFY_ASSOC_UP, SCTP_PCB_FLAGS_AUTOCLOSE, SCTP_PCB_FLAGS_CONNECTED, SCTP_PCB_FLAGS_IN_TCPPOOL, SCTP_PCB_FLAGS_TCPTYPE, sctp_process_init(), SCTP_RTT_FROM_NON_DATA, sctp_send_cookie_ack(), SCTP_SET_STATE, SCTP_SIZE32, sctp_tcb::sctp_socket, SCTP_STAT_INCR_COUNTER32, SCTP_STAT_INCR_GAUGE32, SCTP_STATE_OPEN, SCTP_STATE_SHUTDOWN_PENDING, sctp_stop_all_cookie_timers(), sctp_timer_start(), SCTP_TIMER_TYPE_AUTOCLOSE, SCTP_TIMER_TYPE_SHUTDOWNGUARD, SCTPDBG, sctp_sockstore::sin, sctp_sockstore::sin6, sockaddr_in::sin_addr, sockaddr_in::sin_family, sockaddr_in::sin_len, sctp_scoping::site_scope, sctp_association::state, and sctp_association::time_entered.

Referenced by sctp_handle_cookie_echo(), and sctp_process_cookie_existing().

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

◆ sctp_process_init()

static int sctp_process_init ( struct sctp_init_chunk cp,
struct sctp_tcb stcb 
)
static

Definition at line 242 of file sctp_input.c.

References sctp_init::a_rwnd, sctp_association::advanced_peer_ack_point, sctp_association::asconf_seq_in, sctp_tcb::asoc, sctp_tmit_chunk::asoc, sctp_stream_out::chunks_on_queues, sctp_association::cumulative_tsn, sctp_tmit_chunk::data, sctp_stream_queue_pending::data, sctp_stream_in::delivery_started, sctp_association::highest_tsn_inside_map, sctp_association::highest_tsn_inside_nr_map, sctp_init_chunk::init, sctp_init::initial_tsn, sctp_init::initiate_tag, sctp_stream_in::inqueue, sctp_association::last_acked_seq, sctp_stream_in::last_mid_delivered, sctp_association::mapping_array_base_tsn, sctp_association::max_inbound_streams, sctp_stream_queue_pending::net, sctp_association::nets, next, sctp_init::num_inbound_streams, sctp_init::num_outbound_streams, sctp_stream_out::outqueue, sctp_stream_in::pd_api_started, sctp_association::peer_vtag, sctp_association::peers_rwnd, sctp_association::pre_open_streams, sctp_tmit_chunk::rec, SCTP_BASE_SYSCTL, sctp_clean_up_stream(), SCTP_CWND_INITIALIZATION, SCTP_CWND_LOGGING_ENABLE, SCTP_CWND_MONITOR_ENABLE, SCTP_DEBUG_INPUT2, SCTP_FREE, sctp_free_a_chunk, sctp_free_a_strmoq, sctp_free_bufspace, sctp_free_remote_addr, sctp_log_cwnd(), sctp_log_map(), sctp_m_freem, SCTP_MALLOC, SCTP_MAP_LOGGING_ENABLE, SCTP_MAP_SLIDE_RESULT, SCTP_NOTIFY_SPECIAL_SP_FAIL, SCTP_NOTIFY_UNSENT_DG_FAIL, SCTP_SO_NOT_LOCKED, sctp_ss_functions::sctp_ss_remove_from_stream, SCTP_STREAM_CLOSED, SCTP_STREAM_OPEN, SCTP_TCB_SEND_LOCK, SCTP_TCB_SEND_UNLOCK, sctp_ulp_notify(), SCTPDBG, sctp_association::send_queue, sctp_association::send_queue_cnt, sctp_data_chunkrec::sid, sctp_stream_in::sid, sctp_association::ss_functions, sctp_nets::ssthresh, sctp_stream_out::state, sctp_association::str_reset_seq_in, sctp_association::stream_queue_cnt, sctp_association::streamincnt, sctp_association::streamoutcnt, sctp_association::strmin, sctp_association::strmout, sctp_association::tsn_last_delivered, and sctp_stream_in::uno_inqueue.

Referenced by sctp_process_cookie_existing(), sctp_process_cookie_new(), and sctp_process_init_ack().

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

◆ sctp_process_init_ack()

static int sctp_process_init_ack ( struct mbuf *  m,
int  iphlen,
int  offset,
struct sockaddr *  src,
struct sockaddr *  dst,
struct sctphdr sh,
struct sctp_init_ack_chunk cp,
struct sctp_tcb stcb,
struct sctp_nets net,
int *  abort_no_unlock,
uint8_t  mflowtype,
uint32_t  mflowid,
uint32_t  vrf_id 
)
static

◆ sctp_process_unrecog_chunk()

static void sctp_process_unrecog_chunk ( struct sctp_tcb stcb,
uint8_t  chunk_type 
)
static

Definition at line 1006 of file sctp_input.c.

References sctp_tcb::asoc, sctp_association::prsctp_supported, SCTP_ASCONF, SCTP_ASCONF_ACK, sctp_asconf_cleanup(), SCTP_DEBUG_INPUT2, SCTP_FORWARD_CUM_TSN, SCTP_IFORWARD_CUM_TSN, and SCTPDBG.

Referenced by sctp_handle_error().

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

◆ sctp_process_unrecog_param()

◆ sctp_reset_clear_pending()

static void sctp_reset_clear_pending ( struct sctp_tcb stcb,
uint32_t  number_entries,
uint16_t list 
)
static

Definition at line 3343 of file sctp_input.c.

References sctp_tcb::asoc, SCTP_STREAM_OPEN, sctp_stream_out::state, sctp_association::streamoutcnt, and sctp_association::strmout.

Referenced by sctp_handle_stream_reset_response().

Here is the caller graph for this function:

◆ sctp_reset_in_stream()

void sctp_reset_in_stream ( struct sctp_tcb stcb,
uint32_t  number_entries,
uint16_t list 
)

◆ sctp_reset_out_streams()

static void sctp_reset_out_streams ( struct sctp_tcb stcb,
uint32_t  number_entries,
uint16_t list 
)
static

◆ sctp_start_net_timers()

static void sctp_start_net_timers ( struct sctp_tcb stcb)
static

◆ sctp_stop_all_cookie_timers()