FreeBSD kernel IPv4 code
sctp_pcb.c File Reference
#include <sys/cdefs.h>
#include <netinet/sctp_os.h>
#include <sys/proc.h>
#include <netinet/sctp_var.h>
#include <netinet/sctp_sysctl.h>
#include <netinet/sctp_pcb.h>
#include <netinet/sctputil.h>
#include <netinet/sctp.h>
#include <netinet/sctp_header.h>
#include <netinet/sctp_asconf.h>
#include <netinet/sctp_output.h>
#include <netinet/sctp_timer.h>
#include <netinet/sctp_bsd_addr.h>
#include <sys/sched.h>
#include <sys/smp.h>
#include <sys/unistd.h>
Include dependency graph for sctp_pcb.c:

Go to the source code of this file.

Functions

 __FBSDID ("$FreeBSD$")
 
void sctp_fill_pcbinfo (struct sctp_pcbinfo *spcb)
 
struct sctp_vrfsctp_allocate_vrf (int vrf_id)
 
struct sctp_ifnsctp_find_ifn (void *ifn, uint32_t ifn_index)
 
struct sctp_vrfsctp_find_vrf (uint32_t vrf_id)
 
void sctp_free_vrf (struct sctp_vrf *vrf)
 
void sctp_free_ifn (struct sctp_ifn *sctp_ifnp)
 
void sctp_update_ifn_mtu (uint32_t ifn_index, uint32_t mtu)
 
void sctp_free_ifa (struct sctp_ifa *sctp_ifap)
 
static void sctp_delete_ifn (struct sctp_ifn *sctp_ifnp, int hold_addr_lock)
 
void sctp_mark_ifa_addr_down (uint32_t vrf_id, struct sockaddr *addr, const char *if_name, uint32_t ifn_index)
 
void sctp_mark_ifa_addr_up (uint32_t vrf_id, struct sockaddr *addr, const char *if_name, uint32_t ifn_index)
 
static void sctp_add_ifa_to_ifn (struct sctp_ifn *sctp_ifnp, struct sctp_ifa *sctp_ifap)
 
static void sctp_remove_ifa_from_ifn (struct sctp_ifa *sctp_ifap)
 
struct sctp_ifasctp_add_addr_to_vrf (uint32_t vrf_id, void *ifn, uint32_t ifn_index, uint32_t ifn_type, const char *if_name, void *ifa, struct sockaddr *addr, uint32_t ifa_flags, int dynamic_add)
 
void sctp_del_addr_from_vrf (uint32_t vrf_id, struct sockaddr *addr, uint32_t ifn_index, const char *if_name)
 
static int sctp_does_stcb_own_this_addr (struct sctp_tcb *stcb, struct sockaddr *to)
 
static struct sctp_tcbsctp_tcb_special_locate (struct sctp_inpcb **inp_p, struct sockaddr *from, struct sockaddr *to, struct sctp_nets **netp, uint32_t vrf_id)
 
struct sctp_tcbsctp_findassociation_ep_addr (struct sctp_inpcb **inp_p, struct sockaddr *remote, struct sctp_nets **netp, struct sockaddr *local, struct sctp_tcb *locked_tcb)
 
struct sctp_tcbsctp_findasoc_ep_asocid_locked (struct sctp_inpcb *inp, sctp_assoc_t asoc_id, int want_lock)
 
struct sctp_tcbsctp_findassociation_ep_asocid (struct sctp_inpcb *inp, sctp_assoc_t asoc_id, int want_lock)
 
static struct sctp_inpcbsctp_endpoint_probe (struct sockaddr *nam, struct sctppcbhead *head, uint16_t lport, uint32_t vrf_id)
 
static struct sctp_inpcbsctp_isport_inuse (struct sctp_inpcb *inp, uint16_t lport, uint32_t vrf_id)
 
int sctp_swap_inpcb_for_listen (struct sctp_inpcb *inp)
 
struct sctp_inpcbsctp_pcb_findep (struct sockaddr *nam, int find_tcp_pool, int have_lock, uint32_t vrf_id)
 
struct sctp_tcbsctp_findassociation_addr_sa (struct sockaddr *from, struct sockaddr *to, struct sctp_inpcb **inp_p, struct sctp_nets **netp, int find_tcp_pool, uint32_t vrf_id)
 
static struct sctp_tcbsctp_findassociation_special_addr (struct mbuf *m, int offset, struct sctphdr *sh, struct sctp_inpcb **inp_p, struct sctp_nets **netp, struct sockaddr *dst)
 
static struct sctp_tcbsctp_findassoc_by_vtag (struct sockaddr *from, struct sockaddr *to, uint32_t vtag, struct sctp_inpcb **inp_p, struct sctp_nets **netp, uint16_t rport, uint16_t lport, int skip_src_check, uint32_t vrf_id, uint32_t remote_tag)
 
struct sctp_tcbsctp_findassociation_addr (struct mbuf *m, int offset, struct sockaddr *src, struct sockaddr *dst, struct sctphdr *sh, struct sctp_chunkhdr *ch, struct sctp_inpcb **inp_p, struct sctp_nets **netp, uint32_t vrf_id)
 
struct sctp_tcbsctp_findassociation_ep_asconf (struct mbuf *m, int offset, struct sockaddr *dst, struct sctphdr *sh, struct sctp_inpcb **inp_p, struct sctp_nets **netp, uint32_t vrf_id)
 
int sctp_inpcb_alloc (struct socket *so, uint32_t vrf_id)
 
void sctp_move_pcb_and_assoc (struct sctp_inpcb *old_inp, struct sctp_inpcb *new_inp, struct sctp_tcb *stcb)
 
static int sctp_insert_laddr (struct sctpladdr *list, struct sctp_ifa *ifa, uint32_t act)
 
static void sctp_remove_laddr (struct sctp_laddr *laddr)
 
int sctp_inpcb_bind_locked (struct sctp_inpcb *inp, struct sockaddr *addr, struct sctp_ifa *sctp_ifap, struct thread *td)
 
int sctp_inpcb_bind (struct socket *so, struct sockaddr *addr, struct sctp_ifa *sctp_ifap, struct thread *td)
 
static void sctp_iterator_inp_being_freed (struct sctp_inpcb *inp)
 
void sctp_inpcb_free (struct sctp_inpcb *inp, int immediate, int from)
 
struct sctp_netssctp_findnet (struct sctp_tcb *stcb, struct sockaddr *addr)
 
int sctp_is_address_on_local_host (struct sockaddr *addr, uint32_t vrf_id)
 
int sctp_add_remote_addr (struct sctp_tcb *stcb, struct sockaddr *newaddr, struct sctp_nets **netp, uint16_t port, int set_scope, int from)
 
static uint32_t sctp_aloc_a_assoc_id (struct sctp_inpcb *inp, struct sctp_tcb *stcb)
 
static struct sctp_tcbsctp_aloc_assoc_locked (struct sctp_inpcb *inp, struct sockaddr *firstaddr, int *error, uint32_t override_tag, uint32_t initial_tsn, uint32_t vrf_id, uint16_t o_streams, uint16_t port, struct thread *p, int initialize_auth_params)
 
struct sctp_tcbsctp_aloc_assoc (struct sctp_inpcb *inp, struct sockaddr *firstaddr, int *error, uint32_t override_tag, uint32_t initial_tsn, uint32_t vrf_id, uint16_t o_streams, uint16_t port, struct thread *p, int initialize_auth_params)
 
struct sctp_tcbsctp_aloc_assoc_connected (struct sctp_inpcb *inp, struct sockaddr *firstaddr, int *error, uint32_t override_tag, uint32_t initial_tsn, uint32_t vrf_id, uint16_t o_streams, uint16_t port, struct thread *p, int initialize_auth_params)
 
void sctp_remove_net (struct sctp_tcb *stcb, struct sctp_nets *net)
 
int sctp_del_remote_addr (struct sctp_tcb *stcb, struct sockaddr *remaddr)
 
static bool sctp_is_in_timewait (uint32_t tag, uint16_t lport, uint16_t rport, uint32_t now)
 
