FreeBSD kernel IPv4 code
|
Go to the source code of this file.
Macros | |
#define | _NETINET_SCTP_VAR_H_ |
#define | sctp_feature_on(inp, feature) (inp->sctp_features |= feature) |
#define | sctp_feature_off(inp, feature) (inp->sctp_features &= ~feature) |
#define | sctp_is_feature_on(inp, feature) ((inp->sctp_features & feature) == feature) |
#define | sctp_is_feature_off(inp, feature) ((inp->sctp_features & feature) == 0) |
#define | sctp_stcb_feature_on(inp, stcb, feature) |
#define | sctp_stcb_feature_off(inp, stcb, feature) |
#define | sctp_stcb_is_feature_on(inp, stcb, feature) |
#define | sctp_stcb_is_feature_off(inp, stcb, feature) |
#define | sctp_mobility_feature_on(inp, feature) (inp->sctp_mobility_features |= feature) |
#define | sctp_mobility_feature_off(inp, feature) (inp->sctp_mobility_features &= ~feature) |
#define | sctp_is_mobility_feature_on(inp, feature) (inp->sctp_mobility_features & feature) |
#define | sctp_is_mobility_feature_off(inp, feature) ((inp->sctp_mobility_features & feature) == 0) |
#define | sctp_maxspace(sb) (max((sb)->sb_hiwat,SCTP_MINIMAL_RWND)) |
#define | sctp_sbspace(asoc, sb) ((long) ((sctp_maxspace(sb) > (asoc)->sb_cc) ? (sctp_maxspace(sb) - (asoc)->sb_cc) : 0)) |
#define | sctp_sbspace_failedmsgs(sb) ((long) ((sctp_maxspace(sb) > (sb)->sb_cc) ? (sctp_maxspace(sb) - (sb)->sb_cc) : 0)) |
#define | sctp_sbspace_sub(a, b) (((a) > (b)) ? ((a) - (b)) : 0) |
#define | sctp_free_a_readq(_stcb, _readq) |
#define | sctp_alloc_a_readq(_stcb, _readq) |
#define | sctp_free_a_strmoq(_stcb, _strmoq, _so_locked) |
#define | sctp_alloc_a_strmoq(_stcb, _strmoq) |
#define | sctp_free_a_chunk(_stcb, _chk, _so_locked) |
#define | sctp_alloc_a_chunk(_stcb, _chk) |
#define | sctp_free_remote_addr(__net) |
#define | sctp_sbfree(ctl, stcb, sb, m) |
#define | sctp_sballoc(stcb, sb, m) |
#define | sctp_ucount_incr(val) |
#define | sctp_ucount_decr(val) |
#define | sctp_mbuf_crush(data) |
#define | sctp_flight_size_decrease(tp1) |
#define | sctp_flight_size_increase(tp1) |
#define | sctp_total_flight_decrease(stcb, tp1) |
#define | sctp_total_flight_increase(stcb, tp1) |
#define | SCTP_PF_ENABLED(_net) (_net->pf_threshold < _net->failure_threshold) |
#define | SCTP_NET_IS_PF(_net) (_net->pf_threshold < _net->error_count) |
Functions | |
__FBSDID ("$FreeBSD$") | |
void | sctp_close (struct socket *so) |
int | sctp_disconnect (struct socket *so) |
void | sctp_ctlinput (int, struct sockaddr *, void *) |
int | sctp_ctloutput (struct socket *, struct sockopt *) |
void | sctp_pathmtu_adjustment (struct sctp_tcb *, uint32_t, bool) |
void | sctp_drain (void) |
void | sctp_notify (struct sctp_inpcb *, struct sctp_tcb *, struct sctp_nets *, uint8_t, uint8_t, uint16_t, uint32_t) |
int | sctp_flush (struct socket *, int) |
int | sctp_shutdown (struct socket *) |
int | sctp_bindx (struct socket *, int, struct sockaddr_storage *, int, int, struct proc *) |
int | sctp_peeloff (struct socket *, struct socket *, int, caddr_t, int *) |
int | sctp_ingetaddr (struct socket *, struct sockaddr **) |
int | sctp_peeraddr (struct socket *, struct sockaddr **) |
int | sctp_listen (struct socket *, int, struct thread *) |
int | sctp_accept (struct socket *, struct sockaddr **) |
Variables | |
struct pr_usrreqs | sctp_usrreqs |
#define _NETINET_SCTP_VAR_H_ |
Definition at line 39 of file sctp_var.h.
#define sctp_alloc_a_chunk | ( | _stcb, | |
_chk | |||
) |
Definition at line 166 of file sctp_var.h.
#define sctp_alloc_a_readq | ( | _stcb, | |
_readq | |||
) |
Definition at line 115 of file sctp_var.h.
#define sctp_alloc_a_strmoq | ( | _stcb, | |
_strmoq | |||
) |
Definition at line 131 of file sctp_var.h.
#define sctp_feature_off | ( | inp, | |
feature | |||
) | (inp->sctp_features &= ~feature) |
Definition at line 48 of file sctp_var.h.
#define sctp_feature_on | ( | inp, | |
feature | |||
) | (inp->sctp_features |= feature) |
Definition at line 47 of file sctp_var.h.
#define sctp_flight_size_decrease | ( | tp1 | ) |
Definition at line 247 of file sctp_var.h.
#define sctp_flight_size_increase | ( | tp1 | ) |
Definition at line 254 of file sctp_var.h.
#define sctp_free_a_chunk | ( | _stcb, | |
_chk, | |||
_so_locked | |||
) |
Definition at line 140 of file sctp_var.h.
#define sctp_free_a_readq | ( | _stcb, | |
_readq | |||
) |
Definition at line 109 of file sctp_var.h.
#define sctp_free_a_strmoq | ( | _stcb, | |
_strmoq, | |||
_so_locked | |||
) |
Definition at line 122 of file sctp_var.h.
#define sctp_free_remote_addr | ( | __net | ) |
Definition at line 184 of file sctp_var.h.
#define sctp_is_feature_off | ( | inp, | |
feature | |||
) | ((inp->sctp_features & feature) == 0) |
Definition at line 50 of file sctp_var.h.
#define sctp_is_feature_on | ( | inp, | |
feature | |||
) | ((inp->sctp_features & feature) == feature) |
Definition at line 49 of file sctp_var.h.
#define sctp_is_mobility_feature_off | ( | inp, | |
feature | |||
) | ((inp->sctp_mobility_features & feature) == 0) |
Definition at line 82 of file sctp_var.h.
#define sctp_is_mobility_feature_on | ( | inp, | |
feature | |||
) | (inp->sctp_mobility_features & feature) |
Definition at line 81 of file sctp_var.h.
#define sctp_maxspace | ( | sb | ) | (max((sb)->sb_hiwat,SCTP_MINIMAL_RWND)) |
Definition at line 84 of file sctp_var.h.
#define sctp_mbuf_crush | ( | data | ) |
Definition at line 236 of file sctp_var.h.
#define sctp_mobility_feature_off | ( | inp, | |
feature | |||
) | (inp->sctp_mobility_features &= ~feature) |
Definition at line 80 of file sctp_var.h.
#define sctp_mobility_feature_on | ( | inp, | |
feature | |||
) | (inp->sctp_mobility_features |= feature) |
Definition at line 79 of file sctp_var.h.
#define SCTP_NET_IS_PF | ( | _net | ) | (_net->pf_threshold < _net->error_count) |
Definition at line 316 of file sctp_var.h.
#define SCTP_PF_ENABLED | ( | _net | ) | (_net->pf_threshold < _net->failure_threshold) |
Definition at line 315 of file sctp_var.h.
#define sctp_sballoc | ( | stcb, | |
sb, | |||
m | |||
) |
Definition at line 212 of file sctp_var.h.
#define sctp_sbfree | ( | ctl, | |
stcb, | |||
sb, | |||
m | |||
) |
Definition at line 200 of file sctp_var.h.
#define sctp_sbspace | ( | asoc, | |
sb | |||
) | ((long) ((sctp_maxspace(sb) > (asoc)->sb_cc) ? (sctp_maxspace(sb) - (asoc)->sb_cc) : 0)) |
Definition at line 86 of file sctp_var.h.
#define sctp_sbspace_failedmsgs | ( | sb | ) | ((long) ((sctp_maxspace(sb) > (sb)->sb_cc) ? (sctp_maxspace(sb) - (sb)->sb_cc) : 0)) |
Definition at line 88 of file sctp_var.h.
#define sctp_sbspace_sub | ( | a, | |
b | |||
) | (((a) > (b)) ? ((a) - (b)) : 0) |
Definition at line 90 of file sctp_var.h.
#define sctp_stcb_feature_off | ( | inp, | |
stcb, | |||
feature | |||
) |
Definition at line 59 of file sctp_var.h.
#define sctp_stcb_feature_on | ( | inp, | |
stcb, | |||
feature | |||
) |
Definition at line 52 of file sctp_var.h.
#define sctp_stcb_is_feature_off | ( | inp, | |
stcb, | |||
feature | |||
) |
Definition at line 71 of file sctp_var.h.
#define sctp_stcb_is_feature_on | ( | inp, | |
stcb, | |||
feature | |||
) |
Definition at line 66 of file sctp_var.h.
#define sctp_total_flight_decrease | ( | stcb, | |
tp1 | |||
) |
Definition at line 296 of file sctp_var.h.
#define sctp_total_flight_increase | ( | stcb, | |
tp1 | |||
) |
Definition at line 308 of file sctp_var.h.
#define sctp_ucount_decr | ( | val | ) |
Definition at line 228 of file sctp_var.h.
#define sctp_ucount_incr | ( | val | ) |
Definition at line 224 of file sctp_var.h.
__FBSDID | ( | "$FreeBSD$" | ) |
int sctp_accept | ( | struct socket * | so, |
struct sockaddr ** | addr | ||
) |
Definition at line 7267 of file sctp_usrreq.c.
References sctp_net_route::_l_addr, sctp_tcb::asoc, sctp_inpcb::inp, sctp_association::primary_destination, sctp_nets::ro, sctp_sockstore::sa, SCTP_CLEAR_SUBSTATE, sctp_defered_wakeup_cnt, sctp_free_assoc(), SCTP_FREE_SONAME, SCTP_FROM_SCTP_USRREQ, SCTP_INP_WLOCK, SCTP_INP_WUNLOCK, SCTP_LOC_19, SCTP_LTRACE_ERR_RET, SCTP_MALLOC_SONAME, SCTP_NORMAL_PROC, SCTP_PCB_FLAGS_DONT_WAKE, SCTP_PCB_FLAGS_UDPTYPE, SCTP_PCB_FLAGS_WAKEINPUT, SCTP_PCB_FLAGS_WAKEOUTPUT, SCTP_STATE_ABOUT_TO_BE_FREED, SCTP_STATE_IN_ACCEPT_QUEUE, SCTP_TCB_LOCK, SCTP_TCB_UNLOCK, sctp_sockstore::sin, sctp_sockstore::sin6, sockaddr_in::sin_addr, sockaddr_in::sin_family, sockaddr_in::sin_len, sockaddr_in::sin_port, and sctp_association::state.
int sctp_bindx | ( | struct socket * | , |
int | , | ||
struct sockaddr_storage * | , | ||
int | , | ||
int | , | ||
struct proc * | |||
) |
void sctp_close | ( | struct socket * | so | ) |
Definition at line 528 of file sctp_usrreq.c.
References sctp_inpcb::inp, SCTP_CALLED_AFTER_CMPSET_OFCLOSE, SCTP_FREE_SHOULD_USE_ABORT, SCTP_FREE_SHOULD_USE_GRACEFUL_CLOSE, SCTP_INP_WLOCK, SCTP_INP_WUNLOCK, sctp_inpcb_free(), sctp_log_closing(), SCTP_PCB_FLAGS_CLOSE_IP, SCTP_PCB_FLAGS_SOCKET_GONE, and SCTP_SB_CLEAR.
void sctp_ctlinput | ( | int | , |
struct sockaddr * | , | ||
void * | |||
) |
int sctp_ctloutput | ( | struct socket * | so, |
struct sockopt * | sopt | ||
) |
Definition at line 6870 of file sctp_usrreq.c.
References sctp_inpcb::inp, INP_CHECK_SOCKAF, ip_ctloutput(), IPPROTO_SCTP, SCTP_FREE, SCTP_FROM_SCTP_USRREQ, sctp_getopt(), SCTP_INP_WLOCK, SCTP_INP_WUNLOCK, SCTP_LTRACE_ERR_RET, SCTP_MALLOC, sctp_setopt(), and SCTP_SOCKET_OPTION_LIMIT.
int sctp_disconnect | ( | struct socket * | so | ) |
Definition at line 674 of file sctp_usrreq.c.
References sctp_association::alternate, sctp_tcb::asoc, sctp_inpcb::inp, sctp_inpcb::last_abort_code, sctp_association::primary_destination, SCTP_ADD_SUBSTATE, sctp_inpcb::sctp_asoc_list, SCTP_CAUSE_USER_INITIATED_ABT, sctp_chunk_output(), sctp_tcb::sctp_ep, sctp_free_assoc(), SCTP_FROM_SCTP_USRREQ, sctp_generate_cause(), SCTP_GET_STATE, SCTP_INP_RLOCK, SCTP_INP_RUNLOCK, SCTP_LOC_3, SCTP_LOC_4, SCTP_LOC_5, SCTP_LTRACE_ERR_RET, SCTP_NORMAL_PROC, SCTP_OUTPUT_FROM_CLOSING, SCTP_OUTPUT_FROM_T3, SCTP_PCB_FLAGS_IN_TCPPOOL, SCTP_PCB_FLAGS_TCPTYPE, sctp_send_abort_tcb(), sctp_send_shutdown(), SCTP_SET_STATE, SCTP_SO_LOCKED, sctp_ss_functions::sctp_ss_is_user_msgs_incomplete, SCTP_STAT_DECR_GAUGE32, SCTP_STAT_INCR_COUNTER32, SCTP_STATE_ABOUT_TO_BE_FREED, SCTP_STATE_COOKIE_WAIT, 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_timer_start(), SCTP_TIMER_TYPE_SHUTDOWN, SCTP_TIMER_TYPE_SHUTDOWNGUARD, sctp_association::send_queue, sctp_association::sent_queue, sctp_association::ss_functions, sctp_association::state, and sctp_association::stream_queue_cnt.
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.
int sctp_flush | ( | struct socket * | so, |
int | how | ||
) |
Definition at line 817 of file sctp_usrreq.c.
References sctp_inpcb::inp, SCTP_FROM_SCTP_USRREQ, SCTP_INP_READ_LOCK, SCTP_INP_READ_UNLOCK, SCTP_INP_RLOCK, SCTP_INP_RUNLOCK, SCTP_INP_WLOCK, SCTP_INP_WUNLOCK, SCTP_LTRACE_ERR_RET, SCTP_PCB_FLAGS_SOCKET_CANT_READ, and SCTP_PCB_FLAGS_UDPTYPE.
int sctp_ingetaddr | ( | struct socket * | , |
struct sockaddr ** | |||
) |
int sctp_listen | ( | struct socket * | so, |
int | backlog, | ||
struct thread * | p | ||
) |
Definition at line 7097 of file sctp_usrreq.c.
References sctp_ifa::address, sctp_inpcb::def_vrf_id, sctp_laddr::ifa, sctp_inpcb::inp, sctp_sockstore::sa, sctp_inpcb::sctp_addr_list, SCTP_BASE_SYSCTL, sctp_inpcb::sctp_flags, SCTP_FROM_SCTP_USRREQ, SCTP_INP_DECR_REF, SCTP_INP_INFO_WLOCK, SCTP_INP_INFO_WUNLOCK, SCTP_INP_WLOCK, SCTP_INP_WUNLOCK, sctp_inpcb_bind_locked(), sctp_is_feature_on, SCTP_IS_LISTENING, SCTP_LOCK_LOGGING_ENABLE, sctp_log_lock(), SCTP_LOG_LOCK_SOCK, SCTP_LTRACE_ERR_RET, sctp_pcb_findep(), SCTP_PCB_FLAGS_ACCEPTING, SCTP_PCB_FLAGS_BOUND_V6, SCTP_PCB_FLAGS_BOUNDALL, 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_UDPTYPE, SCTP_PCB_FLAGS_UNBOUND, sctp_swap_inpcb_for_listen(), sctp_sockstore::sin, sctp_sockstore::sin6, and sockaddr_in::sin_port.
void sctp_notify | ( | struct sctp_inpcb * | , |
struct sctp_tcb * | , | ||
struct sctp_nets * | , | ||
uint8_t | , | ||
uint8_t | , | ||
uint16_t | , | ||
uint32_t | |||
) |
Definition at line 109 of file sctp_usrreq.c.
References sctp_tcb::asoc, sctp_tmit_chunk::asoc, sctp_tmit_chunk::book_size, CHUNK_FLAGS_FRAGMENT_OK, sctp_tmit_chunk::data, sctp_tmit_chunk::do_rtt, sctp_data_chunkrec::doing_fast_retransmit, sctp_tmit_chunk::flags, sctp_nets::flight_size, sctp_association::idata_supported, sctp_association::peer_auth_chunks, sctp_association::peer_hmac_id, sctp_tmit_chunk::rec, sctp_nets::rto_needed, sctp_auth_is_required_chunk, SCTP_BASE_SYSCTL, SCTP_DATA, SCTP_DATAGRAM_RESEND, sctp_tcb::sctp_ep, sctp_inpcb::sctp_flags, SCTP_FLIGHT_LOG_DOWN_PMTU, SCTP_FLIGHT_LOGGING_ENABLE, sctp_flight_size_decrease, sctp_get_auth_chunk_len(), SCTP_IDATA, SCTP_MIN_OVERHEAD, SCTP_MIN_V4_OVERHEAD, sctp_misc_ints(), SCTP_PCB_FLAGS_BOUND_V6, sctp_total_flight_decrease, sctp_ucount_incr, sctp_association::send_queue, sctp_tmit_chunk::send_size, sctp_tmit_chunk::sent, sctp_association::sent_queue, sctp_association::sent_queue_retran_cnt, sctp_association::smallest_mtu, sctp_data_chunkrec::tsn, and sctp_tmit_chunk::whoTo.
Referenced by sctp_add_remote_addr(), sctp_common_input_processing(), sctp_lowlevel_chunk_output(), and sctp_setopt().
int sctp_peeloff | ( | struct socket * | , |
struct socket * | , | ||
int | , | ||
caddr_t | , | ||
int * | |||
) |
int sctp_peeraddr | ( | struct socket * | , |
struct sockaddr ** | |||
) |
int sctp_shutdown | ( | struct socket * | so | ) |
Definition at line 866 of file sctp_usrreq.c.
References sctp_association::alternate, sctp_tcb::asoc, sctp_inpcb::inp, sctp_inpcb::last_abort_code, sctp_association::primary_destination, sctp_abort_an_association(), SCTP_ADD_SUBSTATE, sctp_inpcb::sctp_asoc_list, SCTP_CAUSE_USER_INITIATED_ABT, sctp_chunk_output(), sctp_tcb::sctp_ep, SCTP_FROM_SCTP_USRREQ, sctp_generate_cause(), SCTP_GET_STATE, SCTP_INP_RLOCK, SCTP_INP_RUNLOCK, SCTP_LOC_6, SCTP_LTRACE_ERR_RET, SCTP_OUTPUT_FROM_CLOSING, SCTP_PCB_FLAGS_IN_TCPPOOL, SCTP_PCB_FLAGS_TCPTYPE, sctp_send_shutdown(), SCTP_SET_STATE, SCTP_SO_LOCKED, sctp_ss_functions::sctp_ss_is_user_msgs_incomplete, SCTP_STAT_DECR_GAUGE32, SCTP_STATE_ABOUT_TO_BE_FREED, SCTP_STATE_COOKIE_ECHOED, SCTP_STATE_COOKIE_WAIT, SCTP_STATE_OPEN, SCTP_STATE_PARTIAL_MSG_LEFT, SCTP_STATE_SHUTDOWN_PENDING, SCTP_STATE_SHUTDOWN_SENT, sctp_stop_timers_for_shutdown(), SCTP_TCB_LOCK, SCTP_TCB_UNLOCK, sctp_timer_start(), SCTP_TIMER_TYPE_SHUTDOWN, SCTP_TIMER_TYPE_SHUTDOWNGUARD, sctp_association::send_queue, sctp_association::sent_queue, sctp_association::ss_functions, sctp_association::state, and sctp_association::stream_queue_cnt.
|
extern |