FreeBSD kernel IPv4 code
sctp_usrreq.c File Reference
#include <sys/cdefs.h>
#include <netinet/sctp_os.h>
#include <sys/proc.h>
#include <netinet/sctp_pcb.h>
#include <netinet/sctp_header.h>
#include <netinet/sctp_var.h>
#include <netinet/sctp_sysctl.h>
#include <netinet/sctp_output.h>
#include <netinet/sctp_uio.h>
#include <netinet/sctp_asconf.h>
#include <netinet/sctputil.h>
#include <netinet/sctp_indata.h>
#include <netinet/sctp_timer.h>
#include <netinet/sctp_auth.h>
#include <netinet/sctp_bsd_addr.h>
#include <netinet/udp.h>
#include <sys/eventhandler.h>
Include dependency graph for sctp_usrreq.c:

Go to the source code of this file.

Macros

#define SCTP_FIND_STCB(inp, stcb, assoc_id)
 
#define SCTP_CHECK_AND_CAST(destp, srcp, type, size)
 

Functions

 __FBSDID ("$FreeBSD$")
 
static void sctp_init (void *arg SCTP_UNUSED)
 
 VNET_SYSINIT (sctp_init, SI_SUB_PROTO_DOMAIN, SI_ORDER_THIRD, sctp_init, NULL)
 
void sctp_pathmtu_adjustment (struct sctp_tcb *stcb, uint32_t mtu, bool resend)
 
static int sctp_getcred (SYSCTL_HANDLER_ARGS)
 
 SYSCTL_PROC (_net_inet_sctp, OID_AUTO, getcred, CTLTYPE_OPAQUE|CTLFLAG_RW|CTLFLAG_NEEDGIANT, 0, 0, sctp_getcred, "S,ucred", "Get the ucred of a SCTP connection")
 
void sctp_close (struct socket *so)
 
int sctp_sendm (struct socket *so, int flags, struct mbuf *m, struct sockaddr *addr, struct mbuf *control, struct thread *p)
 
int sctp_disconnect (struct socket *so)
 
int sctp_flush (struct socket *so, int how)
 
int sctp_shutdown (struct socket *so)
 
static uint32_t sctp_fill_user_address (struct sockaddr *dst, struct sockaddr *src)
 
static size_t sctp_fill_up_addresses_vrf (struct sctp_inpcb *inp, struct sctp_tcb *stcb, size_t limit, struct sockaddr *addr, uint32_t vrf_id)
 
static size_t sctp_fill_up_addresses (struct sctp_inpcb *inp, struct sctp_tcb *stcb, size_t limit, struct sockaddr *addr)
 
static size_t sctp_max_size_addresses_vrf (struct sctp_inpcb *inp, uint32_t vrf_id)
 
static size_t sctp_max_size_addresses (struct sctp_inpcb *inp)
 
static int sctp_do_connect_x (struct socket *so, struct sctp_inpcb *inp, void *optval, size_t optsize, void *p, int delay)
 
static int sctp_getopt (struct socket *so, int optname, void *optval, size_t *optsize, void *p)
 
static int sctp_setopt (struct socket *so, int optname, void *optval, size_t optsize, void *p)
 
int sctp_ctloutput (struct socket *so, struct sockopt *sopt)
 
int sctp_listen (struct socket *so, int backlog, struct thread *p)
 
int sctp_accept (struct socket *so, struct sockaddr **addr)
 

Variables

const struct sctp_cc_functions sctp_cc_functions []
 
const struct sctp_ss_functions sctp_ss_functions []
 
static int sctp_defered_wakeup_cnt = 0
 

Macro Definition Documentation

◆ SCTP_CHECK_AND_CAST

#define SCTP_CHECK_AND_CAST (   destp,
  srcp,
  type,
  size 
)
Value:
{\
if (size < sizeof(type)) { \
SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); \
error = EINVAL; \
break; \
} else { \
destp = (type *)srcp; \
} \
}
#define SCTP_FROM_SCTP_USRREQ

Definition at line 1511 of file sctp_usrreq.c.

◆ SCTP_FIND_STCB

#define SCTP_FIND_STCB (   inp,
  stcb,
  assoc_id 
)
Value:
{ \
if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) ||\
(inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL)) { \
SCTP_INP_RLOCK(inp); \
stcb = LIST_FIRST(&inp->sctp_asoc_list); \
if (stcb) { \
SCTP_TCB_LOCK(stcb); \
} \
SCTP_INP_RUNLOCK(inp); \
} else if (assoc_id > SCTP_ALL_ASSOC) { \
stcb = sctp_findassociation_ep_asocid(inp, assoc_id, 1); \
if (stcb == NULL) { \
SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, ENOENT); \
error = ENOENT; \
break; \
} \
} else { \
stcb = NULL; \
} \
}
#define SCTP_PCB_FLAGS_TCPTYPE
Definition: sctp.h:504
#define SCTP_PCB_FLAGS_IN_TCPPOOL
Definition: sctp.h:515
struct sctp_tcb * sctp_findassociation_ep_asocid(struct sctp_inpcb *inp, sctp_assoc_t asoc_id, int want_lock)
Definition: sctp_pcb.c:1583
#define SCTP_ALL_ASSOC
Definition: sctp_uio.h:52

Definition at line 1490 of file sctp_usrreq.c.

Function Documentation

◆ __FBSDID()

__FBSDID ( "$FreeBSD$"  )

◆ sctp_accept()

◆ sctp_close()

◆ sctp_ctloutput()

int sctp_ctloutput ( struct socket *  so,
struct sockopt *  sopt 
)

◆ sctp_disconnect()

◆ sctp_do_connect_x()

◆ sctp_fill_up_addresses()

static size_t sctp_fill_up_addresses ( struct sctp_inpcb inp,
struct sctp_tcb stcb,
size_t  limit,
struct sockaddr *  addr 
)
static