static void sctp_set_vtag_block (struct sctp_timewait *vtag_block, uint32_t time, uint32_t tag, uint16_t lport, uint16_t rport)
 
static void sctp_add_vtag_to_timewait (uint32_t tag, uint16_t lport, uint16_t rport)
 
void sctp_clean_up_stream (struct sctp_tcb *stcb, struct sctp_readhead *rh)
 
int sctp_free_assoc (struct sctp_inpcb *inp, struct sctp_tcb *stcb, int from_inpcbfree, int from_location)
 
int sctp_destination_is_reachable (struct sctp_tcb *stcb, struct sockaddr *destaddr)
 
static void sctp_update_ep_vflag (struct sctp_inpcb *inp)
 
void sctp_add_local_addr_ep (struct sctp_inpcb *inp, struct sctp_ifa *ifa, uint32_t action)
 
static void sctp_select_primary_destination (struct sctp_tcb *stcb)
 
void sctp_del_local_addr_ep (struct sctp_inpcb *inp, struct sctp_ifa *ifa)
 
void sctp_add_local_addr_restricted (struct sctp_tcb *stcb, struct sctp_ifa *ifa)
 
void sctp_del_local_addr_restricted (struct sctp_tcb *stcb, struct sctp_ifa *ifa)
 
void sctp_pcb_init (void)
 
void sctp_pcb_finish (void)
 
int sctp_load_addresses_from_init (struct sctp_tcb *stcb, struct mbuf *m, int offset, int limit, struct sockaddr *src, struct sockaddr *dst, struct sockaddr *altsa, uint16_t port)
 
int sctp_set_primary_addr (struct sctp_tcb *stcb, struct sockaddr *sa, struct sctp_nets *net)
 
bool sctp_is_vtag_good (uint32_t tag, uint16_t lport, uint16_t rport, struct timeval *now)
 
static void sctp_drain_mbufs (struct sctp_tcb *stcb)
 
void sctp_drain ()
 
int sctp_initiate_iterator (inp_func inpf, asoc_func af, inp_func inpe, uint32_t pcb_state, uint32_t pcb_features, uint32_t asoc_state, void *argp, uint32_t argi, end_func ef, struct sctp_inpcb *s_inp, uint8_t chunk_output_off)
 

Variables

static int sctp_max_number_of_assoc = SCTP_MAX_NUM_OF_ASOC
 
static int sctp_scale_up_for_address = SCTP_SCALE_FOR_ADDR
 

Function Documentation

◆ __FBSDID()

__FBSDID ( "$FreeBSD$"  )

◆ sctp_add_addr_to_vrf()

struct sctp_ifa * sctp_add_addr_to_vrf ( uint32_t  vrf_id,
void *  ifn,
uint32_t  ifn_index,
uint32_t  ifn_type,
const char *  if_name,
void *  ifa,
struct sockaddr *  addr,
uint32_t  ifa_flags,
int  dynamic_add 
)

Definition at line 474 of file sctp_pcb.c.

References sctp_laddr::action, sctp_ifa::address, sctp_ifa::flags, sctp_ifa::ifa, sctp_laddr::ifa, sctp_ifn::ifa_count, sctp_ifn::ifalist, sctp_ifn::ifn_index, sctp_ifn::ifn_mtu, sctp_ifn::ifn_name, sctp_ifn::ifn_p, sctp_ifa::ifn_p, sctp_ifn::ifn_type, sctp_vrf::ifnlist, IN4_ISLOOPBACK_ADDRESS, IN4_ISPRIVATE_ADDRESS, sctp_ifa::localifa_flags, sctp_ifn::num_v4, sctp_ifn::num_v6, sctp_vrf::refcount, sctp_ifn::refcount, sctp_ifa::refcount, sctp_ifn::registered_af, sctp_sockstore::sa, sctp_add_ifa_to_ifn(), SCTP_ADD_IP_ADDRESS, SCTP_ADDR_DEFER_USE, SCTP_ADDR_LOCKED, SCTP_ADDR_VALID, sctp_allocate_vrf(), SCTP_BASE_INFO, SCTP_BEING_DELETED, SCTP_DEBUG_PCB4, sctp_del_addr_from_vrf(), sctp_delete_ifn(), sctp_find_ifa_by_addr(), sctp_find_ifn(), sctp_find_vrf(), SCTP_FREE, SCTP_GATHER_MTU_FROM_IFN_INFO, sctp_get_ifa_hash_val(), SCTP_GETTIME_TIMEVAL, SCTP_IFN_IS_IFT_LOOP, SCTP_IFNAMSIZ, SCTP_INCR_LADDR_COUNT, SCTP_IPI_ADDR_WLOCK, SCTP_IPI_ADDR_WUNLOCK, SCTP_MALLOC, sctp_remove_ifa_from_ifn(), SCTP_SNPRINTF, sctp_timer_start(), SCTP_TIMER_TYPE_ADDR_WQ, SCTP_WQ_ADDR_LOCK, SCTP_WQ_ADDR_UNLOCK, SCTP_ZONE_GET, SCTPDBG, SCTPDBG_ADDR, sctp_sockstore::sin, sctp_sockstore::sin6, sockaddr_in::sin_addr, sctp_ifa::src_is_glob, sctp_ifa::src_is_loop, sctp_ifa::src_is_priv, sctp_laddr::start_time, sctp_vrf::total_ifa_count, sctp_ifn::vrf, sctp_vrf::vrf_addr_hash, sctp_vrf::vrf_addr_hashmark, sctp_vrf::vrf_id, and sctp_ifa::vrf_id.

Referenced by sctp_addr_change(), and sctp_init_ifns_for_vrf().

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

◆ sctp_add_ifa_to_ifn()

static void sctp_add_ifa_to_ifn ( struct sctp_ifn sctp_ifnp,
struct sctp_ifa sctp_ifap 
)
static

◆ sctp_add_local_addr_ep()

◆ sctp_add_local_addr_restricted()

void sctp_add_local_addr_restricted ( struct sctp_tcb stcb,
struct sctp_ifa ifa 
)

◆ sctp_add_remote_addr()

int sctp_add_remote_addr ( struct sctp_tcb stcb,
struct sockaddr *  newaddr,
struct sctp_nets **  netp,
uint16_t  port,
int  set_scope,
int  from 
)

Definition at line 3721 of file sctp_pcb.c.

References sctp_net_route::_l_addr, sctp_net_route::_s_addr, sctp_nets::addr_is_local, sctp_tcb::asoc, sctp_association::cc_functions, sctp_nets::cwr_window_tsn, sctp_association::def_net_failure, sctp_association::def_net_pf_threshold, sctp_association::default_dscp, sctp_association::default_mtu, sctp_nets::dest_state, sctp_nets::dscp, sctp_nets::failure_threshold, sctp_inpcb::fibnum, sctp_nets::find_pseudo_cumack, sctp_nets::find_rtx_pseudo_cumack, sctp_nets::flowid, sctp_nets::flowtype, sctp_nets::hb_timer, sctp_nets::heart_beat_delay, sctp_association::heart_beat_delay, sctp_ifn::ifn_index, sctp_ifn::ifn_p, sctp_ifa::ifn_p, IN4_ISPRIVATE_ADDRESS, sctp_scoping::ipv4_local_scope, sctp_nets::last_cwr_tsn, sctp_scoping::local_scope, sctp_scoping::loopback_scope, MODULE_GLOBAL, sctp_nets::mtu, sctp_association::my_vtag, sctp_association::nets, sctp_association::numnets, sctp_nets::pf_threshold, sctp_nets::pmtu_timer, sctp_nets::port, sctp_association::primary_destination, sctp_nets::ref_count, sctp_nets::ro, sctp_net_route::ro_nh, sctp_tcb::rport, sctp_nets::RTO, sctp_nets::RTO_measured, sctp_nets::rto_needed, sctp_nets::rxt_timer, in_addr::s_addr, sctp_sockstore::sa, sctp_association::scope, SCTP_ADDR_IS_CONFIRMED, SCTP_ADDR_NO_PMTUD, SCTP_ADDR_NOHB, SCTP_ADDR_OUT_OF_SCOPE, SCTP_ADDR_REACHABLE, SCTP_ADDR_UNCONFIRMED, SCTP_ALLOC_ASOC, SCTP_BASE_INFO, SCTP_DEBUG_PCB1, SCTP_DEFAULT_MTU, sctp_tcb::sctp_ep, sctp_findnet(), SCTP_GATHER_MTU_FROM_IFN_INFO, SCTP_GATHER_MTU_FROM_ROUTE, SCTP_GETTIME_TIMEVAL, sctp_hc_get_mtu(), SCTP_INCR_RADDR_COUNT, sctp_is_address_on_local_host(), sctp_min_mtu(), SCTP_MIN_OVERHEAD, SCTP_MIN_V4_OVERHEAD, SCTP_OS_TIMER_INIT, sctp_pathmtu_adjustment(), SCTP_PCB_FLAGS_DO_NOT_PMTUD, SCTP_PCB_FLAGS_DONOT_HEARTBEAT, SCTP_ROUTE_HAS_VALID_IFN, SCTP_RTALLOC, sctp_cc_functions::sctp_set_initial_cc_param, sctp_source_address_selection(), sctp_stcb_is_feature_on, SCTP_ZONE_GET, SCTPDBG, SCTPDBG_ADDR, sctp_association::sending_seq, sockaddr_in::sin_addr, sockaddr_in::sin_len, sockaddr_in::sin_zero, sctp_scoping::site_scope, sctp_association::smallest_mtu, sctp_nets::src_addr_selected, sctp_nets::start_time, sctp_timer::timer, and sctp_association::vrf_id.

