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_header.h>
#include <netinet/sctp_pcb.h>
#include <netinet/sctputil.h>
#include <netinet/sctp_output.h>
#include <netinet/sctp_uio.h>
#include <netinet/sctp_auth.h>
#include <netinet/sctp_timer.h>
#include <netinet/sctp_asconf.h>
#include <netinet/sctp_indata.h>
#include <netinet/sctp_bsd_addr.h>
#include <netinet/sctp_input.h>
#include <netinet/sctp_crc32.h>
#include <netinet/sctp_kdtrace.h>
#include <netinet/udp_var.h>
#include <machine/in_cksum.h>
Go to the source code of this file.
Data Structures | |
struct | sack_track |
Macros | |
#define | SCTP_MAX_GAPS_INARRAY 4 |
Functions | |
__FBSDID ("$FreeBSD$") | |
int | sctp_is_address_in_scope (struct sctp_ifa *ifa, struct sctp_scoping *scope, int do_update) |
static struct mbuf * | sctp_add_addr_to_mbuf (struct mbuf *m, struct sctp_ifa *ifa, uint16_t *len) |
struct mbuf * | sctp_add_addresses_to_i_ia (struct sctp_inpcb *inp, struct sctp_tcb *stcb, struct sctp_scoping *scope, struct mbuf *m_at, int cnt_inits_to, uint16_t *padding_len, uint16_t *chunk_len) |
static struct sctp_ifa * | sctp_is_ifa_addr_preferred (struct sctp_ifa *ifa, uint8_t dest_is_loop, uint8_t dest_is_priv, sa_family_t fam) |
static struct sctp_ifa * | sctp_is_ifa_addr_acceptable (struct sctp_ifa *ifa, uint8_t dest_is_loop, uint8_t dest_is_priv, sa_family_t fam) |
int | sctp_is_addr_restricted (struct sctp_tcb *stcb, struct sctp_ifa *ifa) |
int | sctp_is_addr_in_ep (struct sctp_inpcb *inp, struct sctp_ifa *ifa) |
static struct sctp_ifa * | sctp_choose_boundspecific_inp (struct sctp_inpcb *inp, sctp_route_t *ro, uint32_t vrf_id, int non_asoc_addr_ok, uint8_t dest_is_priv, uint8_t dest_is_loop, sa_family_t fam) |
static struct sctp_ifa * | sctp_choose_boundspecific_stcb (struct sctp_inpcb *inp, struct sctp_tcb *stcb, sctp_route_t *ro, uint32_t vrf_id, uint8_t dest_is_priv, uint8_t dest_is_loop, int non_asoc_addr_ok, sa_family_t fam) |
static struct sctp_ifa * | sctp_select_nth_preferred_addr_from_ifn_boundall (struct sctp_ifn *ifn, struct sctp_inpcb *inp, struct sctp_tcb *stcb, int non_asoc_addr_ok, uint8_t dest_is_loop, uint8_t dest_is_priv, int addr_wanted, sa_family_t fam, sctp_route_t *ro) |
static int | sctp_count_num_preferred_boundall (struct sctp_ifn *ifn, struct sctp_inpcb *inp, struct sctp_tcb *stcb, int non_asoc_addr_ok, uint8_t dest_is_loop, uint8_t dest_is_priv, sa_family_t fam) |
static struct sctp_ifa * | sctp_choose_boundall (struct sctp_inpcb *inp, struct sctp_tcb *stcb, struct sctp_nets *net, sctp_route_t *ro, uint32_t vrf_id, uint8_t dest_is_priv, uint8_t dest_is_loop, int non_asoc_addr_ok, sa_family_t fam) |
struct sctp_ifa * | sctp_source_address_selection (struct sctp_inpcb *inp, struct sctp_tcb *stcb, sctp_route_t *ro, struct sctp_nets *net, int non_asoc_addr_ok, uint32_t vrf_id) |
static int | sctp_find_cmsg (int c_type, void *data, struct mbuf *control, size_t cpsize) |
static int | sctp_process_cmsgs_for_init (struct sctp_tcb *stcb, struct mbuf *control, int *error) |
static struct mbuf * | sctp_add_cookie (struct mbuf *init, int init_offset, struct mbuf *initack, int initack_offset, struct sctp_state_cookie *stc_in, uint8_t **signature) |
static uint8_t | sctp_get_ect (struct sctp_tcb *stcb) |
static int | sctp_lowlevel_chunk_output (struct sctp_inpcb *inp, struct sctp_tcb *stcb, struct sctp_nets *net, struct sockaddr *to, struct mbuf *m, uint32_t auth_offset, struct sctp_auth_chunk *auth, uint16_t auth_keyid, int nofragment_flag, int ecn_ok, int out_of_asoc_ok, uint16_t src_port, uint16_t dest_port, uint32_t v_tag, uint16_t port, union sctp_sockstore *over_addr, uint8_t mflowtype, uint32_t mflowid, int so_locked) |
void | sctp_send_initiate (struct sctp_inpcb *inp, struct sctp_tcb *stcb, int so_locked) |
struct mbuf * | sctp_arethere_unrecognized_parameters (struct mbuf *in_initpkt, int param_offset, int *abort_processing, struct sctp_chunkhdr *cp, int *nat_friendly, int *cookie_found) |
static bool | sctp_are_there_new_addresses (struct sctp_association *asoc, struct mbuf *in_initpkt, int offset, int limit, struct sockaddr *src, struct mbuf **op_err) |
void | sctp_send_initiate_ack (struct sctp_inpcb *inp, struct sctp_tcb *stcb, struct sctp_nets *src_net, struct mbuf *init_pkt, int iphlen, int offset, struct sockaddr *src, struct sockaddr *dst, struct sctphdr *sh, struct sctp_init_chunk *init_chk, uint8_t mflowtype, uint32_t mflowid, uint32_t vrf_id, uint16_t port) |
static void | sctp_prune_prsctp (struct sctp_tcb *stcb, struct sctp_association *asoc, struct sctp_sndrcvinfo *srcv, int dataout) |
uint32_t | sctp_get_frag_point (struct sctp_tcb *stcb) |
static void | sctp_set_prsctp_policy (struct sctp_stream_queue_pending *sp) |
static int | sctp_msg_append (struct sctp_tcb *stcb, struct sctp_nets *net, struct mbuf *m, struct sctp_sndrcvinfo *srcv, int hold_stcb_lock) |
static struct mbuf * | sctp_copy_mbufchain (struct mbuf *clonechain, struct mbuf *outchain, struct mbuf **endofchain, int can_take_mbuf, int sizeofcpy, uint8_t copy_by_ref) |
static int | sctp_med_chunk_output (struct sctp_inpcb *inp, struct sctp_tcb *stcb, struct sctp_association *asoc, int *num_out, int *reason_code, int control_only, int from_where, struct timeval *now, int *now_filled, uint32_t frag_point, int so_locked) |
static void | sctp_sendall_iterator (struct sctp_inpcb *inp, struct sctp_tcb *stcb, void *ptr, uint32_t val SCTP_UNUSED) |
static void | sctp_sendall_completes (void *ptr, uint32_t val SCTP_UNUSED) |
static struct mbuf * | sctp_copy_out_all (struct uio *uio, ssize_t len) |
static int | sctp_sendall (struct sctp_inpcb *inp, struct uio *uio, struct mbuf *m, struct sctp_sndrcvinfo *srcv) |
void | sctp_toss_old_cookies (struct sctp_tcb *stcb, struct sctp_association *asoc) |
void | sctp_toss_old_asconf (struct sctp_tcb *stcb) |
static void | sctp_clean_up_datalist (struct sctp_tcb *stcb, struct sctp_association *asoc, struct sctp_tmit_chunk **data_list, int bundle_at, struct sctp_nets *net) |
static void | sctp_clean_up_ctl (struct sctp_tcb *stcb, struct sctp_association *asoc, int so_locked) |
static uint32_t | sctp_can_we_split_this (struct sctp_tcb *stcb, uint32_t length, uint32_t space_left, uint32_t frag_point, int eeor_on) |
static uint32_t | sctp_move_to_outqueue (struct sctp_tcb *stcb, struct sctp_nets *net, struct sctp_stream_out *strq, uint32_t space_left, uint32_t frag_point, int *giveup, int eeor_mode, int *bail, int so_locked) |
static void | sctp_fill_outqueue (struct sctp_tcb *stcb, struct sctp_nets *net, uint32_t frag_point, int eeor_mode, int *quit_now, int so_locked) |
void | sctp_fix_ecn_echo (struct sctp_association *asoc) |
void | sctp_move_chunks_from_net (struct sctp_tcb *stcb, struct sctp_nets *net) |
void | sctp_queue_op_err (struct sctp_tcb *stcb, struct mbuf *op_err) |
int | sctp_send_cookie_echo (struct mbuf *m, int offset, int limit, struct sctp_tcb *stcb, struct sctp_nets *net) |
void | sctp_send_heartbeat_ack (struct sctp_tcb *stcb, struct mbuf *m, int offset, int chk_length, struct sctp_nets *net) |
void | sctp_send_cookie_ack (struct sctp_tcb *stcb) |
void | sctp_send_shutdown_ack (struct sctp_tcb *stcb, struct sctp_nets *net) |
void | sctp_send_shutdown (struct sctp_tcb *stcb, struct sctp_nets *net) |
void | sctp_send_asconf (struct sctp_tcb *stcb, struct sctp_nets *net, int addr_locked) |
void | sctp_send_asconf_ack (struct sctp_tcb *stcb) |
static int | sctp_chunk_retransmission (struct sctp_inpcb *inp, struct sctp_tcb *stcb, struct sctp_association *asoc, int *cnt_out, struct timeval *now, int *now_filled, int *fr_done, int so_locked) |
static void | sctp_timer_validation (struct sctp_inpcb *inp, struct sctp_tcb *stcb, struct sctp_association *asoc) |
void | sctp_chunk_output (struct sctp_inpcb *inp, struct sctp_tcb *stcb, int from_where, int so_locked) |
int | sctp_output (struct sctp_inpcb *inp, struct mbuf *m, struct sockaddr *addr, struct mbuf *control, struct thread *p, int flags) |
void | send_forward_tsn (struct sctp_tcb *stcb, struct sctp_association *asoc) |
void | sctp_send_sack (struct sctp_tcb *stcb, int so_locked) |
void | sctp_send_abort_tcb (struct sctp_tcb *stcb, struct mbuf *operr, int so_locked) |
void | sctp_send_shutdown_complete (struct sctp_tcb *stcb, struct sctp_nets *net, int reflect_vtag) |
static void | sctp_send_resp_msg (struct sockaddr *src, struct sockaddr *dst, struct sctphdr *sh, uint32_t vtag, uint8_t type, struct mbuf *cause, uint8_t mflowtype, uint32_t mflowid, uint16_t fibnum, uint32_t vrf_id, uint16_t port) |
void | sctp_send_shutdown_complete2 (struct sockaddr *src, struct sockaddr *dst, struct sctphdr *sh, uint8_t mflowtype, uint32_t mflowid, uint16_t fibnum, uint32_t vrf_id, uint16_t port) |
void | sctp_send_hb (struct sctp_tcb *stcb, struct sctp_nets *net, int so_locked) |
void | sctp_send_ecn_echo (struct sctp_tcb *stcb, struct sctp_nets *net, uint32_t high_tsn) |
void | sctp_send_packet_dropped (struct sctp_tcb *stcb, struct sctp_nets *net, struct mbuf *m, int len, int iphlen, int bad_crc) |
void | sctp_send_cwr (struct sctp_tcb *stcb, struct sctp_nets *net, uint32_t high_tsn, uint8_t override) |
static int | sctp_add_stream_reset_out (struct sctp_tcb *stcb, struct sctp_tmit_chunk *chk, uint32_t seq, uint32_t resp_seq, uint32_t last_sent) |
static void | sctp_add_stream_reset_in (struct sctp_tmit_chunk *chk, int number_entries, uint16_t *list, uint32_t seq) |
static void | sctp_add_stream_reset_tsn (struct sctp_tmit_chunk *chk, uint32_t seq) |
void | sctp_add_stream_reset_result (struct sctp_tmit_chunk *chk, uint32_t resp_seq, uint32_t result) |
void | sctp_send_deferred_reset_response (struct sctp_tcb *stcb, struct sctp_stream_reset_list *ent, int response) |
void | sctp_add_stream_reset_result_tsn (struct sctp_tmit_chunk *chk, uint32_t resp_seq, uint32_t result, uint32_t send_una, uint32_t recv_next) |
static void | sctp_add_an_out_stream (struct sctp_tmit_chunk *chk, uint32_t seq, uint16_t adding) |
static void | sctp_add_an_in_stream (struct sctp_tmit_chunk *chk, uint32_t seq, uint16_t adding) |
int | sctp_send_stream_reset_out_if_possible (struct sctp_tcb *stcb, int so_locked) |
int | sctp_send_str_reset_req (struct sctp_tcb *stcb, uint16_t number_entries, uint16_t *list, uint8_t send_in_req, uint8_t send_tsn_req, uint8_t add_stream, uint16_t adding_o, uint16_t adding_i, uint8_t peer_asked) |
void | sctp_send_abort (struct mbuf *m, int iphlen, struct sockaddr *src, struct sockaddr *dst, struct sctphdr *sh, uint32_t vtag, struct mbuf *cause, uint8_t mflowtype, uint32_t mflowid, uint16_t fibnum, uint32_t vrf_id, uint16_t port) |
void | sctp_send_operr_to (struct sockaddr *src, struct sockaddr *dst, struct sctphdr *sh, uint32_t vtag, struct mbuf *cause, uint8_t mflowtype, uint32_t mflowid, uint16_t fibnum, uint32_t vrf_id, uint16_t port) |
static struct mbuf * | sctp_copy_resume (struct uio *uio, int max_send_len, int user_marks_eor, int *error, uint32_t *sndout, struct mbuf **new_tail) |
static int | sctp_copy_one (struct sctp_stream_queue_pending *sp, struct uio *uio, int resv_upfront) |
static struct sctp_stream_queue_pending * | sctp_copy_it_in (struct sctp_tcb *stcb, struct sctp_association *asoc, struct sctp_sndrcvinfo *srcv, struct uio *uio, struct sctp_nets *net, ssize_t max_send_len, int user_marks_eor, int *error) |
int | sctp_sosend (struct socket *so, struct sockaddr *addr, struct uio *uio, struct mbuf *top, struct mbuf *control, int flags, struct thread *p) |
int | sctp_lower_sosend (struct socket *so, struct sockaddr *addr, struct uio *uio, struct mbuf *i_pak, struct mbuf *control, int flags, struct sctp_sndrcvinfo *srcv, struct thread *p) |
struct mbuf * | sctp_add_auth_chunk (struct mbuf *m, struct mbuf **m_end, struct sctp_auth_chunk **auth_ret, uint32_t *offset, struct sctp_tcb *stcb, uint8_t chunk) |
int | sctp_v4src_match_nexthop (struct sctp_ifa *sifa, sctp_route_t *ro) |
Variables | |
const struct sack_track | sack_array [256] |
#define SCTP_MAX_GAPS_INARRAY 4 |
Definition at line 62 of file sctp_output.c.
__FBSDID | ( | "$FreeBSD$" | ) |
|
static |
Definition at line 1940 of file sctp_output.c.
References sctp_ipv4addr_param::addr, sctp_ipv6addr_param::addr, sctp_ifa::address, sctp_paramhdr::param_length, sctp_paramhdr::param_type, in_addr::s_addr, sctp_sockstore::sa, SCTP_BUF_AT, SCTP_BUF_LEN, SCTP_BUF_NEXT, sctp_get_mbuf_for_msg(), SCTP_IPV4_ADDRESS, SCTP_IPV6_ADDRESS, sctp_sockstore::sin, sctp_sockstore::sin6, and sockaddr_in::sin_addr.
Referenced by sctp_add_addresses_to_i_ia().
struct mbuf * sctp_add_addresses_to_i_ia | ( | struct sctp_inpcb * | inp, |
struct sctp_tcb * | stcb, | ||
struct sctp_scoping * | scope, | ||
struct mbuf * | m_at, | ||
int | cnt_inits_to, | ||
uint16_t * | padding_len, | ||
uint16_t * | chunk_len | ||
) |
Definition at line 2027 of file sctp_output.c.
References sctp_laddr::action, sctp_ifa::address, sctp_inpcb::def_vrf_id, sctp_laddr::ifa, sctp_ifn::ifalist, sctp_vrf::ifnlist, sctp_inpcb::inp, inpcb::inp_cred, sctp_inpcb::ip_inp, sctp_ifa::localifa_flags, sctp_scoping::loopback_scope, prison_check_ip4(), sctp_sockstore::sa, sctp_add_addr_to_mbuf(), sctp_inpcb::sctp_addr_list, SCTP_ADDRESS_LIMIT, SCTP_BEING_DELETED, SCTP_BUF_LEN, SCTP_COUNT_LIMIT, SCTP_DEL_IP_ADDRESS, sctp_find_vrf(), sctp_inpcb::sctp_flags, SCTP_IFN_IS_IFT_LOOP, SCTP_IPI_ADDR_RLOCK, SCTP_IPI_ADDR_RUNLOCK, sctp_is_addr_restricted(), sctp_is_address_in_scope(), SCTP_PCB_FLAGS_BOUNDALL, sctp_sockstore::sin, sctp_sockstore::sin6, sockaddr_in::sin_addr, sctp_vrf::total_ifa_count, sctp_ifn::vrf, and sctp_vrf::vrf_id.
Referenced by sctp_send_initiate(), and sctp_send_initiate_ack().
|
static |
Definition at line 11966 of file sctp_output.c.
References sctp_tmit_chunk::book_size, sctp_tmit_chunk::book_size_scale, sctp_chunkhdr::chunk_length, sctp_tmit_chunk::data, sctp_stream_reset_add_strm::number_of_streams, sctp_paramhdr::param_length, sctp_paramhdr::param_type, sctp_stream_reset_add_strm::ph, sctp_stream_reset_add_strm::request_seq, sctp_stream_reset_add_strm::reserved, SCTP_BUF_LEN, SCTP_SIZE32, SCTP_STR_RESET_ADD_IN_STREAMS, and sctp_tmit_chunk::send_size.
Referenced by sctp_send_str_reset_req().
|
static |
Definition at line 11933 of file sctp_output.c.
References sctp_tmit_chunk::book_size, sctp_tmit_chunk::book_size_scale, sctp_chunkhdr::chunk_length, sctp_tmit_chunk::data, sctp_stream_reset_add_strm::number_of_streams, sctp_paramhdr::param_length, sctp_paramhdr::param_type, sctp_stream_reset_add_strm::ph, sctp_stream_reset_add_strm::request_seq, sctp_stream_reset_add_strm::reserved, SCTP_BUF_LEN, SCTP_SIZE32, SCTP_STR_RESET_ADD_OUT_STREAMS, and sctp_tmit_chunk::send_size.
Referenced by sctp_send_str_reset_req().
struct mbuf * sctp_add_auth_chunk | ( | struct mbuf * | m, |
struct mbuf ** | m_end, | ||
struct sctp_auth_chunk ** | auth_ret, | ||
uint32_t * | offset, | ||
struct sctp_tcb * | stcb, | ||
uint8_t | chunk | ||
) |
Definition at line 13737 of file sctp_output.c.
References sctp_tcb::asoc, sctp_association::auth_supported, sctp_auth_chunk::ch, sctp_chunkhdr::chunk_flags, sctp_chunkhdr::chunk_length, sctp_chunkhdr::chunk_type, sctp_auth_chunk::hmac_id, sctp_association::peer_auth_chunks, sctp_association::peer_hmac_id, sctp_auth_is_required_chunk, SCTP_AUTHENTICATION, SCTP_BUF_LEN, SCTP_BUF_NEXT, SCTP_BUF_RESV_UF, sctp_copy_mbufchain(), sctp_get_hmac_digest_len(), sctp_get_mbuf_for_msg(), and SCTP_MIN_OVERHEAD.
Referenced by sctp_chunk_retransmission(), sctp_med_chunk_output(), and sctp_send_abort_tcb().
|
static |
Definition at line 3815 of file sctp_output.c.
References sctp_paramhdr::param_length, sctp_paramhdr::param_type, SCTP_BASE_SYSCTL, SCTP_BUF_LEN, SCTP_BUF_NEXT, sctp_get_mbuf_for_msg(), SCTP_M_COPYM, sctp_m_freem, SCTP_MBUF_ICOPY, SCTP_MBUF_LOGGING_ENABLE, SCTP_SIGNATURE_SIZE, and SCTP_STATE_COOKIE.
Referenced by sctp_send_initiate_ack().
|
static |
Definition at line 11741 of file sctp_output.c.
References sctp_tmit_chunk::book_size, sctp_tmit_chunk::book_size_scale, sctp_chunkhdr::chunk_length, sctp_tmit_chunk::data, sctp_stream_reset_in_request::list_of_streams, sctp_paramhdr::param_length, sctp_paramhdr::param_type, sctp_stream_reset_in_request::ph, sctp_stream_reset_in_request::request_seq, SCTP_BUF_LEN, SCTP_SIZE32, SCTP_STR_RESET_IN_REQUEST, and sctp_tmit_chunk::send_size.
Referenced by sctp_send_str_reset_req().
|
static |
Definition at line 11668 of file sctp_output.c.
References sctp_tcb::asoc, sctp_tmit_chunk::book_size, sctp_tmit_chunk::book_size_scale, sctp_chunkhdr::chunk_length, sctp_stream_out::chunks_on_queues, sctp_tmit_chunk::data, sctp_stream_reset_out_request::list_of_streams, sctp_stream_out::outqueue, sctp_paramhdr::param_length, sctp_paramhdr::param_type, sctp_stream_reset_out_request::ph, sctp_stream_reset_out_request::request_seq, sctp_stream_reset_out_request::response_seq, SCTP_BUF_LEN, SCTP_MAX_STREAMS_AT_ONCE_RESET, SCTP_SIZE32, SCTP_STR_RESET_OUT_REQUEST, SCTP_STREAM_RESET_IN_FLIGHT, SCTP_STREAM_RESET_PENDING, sctp_stream_reset_out_request::send_reset_at_tsn, sctp_tmit_chunk::send_size, sctp_stream_out::state, sctp_association::streamoutcnt, and sctp_association::strmout.
Referenced by sctp_send_str_reset_req(), and sctp_send_stream_reset_out_if_possible().
void sctp_add_stream_reset_result | ( | struct sctp_tmit_chunk * | chk, |
uint32_t | resp_seq, | ||
uint32_t | result | ||
) |
Definition at line 11810 of file sctp_output.c.
References sctp_tmit_chunk::book_size, sctp_tmit_chunk::book_size_scale, sctp_chunkhdr::chunk_length, sctp_tmit_chunk::data, sctp_paramhdr::param_length, sctp_paramhdr::param_type, sctp_stream_reset_response::ph, sctp_stream_reset_response::response_seq, sctp_stream_reset_response::result, SCTP_BUF_LEN, SCTP_SIZE32, SCTP_STR_RESET_RESPONSE, and sctp_tmit_chunk::send_size.
Referenced by sctp_handle_str_reset_add_out_strm(), sctp_handle_str_reset_add_strm(), sctp_handle_str_reset_request_in(), sctp_handle_str_reset_request_out(), sctp_handle_str_reset_request_tsn(), and sctp_send_deferred_reset_response().
void sctp_add_stream_reset_result_tsn | ( | struct sctp_tmit_chunk * | chk, |
uint32_t | resp_seq, | ||
uint32_t | result, | ||
uint32_t | send_una, | ||
uint32_t | recv_next | ||
) |
Definition at line 11901 of file sctp_output.c.
References sctp_tmit_chunk::book_size, sctp_tmit_chunk::book_size_scale, sctp_chunkhdr::chunk_length, sctp_tmit_chunk::data, sctp_paramhdr::param_length, sctp_paramhdr::param_type, sctp_stream_reset_response_tsn::ph, sctp_stream_reset_response_tsn::receivers_next_tsn, sctp_stream_reset_response_tsn::response_seq, sctp_stream_reset_response_tsn::result, SCTP_BUF_LEN, SCTP_SIZE32, SCTP_STR_RESET_RESPONSE, sctp_tmit_chunk::send_size, and sctp_stream_reset_response_tsn::senders_next_tsn.
Referenced by sctp_handle_str_reset_request_tsn().
|
static |
Definition at line 11782 of file sctp_output.c.
References sctp_tmit_chunk::book_size, sctp_tmit_chunk::book_size_scale, sctp_chunkhdr::chunk_length, sctp_tmit_chunk::data, sctp_paramhdr::param_length, sctp_paramhdr::param_type, sctp_stream_reset_tsn_request::ph, sctp_stream_reset_tsn_request::request_seq, SCTP_BUF_LEN, SCTP_SIZE32, SCTP_STR_RESET_TSN_REQUEST, and sctp_tmit_chunk::send_size.
Referenced by sctp_send_str_reset_req().
|
static |
Definition at line 5242 of file sctp_output.c.
References sctp_net_route::_l_addr, sctp_ipv4addr_param::addr, sctp_ipv6addr_param::addr, sctp_scoping::ipv4_addr_legal, sctp_scoping::ipv6_addr_legal, sctp_association::nets, sctp_paramhdr::param_length, sctp_paramhdr::param_type, sctp_nets::ro, in_addr::s_addr, sctp_association::scope, SCTP_BASE_SYSCTL, SCTP_CAUSE_PROTOCOL_VIOLATION, sctp_generate_cause(), sctp_get_next_param(), SCTP_IPV4_ADDRESS, SCTP_IPV6_ADDRESS, SCTP_SIZE32, sockaddr_in::sin_addr, sockaddr_in::sin_family, and sockaddr_in::sin_len.
Referenced by sctp_send_initiate_ack().
struct mbuf * sctp_arethere_unrecognized_parameters | ( | struct mbuf * | in_initpkt, |
int | param_offset, | ||
int * | abort_processing, | ||
struct sctp_chunkhdr * | cp, | ||
int * | nat_friendly, | ||
int * | cookie_found | ||
) |
Definition at line 4901 of file sctp_output.c.
References sctp_chunkhdr::chunk_length, sctp_gen_error_cause::code, sctp_gen_error_cause::length, sctp_paramhdr::param_length, sctp_paramhdr::param_type, SCTP_ADD_IP_ADDRESS, sctp_add_pad_tombuf(), SCTP_BUF_LEN, SCTP_BUF_NEXT, SCTP_BUF_RESV_UF, SCTP_CAUSE_PROTOCOL_VIOLATION, SCTP_CAUSE_UNRESOLVABLE_ADDR, SCTP_CHUNK_LIST, SCTP_COOKIE_PRESERVE, SCTP_DEBUG_OUTPUT1, SCTP_DEL_IP_ADDRESS, SCTP_ECN_CAPABLE, SCTP_ERROR_CAUSE_IND, sctp_get_mbuf_for_msg(), sctp_get_next_param(), SCTP_HAS_NAT_SUPPORT, SCTP_HEARTBEAT_INFO, SCTP_HOSTNAME_ADDRESS, SCTP_IPV4_ADDRESS, SCTP_IPV6_ADDRESS, SCTP_M_COPYM, sctp_m_freem, SCTP_MAX_ADDR_PARAMS_SIZE, SCTP_MAX_SUPPORTED_EXT, SCTP_MIN_OVERHEAD, SCTP_MIN_V4_OVERHEAD, SCTP_PRSCTP_SUPPORTED, SCTP_RANDOM, SCTP_RANDOM_MAX_SIZE, SCTP_SET_PRIM_ADDR, SCTP_SIZE32, SCTP_STATE_COOKIE, SCTP_SUCCESS_REPORT, SCTP_SUPPORTED_ADDRTYPE, SCTP_SUPPORTED_CHUNK_EXT, SCTP_ULP_ADAPTATION, SCTP_UNRECOG_PARAM, and SCTPDBG.
Referenced by sctp_process_init_ack(), and sctp_send_initiate_ack().
|
static |
Definition at line 7090 of file sctp_output.c.
References sctp_tcb::asoc, SCTP_BASE_SYSCTL, SCTP_SB_LIMIT_SND, sctp_tcb::sctp_socket, and sctp_association::total_flight.
Referenced by sctp_move_to_outqueue().
|
static |
Definition at line 2945 of file sctp_output.c.
References sctp_net_route::_l_addr, sctp_ifa::address, sctp_tcb::asoc, sctp_ifn::ifalist, sctp_ifn::ifn_name, sctp_vrf::ifnlist, IN4_ISPRIVATE_ADDRESS, sctp_nets::indx_of_eligible_next_to_use, sctp_inpcb::inp, inpcb::inp_cred, sctp_inpcb::ip_inp, sctp_scoping::ipv4_local_scope, sctp_ifa::localifa_flags, prison_check_ip4(), sctp_ifa::refcount, sctp_nets::ro, sctp_sockstore::sa, sctp_association::scope, sctp_add_local_addr_restricted(), SCTP_ADDR_DEFER_USE, sctp_count_num_preferred_boundall(), SCTP_DEBUG_OUTPUT2, sctp_find_ifn(), sctp_find_vrf(), SCTP_GET_IF_INDEX_FROM_ROUTE, SCTP_GET_IFN_VOID_FROM_ROUTE, SCTP_IFN_IS_IFT_LOOP, sctp_is_addr_pending(), sctp_is_addr_restricted(), sctp_is_address_in_scope(), sctp_is_ifa_addr_acceptable(), sctp_select_nth_preferred_addr_from_ifn_boundall(), SCTPDBG, SCTPDBG_ADDR, sctp_sockstore::sin, sctp_sockstore::sin6, sockaddr_in::sin_addr, sockaddr_in::sin_family, and sctp_vrf::vrf_id.
Referenced by sctp_source_address_selection().
|
static |
Definition at line 2450 of file sctp_output.c.
References sctp_laddr::action, sctp_ifa::address, sctp_laddr::ifa, sctp_ifn::ifalist, sctp_inpcb::inp, inpcb::inp_cred, sctp_inpcb::ip_inp, sctp_ifa::localifa_flags, sctp_inpcb::next_addr_touse, prison_check_ip4(), sctp_ifa::refcount, sctp_sockstore::sa, SCTP_ADDR_DEFER_USE, sctp_inpcb::sctp_addr_list, SCTP_DEL_IP_ADDRESS, sctp_find_ifn(), sctp_find_vrf(), SCTP_GET_IF_INDEX_FROM_ROUTE, SCTP_GET_IFN_VOID_FROM_ROUTE, sctp_is_addr_in_ep(), sctp_is_ifa_addr_acceptable(), sctp_is_ifa_addr_preferred(), sctp_sockstore::sin, sctp_sockstore::sin6, sockaddr_in::sin_addr, and sctp_vrf::vrf_id.
Referenced by sctp_source_address_selection().
|
static |
Definition at line 2582 of file sctp_output.c.
References sctp_laddr::action, sctp_ifa::address, sctp_tcb::asoc, sctp_laddr::ifa, sctp_ifn::ifalist, sctp_inpcb::inp, inpcb::inp_cred, sctp_inpcb::ip_inp, sctp_association::last_used_address, sctp_ifa::localifa_flags, prison_check_ip4(), sctp_ifa::refcount, sctp_sockstore::sa, SCTP_ADDR_DEFER_USE, sctp_inpcb::sctp_addr_list, SCTP_DEL_IP_ADDRESS, sctp_find_ifn(), sctp_find_vrf(), SCTP_GET_IF_INDEX_FROM_ROUTE, SCTP_GET_IFN_VOID_FROM_ROUTE, sctp_is_addr_in_ep(), sctp_is_addr_pending(), sctp_is_addr_restricted(), sctp_is_ifa_addr_acceptable(), sctp_is_ifa_addr_preferred(), sctp_sockstore::sin, sctp_sockstore::sin6, sockaddr_in::sin_addr, and sctp_vrf::vrf_id.
Referenced by sctp_source_address_selection().
void sctp_chunk_output | ( | struct sctp_inpcb * | inp, |
struct sctp_tcb * | stcb, | ||
int | from_where, | ||
int | so_locked | ||
) |
Definition at line 9960 of file sctp_output.c.
References sctp_association::asconf_send_queue, sctp_tcb::asoc, sctp_association::burst_limit_applied, sctp_association::cc_functions, sctp_association::control_send_queue, sctp_nets::cwnd, sctp_association::dack_timer, sctp_nets::dest_state, sctp_association::ecn_echo_cnt_onq, sctp_nets::fast_retran_ip, sctp_nets::flight_size, sctp_association::fr_max_burst, sctp_association::max_burst, sctp_nets::mtu, sctp_association::nets, sctp_association::primary_destination, sctp_nets::ref_count, SCTP_ADDR_REACHABLE, SCTP_BASE_SYSCTL, sctp_chunk_retransmission(), SCTP_CWND_LOGGING_ENABLE, sctp_cc_functions::sctp_cwnd_update_after_output, SCTP_DEBUG_OUTPUT1, SCTP_DEBUG_OUTPUT3, sctp_tcb::sctp_ep, sctp_fix_ecn_echo(), SCTP_FROM_SCTP_OUTPUT, sctp_get_frag_point(), sctp_is_feature_on, sctp_is_there_unsent_data(), SCTP_LOC_3, sctp_log_cwnd(), sctp_log_maxburst(), SCTP_LOG_MAXBURST_ENABLE, SCTP_MAX_BURST_APPLIED, SCTP_MAX_BURST_ERROR_STOP, sctp_med_chunk_output(), SCTP_MIN_OVERHEAD, sctp_move_chunks_from_net(), SCTP_OS_TIMER_PENDING, SCTP_OUTPUT_FROM_COOKIE_ACK, SCTP_OUTPUT_FROM_HB_TMR, SCTP_OUTPUT_FROM_T3, SCTP_OUTPUT_FROM_USR_SEND, SCTP_PCB_FLAGS_NODELAY, SCTP_RETRAN_EXIT, SCTP_SEND_NOW_COMPLETES, sctp_send_sack(), sctp_send_stream_reset_out_if_possible(), SCTP_STAT_INCR, SCTP_TCB_LOCK_ASSERT, sctp_timer_stop(), SCTP_TIMER_TYPE_RECV, sctp_timer_validation(), SCTPDBG, sctp_association::send_queue, sctp_association::sent_queue_retran_cnt, sctp_association::smallest_mtu, sctp_timer::timer, sctp_association::total_flight, sctp_association::total_output_queue_size, and sctp_association::trigger_reset.
Referenced by sctp_assoc_immediate_retrans(), sctp_audit_stream_queues_for_size(), sctp_autoclose_timer(), sctp_common_input_processing(), sctp_disconnect(), sctp_drain_mbufs(), sctp_handle_init(), sctp_inpcb_free(), sctp_iterator_work(), sctp_lower_sosend(), sctp_net_immediate_retrans(), sctp_process_control(), sctp_process_cookie_existing(), sctp_sendall_iterator(), sctp_setopt(), sctp_shutdown(), sctp_start_net_timers(), sctp_timeout_handler(), and sctp_user_rcvd().
|
static |
Definition at line 9413 of file sctp_output.c.
References sctp_net_route::_l_addr, sctp_authinformation::active_keyid, sctp_tcb::asoc, sctp_tmit_chunk::auth_keyid, sctp_association::authinfo, sctp_tmit_chunk::book_size, sctp_tmit_chunk::book_size_scale, CHUNK_FLAGS_FRAGMENT_OK, sctp_tmit_chunk::chunk_id, sctp_data_chunkrec::chunk_was_revoked, sctp_association::control_send_queue, sctp_tmit_chunk::copy_by_ref, sctp_nets::cwnd, sctp_tmit_chunk::data, sctp_data_chunkrec::doing_fast_retransmit, sctp_nets::fast_retran_ip, sctp_tmit_chunk::flags, sctp_nets::flight_size, chk_id::id, sctp_association::ifp_had_enobuf, sctp_association::last_acked_seq, sctp_nets::mtu, sctp_association::peer_auth_chunks, sctp_association::peer_hmac_id, sctp_association::peer_vtag, sctp_association::peers_rwnd, sctp_nets::port, sctp_tmit_chunk::rec, sctp_association::refcnt, sctp_nets::ro, sctp_tcb::rport, sctp_nets::rxt_timer, sctp_sockstore::sa, sctp_abort_an_association(), sctp_add_auth_chunk(), SCTP_ASCONF, sctp_auth_is_required_chunk, SCTP_BASE_SYSCTL, sctp_clean_up_ctl(), SCTP_COOKIE_ECHO, sctp_copy_mbufchain(), SCTP_CWND_LOG_FROM_RESEND, SCTP_CWND_LOGGING_ENABLE, SCTP_DATA, SCTP_DATAGRAM_RESEND, SCTP_DATAGRAM_SENT, SCTP_DEBUG_OUTPUT1, SCTP_DEBUG_OUTPUT3, SCTP_DECREASE_PEER_RWND, SCTP_DIAG_INFO_LEN, sctp_inpcb::sctp_ep, sctp_tcb::sctp_ep, SCTP_FLIGHT_LOG_UP_RSND, SCTP_FLIGHT_LOGGING_ENABLE, sctp_flight_size_increase, SCTP_FORWARD_CUM_TSN, SCTP_FROM_SCTP_OUTPUT, sctp_generate_cause(), sctp_get_auth_chunk_len(), SCTP_GET_STATE, SCTP_GETTIME_TIMEVAL, SCTP_LOC_2, sctp_log_cwnd(), sctp_log_rwnd(), SCTP_LOG_RWND_ENABLE, sctp_lowlevel_chunk_output(), SCTP_LTRACE_ERR_RET, SCTP_MAX_DATA_BUNDLING, SCTP_MIN_OVERHEAD, SCTP_MIN_V4_OVERHEAD, sctp_misc_ints(), SCTP_OS_TIMER_PENDING, SCTP_PRINTF, SCTP_RETRAN_DONE, SCTP_RETRAN_EXIT, sctp_sbspace_sub, SCTP_SNPRINTF, SCTP_STAT_INCR, SCTP_STAT_INCR_COUNTER64, SCTP_STATE_COOKIE_ECHOED, SCTP_STATE_COOKIE_WAIT, SCTP_STREAM_RESET, sctp_pcb::sctp_sws_sender, SCTP_TCB_LOCK, SCTP_TCB_LOCK_ASSERT, sctp_timer_start(), sctp_timer_stop(), SCTP_TIMER_TYPE_ASCONF, SCTP_TIMER_TYPE_COOKIE, SCTP_TIMER_TYPE_SEND, sctp_total_flight_increase, sctp_ucount_decr, SCTPDBG, sctp_tmit_chunk::send_size, sctp_tmit_chunk::sent, sctp_association::sent_queue, sctp_association::sent_queue_cnt, sctp_association::sent_queue_cnt_removeable, sctp_association::sent_queue_retran_cnt, sctp_tmit_chunk::sent_rcv_time, sctp_tmit_chunk::snd_count, sctp_association::str_reset, sctp_association::time_last_sent, sctp_timer::timer, sctp_association::total_flight, sctp_data_chunkrec::tsn, sctp_tmit_chunk::whoTo, sctp_nets::window_probe, and sctp_tmit_chunk::window_probe.
Referenced by sctp_chunk_output().
|
static |
Definition at line 7051 of file sctp_output.c.
References sctp_tmit_chunk::asoc, sctp_tmit_chunk::chunk_id, sctp_association::control_send_queue, sctp_association::ctrl_queue_cnt, sctp_tmit_chunk::data, sctp_association::fwd_tsn_cnt, chk_id::id, sctp_tmit_chunk::rec, SCTP_ASCONF_ACK, SCTP_COOKIE_ACK, SCTP_ECN_CWR, SCTP_FORWARD_CUM_TSN, sctp_free_a_chunk, SCTP_HEARTBEAT_ACK, SCTP_HEARTBEAT_REQUEST, sctp_m_freem, SCTP_NR_SELECTIVE_ACK, SCTP_OPERATION_ERROR, SCTP_PACKET_DROPPED, SCTP_SELECTIVE_ACK, SCTP_SHUTDOWN, SCTP_SHUTDOWN_ACK, SCTP_STREAM_RESET, and sctp_association::str_reset.
Referenced by sctp_chunk_retransmission(), and sctp_med_chunk_output().
|
static |
Definition at line 6959 of file sctp_output.c.
References sctp_tmit_chunk::asoc, sctp_tmit_chunk::book_size, sctp_association::cc_functions, sctp_data_chunkrec::chunk_was_revoked, sctp_nets::cwnd, sctp_data_chunkrec::cwnd_at_send, sctp_tmit_chunk::data, sctp_tmit_chunk::do_rtt, sctp_data_chunkrec::fast_retran_tsn, sctp_nets::flight_size, sctp_nets::last_sent_time, sctp_association::peers_rwnd, sctp_tmit_chunk::rec, sctp_nets::ref_count, SCTP_BASE_SYSCTL, sctp_cc_functions::sctp_cwnd_update_packet_transmitted, SCTP_DATAGRAM_SENT, SCTP_DECREASE_PEER_RWND, sctp_inpcb::sctp_ep, sctp_tcb::sctp_ep, SCTP_FLIGHT_LOG_UP, SCTP_FLIGHT_LOGGING_ENABLE, sctp_flight_size_increase, sctp_log_rwnd(), SCTP_LOG_RWND_ENABLE, sctp_misc_ints(), sctp_sbspace_sub, SCTP_STAT_INCR, sctp_pcb::sctp_sws_sender, sctp_total_flight_increase, SCTP_TSN_GT, sctp_association::send_queue, sctp_association::send_queue_cnt, sctp_tmit_chunk::send_size, sctp_tmit_chunk::sent, sctp_association::sent_queue, sctp_association::sent_queue_cnt, sctp_tmit_chunk::sent_rcv_time, sctp_tmit_chunk::snd_count, sctp_association::total_flight, sctp_data_chunkrec::tsn, and sctp_tmit_chunk::whoTo.
Referenced by sctp_med_chunk_output().
|
static |
Definition at line 12347 of file sctp_output.c.
References sctp_stream_queue_pending::act_flags, sctp_authinformation::active_keyid, sctp_tcb::asoc, sctp_stream_queue_pending::auth_keyid, sctp_association::authinfo, sctp_stream_queue_pending::context, sctp_stream_queue_pending::data, sctp_stream_queue_pending::fsn, sctp_stream_queue_pending::holds_key_ref, sctp_stream_queue_pending::length, sctp_stream_queue_pending::msg_is_complete, sctp_stream_queue_pending::net, sctp_association::peer_auth_chunks, sctp_stream_queue_pending::ppid, sctp_stream_queue_pending::put_last_out, sctp_nets::ref_count, SCTP_ADDR_OVER, sctp_alloc_a_strmoq, sctp_auth_is_required_chunk, sctp_auth_key_acquire(), sctp_copy_one(), SCTP_DATA, SCTP_DATA_CHUNK_OVERHEAD, SCTP_EOF, SCTP_EOR, sctp_free_a_strmoq, SCTP_FROM_SCTP_OUTPUT, SCTP_GET_STATE, SCTP_GETTIME_TIMEVAL, SCTP_LTRACE_ERR_RET, sctp_set_prsctp_policy(), SCTP_SO_LOCKED, SCTP_STATE_SHUTDOWN_ACK_SENT, SCTP_STATE_SHUTDOWN_PENDING, SCTP_STATE_SHUTDOWN_RECEIVED, SCTP_STATE_SHUTDOWN_SENT, sctp_stream_queue_pending::sender_all_done, sctp_stream_queue_pending::sid, sctp_sndrcvinfo::sinfo_context, sctp_stream_queue_pending::sinfo_flags, sctp_sndrcvinfo::sinfo_flags, sctp_sndrcvinfo::sinfo_keynumber, sctp_sndrcvinfo::sinfo_keynumber_valid, sctp_sndrcvinfo::sinfo_ppid, sctp_sndrcvinfo::sinfo_stream, sctp_sndrcvinfo::sinfo_timetolive, sctp_stream_queue_pending::some_taken, sctp_association::state, sctp_stream_queue_pending::tail_mbuf, sctp_stream_queue_pending::timetolive, and sctp_stream_queue_pending::ts.
Referenced by sctp_lower_sosend().
|
static |
Definition at line 6419 of file sctp_output.c.
References SCTP_BASE_SYSCTL, SCTP_BUF_LEN, SCTP_BUF_NEXT, SCTP_BUF_RESV_UF, SCTP_FIRST_MBUF_RESV, sctp_get_mbuf_for_msg(), SCTP_M_COPYM, sctp_m_freem, SCTP_MBUF_ICOPY, and SCTP_MBUF_LOGGING_ENABLE.
Referenced by sctp_add_auth_chunk(), sctp_chunk_retransmission(), and sctp_med_chunk_output().
|
static |
Definition at line 12331 of file sctp_output.c.
References sctp_stream_queue_pending::data, sctp_stream_queue_pending::length, SCTP_FROM_SCTP_OUTPUT, SCTP_LTRACE_ERR_RET, and sctp_stream_queue_pending::tail_mbuf.
Referenced by sctp_copy_it_in().
|
static |
Definition at line 6791 of file sctp_output.c.
References SCTP_BUF_LEN, SCTP_BUF_NEXT, SCTP_BUF_NEXT_PKT, sctp_get_mbuf_for_msg(), and sctp_m_freem.
Referenced by sctp_sendall().
|
static |
Definition at line 12309 of file sctp_output.c.
References SCTP_FROM_SCTP_OUTPUT, and SCTP_LTRACE_ERR_RET.
Referenced by sctp_lower_sosend().
|
static |
Definition at line 2887 of file sctp_output.c.
References sctp_tcb::asoc, sctp_ifa::ifa, sctp_ifn::ifalist, sctp_inpcb::inp, inpcb::inp_cred, sctp_inpcb::ip_inp, prison_check_ip4(), sctp_association::scope, SCTP_ADDR_DEFER_USE, sctp_is_addr_pending(), sctp_is_addr_restricted(), sctp_is_address_in_scope(), and sctp_is_ifa_addr_preferred().
Referenced by sctp_choose_boundall().
|
static |
Definition at line 7682 of file sctp_output.c.
References sctp_net_route::_l_addr, sctp_tcb::asoc, sctp_nets::mtu, sctp_association::primary_destination, sctp_nets::ro, sctp_sockstore::sa, sctp_association::sctp_cmt_on_off, SCTP_DATA_CHUNK_OVERHEAD, SCTP_MIN_OVERHEAD, SCTP_MIN_V4_OVERHEAD, sctp_move_to_outqueue(), sctp_ss_functions::sctp_ss_packet_done, sctp_ss_functions::sctp_ss_select_stream, SCTP_STAT_INCR, SCTP_TCB_LOCK_ASSERT, and sctp_association::ss_functions.
Referenced by sctp_med_chunk_output().
|
static |
Definition at line 3457 of file sctp_output.c.
References IPPROTO_SCTP, SCTP_AUTHINFO, SCTP_BUF_LEN, SCTP_PR_SCTP_NONE, SCTP_PRINFO, SCTP_SNDINFO, SCTP_SNDRCV, sctp_sndrcvinfo::sinfo_assoc_id, sctp_sndrcvinfo::sinfo_context, sctp_sndrcvinfo::sinfo_flags, sctp_sndrcvinfo::sinfo_keynumber, sctp_sndrcvinfo::sinfo_keynumber_valid, sctp_sndrcvinfo::sinfo_ppid, sctp_sndrcvinfo::sinfo_stream, and sctp_sndrcvinfo::sinfo_timetolive.
Referenced by sctp_sosend().
void sctp_fix_ecn_echo | ( | struct sctp_association * | asoc | ) |
Definition at line 7757 of file sctp_output.c.
References sctp_tmit_chunk::asoc, sctp_tmit_chunk::chunk_id, sctp_association::control_send_queue, chk_id::id, sctp_tmit_chunk::rec, SCTP_DATAGRAM_UNSENT, SCTP_ECN_ECHO, and sctp_tmit_chunk::sent.
Referenced by sctp_chunk_output(), and sctp_timeout_handler().
Definition at line 3900 of file sctp_output.c.
References sctp_tcb::asoc, sctp_association::ecn_supported, and SCTP_ECT0_BIT.
Referenced by sctp_lowlevel_chunk_output().
Definition at line 6219 of file sctp_output.c.
References sctp_tcb::asoc, sctp_association::idata_supported, sctp_association::peer_auth_chunks, sctp_association::peer_hmac_id, sctp_auth_is_required_chunk, SCTP_DATA, sctp_tcb::sctp_ep, sctp_inpcb::sctp_flags, sctp_association::sctp_frag_point, sctp_get_auth_chunk_len(), SCTP_IDATA, SCTP_MIN_OVERHEAD, SCTP_MIN_V4_OVERHEAD, SCTP_PCB_FLAGS_BOUND_V6, and sctp_association::smallest_mtu.
Referenced by sctp_chunk_output(), sctp_getopt(), sctp_lower_sosend(), and sctp_sendall_iterator().
int sctp_is_addr_in_ep | ( | struct sctp_inpcb * | inp, |
struct sctp_ifa * | ifa | ||
) |
Definition at line 2430 of file sctp_output.c.
References sctp_laddr::action, sctp_laddr::ifa, sctp_inpcb::sctp_addr_list, SCTP_DEBUG_OUTPUT1, and SCTPDBG.
Referenced by sctp_asconf_iterator_stcb(), sctp_choose_boundspecific_inp(), and sctp_choose_boundspecific_stcb().
Definition at line 2407 of file sctp_output.c.
References sctp_tcb::asoc, sctp_laddr::ifa, SCTP_DEBUG_OUTPUT1, sctp_association::sctp_restricted_addrs, and SCTPDBG.
Referenced by sctp_add_addresses_to_i_ia(), sctp_choose_boundall(), sctp_choose_boundspecific_stcb(), sctp_count_num_preferred_boundall(), sctp_does_stcb_own_this_addr(), sctp_fill_up_addresses_vrf(), sctp_find_valid_localaddr(), sctp_find_valid_localaddr_ep(), sctp_local_addr_count(), sctp_select_nth_preferred_addr_from_ifn_boundall(), sctp_setopt(), and sctp_sysctl_copy_out_local_addresses().
int sctp_is_address_in_scope | ( | struct sctp_ifa * | ifa, |
struct sctp_scoping * | scope, | ||
int | do_update | ||
) |
Definition at line 1867 of file sctp_output.c.
References sctp_ifa::address, sctp_ifa::ifn_p, IN4_ISPRIVATE_ADDRESS, sctp_scoping::ipv4_addr_legal, sctp_scoping::ipv4_local_scope, sctp_scoping::ipv6_addr_legal, sctp_ifa::localifa_flags, sctp_scoping::loopback_scope, in_addr::s_addr, sctp_sockstore::sa, SCTP_ADDR_IFA_UNUSEABLE, SCTP_IFN_IS_IFT_LOOP, sctp_sockstore::sin, sctp_sockstore::sin6, sockaddr_in::sin_addr, and sctp_scoping::site_scope.
Referenced by sctp_add_addresses_to_i_ia(), sctp_asconf_iterator_stcb(), sctp_choose_boundall(), sctp_count_num_preferred_boundall(), and sctp_select_nth_preferred_addr_from_ifn_boundall().
|
static |
Here we determine if its a acceptable address. A acceptable address means it is the same scope or higher scope but we can allow for NAT which means its ok to have a global dest and a private src.
Definition at line 2321 of file sctp_output.c.
References sctp_ifa::ifa, SCTP_ADDR_IFA_UNUSEABLE, SCTP_DEBUG_OUTPUT3, SCTPDBG, and SCTPDBG_ADDR.
Referenced by sctp_choose_boundall(), sctp_choose_boundspecific_inp(), and sctp_choose_boundspecific_stcb().
|
static |
Here we determine if its a preferred address. A preferred address means it is the same scope or higher scope then the destination.
Definition at line 2221 of file sctp_output.c.
References sctp_ifa::ifa, SCTP_ADDR_IFA_UNUSEABLE, SCTP_DEBUG_OUTPUT2, SCTP_DEBUG_OUTPUT3, SCTPDBG, and SCTPDBG_ADDR.
Referenced by sctp_choose_boundspecific_inp(), sctp_choose_boundspecific_stcb(), sctp_count_num_preferred_boundall(), and sctp_select_nth_preferred_addr_from_ifn_boundall().
int sctp_lower_sosend | ( | struct socket * | so, |
struct sockaddr * | addr, | ||
struct uio * | uio, | ||
struct mbuf * | i_pak, | ||
struct mbuf * | control, | ||
int | flags, | ||
struct sctp_sndrcvinfo * | srcv, | ||
struct thread * | p | ||
) |
Pre-screen address, if one is given the sin-len must be set correctly!
Definition at line 12489 of file sctp_output.c.
References sctp_association::alternate, sctp_tcb::asoc, sctp_tcb::block_entry, sctp_association::chunks_on_out_queue, sctp_association::control_send_queue, sctp_nets::cwnd, sctp_stream_queue_pending::data, sctp_inpcb::def_send, sctp_association::def_send, sctp_inpcb::def_vrf_id, sctp_block_entry::error, sctp_nets::flight_size, sctp_association::idata_supported, sctp_association::ifp_had_enobuf, sctp_inpcb::inp, INVALID_SINFO_FLAG, sctp_stream_out::last_msg_incomplete, sctp_stream_queue_pending::length, sctp_stream_queue_pending::msg_is_complete, sctp_nets::mtu, next, sctp_stream_out::outqueue, sctp_paramhdr::param_length, sctp_paramhdr::param_type, sctp_association::peers_rwnd, sctp_pcb::port, PR_SCTP_INVALID_POLICY, sctp_pcb::pre_open_stream_count, sctp_association::primary_destination, sctp_stream_queue_pending::processing, sctp_association::prsctp_supported, sctp_association::refcnt, sctp_tcb::rport, sctp_sockstore::sa, sctp_association::sb_send_resv, SCTP_ABORT, sctp_abort_an_association(), SCTP_ADD_SUBSTATE, SCTP_ADDR_OVER, SCTP_ALL_ASSOC, sctp_aloc_assoc_connected(), SCTP_ASOC_CREATE_LOCK, SCTP_ASOC_CREATE_UNLOCK, sctp_inpcb::sctp_asoc_list, SCTP_BASE_SYSCTL, SCTP_BLK_LOGGING_ENABLE, SCTP_BLOCK_LOG_INTO_BLK, SCTP_BLOCK_LOG_INTO_BLKA, SCTP_BLOCK_LOG_OUTOF_BLK, SCTP_BUF_LEN, SCTP_BUF_NEXT, SCTP_CAUSE_USER_INITIATED_ABT, sctp_chunk_output(), sctp_association::sctp_cmt_on_off, sctp_copy_it_in(), sctp_copy_resume(), SCTP_CWNDLOG_PRESEND, SCTP_DATA_CHUNK_OVERHEAD, SCTP_DEBUG_OUTPUT1, SCTP_DEFAULT_ADD_MORE, SCTP_DIAG_INFO_LEN, SCTP_EOF, SCTP_EOR, sctp_inpcb::sctp_ep, sctp_tcb::sctp_ep, sctp_feature_off, sctp_findassociation_ep_addr(), sctp_findassociation_ep_asocid(), sctp_findnet(), sctp_inpcb::sctp_flags, sctp_free_assoc(), SCTP_FROM_SCTP_OUTPUT, sctp_generate_cause(), sctp_get_frag_point(), sctp_get_mbuf_for_msg(), SCTP_GET_STATE, SCTP_GETTIME_TIMEVAL, SCTP_HEADER_LEN, SCTP_HEADER_TO_CHAIN, SCTP_INITIALIZE_AUTH_PARAMS, SCTP_INP_DECR_REF, SCTP_INP_INCR_REF, SCTP_INP_RLOCK, SCTP_INP_RUNLOCK, SCTP_INP_WLOCK, SCTP_INP_WUNLOCK, sctp_is_feature_off, sctp_is_feature_on, SCTP_IS_LISTENING, sctp_is_there_unsent_data(), SCTP_LOC_6, sctp_log_block(), sctp_log_nagle_event(), SCTP_LTRACE_ERR_RET, sctp_m_freem, SCTP_MAX_DATA_BUNDLING, sctp_med_chunk_output(), SCTP_MIN_OVERHEAD, sctp_misc_ints(), sctp_msg_append(), SCTP_NAGLE_APPLIED, SCTP_NAGLE_LOGGING_ENABLE, SCTP_NAGLE_SKIPPED, SCTP_NORMAL_PROC, SCTP_OUTPUT_FROM_USR_SEND, SCTP_PCB_FLAGS_BOUND_V6, SCTP_PCB_FLAGS_CONNECTED, SCTP_PCB_FLAGS_EXPLICIT_EOR, SCTP_PCB_FLAGS_IN_TCPPOOL, SCTP_PCB_FLAGS_NO_FRAGMENT, SCTP_PCB_FLAGS_NODELAY, SCTP_PCB_FLAGS_SOCKET_ALLGONE, SCTP_PCB_FLAGS_SOCKET_GONE, SCTP_PCB_FLAGS_TCPTYPE, SCTP_PRINTF, sctp_process_cmsgs_for_init(), sctp_prune_prsctp(), SCTP_RELEASE_PKT, SCTP_SACK_IMMEDIATELY, SCTP_SB_LIMIT_SND, sctp_send_initiate(), sctp_send_shutdown(), sctp_sendall(), SCTP_SENDALL, SCTP_SET_STATE, sctp_snd_sb_alloc, SCTP_SNPRINTF, SCTP_SO_IS_NBIO, SCTP_SO_LOCKED, sctp_tcb::sctp_socket, sctp_ss_functions::sctp_ss_add_to_stream, sctp_ss_functions::sctp_ss_is_user_msgs_incomplete, SCTP_STAT_DECR_GAUGE32, SCTP_STAT_INCR, 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_ACK_SENT, SCTP_STATE_SHUTDOWN_PENDING, SCTP_STATE_SHUTDOWN_RECEIVED, SCTP_STATE_SHUTDOWN_SENT, SCTP_STATE_WAS_ABORTED, sctp_stop_timers_for_shutdown(), SCTP_STREAM_OPEN, SCTP_STREAM_OPENING, SCTP_TCB_LOCK, SCTP_TCB_LOCK_ASSERT, SCTP_TCB_SEND_LOCK, SCTP_TCB_SEND_UNLOCK, SCTP_TCB_TRYLOCK, SCTP_TCB_UNLOCK, sctp_timer_start(), SCTP_TIMER_TYPE_SHUTDOWN, SCTP_TIMER_TYPE_SHUTDOWNGUARD, SCTP_UNORDERED, SCTPDBG, sctp_association::send_queue, sctp_stream_queue_pending::sender_all_done, sctp_association::sent_queue, sctp_association::sent_queue_cnt_removeable, sctp_sockstore::sin, sctp_sockstore::sin6, sockaddr_in::sin_len, sockaddr_in::sin_port, sctp_nonpad_sndrcvinfo::sinfo_assoc_id, sctp_sndrcvinfo::sinfo_assoc_id, sctp_stream_queue_pending::sinfo_flags, sctp_nonpad_sndrcvinfo::sinfo_flags, sctp_sndrcvinfo::sinfo_flags, sctp_sndrcvinfo::sinfo_stream, sctp_association::smallest_mtu, sctp_association::ss_functions, sctp_stream_out::state, sctp_association::state, sctp_association::stream_locked, sctp_association::stream_locked_on, sctp_association::stream_queue_cnt, sctp_association::streamoutcnt, sctp_association::strmout, sctp_stream_queue_pending::tail_mbuf, sctp_tcb::tcb_mtx, sctp_tcb::tcb_send_mtx, sctp_association::time_entered, sctp_association::total_flight, sctp_association::total_flight_count, sctp_association::total_output_queue_size, and sctp_tcb::total_sends.
Referenced by sctp_sosend(), sys_sctp_generic_sendmsg(), and sys_sctp_generic_sendmsg_iov().
|
static |
Given a mbuf chain (via SCTP_BUF_NEXT()) that holds a packet header WITH an SCTPHDR but no IP header, endpoint inp and sa structure:
Definition at line 3956 of file sctp_output.c.
References sctp_net_route::_l_addr, sctp_net_route::_s_addr, sctp_ifa::address, sctp_tcb::asoc, sctphdr::checksum, sctp_inpcb::def_vrf_id, sctp_pcb::default_dscp, sctp_association::default_dscp, sctphdr::dest_port, sctp_nets::dest_state, sctp_nets::dscp, sctp_inpcb::fibnum, sctp_nets::flowid, sctp_nets::flowtype, in_pseudo(), sctp_inpcb::inp, inpcb::inp_ip_tos, inpcb::inp_ip_ttl, ip6_hdr::ip6_dst, ip6_hdr::ip6_src, IP_DF, ip::ip_dst, ip_fillid(), ip::ip_hl, sctp_inpcb::ip_inp, ip::ip_len, ip::ip_off, ip::ip_p, ip::ip_sum, ip::ip_tos, ip::ip_ttl, ip::ip_v, IPPROTO_SCTP, IPPROTO_UDP, IPVERSION, sctp_ifa::localifa_flags, MODULE_GLOBAL, sctp_nets::mtu, sctp_nets::port, sctp_nets::ro, in_addr::s_addr, sctp_sockstore::sa, SCTP_ADDR_IFA_UNUSEABLE, SCTP_ADDR_NO_PMTUD, SCTP_ADDR_OUT_OF_SCOPE, SCTP_ALIGN_TO_END, SCTP_ATTACH_CHAIN, SCTP_BASE_SYSCTL, SCTP_BEING_DELETED, SCTP_BUF_LEN, SCTP_BUF_NEXT, sctp_calculate_cksum(), sctp_calculate_len(), SCTP_DEBUG_OUTPUT1, SCTP_DEBUG_OUTPUT3, SCTP_ENABLE_UDP_CSUM, sctp_inpcb::sctp_ep, sctp_fill_hmac_digest_m(), sctp_free_ifa(), SCTP_FROM_SCTP_OUTPUT, SCTP_GATHER_MTU_FROM_ROUTE, sctp_get_ect(), SCTP_GET_HEADER_FOR_OUTPUT, SCTP_GET_HLIM, SCTP_GET_IFN_VOID_FROM_ROUTE, sctp_get_mbuf_for_msg(), SCTP_IP6_OUTPUT, SCTP_IP_OUTPUT, SCTP_LAST_PACKET_TRACING, SCTP_LTRACE_ERR_RET, SCTP_LTRACE_ERR_RET_PKT, sctp_m_freem, SCTP_MIN_OVERHEAD, SCTP_MIN_V4_OVERHEAD, sctp_pathmtu_adjustment(), SCTP_PROBE5, SCTP_RTALLOC, sctp_source_address_selection(), SCTP_STAT_INCR, SCTP_STAT_INCR_COUNTER64, SCTPDBG, SCTPDBG_ADDR, sctp_sockstore::sin, sctp_sockstore::sin6, sockaddr_in::sin_addr, sctp_association::smallest_mtu, sctp_nets::src_addr_selected, sctphdr::src_port, UDPSTAT_INC, udphdr::uh_dport, udphdr::uh_sport, udphdr::uh_sum, udphdr::uh_ulen, sctphdr::v_tag, V_udp_cksum, sctp_ifa::vrf_id, and sctp_association::vrf_id.
Referenced by sctp_chunk_retransmission(), sctp_med_chunk_output(), sctp_send_abort_tcb(), sctp_send_initiate(), sctp_send_initiate_ack(), and sctp_send_shutdown_complete().
|
static |
Ok this is the generic chunk service queue. we must do the following:
Definition at line 7797 of file sctp_output.c.
References sctp_net_route::_l_addr, sctp_authinformation::active_keyid, sctp_association::alternate, sctp_association::asconf_send_queue, sctp_tcb::asoc, sctp_tmit_chunk::auth_keyid, sctp_association::authinfo, chk_id::can_take_data, sctp_association::cc_functions, sctp_data_chunk::ch, sctp_chunkhdr::chunk_flags, CHUNK_FLAGS_FRAGMENT_OK, sctp_tmit_chunk::chunk_id, sctp_association::control_send_queue, cookie, sctp_tmit_chunk::copy_by_ref, sctp_association::ctrl_queue_cnt, sctp_nets::cwnd, sctp_association::dack_timer, sctp_tmit_chunk::data, sctp_nets::dest_state, sctp_tmit_chunk::do_rtt, sctp_association::ecn_echo_cnt_onq, sctp_tmit_chunk::flags, sctp_nets::flight_size, chk_id::id, sctp_association::ifp_had_enobuf, sctp_association::last_net_cmt_send_started, sctp_nets::last_sent_time, sctp_nets::mtu, sctp_association::nets, sctp_association::numnets, sctp_association::peer_auth_chunks, sctp_association::peer_hmac_id, sctp_association::peer_vtag, sctp_association::peers_rwnd, sctp_nets::port, sctp_association::primary_destination, sctp_data_chunkrec::rcv_flags, sctp_tmit_chunk::rec, sctp_nets::ref_count, sctp_nets::ro, sctp_tcb::rport, sctp_nets::rto_needed, sctp_nets::rxt_timer, sctp_sockstore::sa, sctp_add_auth_chunk(), SCTP_ADDR_PF, SCTP_ADDR_REACHABLE, SCTP_ADDR_UNCONFIRMED, SCTP_ASCONF, SCTP_ASCONF_ACK, sctp_auth_is_required_chunk, SCTP_BASE_SYSCTL, sctp_clean_up_ctl(), sctp_clean_up_datalist(), sctp_association::sctp_cmt_on_off, SCTP_COOKIE_ACK, SCTP_COOKIE_ECHO, sctp_copy_mbufchain(), SCTP_CWND_LOG_FILL_OUTQ_CALLED, SCTP_CWND_LOG_FROM_SEND, SCTP_CWND_LOGGING_ENABLE, sctp_cc_functions::sctp_cwnd_new_transmission_begins, SCTP_DATA, SCTP_DATA_FIRST_FRAG, SCTP_DATA_LAST_FRAG, SCTP_DATA_SACK_IMMEDIATELY, SCTP_DATA_UNORDERED, SCTP_DATAGRAM_RESEND, SCTP_DATAGRAM_SENT, SCTP_DATAGRAM_UNSENT, SCTP_DEBUG_OUTPUT3, SCTP_ECN_CWR, SCTP_ECN_ECHO, sctp_fill_outqueue(), SCTP_FROM_SCTP_OUTPUT, sctp_get_auth_chunk_len(), SCTP_GET_STATE, SCTP_GETTIME_TIMEVAL, SCTP_HEARTBEAT_ACK, SCTP_HEARTBEAT_REQUEST, sctp_is_feature_on, sctp_is_there_unsent_data(), SCTP_LOC_1, sctp_log_cwnd(), sctp_lowlevel_chunk_output(), SCTP_LTRACE_ERR_RET, SCTP_MAX_DATA_BUNDLING, SCTP_MIN_OVERHEAD, SCTP_MIN_V4_OVERHEAD, sctp_move_chunks_from_net(), SCTP_NR_SELECTIVE_ACK, SCTP_OPERATION_ERROR, SCTP_OS_TIMER_PENDING, SCTP_PACKET_DROPPED, SCTP_PCB_FLAGS_EXPLICIT_EOR, SCTP_PRINTF, SCTP_RECV_BUFFER_SPLITTING, SCTP_SB_LIMIT_SND, SCTP_SELECTIVE_ACK, SCTP_SEND_BUFFER_SPLITTING, SCTP_SHUTDOWN, SCTP_SHUTDOWN_ACK, sctp_tcb::sctp_socket, sctp_ss_functions::sctp_ss_is_empty, SCTP_STAT_INCR, SCTP_STAT_INCR_BY, SCTP_STAT_INCR_COUNTER64, SCTP_STATE_OPEN, SCTP_STATE_SHUTDOWN_PENDING, SCTP_STATE_SHUTDOWN_RECEIVED, SCTP_TCB_LOCK_ASSERT, sctp_timer_start(), sctp_timer_stop(), SCTP_TIMER_TYPE_ASCONF, SCTP_TIMER_TYPE_COOKIE, SCTP_TIMER_TYPE_RECV, SCTP_TIMER_TYPE_SEND, SCTPDBG, sctp_association::send_queue, sctp_tmit_chunk::send_size, sctp_tmit_chunk::sent, sctp_tmit_chunk::snd_count, sctp_association::ss_functions, sctp_association::state, sctp_association::time_last_sent, sctp_timer::timer, sctp_association::total_flight, sctp_data_chunkrec::tsn, sctp_tmit_chunk::whoTo, sctp_nets::window_probe, and sctp_tmit_chunk::window_probe.
Referenced by sctp_chunk_output(), sctp_lower_sosend(), and sctp_sendall_iterator().
Definition at line 7769 of file sctp_output.c.
References sctp_tcb::asoc, sctp_stream_queue_pending::net, next, sctp_stream_out::outqueue, sctp_free_remote_addr, sctp_association::send_queue, sctp_association::streamoutcnt, sctp_association::strmout, and sctp_tmit_chunk::whoTo.
Referenced by sctp_asconf_timer(), sctp_chunk_output(), sctp_handle_heartbeat_ack(), sctp_med_chunk_output(), sctp_process_asconf_set_primary(), sctp_strreset_timer(), sctp_t1init_timer(), and sctp_t3rxt_timer().
|
static |
Definition at line 7149 of file sctp_output.c.
References sctp_stream_queue_pending::act_flags, sctp_tcb::asoc, sctp_tmit_chunk::asoc, sctp_tmit_chunk::auth_keyid, sctp_stream_queue_pending::auth_keyid, sctp_tmit_chunk::book_size, sctp_tmit_chunk::book_size_scale, sctp_data_chunk::ch, sctp_idata_chunk::ch, sctp_chunkhdr::chunk_flags, sctp_chunkhdr::chunk_length, sctp_chunkhdr::chunk_type, sctp_association::chunks_on_out_queue, sctp_stream_out::chunks_on_queues, sctp_data_chunkrec::context, sctp_stream_queue_pending::context, sctp_tmit_chunk::copy_by_ref, sctp_tmit_chunk::data, sctp_stream_queue_pending::data, sctp_stream_queue_pending::discard_rest, sctp_data_chunkrec::doing_fast_retransmit, sctp_data_chunk::dp, sctp_idata_chunk::dp, sctp_tmit_chunk::flags, sctp_idata::fsn, sctp_stream_queue_pending::fsn, sctp_tmit_chunk::holds_key_ref, sctp_stream_queue_pending::holds_key_ref, sctp_association::idata_supported, sctp_tmit_chunk::last_mbuf, sctp_stream_out::last_msg_incomplete, sctp_stream_queue_pending::length, sctp_idata::mid, sctp_data_chunkrec::mid, sctp_stream_queue_pending::msg_is_complete, sctp_stream_queue_pending::net, next, sctp_stream_out::next_mid_ordered, sctp_stream_out::next_mid_unordered, sctp_tmit_chunk::no_fr_allowed, sctp_stream_out::outqueue, sctp_tmit_chunk::pad_inplace, sctp_data::ppid, sctp_idata::ppid, sctp_data_chunkrec::ppid, sctp_stream_queue_pending::ppid, sctp_idata::ppid_fsn, sctp_association::pr_sctp_cnt, PR_SCTP_ENABLED, sctp_stream_queue_pending::put_last_out, sctp_data_chunkrec::rcv_flags, sctp_tmit_chunk::rec, sctp_nets::ref_count, sctp_idata::reserved, sctp_alloc_a_chunk, sctp_auth_key_acquire(), SCTP_BASE_SYSCTL, SCTP_BUF_IS_EXTENDED, SCTP_BUF_LEN, SCTP_BUF_NEXT, SCTP_BUF_PREPEND, sctp_can_we_split_this(), SCTP_DATA, SCTP_DATA_CHUNK_OVERHEAD, SCTP_DATA_FIRST_FRAG, SCTP_DATA_LAST_FRAG, SCTP_DATA_NOT_FRAG, SCTP_DATA_SACK_IMMEDIATELY, SCTP_DATA_UNORDERED, SCTP_DATAGRAM_UNSENT, SCTP_EOF, sctp_tcb::sctp_ep, sctp_inpcb::sctp_flags, sctp_free_a_chunk, sctp_free_a_strmoq, sctp_free_remote_addr, sctp_get_mbuf_for_msg(), SCTP_IDATA, sctp_is_feature_on, SCTP_LOG_AT_SEND_2_OUTQ, SCTP_M_COPYM, sctp_m_free, sctp_m_freem, SCTP_MBUF_ICOPY, SCTP_MBUF_LOGGING_ENABLE, sctp_misc_ints(), sctp_pad_lastmbuf(), SCTP_PCB_FLAGS_EXPLICIT_EOR, SCTP_PCB_FLAGS_IN_TCPPOOL, SCTP_PCB_FLAGS_TCPTYPE, SCTP_PRINTF, SCTP_SACK_IMMEDIATELY, SCTP_SIZE32, sctp_snd_sb_alloc, sctp_tcb::sctp_socket, sctp_ss_functions::sctp_ss_remove_from_stream, sctp_ss_functions::sctp_ss_scheduled, SCTP_STREAM_RESET_PENDING, SCTP_STRMOUT_LOG_SEND, SCTP_TCB_LOCK_ASSERT, SCTP_TCB_SEND_LOCK, SCTP_TCB_SEND_UNLOCK, SCTP_TSN_LOG_SIZE, SCTP_UNORDERED, sctp_association::send_queue, sctp_association::send_queue_cnt, sctp_tmit_chunk::send_size, sctp_stream_queue_pending::sender_all_done, sctp_association::sending_seq, sctp_tmit_chunk::sent, sctp_data::sid, sctp_idata::sid, sctp_data_chunkrec::sid, sctp_stream_queue_pending::sid, sctp_stream_out::sid, sctp_stream_queue_pending::sinfo_flags, sctp_stream_queue_pending::some_taken, sctp_association::ss_functions, sctp_data::ssn, sctp_stream_out::state, sctp_association::stream_queue_cnt, sctp_stream_queue_pending::tail_mbuf, sctp_data_chunkrec::timetodrop, sctp_association::total_output_queue_size, sctp_association::trigger_reset, sctp_stream_queue_pending::ts, sctp_data::tsn, sctp_idata::tsn, sctp_data_chunkrec::tsn, and sctp_tmit_chunk::whoTo.
Referenced by sctp_fill_outqueue().
|
static |
Definition at line 6318 of file sctp_output.c.
References sctp_authinformation::active_keyid, sctp_tcb::asoc, sctp_stream_queue_pending::auth_keyid, sctp_association::authinfo, sctp_stream_queue_pending::context, sctp_stream_queue_pending::data, sctp_stream_queue_pending::fsn, sctp_stream_queue_pending::holds_key_ref, sctp_stream_queue_pending::length, sctp_stream_queue_pending::msg_is_complete, sctp_stream_queue_pending::net, next, sctp_stream_out::outqueue, sctp_association::peer_auth_chunks, sctp_stream_queue_pending::ppid, sctp_nets::ref_count, SCTP_ADDR_OVER, sctp_alloc_a_strmoq, sctp_auth_is_required_chunk, sctp_auth_key_acquire(), SCTP_BUF_LEN, SCTP_BUF_NEXT, SCTP_DATA, SCTP_FROM_SCTP_OUTPUT, SCTP_GET_STATE, SCTP_GETTIME_TIMEVAL, SCTP_LTRACE_ERR_RET, SCTP_LTRACE_ERR_RET_PKT, sctp_m_freem, sctp_set_prsctp_policy(), sctp_snd_sb_alloc, sctp_ss_functions::sctp_ss_add_to_stream, SCTP_STATE_SHUTDOWN_ACK_SENT, SCTP_STATE_SHUTDOWN_PENDING, SCTP_STATE_SHUTDOWN_RECEIVED, SCTP_STATE_SHUTDOWN_SENT, SCTP_TCB_SEND_LOCK, SCTP_TCB_SEND_UNLOCK, sctp_stream_queue_pending::sender_all_done, sctp_stream_queue_pending::sid, sctp_sndrcvinfo::sinfo_context, sctp_stream_queue_pending::sinfo_flags, sctp_sndrcvinfo::sinfo_flags, sctp_sndrcvinfo::sinfo_keynumber, sctp_sndrcvinfo::sinfo_keynumber_valid, sctp_sndrcvinfo::sinfo_ppid, sctp_sndrcvinfo::sinfo_stream, sctp_sndrcvinfo::sinfo_timetolive, sctp_stream_queue_pending::some_taken, sctp_association::ss_functions, sctp_association::state, sctp_association::stream_locked, sctp_association::stream_locked_on, sctp_association::stream_queue_cnt, sctp_association::streamoutcnt, sctp_association::strmout, sctp_stream_queue_pending::tail_mbuf, sctp_stream_queue_pending::timetolive, and sctp_stream_queue_pending::ts.
Referenced by sctp_lower_sosend(), and sctp_sendall_iterator().
int sctp_output | ( | struct sctp_inpcb * | inp, |
struct mbuf * | m, | ||
struct sockaddr * | addr, | ||
struct mbuf * | control, | ||
struct thread * | p, | ||
int | flags | ||
) |
Definition at line 10237 of file sctp_output.c.
References SCTP_FROM_SCTP_OUTPUT, SCTP_LTRACE_ERR_RET_PKT, sctp_inpcb::sctp_socket, and sctp_sosend().
Referenced by sctp_sendm().
|
static |
Definition at line 3558 of file sctp_output.c.
References sctp_stream_out::abandoned_sent, sctp_stream_out::abandoned_unsent, sctp_tcb::asoc, sctp_stream_out::chunks_on_queues, INADDR_ANY, INADDR_BROADCAST, sctp_association::initial_init_rto_max, IPPROTO_SCTP, sctp_stream_out::last_msg_incomplete, sctp_association::max_inbound_streams, sctp_association::max_init_times, sctp_stream_out::next_mid_ordered, sctp_stream_out::next_mid_unordered, sctp_stream_out::outqueue, sctp_association::port, sctp_association::pre_open_streams, sctp_tcb::rport, in_addr::s_addr, sctp_add_remote_addr(), SCTP_ADDR_IS_CONFIRMED, SCTP_BUF_LEN, SCTP_DEBUG_OUTPUT1, SCTP_DONOT_SETSCOPE, SCTP_DSTADDRV4, SCTP_DSTADDRV6, SCTP_FREE, SCTP_INIT, SCTP_MALLOC, SCTP_PR_SCTP_MAX, sctp_ss_functions::sctp_ss_init_stream, SCTP_STREAM_OPENING, SCTP_TCB_LOCK, SCTP_TCB_UNLOCK, SCTPDBG, sctp_stream_out::sid, sockaddr_in::sin_addr, sockaddr_in::sin_family, sockaddr_in::sin_len, sockaddr_in::sin_port, sctp_association::ss_functions, sctp_stream_out::state, sctp_association::streamoutcnt, sctp_association::strm_realoutsize, and sctp_association::strmout.
Referenced by sctp_lower_sosend().
|
static |
Definition at line 6138 of file sctp_output.c.
References sctp_tmit_chunk::asoc, sctp_tmit_chunk::data, sctp_tmit_chunk::flags, PR_SCTP_BUF_ENABLED, sctp_association::prsctp_supported, sctp_tmit_chunk::rec, SCTP_DATAGRAM_UNSENT, sctp_release_pr_sctp_chunk(), SCTP_SO_LOCKED, SCTP_TCB_LOCK_ASSERT, sctp_association::send_queue, sctp_tmit_chunk::sent, sctp_association::sent_queue, sctp_association::sent_queue_cnt_removeable, sctp_sndrcvinfo::sinfo_timetolive, and sctp_data_chunkrec::timetodrop.
Referenced by sctp_lower_sosend().
void sctp_queue_op_err | ( | struct sctp_tcb * | stcb, |
struct mbuf * | op_err | ||
) |
Definition at line 8909 of file sctp_output.c.
References sctp_tcb::asoc, sctp_tmit_chunk::asoc, chk_id::can_take_data, sctp_chunkhdr::chunk_flags, sctp_tmit_chunk::chunk_id, sctp_chunkhdr::chunk_length, sctp_chunkhdr::chunk_type, sctp_association::control_send_queue, sctp_tmit_chunk::copy_by_ref, sctp_association::ctrl_queue_cnt, sctp_tmit_chunk::data, sctp_tmit_chunk::flags, chk_id::id, sctp_tmit_chunk::rec, sctp_add_pad_tombuf(), sctp_alloc_a_chunk, SCTP_BUF_LEN, SCTP_BUF_NEXT, SCTP_BUF_PREPEND, SCTP_DATAGRAM_UNSENT, sctp_m_freem, SCTP_MAX_CHUNK_LENGTH, SCTP_OPERATION_ERROR, SCTP_TCB_LOCK_ASSERT, sctp_tmit_chunk::send_size, sctp_tmit_chunk::sent, sctp_tmit_chunk::snd_count, and sctp_tmit_chunk::whoTo.
Referenced by sctp_handle_auth(), sctp_process_a_data_chunk(), sctp_process_control(), sctp_process_data(), and sctp_process_init_ack().
|
static |
Definition at line 2769 of file sctp_output.c.
References sctp_ifa::address, sctp_tcb::asoc, sctp_ifa::ifa, sctp_ifn::ifalist, sctp_inpcb::inp, inpcb::inp_cred, sctp_inpcb::ip_inp, sctp_ifa::localifa_flags, prison_check_ip4(), sctp_sockstore::sa, sctp_association::scope, SCTP_ADDR_DEFER_USE, sctp_tcb::sctp_ep, sctp_is_addr_pending(), sctp_is_addr_restricted(), sctp_is_address_in_scope(), sctp_is_ifa_addr_preferred(), sctp_is_mobility_feature_on, SCTP_MOBILITY_BASE, sctp_v4src_match_nexthop(), sctp_v6src_match_nexthop(), sctp_sockstore::sin, sctp_sockstore::sin6, sockaddr_in::sin_addr, sctp_ifa::src_is_loop, and sctp_ifa::src_is_priv.
Referenced by sctp_choose_boundall().
void sctp_send_abort | ( | struct mbuf * | m, |
int | iphlen, | ||
struct sockaddr * | src, | ||
struct sockaddr * | dst, | ||
struct sctphdr * | sh, | ||
uint32_t | vtag, | ||
struct mbuf * | cause, | ||
uint8_t | mflowtype, | ||
uint32_t | mflowid, | ||
uint16_t | fibnum, | ||
uint32_t | vrf_id, | ||
uint16_t | port | ||
) |
Definition at line 12279 of file sctp_output.c.
References SCTP_ABORT_ASSOCIATION, sctp_is_there_an_abort_here(), sctp_m_freem, and sctp_send_resp_msg().
Referenced by sctp_abort_association(), sctp_common_input_processing(), sctp_handle_init(), sctp_handle_ootb(), sctp_process_control(), sctp_process_cookie_existing(), and sctp_send_initiate_ack().
void sctp_send_abort_tcb | ( | struct sctp_tcb * | stcb, |
struct mbuf * | operr, | ||
int | so_locked | ||
) |
Definition at line 10871 of file sctp_output.c.
References sctp_net_route::_l_addr, sctp_authinformation::active_keyid, sctp_association::alternate, sctp_tcb::asoc, sctp_association::authinfo, sctp_abort_chunk::ch, sctp_chunkhdr::chunk_flags, sctp_chunkhdr::chunk_length, sctp_chunkhdr::chunk_type, sctp_association::ifp_had_enobuf, sctp_association::my_vtag, sctp_association::peer_auth_chunks, sctp_association::peer_vtag, sctp_nets::port, sctp_association::primary_destination, sctp_nets::ro, sctp_tcb::rport, SCTP_ABORT_ASSOCIATION, sctp_add_auth_chunk(), sctp_add_pad_tombuf(), sctp_auth_is_required_chunk, SCTP_BUF_LEN, SCTP_BUF_NEXT, SCTP_BUF_RESV_UF, SCTP_DEBUG_OUTPUT3, sctp_tcb::sctp_ep, sctp_get_mbuf_for_msg(), SCTP_HAD_NO_TCB, sctp_lowlevel_chunk_output(), sctp_m_freem, SCTP_MIN_OVERHEAD, SCTP_SIZE32, SCTP_STAT_INCR, SCTP_STAT_INCR_COUNTER64, SCTP_TCB_LOCK_ASSERT, and SCTPDBG.
Referenced by sctp_abort_an_association(), sctp_disconnect(), and sctp_inpcb_free().
Definition at line 9271 of file sctp_output.c.
References sctp_association::asconf_send_queue, sctp_tcb::asoc, sctp_tmit_chunk::asoc, chk_id::can_take_data, CHUNK_FLAGS_FRAGMENT_OK, sctp_tmit_chunk::chunk_id, sctp_tmit_chunk::copy_by_ref, sctp_association::ctrl_queue_cnt, sctp_tmit_chunk::data, sctp_tmit_chunk::flags, chk_id::id, sctp_tmit_chunk::rec, sctp_nets::ref_count, sctp_alloc_a_chunk, SCTP_ASCONF, sctp_compose_asconf(), SCTP_DATAGRAM_UNSENT, sctp_tcb::sctp_ep, sctp_is_feature_on, sctp_m_freem, SCTP_PCB_FLAGS_MULTIPLE_ASCONFS, SCTP_TCB_LOCK_ASSERT, sctp_tmit_chunk::send_size, sctp_tmit_chunk::sent, sctp_tmit_chunk::snd_count, and sctp_tmit_chunk::whoTo.
Referenced by sctp_addr_mgmt_assoc(), sctp_asconf_iterator_stcb(), sctp_asconf_send_nat_state_update(), sctp_asconf_timer(), sctp_handle_asconf_ack(), sctp_handle_cookie_ack(), sctp_process_initack_addresses(), and sctp_set_primary_ip_address_sa().
void sctp_send_asconf_ack | ( | struct sctp_tcb * | stcb | ) |
Definition at line 9321 of file sctp_output.c.
References sctp_association::alternate, sctp_association::asconf_ack_sent, sctp_tcb::asoc, sctp_tmit_chunk::asoc, chk_id::can_take_data, CHUNK_FLAGS_FRAGMENT_OK, sctp_tmit_chunk::chunk_id, sctp_association::control_send_queue, sctp_tmit_chunk::copy_by_ref, sctp_association::ctrl_queue_cnt, sctp_tmit_chunk::data, sctp_asconf_ack::data, sctp_tmit_chunk::flags, chk_id::id, sctp_association::last_control_chunk_from, sctp_asconf_ack::last_sent_to, sctp_asconf_ack::len, next, sctp_association::primary_destination, sctp_tmit_chunk::rec, sctp_nets::ref_count, sctp_alloc_a_chunk, SCTP_ASCONF_ACK, SCTP_BASE_SYSCTL, SCTP_DATAGRAM_UNSENT, sctp_find_alternate_net(), SCTP_M_COPYM, sctp_m_freem, SCTP_MBUF_ICOPY, SCTP_MBUF_LOGGING_ENABLE, SCTP_TCB_LOCK_ASSERT, sctp_tmit_chunk::send_size, sctp_tmit_chunk::sent, sctp_tmit_chunk::snd_count, and sctp_tmit_chunk::whoTo.
Referenced by process_chunk_drop(), and sctp_process_control().
void sctp_send_cookie_ack | ( | struct sctp_tcb * | stcb | ) |
Definition at line 9116 of file sctp_output.c.
References sctp_tcb::asoc, sctp_tmit_chunk::asoc, chk_id::can_take_data, sctp_chunkhdr::chunk_flags, sctp_tmit_chunk::chunk_id, sctp_chunkhdr::chunk_length, sctp_chunkhdr::chunk_type, sctp_association::control_send_queue, sctp_tmit_chunk::copy_by_ref, sctp_association::ctrl_queue_cnt, sctp_tmit_chunk::data, sctp_tmit_chunk::flags, chk_id::id, sctp_association::last_control_chunk_from, sctp_tmit_chunk::rec, sctp_nets::ref_count, sctp_alloc_a_chunk, SCTP_BUF_LEN, SCTP_BUF_RESV_UF, SCTP_COOKIE_ACK, SCTP_DATAGRAM_UNSENT, sctp_get_mbuf_for_msg(), sctp_m_freem, SCTP_MIN_OVERHEAD, SCTP_TCB_LOCK_ASSERT, sctp_tmit_chunk::send_size, sctp_tmit_chunk::sent, sctp_tmit_chunk::snd_count, and sctp_tmit_chunk::whoTo.
Referenced by process_chunk_drop(), sctp_process_cookie_existing(), and sctp_process_cookie_new().
int sctp_send_cookie_echo | ( | struct mbuf * | m, |
int | offset, | ||
int | limit, | ||
struct sctp_tcb * | stcb, | ||
struct sctp_nets * | net | ||
) |
Definition at line 8973 of file sctp_output.c.
References sctp_tcb::asoc, sctp_tmit_chunk::asoc, chk_id::can_take_data, sctp_chunkhdr::chunk_flags, CHUNK_FLAGS_FRAGMENT_OK, sctp_tmit_chunk::chunk_id, sctp_chunkhdr::chunk_type, sctp_association::control_send_queue, cookie, sctp_tmit_chunk::copy_by_ref, sctp_association::ctrl_queue_cnt, sctp_tmit_chunk::data, sctp_tmit_chunk::flags, chk_id::id, sctp_paramhdr::param_length, sctp_paramhdr::param_type, sctp_tmit_chunk::rec, sctp_nets::ref_count, sctp_alloc_a_chunk, SCTP_BASE_SYSCTL, SCTP_COOKIE_ECHO, SCTP_DATAGRAM_UNSENT, sctp_get_next_param(), SCTP_M_COPYM, sctp_m_freem, SCTP_MBUF_ICOPY, SCTP_MBUF_LOGGING_ENABLE, sctp_pad_lastmbuf(), SCTP_SIZE32, SCTP_STATE_COOKIE, SCTP_TCB_LOCK_ASSERT, sctp_tmit_chunk::send_size, sctp_tmit_chunk::sent, sctp_tmit_chunk::snd_count, and sctp_tmit_chunk::whoTo.
Referenced by sctp_process_init_ack().
void sctp_send_cwr | ( | struct sctp_tcb * | stcb, |
struct sctp_nets * | net, | ||
uint32_t | high_tsn, | ||
uint8_t | override | ||
) |
Definition at line 11606 of file sctp_output.c.
References sctp_tcb::asoc, sctp_tmit_chunk::asoc, chk_id::can_take_data, sctp_cwr_chunk::ch, sctp_chunkhdr::chunk_flags, sctp_tmit_chunk::chunk_id, sctp_chunkhdr::chunk_length, sctp_chunkhdr::chunk_type, sctp_association::control_send_queue, sctp_tmit_chunk::copy_by_ref, sctp_association::ctrl_queue_cnt, sctp_tmit_chunk::data, sctp_tmit_chunk::flags, chk_id::id, sctp_tmit_chunk::rec, sctp_nets::ref_count, sctp_alloc_a_chunk, SCTP_BUF_LEN, SCTP_BUF_RESV_UF, SCTP_CWR_REDUCE_OVERRIDE, SCTP_DATAGRAM_UNSENT, SCTP_ECN_CWR, sctp_free_a_chunk, sctp_get_mbuf_for_msg(), SCTP_MIN_OVERHEAD, SCTP_SO_NOT_LOCKED, SCTP_TCB_LOCK_ASSERT, SCTP_TSN_GT, sctp_tmit_chunk::send_size, sctp_tmit_chunk::sent, sctp_tmit_chunk::snd_count, sctp_cwr_chunk::tsn, and sctp_tmit_chunk::whoTo.
Referenced by sctp_handle_ecn_echo().
void sctp_send_deferred_reset_response | ( | struct sctp_tcb * | stcb, |
struct sctp_stream_reset_list * | ent, | ||
int | response | ||
) |
Definition at line 11839 of file sctp_output.c.
References sctp_association::alternate, sctp_tcb::asoc, sctp_tmit_chunk::asoc, sctp_tmit_chunk::book_size, sctp_tmit_chunk::book_size_scale, chk_id::can_take_data, sctp_chunkhdr::chunk_flags, sctp_tmit_chunk::chunk_id, sctp_chunkhdr::chunk_length, sctp_chunkhdr::chunk_type, sctp_association::control_send_queue, sctp_tmit_chunk::copy_by_ref, sctp_association::ctrl_queue_cnt, sctp_tmit_chunk::data, sctp_tmit_chunk::flags, chk_id::id, sctp_association::last_reset_action, sctp_association::primary_destination, sctp_tmit_chunk::rec, sctp_nets::ref_count, sctp_add_stream_reset_result(), sctp_alloc_a_chunk, SCTP_BUF_LEN, SCTP_BUF_RESV_UF, SCTP_DATAGRAM_UNSENT, sctp_free_a_chunk, SCTP_FROM_SCTP_OUTPUT, sctp_get_mbuf_for_msg(), SCTP_LTRACE_ERR_RET, SCTP_MIN_OVERHEAD, SCTP_SIZE32, SCTP_SO_LOCKED, SCTP_STREAM_RESET, sctp_tmit_chunk::send_size, sctp_tmit_chunk::sent, sctp_stream_reset_list::seq, sctp_tmit_chunk::snd_count, sctp_association::stream_reset_outstanding, and sctp_tmit_chunk::whoTo.
Referenced by sctp_process_a_data_chunk().
Definition at line 11392 of file sctp_output.c.
References sctp_tcb::asoc, sctp_tmit_chunk::asoc, chk_id::can_take_data, sctp_ecne_chunk::ch, sctp_chunkhdr::chunk_flags, sctp_tmit_chunk::chunk_id, sctp_chunkhdr::chunk_length, sctp_chunkhdr::chunk_type, sctp_association::control_send_queue, sctp_tmit_chunk::copy_by_ref, sctp_association::ctrl_queue_cnt, sctp_tmit_chunk::data, sctp_association::ecn_echo_cnt_onq, sctp_tmit_chunk::flags, chk_id::id, sctp_ecne_chunk::num_pkts_since_cwr, sctp_tmit_chunk::rec, sctp_nets::ref_count, sctp_alloc_a_chunk, SCTP_BUF_LEN, SCTP_BUF_RESV_UF, SCTP_DATAGRAM_UNSENT, SCTP_ECN_ECHO, sctp_free_a_chunk, sctp_get_mbuf_for_msg(), SCTP_MIN_OVERHEAD, SCTP_SO_NOT_LOCKED, SCTP_STAT_INCR, SCTP_TCB_LOCK_ASSERT, SCTP_TSN_GT, sctp_tmit_chunk::send_size, sctp_tmit_chunk::sent, sctp_tmit_chunk::snd_count, sctp_ecne_chunk::tsn, and sctp_tmit_chunk::whoTo.
Referenced by sctp_common_input_processing().
Definition at line 11287 of file sctp_output.c.
References sctp_net_route::_l_addr, sctp_heartbeat_info_param::addr_family, sctp_heartbeat_info_param::addr_len, sctp_heartbeat_info_param::address, sctp_tcb::asoc, sctp_tmit_chunk::asoc, chk_id::can_take_data, sctp_heartbeat_chunk::ch, sctp_chunkhdr::chunk_flags, sctp_tmit_chunk::chunk_id, sctp_chunkhdr::chunk_length, sctp_chunkhdr::chunk_type, sctp_association::control_send_queue, sctp_tmit_chunk::copy_by_ref, sctp_association::ctrl_queue_cnt, sctp_tmit_chunk::data, sctp_nets::dest_state, sctp_tmit_chunk::flags, sctp_heartbeat::hb_info, sctp_nets::hb_responded, sctp_heartbeat_chunk::heartbeat, sctp_nets::heartbeat_random1, sctp_nets::heartbeat_random2, chk_id::id, sctp_paramhdr::param_length, sctp_paramhdr::param_type, sctp_heartbeat_info_param::ph, sctp_heartbeat_info_param::random_value1, sctp_heartbeat_info_param::random_value2, sctp_tmit_chunk::rec, sctp_nets::ref_count, sctp_nets::ro, sctp_sockstore::sa, SCTP_ADDR_UNCONFIRMED, sctp_alloc_a_chunk, SCTP_BUF_LEN, SCTP_BUF_RESV_UF, SCTP_DATAGRAM_UNSENT, SCTP_DEBUG_OUTPUT4, sctp_inpcb::sctp_ep, sctp_tcb::sctp_ep, sctp_free_a_chunk, sctp_get_mbuf_for_msg(), SCTP_GETTIME_TIMEVAL, SCTP_HEARTBEAT_INFO, SCTP_HEARTBEAT_REQUEST, sctp_m_freem, SCTP_MIN_OVERHEAD, sctp_select_initial_TSN(), SCTP_STAT_INCR, SCTP_TCB_LOCK_ASSERT, SCTPDBG, sctp_tmit_chunk::send_size, sctp_tmit_chunk::sent, sctp_sockstore::sin, sctp_sockstore::sin6, sockaddr_in::sin_addr, sctp_tmit_chunk::snd_count, sctp_heartbeat_info_param::time_value_1, sctp_heartbeat_info_param::time_value_2, and sctp_tmit_chunk::whoTo.
Referenced by process_chunk_drop(), sctp_heartbeat_timer(), sctp_process_asconf_add_ip(), sctp_setopt(), sctp_start_net_timers(), sctp_t3rxt_timer(), and sctp_threshold_management().
void sctp_send_heartbeat_ack | ( | struct sctp_tcb * | stcb, |
struct mbuf * | m, | ||
int | offset, | ||
int | chk_length, | ||
struct sctp_nets * | net | ||
) |
Definition at line 9061 of file sctp_output.c.
References sctp_tcb::asoc, sctp_tmit_chunk::asoc, chk_id::can_take_data, sctp_chunkhdr::chunk_flags, sctp_tmit_chunk::chunk_id, sctp_chunkhdr::chunk_type, sctp_association::control_send_queue, sctp_tmit_chunk::copy_by_ref, sctp_association::ctrl_queue_cnt, sctp_tmit_chunk::data, sctp_tmit_chunk::flags, chk_id::id, sctp_tmit_chunk::rec, sctp_nets::ref_count, sctp_alloc_a_chunk, SCTP_BASE_SYSCTL, SCTP_DATAGRAM_UNSENT, SCTP_HEARTBEAT_ACK, SCTP_M_COPYM, sctp_m_freem, SCTP_MBUF_ICOPY, SCTP_MBUF_LOGGING_ENABLE, sctp_pad_lastmbuf(), sctp_tmit_chunk::send_size, sctp_tmit_chunk::sent, sctp_tmit_chunk::snd_count, and sctp_tmit_chunk::whoTo.
Referenced by sctp_process_control().
void sctp_send_initiate | ( | struct sctp_inpcb * | inp, |
struct sctp_tcb * | stcb, | ||
int | so_locked | ||
) |
Definition at line 4615 of file sctp_output.c.
References sctp_net_route::_l_addr, sctp_init::a_rwnd, sctp_pcb::adaptation_layer_indicator, sctp_pcb::adaptation_layer_indicator_provided, sctp_supported_addr_param::addr_type, sctp_association::asconf_supported, sctp_tcb::asoc, sctp_association::auth_supported, sctp_association::authinfo, sctp_init_chunk::ch, sctp_chunkhdr::chunk_flags, sctp_chunkhdr::chunk_length, sctp_chunkhdr::chunk_type, sctp_supported_chunk_types_param::chunk_types, sctp_auth_chunk_list::chunk_types, sctp_association::cookie_preserve_req, sctp_nets::dest_state, sctp_association::ecn_supported, sctp_auth_hmac_algo::hmac_ids, sctp_association::idata_supported, sctp_association::ifp_had_enobuf, sctp_adaptation_layer_indication::indication, sctp_init_chunk::init, sctp_association::init_seq_number, sctp_init::initial_tsn, sctp_init::initiate_tag, sctp_scoping::ipv4_addr_legal, sctp_scoping::ipv6_addr_legal, sctp_key::key, sctp_nets::last_sent_time, sctp_association::local_auth_chunks, sctp_association::local_hmacs, sctp_association::max_inbound_streams, sctp_association::my_vtag, sctp_association::nets, sctp_association::nrsack_supported, sctp_hmaclist::num_algo, sctp_init::num_inbound_streams, sctp_init::num_outbound_streams, sctp_paramhdr::param_length, sctp_paramhdr::param_type, sctp_cookie_perserve_param::ph, sctp_supported_addr_param::ph, sctp_supported_chunk_types_param::ph, sctp_adaptation_layer_indication::ph, sctp_auth_chunk_list::ph, sctp_auth_hmac_algo::ph, sctp_association::pktdrop_supported, sctp_nets::port, sctp_association::pre_open_streams, sctp_association::primary_destination, sctp_association::prsctp_supported, sctp_authinformation::random, sctp_authinformation::random_len, sctp_association::reconfig_supported, sctp_nets::ro, sctp_tcb::rport, sctp_nets::rxt_timer, sctp_sockstore::sa, sctp_association::scope, sctp_add_addresses_to_i_ia(), sctp_add_pad_tombuf(), SCTP_ASCONF, SCTP_ASCONF_ACK, sctp_auth_get_chklist_size(), SCTP_AUTHENTICATION, SCTP_BASE_SYSCTL, SCTP_BUF_LEN, SCTP_CHUNK_LIST, SCTP_COOKIE_PRESERVE, SCTP_DEBUG_OUTPUT4, SCTP_ECN_CAPABLE, sctp_inpcb::sctp_ep, SCTP_FORWARD_CUM_TSN, sctp_get_mbuf_for_msg(), SCTP_GETTIME_TIMEVAL, SCTP_HAS_NAT_SUPPORT, SCTP_HMAC_LIST, SCTP_IDATA, SCTP_IFORWARD_CUM_TSN, SCTP_INITIATION, SCTP_IPV4_ADDRESS, SCTP_IPV6_ADDRESS, sctp_lowlevel_chunk_output(), sctp_m_freem, SCTP_MINIMAL_RWND, SCTP_NR_SELECTIVE_ACK, SCTP_OS_TIMER_PENDING, SCTP_PACKET_DROPPED, SCTP_PRSCTP_SUPPORTED, SCTP_SB_LIMIT_RCV, sctp_serialize_auth_chunks(), sctp_serialize_hmaclist(), sctp_set_primary_addr(), SCTP_SIZE32, sctp_inpcb::sctp_socket, SCTP_STAT_INCR, SCTP_STAT_INCR_COUNTER64, SCTP_STREAM_RESET, SCTP_SUPPORTED_ADDRTYPE, SCTP_SUPPORTED_CHUNK_EXT, sctp_timer_start(), SCTP_TIMER_TYPE_INIT, SCTP_ULP_ADAPTATION, SCTPDBG, sctp_sockstore::sin6, sctp_cookie_perserve_param::time, and sctp_timer::timer.
Referenced by process_chunk_drop(), sctp_do_connect_x(), sctp_handle_error(), sctp_handle_nat_colliding_state(), sctp_lower_sosend(), sctp_setopt(), and sctp_t1init_timer().
void sctp_send_initiate_ack | ( | struct sctp_inpcb * | inp, |
struct sctp_tcb * | stcb, | ||
struct sctp_nets * | src_net, | ||
struct mbuf * | init_pkt, | ||
int | iphlen, | ||
int | offset, | ||
struct sockaddr * | src, | ||
struct sockaddr * | dst, | ||
struct sctphdr * | sh, | ||
struct sctp_init_chunk * | init_chk, | ||
uint8_t | mflowtype, | ||
uint32_t | mflowid, | ||
uint32_t | vrf_id, | ||
uint16_t | port | ||
) |
Definition at line 5457 of file sctp_output.c.
References sctp_net_route::_l_addr, sctp_net_route::_s_addr, sctp_pcb::adaptation_layer_indicator, sctp_pcb::adaptation_layer_indicator_provided, sctp_state_cookie::addr_type, sctp_state_cookie::address, sctp_ifa::address, sctp_inpcb::asconf_supported, sctp_association::asconf_supported, sctp_tcb::asoc, sctp_inpcb::auth_supported, sctp_association::auth_supported, sctp_init_chunk::ch, sctp_chunkhdr::chunk_length, sctp_supported_chunk_types_param::chunk_types, sctp_auth_chunk_list::chunk_types, sctp_state_cookie::cookie_life, sctp_association::cookie_life, sctp_pcb::current_secret_number, sctp_pcb::def_cookie_life, sctphdr::dest_port, sctp_inpcb::ecn_supported, sctp_association::ecn_supported, sctp_inpcb::fibnum, sctp_auth_hmac_algo::hmac_ids, sctp_inpcb::idata_supported, sctp_association::idata_supported, sctp_state_cookie::identification, sctp_association::ifp_had_enobuf, IN4_ISPRIVATE_ADDRESS, sctp_adaptation_layer_indication::indication, sctp_init_chunk::init, sctp_association::init_seq_number, sctp_init::initiate_tag, sctp_state_cookie::ipv4_addr_legal, sctp_scoping::ipv4_addr_legal, sctp_scoping::ipv4_local_scope, sctp_state_cookie::ipv4_scope, sctp_state_cookie::ipv6_addr_legal, sctp_scoping::ipv6_addr_legal, sctp_state_cookie::laddr_type, sctp_state_cookie::laddress, sctp_pcb::local_auth_chunks, sctp_pcb::local_hmacs, sctp_state_cookie::local_scope, sctp_scoping::local_scope, sctp_state_cookie::loopback_scope, sctp_scoping::loopback_scope, sctp_pcb::max_open_streams_intome, sctp_state_cookie::my_vtag, sctp_association::my_vtag, sctp_association::my_vtag_nonce, sctp_state_cookie::myport, sctp_association::nets, sctp_inpcb::nrsack_supported, sctp_association::nrsack_supported, sctp_init::num_inbound_streams, sctp_paramhdr::param_length, sctp_paramhdr::param_type, sctp_association::peer_supports_nat, sctp_association::peer_vtag_nonce, sctp_state_cookie::peerport, sctp_state_cookie::peers_vtag, sctp_supported_chunk_types_param::ph, sctp_adaptation_layer_indication::ph, sctp_auth_random::ph, sctp_auth_chunk_list::ph, sctp_auth_hmac_algo::ph, sctp_inpcb::pktdrop_supported, sctp_association::pktdrop_supported, sctp_nets::port, sctp_pcb::pre_open_stream_count, sctp_association::pre_open_streams, sctp_association::primary_destination, sctp_inpcb::prsctp_supported, sctp_association::prsctp_supported, sctp_auth_random::random_data, sctp_inpcb::reconfig_supported, sctp_association::reconfig_supported, sctp_association::refcnt, sctp_state_cookie::reserved, sctp_nets::ro, in_addr::s_addr, sctp_association::scope, sctp_state_cookie::scope_id, sctp_add_addresses_to_i_ia(), sctp_add_cookie(), sctp_add_pad_tombuf(), sctp_are_there_new_addresses(), sctp_arethere_unrecognized_parameters(), SCTP_ASCONF, SCTP_ASCONF_ACK, SCTP_AUTH_RANDOM_SIZE_DEFAULT, SCTP_AUTHENTICATION, SCTP_BASE_SYSCTL, SCTP_BUF_LEN, SCTP_BUF_NEXT, SCTP_CHUNK_LIST, SCTP_DEBUG_OUTPUT4, SCTP_DIAG_INFO_LEN, SCTP_ECN_CAPABLE, sctp_inpcb::sctp_ep, sctp_inpcb::sctp_flags, SCTP_FORWARD_CUM_TSN, sctp_generate_cause(), sctp_get_mbuf_for_msg(), SCTP_GET_STATE, SCTP_GETTIME_TIMEVAL, SCTP_HAS_NAT_SUPPORT, SCTP_HMAC, SCTP_HMAC_LIST, sctp_hmac_m(), SCTP_IDATA, SCTP_IFORWARD_CUM_TSN, sctp_init_ack_chunk, SCTP_INITIATION_ACK, SCTP_INP_DECR_REF, SCTP_INP_INCR_REF, SCTP_INP_INFO_RLOCK, SCTP_INP_INFO_RUNLOCK, SCTP_INP_RLOCK, SCTP_INP_RUNLOCK, SCTP_IPV4_ADDRESS, SCTP_IPV6_ADDRESS, SCTP_IPV6_V6ONLY, sctp_is_address_on_local_host(), sctp_lowlevel_chunk_output(), sctp_m_freem, SCTP_MINIMAL_RWND, SCTP_NR_SELECTIVE_ACK, SCTP_PACKET_DROPPED, SCTP_PCB_FLAGS_BOUND_V6, SCTP_PRSCTP_SUPPORTED, SCTP_RANDOM, SCTP_READ_RANDOM, SCTP_RESERVE_SPACE, SCTP_SB_LIMIT_RCV, SCTP_SECRET_SIZE, sctp_select_a_tag(), sctp_select_initial_TSN(), sctp_send_abort(), sctp_serialize_auth_chunks(), sctp_serialize_hmaclist(), SCTP_SIGNATURE_SIZE, SCTP_SIZE32, SCTP_SNPRINTF, SCTP_SO_NOT_LOCKED, sctp_inpcb::sctp_socket, sctp_source_address_selection(), SCTP_STAT_INCR, SCTP_STAT_INCR_COUNTER64, SCTP_STATE_COOKIE_ECHOED, SCTP_STATE_COOKIE_WAIT, SCTP_STATE_INUSE, SCTP_STREAM_RESET, SCTP_SUPPORTED_CHUNK_EXT, SCTP_TCB_LOCK, SCTP_TCB_UNLOCK, SCTP_ULP_ADAPTATION, SCTP_VERSION_STRING, SCTPDBG, sctp_pcb::secret_key, sctp_sockstore::sin, sctp_sockstore::sin6, sockaddr_in::sin_addr, sctp_state_cookie::site_scope, sctp_scoping::site_scope, sctp_nets::src_addr_selected, sctphdr::src_port, sctp_association::streamoutcnt, sctp_state_cookie::tie_tag_my_vtag, sctp_state_cookie::tie_tag_peer_vtag, and sctp_state_cookie::time_entered.
Referenced by sctp_handle_init().
void sctp_send_operr_to | ( | struct sockaddr * | src, |
struct sockaddr * | dst, | ||
struct sctphdr * | sh, | ||
uint32_t | vtag, | ||
struct mbuf * | cause, | ||
uint8_t | mflowtype, | ||
uint32_t | mflowid, | ||
uint16_t | fibnum, | ||
uint32_t | vrf_id, | ||
uint16_t | port | ||
) |
Definition at line 12297 of file sctp_output.c.
References SCTP_OPERATION_ERROR, and sctp_send_resp_msg().
Referenced by sctp_handle_cookie_echo(), and sctp_process_cookie_existing().
void sctp_send_packet_dropped | ( | struct sctp_tcb * | stcb, |
struct sctp_nets * | net, | ||
struct mbuf * | m, | ||
int | len, | ||
int | iphlen, | ||
int | bad_crc | ||
) |
We don't respond with an PKT-DROP to an ABORT or PKT-DROP. We also do not respond to an INIT-ACK, because we can't know if the initiation tag is correct or not.
Definition at line 11457 of file sctp_output.c.
References sctp_tcb::asoc, sctp_tmit_chunk::asoc, sctp_tmit_chunk::book_size, sctp_tmit_chunk::book_size_scale, sctp_pktdrop_chunk::bottle_bw, chk_id::can_take_data, sctp_pktdrop_chunk::ch, sctp_chunkhdr::chunk_flags, sctp_tmit_chunk::chunk_id, sctp_chunkhdr::chunk_length, sctp_chunkhdr::chunk_type, sctp_association::control_send_queue, sctp_tmit_chunk::copy_by_ref, sctp_association::ctrl_queue_cnt, sctp_pktdrop_chunk::current_onq, sctp_pktdrop_chunk::data, sctp_tmit_chunk::data, sctp_tmit_chunk::flags, chk_id::id, sctp_association::my_rwnd, sctp_association::my_rwnd_control_len, sctp_association::pktdrop_supported, sctp_tmit_chunk::rec, sctp_nets::ref_count, sctp_pktdrop_chunk::reserved, SCTP_ABORT_ASSOCIATION, sctp_alloc_a_chunk, SCTP_BADCRC, SCTP_BUF_LEN, SCTP_BUF_RESV_UF, SCTP_DATAGRAM_UNSENT, sctp_free_a_chunk, sctp_get_mbuf_for_msg(), SCTP_INITIATION_ACK, sctp_m_freem, sctp_m_getptr(), SCTP_MAX_OVERHEAD, SCTP_MED_OVERHEAD, SCTP_MIN_OVERHEAD, SCTP_PACKET_DROPPED, SCTP_PACKET_TRUNCATED, SCTP_SB_LIMIT_RCV, SCTP_SIZE32, SCTP_SO_NOT_LOCKED, sctp_tcb::sctp_socket, SCTP_TCB_LOCK_ASSERT, sctp_tmit_chunk::send_size, sctp_tmit_chunk::sent, sctp_association::size_on_all_streams, sctp_association::size_on_reasm_queue, sctp_association::smallest_mtu, sctp_tmit_chunk::snd_count, sctp_pktdrop_chunk::trunc_len, and sctp_tmit_chunk::whoTo.
Referenced by sctp_common_input_processing(), and sctp_process_data().
|
static |
Definition at line 11020 of file sctp_output.c.
References sctphdr::checksum, sctp_chunkhdr::chunk_flags, sctp_chunkhdr::chunk_length, sctp_chunkhdr::chunk_type, sctphdr::dest_port, in_pseudo(), ip6_hdr::ip6_dst, ip6_hdr::ip6_src, IP_DF, ip::ip_dst, ip_fillid(), ip::ip_hl, ip::ip_len, ip::ip_off, ip::ip_p, ip::ip_sum, ip::ip_tos, ip::ip_ttl, ip::ip_v, IPPROTO_SCTP, IPPROTO_UDP, IPV6_FLOWLABEL_MASK, IPVERSION, MODULE_GLOBAL, in_addr::s_addr, sctp_add_pad_tombuf(), SCTP_ATTACH_CHAIN, SCTP_BASE_SYSCTL, SCTP_BUF_LEN, SCTP_BUF_NEXT, SCTP_BUF_RESV_UF, sctp_calculate_cksum(), SCTP_DEBUG_OUTPUT1, SCTP_DEBUG_OUTPUT3, SCTP_ENABLE_UDP_CSUM, SCTP_FROM_SCTP_OUTPUT, SCTP_GET_HEADER_FOR_OUTPUT, sctp_get_mbuf_for_msg(), SCTP_HAD_NO_TCB, SCTP_IP6_OUTPUT, SCTP_IP_OUTPUT, SCTP_LAST_PACKET_TRACING, SCTP_LTRACE_ERR_RET_PKT, sctp_m_freem, SCTP_PROBE5, SCTP_STAT_INCR, SCTP_STAT_INCR_COUNTER64, SCTPDBG, sockaddr_in::sin_addr, sctphdr::src_port, UDPSTAT_INC, udphdr::uh_dport, udphdr::uh_sport, udphdr::uh_sum, udphdr::uh_ulen, sctphdr::v_tag, and V_udp_cksum.
Referenced by sctp_send_abort(), sctp_send_operr_to(), and sctp_send_shutdown_complete2().
void sctp_send_sack | ( | struct sctp_tcb * | stcb, |
int | so_locked | ||
) |
Definition at line 10478 of file sctp_output.c.
References sctp_sack::a_rwnd, sctp_nr_sack::a_rwnd, sctp_tcb::asoc, sctp_tmit_chunk::asoc, chk_id::can_take_data, sctp_sack_chunk::ch, sctp_chunkhdr::chunk_flags, sctp_tmit_chunk::chunk_id, sctp_chunkhdr::chunk_length, sctp_chunkhdr::chunk_type, sctp_association::cmt_dac_pkts_rcvd, sctp_association::control_send_queue, sctp_tmit_chunk::copy_by_ref, sctp_association::ctrl_queue_cnt, sctp_sack::cum_tsn_ack, sctp_nr_sack::cum_tsn_ack, sctp_association::cumulative_tsn, sctp_tmit_chunk::data, sctp_association::data_pkts_seen, sctp_association::delayed_ack, sctp_nets::dest_state, sctp_association::dup_tsns, sctp_gap_ack_block::end, sctp_tmit_chunk::flags, sctp_tcb::freed_by_sorcv_sincelast, sack_track::gaps, sctp_association::highest_tsn_inside_map, sctp_association::highest_tsn_inside_nr_map, chk_id::id, sctp_association::last_data_chunk_from, sack_track::left_edge, sctp_association::mapping_array, sctp_association::mapping_array_base_tsn, MAX_TSN, sctp_nets::mtu, sctp_association::my_last_reported_rwnd, sctp_association::my_rwnd, sctp_association::nr_mapping_array, sctp_nr_sack_chunk::nr_sack, sctp_association::nrsack_supported, sctp_sack::num_dup_tsns, sctp_nr_sack::num_dup_tsns, sack_track::num_entries, sctp_sack::num_gap_ack_blks, sctp_nr_sack::num_gap_ack_blks, sctp_nr_sack::num_nr_gap_ack_blks, sctp_association::numduptsns, sctp_tmit_chunk::rec, sctp_nets::ref_count, sctp_nr_sack::reserved, sack_track::right_edge, sctp_sack_chunk::sack, sack_array, SCTP_ADDR_REACHABLE, sctp_alloc_a_chunk, SCTP_BASE_SYSCTL, SCTP_BUF_LEN, SCTP_BUF_RESV_UF, sctp_association::sctp_cmt_on_off, SCTP_DATAGRAM_UNSENT, sctp_tcb::sctp_ep, sctp_find_alternate_net(), sctp_free_a_chunk, sctp_free_remote_addr, SCTP_FROM_SCTP_OUTPUT, sctp_get_mbuf_for_msg(), SCTP_LOC_4, SCTP_LOC_5, sctp_m_freem, SCTP_MIN_OVERHEAD, SCTP_NR_SELECTIVE_ACK, SCTP_SELECTIVE_ACK, sctp_set_rwnd(), sctp_slide_mapping_arrays(), SCTP_STAT_INCR, SCTP_TCB_LOCK_ASSERT, sctp_timer_start(), sctp_timer_stop(), SCTP_TIMER_TYPE_RECV, SCTP_TSN_GT, SCTP_TSN_LOG_SIZE, sctp_association::send_sack, sctp_tmit_chunk::send_size, sctp_tmit_chunk::sent, sctp_tmit_chunk::snd_count, sctp_gap_ack_block::start, and sctp_tmit_chunk::whoTo.
Referenced by process_chunk_drop(), sctp_chunk_output(), sctp_drain_mbufs(), sctp_sack_check(), sctp_send_str_reset_req(), sctp_send_stream_reset_out_if_possible(), sctp_timeout_handler(), and sctp_user_rcvd().
Definition at line 9206 of file sctp_output.c.
References sctp_tcb::asoc, sctp_tmit_chunk::asoc, chk_id::can_take_data, sctp_shutdown_chunk::ch, sctp_chunkhdr::chunk_flags, sctp_tmit_chunk::chunk_id, sctp_chunkhdr::chunk_length, sctp_chunkhdr::chunk_type, sctp_association::control_send_queue, sctp_tmit_chunk::copy_by_ref, sctp_association::ctrl_queue_cnt, sctp_association::cumulative_tsn, sctp_shutdown_chunk::cumulative_tsn_ack, sctp_tmit_chunk::data, sctp_tmit_chunk::flags, chk_id::id, sctp_tmit_chunk::rec, sctp_nets::ref_count, sctp_alloc_a_chunk, SCTP_BUF_LEN, SCTP_BUF_RESV_UF, SCTP_DATAGRAM_UNSENT, sctp_free_remote_addr, sctp_get_mbuf_for_msg(), sctp_m_freem, SCTP_MIN_OVERHEAD, SCTP_SHUTDOWN, sctp_tmit_chunk::send_size, sctp_tmit_chunk::sent, sctp_tmit_chunk::snd_count, and sctp_tmit_chunk::whoTo.
Referenced by process_chunk_drop(), sctp_autoclose_timer(), sctp_disconnect(), sctp_express_handle_sack(), sctp_handle_sack(), sctp_inpcb_free(), sctp_lower_sosend(), sctp_sack_check(), sctp_sendall_iterator(), sctp_shutdown(), and sctp_shutdown_timer().
Definition at line 9163 of file sctp_output.c.
References sctp_tcb::asoc, sctp_tmit_chunk::asoc, chk_id::can_take_data, sctp_shutdown_ack_chunk::ch, sctp_chunkhdr::chunk_flags, sctp_tmit_chunk::chunk_id, sctp_chunkhdr::chunk_length, sctp_chunkhdr::chunk_type, sctp_association::control_send_queue, sctp_tmit_chunk::copy_by_ref, sctp_association::ctrl_queue_cnt, sctp_tmit_chunk::data, sctp_tmit_chunk::flags, chk_id::id, sctp_tmit_chunk::rec, sctp_nets::ref_count, sctp_alloc_a_chunk, SCTP_BUF_LEN, SCTP_BUF_RESV_UF, SCTP_DATAGRAM_UNSENT, sctp_get_mbuf_for_msg(), sctp_m_freem, SCTP_MIN_OVERHEAD, SCTP_SHUTDOWN_ACK, sctp_tmit_chunk::send_size, sctp_tmit_chunk::sent, sctp_tmit_chunk::snd_count, and sctp_tmit_chunk::whoTo.
Referenced by process_chunk_drop(), sctp_express_handle_sack(), sctp_handle_init(), sctp_handle_sack(), sctp_handle_shutdown(), sctp_process_cookie_existing(), and sctp_shutdownack_timer().
void sctp_send_shutdown_complete | ( | struct sctp_tcb * | stcb, |
struct sctp_nets * | net, | ||
int | reflect_vtag | ||
) |
Definition at line 10971 of file sctp_output.c.
References sctp_net_route::_l_addr, sctp_tcb::asoc, sctp_shutdown_complete_chunk::ch, sctp_chunkhdr::chunk_flags, sctp_chunkhdr::chunk_length, sctp_chunkhdr::chunk_type, sctp_association::ifp_had_enobuf, sctp_association::my_vtag, sctp_association::peer_vtag, sctp_nets::port, sctp_nets::ro, sctp_tcb::rport, SCTP_BUF_LEN, SCTP_DEBUG_OUTPUT3, sctp_tcb::sctp_ep, sctp_get_mbuf_for_msg(), SCTP_HAD_NO_TCB, sctp_lowlevel_chunk_output(), SCTP_SHUTDOWN_COMPLETE, SCTP_SO_NOT_LOCKED, SCTP_STAT_INCR, SCTP_STAT_INCR_COUNTER64, and SCTPDBG.
Referenced by sctp_handle_shutdown_ack().
void sctp_send_shutdown_complete2 | ( | struct sockaddr * | src, |
struct sockaddr * | dst, | ||
struct sctphdr * | sh, | ||
uint8_t | mflowtype, | ||
uint32_t | mflowid, | ||
uint16_t | fibnum, | ||
uint32_t | vrf_id, | ||
uint16_t | port | ||
) |
Definition at line 11276 of file sctp_output.c.
References sctp_send_resp_msg(), and SCTP_SHUTDOWN_COMPLETE.
Referenced by sctp_common_input_processing(), and sctp_handle_ootb().
int sctp_send_str_reset_req | ( | struct sctp_tcb * | stcb, |
uint16_t | number_entries, | ||
uint16_t * | list, | ||
uint8_t | send_in_req, | ||
uint8_t | send_tsn_req, | ||
uint8_t | add_stream, | ||
uint16_t | adding_o, | ||
uint16_t | adding_i, | ||
uint8_t | peer_asked | ||
) |
Definition at line 12070 of file sctp_output.c.
References sctp_stream_out::abandoned_sent, sctp_stream_out::abandoned_unsent, sctp_association::alternate, sctp_tcb::asoc, sctp_tmit_chunk::asoc, sctp_tmit_chunk::book_size, sctp_tmit_chunk::book_size_scale, chk_id::can_take_data, sctp_chunkhdr::chunk_flags, sctp_tmit_chunk::chunk_id, sctp_chunkhdr::chunk_length, sctp_chunkhdr::chunk_type, sctp_stream_out::chunks_on_queues, sctp_association::control_send_queue, sctp_tmit_chunk::copy_by_ref, sctp_association::ctrl_queue_cnt, sctp_tmit_chunk::data, sctp_tmit_chunk::flags, chk_id::id, sctp_stream_out::last_msg_incomplete, next, sctp_stream_out::next_mid_ordered, sctp_stream_out::next_mid_unordered, sctp_stream_out::outqueue, sctp_association::peer_req_out, sctp_association::primary_destination, sctp_tmit_chunk::rec, sctp_nets::ref_count, sctp_add_an_in_stream(), sctp_add_an_out_stream(), sctp_add_stream_reset_in(), sctp_add_stream_reset_out(), sctp_add_stream_reset_tsn(), sctp_alloc_a_chunk, SCTP_BUF_LEN, SCTP_BUF_RESV_UF, SCTP_DATAGRAM_UNSENT, sctp_tcb::sctp_ep, SCTP_FREE, sctp_free_a_chunk, SCTP_FROM_SCTP_OUTPUT, sctp_get_mbuf_for_msg(), SCTP_LTRACE_ERR_RET, SCTP_MALLOC, SCTP_MIN_OVERHEAD, SCTP_PR_SCTP_MAX, sctp_send_sack(), SCTP_SIZE32, SCTP_SO_LOCKED, sctp_ss_functions::sctp_ss_clear, sctp_ss_functions::sctp_ss_init, sctp_ss_functions::sctp_ss_init_stream, SCTP_STREAM_CLOSED, SCTP_STREAM_RESET, SCTP_TCB_SEND_LOCK, SCTP_TCB_SEND_UNLOCK, sctp_timer_start(), SCTP_TIMER_TYPE_STRRESET, sctp_association::send_sack, sctp_tmit_chunk::send_size, sctp_association::sending_seq, sctp_tmit_chunk::sent, sctp_stream_out::sid, sctp_tmit_chunk::snd_count, sctp_association::ss_functions, sctp_stream_out::state, sctp_association::str_reset, sctp_association::str_reset_seq_in, sctp_association::str_reset_seq_out, sctp_association::stream_reset_outstanding, sctp_association::streamoutcnt, sctp_association::strm_pending_add_size, sctp_association::strm_realoutsize, sctp_association::strmout, and sctp_tmit_chunk::whoTo.
Referenced by sctp_handle_str_reset_add_out_strm(), and sctp_setopt().
int sctp_send_stream_reset_out_if_possible | ( | struct sctp_tcb * | stcb, |
int | so_locked | ||
) |
Definition at line 11998 of file sctp_output.c.
References sctp_association::alternate, sctp_tcb::asoc, sctp_tmit_chunk::asoc, sctp_tmit_chunk::book_size, sctp_tmit_chunk::book_size_scale, chk_id::can_take_data, sctp_chunkhdr::chunk_flags, sctp_tmit_chunk::chunk_id, sctp_chunkhdr::chunk_length, sctp_chunkhdr::chunk_type, sctp_association::control_send_queue, sctp_tmit_chunk::copy_by_ref, sctp_association::ctrl_queue_cnt, sctp_tmit_chunk::data, sctp_tmit_chunk::flags, chk_id::id, sctp_association::primary_destination, sctp_tmit_chunk::rec, sctp_nets::ref_count, sctp_add_stream_reset_out(), sctp_alloc_a_chunk, SCTP_BUF_LEN, SCTP_BUF_RESV_UF, SCTP_DATAGRAM_UNSENT, sctp_tcb::sctp_ep, sctp_free_a_chunk, SCTP_FROM_SCTP_OUTPUT, sctp_get_mbuf_for_msg(), SCTP_LTRACE_ERR_RET, SCTP_MIN_OVERHEAD, sctp_send_sack(), SCTP_SIZE32, SCTP_STREAM_RESET, sctp_timer_start(), SCTP_TIMER_TYPE_STRRESET, sctp_association::send_sack, sctp_tmit_chunk::send_size, sctp_association::sending_seq, sctp_tmit_chunk::sent, sctp_tmit_chunk::snd_count, sctp_association::str_reset, sctp_association::str_reset_seq_in, sctp_association::str_reset_seq_out, sctp_association::stream_reset_outstanding, sctp_association::trigger_reset, and sctp_tmit_chunk::whoTo.
Referenced by sctp_chunk_output(), sctp_handle_str_reset_request_in(), sctp_handle_stream_reset_response(), and sctp_setopt().
|
static |
Definition at line 6833 of file sctp_output.c.
References sctp_copy_all::inp, sctp_copy_all::m, SCTP_ASOC_ANY_STATE, SCTP_BASE_SYSCTL, SCTP_BUF_LEN, SCTP_BUF_NEXT, sctp_copy_out_all(), sctp_inpcb::sctp_flags, SCTP_FREE, SCTP_FROM_SCTP_OUTPUT, sctp_initiate_iterator(), SCTP_INP_WLOCK, SCTP_INP_WUNLOCK, SCTP_LTRACE_ERR_RET, SCTP_LTRACE_ERR_RET_PKT, sctp_m_freem, SCTP_MALLOC, SCTP_PCB_ANY_FEATURES, SCTP_PCB_ANY_FLAGS, SCTP_PCB_FLAGS_SND_ITERATOR_UP, sctp_sendall_completes(), sctp_sendall_iterator(), sctp_sndrcvinfo::sinfo_flags, sctp_copy_all::sndlen, and sctp_copy_all::sndrcv.
Referenced by sctp_lower_sosend().
|
static |
Definition at line 6765 of file sctp_output.c.
References sctp_copy_all::inp, sctp_copy_all::m, sctp_inpcb::sctp_flags, SCTP_FREE, SCTP_INP_WLOCK, SCTP_INP_WUNLOCK, and sctp_m_freem.
Referenced by sctp_sendall().
|
static |
Definition at line 6582 of file sctp_output.c.
References sctp_association::alternate, sctp_tcb::asoc, sctp_copy_all::cnt_failed, sctp_copy_all::cnt_sent, sctp_copy_all::inp, sctp_copy_all::m, sctp_paramhdr::param_length, sctp_paramhdr::param_type, sctp_association::primary_destination, sctp_association::refcnt, SCTP_ABORT, sctp_abort_an_association(), SCTP_ADD_SUBSTATE, SCTP_BASE_SYSCTL, SCTP_BUF_LEN, SCTP_BUF_PREPEND, SCTP_CAUSE_USER_INITIATED_ABT, sctp_chunk_output(), SCTP_DATA_CHUNK_OVERHEAD, SCTP_DIAG_INFO_LEN, SCTP_EOF, sctp_tcb::sctp_ep, sctp_generate_cause(), sctp_get_frag_point(), sctp_get_mbuf_for_msg(), SCTP_GET_STATE, sctp_is_feature_off, sctp_is_there_unsent_data(), SCTP_M_COPYM, SCTP_MBUF_ICOPY, SCTP_MBUF_LOGGING_ENABLE, sctp_med_chunk_output(), SCTP_MIN_OVERHEAD, sctp_msg_append(), SCTP_OUTPUT_FROM_USR_SEND, SCTP_PCB_FLAGS_NODELAY, sctp_send_shutdown(), SCTP_SET_STATE, SCTP_SNPRINTF, SCTP_SO_NOT_LOCKED, sctp_ss_functions::sctp_ss_is_user_msgs_incomplete, SCTP_STAT_DECR_GAUGE32, 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_LOCK_ASSERT, sctp_timer_start(), SCTP_TIMER_TYPE_SHUTDOWN, SCTP_TIMER_TYPE_SHUTDOWNGUARD, sctp_association::send_queue, sctp_association::sent_queue, sctp_sndrcvinfo::sinfo_flags, sctp_association::smallest_mtu, sctp_copy_all::sndlen, sctp_copy_all::sndrcv, sctp_association::ss_functions, sctp_association::state, sctp_association::stream_queue_cnt, sctp_association::total_flight, and sctp_association::total_output_queue_size.
Referenced by sctp_sendall().
|
static |
Definition at line 6264 of file sctp_output.c.
References sctp_stream_queue_pending::act_flags, CHUNK_FLAGS_PR_SCTP_BUF, CHUNK_FLAGS_PR_SCTP_RTX, CHUNK_FLAGS_PR_SCTP_TTL, PR_SCTP_ENABLED, PR_SCTP_POLICY, SCTP_DEBUG_USRREQ1, SCTP_GETTIME_TIMEVAL, SCTP_PR_SCTP_TTL, SCTPDBG, sctp_stream_queue_pending::sinfo_flags, sctp_stream_queue_pending::timetolive, and sctp_stream_queue_pending::ts.
Referenced by sctp_copy_it_in(), and sctp_msg_append().
int sctp_sosend | ( | struct socket * | so, |
struct sockaddr * | addr, | ||
struct uio * | uio, | ||
struct mbuf * | top, | ||
struct mbuf * | control, | ||
int | flags, | ||
struct thread * | p | ||
) |
Definition at line 12439 of file sctp_output.c.
References sctp_find_cmsg(), SCTP_FROM_SCTP_OUTPUT, sctp_lower_sosend(), SCTP_LTRACE_ERR_RET, and SCTP_SNDRCV.
Referenced by sctp_output().
struct sctp_ifa * sctp_source_address_selection | ( | struct sctp_inpcb * | inp, |
struct sctp_tcb * | stcb, | ||
sctp_route_t * | ro, | ||
struct sctp_nets * | net, | ||
int | non_asoc_addr_ok, | ||
uint32_t | vrf_id | ||
) |
Rules:
Cavets and issues
Do we need to pay attention to scope. We can have a private address or a global address we are sourcing or sending to. So if we draw it out zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
And then we add to that what happens if there are multiple addresses assigned to an interface. Remember the ifa on a ifn is a linked list of addresses. So one interface can have more than one IP address. What happens if we have both a private and a global address? Do we then use context of destination to sort out which one is best? And what about NAT's sending P->G may get you a NAT translation, or should you select the G thats on the interface in preference.
Decisions:
. For we will assume a NAT out there.
if there are more than one, then we need to worry about scope P or G. We should prefer G -> G and P -> P if possible. Then as a secondary fall back to mixed types G->P being a last ditch one.
The above all works for bound all, but bound specific we need to use the same concept but instead only consider the bound addresses. If the bound set is NOT assigned to the interface then we must use rotation amongst the bound addresses..
Definition at line 3297 of file sctp_output.c.
References sctp_nets::addr_is_local, sctp_inpcb::fibnum, IN4_ISLOOPBACK_ADDRESS, IN4_ISPRIVATE_ADDRESS, sctp_choose_boundall(), sctp_choose_boundspecific_inp(), sctp_choose_boundspecific_stcb(), SCTP_DEBUG_OUTPUT2, sctp_inpcb::sctp_flags, SCTP_IPI_ADDR_RLOCK, SCTP_IPI_ADDR_RUNLOCK, SCTP_PCB_FLAGS_BOUNDALL, SCTP_ROUTE_IS_REAL_LOOP, SCTP_RTALLOC, SCTPDBG, SCTPDBG_ADDR, and sockaddr_in::sin_addr.
Referenced by sctp_add_remote_addr(), sctp_lowlevel_chunk_output(), sctp_pathmtu_timer(), and sctp_send_initiate_ack().
|
static |
Definition at line 9935 of file sctp_output.c.
References sctp_association::alternate, sctp_association::nets, sctp_association::primary_destination, sctp_nets::rxt_timer, SCTP_DEBUG_OUTPUT3, SCTP_OS_TIMER_PENDING, SCTP_TCB_LOCK_ASSERT, sctp_timer_start(), SCTP_TIMER_TYPE_SEND, SCTPDBG, and sctp_timer::timer.
Referenced by sctp_chunk_output().
void sctp_toss_old_asconf | ( | struct sctp_tcb * | stcb | ) |
Definition at line 6930 of file sctp_output.c.
References sctp_association::asconf_send_queue, sctp_association::asconf_seq_out_acked, sctp_tcb::asoc, sctp_tmit_chunk::chunk_id, sctp_association::ctrl_queue_cnt, sctp_tmit_chunk::data, chk_id::id, sctp_tmit_chunk::rec, SCTP_ASCONF, sctp_free_a_chunk, sctp_m_freem, SCTP_SO_NOT_LOCKED, SCTP_TSN_GT, and sctp_asconf_chunk::serial_number.
Referenced by sctp_asconf_cleanup(), and sctp_handle_asconf_ack().
void sctp_toss_old_cookies | ( | struct sctp_tcb * | stcb, |
struct sctp_association * | asoc | ||
) |
Definition at line 6912 of file sctp_output.c.
References sctp_tmit_chunk::asoc, sctp_tmit_chunk::chunk_id, sctp_association::control_send_queue, sctp_association::ctrl_queue_cnt, sctp_tmit_chunk::data, chk_id::id, sctp_tmit_chunk::rec, SCTP_COOKIE_ECHO, sctp_free_a_chunk, sctp_m_freem, and SCTP_SO_NOT_LOCKED.
Referenced by sctp_handle_cookie_ack(), sctp_handle_error(), sctp_handle_nat_colliding_state(), and sctp_process_cookie_existing().
int sctp_v4src_match_nexthop | ( | struct sctp_ifa * | sifa, |
sctp_route_t * | ro | ||
) |
Definition at line 13846 of file sctp_output.c.
References sctp_ifa::address, sctp_ifa::ifa, in_addr::s_addr, sctp_sockstore::sa, SCTP_DEBUG_OUTPUT1, SCTP_DEBUG_OUTPUT2, SCTPDBG, SCTPDBG_ADDR, sctp_sockstore::sin, and sockaddr_in::sin_addr.
Referenced by sctp_path_check_and_react(), and sctp_select_nth_preferred_addr_from_ifn_boundall().
void send_forward_tsn | ( | struct sctp_tcb * | stcb, |
struct sctp_association * | asoc | ||
) |
Definition at line 10264 of file sctp_output.c.
References sctp_association::advanced_peer_ack_point, sctp_tmit_chunk::asoc, chk_id::can_take_data, sctp_forward_tsn_chunk::ch, sctp_chunkhdr::chunk_flags, sctp_tmit_chunk::chunk_id, sctp_chunkhdr::chunk_length, sctp_chunkhdr::chunk_type, sctp_association::control_send_queue, sctp_tmit_chunk::copy_by_ref, sctp_association::ctrl_queue_cnt, sctp_tmit_chunk::data, sctp_strseq_mid::flags, sctp_tmit_chunk::flags, sctp_data_chunkrec::fwd_tsn_cnt, sctp_association::fwd_tsn_cnt, chk_id::id, sctp_association::idata_supported, sctp_strseq_mid::mid, sctp_data_chunkrec::mid, sctp_forward_tsn_chunk::new_cumulative_tsn, PR_SCTP_UNORDERED_FLAG, sctp_data_chunkrec::rcv_flags, sctp_tmit_chunk::rec, sctp_alloc_a_chunk, SCTP_BASE_SYSCTL, SCTP_BUF_LEN, SCTP_BUF_RESV_UF, SCTP_DATA_UNORDERED, SCTP_DATAGRAM_NR_ACKED, SCTP_DATAGRAM_UNSENT, sctp_tcb::sctp_ep, sctp_inpcb::sctp_flags, SCTP_FORWARD_CUM_TSN, SCTP_FORWARD_TSN_SKIP, sctp_free_a_chunk, sctp_free_remote_addr, SCTP_FWD_TSN_CHECK, sctp_get_mbuf_for_msg(), SCTP_IFORWARD_CUM_TSN, SCTP_LOG_TRY_ADVANCE, SCTP_MIN_OVERHEAD, SCTP_MIN_V4_OVERHEAD, sctp_misc_ints(), SCTP_PCB_FLAGS_BOUND_V6, SCTP_SO_NOT_LOCKED, SCTP_TCB_LOCK_ASSERT, sctp_tmit_chunk::send_size, sctp_tmit_chunk::sent, sctp_association::sent_queue, sctp_strseq::sid, sctp_strseq_mid::sid, sctp_data_chunkrec::sid, sctp_association::smallest_mtu, sctp_tmit_chunk::snd_count, sctp_strseq::ssn, sctp_data_chunkrec::tsn, and sctp_tmit_chunk::whoTo.
Referenced by process_chunk_drop(), sctp_express_handle_sack(), sctp_handle_sack(), and sctp_t3rxt_timer().
const struct sack_track sack_array[256] |
Definition at line 71 of file sctp_output.c.
Referenced by sctp_send_sack().