Definition at line 1244 of file sctp_usrreq.c.

References sctp_inpcb::def_vrf_id, sctp_fill_up_addresses_vrf(), SCTP_IPI_ADDR_RLOCK, and SCTP_IPI_ADDR_RUNLOCK.

Referenced by sctp_getopt().

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

◆ sctp_fill_up_addresses_vrf()

◆ sctp_fill_user_address()

static uint32_t sctp_fill_user_address ( struct sockaddr *  dst,
struct sockaddr *  src 
)
static

Definition at line 995 of file sctp_usrreq.c.

Referenced by sctp_fill_up_addresses_vrf().

Here is the caller graph for this function:

◆ sctp_flush()

◆ sctp_getcred()

static int sctp_getcred ( SYSCTL_HANDLER_ARGS  )
static

◆ sctp_getopt()

static int sctp_getopt ( struct socket *  so,
int  optname,
void *  optval,
size_t *  optsize,
void *  p 
)
static

Definition at line 1522 of file sctp_usrreq.c.

References sctp_net_route::_l_addr, sctp_stream_out::abandoned_sent, sctp_association::abandoned_sent, sctp_stream_out::abandoned_unsent, sctp_association::abandoned_unsent, sctp_authinformation::active_keyid, sctp_pcb::adaptation_layer_indicator, sctp_getaddresses::addr, sctp_cc_option::aid_value, sctp_inpcb::asconf_supported, sctp_association::asconf_supported, sctp_tcb::asoc, sctp_assoc_value::assoc_id, sctp_stream_value::assoc_id, sctp_assoc_value::assoc_value, sctp_inpcb::auth_supported, sctp_association::auth_supported, sctp_association::authinfo, sctp_association::cc_functions, sctp_association::cnt_on_all_streams, sctp_association::cnt_on_reasm_queue, sctp_association::congestion_control_module, sctp_association::context, sctp_association::cookie_life, sctp_nets::cwnd, sctp_pcb::def_cookie_life, sctp_pcb::def_net_failure, sctp_association::def_net_failure, sctp_pcb::def_net_pf_threshold, sctp_association::def_net_pf_threshold, sctp_inpcb::def_send, sctp_association::def_send, sctp_inpcb::def_vrf_id, sctp_pcb::default_dscp, sctp_association::default_dscp, sctp_pcb::default_keyid, sctp_pcb::default_mtu, sctp_association::default_mtu, sctp_association::delayed_ack, sctp_nets::dest_state, sctp_nets::dscp, sctp_inpcb::ecn_supported, sctp_association::ecn_supported, sctp_nets::failure_threshold, sctp_assoc_ids::gaids_assoc_id, sctp_assoc_ids::gaids_number_of_ids, sctp_authchunks::gauth_assoc_id, sctp_authchunks::gauth_chunks, sctp_authchunks::gauth_number_of_chunks, sctp_get_nonce_values::gn_assoc_id, sctp_get_nonce_values::gn_local_tag, sctp_get_nonce_values::gn_peers_tag, sctp_nets::heart_beat_delay, sctp_association::heart_beat_delay, sctp_hmaclist::hmac, id, sctp_inpcb::idata_supported, sctp_association::idata_supported, INADDR_ANY, sctp_pcb::initial_init_rto_max, sctp_pcb::initial_rto, sctp_association::initial_rto, sctp_pcb::initial_sequence_debug, sctp_inpcb::inp, sctp_nets::lastsa, sctp_pcb::local_auth_chunks, sctp_association::local_auth_chunks, sctp_pcb::local_hmacs, sctp_inpcb::local_strreset_support, sctp_association::local_strreset_support, sctp_pcb::max_burst, sctp_association::max_burst, sctp_inpcb::max_cwnd, sctp_association::max_cwnd, sctp_pcb::max_init_times, sctp_pcb::max_open_streams_intome, sctp_pcb::max_send_times, sctp_association::max_send_times, sctp_association::maxrto, sctp_association::minrto, sctp_nets::mtu, sctp_association::my_rwnd, sctp_association::my_vtag, sctp_association::nets, sctp_inpcb::nrsack_supported, sctp_association::nrsack_supported, sctp_hmaclist::num_algo, sctp_association::numnets, sctp_association::peer_auth_chunks, sctp_association::peer_vtag, sctp_association::peers_rwnd, sctp_nets::pf_threshold, sctp_inpcb::pktdrop_supported, sctp_association::pktdrop_supported, sctp_pcb::port, sctp_nets::port, sctp_association::port, sctp_default_prinfo::pr_assoc_id, sctp_default_prinfo::pr_policy, PR_SCTP_POLICY, sctp_default_prinfo::pr_value, sctp_pcb::pre_open_stream_count, sctp_association::primary_destination, sctp_inpcb::prsctp_supported, sctp_association::prsctp_supported, sctp_inpcb::reconfig_supported, sctp_association::reconfig_supported, sctp_nets::ro, sctp_tcb::rport, sctp_nets::RTO, in_addr::s_addr, sctp_sockstore::sa, sctp_sack_info::sack_assoc_id, sctp_sack_info::sack_delay, sctp_association::sack_freq, sctp_sack_info::sack_freq, sctp_assocparams::sasoc_asocmaxrxt, sctp_assocparams::sasoc_assoc_id, sctp_assocparams::sasoc_cookie_life, sctp_assocparams::sasoc_local_rwnd, sctp_assocparams::sasoc_number_peer_destinations, sctp_assocparams::sasoc_peer_rwnd, sctp_authkeyid::scact_assoc_id, sctp_authkeyid::scact_keynumber, SCTP_ACTIVE, SCTP_ADAPTATION_INDICATION, SCTP_ADAPTATION_LAYER, sctp_event_subscribe::sctp_adaptation_layer_event, SCTP_ADDR_NO_PMTUD, SCTP_ADDR_NOHB, SCTP_ADDR_REACHABLE, SCTP_ADDR_UNCONFIRMED, sctp_event_subscribe::sctp_address_event, SCTP_ALL_ASSOC, SCTP_ASCONF_SUPPORTED, sctp_inpcb::sctp_asoc_list, SCTP_ASSOC_CHANGE, SCTP_ASSOC_RESET_EVENT, sctp_event_subscribe::sctp_association_event, SCTP_ASSOCINFO, SCTP_AUTH_ACTIVE_KEY, sctp_auth_get_chklist_size(), SCTP_AUTH_SUPPORTED, sctp_event_subscribe::sctp_authentication_event, SCTP_AUTHENTICATION_EVENT, SCTP_AUTO_ASCONF, SCTP_AUTOCLOSE, SCTP_CC_OPTION, SCTP_CHECK_AND_CAST, SCTP_CMT_ON_OFF, sctp_inpcb::sctp_cmt_on_off, sctp_association::sctp_cmt_on_off, SCTP_CONTEXT, sctp_inpcb::sctp_context, SCTP_CURRENT_ASSOC, sctp_cc_functions::sctp_cwnd_socket_option, sctp_event_subscribe::sctp_data_io_event, sctp_pcb::sctp_default_cc_module, SCTP_DEFAULT_PRINFO, SCTP_DEFAULT_SEND_PARAM, SCTP_DEFAULT_SNDINFO, sctp_pcb::sctp_default_ss_module, SCTP_DELAYED_SACK, SCTP_DISABLE_FRAGMENTS, SCTP_ECN_SUPPORTED, SCTP_ENABLE_STREAM_RESET, sctp_inpcb::sctp_ep, SCTP_EVENT, SCTP_EVENTS, SCTP_EXPLICIT_EOR, sctp_fill_pcbinfo(), sctp_fill_stat_log(), sctp_fill_up_addresses(), SCTP_FIND_STCB, sctp_findassociation_ep_addr(), sctp_findnet(), sctp_inpcb::sctp_flags, SCTP_FRAG_LEVEL_0, SCTP_FRAG_LEVEL_1, SCTP_FRAG_LEVEL_2, sctp_inpcb::sctp_frag_point, sctp_association::sctp_frag_point, SCTP_FRAGMENT_INTERLEAVE, SCTP_FROM_SCTP_USRREQ, SCTP_FUTURE_ASSOC, SCTP_GET_ADDR_LEN, SCTP_GET_ASOC_VRF, SCTP_GET_ASSOC_ID_LIST, SCTP_GET_ASSOC_NUMBER, sctp_get_associd, sctp_get_frag_point(), SCTP_GET_LOCAL_ADDR_SIZE, SCTP_GET_LOCAL_ADDRESSES, SCTP_GET_NONCE_VALUES, SCTP_GET_PACKET_LOG, SCTP_GET_PEER_ADDR_INFO, SCTP_GET_PEER_ADDRESSES, SCTP_GET_REMOTE_ADDR_SIZE, SCTP_GET_SNDBUF_USE, SCTP_GET_STAT_LOG, SCTP_GET_VRF_IDS, SCTP_HMAC_IDENT, SCTP_I_WANT_MAPPED_V4_ADDR, SCTP_INACTIVE, SCTP_INITMSG, SCTP_INP_DECR_REF, SCTP_INP_INCR_REF, SCTP_INP_RLOCK, SCTP_INP_RUNLOCK, SCTP_INTERLEAVING_SUPPORTED, sctp_is_feature_off, sctp_is_feature_on, SCTP_LOCAL_AUTH_CHUNKS, SCTP_LTRACE_ERR_RET, sctp_map_assoc_state(), SCTP_MAX_BURST, SCTP_MAX_CWND, sctp_max_size_addresses(), sctp_pcb::sctp_maxrto, SCTP_MAXSEG, SCTP_MIN_OVERHEAD, SCTP_MIN_V4_OVERHEAD, sctp_pcb::sctp_minrto, SCTP_NODELAY, SCTP_NOTIFICATIONS_STOPPED_EVENT, SCTP_NRSACK_SUPPORTED, sctp_event_subscribe::sctp_partial_delivery_event, SCTP_PARTIAL_DELIVERY_EVENT, SCTP_PARTIAL_DELIVERY_POINT, SCTP_PCB_FLAGS_ADAPTATIONEVNT, SCTP_PCB_FLAGS_ASSOC_RESETEVNT, SCTP_PCB_FLAGS_AUTHEVNT, SCTP_PCB_FLAGS_AUTO_ASCONF, SCTP_PCB_FLAGS_AUTOCLOSE, SCTP_PCB_FLAGS_BOUND_V6, SCTP_PCB_FLAGS_BOUNDALL, SCTP_PCB_FLAGS_DO_NOT_PMTUD, SCTP_PCB_FLAGS_DONOT_HEARTBEAT, SCTP_PCB_FLAGS_DRYEVNT, SCTP_PCB_FLAGS_EXPLICIT_EOR, SCTP_PCB_FLAGS_EXT_RCVINFO, SCTP_PCB_FLAGS_FRAG_INTERLEAVE, SCTP_PCB_FLAGS_IN_TCPPOOL, SCTP_PCB_FLAGS_INTERLEAVE_STRMS, SCTP_PCB_FLAGS_NEEDS_MAPPED_V4, SCTP_PCB_FLAGS_NO_FRAGMENT, SCTP_PCB_FLAGS_NODELAY, SCTP_PCB_FLAGS_PDAPIEVNT, SCTP_PCB_FLAGS_PORTREUSE, SCTP_PCB_FLAGS_RECVASSOCEVNT, SCTP_PCB_FLAGS_RECVDATAIOEVNT, SCTP_PCB_FLAGS_RECVNSENDFAILEVNT, SCTP_PCB_FLAGS_RECVNXTINFO, SCTP_PCB_FLAGS_RECVPADDREVNT, SCTP_PCB_FLAGS_RECVPEERERR, SCTP_PCB_FLAGS_RECVRCVINFO, SCTP_PCB_FLAGS_RECVSENDFAILEVNT, SCTP_PCB_FLAGS_RECVSHUTDOWNEVNT, SCTP_PCB_FLAGS_STREAM_CHANGEEVNT, SCTP_PCB_FLAGS_STREAM_RESETEVNT, SCTP_PCB_FLAGS_TCPTYPE, SCTP_PCB_FLAGS_UDPTYPE, SCTP_PCB_STATUS, SCTP_PEER_ADDR_CHANGE, SCTP_PEER_ADDR_PARAMS, SCTP_PEER_ADDR_THLDS, SCTP_PEER_AUTH_CHUNKS, sctp_event_subscribe::sctp_peer_error_event, SCTP_PKTDROP_SUPPORTED, SCTP_PLUGGABLE_CC, SCTP_PLUGGABLE_SS, SCTP_PR_ASSOC_STATUS, SCTP_PR_SCTP_ALL, SCTP_PR_SCTP_MAX, SCTP_PR_SCTP_NONE, SCTP_PR_STREAM_STATUS, SCTP_PR_SUPPORTED, SCTP_PRIMARY_ADDR, SCTP_RECONFIG_SUPPORTED, SCTP_RECVNXTINFO, SCTP_RECVRCVINFO, SCTP_REMOTE_ERROR, SCTP_REMOTE_UDP_ENCAPS_PORT, SCTP_REUSE_PORT, SCTP_RTOINFO, SCTP_RTT_SHIFT, sctp_pcb::sctp_sack_freq, SCTP_SEND_FAILED, SCTP_SEND_FAILED_EVENT, sctp_event_subscribe::sctp_send_failure_event, sctp_event_subscribe::sctp_sender_dry_event, SCTP_SENDER_DRY_EVENT, sctp_serialize_auth_chunks(), SCTP_SET_INITIAL_DBG_SEQ, sctp_event_subscribe::sctp_shutdown_event, SCTP_SHUTDOWN_EVENT, sctp_inpcb::sctp_socket, sctp_ss_functions::sctp_ss_get_value, SCTP_SS_VALUE, SCTP_STATUS, sctp_stcb_is_feature_on, SCTP_STREAM_CHANGE_EVENT, sctp_event_subscribe::sctp_stream_reset_event, SCTP_STREAM_RESET_EVENT, SCTP_TCB_UNLOCK, sctp_ticks_to_msecs(), sctp_ticks_to_secs(), SCTP_TIMEOUTS, sctp_pcb::sctp_timeoutticks, SCTP_TIMER_HEARTBEAT, SCTP_TIMER_RECV, SCTP_UNCONFIRMED, SCTP_USE_EXT_RCVINFO, SCTP_VRF_ID, sctp_event::se_assoc_id, sctp_event::se_type, sctp_association::sent_queue_cnt, sctp_getaddresses::sget_assoc_id, sctp_hmacalgo::shmac_idents, sctp_hmacalgo::shmac_number_of_idents, sctp_sockstore::sin, sctp_sockstore::sin6, sockaddr_in::sin_addr, sctp_sndrcvinfo::sinfo_assoc_id, sctp_nonpad_sndrcvinfo::sinfo_context, sctp_nonpad_sndrcvinfo::sinfo_flags, sctp_nonpad_sndrcvinfo::sinfo_ppid, sctp_nonpad_sndrcvinfo::sinfo_stream, sctp_nonpad_sndrcvinfo::sinfo_timetolive, sctp_initmsg::sinit_max_attempts, sctp_initmsg::sinit_max_init_timeo, sctp_initmsg::sinit_max_instreams, sctp_initmsg::sinit_num_ostreams, sctp_association::size_on_all_streams, sctp_association::size_on_reasm_queue, sctp_sndinfo::snd_assoc_id, sctp_sndinfo::snd_context, sctp_sndinfo::snd_flags, sctp_sndinfo::snd_ppid, sctp_sndinfo::snd_sid, sctp_paddrinfo::spinfo_address, sctp_paddrinfo::spinfo_assoc_id, sctp_paddrinfo::spinfo_cwnd, sctp_paddrinfo::spinfo_mtu, sctp_paddrinfo::spinfo_rto, sctp_paddrinfo::spinfo_srtt, sctp_paddrinfo::spinfo_state, sctp_paddrparams::spp_address, sctp_paddrparams::spp_assoc_id, sctp_paddrparams::spp_dscp, SPP_DSCP, sctp_paddrparams::spp_flags, SPP_HB_DISABLE, SPP_HB_ENABLE, sctp_paddrparams::spp_hbinterval, sctp_paddrparams::spp_ipv6_flowlabel, SPP_IPV6_FLOWLABEL, sctp_paddrparams::spp_pathmaxrxt, sctp_paddrparams::spp_pathmtu, SPP_PMTUD_DISABLE, SPP_PMTUD_ENABLE, sctp_prstatus::sprstat_abandoned_sent, sctp_prstatus::sprstat_abandoned_unsent, sctp_prstatus::sprstat_assoc_id, sctp_prstatus::sprstat_policy, sctp_prstatus::sprstat_sid, sctp_paddrthlds::spt_address, sctp_paddrthlds::spt_assoc_id, sctp_paddrthlds::spt_pathcpthld, sctp_paddrthlds::spt_pathmaxrxt, sctp_paddrthlds::spt_pathpfthld, sctp_rtoinfo::srto_assoc_id, sctp_rtoinfo::srto_initial, sctp_rtoinfo::srto_max, sctp_rtoinfo::srto_min, sctp_sockstat::ss_assoc_id, sctp_association::ss_functions, sctp_sockstat::ss_total_recv_buf, sctp_sockstat::ss_total_sndbuf, sctp_setprim::ssp_addr, sctp_setprim::ssp_assoc_id, sctp_status::sstat_assoc_id, sctp_status::sstat_fragmentation_point, sctp_status::sstat_instrms, sctp_status::sstat_outstrms, sctp_status::sstat_penddata, sctp_status::sstat_primary, sctp_status::sstat_rwnd, sctp_status::sstat_state, sctp_status::sstat_unackdata, sctp_association::state, sctp_timeouts::stimo_assoc_id, sctp_timeouts::stimo_cookie, sctp_timeouts::stimo_data, sctp_timeouts::stimo_heartbeat, sctp_timeouts::stimo_init, sctp_timeouts::stimo_sack, sctp_timeouts::stimo_shutdown, sctp_timeouts::stimo_shutdownack, sctp_stream_value::stream_id, sctp_association::stream_scheduling_module, sctp_stream_value::stream_value, sctp_association::streamincnt, sctp_association::streamoutcnt, sctp_association::strmout, sctp_udpencaps::sue_address, sctp_udpencaps::sue_assoc_id, sctp_udpencaps::sue_port, sctp_association::timocookie, sctp_association::timodata, sctp_association::timoheartbeat, sctp_association::timoinit, sctp_association::timosack, sctp_association::timoshutdown, sctp_association::timoshutdownack, sctp_association::total_output_queue_size, and sctp_association::vrf_id.