Referenced by sctp_aloc_assoc_locked(), sctp_connectx_helper_add(), sctp_handle_cookie_echo(), sctp_load_addresses_from_init(), sctp_process_asconf_add_ip(), and sctp_process_cmsgs_for_init().

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

◆ sctp_add_vtag_to_timewait()

static void sctp_add_vtag_to_timewait ( uint32_t  tag,
uint16_t  lport,
uint16_t  rport 
)
static

◆ sctp_allocate_vrf()

struct sctp_vrf * sctp_allocate_vrf ( int  vrf_id)

◆ sctp_aloc_a_assoc_id()

static uint32_t sctp_aloc_a_assoc_id ( struct sctp_inpcb inp,
struct sctp_tcb stcb 
)
static

◆ sctp_aloc_assoc()

struct sctp_tcb * sctp_aloc_assoc ( struct sctp_inpcb inp,
struct sockaddr *  firstaddr,
int *  error,
uint32_t  override_tag,
uint32_t  initial_tsn,
uint32_t  vrf_id,
uint16_t  o_streams,
uint16_t  port,
struct thread *  p,
int  initialize_auth_params 
)

Definition at line 4400 of file sctp_pcb.c.

References sctp_aloc_assoc_locked(), SCTP_INP_INFO_WLOCK, SCTP_INP_INFO_WUNLOCK, SCTP_INP_WLOCK, and SCTP_INP_WUNLOCK.

Referenced by sctp_process_cookie_new().

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

◆ sctp_aloc_assoc_connected()

struct sctp_tcb * sctp_aloc_assoc_connected ( struct sctp_inpcb inp,
struct sockaddr *  firstaddr,
int *  error,
uint32_t  override_tag,
uint32_t  initial_tsn,
uint32_t  vrf_id,
uint16_t  o_streams,
uint16_t  port,
struct thread *  p,
int  initialize_auth_params 
)

Definition at line 4418 of file sctp_pcb.c.

References sctp_aloc_assoc_locked(), sctp_inpcb::sctp_flags, SCTP_INP_INFO_WLOCK, SCTP_INP_INFO_WUNLOCK, SCTP_INP_WLOCK, SCTP_INP_WUNLOCK, SCTP_IS_LISTENING, SCTP_PCB_FLAGS_CONNECTED, SCTP_PCB_FLAGS_TCPTYPE, and sctp_inpcb::sctp_socket.

Referenced by sctp_do_connect_x(), and sctp_lower_sosend().

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

◆ sctp_aloc_assoc_locked()

static struct sctp_tcb * sctp_aloc_assoc_locked ( struct sctp_inpcb inp,
struct sockaddr *  firstaddr,
int *  error,
uint32_t  override_tag,
uint32_t  initial_tsn,
uint32_t  vrf_id,
uint16_t  o_streams,
uint16_t  port,
struct thread *  p,
int  initialize_auth_params 
)
static

Definition at line 4174 of file sctp_pcb.c.

References sctp_association::asconf_timer, sctp_tcb::asoc, sctp_association::assoc_id, sctp_association::autoclose_timer, sctp_association::dack_timer, sctp_association::delete_prim_timer, INADDR_ANY, INADDR_BROADCAST, sctp_association::mapping_array, sctp_association::my_vtag, sctp_association::nr_mapping_array, sctp_tcb::rport, in_addr::s_addr, sctp_add_remote_addr(), SCTP_ALLOC_ASOC, sctp_aloc_a_assoc_id(), sctp_inpcb::sctp_asoc_list, SCTP_BASE_INFO, SCTP_DEBUG_PCB1, SCTP_DEBUG_PCB3, SCTP_DECR_ASOC_COUNT, SCTP_DO_SETSCOPE, sctp_tcb::sctp_ep, sctp_inpcb::sctp_flags, SCTP_FREE, SCTP_FROM_SCTP_PCB, sctp_inpcb::sctp_hashmark, SCTP_INCR_ASOC_COUNT, sctp_init_asoc(), sctp_initialize_auth_params(), SCTP_INITIALIZE_AUTH_PARAMS, SCTP_INP_INFO_WLOCK_ASSERT, SCTP_INP_WLOCK_ASSERT, SCTP_INP_WUNLOCK, sctp_inpcb_bind_locked(), SCTP_IPV6_V6ONLY, sctp_is_feature_off, SCTP_LTRACE_ERR_RET, SCTP_MAX_NUM_OF_ASOC, SCTP_OS_TIMER_INIT, SCTP_PCB_FLAGS_BOUND_V6, SCTP_PCB_FLAGS_CONNECTED, SCTP_PCB_FLAGS_IN_TCPPOOL, SCTP_PCB_FLAGS_PORTREUSE, SCTP_PCB_FLAGS_SOCKET_ALLGONE, SCTP_PCB_FLAGS_SOCKET_GONE, SCTP_PCB_FLAGS_TCPTYPE, SCTP_PCB_FLAGS_UNBOUND, SCTP_PCB_FLAGS_WAS_ABORTED, SCTP_PCB_FLAGS_WAS_CONNECTED, SCTP_PCBHASH_ALLADDR, SCTP_PCBHASH_ASOC, sctp_inpcb::sctp_socket, sctp_tcb::sctp_socket, SCTP_TCB_LOCK, SCTP_TCB_LOCK_DESTROY, SCTP_TCB_LOCK_INIT, SCTP_TCB_SEND_LOCK_DESTROY, SCTP_TCB_SEND_LOCK_INIT, SCTP_TCB_UNLOCK, sctp_inpcb::sctp_tcbhash, SCTP_ZONE_FREE, SCTP_ZONE_GET, SCTPDBG, SCTPDBG_ADDR, sctp_association::shut_guard_timer, sockaddr_in::sin_addr, sockaddr_in::sin_port, sctp_association::strmout, sctp_association::strreset_timer, and sctp_timer::timer.

Referenced by sctp_aloc_assoc(), and sctp_aloc_assoc_connected().

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

◆ sctp_clean_up_stream()

◆ sctp_del_addr_from_vrf()

◆ sctp_del_local_addr_ep()

◆ sctp_del_local_addr_restricted()

void sctp_del_local_addr_restricted ( struct sctp_tcb stcb,
struct sctp_ifa ifa 
)

◆ sctp_del_remote_addr()

int sctp_del_remote_addr ( struct sctp_tcb stcb,
struct sockaddr *  remaddr 
)

Definition at line 4517 of file sctp_pcb.c.

