FreeBSD kernel IPv4 code
|
Go to the source code of this file.
Macros | |
#define | _NETINET_SCTP_OUTPUT_H_ |
#define | SCTP_DATA_CHUNK_OVERHEAD(stcb) |
Functions | |
__FBSDID ("$FreeBSD$") | |
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) |
int | sctp_is_addr_restricted (struct sctp_tcb *, struct sctp_ifa *) |
int | sctp_is_address_in_scope (struct sctp_ifa *ifa, struct sctp_scoping *scope, int do_update) |
int | sctp_is_addr_in_ep (struct sctp_inpcb *inp, struct sctp_ifa *ifa) |
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) |
int | sctp_v6src_match_nexthop (struct sockaddr_in6 *src6, sctp_route_t *ro) |
int | sctp_v4src_match_nexthop (struct sctp_ifa *sifa, sctp_route_t *ro) |
void | sctp_send_initiate (struct sctp_inpcb *, struct sctp_tcb *, int) |
void | sctp_send_initiate_ack (struct sctp_inpcb *, struct sctp_tcb *, struct sctp_nets *, struct mbuf *, int, int, struct sockaddr *, struct sockaddr *, struct sctphdr *, struct sctp_init_chunk *, uint8_t, uint32_t, uint32_t, uint16_t) |
struct mbuf * | sctp_arethere_unrecognized_parameters (struct mbuf *, int, int *, struct sctp_chunkhdr *, int *, int *) |
void | sctp_queue_op_err (struct sctp_tcb *, struct mbuf *) |
int | sctp_send_cookie_echo (struct mbuf *, int, int, struct sctp_tcb *, struct sctp_nets *) |
void | sctp_send_cookie_ack (struct sctp_tcb *) |
void | sctp_send_heartbeat_ack (struct sctp_tcb *, struct mbuf *, int, int, struct sctp_nets *) |
void | sctp_remove_from_wheel (struct sctp_tcb *stcb, struct sctp_association *asoc, struct sctp_stream_out *strq, int holds_lock) |
void | sctp_send_shutdown (struct sctp_tcb *, struct sctp_nets *) |
void | sctp_send_shutdown_ack (struct sctp_tcb *, struct sctp_nets *) |
void | sctp_send_shutdown_complete (struct sctp_tcb *, struct sctp_nets *, int) |
void | sctp_send_shutdown_complete2 (struct sockaddr *, struct sockaddr *, struct sctphdr *, uint8_t, uint32_t, uint16_t, uint32_t, uint16_t) |
void | sctp_send_asconf (struct sctp_tcb *, struct sctp_nets *, int addr_locked) |
void | sctp_send_asconf_ack (struct sctp_tcb *) |
uint32_t | sctp_get_frag_point (struct sctp_tcb *) |
void | sctp_toss_old_cookies (struct sctp_tcb *, struct sctp_association *) |
void | sctp_toss_old_asconf (struct sctp_tcb *) |
void | sctp_fix_ecn_echo (struct sctp_association *) |
void | sctp_move_chunks_from_net (struct sctp_tcb *stcb, struct sctp_nets *net) |
int | sctp_output (struct sctp_inpcb *, struct mbuf *, struct sockaddr *, struct mbuf *, struct thread *, int) |
void | sctp_chunk_output (struct sctp_inpcb *, struct sctp_tcb *, int, int) |
void | sctp_send_abort_tcb (struct sctp_tcb *, struct mbuf *, int) |
void | send_forward_tsn (struct sctp_tcb *, struct sctp_association *) |
void | sctp_send_sack (struct sctp_tcb *, int) |
void | sctp_send_hb (struct sctp_tcb *, struct sctp_nets *, int) |
void | sctp_send_ecn_echo (struct sctp_tcb *, struct sctp_nets *, uint32_t) |
void | sctp_send_packet_dropped (struct sctp_tcb *, struct sctp_nets *, struct mbuf *, int, int, int) |
void | sctp_send_cwr (struct sctp_tcb *, struct sctp_nets *, uint32_t, uint8_t) |
void | sctp_add_stream_reset_result (struct sctp_tmit_chunk *, uint32_t, uint32_t) |
void | sctp_send_deferred_reset_response (struct sctp_tcb *, struct sctp_stream_reset_list *, int) |
void | sctp_add_stream_reset_result_tsn (struct sctp_tmit_chunk *, uint32_t, uint32_t, uint32_t, uint32_t) |
int | sctp_send_stream_reset_out_if_possible (struct sctp_tcb *, int) |
int | sctp_send_str_reset_req (struct sctp_tcb *, uint16_t, uint16_t *, uint8_t, uint8_t, uint8_t, uint16_t, uint16_t, uint8_t) |
void | sctp_send_abort (struct mbuf *, int, struct sockaddr *, struct sockaddr *, struct sctphdr *, uint32_t, struct mbuf *, uint8_t, uint32_t, uint16_t, uint32_t, uint16_t) |
void | sctp_send_operr_to (struct sockaddr *, struct sockaddr *, struct sctphdr *, uint32_t, struct mbuf *, uint8_t, uint32_t, uint16_t, uint32_t, uint16_t) |
int | sctp_sosend (struct socket *so, struct sockaddr *addr, struct uio *uio, struct mbuf *top, struct mbuf *control, int flags, struct thread *p) |
#define _NETINET_SCTP_OUTPUT_H_ |
Definition at line 39 of file sctp_output.h.
#define SCTP_DATA_CHUNK_OVERHEAD | ( | stcb | ) |
Definition at line 130 of file sctp_output.h.
__FBSDID | ( | "$FreeBSD$" | ) |
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().
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().
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().
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().
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 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().
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().
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().
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().
void sctp_remove_from_wheel | ( | struct sctp_tcb * | stcb, |
struct sctp_association * | asoc, | ||
struct sctp_stream_out * | strq, | ||
int | holds_lock | ||
) |
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().
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().
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().
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().
int sctp_v6src_match_nexthop | ( | struct sockaddr_in6 * | src6, |
sctp_route_t * | ro | ||
) |
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().