FreeBSD kernel IPv4 code
|
#include <sys/cdefs.h>
#include <netinet/sctp_os.h>
#include <netinet/sctp_pcb.h>
#include <netinet/sctputil.h>
#include <netinet/sctp_var.h>
#include <netinet/sctp_sysctl.h>
#include <netinet/sctp_header.h>
#include <netinet/sctp_output.h>
#include <netinet/sctp_uio.h>
#include <netinet/sctp_timer.h>
#include <netinet/sctp_indata.h>
#include <netinet/sctp_auth.h>
#include <netinet/sctp_asconf.h>
#include <netinet/sctp_bsd_addr.h>
#include <netinet/sctp_kdtrace.h>
#include <netinet/udp.h>
#include <netinet/udp_var.h>
#include <sys/proc.h>
Go to the source code of this file.
Macros | |
#define | KTR_SCTP KTR_SUBSYS |
Functions | |
__FBSDID ("$FreeBSD$") | |
void | sctp_sblog (struct sockbuf *sb, struct sctp_tcb *stcb, int from, int incr) |
void | sctp_log_closing (struct sctp_inpcb *inp, struct sctp_tcb *stcb, int16_t loc) |
void | rto_logging (struct sctp_nets *net, int from) |
void | sctp_log_strm_del_alt (struct sctp_tcb *stcb, uint32_t tsn, uint16_t sseq, uint16_t stream, int from) |
void | sctp_log_nagle_event (struct sctp_tcb *stcb, int action) |
void | sctp_log_sack (uint32_t old_cumack, uint32_t cumack, uint32_t tsn, uint16_t gaps, uint16_t dups, int from) |
void | sctp_log_map (uint32_t map, uint32_t cum, uint32_t high, int from) |
void | sctp_log_fr (uint32_t biggest_tsn, uint32_t biggest_new_tsn, uint32_t tsn, int from) |
void | sctp_log_strm_del (struct sctp_queued_to_read *control, struct sctp_queued_to_read *poschk, int from) |
void | sctp_log_cwnd (struct sctp_tcb *stcb, struct sctp_nets *net, int augment, uint8_t from) |
void | sctp_log_lock (struct sctp_inpcb *inp, struct sctp_tcb *stcb, uint8_t from) |
void | sctp_log_maxburst (struct sctp_tcb *stcb, struct sctp_nets *net, int error, int burst, uint8_t from) |
void | sctp_log_rwnd (uint8_t from, uint32_t peers_rwnd, uint32_t snd_size, uint32_t overhead) |
void | sctp_log_rwnd_set (uint8_t from, uint32_t peers_rwnd, uint32_t flight_size, uint32_t overhead, uint32_t a_rwndval) |
void | sctp_misc_ints (uint8_t from, uint32_t a, uint32_t b, uint32_t c, uint32_t d) |
void | sctp_wakeup_log (struct sctp_tcb *stcb, uint32_t wake_cnt, int from) |
void | sctp_log_block (uint8_t from, struct sctp_association *asoc, ssize_t sendlen) |
int | sctp_fill_stat_log (void *optval SCTP_UNUSED, size_t *optsize SCTP_UNUSED) |
uint32_t | sctp_msecs_to_ticks (uint32_t msecs) |
uint32_t | sctp_ticks_to_msecs (uint32_t ticks) |
uint32_t | sctp_secs_to_ticks (uint32_t secs) |
uint32_t | sctp_ticks_to_secs (uint32_t ticks) |
void | sctp_stop_timers_for_shutdown (struct sctp_tcb *stcb) |
void | sctp_stop_association_timers (struct sctp_tcb *stcb, bool stop_assoc_kill_timer) |
uint32_t | sctp_get_prev_mtu (uint32_t val) |
uint32_t | sctp_get_next_mtu (uint32_t val) |
void | sctp_fill_random_store (struct sctp_pcb *m) |
uint32_t | sctp_select_initial_TSN (struct sctp_pcb *inp) |
uint32_t | sctp_select_a_tag (struct sctp_inpcb *inp, uint16_t lport, uint16_t rport, int check) |
int32_t | sctp_map_assoc_state (int kernel_state) |
int | sctp_init_asoc (struct sctp_inpcb *inp, struct sctp_tcb *stcb, uint32_t override_tag, uint32_t initial_tsn, uint32_t vrf_id, uint16_t o_strms) |
void | sctp_print_mapping_array (struct sctp_association *asoc) |
int | sctp_expand_mapping_array (struct sctp_association *asoc, uint32_t needed) |
static void | sctp_iterator_work (struct sctp_iterator *it) |
void | sctp_iterator_worker (void) |
static void | sctp_handle_addr_wq (void) |
void | sctp_timeout_handler (void *t) |
void | sctp_timer_start (int t_type, struct sctp_inpcb *inp, struct sctp_tcb *stcb, struct sctp_nets *net) |
void | sctp_timer_stop (int t_type, struct sctp_inpcb *inp, struct sctp_tcb *stcb, struct sctp_nets *net, uint32_t from) |
uint32_t | sctp_calculate_len (struct mbuf *m) |
int | sctp_calculate_rto (struct sctp_tcb *stcb, struct sctp_association *asoc, struct sctp_nets *net, struct timeval *old, int rtt_from_sack) |
caddr_t | sctp_m_getptr (struct mbuf *m, int off, int len, uint8_t *in_ptr) |
struct sctp_paramhdr * | sctp_get_next_param (struct mbuf *m, int offset, struct sctp_paramhdr *pull, int pull_limit) |
struct mbuf * | sctp_add_pad_tombuf (struct mbuf *m, int padlen) |
struct mbuf * | sctp_pad_lastmbuf (struct mbuf *m, int padval, struct mbuf *last_mbuf) |
static void | sctp_notify_assoc_change (uint16_t state, struct sctp_tcb *stcb, uint16_t error, struct sctp_abort_chunk *abort, bool from_peer, bool timedout, int so_locked) |
static void | sctp_notify_peer_addr_change (struct sctp_tcb *stcb, uint32_t state, struct sockaddr *sa, uint32_t error, int so_locked) |
static void | sctp_notify_send_failed (struct sctp_tcb *stcb, uint8_t sent, uint32_t error, struct sctp_tmit_chunk *chk, int so_locked) |
static void | sctp_notify_send_failed2 (struct sctp_tcb *stcb, uint32_t error, struct sctp_stream_queue_pending *sp, int so_locked) |
static void | sctp_notify_adaptation_layer (struct sctp_tcb *stcb) |
static void | sctp_notify_partial_delivery_indication (struct sctp_tcb *stcb, uint32_t error, uint32_t val, int so_locked) |
static void | sctp_notify_shutdown_event (struct sctp_tcb *stcb) |
static void | sctp_notify_sender_dry_event (struct sctp_tcb *stcb, int so_locked) |
void | sctp_notify_stream_reset_add (struct sctp_tcb *stcb, uint16_t numberin, uint16_t numberout, int flag) |
void | sctp_notify_stream_reset_tsn (struct sctp_tcb *stcb, uint32_t sending_tsn, uint32_t recv_tsn, int flag) |
static void | sctp_notify_stream_reset (struct sctp_tcb *stcb, int number_entries, uint16_t *list, int flag) |
static void | sctp_notify_remote_error (struct sctp_tcb *stcb, uint16_t error, struct sctp_error_chunk *chunk) |
void | sctp_ulp_notify (uint32_t notification, struct sctp_tcb *stcb, uint32_t error, void *data, int so_locked) |
void | sctp_report_all_outbound (struct sctp_tcb *stcb, uint16_t error, int so_locked) |
void | sctp_abort_notification (struct sctp_tcb *stcb, bool from_peer, bool timeout, uint16_t error, struct sctp_abort_chunk *abort, int so_locked) |
void | sctp_abort_association (struct sctp_inpcb *inp, struct sctp_tcb *stcb, struct mbuf *m, int iphlen, struct sockaddr *src, struct sockaddr *dst, struct sctphdr *sh, struct mbuf *op_err, uint8_t mflowtype, uint32_t mflowid, uint32_t vrf_id, uint16_t port) |
void | sctp_abort_an_association (struct sctp_inpcb *inp, struct sctp_tcb *stcb, struct mbuf *op_err, bool timedout, int so_locked) |
void | sctp_handle_ootb (struct mbuf *m, int iphlen, int offset, struct sockaddr *src, struct sockaddr *dst, struct sctphdr *sh, struct sctp_inpcb *inp, struct mbuf *cause, uint8_t mflowtype, uint32_t mflowid, uint16_t fibnum, uint32_t vrf_id, uint16_t port) |
int | sctp_is_there_an_abort_here (struct mbuf *m, int iphlen, uint32_t *vtag) |
int | sctp_cmpaddr (struct sockaddr *sa1, struct sockaddr *sa2) |
void | sctp_print_address (struct sockaddr *sa) |
void | sctp_pull_off_control_to_new_inp (struct sctp_inpcb *old_inp, struct sctp_inpcb *new_inp, struct sctp_tcb *stcb, int waitflags) |
void | sctp_wakeup_the_read_socket (struct sctp_inpcb *inp, struct sctp_tcb *stcb, int so_locked SCTP_UNUSED) |
void | sctp_add_to_readq (struct sctp_inpcb *inp, struct sctp_tcb *stcb, struct sctp_queued_to_read *control, struct sockbuf *sb, int end, int inp_read_lock_held, int so_locked) |
struct mbuf * | sctp_generate_cause (uint16_t code, char *info) |
struct mbuf * | sctp_generate_no_user_data_cause (uint32_t tsn) |
int | sctp_release_pr_sctp_chunk (struct sctp_tcb *stcb, struct sctp_tmit_chunk *tp1, uint8_t sent, int so_locked) |
struct sctp_ifa * | sctp_find_ifa_in_ep (struct sctp_inpcb *inp, struct sockaddr *addr, int holds_lock) |
uint32_t | sctp_get_ifa_hash_val (struct sockaddr *addr) |
struct sctp_ifa * | sctp_find_ifa_by_addr (struct sockaddr *addr, uint32_t vrf_id, int holds_lock) |
static void | sctp_user_rcvd (struct sctp_tcb *stcb, uint32_t *freed_so_far, int hold_rlock, uint32_t rwnd_req) |
int | sctp_sorecvmsg (struct socket *so, struct uio *uio, struct mbuf **mp, struct sockaddr *from, int fromlen, int *msg_flags, struct sctp_sndrcvinfo *sinfo, int filling_sinfo) |
int | sctp_dynamic_set_primary (struct sockaddr *sa, uint32_t vrf_id) |
int | sctp_soreceive (struct socket *so, struct sockaddr **psa, struct uio *uio, struct mbuf **mp0, struct mbuf **controlp, int *flagsp) |
int | sctp_connectx_helper_add (struct sctp_tcb *stcb, struct sockaddr *addr, int totaddr, int *error) |
int | sctp_connectx_helper_find (struct sctp_inpcb *inp, struct sockaddr *addr, unsigned int totaddr, unsigned int *num_v4, unsigned int *num_v6, unsigned int limit) |
void | sctp_bindx_add_address (struct socket *so, struct sctp_inpcb *inp, struct sockaddr *sa, uint32_t vrf_id, int *error, void *p) |
void | sctp_bindx_delete_address (struct sctp_inpcb *inp, struct sockaddr *sa, uint32_t vrf_id, int *error) |
int | sctp_local_addr_count (struct sctp_tcb *stcb) |
static void | sctp_recv_udp_tunneled_packet (struct mbuf *m, int off, struct inpcb *inp, const struct sockaddr *sa SCTP_UNUSED, void *ctx SCTP_UNUSED) |
void | sctp_over_udp_stop (void) |
int | sctp_over_udp_start (void) |
uint32_t | sctp_min_mtu (uint32_t mtu1, uint32_t mtu2, uint32_t mtu3) |
void | sctp_hc_set_mtu (union sctp_sockstore *addr, uint16_t fibnum, uint32_t mtu) |
uint32_t | sctp_hc_get_mtu (union sctp_sockstore *addr, uint16_t fibnum) |
void | sctp_set_state (struct sctp_tcb *stcb, int new_state) |
void | sctp_add_substate (struct sctp_tcb *stcb, int substate) |
Variables | |
const struct sctp_cc_functions | sctp_cc_functions [] |
const struct sctp_ss_functions | sctp_ss_functions [] |
static uint32_t | sctp_mtu_sizes [] |
#define KTR_SCTP KTR_SUBSYS |
Definition at line 66 of file sctputil.c.
__FBSDID | ( | "$FreeBSD$" | ) |
void rto_logging | ( | struct sctp_nets * | net, |
int | from | ||
) |
Definition at line 122 of file sctputil.c.
References sctp_cwnd_log::from, KTR_SCTP, sctp_misc_info::log1, sctp_misc_info::log2, sctp_misc_info::log3, sctp_misc_info::log4, sctp_cwnd_log::misc, sctp_rto_log::net, sctp_cwnd_log::rto, sctp_nets::rtt, sctp_rto_log::rtt, SCTP_CTR6, SCTP_LOG_EVENT_RTT, and sctp_cwnd_log::x.
Referenced by sctp_calculate_rto().
void sctp_abort_an_association | ( | struct sctp_inpcb * | inp, |
struct sctp_tcb * | stcb, | ||
struct mbuf * | op_err, | ||
bool | timedout, | ||
int | so_locked | ||
) |
Definition at line 4465 of file sctputil.c.
References sctp_gen_error_cause::code, sctp_abort_notification(), sctp_inpcb::sctp_asoc_list, SCTP_CALLED_DIRECTLY_NOCMPSET, sctp_inpcb::sctp_flags, sctp_free_assoc(), SCTP_FREE_SHOULD_USE_ABORT, SCTP_FROM_SCTPUTIL, SCTP_GET_STATE, sctp_inpcb_free(), SCTP_LOC_5, SCTP_NORMAL_PROC, SCTP_PCB_FLAGS_SOCKET_GONE, sctp_send_abort_tcb(), SCTP_STAT_DECR_GAUGE32, SCTP_STAT_INCR_COUNTER32, SCTP_STATE_OPEN, and SCTP_STATE_SHUTDOWN_RECEIVED.
Referenced by sctp_abort_in_reasm(), sctp_chunk_retransmission(), sctp_cookie_timer(), sctp_express_handle_sack(), sctp_handle_asconf_ack(), sctp_handle_forward_tsn(), sctp_handle_sack(), sctp_load_addresses_from_init(), sctp_lower_sosend(), sctp_process_a_data_chunk(), sctp_process_control(), sctp_process_data(), sctp_process_init_ack(), sctp_queue_data_to_stream(), sctp_sendall_iterator(), sctp_shutdown(), sctp_threshold_management(), and sctp_timeout_handler().
void sctp_abort_association | ( | struct sctp_inpcb * | inp, |
struct sctp_tcb * | stcb, | ||
struct mbuf * | m, | ||
int | iphlen, | ||
struct sockaddr * | src, | ||
struct sockaddr * | dst, | ||
struct sctphdr * | sh, | ||
struct mbuf * | op_err, | ||
uint8_t | mflowtype, | ||
uint32_t | mflowid, | ||
uint32_t | vrf_id, | ||
uint16_t | port | ||
) |
Definition at line 4361 of file sctputil.c.
References sctp_tcb::asoc, sctp_gen_error_cause::code, sctp_inpcb::fibnum, sctp_association::peer_vtag, sctp_abort_notification(), sctp_free_assoc(), SCTP_FROM_SCTPUTIL, SCTP_GET_STATE, SCTP_LOC_4, SCTP_NORMAL_PROC, sctp_send_abort(), SCTP_SO_NOT_LOCKED, SCTP_STAT_DECR_GAUGE32, SCTP_STAT_INCR_COUNTER32, SCTP_STATE_OPEN, SCTP_STATE_SHUTDOWN_RECEIVED, and sctp_association::vrf_id.
Referenced by sctp_handle_cookie_echo(), sctp_handle_init_ack(), sctp_process_control(), sctp_process_cookie_existing(), sctp_process_cookie_new(), and sctp_process_init_ack().
void sctp_abort_notification | ( | struct sctp_tcb * | stcb, |
bool | from_peer, | ||
bool | timeout, | ||
uint16_t | error, | ||
struct sctp_abort_chunk * | abort, | ||
int | so_locked | ||
) |
Definition at line 4327 of file sctputil.c.
References sctp_tcb::asoc, SCTP_ADD_SUBSTATE, sctp_tcb::sctp_ep, sctp_inpcb::sctp_flags, SCTP_NOTIFY_ASSOC_LOC_ABORTED, SCTP_NOTIFY_ASSOC_REM_ABORTED, SCTP_NOTIFY_ASSOC_TIMEDOUT, SCTP_PCB_FLAGS_CONNECTED, SCTP_PCB_FLAGS_IN_TCPPOOL, SCTP_PCB_FLAGS_SOCKET_ALLGONE, SCTP_PCB_FLAGS_SOCKET_GONE, SCTP_PCB_FLAGS_TCPTYPE, SCTP_PCB_FLAGS_WAS_ABORTED, sctp_report_all_outbound(), SCTP_STATE_CLOSED_SOCKET, SCTP_STATE_WAS_ABORTED, SCTP_TCB_SEND_LOCK, SCTP_TCB_SEND_UNLOCK, sctp_ulp_notify(), and sctp_association::state.
Referenced by sctp_abort_an_association(), sctp_abort_association(), sctp_handle_abort(), and sctp_handle_error().
struct mbuf * sctp_add_pad_tombuf | ( | struct mbuf * | m, |
int | padlen | ||
) |
Definition at line 3084 of file sctputil.c.
References SCTP_BUF_LEN, SCTP_BUF_NEXT, and sctp_get_mbuf_for_msg().
Referenced by sctp_arethere_unrecognized_parameters(), sctp_pad_lastmbuf(), sctp_queue_op_err(), sctp_send_abort_tcb(), sctp_send_initiate(), sctp_send_initiate_ack(), and sctp_send_resp_msg().
void sctp_add_substate | ( | struct sctp_tcb * | stcb, |
int | substate | ||
) |
Definition at line 7649 of file sctputil.c.
References sctp_tcb::asoc, SCTP_PROBE6, SCTP_STATE_ABOUT_TO_BE_FREED, SCTP_STATE_MASK, SCTP_STATE_SHUTDOWN_PENDING, and sctp_association::state.
void sctp_add_to_readq | ( | struct sctp_inpcb * | inp, |
struct sctp_tcb * | stcb, | ||
struct sctp_queued_to_read * | control, | ||
struct sockbuf * | sb, | ||
int | end, | ||
int | inp_read_lock_held, | ||
int | so_locked | ||
) |
Definition at line 4845 of file sctputil.c.
References sctp_queued_to_read::data, sctp_queued_to_read::do_not_ref_stcb, sctp_queued_to_read::end_added, sctp_queued_to_read::held_length, sctp_queued_to_read::length, M_NOTIFICATION, next, sctp_queued_to_read::on_read_q, sctp_queued_to_read::on_strm_q, sctp_inpcb::read_queue, SCTP_BASE_SYSCTL, SCTP_BUF_LEN, SCTP_BUF_NEXT, sctp_inpcb::sctp_flags, sctp_free_a_readq, sctp_free_remote_addr, SCTP_INP_READ_LOCK, SCTP_INP_READ_UNLOCK, SCTP_LOG_SBALLOC, SCTP_LOG_SBRESULT, sctp_m_free, sctp_m_freem, SCTP_PCB_FLAGS_SOCKET_CANT_READ, SCTP_SB_LOGGING_ENABLE, sctp_sballoc, sctp_sblog(), sctp_inpcb::sctp_socket, sctp_wakeup_the_read_socket(), sctp_queued_to_read::spec_flags, sctp_queued_to_read::tail_mbuf, sctp_inpcb::total_recvs, sctp_tcb::total_recvs, and sctp_queued_to_read::whoFrom.
Referenced by sctp_deliver_reasm_check(), sctp_handle_old_unordered_data(), sctp_kick_prsctp_reorder_queue(), sctp_notify_adaptation_layer(), sctp_notify_assoc_change(), sctp_notify_authentication(), sctp_notify_peer_addr_change(), sctp_notify_remote_error(), sctp_notify_send_failed(), sctp_notify_send_failed2(), sctp_notify_sender_dry_event(), sctp_notify_shutdown_event(), sctp_notify_stream_reset(), sctp_notify_stream_reset_add(), sctp_notify_stream_reset_tsn(), sctp_process_a_data_chunk(), sctp_queue_data_for_reasm(), and sctp_queue_data_to_stream().
void sctp_bindx_add_address | ( | struct socket * | so, |
struct sctp_inpcb * | inp, | ||
struct sockaddr * | sa, | ||
uint32_t | vrf_id, | ||
int * | error, | ||
void * | p | ||
) |
Definition at line 6733 of file sctputil.c.
References sctp_inpcb::inp, SCTP_ADD_IP_ADDRESS, sctp_addr_mgmt_ep_sa(), sctp_inpcb::sctp_flags, SCTP_FROM_SCTPUTIL, SCTP_INP_DECR_REF, sctp_inpcb_bind(), SCTP_IPV6_V6ONLY, SCTP_LTRACE_ERR_RET, sctp_pcb_findep(), SCTP_PCB_FLAGS_BOUND_V6, SCTP_PCB_FLAGS_BOUNDALL, SCTP_PCB_FLAGS_UNBOUND, and sockaddr_in::sin_port.
Referenced by sctp_setopt().
void sctp_bindx_delete_address | ( | struct sctp_inpcb * | inp, |
struct sockaddr * | sa, | ||
uint32_t | vrf_id, | ||
int * | error | ||
) |
Definition at line 6849 of file sctputil.c.
References sctp_addr_mgmt_ep_sa(), SCTP_DEL_IP_ADDRESS, sctp_inpcb::sctp_flags, SCTP_FROM_SCTPUTIL, SCTP_IPV6_V6ONLY, SCTP_LTRACE_ERR_RET, SCTP_PCB_FLAGS_BOUND_V6, and SCTP_PCB_FLAGS_BOUNDALL.
Referenced by sctp_setopt().
uint32_t sctp_calculate_len | ( | struct mbuf * | m | ) |
Definition at line 2896 of file sctputil.c.
References SCTP_BUF_LEN, and SCTP_BUF_NEXT.
Referenced by sctp_lowlevel_chunk_output().
int sctp_calculate_rto | ( | struct sctp_tcb * | stcb, |
struct sctp_association * | asoc, | ||
struct sctp_nets * | net, | ||
struct timeval * | old, | ||
int | rtt_from_sack | ||
) |
Definition at line 2916 of file sctputil.c.
References sctp_tcb::asoc, sctp_association::cc_functions, sctp_nets::lan_type, sctp_nets::lastsa, sctp_nets::lastsv, sctp_association::maxrto, sctp_association::minrto, sctp_nets::RTO, rto_logging(), sctp_nets::RTO_measured, sctp_nets::rtt, sctp_association::sat_network, sctp_association::sat_network_lockout, SCTP_BASE_SYSCTL, SCTP_CLOCK_GRANULARITY, SCTP_GETPTIME_TIMEVAL, SCTP_GETTIME_TIMEVAL, SCTP_LAN_INTERNET, SCTP_LAN_LOCAL, SCTP_LAN_UNKNOWN, SCTP_LOCAL_LAN_RTT, SCTP_LOG_INITIAL_RTT, SCTP_LOG_RTTVAR, SCTP_RTO_UPPER_BOUND, sctp_cc_functions::sctp_rtt_calculated, SCTP_RTT_FROM_DATA, SCTP_RTT_SHIFT, SCTP_RTT_VAR_SHIFT, SCTP_RTTVAR_LOGGING_ENABLE, SCTP_SAT_NETWORK_MIN, and sctp_association::use_precise_time.
Referenced by sctp_express_handle_sack(), sctp_handle_cookie_ack(), sctp_handle_heartbeat_ack(), sctp_handle_sack(), sctp_process_cookie_existing(), sctp_process_cookie_new(), sctp_process_init_ack(), and sctp_process_segment_range().
int sctp_cmpaddr | ( | struct sockaddr * | sa1, |
struct sockaddr * | sa2 | ||
) |
Definition at line 4676 of file sctputil.c.
References in_addr::s_addr, and sockaddr_in::sin_addr.
Referenced by sctp_check_address_list_all(), sctp_check_address_list_ep(), sctp_del_remote_addr(), sctp_findnet(), and sctp_process_asconf_delete_ip().
int sctp_connectx_helper_add | ( | struct sctp_tcb * | stcb, |
struct sockaddr * | addr, | ||
int | totaddr, | ||
int * | error | ||
) |
Definition at line 6579 of file sctputil.c.
References sctp_tcb::asoc, INADDR_ANY, INADDR_BROADCAST, sctp_inpcb::inp, sctp_association::port, in_addr::s_addr, sctp_add_remote_addr(), SCTP_ADDR_IS_CONFIRMED, SCTP_DONOT_SETSCOPE, sctp_tcb::sctp_ep, sctp_free_assoc(), SCTP_FROM_SCTPUTIL, SCTP_LOC_10, SCTP_LOC_7, SCTP_LOC_8, SCTP_LOC_9, SCTP_LTRACE_ERR_RET, SCTP_NORMAL_PROC, and sockaddr_in::sin_addr.
Referenced by sctp_do_connect_x().
int sctp_connectx_helper_find | ( | struct sctp_inpcb * | inp, |
struct sockaddr * | addr, | ||
unsigned int | totaddr, | ||
unsigned int * | num_v4, | ||
unsigned int * | num_v6, | ||
unsigned int | limit | ||
) |
Definition at line 6660 of file sctputil.c.
References sctp_findassociation_ep_addr(), SCTP_INP_DECR_REF, SCTP_INP_INCR_REF, and SCTP_TCB_UNLOCK.
Referenced by sctp_do_connect_x().
int sctp_dynamic_set_primary | ( | struct sockaddr * | sa, |
uint32_t | vrf_id | ||
) |
Definition at line 6461 of file sctputil.c.
References sctp_laddr::action, sctp_ifa::ifa, sctp_laddr::ifa, sctp_ifa::refcount, SCTP_ADDR_NOT_LOCKED, SCTP_BASE_INFO, sctp_find_ifa_by_addr(), SCTP_FROM_SCTPUTIL, SCTP_GETTIME_TIMEVAL, SCTP_INCR_LADDR_COUNT, SCTP_LTRACE_ERR_RET, SCTP_SET_PRIM_ADDR, sctp_timer_start(), SCTP_TIMER_TYPE_ADDR_WQ, SCTP_WQ_ADDR_LOCK, SCTP_WQ_ADDR_UNLOCK, SCTP_ZONE_GET, and sctp_laddr::start_time.
Referenced by sctp_setopt().
int sctp_expand_mapping_array | ( | struct sctp_association * | asoc, |
uint32_t | needed | ||
) |
Definition at line 1417 of file sctputil.c.
References sctp_association::mapping_array, sctp_association::mapping_array_size, sctp_association::nr_mapping_array, SCTP_FREE, SCTP_MALLOC, SCTP_MAPPING_ARRAY_INCR, and SCTP_PRINTF.
Referenced by sctp_process_a_data_chunk().
void sctp_fill_random_store | ( | struct sctp_pcb * | m | ) |
Definition at line 992 of file sctputil.c.
References sctp_pcb::random_counter, sctp_pcb::random_numbers, sctp_pcb::random_store, sctp_hmac(), SCTP_HMAC, and sctp_pcb::store_at.
Referenced by sctp_inpcb_alloc(), and sctp_select_initial_TSN().
int sctp_fill_stat_log | ( | void *optval | SCTP_UNUSED, |
size_t *optsize | SCTP_UNUSED | ||
) |
Definition at line 571 of file sctputil.c.
Referenced by sctp_getopt().
Definition at line 5329 of file sctputil.c.
References sctp_ifa::address, in_addr::s_addr, sctp_sockstore::sa, sctp_find_vrf(), sctp_get_ifa_hash_val(), SCTP_IPI_ADDR_LOCK_ASSERT, SCTP_IPI_ADDR_RLOCK, SCTP_IPI_ADDR_RUNLOCK, sctp_print_address(), SCTP_PRINTF, sctp_sockstore::sin, sctp_sockstore::sin6, sockaddr_in::sin_addr, sctp_vrf::vrf_addr_hash, and sctp_vrf::vrf_addr_hashmark.
Referenced by sctp_add_addr_to_vrf(), sctp_addr_mgmt_ep_sa(), sctp_asconf_queue_sa_delete(), sctp_del_addr_from_vrf(), sctp_dynamic_set_primary(), sctp_inpcb_bind_locked(), sctp_is_address_on_local_host(), sctp_mark_ifa_addr_down(), sctp_mark_ifa_addr_up(), sctp_process_initack_addresses(), sctp_set_primary_ip_address_sa(), and sctp_setopt().
struct sctp_ifa * sctp_find_ifa_in_ep | ( | struct sctp_inpcb * | inp, |
struct sockaddr * | addr, | ||
int | holds_lock | ||
) |
Definition at line 5251 of file sctputil.c.
References sctp_ifa::address, sctp_laddr::ifa, in_addr::s_addr, sctp_sockstore::sa, sctp_inpcb::sctp_addr_list, SCTP_INP_RLOCK, SCTP_INP_RUNLOCK, sctp_sockstore::sin, sctp_sockstore::sin6, and sockaddr_in::sin_addr.
Referenced by sctp_addr_mgmt_ep_sa().
struct mbuf * sctp_generate_cause | ( | uint16_t | code, |
char * | info | ||
) |
Definition at line 4951 of file sctputil.c.
References sctp_gen_error_cause::code, sctp_gen_error_cause::info, sctp_gen_error_cause::length, SCTP_BUF_LEN, sctp_get_mbuf_for_msg(), and SCTP_MAX_CAUSE_LENGTH.
Referenced by sctp_abort_in_reasm(), sctp_are_there_new_addresses(), sctp_chunk_retransmission(), sctp_common_input_processing(), sctp_cookie_timer(), sctp_disconnect(), sctp_express_handle_sack(), sctp_handle_asconf_ack(), sctp_handle_cookie_echo(), sctp_handle_forward_tsn(), sctp_handle_init(), sctp_handle_init_ack(), sctp_handle_sack(), sctp_inpcb_free(), sctp_load_addresses_from_init(), sctp_lower_sosend(), sctp_process_a_data_chunk(), sctp_process_control(), sctp_process_cookie_existing(), sctp_process_cookie_new(), sctp_process_data(), sctp_process_init_ack(), sctp_queue_data_to_stream(), sctp_send_initiate_ack(), sctp_sendall_iterator(), sctp_shutdown(), sctp_threshold_management(), and sctp_timeout_handler().
struct mbuf * sctp_generate_no_user_data_cause | ( | uint32_t | tsn | ) |
Definition at line 4978 of file sctputil.c.
References sctp_error_no_user_data::cause, sctp_error_cause::code, sctp_error_cause::length, SCTP_BUF_LEN, SCTP_CAUSE_NO_USER_DATA, sctp_get_mbuf_for_msg(), and sctp_error_no_user_data::tsn.
Referenced by sctp_process_a_data_chunk().
uint32_t sctp_get_ifa_hash_val | ( | struct sockaddr * | addr | ) |
Definition at line 5295 of file sctputil.c.
References in_addr::s_addr, and sockaddr_in::sin_addr.
Referenced by sctp_add_addr_to_vrf(), and sctp_find_ifa_by_addr().
Definition at line 975 of file sctputil.c.
References sctp_mtu_sizes.
Referenced by sctp_pathmtu_timer().
struct sctp_paramhdr * sctp_get_next_param | ( | struct mbuf * | m, |
int | offset, | ||
struct sctp_paramhdr * | pull, | ||
int | pull_limit | ||
) |
Definition at line 3073 of file sctputil.c.
References sctp_m_getptr().
Referenced by sctp_are_there_new_addresses(), sctp_arethere_unrecognized_parameters(), sctp_auth_get_cookie_params(), sctp_findassociation_ep_asconf(), sctp_findassociation_special_addr(), sctp_load_addresses_from_init(), sctp_send_cookie_echo(), and sctp_validate_init_auth_params().
Definition at line 950 of file sctputil.c.
References sctp_mtu_sizes.
|
static |
Definition at line 1637 of file sctputil.c.
References sctp_asconf_iterator::cnt, sctp_asconf_iterator::list_of_work, sctp_asconf_iterator_end(), sctp_asconf_iterator_ep(), sctp_asconf_iterator_stcb(), SCTP_ASOC_ANY_STATE, SCTP_BASE_INFO, SCTP_BASE_VAR, SCTP_FREE, sctp_initiate_iterator(), SCTP_MALLOC, SCTP_PCB_ANY_FEATURES, SCTP_PCB_FLAGS_BOUNDALL, SCTP_PRINTF, sctp_timer_start(), and SCTP_TIMER_TYPE_ADDR_WQ.
Referenced by sctp_timeout_handler().
void sctp_handle_ootb | ( | struct mbuf * | m, |
int | iphlen, | ||
int | offset, | ||
struct sockaddr * | src, | ||
struct sockaddr * | dst, | ||
struct sctphdr * | sh, | ||
struct sctp_inpcb * | inp, | ||
struct mbuf * | cause, | ||
uint8_t | mflowtype, | ||
uint32_t | mflowid, | ||
uint16_t | fibnum, | ||
uint32_t | vrf_id, | ||
uint16_t | port | ||
) |
Definition at line 4508 of file sctputil.c.
References sctp_chunkhdr::chunk_length, sctp_chunkhdr::chunk_type, SCTP_ABORT_ASSOCIATION, sctp_inpcb::sctp_asoc_list, SCTP_BASE_SYSCTL, SCTP_CALLED_DIRECTLY_NOCMPSET, sctp_inpcb::sctp_flags, SCTP_FREE_SHOULD_USE_ABORT, SCTP_INIT, sctp_inpcb_free(), sctp_m_getptr(), SCTP_PACKET_DROPPED, SCTP_PCB_FLAGS_SOCKET_GONE, sctp_send_abort(), sctp_send_shutdown_complete2(), SCTP_SHUTDOWN_ACK, SCTP_SHUTDOWN_COMPLETE, SCTP_SIZE32, and SCTP_STAT_INCR_COUNTER32.
Referenced by sctp_common_input_processing(), and sctp_process_control().
uint32_t sctp_hc_get_mtu | ( | union sctp_sockstore * | addr, |
uint16_t | fibnum | ||
) |
Definition at line 7599 of file sctputil.c.
References in_conninfo::inc_fibnum, in_conninfo::inc_flags, INC_ISIPV6, sctp_sockstore::sa, sctp_sockstore::sin, sctp_sockstore::sin6, sockaddr_in::sin_addr, and tcp_hc_getmtu().
Referenced by sctp_add_remote_addr().
void sctp_hc_set_mtu | ( | union sctp_sockstore * | addr, |
uint16_t | fibnum, | ||
uint32_t | mtu | ||
) |
Definition at line 7574 of file sctputil.c.
References in_conninfo::inc_fibnum, in_conninfo::inc_flags, INC_ISIPV6, sctp_sockstore::sa, sctp_sockstore::sin, sctp_sockstore::sin6, sockaddr_in::sin_addr, and tcp_hc_updatemtu().
int sctp_init_asoc | ( | struct sctp_inpcb * | inp, |
struct sctp_tcb * | stcb, | ||
uint32_t | override_tag, | ||
uint32_t | initial_tsn, | ||
uint32_t | vrf_id, | ||
uint16_t | o_strms | ||
) |
Definition at line 1114 of file sctputil.c.
References sctp_stream_out::abandoned_sent, sctp_association::abandoned_sent, sctp_stream_out::abandoned_unsent, sctp_association::abandoned_unsent, sctp_authinformation::active_keyid, 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_inpcb::asconf_supported, sctp_association::asconf_supported, sctp_tcb::asoc, sctp_authinformation::assoc_key, sctp_authinformation::assoc_keyid, sctp_association::assoc_up_sent, sctp_inpcb::auth_supported, sctp_association::auth_supported, sctp_association::authinfo, sctp_pcb::auto_close_time, sctp_association::cc_functions, sctp_stream_out::chunks_on_queues, sctp_association::congestion_control_module, sctp_association::context, sctp_association::control_send_queue, sctp_association::cookie_life, sctp_pcb::def_cookie_life, sctp_pcb::def_net_failure, sctp_association::def_net_failure, sctp_pcb::def_net_pf_threshold, sctp_association::def_net_pf_threshold, sctp_inpcb::def_send, sctp_association::def_send, sctp_pcb::default_dscp, sctp_association::default_dscp, sctp_pcb::default_mtu, sctp_association::default_mtu, sctp_association::delayed_ack, sctp_association::discontinuity_time, sctp_association::ecn_echo_cnt_onq, sctp_inpcb::ecn_supported, sctp_association::ecn_supported, sctp_pcb::fr_max_burst, sctp_association::fr_max_burst, sctp_association::free_chunk_cnt, sctp_association::free_chunks, sctp_association::hb_random_idx, sctp_association::heart_beat_delay, sctp_association::iam_blocking, sctp_inpcb::idata_supported, sctp_association::idata_supported, IN6P_AUTOFLOWLABEL, sctp_association::init_seq_number, sctp_pcb::initial_init_rto_max, sctp_association::initial_init_rto_max, sctp_pcb::initial_rto, sctp_association::initial_rto, sctp_inpcb::inp, inpcb::inp_flags, sctp_inpcb::ip_inp, sctp_scoping::ipv4_addr_legal, sctp_scoping::ipv6_addr_legal, sctp_association::last_acked_seq, sctp_stream_out::last_msg_incomplete, sctp_association::last_net_cmt_send_started, sctp_inpcb::local_strreset_support, sctp_association::local_strreset_support, sctp_association::mapping_array, sctp_association::mapping_array_size, sctp_association::marked_retrans, sctp_pcb::max_burst, sctp_association::max_burst, sctp_inpcb::max_cwnd, sctp_association::max_cwnd, sctp_association::max_inbound_streams, sctp_pcb::max_init_times, sctp_association::max_init_times, sctp_pcb::max_open_streams_intome, sctp_pcb::max_send_times, sctp_association::max_send_times, sctp_association::maxrto, sctp_association::minrto, sctp_association::my_rwnd, sctp_association::my_vtag, sctp_association::my_vtag_nonce, sctp_association::nets, sctp_stream_out::next_mid_ordered, sctp_stream_out::next_mid_unordered, sctp_association::nr_mapping_array, sctp_inpcb::nrsack_supported, sctp_association::nrsack_supported, sctp_stream_out::outqueue, sctp_association::peer_supports_nat, sctp_association::peer_vtag_nonce, sctp_association::peers_rwnd, sctp_association::pending_reply_queue, sctp_inpcb::pktdrop_supported, sctp_association::pktdrop_supported, sctp_pcb::port, sctp_association::port, sctp_association::pr_sctp_cnt, sctp_association::pre_open_streams, sctp_inpcb::prsctp_supported, sctp_association::prsctp_supported, sctp_authinformation::random, sctp_inpcb::reconfig_supported, sctp_association::reconfig_supported, sctp_authinformation::recv_key, sctp_authinformation::recv_keyid, sctp_association::refcnt, sctp_association::resetHead, sctp_tcb::rport, sctp_association::sack_freq, sctp_association::sb_send_resv, sctp_association::scope, sctp_association::sctp_autoclose_ticks, sctp_inpcb::sctp_cmt_on_off, sctp_association::sctp_cmt_on_off, sctp_association::sctp_cmt_pf, sctp_inpcb::sctp_context, sctp_pcb::sctp_default_cc_module, sctp_pcb::sctp_default_ss_module, sctp_inpcb::sctp_ep, sctp_tcb::sctp_ep, sctp_inpcb::sctp_features, sctp_association::sctp_features, sctp_inpcb::sctp_flags, sctp_inpcb::sctp_frag_point, sctp_association::sctp_frag_point, SCTP_FREE, SCTP_FROM_SCTPUTIL, SCTP_GETTIME_TIMEVAL, SCTP_INITIAL_MAPPING_ARRAY, SCTP_IPV6_V6ONLY, SCTP_LTRACE_ERR_RET, SCTP_MALLOC, sctp_pcb::sctp_maxrto, SCTP_MINIMAL_RWND, sctp_pcb::sctp_minrto, SCTP_PCB_FLAGS_BOUND_V6, SCTP_PR_SCTP_MAX, sctp_association::sctp_restricted_addrs, sctp_pcb::sctp_sack_freq, SCTP_SB_LIMIT_RCV, sctp_select_a_tag(), sctp_select_initial_TSN(), SCTP_SET_STATE, sctp_inpcb::sctp_socket, sctp_ss_functions::sctp_ss_init, sctp_ss_functions::sctp_ss_init_stream, SCTP_STATE_INUSE, SCTP_STREAM_OPENING, SCTP_TCB_SEND_LOCK, SCTP_TCB_SEND_UNLOCK, sctp_ticks_to_msecs(), sctp_pcb::sctp_timeoutticks, SCTP_TIMER_HEARTBEAT, SCTP_TIMER_RECV, sctp_association::send_queue, sctp_association::send_sack, sctp_association::sending_seq, sctp_association::sent_queue, sctp_association::sent_queue_retran_cnt, sctp_association::shared_keys, sctp_stream_out::sid, sctp_association::smallest_mtu, sctp_association::ss_functions, sctp_association::start_time, sctp_stream_out::state, sctp_association::str_reset_seq_in, sctp_association::str_reset_seq_out, sctp_association::stream_locked, sctp_association::stream_locked_on, sctp_association::stream_scheduling_module, sctp_association::streamoutcnt, sctp_association::strm_realoutsize, sctp_association::strmout, sctp_association::timocookie, sctp_association::timodata, sctp_association::timoheartbeat, sctp_association::timoinit, sctp_association::timosack, sctp_association::timoshutdown, sctp_association::timoshutdownack, sctp_association::total_output_queue_size, and sctp_association::vrf_id.
Referenced by sctp_aloc_assoc_locked().
int sctp_is_there_an_abort_here | ( | struct mbuf * | m, |
int | iphlen, | ||
uint32_t * | vtag | ||
) |
Definition at line 4578 of file sctputil.c.
References sctp_init_chunk::ch, sctp_chunkhdr::chunk_length, sctp_chunkhdr::chunk_type, sctp_init_chunk::init, sctp_init::initiate_tag, SCTP_ABORT_ASSOCIATION, SCTP_INITIATION, SCTP_INITIATION_ACK, sctp_m_getptr(), and SCTP_SIZE32.
Referenced by sctp_send_abort().
|
static |
Definition at line 1450 of file sctputil.c.
References sctp_tcb::asoc, sctp_iterator::asoc_state, iterator_control::cur_it, sctp_iterator::done_current_ep, sctp_iterator::function_assoc, sctp_iterator::function_atend, sctp_iterator::function_inp, sctp_iterator::function_inp_end, sctp_iterator::inp, sctp_iterator::iterator_flags, iterator_control::iterator_flags, sctp_iterator::no_chunk_output, sctp_iterator::pcb_features, sctp_iterator::pcb_flags, sctp_iterator::pointer, sctp_association::refcnt, sctp_inpcb::sctp_asoc_list, sctp_chunk_output(), sctp_tcb::sctp_ep, sctp_inpcb::sctp_features, sctp_inpcb::sctp_flags, SCTP_FREE, SCTP_INP_DECR_REF, SCTP_INP_INCR_REF, SCTP_INP_INFO_RLOCK, SCTP_INP_INFO_RUNLOCK, SCTP_INP_RLOCK, SCTP_INP_RLOCK_ASSERT, SCTP_INP_RUNLOCK, sctp_it_ctl, SCTP_ITERATOR_DO_SINGLE_INP, SCTP_ITERATOR_LOCK, SCTP_ITERATOR_MAX_AT_ONCE, SCTP_ITERATOR_STOP_CUR_INP, SCTP_ITERATOR_STOP_CUR_IT, SCTP_ITERATOR_UNLOCK, SCTP_OUTPUT_FROM_T3, SCTP_PRINTF, SCTP_SO_NOT_LOCKED, SCTP_TCB_LOCK, SCTP_TCB_LOCK_ASSERT, SCTP_TCB_UNLOCK, sctp_association::state, sctp_iterator::stcb, and sctp_iterator::val.
Referenced by sctp_iterator_worker().
void sctp_iterator_worker | ( | void | ) |
Definition at line 1616 of file sctputil.c.
References iterator_control::iterator_running, iterator_control::iteratorhead, SCTP_IPI_ITERATOR_WQ_LOCK, SCTP_IPI_ITERATOR_WQ_UNLOCK, sctp_it_ctl, sctp_iterator_work(), and sctp_iterator::vn.
Referenced by sctp_iterator_thread().
int sctp_local_addr_count | ( | struct sctp_tcb * | stcb | ) |
Definition at line 6930 of file sctputil.c.
References sctp_ifa::address, sctp_tcb::asoc, count, sctp_laddr::ifa, sctp_ifn::ifalist, sctp_vrf::ifnlist, IN4_ISPRIVATE_ADDRESS, sctp_inpcb::inp, inpcb::inp_cred, sctp_inpcb::ip_inp, sctp_scoping::ipv4_addr_legal, sctp_scoping::ipv4_local_scope, sctp_scoping::ipv6_addr_legal, sctp_scoping::local_scope, sctp_scoping::loopback_scope, prison_check_ip4(), in_addr::s_addr, sctp_sockstore::sa, sctp_association::scope, sctp_inpcb::sctp_addr_list, sctp_tcb::sctp_ep, sctp_find_vrf(), sctp_inpcb::sctp_flags, SCTP_IFN_IS_IFT_LOOP, SCTP_IPI_ADDR_RLOCK, SCTP_IPI_ADDR_RUNLOCK, sctp_is_addr_restricted(), SCTP_PCB_FLAGS_BOUNDALL, sctp_sockstore::sin, sctp_sockstore::sin6, sockaddr_in::sin_addr, sctp_scoping::site_scope, and sctp_association::vrf_id.
Referenced by sctp_asconf_queue_add(), and sctp_path_check_and_react().
void sctp_log_block | ( | uint8_t | from, |
struct sctp_association * | asoc, | ||
ssize_t | sendlen | ||
) |
Definition at line 548 of file sctputil.c.
References sctp_cwnd_log::blk, sctp_blk_args::chunks_on_oque, sctp_association::chunks_on_out_queue, sctp_blk_args::flight_size, sctp_cwnd_log::from, KTR_SCTP, sctp_misc_info::log1, sctp_misc_info::log2, sctp_misc_info::log3, sctp_misc_info::log4, sctp_cwnd_log::misc, sctp_blk_args::onsb, sctp_blk_args::peer_rwnd, sctp_association::peers_rwnd, SCTP_CTR6, SCTP_LOG_EVENT_BLOCK, sctp_association::send_queue_cnt, sctp_blk_args::send_sent_qcnt, sctp_association::sent_queue_cnt, sctp_blk_args::sndlen, sctp_blk_args::stream_qcnt, sctp_association::stream_queue_cnt, sctp_association::total_flight, sctp_association::total_output_queue_size, and sctp_cwnd_log::x.
Referenced by sctp_lower_sosend().
void sctp_log_closing | ( | struct sctp_inpcb * | inp, |
struct sctp_tcb * | stcb, | ||
int16_t | loc | ||
) |
Definition at line 96 of file sctputil.c.
References sctp_tcb::asoc, sctp_cwnd_log::close, sctp_log_closing::inp, KTR_SCTP, sctp_log_closing::loc, sctp_misc_info::log1, sctp_misc_info::log2, sctp_misc_info::log3, sctp_misc_info::log4, sctp_cwnd_log::misc, SCTP_CTR6, sctp_inpcb::sctp_flags, sctp_log_closing::sctp_flags, SCTP_LOG_EVENT_CLOSE, sctp_association::state, sctp_log_closing::state, sctp_log_closing::stcb, and sctp_cwnd_log::x.
Referenced by sctp_close(), sctp_free_assoc(), sctp_inpcb_alloc(), and sctp_inpcb_free().
Definition at line 315 of file sctputil.c.
References sctp_tcb::asoc, sctp_cwnd_args::cnt_in_send, sctp_cwnd_args::cnt_in_str, sctp_nets::cwnd, sctp_cwnd_log::cwnd, sctp_cwnd_args::cwnd_augment, sctp_cwnd_args::cwnd_new_value, sctp_nets::find_pseudo_cumack, sctp_nets::flight_size, sctp_cwnd_log::from, sctp_cwnd_args::inflight, KTR_SCTP, sctp_misc_info::log1, sctp_misc_info::log2, sctp_misc_info::log3, sctp_misc_info::log4, sctp_cwnd_args::meets_pseudo_cumack, sctp_cwnd_log::misc, sctp_cwnd_args::need_new_pseudo_cumack, sctp_cwnd_args::net, sctp_nets::new_pseudo_cumack, sctp_association::peers_rwnd, sctp_nets::pseudo_cumack, sctp_cwnd_args::pseudo_cumack, SCTP_CTR6, SCTP_CWNDLOG_PRESEND, SCTP_LOG_EVENT_CWND, sctp_association::send_queue_cnt, sctp_association::stream_queue_cnt, and sctp_cwnd_log::x.
Referenced by htcp_cong_avoid(), sctp_chunk_output(), sctp_chunk_retransmission(), sctp_cwnd_update_after_ecn_echo_common(), sctp_cwnd_update_after_fr(), sctp_cwnd_update_after_output(), sctp_cwnd_update_after_packet_dropped(), sctp_cwnd_update_after_sack_common(), sctp_cwnd_update_after_timeout(), sctp_express_handle_sack(), sctp_handle_sack(), sctp_hs_cwnd_decrease(), sctp_hs_cwnd_increase(), sctp_hs_cwnd_update_after_sack(), sctp_htcp_cwnd_update_after_ecn_echo(), sctp_htcp_cwnd_update_after_fr(), sctp_htcp_cwnd_update_after_sack(), sctp_htcp_cwnd_update_after_timeout(), sctp_htcp_set_initial_cc_param(), sctp_med_chunk_output(), sctp_process_init(), sctp_process_segment_range(), sctp_set_initial_cc_param(), and sctp_t3rxt_timer().
Definition at line 225 of file sctputil.c.
References sctp_cwnd_log::fr, sctp_cwnd_log::from, KTR_SCTP, sctp_fr_log::largest_new_tsn, sctp_fr_log::largest_tsn, sctp_misc_info::log1, sctp_misc_info::log2, sctp_misc_info::log3, sctp_misc_info::log4, sctp_cwnd_log::misc, SCTP_CTR6, SCTP_LOG_EVENT_FR, sctp_fr_log::tsn, and sctp_cwnd_log::x.
Referenced by sctp_handle_sack(), sctp_handle_segments(), sctp_mark_all_for_resend(), sctp_strike_gap_ack_chunks(), and sctp_t3rxt_timer().
void sctp_log_lock | ( | struct sctp_inpcb * | inp, |
struct sctp_tcb * | stcb, | ||
uint8_t | from | ||
) |
Definition at line 352 of file sctputil.c.
References sctp_lock_log::create_lock, sctp_cwnd_log::from, sctp_lock_log::info_lock, sctp_lock_log::inp, sctp_inpcb::inp_create_mtx, sctp_lock_log::inp_lock, sctp_inpcb::inp_mtx, KTR_SCTP, sctp_cwnd_log::lock, sctp_misc_info::log1, sctp_misc_info::log2, sctp_misc_info::log3, sctp_misc_info::log4, sctp_cwnd_log::misc, SCTP_BASE_INFO, SCTP_CTR6, SCTP_LOCK_UNKNOWN, SCTP_LOG_LOCK_EVENT, sctp_inpcb::sctp_socket, sctp_lock_log::sock, sctp_lock_log::sock_lock, sctp_lock_log::sockrcvbuf_lock, sctp_lock_log::socksndbuf_lock, sctp_lock_log::tcb_lock, sctp_tcb::tcb_mtx, and sctp_cwnd_log::x.
Referenced by sctp_listen().
Definition at line 205 of file sctputil.c.
References sctp_fr_map::base, sctp_fr_map::cum, sctp_cwnd_log::from, sctp_fr_map::high, KTR_SCTP, sctp_misc_info::log1, sctp_misc_info::log2, sctp_misc_info::log3, sctp_misc_info::log4, sctp_cwnd_log::map, sctp_cwnd_log::misc, SCTP_CTR6, SCTP_LOG_EVENT_MAP, and sctp_cwnd_log::x.
Referenced by sctp_handle_forward_tsn(), sctp_handle_str_reset_request_tsn(), sctp_handle_stream_reset_response(), sctp_process_a_data_chunk(), sctp_process_init(), and sctp_slide_mapping_arrays().
void sctp_log_maxburst | ( | struct sctp_tcb * | stcb, |
struct sctp_nets * | net, | ||
int | error, | ||
int | burst, | ||
uint8_t | from | ||
) |
Definition at line 398 of file sctputil.c.
References sctp_tcb::asoc, sctp_cwnd_args::cnt_in_send, sctp_cwnd_args::cnt_in_str, sctp_cwnd_log::cwnd, sctp_cwnd_args::cwnd_augment, sctp_cwnd_args::cwnd_new_value, sctp_nets::flight_size, sctp_cwnd_log::from, sctp_cwnd_args::inflight, KTR_SCTP, sctp_misc_info::log1, sctp_misc_info::log2, sctp_misc_info::log3, sctp_misc_info::log4, sctp_cwnd_log::misc, sctp_cwnd_args::net, SCTP_CTR6, SCTP_LOG_EVENT_MAXBURST, sctp_association::send_queue_cnt, sctp_association::stream_queue_cnt, and sctp_cwnd_log::x.
Referenced by sctp_chunk_output().
void sctp_log_nagle_event | ( | struct sctp_tcb * | stcb, |
int | action | ||
) |
Definition at line 163 of file sctputil.c.
References sctp_tcb::asoc, sctp_association::chunks_on_out_queue, sctp_nagle_log::count_in_flight, sctp_nagle_log::count_in_queue, KTR_SCTP, sctp_misc_info::log1, sctp_misc_info::log2, sctp_misc_info::log3, sctp_misc_info::log4, sctp_cwnd_log::misc, sctp_cwnd_log::nagle, SCTP_CTR6, SCTP_LOG_EVENT_NAGLE, sctp_nagle_log::stcb, sctp_association::total_flight, sctp_nagle_log::total_flight, sctp_association::total_flight_count, sctp_nagle_log::total_in_queue, sctp_association::total_output_queue_size, and sctp_cwnd_log::x.
Referenced by sctp_lower_sosend().
Definition at line 427 of file sctputil.c.
References sctp_cwnd_log::from, KTR_SCTP, sctp_misc_info::log1, sctp_misc_info::log2, sctp_misc_info::log3, sctp_misc_info::log4, sctp_cwnd_log::misc, sctp_rwnd_log::new_rwnd, sctp_rwnd_log::overhead, sctp_rwnd_log::rwnd, sctp_cwnd_log::rwnd, SCTP_CTR6, SCTP_LOG_EVENT_RWND, sctp_rwnd_log::send_size, and sctp_cwnd_log::x.
Referenced by sctp_chunk_retransmission(), sctp_clean_up_datalist(), and sctp_strike_gap_ack_chunks().
void sctp_log_rwnd_set | ( | uint8_t | from, |
uint32_t | peers_rwnd, | ||
uint32_t | flight_size, | ||
uint32_t | overhead, | ||
uint32_t | a_rwndval | ||
) |
Definition at line 447 of file sctputil.c.
References sctp_cwnd_log::from, KTR_SCTP, sctp_misc_info::log1, sctp_misc_info::log2, sctp_misc_info::log3, sctp_misc_info::log4, sctp_cwnd_log::misc, sctp_rwnd_log::new_rwnd, sctp_rwnd_log::overhead, sctp_rwnd_log::rwnd, sctp_cwnd_log::rwnd, SCTP_CTR6, SCTP_LOG_EVENT_RWND, sctp_rwnd_log::send_size, and sctp_cwnd_log::x.
Referenced by sctp_handle_sack().
void sctp_log_sack | ( | uint32_t | old_cumack, |
uint32_t | cumack, | ||
uint32_t | tsn, | ||
uint16_t | gaps, | ||
uint16_t | dups, | ||
int | from | ||
) |
Definition at line 184 of file sctputil.c.
References sctp_sack_log::cumack, sctp_cwnd_log::from, KTR_SCTP, sctp_misc_info::log1, sctp_misc_info::log2, sctp_misc_info::log3, sctp_misc_info::log4, sctp_cwnd_log::misc, sctp_sack_log::numDups, sctp_sack_log::numGaps, sctp_sack_log::oldcumack, sctp_cwnd_log::sack, SCTP_CTR6, SCTP_LOG_EVENT_SACK, sctp_sack_log::tsn, and sctp_cwnd_log::x.
Referenced by sctp_check_for_revoked(), sctp_express_handle_sack(), sctp_handle_sack(), and sctp_process_segment_range().
void sctp_log_strm_del | ( | struct sctp_queued_to_read * | control, |
struct sctp_queued_to_read * | poschk, | ||
int | from | ||
) |
Definition at line 284 of file sctputil.c.
References sctp_str_log::e_sseq, sctp_str_log::e_tsn, sctp_cwnd_log::from, KTR_SCTP, sctp_misc_info::log1, sctp_misc_info::log2, sctp_misc_info::log3, sctp_misc_info::log4, sctp_queued_to_read::mid, sctp_cwnd_log::misc, sctp_str_log::n_sseq, sctp_str_log::n_tsn, SCTP_CTR6, SCTP_LOG_EVENT_STRM, SCTP_PRINTF, sctp_queued_to_read::sinfo_stream, sctp_queued_to_read::sinfo_tsn, sctp_queued_to_read::stcb, sctp_str_log::stcb, sctp_cwnd_log::strlog, sctp_str_log::strm, and sctp_cwnd_log::x.
Referenced by sctp_place_control_in_stream(), and sctp_queue_data_to_stream().
void sctp_log_strm_del_alt | ( | struct sctp_tcb * | stcb, |
uint32_t | tsn, | ||
uint16_t | sseq, | ||
uint16_t | stream, | ||
int | from | ||
) |
Definition at line 141 of file sctputil.c.
References sctp_str_log::e_sseq, sctp_str_log::e_tsn, sctp_cwnd_log::from, KTR_SCTP, sctp_misc_info::log1, sctp_misc_info::log2, sctp_misc_info::log3, sctp_misc_info::log4, sctp_cwnd_log::misc, sctp_str_log::n_sseq, sctp_str_log::n_tsn, SCTP_CTR6, SCTP_LOG_EVENT_STRM, sctp_str_log::stcb, sctp_cwnd_log::strlog, sctp_str_log::strm, and sctp_cwnd_log::x.
Referenced by sctp_process_a_data_chunk().
caddr_t sctp_m_getptr | ( | struct mbuf * | m, |
int | off, | ||
int | len, | ||
uint8_t * | in_ptr | ||
) |
Definition at line 3033 of file sctputil.c.
References count, SCTP_BUF_LEN, and SCTP_BUF_NEXT.
Referenced by sctp_addr_in_initack(), sctp_auth_get_cookie_params(), sctp_get_next_param(), sctp_handle_asconf(), sctp_handle_asconf_ack(), sctp_handle_cookie_echo(), sctp_handle_forward_tsn(), sctp_handle_ootb(), sctp_handle_sack(), sctp_handle_segments(), sctp_handle_stream_reset(), sctp_is_addr_pending(), sctp_is_there_an_abort_here(), sctp_process_a_data_chunk(), sctp_process_control(), sctp_process_cookie_existing(), sctp_process_cookie_new(), sctp_process_data(), sctp_process_initack_addresses(), and sctp_send_packet_dropped().
int32_t sctp_map_assoc_state | ( | int | kernel_state | ) |
Definition at line 1071 of file sctputil.c.
References SCTP_CLOSED, SCTP_COOKIE_ECHOED, SCTP_COOKIE_WAIT, SCTP_ESTABLISHED, SCTP_SHUTDOWN_ACK_SENT, SCTP_SHUTDOWN_PENDING, SCTP_SHUTDOWN_RECEIVED, SCTP_SHUTDOWN_SENT, SCTP_STATE_COOKIE_ECHOED, SCTP_STATE_COOKIE_WAIT, SCTP_STATE_EMPTY, SCTP_STATE_INUSE, SCTP_STATE_MASK, SCTP_STATE_OPEN, SCTP_STATE_SHUTDOWN_ACK_SENT, SCTP_STATE_SHUTDOWN_PENDING, SCTP_STATE_SHUTDOWN_RECEIVED, SCTP_STATE_SHUTDOWN_SENT, and SCTP_STATE_WAS_ABORTED.
Referenced by sctp_getopt(), and sctp_sysctl_handle_assoclist().
Definition at line 7544 of file sctputil.c.
Referenced by sctp_add_remote_addr().
Definition at line 489 of file sctputil.c.
References sctp_cwnd_log::from, KTR_SCTP, SCTP_CTR6, and SCTP_LOG_MISC_EVENT.
Referenced by process_chunk_drop(), sctp_asconf_queue_add(), sctp_check_for_revoked(), sctp_chunk_retransmission(), sctp_clean_up_datalist(), sctp_express_handle_sack(), sctp_handle_cookie_ack(), sctp_handle_heartbeat_ack(), sctp_handle_init_ack(), sctp_handle_sack(), sctp_lower_sosend(), sctp_mark_all_for_resend(), sctp_move_to_outqueue(), sctp_pathmtu_adjustment(), sctp_process_control(), sctp_process_data(), sctp_process_init_ack(), sctp_process_segment_range(), sctp_sorecvmsg(), sctp_strike_gap_ack_chunks(), sctp_threshold_management(), sctp_try_advance_peer_ack_point(), sctp_window_probe_recovery(), and send_forward_tsn().
Definition at line 780 of file sctputil.c.
Referenced by htcp_beta_update(), measure_rtt(), sctp_inpcb_alloc(), sctp_setopt(), and sctp_timer_start().
|
static |
Definition at line 3591 of file sctputil.c.
References sctp_tcb::asoc, sctp_association::context, sctp_queued_to_read::length, M_NOTIFICATION, sctp_association::peers_adaptation, sctp_association::primary_destination, sctp_adaptation_event::sai_adaptation_ind, sctp_adaptation_event::sai_assoc_id, sctp_adaptation_event::sai_flags, sctp_adaptation_event::sai_length, sctp_adaptation_event::sai_type, SCTP_ADAPTATION_INDICATION, sctp_add_to_readq(), SCTP_BUF_LEN, SCTP_BUF_NEXT, sctp_build_readq_entry(), sctp_tcb::sctp_ep, sctp_get_associd, sctp_get_mbuf_for_msg(), sctp_m_freem, SCTP_PCB_FLAGS_ADAPTATIONEVNT, SCTP_READ_LOCK_NOT_HELD, SCTP_SO_NOT_LOCKED, sctp_tcb::sctp_socket, sctp_stcb_is_feature_off, sctp_queued_to_read::spec_flags, sctp_queued_to_read::stcb, and sctp_queued_to_read::tail_mbuf.
Referenced by sctp_ulp_notify().
|
static |
Definition at line 3133 of file sctputil.c.
References sctp_association::asconf_supported, sctp_tcb::asoc, sctp_association::auth_supported, sctp_abort_chunk::ch, sctp_chunkhdr::chunk_length, sctp_association::context, sctp_association::idata_supported, sctp_queued_to_read::length, M_NOTIFICATION, sctp_association::primary_destination, sctp_association::prsctp_supported, sctp_association::reconfig_supported, sctp_assoc_change::sac_assoc_id, sctp_assoc_change::sac_error, sctp_assoc_change::sac_flags, sctp_assoc_change::sac_inbound_streams, sctp_assoc_change::sac_info, sctp_assoc_change::sac_length, sctp_assoc_change::sac_outbound_streams, sctp_assoc_change::sac_state, sctp_assoc_change::sac_type, sctp_add_to_readq(), SCTP_ASSOC_CHANGE, SCTP_ASSOC_SUPPORTS_ASCONF, SCTP_ASSOC_SUPPORTS_AUTH, SCTP_ASSOC_SUPPORTS_INTERLEAVING, SCTP_ASSOC_SUPPORTS_MAX, SCTP_ASSOC_SUPPORTS_MULTIBUF, SCTP_ASSOC_SUPPORTS_PR, SCTP_ASSOC_SUPPORTS_RE_CONFIG, SCTP_BUF_LEN, SCTP_BUF_NEXT, sctp_build_readq_entry(), SCTP_CANT_STR_ASSOC, SCTP_CHUNK_BUFFER_SIZE, SCTP_COMM_LOST, SCTP_COMM_UP, sctp_tcb::sctp_ep, sctp_inpcb::sctp_flags, SCTP_FROM_SCTPUTIL, sctp_get_associd, sctp_get_mbuf_for_msg(), SCTP_GET_STATE, SCTP_LTRACE_ERR_RET, sctp_m_freem, SCTP_PCB_FLAGS_IN_TCPPOOL, SCTP_PCB_FLAGS_RECVASSOCEVNT, SCTP_PCB_FLAGS_TCPTYPE, SCTP_READ_LOCK_NOT_HELD, SCTP_RESTART, sctp_tcb::sctp_socket, SCTP_STATE_COOKIE_WAIT, sctp_stcb_is_feature_on, sctp_queued_to_read::spec_flags, state, sctp_queued_to_read::stcb, sctp_association::streamincnt, sctp_association::streamoutcnt, and sctp_queued_to_read::tail_mbuf.
Referenced by sctp_ulp_notify().
|
static |
Definition at line 3639 of file sctputil.c.
References sctp_tcb::asoc, sctp_association::context, sctp_association::control_pdapi, sctp_queued_to_read::do_not_ref_stcb, sctp_queued_to_read::end_added, sctp_queued_to_read::length, M_NOTIFICATION, next, sctp_pdapi_event::pdapi_assoc_id, sctp_pdapi_event::pdapi_flags, sctp_pdapi_event::pdapi_indication, sctp_pdapi_event::pdapi_length, sctp_pdapi_event::pdapi_seq, sctp_pdapi_event::pdapi_stream, sctp_pdapi_event::pdapi_type, sctp_association::primary_destination, sctp_inpcb::read_queue, SCTP_BASE_SYSCTL, SCTP_BUF_LEN, SCTP_BUF_NEXT, sctp_build_readq_entry(), sctp_tcb::sctp_ep, sctp_inpcb::sctp_flags, sctp_get_associd, sctp_get_mbuf_for_msg(), SCTP_LOG_SBALLOC, SCTP_LOG_SBRESULT, sctp_m_freem, SCTP_PARTIAL_DELIVERY_EVENT, SCTP_PCB_FLAGS_PDAPIEVNT, SCTP_PCB_FLAGS_SOCKET_CANT_READ, SCTP_SB_LOGGING_ENABLE, sctp_sballoc, sctp_sblog(), sctp_tcb::sctp_socket, sctp_sorwakeup, sctp_stcb_is_feature_off, sctp_queued_to_read::spec_flags, and sctp_queued_to_read::tail_mbuf.
Referenced by sctp_ulp_notify().
|
static |
Definition at line 3276 of file sctputil.c.
References sctp_tcb::asoc, sctp_association::context, sctp_queued_to_read::length, M_NOTIFICATION, sctp_association::primary_destination, sctp_add_to_readq(), SCTP_BUF_LEN, SCTP_BUF_NEXT, sctp_build_readq_entry(), sctp_tcb::sctp_ep, sctp_get_associd, sctp_get_mbuf_for_msg(), sctp_is_feature_on, sctp_m_freem, SCTP_PCB_FLAGS_NEEDS_MAPPED_V4, SCTP_PCB_FLAGS_RECVPADDREVNT, SCTP_PEER_ADDR_CHANGE, SCTP_READ_LOCK_NOT_HELD, sctp_tcb::sctp_socket, sctp_stcb_is_feature_off, sctp_paddr_change::spc_aaddr, sctp_paddr_change::spc_assoc_id, sctp_paddr_change::spc_error, sctp_paddr_change::spc_flags, sctp_paddr_change::spc_length, sctp_paddr_change::spc_state, sctp_paddr_change::spc_type, sctp_queued_to_read::spec_flags, state, sctp_queued_to_read::stcb, and sctp_queued_to_read::tail_mbuf.
Referenced by sctp_ulp_notify().
|
static |
Definition at line 3977 of file sctputil.c.
References sctp_tcb::asoc, sctp_error_chunk::ch, sctp_chunkhdr::chunk_length, sctp_association::context, sctp_queued_to_read::length, M_NOTIFICATION, sctp_association::primary_destination, sctp_add_to_readq(), SCTP_BUF_LEN, SCTP_BUF_NEXT, sctp_build_readq_entry(), SCTP_CHUNK_BUFFER_SIZE, sctp_tcb::sctp_ep, sctp_get_associd, sctp_get_mbuf_for_msg(), sctp_m_freem, SCTP_PCB_FLAGS_RECVPEERERR, SCTP_READ_LOCK_NOT_HELD, SCTP_REMOTE_ERROR, SCTP_SO_NOT_LOCKED, sctp_tcb::sctp_socket, sctp_stcb_is_feature_off, sctp_queued_to_read::spec_flags, sctp_remote_error::sre_assoc_id, sctp_remote_error::sre_data, sctp_remote_error::sre_error, sctp_remote_error::sre_flags, sctp_remote_error::sre_length, sctp_remote_error::sre_type, sctp_queued_to_read::stcb, and sctp_queued_to_read::tail_mbuf.
Referenced by sctp_ulp_notify().
|
static |
Definition at line 3364 of file sctputil.c.
References sctp_tcb::asoc, sctp_chunkhdr::chunk_length, sctp_data_chunkrec::context, sctp_association::context, sctp_tmit_chunk::data, sctp_association::idata_supported, sctp_queued_to_read::length, M_NOTIFICATION, sctp_data_chunkrec::mid, sctp_data_chunkrec::ppid, sctp_association::primary_destination, sctp_data_chunkrec::rcv_flags, sctp_tmit_chunk::rec, sctp_add_to_readq(), SCTP_BUF_LEN, SCTP_BUF_NEXT, sctp_build_readq_entry(), SCTP_DATA_SENT, SCTP_DATA_UNSENT, sctp_tcb::sctp_ep, sctp_get_associd, sctp_get_mbuf_for_msg(), sctp_m_freem, sctp_mbuf_crush, SCTP_PCB_FLAGS_RECVNSENDFAILEVNT, SCTP_PCB_FLAGS_RECVSENDFAILEVNT, SCTP_READ_LOCK_NOT_HELD, sctp_sbspace_failedmsgs, SCTP_SEND_FAILED, SCTP_SEND_FAILED_EVENT, sctp_tcb::sctp_socket, sctp_stcb_is_feature_off, sctp_stcb_is_feature_on, sctp_tmit_chunk::send_size, sctp_data_chunkrec::sid, sctp_sndrcvinfo::sinfo_assoc_id, sctp_sndrcvinfo::sinfo_context, sctp_sndrcvinfo::sinfo_flags, sctp_sndrcvinfo::sinfo_ppid, sctp_sndrcvinfo::sinfo_ssn, sctp_sndrcvinfo::sinfo_stream, sctp_sndinfo::snd_assoc_id, sctp_sndinfo::snd_context, sctp_sndinfo::snd_flags, sctp_sndinfo::snd_ppid, sctp_sndinfo::snd_sid, sctp_queued_to_read::spec_flags, sctp_send_failed::ssf_assoc_id, sctp_send_failed::ssf_error, sctp_send_failed::ssf_flags, sctp_send_failed::ssf_info, sctp_send_failed::ssf_length, sctp_send_failed::ssf_type, sctp_send_failed_event::ssfe_assoc_id, sctp_send_failed_event::ssfe_error, sctp_send_failed_event::ssfe_flags, sctp_send_failed_event::ssfe_info, sctp_send_failed_event::ssfe_length, sctp_send_failed_event::ssfe_type, and sctp_queued_to_read::tail_mbuf.
Referenced by sctp_ulp_notify().
|
static |
Definition at line 3495 of file sctputil.c.
References sctp_tcb::asoc, sctp_stream_queue_pending::context, sctp_association::context, sctp_stream_queue_pending::data, sctp_queued_to_read::length, sctp_stream_queue_pending::length, M_NOTIFICATION, sctp_stream_queue_pending::ppid, sctp_association::primary_destination, sctp_add_to_readq(), SCTP_BUF_LEN, SCTP_BUF_NEXT, sctp_build_readq_entry(), SCTP_DATA_LAST_FRAG, SCTP_DATA_NOT_FRAG, SCTP_DATA_UNSENT, sctp_tcb::sctp_ep, sctp_get_associd, sctp_get_mbuf_for_msg(), sctp_m_freem, SCTP_PCB_FLAGS_RECVNSENDFAILEVNT, SCTP_PCB_FLAGS_RECVSENDFAILEVNT, SCTP_READ_LOCK_NOT_HELD, sctp_sbspace_failedmsgs, SCTP_SEND_FAILED, SCTP_SEND_FAILED_EVENT, sctp_tcb::sctp_socket, sctp_stcb_is_feature_off, sctp_stcb_is_feature_on, sctp_stream_queue_pending::sid, sctp_sndrcvinfo::sinfo_assoc_id, sctp_sndrcvinfo::sinfo_context, sctp_sndrcvinfo::sinfo_flags, sctp_sndrcvinfo::sinfo_ppid, sctp_sndrcvinfo::sinfo_ssn, sctp_sndrcvinfo::sinfo_stream, sctp_sndinfo::snd_assoc_id, sctp_sndinfo::snd_context, sctp_sndinfo::snd_flags, sctp_sndinfo::snd_ppid, sctp_sndinfo::snd_sid, sctp_stream_queue_pending::some_taken, sctp_queued_to_read::spec_flags, sctp_send_failed::ssf_assoc_id, sctp_send_failed::ssf_error, sctp_send_failed::ssf_flags, sctp_send_failed::ssf_info, sctp_send_failed::ssf_length, sctp_send_failed::ssf_type, sctp_send_failed_event::ssfe_assoc_id, sctp_send_failed_event::ssfe_error, sctp_send_failed_event::ssfe_flags, sctp_send_failed_event::ssfe_info, sctp_send_failed_event::ssfe_length, sctp_send_failed_event::ssfe_type, sctp_queued_to_read::stcb, and sctp_queued_to_read::tail_mbuf.
Referenced by sctp_ulp_notify().
|
static |
Definition at line 3760 of file sctputil.c.
References sctp_tcb::asoc, sctp_association::context, sctp_queued_to_read::length, M_NOTIFICATION, sctp_association::primary_destination, sctp_add_to_readq(), SCTP_BUF_LEN, SCTP_BUF_NEXT, sctp_build_readq_entry(), sctp_tcb::sctp_ep, sctp_get_associd, sctp_get_mbuf_for_msg(), sctp_m_freem, SCTP_PCB_FLAGS_DRYEVNT, SCTP_READ_LOCK_NOT_HELD, SCTP_SENDER_DRY_EVENT, sctp_tcb::sctp_socket, sctp_stcb_is_feature_off, sctp_queued_to_read::spec_flags, sctp_queued_to_read::stcb, and sctp_queued_to_read::tail_mbuf.
Referenced by sctp_ulp_notify().
|
static |
Definition at line 3707 of file sctputil.c.
References sctp_tcb::asoc, sctp_association::context, sctp_queued_to_read::length, M_NOTIFICATION, sctp_association::primary_destination, sctp_add_to_readq(), SCTP_BUF_LEN, SCTP_BUF_NEXT, sctp_build_readq_entry(), sctp_tcb::sctp_ep, sctp_inpcb::sctp_flags, sctp_get_associd, sctp_get_mbuf_for_msg(), sctp_m_freem, SCTP_PCB_FLAGS_IN_TCPPOOL, SCTP_PCB_FLAGS_RECVSHUTDOWNEVNT, SCTP_PCB_FLAGS_TCPTYPE, SCTP_READ_LOCK_NOT_HELD, SCTP_SHUTDOWN_EVENT, SCTP_SO_NOT_LOCKED, sctp_tcb::sctp_socket, sctp_stcb_is_feature_off, sctp_queued_to_read::spec_flags, sctp_shutdown_event::sse_assoc_id, sctp_shutdown_event::sse_flags, sctp_shutdown_event::sse_length, sctp_shutdown_event::sse_type, sctp_queued_to_read::stcb, and sctp_queued_to_read::tail_mbuf.
Referenced by sctp_ulp_notify().
|
static |
Definition at line 3913 of file sctputil.c.
References sctp_tcb::asoc, sctp_association::context, sctp_queued_to_read::length, M_NOTIFICATION, sctp_association::primary_destination, sctp_add_to_readq(), SCTP_BUF_LEN, SCTP_BUF_NEXT, sctp_build_readq_entry(), sctp_tcb::sctp_ep, sctp_get_associd, sctp_get_mbuf_for_msg(), sctp_m_freem, SCTP_PCB_FLAGS_STREAM_RESETEVNT, SCTP_READ_LOCK_NOT_HELD, sctp_sbspace, SCTP_SO_NOT_LOCKED, sctp_tcb::sctp_socket, sctp_stcb_is_feature_off, SCTP_STREAM_RESET_EVENT, sctp_queued_to_read::spec_flags, sctp_stream_reset_event::strreset_assoc_id, sctp_stream_reset_event::strreset_flags, sctp_stream_reset_event::strreset_length, sctp_stream_reset_event::strreset_stream_list, sctp_stream_reset_event::strreset_type, and sctp_queued_to_read::tail_mbuf.
Referenced by sctp_ulp_notify().
void sctp_notify_stream_reset_add | ( | struct sctp_tcb * | stcb, |
uint16_t | numberin, | ||
uint16_t | numberout, | ||
int | flag | ||
) |
Definition at line 3807 of file sctputil.c.
References sctp_tcb::asoc, sctp_association::context, sctp_queued_to_read::length, M_NOTIFICATION, sctp_association::peer_req_out, sctp_association::primary_destination, sctp_add_to_readq(), SCTP_BUF_LEN, SCTP_BUF_NEXT, sctp_build_readq_entry(), sctp_tcb::sctp_ep, sctp_get_associd, sctp_get_mbuf_for_msg(), sctp_m_freem, SCTP_PCB_FLAGS_STREAM_CHANGEEVNT, SCTP_READ_LOCK_NOT_HELD, sctp_sbspace, SCTP_SO_NOT_LOCKED, sctp_tcb::sctp_socket, sctp_stcb_is_feature_off, SCTP_STREAM_CHANGE_EVENT, sctp_queued_to_read::spec_flags, sctp_stream_change_event::strchange_assoc_id, sctp_stream_change_event::strchange_flags, sctp_stream_change_event::strchange_instrms, sctp_stream_change_event::strchange_length, sctp_stream_change_event::strchange_outstrms, sctp_stream_change_event::strchange_type, and sctp_queued_to_read::tail_mbuf.
Referenced by sctp_handle_str_reset_add_strm(), and sctp_handle_stream_reset_response().
void sctp_notify_stream_reset_tsn | ( | struct sctp_tcb * | stcb, |
uint32_t | sending_tsn, | ||
uint32_t | recv_tsn, | ||
int | flag | ||
) |
Definition at line 3863 of file sctputil.c.
References sctp_tcb::asoc, sctp_assoc_reset_event::assocreset_assoc_id, sctp_assoc_reset_event::assocreset_flags, sctp_assoc_reset_event::assocreset_length, sctp_assoc_reset_event::assocreset_local_tsn, sctp_assoc_reset_event::assocreset_remote_tsn, sctp_assoc_reset_event::assocreset_type, sctp_association::context, sctp_queued_to_read::length, M_NOTIFICATION, sctp_association::primary_destination, sctp_add_to_readq(), SCTP_ASSOC_RESET_EVENT, SCTP_BUF_LEN, SCTP_BUF_NEXT, sctp_build_readq_entry(), sctp_tcb::sctp_ep, sctp_get_associd, sctp_get_mbuf_for_msg(), sctp_m_freem, SCTP_PCB_FLAGS_ASSOC_RESETEVNT, SCTP_READ_LOCK_NOT_HELD, sctp_sbspace, SCTP_SO_NOT_LOCKED, sctp_tcb::sctp_socket, sctp_stcb_is_feature_off, sctp_queued_to_read::spec_flags, and sctp_queued_to_read::tail_mbuf.
Referenced by sctp_handle_str_reset_request_tsn(), and sctp_handle_stream_reset_response().
int sctp_over_udp_start | ( | void | ) |
Definition at line 7453 of file sctputil.c.
References IPPROTO_UDP, SCTP_BASE_INFO, SCTP_BASE_SYSCTL, sctp_over_udp_stop(), sctp_recv_udp_tunneled_packet(), sockaddr_in::sin_family, sockaddr_in::sin_len, sockaddr_in::sin_port, and udp_set_kernel_tunneling().
Referenced by sctp_sysctl_handle_udp_tunneling().
void sctp_over_udp_stop | ( | void | ) |
Definition at line 7432 of file sctputil.c.
References SCTP_BASE_INFO.
Referenced by sctp_over_udp_start(), and sctp_sysctl_handle_udp_tunneling().
struct mbuf * sctp_pad_lastmbuf | ( | struct mbuf * | m, |
int | padval, | ||
struct mbuf * | last_mbuf | ||
) |
Definition at line 3115 of file sctputil.c.
References sctp_add_pad_tombuf(), and SCTP_BUF_NEXT.
Referenced by sctp_move_to_outqueue(), sctp_send_cookie_echo(), and sctp_send_heartbeat_ack().
void sctp_print_address | ( | struct sockaddr * | sa | ) |
Definition at line 4718 of file sctputil.c.
References SCTP_PRINTF, sockaddr_in::sin_addr, and sockaddr_in::sin_port.
Referenced by sctp_find_ifa_by_addr().
void sctp_print_mapping_array | ( | struct sctp_association * | asoc | ) |
Definition at line 1382 of file sctputil.c.
References sctp_association::cumulative_tsn, sctp_association::highest_tsn_inside_map, sctp_association::highest_tsn_inside_nr_map, sctp_association::mapping_array, sctp_association::mapping_array_base_tsn, sctp_association::mapping_array_size, sctp_association::nr_mapping_array, and SCTP_PRINTF.
Referenced by sctp_slide_mapping_arrays().
void sctp_pull_off_control_to_new_inp | ( | struct sctp_inpcb * | old_inp, |
struct sctp_inpcb * | new_inp, | ||
struct sctp_tcb * | stcb, | ||
int | waitflags | ||
) |
Definition at line 4758 of file sctputil.c.
References sctp_queued_to_read::data, sctp_queued_to_read::do_not_ref_stcb, next, sctp_inpcb::read_queue, SCTP_BASE_SYSCTL, SCTP_BUF_LEN, SCTP_BUF_NEXT, SCTP_INP_READ_LOCK, SCTP_INP_READ_UNLOCK, SCTP_LOG_SBALLOC, SCTP_LOG_SBFREE, SCTP_LOG_SBRESULT, SCTP_SB_LOGGING_ENABLE, sctp_sballoc, sctp_sbfree, sctp_sblog(), sctp_inpcb::sctp_socket, and sctp_queued_to_read::stcb.
Referenced by sctp_do_peeloff(), and sctp_handle_cookie_echo().
|
static |
Definition at line 7098 of file sctputil.c.
References ip::ip_len, ip::ip_v, IPV6_VERSION, IPVERSION, SCTP_DEBUG_CRCOFFLOAD, SCTPDBG, and udphdr::uh_sport.
Referenced by sctp_over_udp_start().
int sctp_release_pr_sctp_chunk | ( | struct sctp_tcb * | stcb, |
struct sctp_tmit_chunk * | tp1, | ||
uint8_t | sent, | ||
int | so_locked | ||
) |
Definition at line 5031 of file sctputil.c.
References sctp_stream_out::abandoned_sent, sctp_association::abandoned_sent, sctp_stream_out::abandoned_unsent, sctp_association::abandoned_unsent, sctp_stream_queue_pending::act_flags, sctp_tcb::asoc, sctp_tmit_chunk::asoc, sctp_tmit_chunk::book_size, sctp_stream_out::chunks_on_queues, sctp_data_chunkrec::context, sctp_stream_queue_pending::context, sctp_tmit_chunk::data, sctp_stream_queue_pending::data, sctp_stream_queue_pending::discard_rest, sctp_tmit_chunk::flags, sctp_association::idata_supported, sctp_stream_queue_pending::length, sctp_data_chunkrec::mid, sctp_stream_out::next_mid_ordered, sctp_stream_out::next_mid_unordered, sctp_stream_out::outqueue, sctp_association::peers_rwnd, sctp_data_chunkrec::ppid, sctp_stream_queue_pending::ppid, PR_SCTP_BUF_ENABLED, sctp_association::pr_sctp_cnt, PR_SCTP_POLICY, sctp_data_chunkrec::rcv_flags, sctp_tmit_chunk::rec, sctp_alloc_a_chunk, SCTP_BASE_SYSCTL, SCTP_DATA_FIRST_FRAG, SCTP_DATA_LAST_FRAG, SCTP_DATA_NOT_FRAG, SCTP_DATA_UNORDERED, SCTP_DATAGRAM_RESEND, sctp_tcb::sctp_ep, sctp_flight_size_decrease, SCTP_FORWARD_TSN_SKIP, sctp_free_bufspace, sctp_free_spbufspace, sctp_m_freem, SCTP_MID_EQ, SCTP_NOTIFY_SENT_DG_FAIL, SCTP_NOTIFY_UNSENT_DG_FAIL, sctp_tcb::sctp_socket, sctp_sowwakeup, SCTP_TCB_SEND_LOCK, SCTP_TCB_SEND_UNLOCK, sctp_total_flight_decrease, sctp_ulp_notify(), SCTP_UNORDERED, sctp_association::send_queue, sctp_association::send_queue_cnt, sctp_tmit_chunk::send_size, sctp_association::sending_seq, sctp_tmit_chunk::sent, sctp_association::sent_queue, sctp_association::sent_queue_cnt, sctp_association::sent_queue_cnt_removeable, sctp_data_chunkrec::sid, sctp_stream_queue_pending::sid, sctp_stream_queue_pending::sinfo_flags, sctp_stream_queue_pending::some_taken, sctp_association::strmout, sctp_stream_queue_pending::tail_mbuf, sctp_data_chunkrec::tsn, and sctp_tmit_chunk::whoTo.
Referenced by sctp_mark_all_for_resend(), sctp_prune_prsctp(), sctp_strike_gap_ack_chunks(), and sctp_try_advance_peer_ack_point().
Definition at line 4226 of file sctputil.c.
References sctp_tcb::asoc, sctp_stream_out::chunks_on_queues, sctp_tmit_chunk::data, sctp_stream_queue_pending::data, sctp_stream_queue_pending::net, next, sctp_stream_out::outqueue, sctp_tmit_chunk::rec, SCTP_DATAGRAM_NR_ACKED, sctp_tcb::sctp_ep, sctp_inpcb::sctp_flags, sctp_free_a_chunk, sctp_free_a_strmoq, sctp_free_bufspace, sctp_free_remote_addr, sctp_free_spbufspace, sctp_m_freem, SCTP_NOTIFY_SENT_DG_FAIL, SCTP_NOTIFY_SPECIAL_SP_FAIL, SCTP_NOTIFY_UNSENT_DG_FAIL, SCTP_PCB_FLAGS_SOCKET_ALLGONE, SCTP_PCB_FLAGS_SOCKET_GONE, sctp_ss_functions::sctp_ss_remove_from_stream, SCTP_STATE_ABOUT_TO_BE_FREED, SCTP_STATE_CLOSED_SOCKET, sctp_ulp_notify(), sctp_association::send_queue, sctp_association::send_queue_cnt, sctp_tmit_chunk::sent, sctp_association::sent_queue, sctp_association::sent_queue_cnt, sctp_data_chunkrec::sid, sctp_association::ss_functions, sctp_association::state, sctp_association::stream_queue_cnt, sctp_association::streamoutcnt, and sctp_association::strmout.
Referenced by sctp_abort_notification(), and sctp_process_cookie_existing().
void sctp_sblog | ( | struct sockbuf * | sb, |
struct sctp_tcb * | stcb, | ||
int | from, | ||
int | incr | ||
) |
Definition at line 73 of file sctputil.c.
References sctp_tcb::asoc, sctp_cwnd_log::from, sctp_sb_log::incr, KTR_SCTP, sctp_misc_info::log1, sctp_misc_info::log2, sctp_misc_info::log3, sctp_misc_info::log4, sctp_cwnd_log::misc, sctp_cwnd_log::sb, sctp_association::sb_cc, SCTP_CTR6, SCTP_LOG_EVENT_SB, sctp_sb_log::so_sbcc, sctp_sb_log::stcb, sctp_sb_log::stcb_sbcc, and sctp_cwnd_log::x.
Referenced by sctp_add_to_readq(), sctp_notify_partial_delivery_indication(), sctp_pull_off_control_to_new_inp(), and sctp_sorecvmsg().
Definition at line 818 of file sctputil.c.
Referenced by sctp_autoclose_timer(), sctp_inpcb_alloc(), and sctp_setopt().
uint32_t sctp_select_a_tag | ( | struct sctp_inpcb * | inp, |
uint16_t | lport, | ||
uint16_t | rport, | ||
int | check | ||
) |
Definition at line 1049 of file sctputil.c.
References sctp_inpcb::sctp_ep, SCTP_GETTIME_TIMEVAL, sctp_is_vtag_good(), and sctp_select_initial_TSN().
Referenced by sctp_handle_nat_colliding_state(), sctp_init_asoc(), and sctp_send_initiate_ack().
Definition at line 1011 of file sctputil.c.
References sctp_pcb::initial_sequence_debug, sctp_pcb::random_store, sctp_fill_random_store(), SCTP_SIGNATURE_SIZE, and sctp_pcb::store_at.
Referenced by sctp_find_alternate_net(), sctp_init_asoc(), sctp_inpcb_alloc(), sctp_inpcb_bind_locked(), sctp_select_a_tag(), sctp_send_hb(), sctp_send_initiate_ack(), sctp_timeout_handler(), and sctp_timer_start().
void sctp_set_state | ( | struct sctp_tcb * | stcb, |
int | new_state | ||
) |
Definition at line 7624 of file sctputil.c.
References sctp_tcb::asoc, SCTP_CLEAR_SUBSTATE, SCTP_PROBE6, SCTP_STATE_EMPTY, SCTP_STATE_INUSE, SCTP_STATE_MASK, SCTP_STATE_SHUTDOWN_ACK_SENT, SCTP_STATE_SHUTDOWN_PENDING, SCTP_STATE_SHUTDOWN_RECEIVED, SCTP_STATE_SHUTDOWN_SENT, and sctp_association::state.
int sctp_soreceive | ( | struct socket * | so, |
struct sockaddr ** | psa, | ||
struct uio * | uio, | ||
struct mbuf ** | mp0, | ||
struct mbuf ** | controlp, | ||
int * | flagsp | ||
) |
Definition at line 6508 of file sctputil.c.
References sctp_inpcb::inp, sctp_build_ctl_nchunk(), SCTP_FROM_SCTPUTIL, sctp_is_feature_off, SCTP_LTRACE_ERR_RET, SCTP_PCB_FLAGS_RECVDATAIOEVNT, SCTP_PCB_FLAGS_RECVNXTINFO, SCTP_PCB_FLAGS_RECVRCVINFO, and sctp_sorecvmsg().
int sctp_sorecvmsg | ( | struct socket * | so, |
struct uio * | uio, | ||
struct mbuf ** | mp, | ||
struct sockaddr * | from, | ||
int | fromlen, | ||
int * | msg_flags, | ||
struct sctp_sndrcvinfo * | sinfo, | ||
int | filling_sinfo | ||
) |
Definition at line 5477 of file sctputil.c.
References sctp_net_route::_l_addr, sctp_tcb::asoc, sctp_queued_to_read::aux_data, sctp_inpcb::control, sctp_association::cumulative_tsn, sctp_queued_to_read::data, sctp_stream_in::delivery_started, sctp_queued_to_read::do_not_ref_stcb, sctp_queued_to_read::end_added, sctp_pcbtsn_rlog::flgs, sctp_tcb::freed_by_sorcv_sincelast, sctp_queued_to_read::held_length, sctp_inpcb::inp, sctp_inpcb::inp_rdata_mtx, sctp_queued_to_read::length, M_NOTIFICATION, sctp_queued_to_read::mid, sctp_association::my_rwnd, next, sctp_queued_to_read::on_strm_q, sctp_queued_to_read::pdapi_aborted, sctp_queued_to_read::port_from, sctp_inpcb::read_queue, sctp_association::refcnt, sctp_nets::ro, sctp_sockstore::sa, sctp_association::sb_cc, SCTP_BASE_SYSCTL, SCTP_BUF_LEN, SCTP_BUF_NEXT, SCTP_BUF_RESV_UF, SCTP_DATA_UNORDERED, sctp_inpcb::sctp_flags, sctp_free_a_readq, sctp_free_remote_addr, SCTP_FROM_SCTPUTIL, SCTP_INP_READ_LOCK, SCTP_INP_READ_UNLOCK, sctp_is_feature_on, SCTP_LOG_SBFREE, SCTP_LOG_SBRESULT, SCTP_LTRACE_ERR_RET, sctp_m_free, sctp_m_freem, SCTP_MIN_RWND, sctp_misc_ints(), SCTP_NEXT_MSG_AVAIL, SCTP_NEXT_MSG_IS_NOTIFICATION, SCTP_NEXT_MSG_IS_UNORDERED, SCTP_NEXT_MSG_ISCOMPLETE, SCTP_NO_NEXT_MSG, SCTP_PCB_FLAGS_CONNECTED, SCTP_PCB_FLAGS_EXPLICIT_EOR, SCTP_PCB_FLAGS_EXT_RCVINFO, SCTP_PCB_FLAGS_FRAG_INTERLEAVE, SCTP_PCB_FLAGS_IN_TCPPOOL, SCTP_PCB_FLAGS_INTERLEAVE_STRMS, SCTP_PCB_FLAGS_NEEDS_MAPPED_V4, SCTP_PCB_FLAGS_RECVNXTINFO, SCTP_PCB_FLAGS_SOCKET_ALLGONE, SCTP_PCB_FLAGS_SOCKET_GONE, SCTP_PCB_FLAGS_TCPTYPE, SCTP_PCB_FLAGS_WAS_ABORTED, SCTP_PCB_FLAGS_WAS_CONNECTED, SCTP_PRINTF, SCTP_READ_LOG_SIZE, SCTP_RECV_RWND_LOGGING_ENABLE, SCTP_RWND_HIWAT_SHIFT, SCTP_SB_LIMIT_RCV, SCTP_SB_LOGGING_ENABLE, sctp_sbfree, sctp_sblog(), SCTP_SO_IS_NBIO, SCTP_SORECV_DONE, SCTP_SORECV_ENTER, SCTP_SORECV_ENTERPL, sctp_sorwakeup, SCTP_STAT_INCR, SCTP_STATE_ABOUT_TO_BE_FREED, SCTP_UNORDERED, sctp_user_rcvd(), sctp_pcbtsn_rlog::seq, sctp_extrcvinfo::serinfo_next_aid, sctp_extrcvinfo::serinfo_next_flags, sctp_extrcvinfo::serinfo_next_length, sctp_extrcvinfo::serinfo_next_ppid, sctp_extrcvinfo::serinfo_next_stream, sctp_sockstore::sin, sctp_sockstore::sin6, sockaddr_in::sin_port, sctp_queued_to_read::sinfo_assoc_id, sctp_sndrcvinfo::sinfo_assoc_id, sctp_queued_to_read::sinfo_context, sctp_sndrcvinfo::sinfo_context, sctp_queued_to_read::sinfo_cumtsn, sctp_sndrcvinfo::sinfo_cumtsn, sctp_queued_to_read::sinfo_flags, sctp_sndrcvinfo::sinfo_flags, sctp_queued_to_read::sinfo_ppid, sctp_sndrcvinfo::sinfo_ppid, sctp_sndrcvinfo::sinfo_ssn, sctp_queued_to_read::sinfo_stream, sctp_sndrcvinfo::sinfo_stream, sctp_queued_to_read::sinfo_timetolive, sctp_sndrcvinfo::sinfo_timetolive, sctp_queued_to_read::sinfo_tsn, sctp_sndrcvinfo::sinfo_tsn, sctp_queued_to_read::some_taken, sctp_queued_to_read::spec_flags, sctp_association::state, sctp_queued_to_read::stcb, sctp_pcbtsn_rlog::strm, sctp_association::strmin, sctp_pcbtsn_rlog::sz, sctp_queued_to_read::tail_mbuf, sctp_pcbtsn_rlog::vtag, and sctp_queued_to_read::whoFrom.
Referenced by sctp_soreceive(), and sys_sctp_generic_recvmsg().
void sctp_stop_association_timers | ( | struct sctp_tcb * | stcb, |
bool | stop_assoc_kill_timer | ||
) |
Definition at line 877 of file sctputil.c.
References sctp_tcb::asoc, sctp_inpcb::inp, sctp_association::nets, sctp_tcb::sctp_ep, SCTP_FROM_SCTPUTIL, SCTP_LOC_18, SCTP_LOC_19, SCTP_LOC_20, SCTP_LOC_21, SCTP_LOC_22, SCTP_LOC_23, SCTP_LOC_24, SCTP_LOC_25, SCTP_LOC_26, SCTP_LOC_27, SCTP_LOC_28, SCTP_LOC_29, SCTP_LOC_30, SCTP_LOC_31, sctp_timer_stop(), SCTP_TIMER_TYPE_ASCONF, SCTP_TIMER_TYPE_ASOCKILL, SCTP_TIMER_TYPE_AUTOCLOSE, SCTP_TIMER_TYPE_COOKIE, SCTP_TIMER_TYPE_HEARTBEAT, SCTP_TIMER_TYPE_INIT, SCTP_TIMER_TYPE_PATHMTURAISE, SCTP_TIMER_TYPE_PRIM_DELETED, SCTP_TIMER_TYPE_RECV, SCTP_TIMER_TYPE_SEND, SCTP_TIMER_TYPE_SHUTDOWN, SCTP_TIMER_TYPE_SHUTDOWNACK, SCTP_TIMER_TYPE_SHUTDOWNGUARD, and SCTP_TIMER_TYPE_STRRESET.
Referenced by sctp_free_assoc(), and sctp_process_cookie_existing().
void sctp_stop_timers_for_shutdown | ( | struct sctp_tcb * | stcb | ) |
Definition at line 853 of file sctputil.c.
References sctp_tcb::asoc, sctp_inpcb::inp, sctp_association::nets, sctp_tcb::sctp_ep, SCTP_FROM_SCTPUTIL, SCTP_LOC_12, SCTP_LOC_13, SCTP_LOC_14, SCTP_LOC_15, SCTP_LOC_16, SCTP_LOC_17, sctp_timer_stop(), SCTP_TIMER_TYPE_ASCONF, SCTP_TIMER_TYPE_AUTOCLOSE, SCTP_TIMER_TYPE_HEARTBEAT, SCTP_TIMER_TYPE_PATHMTURAISE, SCTP_TIMER_TYPE_RECV, and SCTP_TIMER_TYPE_STRRESET.
Referenced by sctp_autoclose_timer(), sctp_disconnect(), sctp_express_handle_sack(), sctp_handle_sack(), sctp_handle_shutdown(), sctp_inpcb_free(), sctp_lower_sosend(), sctp_sendall_iterator(), and sctp_shutdown().
Definition at line 799 of file sctputil.c.
Referenced by sctp_getopt(), sctp_handle_cookie_echo(), and sctp_init_asoc().
Definition at line 833 of file sctputil.c.
Referenced by sctp_getopt(), and sctp_handle_cookie_echo().
void sctp_timeout_handler | ( | void * | t | ) |
Definition at line 1719 of file sctputil.c.
References sctp_tcb::asoc, sctp_pcb::current_secret_number, sctp_nets::dest_state, sctp_timer::ep, sctp_inpcb::inp, sctp_pcb::last_secret_number, sctp_timer::net, sctp_association::num_send_timers_up, sctp_association::refcnt, sctp_abort_an_association(), SCTP_ADDR_NOHB, sctp_asconf_timer(), sctp_autoclose_timer(), SCTP_BASE_SYSCTL, SCTP_CALLED_FROM_INPKILL_TIMER, sctp_chunk_output(), sctp_cookie_timer(), SCTP_DEBUG_TIMER2, sctp_delete_prim_timer(), sctp_inpcb::sctp_ep, sctp_tcb::sctp_ep, sctp_fix_ecn_echo(), sctp_free_assoc(), sctp_free_remote_addr, SCTP_FREE_SHOULD_USE_ABORT, SCTP_FROM_SCTPUTIL, sctp_generate_cause(), SCTP_GETTIME_TIMEVAL, sctp_handle_addr_wq(), sctp_heartbeat_timer(), SCTP_HOW_MANY_SECRETS, SCTP_INP_DECR_REF, SCTP_INP_WLOCK, SCTP_INP_WUNLOCK, sctp_inpcb_free(), SCTP_IS_TIMER_TYPE_VALID, SCTP_LOC_1, SCTP_LOC_2, SCTP_LOC_3, SCTP_NORMAL_PROC, SCTP_NUMBER_OF_SECRETS, SCTP_OS_TIMER_ACTIVE, SCTP_OS_TIMER_DEACTIVATE, SCTP_OS_TIMER_PENDING, SCTP_OUTPUT_FROM_ASCONF_TMR, SCTP_OUTPUT_FROM_AUTOCLOSE_TMR, SCTP_OUTPUT_FROM_HB_TMR, SCTP_OUTPUT_FROM_SACK_TMR, SCTP_OUTPUT_FROM_SHUT_ACK_TMR, SCTP_OUTPUT_FROM_SHUT_TMR, SCTP_OUTPUT_FROM_STRRST_TMR, SCTP_OUTPUT_FROM_T3, sctp_pathmtu_timer(), sctp_select_initial_TSN(), sctp_send_sack(), sctp_shutdown_timer(), sctp_shutdownack_timer(), SCTP_SO_NOT_LOCKED, SCTP_STAT_INCR, SCTP_STATE_ABOUT_TO_BE_FREED, SCTP_STATE_EMPTY, sctp_strreset_timer(), sctp_t1init_timer(), sctp_t3rxt_timer(), SCTP_TCB_LOCK, SCTP_TCB_LOCK_ASSERT, SCTP_TCB_UNLOCK, sctp_timer_start(), sctp_timer_stop(), SCTP_TIMER_TYPE_ADDR_WQ, SCTP_TIMER_TYPE_ASCONF, SCTP_TIMER_TYPE_ASOCKILL, SCTP_TIMER_TYPE_AUTOCLOSE, SCTP_TIMER_TYPE_COOKIE, SCTP_TIMER_TYPE_HEARTBEAT, SCTP_TIMER_TYPE_INIT, SCTP_TIMER_TYPE_INPKILL, SCTP_TIMER_TYPE_NEWCOOKIE, SCTP_TIMER_TYPE_PATHMTURAISE, SCTP_TIMER_TYPE_PRIM_DELETED, SCTP_TIMER_TYPE_RECV, SCTP_TIMER_TYPE_SEND, SCTP_TIMER_TYPE_SHUTDOWN, SCTP_TIMER_TYPE_SHUTDOWNACK, SCTP_TIMER_TYPE_SHUTDOWNGUARD, SCTP_TIMER_TYPE_STRRESET, SCTP_WQ_ADDR_LOCK, SCTP_WQ_ADDR_UNLOCK, SCTPDBG, sctp_pcb::secret_key, sctp_timer::self, sctp_association::sent_queue, sctp_association::sent_queue_cnt, sctp_association::state, sctp_timer::stopped_from, sctp_timer::tcb, sctp_pcb::time_of_secret_change, sctp_timer::timer, sctp_association::timocookie, sctp_association::timodata, sctp_association::timoheartbeat, sctp_association::timoinit, sctp_association::timosack, sctp_association::timoshutdown, sctp_association::timoshutdownack, sctp_timer::type, sctp_timer::vnet, and sctp_tmit_chunk::whoTo.
Referenced by sctp_timer_start().
void sctp_timer_start | ( | int | t_type, |
struct sctp_inpcb * | inp, | ||
struct sctp_tcb * | stcb, | ||
struct sctp_nets * | net | ||
) |
Definition at line 2157 of file sctputil.c.
References sctp_association::asconf_timer, sctp_tcb::asoc, sctp_association::autoclose_timer, sctp_association::dack_timer, sctp_association::delayed_ack, sctp_association::delete_prim_timer, sctp_timer::ep, sctp_association::initial_rto, sctp_association::maxrto, sctp_timer::net, sctp_association::num_send_timers_up, sctp_association::refcnt, SCTP_ADDR_BEING_DELETED, SCTP_ADDR_NO_PMTUD, SCTP_ADDR_NOHB, SCTP_ADDR_PF, SCTP_ADDR_UNCONFIRMED, SCTP_ADDRESS_TICK_DELAY, SCTP_ASOC_KILL_TIMEOUT, sctp_association::sctp_autoclose_ticks, SCTP_BASE_INFO, SCTP_DEBUG_TIMER2, sctp_inpcb::sctp_ep, sctp_tcb::sctp_ep, sctp_get_tick_count, SCTP_INP_INCR_REF, SCTP_INP_KILL_TIMEOUT, SCTP_INP_WLOCK_ASSERT, sctp_msecs_to_ticks(), SCTP_OS_TIMER_PENDING, SCTP_OS_TIMER_START, sctp_select_initial_TSN(), SCTP_STATE_ABOUT_TO_BE_FREED, SCTP_TCB_LOCK_ASSERT, sctp_timeout_handler(), sctp_pcb::sctp_timeoutticks, SCTP_TIMER_MAXSHUTDOWN, SCTP_TIMER_PMTU, SCTP_TIMER_SIGNATURE, SCTP_TIMER_TYPE_ADDR_WQ, SCTP_TIMER_TYPE_ASCONF, SCTP_TIMER_TYPE_ASOCKILL, SCTP_TIMER_TYPE_AUTOCLOSE, SCTP_TIMER_TYPE_COOKIE, SCTP_TIMER_TYPE_HEARTBEAT, SCTP_TIMER_TYPE_INIT, SCTP_TIMER_TYPE_INPKILL, SCTP_TIMER_TYPE_NEWCOOKIE, SCTP_TIMER_TYPE_PATHMTURAISE, SCTP_TIMER_TYPE_PRIM_DELETED, SCTP_TIMER_TYPE_RECV, SCTP_TIMER_TYPE_SEND, SCTP_TIMER_TYPE_SHUTDOWN, SCTP_TIMER_TYPE_SHUTDOWNACK, SCTP_TIMER_TYPE_SHUTDOWNGUARD, SCTP_TIMER_TYPE_STRRESET, SCTP_WQ_ADDR_LOCK_ASSERT, SCTPDBG, sctp_timer::self, sctp_association::shut_guard_timer, sctp_pcb::signature_change, sctp_association::state, sctp_timer::stopped_from, sctp_association::strreset_timer, sctp_timer::tcb, sctp_timer::ticks, sctp_timer::timer, sctp_timer::type, and sctp_timer::vnet.
Referenced by process_chunk_drop(), sctp_add_addr_to_vrf(), sctp_addr_mgmt_assoc(), sctp_assoc_immediate_retrans(), sctp_autoclose_timer(), sctp_chunk_retransmission(), sctp_cwnd_update_after_fr(), sctp_del_addr_from_vrf(), sctp_disconnect(), sctp_do_connect_x(), sctp_dynamic_set_primary(), sctp_express_handle_sack(), sctp_free_assoc(), sctp_handle_addr_wq(), sctp_handle_asconf_ack(), sctp_handle_cookie_ack(), sctp_handle_heartbeat_ack(), sctp_handle_init_ack(), sctp_handle_sack(), sctp_handle_shutdown(), sctp_hs_cwnd_update_after_fr(), sctp_htcp_cwnd_update_after_fr(), sctp_inpcb_alloc(), sctp_inpcb_free(), sctp_lower_sosend(), sctp_med_chunk_output(), sctp_move_pcb_and_assoc(), sctp_pathmtu_timer(), sctp_process_asconf_add_ip(), sctp_process_control(), sctp_process_cookie_existing(), sctp_process_cookie_new(), sctp_process_initack_addresses(), sctp_remove_net(), sctp_sack_check(), sctp_send_initiate(), sctp_send_sack(), sctp_send_str_reset_req(), sctp_send_stream_reset_out_if_possible(), sctp_sendall_iterator(), sctp_set_primary_ip_address_sa(), sctp_setopt(), sctp_shutdown(), sctp_shutdown_timer(), sctp_shutdownack_timer(), sctp_start_net_timers(), sctp_strreset_timer(), sctp_t3rxt_timer(), sctp_threshold_management(), sctp_timeout_handler(), and sctp_timer_validation().
void sctp_timer_stop | ( | int | t_type, |
struct sctp_inpcb * | inp, | ||
struct sctp_tcb * | stcb, | ||
struct sctp_nets * | net, | ||
uint32_t | from | ||
) |
Definition at line 2615 of file sctputil.c.
References sctp_association::asconf_timer, sctp_tcb::asoc, sctp_association::autoclose_timer, sctp_association::dack_timer, sctp_association::delete_prim_timer, sctp_timer::ep, sctp_timer::net, sctp_association::num_send_timers_up, sctp_association::refcnt, SCTP_BASE_INFO, SCTP_DEBUG_TIMER2, sctp_inpcb::sctp_ep, sctp_tcb::sctp_ep, sctp_free_remote_addr, SCTP_INP_DECR_REF, SCTP_INP_WLOCK_ASSERT, SCTP_OS_TIMER_STOP, SCTP_TCB_LOCK_ASSERT, SCTP_TIMER_TYPE_ADDR_WQ, SCTP_TIMER_TYPE_ASCONF, SCTP_TIMER_TYPE_ASOCKILL, SCTP_TIMER_TYPE_AUTOCLOSE, SCTP_TIMER_TYPE_COOKIE, SCTP_TIMER_TYPE_HEARTBEAT, SCTP_TIMER_TYPE_INIT, SCTP_TIMER_TYPE_INPKILL, SCTP_TIMER_TYPE_NEWCOOKIE, SCTP_TIMER_TYPE_NONE, SCTP_TIMER_TYPE_PATHMTURAISE, SCTP_TIMER_TYPE_PRIM_DELETED, SCTP_TIMER_TYPE_RECV, SCTP_TIMER_TYPE_SEND, SCTP_TIMER_TYPE_SHUTDOWN, SCTP_TIMER_TYPE_SHUTDOWNACK, SCTP_TIMER_TYPE_SHUTDOWNGUARD, SCTP_TIMER_TYPE_STRRESET, SCTP_WQ_ADDR_LOCK_ASSERT, SCTPDBG, sctp_timer::self, sctp_association::shut_guard_timer, sctp_pcb::signature_change, sctp_timer::stopped_from, sctp_association::strreset_timer, sctp_timer::tcb, sctp_timer::timer, and sctp_timer::type.
Referenced by process_chunk_drop(), sctp_asconf_cleanup(), sctp_assoc_immediate_retrans(), sctp_chunk_output(), sctp_chunk_retransmission(), sctp_clean_up_stream_reset(), sctp_cwnd_update_after_fr(), sctp_drain_mbufs(), sctp_express_handle_sack(), sctp_handle_abort(), sctp_handle_asconf_ack(), sctp_handle_heartbeat_ack(), sctp_handle_sack(), sctp_handle_shutdown(), sctp_handle_shutdown_ack(), sctp_handle_shutdown_complete(), sctp_hs_cwnd_update_after_fr(), sctp_htcp_cwnd_update_after_fr(), sctp_inpcb_free(), sctp_med_chunk_output(), sctp_net_immediate_retrans(), sctp_process_asconf_set_primary(), sctp_process_cookie_existing(), sctp_process_init_ack(), sctp_remove_net(), sctp_sack_check(), sctp_send_sack(), sctp_setopt(), sctp_stop_all_cookie_timers(), sctp_stop_association_timers(), sctp_stop_timers_for_shutdown(), sctp_threshold_management(), sctp_timeout_handler(), and sctp_user_rcvd().
void sctp_ulp_notify | ( | uint32_t | notification, |
struct sctp_tcb * | stcb, | ||
uint32_t | error, | ||
void * | data, | ||
int | so_locked | ||
) |
Definition at line 4042 of file sctputil.c.
References sctp_net_route::_l_addr, sctp_association::adaptation_needed, sctp_association::adaptation_sent, sctp_tcb::asoc, sctp_association::assoc_up_sent, sctp_association::auth_supported, sctp_nets::ro, SCTP_ADDR_ADDED, SCTP_ADDR_AVAILABLE, SCTP_ADDR_CONFIRMED, SCTP_ADDR_MADE_PRIM, SCTP_ADDR_REMOVED, SCTP_ADDR_UNREACHABLE, SCTP_AUTH_FREE_KEY, SCTP_AUTH_NEW_KEY, SCTP_AUTH_NO_AUTH, SCTP_CANT_STR_ASSOC, SCTP_COMM_LOST, SCTP_COMM_UP, SCTP_DEBUG_UTIL1, sctp_tcb::sctp_ep, sctp_inpcb::sctp_flags, SCTP_GET_STATE, sctp_notify_adaptation_layer(), SCTP_NOTIFY_ASCONF_ADD_IP, SCTP_NOTIFY_ASCONF_DELETE_IP, SCTP_NOTIFY_ASCONF_SET_PRIMARY, sctp_notify_assoc_change(), SCTP_NOTIFY_ASSOC_DOWN, SCTP_NOTIFY_ASSOC_LOC_ABORTED, SCTP_NOTIFY_ASSOC_REM_ABORTED, SCTP_NOTIFY_ASSOC_RESTART, SCTP_NOTIFY_ASSOC_TIMEDOUT, SCTP_NOTIFY_ASSOC_UP, SCTP_NOTIFY_AUTH_FREE_KEY, SCTP_NOTIFY_AUTH_NEW_KEY, sctp_notify_authentication(), SCTP_NOTIFY_INTERFACE_CONFIRMED, SCTP_NOTIFY_INTERFACE_DOWN, SCTP_NOTIFY_INTERFACE_UP, SCTP_NOTIFY_NO_PEER_AUTH, sctp_notify_partial_delivery_indication(), SCTP_NOTIFY_PARTIAL_DELVIERY_INDICATION, sctp_notify_peer_addr_change(), SCTP_NOTIFY_PEER_SHUTDOWN, SCTP_NOTIFY_REMOTE_ERROR, sctp_notify_remote_error(), sctp_notify_send_failed(), sctp_notify_send_failed2(), SCTP_NOTIFY_SENDER_DRY, sctp_notify_sender_dry_event(), SCTP_NOTIFY_SENT_DG_FAIL, sctp_notify_shutdown_event(), SCTP_NOTIFY_SPECIAL_SP_FAIL, 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_STR_RESET_RECV, SCTP_NOTIFY_STR_RESET_SEND, sctp_notify_stream_reset(), SCTP_NOTIFY_UNSENT_DG_FAIL, SCTP_PCB_FLAGS_SOCKET_ALLGONE, SCTP_PCB_FLAGS_SOCKET_GONE, SCTP_RESTART, SCTP_SHUTDOWN_COMP, sctp_tcb::sctp_socket, SCTP_STATE_CLOSED_SOCKET, SCTP_STATE_COOKIE_ECHOED, SCTP_STATE_COOKIE_WAIT, SCTP_STREAM_RESET_DENIED, SCTP_STREAM_RESET_FAILED, SCTP_STREAM_RESET_INCOMING, SCTP_STREAM_RESET_OUTGOING_SSN, sctp_ulp_notify(), SCTPDBG, and sctp_association::state.
Referenced by sctp_abort_notification(), sctp_asconf_del_remote_addrs_except(), sctp_auth_key_release(), sctp_deact_sharedkey(), sctp_express_handle_sack(), sctp_free_assoc(), sctp_handle_cookie_ack(), sctp_handle_cookie_echo(), sctp_handle_error(), sctp_handle_forward_tsn(), sctp_handle_heartbeat_ack(), sctp_handle_init_ack(), sctp_handle_sack(), sctp_handle_shutdown(), sctp_handle_shutdown_ack(), sctp_handle_shutdown_complete(), sctp_handle_stream_reset_response(), sctp_process_asconf_add_ip(), sctp_process_asconf_delete_ip(), sctp_process_asconf_set_primary(), sctp_process_control(), sctp_process_init(), sctp_release_pr_sctp_chunk(), sctp_report_all_outbound(), sctp_reset_in_stream(), sctp_reset_out_streams(), sctp_setopt(), sctp_threshold_management(), and sctp_ulp_notify().
|
static |
Definition at line 5391 of file sctputil.c.
References sctp_tcb::asoc, sctp_tcb::freed_by_sorcv_sincelast, sctp_association::my_last_reported_rwnd, sctp_association::refcnt, sctp_calc_rwnd(), sctp_chunk_output(), sctp_tcb::sctp_ep, sctp_inpcb::sctp_flags, SCTP_FROM_SCTPUTIL, SCTP_GET_STATE, SCTP_INP_DECR_REF, SCTP_INP_INCR_REF, SCTP_INP_READ_LOCK, SCTP_INP_READ_UNLOCK, SCTP_LOC_6, SCTP_OUTPUT_FROM_USR_RCVD, SCTP_PCB_FLAGS_SOCKET_ALLGONE, SCTP_PCB_FLAGS_SOCKET_GONE, sctp_send_sack(), SCTP_SO_LOCKED, sctp_tcb::sctp_socket, SCTP_STAT_INCR, SCTP_STATE_ABOUT_TO_BE_FREED, SCTP_STATE_SHUTDOWN_ACK_SENT, SCTP_STATE_SHUTDOWN_RECEIVED, SCTP_TCB_LOCK, SCTP_TCB_UNLOCK, sctp_timer_stop(), SCTP_TIMER_TYPE_RECV, and sctp_association::state.
Referenced by sctp_sorecvmsg().
Definition at line 500 of file sctputil.c.
References sctp_tcb::asoc, sctp_sbwake_log::chunks_on_oque, sctp_association::chunks_on_out_queue, sctp_sbwake_log::flight, KTR_SCTP, sctp_misc_info::log1, sctp_misc_info::log2, sctp_misc_info::log3, sctp_misc_info::log4, sctp_cwnd_log::misc, sctp_sbwake_log::sbflags, SCTP_CTR6, sctp_tcb::sctp_ep, sctp_inpcb::sctp_flags, SCTP_LOG_EVENT_WAKE, SCTP_PCB_FLAGS_DONT_WAKE, SCTP_PCB_FLAGS_WAKEINPUT, SCTP_PCB_FLAGS_WAKEOUTPUT, sctp_tcb::sctp_socket, sctp_sbwake_log::sctpflags, sctp_sbwake_log::send_q, sctp_association::send_queue_cnt, sctp_sbwake_log::sent_q, sctp_association::sent_queue_cnt, sctp_sbwake_log::stcb, sctp_sbwake_log::stream_qcnt, sctp_association::stream_queue_cnt, sctp_association::total_flight_count, sctp_cwnd_log::wake, sctp_sbwake_log::wake_cnt, and sctp_cwnd_log::x.
Referenced by sctp_express_handle_sack(), and sctp_handle_sack().
void sctp_wakeup_the_read_socket | ( | struct sctp_inpcb * | inp, |
struct sctp_tcb * | stcb, | ||
int so_locked | SCTP_UNUSED | ||
) |
Definition at line 4833 of file sctputil.c.
References sctp_inpcb::sctp_socket, and sctp_sorwakeup.
Referenced by sctp_add_to_readq(), sctp_handle_old_unordered_data(), and sctp_queue_data_for_reasm().
|
extern |
Definition at line 2319 of file sctp_cc_functions.c.
|
static |
Definition at line 922 of file sctputil.c.
Referenced by sctp_get_next_mtu(), and sctp_get_prev_mtu().
|
extern |
Definition at line 899 of file sctp_ss_functions.c.