References sctp_net_route::_l_addr, sctp_tcb::asoc, sctp_association::nets, sctp_association::numnets, sctp_nets::ro, sctp_sockstore::sa, sctp_cmpaddr(), and sctp_remove_net().

Referenced by sctp_process_asconf_delete_ip().

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

◆ sctp_delete_ifn()

static void sctp_delete_ifn ( struct sctp_ifn sctp_ifnp,
int  hold_addr_lock 
)
static

Definition at line 283 of file sctp_pcb.c.

References sctp_ifn::ifn_index, sctp_ifn::ifn_p, sctp_find_ifn(), sctp_free_ifn(), SCTP_IPI_ADDR_WLOCK, SCTP_IPI_ADDR_WLOCK_ASSERT, and SCTP_IPI_ADDR_WUNLOCK.

Referenced by sctp_add_addr_to_vrf(), and sctp_remove_ifa_from_ifn().

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

◆ sctp_destination_is_reachable()

int sctp_destination_is_reachable ( struct sctp_tcb stcb,
struct sockaddr *  destaddr 
)

Definition at line 5233 of file sctp_pcb.c.

References sctp_inpcb::inp, INP_IPV4, INP_IPV6, inpcb::inp_vflag, sctp_tcb::sctp_ep, and SCTP_PCB_FLAGS_BOUNDALL.

Referenced by sctp_select_primary_destination().

Here is the caller graph for this function:

◆ sctp_does_stcb_own_this_addr()

◆ sctp_drain()

◆ sctp_drain_mbufs()

static void sctp_drain_mbufs ( struct sctp_tcb stcb)
static

◆ sctp_endpoint_probe()

◆ sctp_fill_pcbinfo()

◆ sctp_find_ifn()

struct sctp_ifn * sctp_find_ifn ( void *  ifn,
uint32_t  ifn_index 
)

◆ sctp_find_vrf()

◆ sctp_findasoc_ep_asocid_locked()

◆ sctp_findassoc_by_vtag()

static struct sctp_tcb * sctp_findassoc_by_vtag ( struct sockaddr *  from,
struct sockaddr *  to,
uint32_t  vtag,
struct sctp_inpcb **  inp_p,
struct sctp_nets **  netp,
uint16_t  rport,
uint16_t  lport,
int  skip_src_check,
uint32_t  vrf_id,
uint32_t  remote_tag 
)
static

◆ sctp_findassociation_addr()

struct sctp_tcb * sctp_findassociation_addr ( struct mbuf *  m,
int  offset,
struct sockaddr *  src,
struct sockaddr *  dst,
struct sctphdr sh,
struct sctp_chunkhdr ch,
struct sctp_inpcb **  inp_p,
struct sctp_nets **  netp,
uint32_t  vrf_id 
)

◆ sctp_findassociation_addr_sa()

struct sctp_tcb * sctp_findassociation_addr_sa ( struct sockaddr *  from,
struct sockaddr *  to,
struct sctp_inpcb **  inp_p,
struct sctp_nets **  netp,
int  find_tcp_pool,
uint32_t  vrf_id 
)

Definition at line 1969 of file sctp_pcb.c.

References sctp_inpcb::inp, sctp_findassociation_ep_addr(), SCTP_INP_INFO_RLOCK, SCTP_INP_INFO_RUNLOCK, sctp_pcb_findep(), and sctp_tcb_special_locate().

Referenced by sctp_findassociation_addr(), and sctp_getcred().

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

◆ sctp_findassociation_ep_addr()

◆ sctp_findassociation_ep_asconf()

◆ sctp_findassociation_ep_asocid()

struct sctp_tcb * sctp_findassociation_ep_asocid ( struct sctp_inpcb inp,
sctp_assoc_t  asoc_id,
int  want_lock 
)

Definition at line 1583 of file sctp_pcb.c.

References sctp_findasoc_ep_asocid_locked(), SCTP_INP_RLOCK, and SCTP_INP_RUNLOCK.

Referenced by sctp_can_peel_off(), sctp_do_peeloff(), and sctp_lower_sosend().

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

◆ sctp_findassociation_special_addr()

static struct sctp_tcb * sctp_findassociation_special_addr ( struct mbuf *  m,
int  offset,
struct sctphdr sh,
struct sctp_inpcb **  inp_p,
struct sctp_nets **  netp,
struct sockaddr *  dst 
)
static

◆ sctp_findnet()

struct sctp_nets * sctp_findnet ( struct sctp_tcb stcb,
struct sockaddr *  addr 
)

◆ sctp_free_assoc()

int sctp_free_assoc ( struct sctp_inpcb inp,
struct sctp_tcb stcb,
int  from_inpcbfree,
int  from_location 
)

Definition at line 4689 of file sctp_pcb.c.

References sctp_association::alternate, sctp_association::asconf_ack_sent, sctp_association::asconf_queue, sctp_association::asconf_send_queue, sctp_tcb::asoc, sctp_tmit_chunk::auth_keyid, sctp_association::authinfo, sctp_tcb::block_entry, sctp_stream_out::chunks_on_queues, sctp_association::control_pdapi, sctp_association::control_send_queue, sctp_association::cumulative_tsn, sctp_tmit_chunk::data, sctp_queued_to_read::data, sctp_stream_queue_pending::data, sctp_asconf_ack::data, sctp_queued_to_read::do_not_ref_stcb, sctp_queued_to_read::end_added, sctp_block_entry::error, sctp_association::free_chunk_cnt, sctp_association::free_chunks, sctp_tcb::freed_from_where, sctp_queued_to_read::held_length, sctp_tmit_chunk::holds_key_ref, sctp_association::in_asocid_hash, sctp_stream_in::inqueue, sctp_stream_queue_pending::length, sctp_association::local_auth_chunks, sctp_association::local_hmacs, sctp_association::mapping_array, sctp_queued_to_read::mid, sctp_association::my_vtag, sctp_stream_queue_pending::net, sctp_association::nets, next, sctp_association::nr_mapping_array, sctp_stream_out::outqueue, sctp_queued_to_read::pdapi_aborted, sctp_association::peer_auth_chunks, sctp_association::peer_hmacs, sctp_association::pending_reply_queue, sctp_inpcb::read_queue, sctp_tmit_chunk::rec, sctp_association::refcnt, sctp_association::resetHead, sctp_tcb::rport, SCTP_ADD_SUBSTATE, sctp_add_vtag_to_timewait(), sctp_auth_key_release(), SCTP_BASE_INFO, SCTP_CALLED_DIRECTLY_NOCMPSET, sctp_clean_up_stream(), SCTP_CLEAR_SUBSTATE, SCTP_DATAGRAM_NR_ACKED, SCTP_DECR_ASOC_COUNT, SCTP_DECR_CHK_COUNT, sctp_inpcb::sctp_flags, SCTP_FREE, sctp_free_a_readq, sctp_free_a_strmoq, sctp_free_authinfo(), sctp_free_chunklist(), sctp_free_hmaclist(), sctp_free_remote_addr, sctp_free_sharedkey(), SCTP_FREE_SHOULD_USE_GRACEFUL_CLOSE, sctp_free_spbufspace, SCTP_FROM_SCTP_PCB, SCTP_INP_DECR_REF, SCTP_INP_INCR_REF, SCTP_INP_INFO_WLOCK, SCTP_INP_INFO_WUNLOCK, SCTP_INP_READ_LOCK, SCTP_INP_READ_UNLOCK, SCTP_INP_RLOCK, SCTP_INP_RUNLOCK, SCTP_INP_WLOCK, SCTP_INP_WUNLOCK, sctp_inpcb_free(), sctp_log_closing(), SCTP_LTRACE_ERR_RET, sctp_m_freem, SCTP_NORMAL_PROC, SCTP_NOTIFY_PARTIAL_DELVIERY_INDICATION, SCTP_NOTIFY_SENT_DG_FAIL, SCTP_NOTIFY_SPECIAL_SP_FAIL, SCTP_NOTIFY_UNSENT_DG_FAIL, SCTP_PARTIAL_DELIVERY_ABORTED, SCTP_PCB_FLAGS_CONNECTED, SCTP_PCB_FLAGS_IN_TCPPOOL, SCTP_PCB_FLAGS_PDAPIEVNT, SCTP_PCB_FLAGS_SOCKET_ALLGONE, SCTP_PCB_FLAGS_SOCKET_GONE, SCTP_PCB_FLAGS_TCPTYPE, SCTP_PCB_FLAGS_WAS_CONNECTED, sctp_remove_laddr(), sctp_association::sctp_restricted_addrs, SCTP_SO_LOCKED, sctp_inpcb::sctp_socket, sctp_tcb::sctp_socket, sctp_sorwakeup, SCTP_SOWAKEUP, sctp_sowwakeup, sctp_ss_functions::sctp_ss_remove_from_stream, SCTP_STATE_ABOUT_TO_BE_FREED, SCTP_STATE_IN_ACCEPT_QUEUE, sctp_stcb_is_feature_on, sctp_stop_association_timers(), SCTP_TCB_LOCK, SCTP_TCB_LOCK_DESTROY, SCTP_TCB_SEND_LOCK, SCTP_TCB_SEND_LOCK_DESTROY, SCTP_TCB_SEND_UNLOCK, SCTP_TCB_UNLOCK, sctp_inpcb::sctp_tcbhash, sctp_timer_start(), SCTP_TIMER_TYPE_ASOCKILL, sctp_ulp_notify(), SCTP_ZONE_FREE, sctp_association::send_queue, sctp_tmit_chunk::sent, sctp_association::sent_queue, sctp_association::shared_keys, sctp_data_chunkrec::sid, sctp_queued_to_read::sinfo_cumtsn, sctp_queued_to_read::sinfo_stream, sctp_association::ss_functions, sctp_association::state, sctp_queued_to_read::stcb, sctp_association::stream_queue_cnt, sctp_association::streamincnt, sctp_association::streamoutcnt, sctp_association::strm_realoutsize, sctp_association::strmin, sctp_association::strmout, sctp_stream_queue_pending::tail_mbuf, sctp_stream_in::uno_inqueue, sctp_queued_to_read::whoFrom, and sctp_tmit_chunk::whoTo.

