FreeBSD kernel IPv4 code
|
#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>
Go to the source code of this file.
Functions | |
__FBSDID ("$FreeBSD$") | |
void | sctp_fill_pcbinfo (struct sctp_pcbinfo *spcb) |
struct sctp_vrf * | sctp_allocate_vrf (int vrf_id) |
struct sctp_ifn * | sctp_find_ifn (void *ifn, uint32_t ifn_index) |
struct sctp_vrf * | sctp_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_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) |
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_tcb * | sctp_tcb_special_locate (struct sctp_inpcb **inp_p, struct sockaddr *from, struct sockaddr *to, struct sctp_nets **netp, uint32_t vrf_id) |
struct sctp_tcb * | sctp_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_tcb * | sctp_findasoc_ep_asocid_locked (struct sctp_inpcb *inp, sctp_assoc_t asoc_id, int want_lock) |
struct sctp_tcb * | sctp_findassociation_ep_asocid (struct sctp_inpcb *inp, sctp_assoc_t asoc_id, int want_lock) |
static struct sctp_inpcb * | sctp_endpoint_probe (struct sockaddr *nam, struct sctppcbhead *head, uint16_t lport, uint32_t vrf_id) |
static struct sctp_inpcb * | sctp_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_inpcb * | sctp_pcb_findep (struct sockaddr *nam, int find_tcp_pool, int have_lock, uint32_t vrf_id) |
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) |
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 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) |
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) |
struct sctp_tcb * | sctp_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_nets * | sctp_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_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) |
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) |
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) |
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 |
__FBSDID | ( | "$FreeBSD$" | ) |
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().
Definition at line 396 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::refcount, sctp_ifn::registered_af, and sctp_sockstore::sa.
Referenced by sctp_add_addr_to_vrf().
void sctp_add_local_addr_ep | ( | struct sctp_inpcb * | inp, |
struct sctp_ifa * | ifa, | ||
uint32_t | action | ||
) |
Definition at line 5321 of file sctp_pcb.c.
References sctp_ifa::address, sctp_laddr::ifa, sctp_inpcb::inp, INP_IPV4, INP_IPV6, inpcb::inp_vflag, sctp_inpcb::ip_inp, sctp_inpcb::laddr_count, sctp_ifa::localifa_flags, sctp_sockstore::sa, sctp_add_local_addr_restricted(), SCTP_ADDR_IFA_UNUSEABLE, sctp_inpcb::sctp_addr_list, sctp_inpcb::sctp_asoc_list, sctp_inpcb::sctp_flags, sctp_insert_laddr(), and SCTP_PCB_FLAGS_BOUNDALL.
Referenced by sctp_addr_mgmt_ep_sa().
Definition at line 5477 of file sctp_pcb.c.
References sctp_ifa::address, sctp_tcb::asoc, sctp_laddr::ifa, sctp_ifa::localifa_flags, sctp_sockstore::sa, SCTP_ADDR_IFA_UNUSEABLE, sctp_insert_laddr(), and sctp_association::sctp_restricted_addrs.
Referenced by sctp_add_local_addr_ep(), sctp_addr_mgmt_assoc(), sctp_asconf_iterator_stcb(), and sctp_choose_boundall().
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().
Definition at line 4585 of file sctp_pcb.c.
References SCTP_BASE_INFO, SCTP_BASE_SYSCTL, SCTP_GETTIME_TIMEVAL, SCTP_INP_INFO_WLOCK_ASSERT, SCTP_MALLOC, SCTP_NUMBER_IN_VTAG_BLOCK, sctp_set_vtag_block(), SCTP_STACK_VTAG_HASH_SIZE, sctp_timewait::tv_sec_at_expire, sctp_timewait::v_tag, and sctp_tagblock::vtag_block.
Referenced by sctp_free_assoc().
struct sctp_vrf * sctp_allocate_vrf | ( | int | vrf_id | ) |
Definition at line 145 of file sctp_pcb.c.
References bucket, sctp_vrf::ifnlist, sctp_vrf::refcount, SCTP_BASE_INFO, sctp_find_vrf(), SCTP_FREE, SCTP_HASH_INIT, SCTP_INIT_VRF_TABLEID, SCTP_MALLOC, SCTP_VRF_ADDR_HASH_SIZE, sctp_vrf::total_ifa_count, sctp_vrf::vrf_addr_hash, sctp_vrf::vrf_addr_hashmark, and sctp_vrf::vrf_id.
Referenced by sctp_add_addr_to_vrf(), and sctp_init_vrf_list().
|
static |
Definition at line 4138 of file sctp_pcb.c.
References sctp_tcb::asoc, sctp_inpcb::hashasocidmark, id, sctp_association::in_asocid_hash, SCTP_ALL_ASSOC, sctp_inpcb::sctp_asocidhash, sctp_inpcb::sctp_associd_counter, sctp_findasoc_ep_asocid_locked(), sctp_inpcb::sctp_flags, SCTP_PCB_FLAGS_SOCKET_ALLGONE, and SCTP_PCBHASH_ASOC.
Referenced by sctp_aloc_assoc_locked().
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().
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().
|
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().
void sctp_clean_up_stream | ( | struct sctp_tcb * | stcb, |
struct sctp_readhead * | rh | ||
) |
Definition at line 4641 of file sctp_pcb.c.
References sctp_tmit_chunk::auth_keyid, sctp_tmit_chunk::data, sctp_queued_to_read::data, sctp_tmit_chunk::holds_key_ref, sctp_queued_to_read::on_read_q, sctp_queued_to_read::on_strm_q, sctp_queued_to_read::reasm, sctp_auth_key_release(), SCTP_BASE_INFO, SCTP_DECR_CHK_COUNT, sctp_free_a_readq, sctp_free_remote_addr, sctp_m_freem, SCTP_SO_LOCKED, SCTP_ZONE_FREE, sctp_queued_to_read::stcb, sctp_queued_to_read::whoFrom, and sctp_tmit_chunk::whoTo.
Referenced by sctp_free_assoc(), and sctp_process_init().
void sctp_del_addr_from_vrf | ( | uint32_t | vrf_id, |
struct sockaddr * | addr, | ||
uint32_t | ifn_index, | ||
const char * | if_name | ||
) |
Definition at line 718 of file sctp_pcb.c.
References sctp_laddr::action, sctp_laddr::ifa, sctp_ifn::ifn_index, sctp_ifn::ifn_name, sctp_ifa::ifn_p, SCTP_ADDR_LOCKED, SCTP_ADDR_VALID, SCTP_BASE_INFO, SCTP_DEBUG_PCB1, SCTP_DEBUG_PCB4, SCTP_DEL_IP_ADDRESS, sctp_find_ifa_by_addr(), sctp_find_vrf(), sctp_free_ifa(), SCTP_GETTIME_TIMEVAL, SCTP_IFNAMSIZ, SCTP_INCR_LADDR_COUNT, SCTP_IPI_ADDR_WLOCK, SCTP_IPI_ADDR_WUNLOCK, sctp_remove_ifa_from_ifn(), sctp_timer_start(), SCTP_TIMER_TYPE_ADDR_WQ, SCTP_WQ_ADDR_LOCK, SCTP_WQ_ADDR_UNLOCK, SCTP_ZONE_GET, SCTPDBG, SCTPDBG_ADDR, sctp_laddr::start_time, sctp_vrf::total_ifa_count, sctp_vrf::vrf_id, and sctp_ifa::vrf_id.
Referenced by sctp_add_addr_to_vrf(), and sctp_addr_change().
void sctp_del_local_addr_ep | ( | struct sctp_inpcb * | inp, |
struct sctp_ifa * | ifa | ||
) |
Definition at line 5405 of file sctp_pcb.c.
References sctp_net_route::_s_addr, sctp_tcb::asoc, sctp_laddr::ifa, sctp_inpcb::laddr_count, sctp_association::last_used_address, sctp_association::nets, sctp_inpcb::next_addr_touse, sctp_nets::ro, sctp_inpcb::sctp_addr_list, sctp_inpcb::sctp_asoc_list, sctp_inpcb::sctp_flags, sctp_free_ifa(), SCTP_PCB_FLAGS_BOUNDALL, sctp_remove_laddr(), SCTP_TCB_LOCK, SCTP_TCB_UNLOCK, sctp_update_ep_vflag(), and sctp_nets::src_addr_selected.
Referenced by sctp_addr_mgmt_ep_sa(), and sctp_asconf_iterator_ep_end().
Definition at line 5512 of file sctp_pcb.c.
References sctp_tcb::asoc, sctp_laddr::ifa, sctp_inpcb::inp, sctp_inpcb::laddr_count, sctp_tcb::sctp_ep, sctp_inpcb::sctp_flags, sctp_is_feature_off, SCTP_PCB_FLAGS_BOUNDALL, SCTP_PCB_FLAGS_DO_ASCONF, sctp_remove_laddr(), and sctp_association::sctp_restricted_addrs.
Referenced by sctp_asconf_addr_mgmt_ack(), sctp_asconf_queue_mgmt(), and sctp_asconf_queue_sa_delete().
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().
|
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().
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().
|
static |
Definition at line 826 of file sctp_pcb.c.
References sctp_ifa::address, sctp_tcb::asoc, 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_ifa::localifa_flags, sctp_scoping::loopback_scope, prison_check_ip4(), in_addr::s_addr, sctp_sockstore::sa, sctp_association::scope, sctp_inpcb::sctp_addr_list, SCTP_BEING_DELETED, SCTP_DEBUG_PCB1, 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_pending(), sctp_is_addr_restricted(), SCTP_PCB_FLAGS_BOUNDALL, SCTPDBG, sctp_sockstore::sin, sctp_sockstore::sin6, sockaddr_in::sin_addr, sctp_scoping::site_scope, and sctp_association::vrf_id.
Referenced by sctp_findassoc_by_vtag(), sctp_findassociation_ep_addr(), and sctp_tcb_special_locate().
void sctp_drain | ( | void | ) |
Definition at line 6957 of file sctp_pcb.c.
References sctp_inpcb::inp, sctp_inpcb::sctp_asoc_list, SCTP_BASE_INFO, SCTP_BASE_SYSCTL, sctp_drain_mbufs(), SCTP_INP_INFO_RLOCK, SCTP_INP_INFO_RUNLOCK, SCTP_INP_RLOCK, SCTP_INP_RUNLOCK, SCTP_STAT_INCR, SCTP_TCB_LOCK, and SCTP_TCB_UNLOCK.
|
static |
Definition at line 6754 of file sctp_pcb.c.
References sctp_tcb::asoc, sctp_association::cnt_on_all_streams, sctp_association::cnt_on_reasm_queue, sctp_association::cumulative_tsn, sctp_tmit_chunk::data, sctp_queued_to_read::data, sctp_association::highest_tsn_inside_map, sctp_stream_in::inqueue, sctp_association::last_revoke_count, sctp_queued_to_read::length, sctp_association::mapping_array, sctp_association::mapping_array_base_tsn, next, sctp_queued_to_read::on_read_q, sctp_queued_to_read::on_strm_q, sctp_inpcb::read_queue, sctp_queued_to_read::reasm, sctp_tmit_chunk::rec, SCTP_CALC_TSN_TO_GAP, sctp_chunk_output(), SCTP_DEBUG_PCB1, sctp_tcb::sctp_ep, sctp_free_a_chunk, sctp_free_a_readq, sctp_free_remote_addr, SCTP_FROM_SCTP_PCB, SCTP_IS_TSN_PRESENT, SCTP_LOC_11, sctp_m_freem, SCTP_ON_ORDERED, SCTP_ON_UNORDERED, SCTP_OUTPUT_FROM_DRAIN, sctp_send_sack(), SCTP_SO_NOT_LOCKED, SCTP_STAT_INCR, sctp_timer_stop(), SCTP_TIMER_TYPE_RECV, SCTP_TSN_GE, SCTP_TSN_GT, sctp_ucount_decr, SCTP_UNSET_TSN_PRESENT, SCTPDBG, sctp_tmit_chunk::send_size, sctp_queued_to_read::sinfo_tsn, sctp_association::size_on_all_streams, sctp_association::size_on_reasm_queue, sctp_queued_to_read::stcb, sctp_association::streamincnt, sctp_association::strmin, sctp_data_chunkrec::tsn, sctp_stream_in::uno_inqueue, and sctp_queued_to_read::whoFrom.
Referenced by sctp_drain().
|
static |
Definition at line 1597 of file sctp_pcb.c.
References sctp_ifa::address, sctp_inpcb::def_vrf_id, sctp_laddr::ifa, INADDR_ANY, sctp_inpcb::inp, inpcb::inp_cred, sctp_inpcb::ip_inp, sctp_ifa::localifa_flags, prison_check_ip4(), in_addr::s_addr, sctp_sockstore::sa, sctp_inpcb::sctp_addr_list, SCTP_BEING_DELETED, SCTP_DEBUG_PCB1, sctp_inpcb::sctp_flags, SCTP_INP_RLOCK, SCTP_INP_RUNLOCK, SCTP_IPV6_V6ONLY, SCTP_PCB_FLAGS_BOUND_V6, SCTP_PCB_FLAGS_BOUNDALL, SCTP_PCB_FLAGS_SOCKET_ALLGONE, SCTPDBG, sctp_sockstore::sin, sctp_sockstore::sin6, and sockaddr_in::sin_addr.
Referenced by sctp_pcb_findep().
void sctp_fill_pcbinfo | ( | struct sctp_pcbinfo * | spcb | ) |
Definition at line 81 of file sctp_pcb.c.
References sctp_pcbinfo::asoc_count, sctp_pcbinfo::chk_count, sctp_pcbinfo::ep_count, sctp_pcbinfo::free_chunks, sctp_pcbinfo::laddr_count, sctp_pcbinfo::raddr_count, sctp_pcbinfo::readq_count, SCTP_BASE_INFO, SCTP_INP_INFO_RLOCK, SCTP_INP_INFO_RUNLOCK, and sctp_pcbinfo::stream_oque.
Referenced by sctp_getopt().
Definition at line 193 of file sctp_pcb.c.
References sctp_ifn::ifn_index, sctp_ifn::ifn_p, SCTP_BASE_INFO, and SCTP_IPI_ADDR_LOCK_ASSERT.
Referenced by sctp_add_addr_to_vrf(), sctp_choose_boundall(), sctp_choose_boundspecific_inp(), sctp_choose_boundspecific_stcb(), sctp_delete_ifn(), and sctp_update_ifn_mtu().
Definition at line 216 of file sctp_pcb.c.
References bucket, SCTP_BASE_INFO, and sctp_vrf::vrf_id.
Referenced by sctp_add_addr_to_vrf(), sctp_add_addresses_to_i_ia(), sctp_allocate_vrf(), sctp_asconf_send_nat_state_update(), sctp_check_address_list_all(), sctp_choose_boundall(), sctp_choose_boundspecific_inp(), sctp_choose_boundspecific_stcb(), sctp_del_addr_from_vrf(), sctp_does_stcb_own_this_addr(), sctp_fill_up_addresses_vrf(), sctp_find_ifa_by_addr(), sctp_find_valid_localaddr(), sctp_local_addr_count(), sctp_mark_ifa_addr_down(), sctp_mark_ifa_addr_up(), sctp_max_size_addresses_vrf(), sctp_sysctl_copy_out_local_addresses(), and sctp_sysctl_number_of_addresses().
struct sctp_tcb * sctp_findasoc_ep_asocid_locked | ( | struct sctp_inpcb * | inp, |
sctp_assoc_t | asoc_id, | ||
int | want_lock | ||
) |
Definition at line 1540 of file sctp_pcb.c.
References sctp_tcb::asoc, sctp_association::assoc_id, sctp_inpcb::hashasocidmark, id, sctp_inpcb::sctp_asocidhash, sctp_tcb::sctp_ep, sctp_inpcb::sctp_flags, SCTP_PCB_FLAGS_SOCKET_ALLGONE, SCTP_PCBHASH_ASOC, SCTP_PRINTF, SCTP_STATE_ABOUT_TO_BE_FREED, SCTP_TCB_LOCK, and sctp_association::state.
Referenced by sctp_aloc_a_assoc_id(), and sctp_findassociation_ep_asocid().
|
static |
Definition at line 2112 of file sctp_pcb.c.
References sctp_tcb::asoc, sctp_inpcb::def_vrf_id, sctp_association::my_vtag, sctp_association::peer_vtag, sctp_tcb::rport, SCTP_BASE_INFO, sctp_does_stcb_own_this_addr(), sctp_tcb::sctp_ep, sctp_findnet(), sctp_inpcb::sctp_flags, SCTP_INP_INFO_RLOCK, SCTP_INP_INFO_RUNLOCK, SCTP_INP_RLOCK, SCTP_INP_RUNLOCK, SCTP_PCB_FLAGS_SOCKET_ALLGONE, SCTP_PCBHASH_ASOC, SCTP_STAT_INCR, SCTP_STATE_ABOUT_TO_BE_FREED, SCTP_TCB_LOCK, SCTP_TCB_UNLOCK, and sctp_association::state.
Referenced by sctp_findassociation_addr(), and sctp_findassociation_ep_asconf().
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 | ||
) |
Definition at line 2213 of file sctp_pcb.c.
References sctp_chunkhdr::chunk_type, sctphdr::dest_port, sctp_inpcb::inp, SCTP_DEBUG_PCB1, sctp_findassoc_by_vtag(), sctp_findassociation_addr_sa(), sctp_findassociation_special_addr(), SCTP_INITIATION, SCTP_INITIATION_ACK, SCTP_PCB_FLAGS_IN_TCPPOOL, SCTPDBG, sctphdr::src_port, and sctphdr::v_tag.
Referenced by sctp_common_input_processing().
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().
struct sctp_tcb * sctp_findassociation_ep_addr | ( | struct sctp_inpcb ** | inp_p, |
struct sockaddr * | remote, | ||
struct sctp_nets ** | netp, | ||
struct sockaddr * | local, | ||
struct sctp_tcb * | locked_tcb | ||
) |
Definition at line 1259 of file sctp_pcb.c.
References sctp_net_route::_l_addr, sctp_tcb::asoc, sctp_inpcb::def_vrf_id, sctp_inpcb::inp, sctp_association::nets, sctp_association::refcnt, sctp_nets::ro, sctp_tcb::rport, in_addr::s_addr, sctp_sockstore::sa, sctp_inpcb::sctp_asoc_list, sctp_does_stcb_own_this_addr(), sctp_tcb::sctp_ep, sctp_inpcb::sctp_flags, sctp_inpcb::sctp_hashmark, SCTP_INP_DECR_REF, SCTP_INP_INFO_RLOCK, SCTP_INP_INFO_RUNLOCK, SCTP_INP_RLOCK, SCTP_INP_RUNLOCK, SCTP_INP_WLOCK, SCTP_INP_WUNLOCK, SCTP_IS_LISTENING, SCTP_PCB_FLAGS_IN_TCPPOOL, SCTP_PCB_FLAGS_SOCKET_ALLGONE, SCTP_PCB_FLAGS_TCPTYPE, SCTP_PCBHASH_ALLADDR, sctp_inpcb::sctp_socket, SCTP_STATE_ABOUT_TO_BE_FREED, SCTP_TCB_LOCK, sctp_tcb_special_locate(), SCTP_TCB_UNLOCK, sctp_inpcb::sctp_tcbhash, sockaddr_in::sin_addr, and sctp_association::state.
Referenced by sctp_connectx_helper_find(), sctp_findassociation_addr_sa(), sctp_findassociation_ep_asconf(), sctp_findassociation_special_addr(), sctp_getopt(), sctp_handle_cookie_echo(), sctp_load_addresses_from_init(), sctp_lower_sosend(), and sctp_setopt().
struct sctp_tcb * sctp_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 | ||
) |
Definition at line 2273 of file sctp_pcb.c.
References sctp_ipv4addr_param::addr, sctp_ipv6addr_param::addr, sctphdr::dest_port, INADDR_ANY, sctp_paramhdr::param_length, sctp_paramhdr::param_type, sctp_ipv4addr_param::ph, sctp_ipv6addr_param::ph, in_addr::s_addr, sctp_sockstore::sa, SCTP_DEBUG_INPUT3, sctp_findassoc_by_vtag(), sctp_findassociation_ep_addr(), sctp_get_next_param(), SCTP_INP_DECR_REF, SCTP_IPV4_ADDRESS, SCTP_IPV6_ADDRESS, SCTPDBG, sctp_sockstore::sin, sctp_sockstore::sin6, sockaddr_in::sin_addr, sockaddr_in::sin_family, sockaddr_in::sin_len, sockaddr_in::sin_port, sctphdr::src_port, and sctphdr::v_tag.
Referenced by sctp_process_control().
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().
|
static |
Definition at line 2020 of file sctp_pcb.c.
References sctp_ipv4addr_param::addr, sctp_ipv6addr_param::addr, sctp_paramhdr::param_length, sctp_paramhdr::param_type, sctp_findassociation_ep_addr(), sctp_get_next_param(), SCTP_IPV4_ADDRESS, SCTP_IPV6_ADDRESS, SCTP_SIZE32, sockaddr_in::sin_addr, sockaddr_in::sin_family, sockaddr_in::sin_len, sockaddr_in::sin_port, and sctphdr::src_port.
Referenced by sctp_findassociation_addr().
Definition at line 3690 of file sctp_pcb.c.
References sctp_net_route::_l_addr, sctp_tcb::asoc, sctp_association::nets, sctp_nets::ro, and sctp_cmpaddr().
Referenced by sctp_add_remote_addr(), sctp_asconf_del_remote_addrs_except(), sctp_findassoc_by_vtag(), sctp_getopt(), sctp_handle_asconf(), sctp_handle_cookie_echo(), sctp_handle_heartbeat_ack(), sctp_lower_sosend(), sctp_process_cookie_new(), sctp_set_primary_addr(), and sctp_setopt().
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().
void sctp_free_ifa | ( | struct sctp_ifa * | sctp_ifap | ) |
Definition at line 270 of file sctp_pcb.c.
References sctp_ifa::ifn_p, sctp_ifa::refcount, SCTP_BASE_INFO, SCTP_DECREMENT_AND_CHECK_REFCOUNT, SCTP_FREE, and sctp_free_ifn().
Referenced by sctp_asconf_iterator_end(), sctp_asconf_iterator_stcb(), sctp_asconf_nets_cleanup(), sctp_asconf_process_param_ack(), sctp_asconf_queue_add(), sctp_asconf_queue_mgmt(), sctp_asconf_queue_sa_delete(), sctp_del_addr_from_vrf(), sctp_del_local_addr_ep(), sctp_find_alternate_net(), sctp_heartbeat_timer(), sctp_lowlevel_chunk_output(), sctp_path_check_and_react(), sctp_pathmtu_timer(), sctp_remove_laddr(), and sctp_t3rxt_timer().
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().
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().
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 | ||
) |
Definition at line 7007 of file sctp_pcb.c.
References sctp_iterator::asoc_state, 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_running, iterator_control::iteratorhead, sctp_iterator::no_chunk_output, sctp_iterator::pcb_features, sctp_iterator::pcb_flags, sctp_iterator::pointer, SCTP_BASE_INFO, SCTP_BASE_VAR, SCTP_FREE, SCTP_FROM_SCTP_PCB, SCTP_INP_INCR_REF, SCTP_INP_INFO_RLOCK, SCTP_INP_INFO_RUNLOCK, SCTP_IPI_ITERATOR_WQ_LOCK, SCTP_IPI_ITERATOR_WQ_UNLOCK, sctp_it_ctl, SCTP_ITERATOR_DO_ALL_INP, SCTP_ITERATOR_DO_SINGLE_INP, SCTP_LTRACE_ERR_RET, SCTP_MALLOC, SCTP_PRINTF, sctp_wakeup_iterator(), sctp_iterator::val, and sctp_iterator::vn.
Referenced by sctp_addr_mgmt_ep_sa(), sctp_handle_addr_wq(), and sctp_sendall().
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.
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().
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().
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().
|
static |
Definition at line 2781 of file sctp_pcb.c.
References sctp_laddr::action, sctp_laddr::ifa, sctp_ifa::refcount, SCTP_BASE_INFO, SCTP_FROM_SCTP_PCB, SCTP_GETTIME_TIMEVAL, SCTP_INCR_LADDR_COUNT, SCTP_LTRACE_ERR_RET, SCTP_ZONE_GET, and sctp_laddr::start_time.
Referenced by sctp_add_local_addr_ep(), sctp_add_local_addr_restricted(), and sctp_inpcb_bind_locked().
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().
|
static |
Definition at line 4553 of file sctp_pcb.c.
References sctp_timewait::lport, sctp_timewait::rport, SCTP_BASE_INFO, SCTP_INP_INFO_LOCK_ASSERT, SCTP_NUMBER_IN_VTAG_BLOCK, SCTP_STACK_VTAG_HASH_SIZE, sctp_timewait::tv_sec_at_expire, sctp_timewait::v_tag, and sctp_tagblock::vtag_block.
Referenced by sctp_is_vtag_good().
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().
|
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().
|
static |
Definition at line 3241 of file sctp_pcb.c.
References iterator_control::cur_it, sctp_iterator::function_atend, sctp_iterator::inp, sctp_iterator::iterator_flags, iterator_control::iterator_flags, iterator_control::iteratorhead, sctp_iterator::pointer, SCTP_FREE, SCTP_INP_DECR_REF, SCTP_INP_INCR_REF, SCTP_IPI_ITERATOR_WQ_LOCK, SCTP_IPI_ITERATOR_WQ_UNLOCK, sctp_it_ctl, SCTP_ITERATOR_DO_SINGLE_INP, SCTP_ITERATOR_STOP_CUR_INP, SCTP_ITERATOR_STOP_CUR_IT, sctp_iterator::val, and sctp_iterator::vn.
Referenced by sctp_inpcb_free().
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().
void sctp_mark_ifa_addr_down | ( | uint32_t | vrf_id, |
struct sockaddr * | addr, | ||
const char * | if_name, | ||
uint32_t | ifn_index | ||
) |
Definition at line 307 of file sctp_pcb.c.
References sctp_ifn::ifn_index, sctp_ifn::ifn_name, sctp_ifa::ifn_p, sctp_ifa::localifa_flags, SCTP_ADDR_IFA_UNUSEABLE, SCTP_ADDR_LOCKED, SCTP_DEBUG_PCB4, sctp_find_ifa_by_addr(), sctp_find_vrf(), SCTP_IFNAMSIZ, SCTP_IPI_ADDR_RLOCK, SCTP_IPI_ADDR_RUNLOCK, SCTPDBG, sctp_vrf::vrf_id, and sctp_ifa::vrf_id.
void sctp_mark_ifa_addr_up | ( | uint32_t | vrf_id, |
struct sockaddr * | addr, | ||
const char * | if_name, | ||
uint32_t | ifn_index | ||
) |
Definition at line 349 of file sctp_pcb.c.
References sctp_ifn::ifn_index, sctp_ifn::ifn_name, sctp_ifa::ifn_p, sctp_ifa::localifa_flags, SCTP_ADDR_LOCKED, SCTP_ADDR_VALID, SCTP_DEBUG_PCB4, sctp_find_ifa_by_addr(), sctp_find_vrf(), SCTP_IFNAMSIZ, SCTP_IPI_ADDR_RLOCK, SCTP_IPI_ADDR_RUNLOCK, SCTPDBG, sctp_vrf::vrf_id, and sctp_ifa::vrf_id.
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().
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().
void sctp_pcb_finish | ( | void | ) |
Definition at line 5856 of file sctp_pcb.c.
References sctp_laddr::action, iterator_control::cur_it, sctp_iterator::function_atend, sctp_ifa::ifa, sctp_laddr::ifa, sctp_ifn::ifalist, sctp_vrf::ifnlist, iterator_control::iterator_flags, iterator_control::iterator_running, iterator_control::iteratorhead, sctp_iterator::pointer, SCTP_BASE_INFO, SCTP_BASE_STATS, SCTP_BASE_VAR, SCTP_DECR_LADDR_COUNT, SCTP_DEFAULT_VRFID, SCTP_DEL_IP_ADDRESS, SCTP_FREE, SCTP_HASH_FREE, SCTP_INP_INFO_LOCK_DESTROY, SCTP_IP_PKTLOG_DESTROY, SCTP_IPI_ADDR_DESTROY, SCTP_IPI_ADDR_WLOCK, SCTP_IPI_ADDR_WUNLOCK, SCTP_IPI_ITERATOR_WQ_LOCK, SCTP_IPI_ITERATOR_WQ_UNLOCK, sctp_it_ctl, SCTP_ITERATOR_LOCK, SCTP_ITERATOR_STOP_CUR_IT, SCTP_ITERATOR_UNLOCK, SCTP_OS_TIMER_STOP_DRAIN, SCTP_PRINTF, SCTP_STACK_VTAG_HASH_SIZE, SCTP_STATLOG_DESTROY, SCTP_WQ_ADDR_DESTROY, SCTP_WQ_ADDR_LOCK, SCTP_WQ_ADDR_UNLOCK, SCTP_ZONE_DESTROY, SCTP_ZONE_FREE, sctp_iterator::val, sctp_iterator::vn, sctp_vrf::vrf_addr_hash, and sctp_vrf::vrf_addr_hashmark.
void sctp_pcb_init | ( | void | ) |
Definition at line 5709 of file sctp_pcb.c.
References SCTP_BASE_INFO, SCTP_BASE_STAT, SCTP_BASE_STATS, SCTP_BASE_SYSCTL, SCTP_BASE_VAR, SCTP_DEFAULT_VRF, SCTP_GETTIME_TIMEVAL, SCTP_HASH_INIT, sctp_init_vrf_list(), SCTP_INP_INFO_LOCK_INIT, SCTP_IP_PKTLOG_INIT, SCTP_IPI_ADDR_INIT, SCTP_IPI_COUNT_INIT, SCTP_MALLOC, sctp_max_number_of_assoc, SCTP_OS_TIMER_INIT, sctp_scale_up_for_address, SCTP_SIZE_OF_VRF_HASH, SCTP_STACK_VTAG_HASH_SIZE, sctp_startup_iterator(), SCTP_STATLOG_INIT_LOCK, SCTP_VRF_IFN_HASH_SIZE, SCTP_WQ_ADDR_INIT, and SCTP_ZONE_INIT.
Referenced by sctp_init().
|
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().
|
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().
Definition at line 4447 of file sctp_pcb.c.
References sctp_association::alternate, sctp_tcb::asoc, sctp_association::deleted_primary, sctp_nets::dest_state, sctp_inpcb::inp, sctp_association::last_control_chunk_from, sctp_association::last_data_chunk_from, sctp_association::last_net_cmt_send_started, sctp_nets::lastsa, sctp_nets::lastsv, sctp_association::nets, sctp_association::numnets, sctp_association::primary_destination, sctp_nets::ref_count, SCTP_ADDR_BEING_DELETED, SCTP_DEBUG_ASCONF1, sctp_tcb::sctp_ep, sctp_find_alternate_net(), sctp_free_remote_addr, SCTP_FROM_SCTP_PCB, sctp_is_mobility_feature_on, SCTP_LOC_10, SCTP_LOC_9, SCTP_MOBILITY_BASE, SCTP_MOBILITY_FASTHANDOFF, sctp_mobility_feature_on, SCTP_MOBILITY_PRIM_DELETED, sctp_timer_start(), sctp_timer_stop(), SCTP_TIMER_TYPE_HEARTBEAT, SCTP_TIMER_TYPE_PATHMTURAISE, SCTP_TIMER_TYPE_PRIM_DELETED, and SCTPDBG.
Referenced by sctp_asconf_del_remote_addrs_except(), and sctp_del_remote_addr().
|
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().
Definition at line 6683 of file sctp_pcb.c.
References sctp_association::alternate, sctp_tcb::asoc, sctp_nets::dest_state, sctp_association::nets, sctp_association::primary_destination, SCTP_ADDR_PF, SCTP_ADDR_REQ_PRIMARY, SCTP_ADDR_UNCONFIRMED, sctp_findnet(), and sctp_free_remote_addr.
Referenced by sctp_handle_cookie_echo(), sctp_load_addresses_from_init(), sctp_process_asconf_set_primary(), sctp_send_initiate(), and sctp_setopt().
|
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().
int sctp_swap_inpcb_for_listen | ( | struct sctp_inpcb * | inp | ) |
Definition at line 1838 of file sctp_pcb.c.
References sctp_inpcb::inp, SCTP_BASE_INFO, sctp_inpcb::sctp_flags, SCTP_INP_INFO_WLOCK_ASSERT, SCTP_INP_WLOCK, SCTP_INP_WLOCK_ASSERT, SCTP_INP_WUNLOCK, sctp_is_feature_off, SCTP_IS_LISTENING, SCTP_PCB_FLAGS_IN_TCPPOOL, SCTP_PCB_FLAGS_PORTREUSE, SCTP_PCB_FLAGS_SOCKET_ALLGONE, SCTP_PCB_FLAGS_SOCKET_GONE, and SCTP_PCBHASH_ALLADDR.
Referenced by sctp_listen().
|
static |
Definition at line 999 of file sctp_pcb.c.
References sctp_net_route::_l_addr, sctp_ifa::address, sctp_tcb::asoc, sctp_inpcb::def_vrf_id, sctp_laddr::ifa, sctp_inpcb::inp, inpcb::inp_cred, sctp_inpcb::ip_inp, sctp_ifa::localifa_flags, sctp_association::nets, prison_check_ip4(), sctp_nets::ro, sctp_tcb::rport, in_addr::s_addr, sctp_sockstore::sa, sctp_inpcb::sctp_addr_list, sctp_inpcb::sctp_asoc_list, SCTP_BASE_INFO, SCTP_BEING_DELETED, SCTP_DEBUG_PCB1, sctp_does_stcb_own_this_addr(), sctp_inpcb::sctp_flags, SCTP_INP_RLOCK, SCTP_INP_RUNLOCK, SCTP_PCB_FLAGS_BOUNDALL, SCTP_PCB_FLAGS_SOCKET_ALLGONE, SCTP_PCBHASH_ALLADDR, SCTP_STATE_ABOUT_TO_BE_FREED, SCTP_TCB_LOCK, SCTP_TCB_UNLOCK, SCTPDBG, sctp_sockstore::sin, sctp_sockstore::sin6, sockaddr_in::sin_addr, and sctp_association::state.
Referenced by sctp_findassociation_addr_sa(), and sctp_findassociation_ep_addr().
|
static |
Definition at line 5282 of file sctp_pcb.c.
References sctp_ifa::address, sctp_laddr::ifa, sctp_inpcb::inp, INP_IPV4, INP_IPV6, inpcb::inp_vflag, sctp_inpcb::ip_inp, sctp_ifa::localifa_flags, sctp_sockstore::sa, sctp_inpcb::sctp_addr_list, SCTP_BEING_DELETED, SCTP_DEBUG_PCB1, and SCTPDBG.
Referenced by sctp_del_local_addr_ep().
Definition at line 259 of file sctp_pcb.c.
References sctp_ifn::ifn_index, sctp_ifn::ifn_mtu, and sctp_find_ifn().
|
static |
Definition at line 5551 of file sctp_pcb.c.
Referenced by sctp_pcb_init().
|
static |
Definition at line 5552 of file sctp_pcb.c.
Referenced by sctp_pcb_init().