Referenced by sctp_ctloutput().

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

◆ sctp_init()

static void sctp_init ( void *arg  SCTP_UNUSED)
static

◆ sctp_listen()

◆ sctp_max_size_addresses()

static size_t sctp_max_size_addresses ( struct sctp_inpcb inp)
static

Definition at line 1339 of file sctp_usrreq.c.

References sctp_inpcb::def_vrf_id, SCTP_IPI_ADDR_RLOCK, SCTP_IPI_ADDR_RUNLOCK, and sctp_max_size_addresses_vrf().

Referenced by sctp_getopt().

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

◆ sctp_max_size_addresses_vrf()

static size_t sctp_max_size_addresses_vrf ( struct sctp_inpcb inp,
uint32_t  vrf_id 
)
static

◆ sctp_pathmtu_adjustment()

◆ sctp_sendm()

int sctp_sendm ( struct socket *  so,
int  flags,
struct mbuf *  m,
struct sockaddr *  addr,
struct mbuf *  control,
struct thread *  p 
)

◆ sctp_setopt()

static int sctp_setopt ( struct socket *  so,
int  optname,
void *  optval,
size_t  optsize,
void *  p 
)
static

Definition at line 3736 of file sctp_usrreq.c.

References sctp_net_route::_l_addr, sctp_pcb::adaptation_layer_indicator, sctp_pcb::adaptation_layer_indicator_provided, sctp_cc_option::aid_value, sctp_association::alternate, sctp_inpcb::asconf_supported, sctp_tcb::asoc, sctp_assoc_value::assoc_id, sctp_stream_value::assoc_id, sctp_assoc_value::assoc_value, sctp_inpcb::auth_supported, sctp_association::cc_functions, sctp_association::congestion_control_module, sctp_association::context, sctp_association::cookie_life, sctp_nets::cwnd, sctp_pcb::def_cookie_life, sctp_pcb::def_net_failure, sctp_association::def_net_failure, sctp_pcb::def_net_pf_threshold, sctp_association::def_net_pf_threshold, sctp_inpcb::def_send, sctp_association::def_send, sctp_inpcb::def_vrf_id, sctp_pcb::default_dscp, sctp_association::default_dscp, sctp_pcb::default_mtu, sctp_association::default_mtu, sctp_association::delayed_ack, sctp_association::delayed_connection, sctp_nets::dest_state, sctp_nets::dscp, sctp_inpcb::ecn_supported, sctp_nets::error_count, sctp_nets::failure_threshold, sctp_nets::heart_beat_delay, sctp_association::heart_beat_delay, sctp_hmaclist::hmac, sctp_inpcb::idata_supported, sctp_ifa::ifa, sctp_laddr::ifa, INADDR_ANY, sctp_pcb::initial_init_rto_max, sctp_pcb::initial_rto, sctp_association::initial_rto, sctp_pcb::initial_sequence_debug, sctp_inpcb::inp, inpcb::inp_cred, sctp_inpcb::ip_inp, sctp_shared_key::key, sctp_shared_key::keyid, sctp_pcb::local_auth_chunks, sctp_pcb::local_hmacs, sctp_inpcb::local_strreset_support, sctp_association::local_strreset_support, sctp_pcb::max_burst, sctp_association::max_burst, sctp_inpcb::max_cwnd, sctp_association::max_cwnd, sctp_association::max_inbound_streams, sctp_pcb::max_init_times, sctp_pcb::max_open_streams_intome, sctp_pcb::max_send_times, sctp_association::max_send_times, sctp_association::maxrto, sctp_association::minrto, sctp_nets::mtu, sctp_association::nets, sctp_inpcb::nrsack_supported, sctp_hmaclist::num_algo, sctp_stream_out::outqueue, sctp_nets::pf_threshold, sctp_inpcb::pktdrop_supported, sctp_nets::pmtu_timer, sctp_pcb::port, sctp_nets::port, sctp_association::port, sctp_default_prinfo::pr_assoc_id, sctp_default_prinfo::pr_policy, PR_SCTP_POLICY, sctp_default_prinfo::pr_value, sctp_pcb::pre_open_stream_count, sctp_association::primary_destination, prison_check_ip4(), prison_local_ip4(), sctp_inpcb::prsctp_supported, sctp_inpcb::reconfig_supported, sctp_association::reconfig_supported, sctp_nets::ro, in_addr::s_addr, sctp_sockstore::sa, sctp_sack_info::sack_assoc_id, sctp_sack_info::sack_delay, sctp_association::sack_freq, sctp_sack_info::sack_freq, sctp_add_streams::sas_assoc_id, sctp_add_streams::sas_instrms, sctp_add_streams::sas_outstrms, sctp_assocparams::sasoc_asocmaxrxt, sctp_assocparams::sasoc_assoc_id, sctp_assocparams::sasoc_cookie_life, sctp_authchunk::sauth_chunk, sctp_authkey::sca_assoc_id, sctp_authkey::sca_key, sctp_authkey::sca_keylength, sctp_authkey::sca_keynumber, sctp_authkeyid::scact_assoc_id, sctp_authkeyid::scact_keynumber, SCTP_ADAPTATION_INDICATION, SCTP_ADAPTATION_LAYER, sctp_event_subscribe::sctp_adaptation_layer_event, SCTP_ADD_STREAMS, SCTP_ADD_VRF_ID, sctp_inpcb::sctp_addr_list, SCTP_ADDR_NO_PMTUD, SCTP_ADDR_NOHB, SCTP_ADDR_NOT_LOCKED, SCTP_ADDR_PF, SCTP_ADDR_REACHABLE, SCTP_ADDR_UNCONFIRMED, sctp_event_subscribe::sctp_address_event, SCTP_ALL_ASSOC, sctp_alloc_hmaclist(), sctp_alloc_sharedkey(), SCTP_ASCONF, SCTP_ASCONF_ACK, SCTP_ASCONF_SUPPORTED, sctp_inpcb::sctp_asoc_list, SCTP_ASSOC_CHANGE, SCTP_ASSOC_RESET_EVENT, sctp_event_subscribe::sctp_association_event, SCTP_ASSOCINFO, SCTP_AUTH_ACTIVE_KEY, sctp_auth_add_chunk(), sctp_auth_add_hmacid(), SCTP_AUTH_CHUNK, SCTP_AUTH_DEACTIVATE_KEY, sctp_auth_delete_chunk(), SCTP_AUTH_DELETE_KEY, SCTP_AUTH_HMAC_ID_SHA1, SCTP_AUTH_KEY, sctp_auth_setactivekey(), sctp_auth_setactivekey_ep(), SCTP_AUTH_SUPPORTED, sctp_event_subscribe::sctp_authentication_event, SCTP_AUTHENTICATION_EVENT, SCTP_AUTO_ASCONF, SCTP_AUTOCLOSE, SCTP_BASE_SYSCTL, SCTP_BINDX_ADD_ADDR, sctp_bindx_add_address(), sctp_bindx_delete_address(), SCTP_BINDX_REM_ADDR, SCTP_CC_HSTCP, SCTP_CC_HTCP, SCTP_CC_OPTION, SCTP_CC_RFC2581, SCTP_CC_RTCC, SCTP_CHECK_AND_CAST, sctp_chunk_output(), sctp_clear_cachedkeys(), sctp_clear_cachedkeys_ep(), SCTP_CLR_STAT_LOG, SCTP_CMT_MAX, SCTP_CMT_ON_OFF, sctp_inpcb::sctp_cmt_on_off, sctp_association::sctp_cmt_on_off, SCTP_CONNECT_X, SCTP_CONNECT_X_COMPLETE, SCTP_CONNECT_X_DELAYED, SCTP_CONTEXT, sctp_inpcb::sctp_context, SCTP_CURRENT_ASSOC, sctp_cc_functions::sctp_cwnd_socket_option, sctp_event_subscribe::sctp_data_io_event, sctp_deact_sharedkey(), sctp_deact_sharedkey_ep(), SCTP_DEBUG_OUTPUT1, sctp_pcb::sctp_default_cc_module, SCTP_DEFAULT_PRINFO, SCTP_DEFAULT_SEND_PARAM, SCTP_DEFAULT_SNDINFO, sctp_pcb::sctp_default_ss_module, SCTP_DEL_VRF_ID, SCTP_DELAYED_SACK, sctp_delete_sharedkey(), sctp_delete_sharedkey_ep(), SCTP_DISABLE_FRAGMENTS, sctp_do_connect_x(), sctp_dynamic_set_primary(), SCTP_ECN_SUPPORTED, SCTP_ENABLE_STREAM_RESET, SCTP_ENABLE_VALUE_MASK, sctp_inpcb::sctp_ep, sctp_tcb::sctp_ep, SCTP_EVENT, SCTP_EVENTS, SCTP_EXPLICIT_EOR, sctp_feature_off, sctp_feature_on, sctp_find_ifa_by_addr(), SCTP_FIND_STCB, sctp_findassociation_ep_addr(), sctp_findnet(), sctp_inpcb::sctp_flags, SCTP_FRAG_LEVEL_0, SCTP_FRAG_LEVEL_1, SCTP_FRAG_LEVEL_2, sctp_inpcb::sctp_frag_point, sctp_association::sctp_frag_point, SCTP_FRAGMENT_INTERLEAVE, sctp_free_hmaclist(), sctp_free_key(), sctp_free_remote_addr, SCTP_FROM_SCTP_USRREQ, SCTP_FUTURE_ASSOC, SCTP_GET_STATE, SCTP_GETTIME_TIMEVAL, SCTP_HMAC_IDENT, SCTP_I_WANT_MAPPED_V4_ADDR, SCTP_INITMSG, SCTP_INP_DECR_REF, SCTP_INP_INCR_REF, SCTP_INP_RLOCK, SCTP_INP_RUNLOCK, SCTP_INP_WLOCK, SCTP_INP_WUNLOCK, sctp_insert_sharedkey(), SCTP_INTERLEAVING_SUPPORTED, SCTP_IPV6_V6ONLY, sctp_is_addr_pending(), sctp_is_addr_restricted(), sctp_is_feature_on, SCTP_LARGEST_PMTU, SCTP_LOC_10, SCTP_LOC_11, SCTP_LOC_12, SCTP_LOC_13, SCTP_LOC_14, SCTP_LOC_15, SCTP_LOC_16, SCTP_LOC_17, SCTP_LOC_18, SCTP_LOC_8, SCTP_LOC_9, SCTP_LTRACE_ERR_RET, SCTP_MAX_BURST, SCTP_MAX_COOKIE_LIFE, SCTP_MAX_CWND, SCTP_MAX_HB_INTERVAL, SCTP_MAX_SACK_DELAY, SCTP_MAX_STREAMS_AT_ONCE_RESET, SCTP_MAX_VRF_ID, sctp_pcb::sctp_maxrto, SCTP_MAXSEG, SCTP_MIN_COOKIE_LIFE, SCTP_MIN_OVERHEAD, SCTP_MIN_V4_OVERHEAD, sctp_pcb::sctp_minrto, sctp_msecs_to_ticks(), SCTP_NODELAY, SCTP_NOTIFICATIONS_STOPPED_EVENT, SCTP_NOTIFY_INTERFACE_DOWN, SCTP_NOTIFY_INTERFACE_UP, SCTP_NOTIFY_SENDER_DRY, SCTP_NRSACK_SUPPORTED, SCTP_OS_TIMER_PENDING, SCTP_OUTPUT_FROM_SOCKOPT, SCTP_OUTPUT_FROM_STRRST_REQ, sctp_event_subscribe::sctp_partial_delivery_event, SCTP_PARTIAL_DELIVERY_EVENT, SCTP_PARTIAL_DELIVERY_POINT, sctp_pathmtu_adjustment(), SCTP_PCB_FLAGS_ADAPTATIONEVNT, SCTP_PCB_FLAGS_ASSOC_RESETEVNT, SCTP_PCB_FLAGS_AUTHEVNT, SCTP_PCB_FLAGS_AUTO_ASCONF, SCTP_PCB_FLAGS_AUTOCLOSE, SCTP_PCB_FLAGS_BOUND_V6, SCTP_PCB_FLAGS_BOUNDALL, SCTP_PCB_FLAGS_CONNECTED, SCTP_PCB_FLAGS_DO_NOT_PMTUD, SCTP_PCB_FLAGS_DONOT_HEARTBEAT, SCTP_PCB_FLAGS_DRYEVNT, SCTP_PCB_FLAGS_EXPLICIT_EOR, SCTP_PCB_FLAGS_EXT_RCVINFO, SCTP_PCB_FLAGS_FRAG_INTERLEAVE, SCTP_PCB_FLAGS_IN_TCPPOOL, SCTP_PCB_FLAGS_INTERLEAVE_STRMS, SCTP_PCB_FLAGS_NEEDS_MAPPED_V4, SCTP_PCB_FLAGS_NO_FRAGMENT, SCTP_PCB_FLAGS_NODELAY, SCTP_PCB_FLAGS_PDAPIEVNT, SCTP_PCB_FLAGS_PORTREUSE, SCTP_PCB_FLAGS_RECVASSOCEVNT, SCTP_PCB_FLAGS_RECVDATAIOEVNT, SCTP_PCB_FLAGS_RECVNSENDFAILEVNT, SCTP_PCB_FLAGS_RECVNXTINFO, SCTP_PCB_FLAGS_RECVPADDREVNT, SCTP_PCB_FLAGS_RECVPEERERR, SCTP_PCB_FLAGS_RECVRCVINFO, SCTP_PCB_FLAGS_RECVSENDFAILEVNT, SCTP_PCB_FLAGS_RECVSHUTDOWNEVNT, SCTP_PCB_FLAGS_STREAM_CHANGEEVNT, SCTP_PCB_FLAGS_STREAM_RESETEVNT, SCTP_PCB_FLAGS_TCPTYPE, SCTP_PCB_FLAGS_UDPTYPE, SCTP_PCB_FLAGS_UNBOUND, SCTP_PEER_ADDR_CHANGE, SCTP_PEER_ADDR_PARAMS, SCTP_PEER_ADDR_THLDS, sctp_event_subscribe::sctp_peer_error_event, SCTP_PKTDROP_SUPPORTED, SCTP_PLUGGABLE_CC, SCTP_PLUGGABLE_SS, SCTP_PR_SCTP_MAX, SCTP_PR_SUPPORTED, SCTP_PRIMARY_ADDR, SCTP_RECONFIG_SUPPORTED, SCTP_RECVNXTINFO, SCTP_RECVRCVINFO, SCTP_REMOTE_ERROR, SCTP_REMOTE_UDP_ENCAPS_PORT, SCTP_RESET_ASSOC, SCTP_RESET_STREAMS, SCTP_REUSE_PORT, SCTP_RTOINFO, sctp_pcb::sctp_sack_freq, SCTP_SB_LIMIT_RCV, sctp_secs_to_ticks(), SCTP_SEND_FAILED, SCTP_SEND_FAILED_EVENT, sctp_event_subscribe::sctp_send_failure_event, sctp_send_hb(), sctp_send_initiate(), sctp_send_str_reset_req(), sctp_send_stream_reset_out_if_possible(), sctp_event_subscribe::sctp_sender_dry_event, SCTP_SENDER_DRY_EVENT, SCTP_SET_DYNAMIC_PRIMARY, sctp_cc_functions::sctp_set_initial_cc_param, SCTP_SET_INITIAL_DBG_SEQ, sctp_set_key(), SCTP_SET_PEER_PRIMARY_ADDR, sctp_set_primary_addr(), sctp_set_primary_ip_address_sa(), sctp_event_subscribe::sctp_shutdown_event, SCTP_SHUTDOWN_EVENT, SCTP_SMALLEST_PMTU, SCTP_SO_LOCKED, sctp_ss_functions::sctp_ss_clear, SCTP_SS_DEFAULT, SCTP_SS_FAIR_BANDWITH, SCTP_SS_FIRST_COME, sctp_ss_functions::sctp_ss_init, SCTP_SS_PRIORITY, SCTP_SS_ROUND_ROBIN, SCTP_SS_ROUND_ROBIN_PACKET, sctp_ss_functions::sctp_ss_set_value, SCTP_SS_VALUE, SCTP_STATE_OPEN, sctp_stcb_feature_off, sctp_stcb_feature_on, SCTP_STREAM_CHANGE_EVENT, SCTP_STREAM_OPEN, sctp_event_subscribe::sctp_stream_reset_event, SCTP_STREAM_RESET_EVENT, SCTP_STREAM_RESET_INCOMING, SCTP_STREAM_RESET_OUTGOING, SCTP_STREAM_RESET_PENDING, SCTP_TCB_LOCK, SCTP_TCB_SEND_LOCK, SCTP_TCB_SEND_UNLOCK, SCTP_TCB_UNLOCK, sctp_pcb::sctp_timeoutticks, SCTP_TIMER_HEARTBEAT, SCTP_TIMER_RECV, sctp_timer_start(), sctp_timer_stop(), SCTP_TIMER_TYPE_HEARTBEAT, SCTP_TIMER_TYPE_INIT, SCTP_TIMER_TYPE_PATHMTURAISE, sctp_ulp_notify(), SCTP_USE_EXT_RCVINFO, SCTP_VRF_ID, SCTPDBG, sctp_event::se_assoc_id, sctp_event::se_on, sctp_event::se_type, sctp_association::send_queue, sctp_association::sent_queue, sctp_pcb::shared_keys, sctp_association::shared_keys, sctp_hmacalgo::shmac_idents, sctp_hmacalgo::shmac_number_of_idents, sockaddr_in::sin_addr, sctp_sndrcvinfo::sinfo_assoc_id, sctp_nonpad_sndrcvinfo::sinfo_context, sctp_nonpad_sndrcvinfo::sinfo_flags, sctp_nonpad_sndrcvinfo::sinfo_ppid, sctp_nonpad_sndrcvinfo::sinfo_stream, sctp_sndrcvinfo::sinfo_stream, sctp_nonpad_sndrcvinfo::sinfo_timetolive, sctp_initmsg::sinit_max_attempts, sctp_initmsg::sinit_max_init_timeo, sctp_initmsg::sinit_max_instreams, sctp_initmsg::sinit_num_ostreams, sctp_association::smallest_mtu, sctp_sndinfo::snd_assoc_id, sctp_sndinfo::snd_context, sctp_sndinfo::snd_flags, sctp_sndinfo::snd_ppid, sctp_sndinfo::snd_sid, sctp_paddrparams::spp_address, sctp_paddrparams::spp_assoc_id, sctp_paddrparams::spp_dscp, SPP_DSCP, sctp_paddrparams::spp_flags, SPP_HB_DEMAND, SPP_HB_DISABLE, SPP_HB_ENABLE, SPP_HB_TIME_IS_ZERO, sctp_paddrparams::spp_hbinterval, sctp_paddrparams::spp_ipv6_flowlabel, SPP_IPV6_FLOWLABEL, sctp_paddrparams::spp_pathmaxrxt, sctp_paddrparams::spp_pathmtu, SPP_PMTUD_DISABLE, SPP_PMTUD_ENABLE, sctp_paddrthlds::spt_address, sctp_paddrthlds::spt_assoc_id, sctp_paddrthlds::spt_pathcpthld, sctp_paddrthlds::spt_pathmaxrxt, sctp_paddrthlds::spt_pathpfthld, sctp_reset_streams::srs_assoc_id, sctp_reset_streams::srs_flags, sctp_reset_streams::srs_number_streams, sctp_reset_streams::srs_stream_list, sctp_rtoinfo::srto_assoc_id, sctp_rtoinfo::srto_initial, sctp_rtoinfo::srto_max, sctp_rtoinfo::srto_min, sctp_association::ss_functions, sctp_setadaptation::ssb_adaptation_ind, sctp_setprim::ssp_addr, sctp_setprim::ssp_assoc_id, sctp_setpeerprim::sspp_addr, sctp_setpeerprim::sspp_assoc_id, sctp_stream_out::state, sctp_stream_value::stream_id, sctp_association::stream_queue_cnt, sctp_association::stream_reset_outstanding, sctp_association::stream_scheduling_module, sctp_stream_value::stream_value, sctp_association::streamincnt, sctp_association::streamoutcnt, sctp_association::strmout, sctp_udpencaps::sue_address, sctp_udpencaps::sue_assoc_id, sctp_udpencaps::sue_port, sctp_association::time_entered, sctp_timer::timer, and sctp_association::vrf_id.

Referenced by sctp_ctloutput().

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

◆ sctp_shutdown()

◆ SYSCTL_PROC()

SYSCTL_PROC ( _net_inet_sctp  ,
OID_AUTO  ,
getcred  ,
CTLTYPE_OPAQUE|CTLFLAG_RW|  CTLFLAG_NEEDGIANT,
,
,
sctp_getcred  ,
S,
ucred"  ,
"Get the ucred of a SCTP connection"   
)

◆ VNET_SYSINIT()

VNET_SYSINIT ( sctp_init  ,
SI_SUB_PROTO_DOMAIN  ,
SI_ORDER_THIRD  ,
sctp_init  ,
NULL   
)

Variable Documentation

◆ sctp_cc_functions

const struct sctp_cc_functions sctp_cc_functions[]
extern

Definition at line 2319 of file sctp_cc_functions.c.

◆ sctp_defered_wakeup_cnt

int sctp_defered_wakeup_cnt = 0
static

Definition at line 7264 of file sctp_usrreq.c.

Referenced by sctp_accept().

◆ sctp_ss_functions

const struct sctp_ss_functions sctp_ss_functions[]
extern

Definition at line 899 of file sctp_ss_functions.c.