Referenced by sctp_abort_an_association(), sctp_abort_association(), sctp_accept(), sctp_connectx_helper_add(), sctp_disconnect(), sctp_handle_abort(), sctp_handle_cookie_echo(), sctp_handle_error(), sctp_handle_shutdown_ack(), sctp_handle_shutdown_complete(), sctp_inpcb_free(), sctp_lower_sosend(), sctp_process_control(), sctp_process_cookie_new(), and sctp_timeout_handler().

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

◆ sctp_free_ifa()

◆ sctp_free_ifn()

void sctp_free_ifn ( struct sctp_ifn sctp_ifnp)

Definition at line 246 of file sctp_pcb.c.

References sctp_ifn::refcount, SCTP_BASE_INFO, SCTP_DECREMENT_AND_CHECK_REFCOUNT, SCTP_FREE, sctp_free_vrf(), and sctp_ifn::vrf.

Referenced by sctp_delete_ifn(), sctp_free_ifa(), and sctp_remove_ifa_from_ifn().

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

◆ sctp_free_vrf()

void sctp_free_vrf ( struct sctp_vrf vrf)

Definition at line 231 of file sctp_pcb.c.

References sctp_vrf::refcount, SCTP_BASE_INFO, SCTP_DECREMENT_AND_CHECK_REFCOUNT, SCTP_FREE, SCTP_HASH_FREE, sctp_vrf::vrf_addr_hash, and sctp_vrf::vrf_addr_hashmark.

Referenced by sctp_free_ifn().

Here is the caller graph for this function:

◆ sctp_initiate_iterator()

◆ sctp_inpcb_alloc()

int sctp_inpcb_alloc ( struct socket *  so,
uint32_t  vrf_id 
)

Definition at line 2379 of file sctp_pcb.c.

References sctp_pcb::adaptation_layer_indicator, sctp_pcb::adaptation_layer_indicator_provided, sctp_inpcb::asconf_supported, sctp_inpcb::auth_supported, sctp_pcb::def_cookie_life, sctp_pcb::def_net_failure, sctp_pcb::def_net_pf_threshold, sctp_inpcb::def_vrf_id, sctp_pcb::default_dscp, sctp_pcb::default_mtu, sctp_inpcb::ecn_supported, sctp_inpcb::fibnum, sctp_pcb::fr_max_burst, sctp_inpcb::hashasocidmark, sctp_inpcb::idata_supported, IN6P_AUTOFLOWLABEL, IN6P_IPV6_V6ONLY, sctp_pcb::initial_init_rto_max, sctp_pcb::initial_rto, sctp_inpcb::inp, inpcb::inp_cred, inpcb::inp_flags, inpcb::inp_ip_ttl, inpcb::inp_lock, INP_SOCKAF, inpcb::inp_socket, sctp_inpcb::ip_inp, sctp_pcb::local_auth_chunks, sctp_pcb::local_hmacs, sctp_pcb::max_burst, sctp_inpcb::max_cwnd, sctp_pcb::max_init_times, sctp_pcb::max_open_streams_intome, sctp_pcb::max_send_times, MODULE_GLOBAL, sctp_inpcb::nrsack_supported, sctp_inpcb::partial_delivery_point, sctp_inpcb::pktdrop_supported, sctp_pcb::port, sctp_pcb::pre_open_stream_count, sctp_inpcb::prsctp_supported, sctp_pcb::random_counter, sctp_pcb::random_numbers, sctp_inpcb::read_queue, sctp_inpcb::reconfig_supported, sctp_inpcb::sctp_addr_list, sctp_alloc_chunklist(), sctp_alloc_sharedkey(), SCTP_ASCONF, SCTP_ASCONF_ACK, SCTP_ASOC_CREATE_LOCK_INIT, sctp_inpcb::sctp_asoc_list, sctp_inpcb::sctp_asocidhash, sctp_inpcb::sctp_associd_counter, sctp_auth_add_chunk(), SCTP_BASE_INFO, SCTP_BASE_SYSCTL, SCTP_CLEAR_SO_NBIO, sctp_inpcb::sctp_cmt_on_off, sctp_pcb::sctp_default_cc_module, sctp_pcb::sctp_default_ss_module, sctp_default_supported_hmaclist(), sctp_inpcb::sctp_ep, sctp_feature_off, sctp_feature_on, sctp_fill_random_store(), sctp_inpcb::sctp_flags, SCTP_FRAG_LEVEL_0, SCTP_FRAG_LEVEL_1, SCTP_FRAG_LEVEL_2, sctp_inpcb::sctp_frag_point, SCTP_FROM_SCTP_PCB, SCTP_GETTIME_TIMEVAL, SCTP_HASH_INIT, sctp_inpcb::sctp_hashmark, SCTP_INCR_EP_COUNT, SCTP_INIT_SEC, SCTP_INP_INFO_WLOCK, SCTP_INP_INFO_WUNLOCK, SCTP_INP_LOCK_INIT, SCTP_INP_READ_INIT, SCTP_INP_WLOCK, SCTP_INP_WUNLOCK, sctp_insert_sharedkey(), sctp_log_closing(), SCTP_LTRACE_ERR_RET, sctp_pcb::sctp_maxrto, sctp_pcb::sctp_minrto, sctp_msecs_to_ticks(), SCTP_NUMBER_OF_SECRETS, SCTP_OS_TIMER_INIT, SCTP_PARTIAL_DELIVERY_SHIFT, SCTP_PCB_FLAGS_FRAG_INTERLEAVE, SCTP_PCB_FLAGS_INTERLEAVE_STRMS, SCTP_PCB_FLAGS_TCPTYPE, SCTP_PCB_FLAGS_UDPTYPE, SCTP_PCB_FLAGS_UNBOUND, SCTP_PRINTF, SCTP_READ_RANDOM, sctp_pcb::sctp_sack_freq, SCTP_SB_LIMIT_RCV, sctp_secs_to_ticks(), sctp_select_initial_TSN(), SCTP_SEND_SEC, SCTP_SIGNATURE_SIZE, SCTP_SO_TYPE, sctp_inpcb::sctp_socket, SCTP_STACK_VTAG_HASH_SIZE, sctp_pcb::sctp_sws_receiver, SCTP_SWS_RECEIVER_DEF, sctp_pcb::sctp_sws_sender, SCTP_SWS_SENDER_DEF, sctp_inpcb::sctp_tcbhash, sctp_pcb::sctp_timeoutticks, SCTP_TIMER_HEARTBEAT, SCTP_TIMER_INIT, SCTP_TIMER_MAXSHUTDOWN, SCTP_TIMER_PMTU, SCTP_TIMER_RECV, SCTP_TIMER_SEND, SCTP_TIMER_SIGNATURE, sctp_timer_start(), SCTP_TIMER_TYPE_NEWCOOKIE, SCTP_ZONE_FREE, SCTP_ZONE_GET, sctp_pcb::secret_key, sctp_pcb::shared_keys, sctp_pcb::signature_change, sctp_pcb::size_of_a_cookie, sctp_pcb::store_at, sctp_pcb::time_of_secret_change, sctp_timer::timer, and sctp_timer::type.

Here is the call graph for this function:

◆ sctp_inpcb_bind()

int sctp_inpcb_bind ( struct socket *  so,
struct sockaddr *  addr,
struct sctp_ifa sctp_ifap,
struct thread *  td 
)

Definition at line 3225 of file sctp_pcb.c.

References sctp_inpcb::inp, SCTP_INP_INFO_WLOCK, SCTP_INP_INFO_WUNLOCK, SCTP_INP_WLOCK, SCTP_INP_WUNLOCK, and sctp_inpcb_bind_locked().

Referenced by sctp_bindx_add_address(), and sctp_do_connect_x().

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

◆ sctp_inpcb_bind_locked()

int sctp_inpcb_bind_locked ( struct sctp_inpcb inp,
struct sockaddr *  addr,
struct sctp_ifa sctp_ifap,
struct thread *  td 
)

Definition at line 2824 of file sctp_pcb.c.

References count, sctp_inpcb::def_vrf_id, sctp_ifa::ifa, INADDR_ANY, sctp_inpcb::inp, inpcb::inp_flags, INP_HIGHPORT, INP_LOWPORT, sctp_inpcb::ip_inp, sctp_inpcb::laddr_count, sctp_ifa::localifa_flags, MODULE_GLOBAL, prison_local_ip4(), in_addr::s_addr, sctp_sockstore::sa, SCTP_ADDR_IFA_UNUSEABLE, sctp_inpcb::sctp_addr_list, SCTP_ADDR_NOT_LOCKED, SCTP_BASE_INFO, SCTP_BASE_SYSCTL, SCTP_DEBUG_PCB1, sctp_inpcb::sctp_ep, sctp_feature_off, sctp_feature_on, sctp_find_ifa_by_addr(), sctp_inpcb::sctp_flags, SCTP_FROM_SCTP_PCB, SCTP_INP_DECR_REF, SCTP_INP_INCR_REF, SCTP_INP_INFO_WLOCK_ASSERT, SCTP_INP_WLOCK, SCTP_INP_WLOCK_ASSERT, SCTP_INP_WUNLOCK, sctp_insert_laddr(), SCTP_IPV6_V6ONLY, sctp_is_feature_on, sctp_isport_inuse(), SCTP_LTRACE_ERR_RET, SCTP_MOBILITY_BASE, SCTP_MOBILITY_FASTHANDOFF, sctp_mobility_feature_off, sctp_mobility_feature_on, SCTP_MOBILITY_PRIM_DELETED, sctp_pcb_findep(), SCTP_PCB_FLAGS_AUTO_ASCONF, SCTP_PCB_FLAGS_BOUNDALL, SCTP_PCB_FLAGS_DO_ASCONF, SCTP_PCB_FLAGS_IN_TCPPOOL, SCTP_PCB_FLAGS_MULTIPLE_ASCONFS, SCTP_PCB_FLAGS_PORTREUSE, SCTP_PCB_FLAGS_SOCKET_ALLGONE, SCTP_PCB_FLAGS_SOCKET_GONE, SCTP_PCB_FLAGS_UNBOUND, SCTP_PCBHASH_ALLADDR, sctp_select_initial_TSN(), SCTPDBG, SCTPDBG_ADDR, sctp_sockstore::sin, sctp_sockstore::sin6, sockaddr_in::sin_addr, and sockaddr_in::sin_port.

Referenced by sctp_aloc_assoc_locked(), sctp_inpcb_bind(), and sctp_listen().

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

◆ sctp_inpcb_free()

void sctp_inpcb_free ( struct sctp_inpcb inp,
int  immediate,
int  from 
)

Definition at line 3311 of file sctp_pcb.c.

References sctp_association::alternate, sctp_tcb::asoc, sctp_inpcb::control, sctp_association::control_pdapi, sctp_queued_to_read::data, sctp_inpcb::hashasocidmark, inpcb::in6p_outputopts, sctp_inpcb::inp, inpcb::inp_cred, INP_IPV6, INP_LOCK_DESTROY, inpcb::inp_options, inpcb::inp_vflag, sctp_inpcb::ip_inp, sctp_inpcb::last_abort_code, sctp_queued_to_read::length, sctp_pcb::local_auth_chunks, sctp_pcb::local_hmacs, next, sctp_inpcb::pkt, sctp_association::primary_destination, sctp_inpcb::read_queue, sctp_inpcb::refcount, SCTP_ADD_SUBSTATE, sctp_inpcb::sctp_addr_list, SCTP_ASOC_CREATE_LOCK, SCTP_ASOC_CREATE_LOCK_CONTENDED, SCTP_ASOC_CREATE_LOCK_DESTROY, SCTP_ASOC_CREATE_UNLOCK, sctp_inpcb::sctp_asoc_list, sctp_inpcb::sctp_asocidhash, SCTP_BASE_INFO, SCTP_CALLED_AFTER_CMPSET_OFCLOSE, SCTP_CAUSE_USER_INITIATED_ABT, sctp_chunk_output(), SCTP_CLEAR_SUBSTATE, SCTP_DECR_ASOC_COUNT, SCTP_DECR_EP_COUNT, sctp_inpcb::sctp_ep, sctp_tcb::sctp_ep, sctp_inpcb::sctp_flags, sctp_free_a_readq, sctp_free_assoc(), sctp_free_chunklist(), sctp_free_hmaclist(), sctp_free_remote_addr, sctp_free_sharedkey(), SCTP_FREE_SHOULD_USE_GRACEFUL_CLOSE, SCTP_FROM_SCTP_PCB, sctp_generate_cause(), SCTP_GET_STATE, SCTP_HASH_FREE, sctp_inpcb::sctp_hashmark, SCTP_INP_INFO_WLOCK, SCTP_INP_INFO_WUNLOCK, SCTP_INP_LOCK_CONTENDED, SCTP_INP_LOCK_DESTROY, SCTP_INP_READ_CONTENDED, SCTP_INP_READ_DESTROY, SCTP_INP_WLOCK, SCTP_INP_WUNLOCK, sctp_iterator_inp_being_freed(), SCTP_ITERATOR_LOCK, SCTP_ITERATOR_UNLOCK, SCTP_LOC_1, SCTP_LOC_2, SCTP_LOC_3, SCTP_LOC_4, SCTP_LOC_5, SCTP_LOC_6, SCTP_LOC_7, SCTP_LOC_8, sctp_log_closing(), sctp_m_free, sctp_m_freem, SCTP_OUTPUT_FROM_CLOSING, SCTP_OUTPUT_FROM_SHUT_TMR, SCTP_PCB_FLAGS_CLOSE_IP, SCTP_PCB_FLAGS_DONT_WAKE, SCTP_PCB_FLAGS_SOCKET_ALLGONE, SCTP_PCB_FLAGS_SOCKET_GONE, SCTP_PCB_FLAGS_UNBOUND, SCTP_PCBFREE_FORCE, SCTP_PCBFREE_NOFORCE, sctp_remove_laddr(), sctp_send_abort_tcb(), sctp_send_shutdown(), SCTP_SET_STATE, SCTP_SO_LOCKED, sctp_inpcb::sctp_socket, sctp_tcb::sctp_socket, sctp_ss_functions::sctp_ss_is_user_msgs_incomplete, SCTP_STAT_DECR_GAUGE32, SCTP_STAT_INCR, SCTP_STAT_INCR_COUNTER32, SCTP_STATE_ABOUT_TO_BE_FREED, SCTP_STATE_CLOSED_SOCKET, SCTP_STATE_COOKIE_ECHOED, SCTP_STATE_COOKIE_WAIT, SCTP_STATE_IN_ACCEPT_QUEUE, SCTP_STATE_OPEN, SCTP_STATE_PARTIAL_MSG_LEFT, SCTP_STATE_SHUTDOWN_ACK_SENT, SCTP_STATE_SHUTDOWN_PENDING, SCTP_STATE_SHUTDOWN_RECEIVED, SCTP_STATE_SHUTDOWN_SENT, sctp_stop_timers_for_shutdown(), SCTP_TCB_LOCK, SCTP_TCB_UNLOCK, sctp_inpcb::sctp_tcbhash, sctp_timer_start(), sctp_timer_stop(), SCTP_TIMER_TYPE_ASOCKILL, SCTP_TIMER_TYPE_INPKILL, SCTP_TIMER_TYPE_NEWCOOKIE, SCTP_TIMER_TYPE_SHUTDOWN, SCTP_TIMER_TYPE_SHUTDOWNGUARD, SCTP_ZONE_FREE, sctp_association::send_queue, sctp_association::sent_queue, sctp_pcb::shared_keys, sctp_pcb::signature_change, sctp_association::size_on_all_streams, sctp_association::size_on_reasm_queue, sctp_association::ss_functions, sctp_association::state, sctp_association::stream_queue_cnt, sctp_association::total_output_queue_size, sctp_timer::type, and sctp_queued_to_read::whoFrom.

Referenced by sctp_abort_an_association(), sctp_close(), sctp_free_assoc(), sctp_handle_ootb(), and sctp_timeout_handler().

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

◆ sctp_insert_laddr()

static int sctp_insert_laddr ( struct sctpladdr *  list,
struct sctp_ifa ifa,
uint32_t  act 
)
static

◆ sctp_is_address_on_local_host()

int sctp_is_address_on_local_host ( struct sockaddr *  addr,
uint32_t  vrf_id 
)

Definition at line 3703 of file sctp_pcb.c.

References SCTP_ADDR_NOT_LOCKED, sctp_find_ifa_by_addr(), and sctp_ifa::vrf_id.

Referenced by sctp_add_remote_addr(), and sctp_send_initiate_ack().

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

◆ sctp_is_in_timewait()

static bool sctp_is_in_timewait ( uint32_t  tag,
uint16_t  lport,
uint16_t  rport,
uint32_t  now 
)
static

◆ sctp_is_vtag_good()

bool sctp_is_vtag_good ( uint32_t  tag,
uint16_t  lport,
uint16_t  rport,
struct timeval *  now 
)

Definition at line 6720 of file sctp_pcb.c.

References sctp_tcb::asoc, sctp_association::my_vtag, sctp_tcb::rport, SCTP_BASE_INFO, sctp_tcb::sctp_ep, sctp_inpcb::sctp_flags, SCTP_INP_INFO_LOCK_ASSERT, sctp_is_in_timewait(), SCTP_PCB_FLAGS_SOCKET_ALLGONE, and SCTP_PCBHASH_ASOC.

Referenced by sctp_select_a_tag().

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

◆ sctp_isport_inuse()

static struct sctp_inpcb * sctp_isport_inuse ( struct sctp_inpcb inp,
uint16_t  lport,
uint32_t  vrf_id 
)
static

Definition at line 1790 of file sctp_pcb.c.

References sctp_inpcb::def_vrf_id, sctp_inpcb::inp, SCTP_BASE_INFO, sctp_inpcb::sctp_flags, SCTP_IPV6_V6ONLY, SCTP_PCB_FLAGS_BOUND_V6, and SCTP_PCBHASH_ALLADDR.

Referenced by sctp_inpcb_bind_locked().

Here is the caller graph for this function:

◆ sctp_iterator_inp_being_freed()

◆ sctp_load_addresses_from_init()

int sctp_load_addresses_from_init ( struct sctp_tcb stcb,
struct mbuf *  m,
int  offset,
int  limit,
struct sockaddr *  src,
struct sockaddr *  dst,
struct sockaddr *  altsa,
uint16_t  port 
)

Definition at line 6003 of file sctp_pcb.c.

References sctp_association::adaptation_needed, sctp_ipv4addr_param::addr, sctp_ipv6addr_param::addr, sctp_asconf_addr_param::addrp, sctp_asconf_addrv4_param::addrp, sctp_association::alternate, sctp_association::asconf_supported, sctp_tcb::asoc, sctp_authinformation::assoc_keyid, sctp_association::auth_supported, sctp_association::authinfo, sctp_supported_chunk_types_param::chunk_types, sctp_nets::dest_state, sctp_association::ecn_supported, sctp_association::idata_supported, INADDR_ANY, INADDR_BROADCAST, sctp_adaptation_layer_indication::indication, sctp_inpcb::inp, sctp_scoping::ipv4_addr_legal, sctp_scoping::ipv6_addr_legal, sctp_key::key, sctp_association::nets, sctp_association::nrsack_supported, sctp_association::numnets, sctp_paramhdr::param_length, sctp_paramhdr::param_type, sctp_association::peer_auth_chunks, sctp_association::peer_hmacs, sctp_authinformation::peer_random, sctp_association::peer_supports_nat, sctp_association::peers_adaptation, sctp_ipv6addr_param::ph, sctp_association::pktdrop_supported, sctp_association::primary_destination, sctp_association::prsctp_supported, sctp_association::reconfig_supported, sctp_authinformation::recv_keyid, sctp_association::refcnt, sctp_tcb::rport, in_addr::s_addr, sctp_association::scope, sctp_abort_an_association(), SCTP_ADD_IP_ADDRESS, sctp_add_remote_addr(), SCTP_ADDR_NOT_IN_ASSOC, sctp_alloc_chunklist(), sctp_alloc_hmaclist(), sctp_alloc_key(), SCTP_ASCONF, SCTP_ASCONF_ACK, sctp_auth_add_chunk(), sctp_auth_add_hmacid(), SCTP_AUTH_RANDOM_SIZE_REQUIRED, SCTP_AUTHENTICATION, SCTP_BASE_SYSCTL, SCTP_CHUNK_LIST, sctp_clear_cachedkeys(), sctp_clear_chunklist(), SCTP_COOKIE_PRESERVE, SCTP_DEBUG_AUTH1, SCTP_DEL_IP_ADDRESS, SCTP_DIAG_INFO_LEN, SCTP_DONOT_SETSCOPE, SCTP_ECN_CAPABLE, sctp_tcb::sctp_ep, SCTP_ERROR_CAUSE_IND, sctp_findassociation_ep_addr(), SCTP_FORWARD_CUM_TSN, sctp_free_hmaclist(), sctp_free_key(), sctp_free_remote_addr, sctp_generate_cause(), sctp_get_next_param(), SCTP_GET_STATE, SCTP_HAS_NAT_SUPPORT, SCTP_HEARTBEAT_INFO, SCTP_HMAC_LIST, SCTP_IDATA, SCTP_IPV4_ADDRESS, SCTP_IPV6_ADDRESS, SCTP_LOAD_ADDR_2, SCTP_LOAD_ADDR_3, SCTP_LOAD_ADDR_4, SCTP_LOAD_ADDR_5, SCTP_NR_SELECTIVE_ACK, SCTP_PACKET_DROPPED, SCTP_PARAM_BUFFER_SIZE, SCTP_PRINTF, SCTP_PRSCTP_SUPPORTED, SCTP_RANDOM, sctp_select_primary_destination(), SCTP_SET_PRIM_ADDR, sctp_set_primary_addr(), SCTP_SIZE32, SCTP_SNPRINTF, SCTP_SO_NOT_LOCKED, SCTP_STATE_COOKIE, SCTP_STATE_COOKIE_WAIT, SCTP_STATE_OPEN, SCTP_STREAM_RESET, SCTP_SUCCESS_REPORT, SCTP_SUPPORTED_ADDRTYPE, SCTP_SUPPORTED_CHUNK_EXT, SCTP_TCB_UNLOCK, SCTP_ULP_ADAPTATION, SCTP_UNRECOG_PARAM, sctp_verify_hmac_param(), SCTPDBG, sockaddr_in::sin_addr, sockaddr_in::sin_family, sockaddr_in::sin_len, sockaddr_in::sin_port, and sctp_association::state.

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_mark_ifa_addr_down()

void sctp_mark_ifa_addr_down ( uint32_t  vrf_id,
struct sockaddr *  addr,
const char *  if_name,
uint32_t  ifn_index 
)

◆ sctp_mark_ifa_addr_up()

void sctp_mark_ifa_addr_up ( uint32_t  vrf_id,
struct sockaddr *  addr,
const char *  if_name,
uint32_t  ifn_index 
)

◆ sctp_move_pcb_and_assoc()

void sctp_move_pcb_and_assoc ( struct sctp_inpcb old_inp,
struct sctp_inpcb new_inp,
struct sctp_tcb stcb 
)

Definition at line 2610 of file sctp_pcb.c.

References sctp_association::asconf_timer, sctp_tcb::asoc, sctp_association::assoc_id, sctp_association::autoclose_timer, sctp_pcb::current_secret_number, sctp_association::dack_timer, sctp_association::delete_prim_timer, sctp_timer::ep, sctp_inpcb::hashasocidmark, sctp_nets::hb_timer, sctp_laddr::ifa, inpcb::in6p_outputopts, sctp_association::in_asocid_hash, sctp_inpcb::inp, INP_CONTROLOPTS, inpcb::inp_flags, inpcb::inp_ip_tos, inpcb::inp_ip_ttl, sctp_inpcb::ip_inp, sctp_inpcb::laddr_count, sctp_pcb::last_secret_number, sctp_association::last_used_address, sctp_association::nets, sctp_nets::pmtu_timer, sctp_association::refcnt, sctp_ifa::refcount, sctp_tcb::rport, sctp_nets::rxt_timer, sctp_inpcb::sctp_addr_list, sctp_inpcb::sctp_asoc_list, sctp_inpcb::sctp_asocidhash, SCTP_BASE_INFO, SCTP_DEBUG_PCB1, sctp_inpcb::sctp_ep, sctp_tcb::sctp_ep, sctp_inpcb::sctp_flags, SCTP_GETTIME_TIMEVAL, SCTP_HASH_FREE, sctp_inpcb::sctp_hashmark, SCTP_INCR_LADDR_COUNT, SCTP_INP_DECR_REF, SCTP_INP_INCR_REF, SCTP_INP_INFO_WLOCK, SCTP_INP_INFO_WUNLOCK, SCTP_INP_WLOCK, SCTP_INP_WUNLOCK, SCTP_PCB_FLAGS_BOUND_V6, SCTP_PCB_FLAGS_BOUNDALL, SCTP_PCBHASH_ALLADDR, SCTP_PCBHASH_ASOC, sctp_inpcb::sctp_socket, sctp_tcb::sctp_socket, SCTP_TCB_LOCK, SCTP_TCB_UNLOCK, sctp_inpcb::sctp_tcbhash, sctp_timer_start(), SCTP_TIMER_TYPE_PATHMTURAISE, SCTP_ZONE_GET, SCTPDBG, sctp_pcb::secret_key, sctp_association::shut_guard_timer, sctp_pcb::size_of_a_cookie, sctp_laddr::start_time, sctp_association::strreset_timer, and sctp_pcb::time_of_secret_change.

Referenced by sctp_do_peeloff(), and sctp_handle_cookie_echo().

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

◆ sctp_pcb_findep()

struct sctp_inpcb * sctp_pcb_findep ( struct sockaddr *  nam,
int  find_tcp_pool,
int  have_lock,
uint32_t  vrf_id 
)

Definition at line 1888 of file sctp_pcb.c.

References sctp_inpcb::inp, SCTP_BASE_INFO, sctp_endpoint_probe(), SCTP_INP_INCR_REF, SCTP_INP_INFO_RLOCK, SCTP_INP_INFO_RUNLOCK, SCTP_PCBHASH_ALLADDR, and sockaddr_in::sin_port.

Referenced by sctp_bindx_add_address(), sctp_findassociation_addr_sa(), sctp_inpcb_bind_locked(), and sctp_listen().

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

◆ sctp_pcb_finish()

◆ sctp_pcb_init()

◆ sctp_remove_ifa_from_ifn()

static void sctp_remove_ifa_from_ifn ( struct sctp_ifa sctp_ifap)
static

Definition at line 433 of file sctp_pcb.c.

References sctp_ifa::address, sctp_ifn::ifa_count, sctp_ifn::ifalist, sctp_ifa::ifn_p, sctp_ifn::num_v4, sctp_ifn::num_v6, sctp_ifn::registered_af, sctp_sockstore::sa, SCTP_ADDR_LOCKED, sctp_delete_ifn(), and sctp_free_ifn().

Referenced by sctp_add_addr_to_vrf(), and sctp_del_addr_from_vrf().

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

◆ sctp_remove_laddr()

static void sctp_remove_laddr ( struct sctp_laddr laddr)
static

Definition at line 2807 of file sctp_pcb.c.

References sctp_laddr::ifa, SCTP_BASE_INFO, SCTP_DECR_LADDR_COUNT, sctp_free_ifa(), and SCTP_ZONE_FREE.

Referenced by sctp_del_local_addr_ep(), sctp_del_local_addr_restricted(), sctp_free_assoc(), and sctp_inpcb_free().

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

◆ sctp_remove_net()

◆ sctp_select_primary_destination()

static void sctp_select_primary_destination ( struct sctp_tcb stcb)
static

Definition at line 5383 of file sctp_pcb.c.

References sctp_net_route::_l_addr, sctp_tcb::asoc, sctp_nets::dest_state, sctp_association::nets, sctp_association::primary_destination, sctp_nets::ro, SCTP_ADDR_UNCONFIRMED, and sctp_destination_is_reachable().

Referenced by sctp_load_addresses_from_init().

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

◆ sctp_set_primary_addr()

int sctp_set_primary_addr ( struct sctp_tcb stcb,
struct sockaddr *  sa,
struct sctp_nets net 
)

◆ sctp_set_vtag_block()

static void sctp_set_vtag_block ( struct sctp_timewait vtag_block,
uint32_t  time,
uint32_t  tag,
uint16_t  lport,
uint16_t  rport 
)
static

Definition at line 4575 of file sctp_pcb.c.

References sctp_timewait::lport, sctp_timewait::rport, sctp_timewait::tv_sec_at_expire, sctp_timewait::v_tag, and sctp_tagblock::vtag_block.

Referenced by sctp_add_vtag_to_timewait().

Here is the caller graph for this function:

◆ sctp_swap_inpcb_for_listen()

◆ sctp_tcb_special_locate()

◆ sctp_update_ep_vflag()

static void sctp_update_ep_vflag ( struct sctp_inpcb inp)
static

◆ sctp_update_ifn_mtu()

void sctp_update_ifn_mtu ( uint32_t  ifn_index,
uint32_t  mtu 
)

Definition at line 259 of file sctp_pcb.c.

References sctp_ifn::ifn_index, sctp_ifn::ifn_mtu, and sctp_find_ifn().

Here is the call graph for this function:

Variable Documentation

◆ sctp_max_number_of_assoc

int sctp_max_number_of_assoc = SCTP_MAX_NUM_OF_ASOC
static

Definition at line 5551 of file sctp_pcb.c.

Referenced by sctp_pcb_init().

◆ sctp_scale_up_for_address

int sctp_scale_up_for_address = SCTP_SCALE_FOR_ADDR
static

Definition at line 5552 of file sctp_pcb.c.

Referenced by sctp_pcb_init().