Lines Matching full:asoc
108 struct sctp_association *asoc; in sctp_pathmtu_adjustment() local
112 asoc = &stcb->asoc; in sctp_pathmtu_adjustment()
113 KASSERT(mtu < asoc->smallest_mtu, in sctp_pathmtu_adjustment()
115 asoc->smallest_mtu, mtu)); in sctp_pathmtu_adjustment()
116 asoc->smallest_mtu = mtu; in sctp_pathmtu_adjustment()
122 if (asoc->idata_supported) { in sctp_pathmtu_adjustment()
123 if (sctp_auth_is_required_chunk(SCTP_IDATA, asoc->peer_auth_chunks)) { in sctp_pathmtu_adjustment()
124 overhead += sctp_get_auth_chunk_len(asoc->peer_hmac_id); in sctp_pathmtu_adjustment()
127 if (sctp_auth_is_required_chunk(SCTP_DATA, asoc->peer_auth_chunks)) { in sctp_pathmtu_adjustment()
128 overhead += sctp_get_auth_chunk_len(asoc->peer_hmac_id); in sctp_pathmtu_adjustment()
133 TAILQ_FOREACH(chk, &asoc->send_queue, sctp_next) { in sctp_pathmtu_adjustment()
138 TAILQ_FOREACH(chk, &asoc->sent_queue, sctp_next) { in sctp_pathmtu_adjustment()
150 sctp_ucount_incr(asoc->sent_queue_retran_cnt); in sctp_pathmtu_adjustment()
246 if (stcb->asoc.smallest_mtu > next_mtu) { in sctp_notify()
307 if (ntohl(sh->v_tag) != stcb->asoc.peer_vtag) { in sctp_ctlinput()
322 (ntohl(ch->init.initiate_tag) != stcb->asoc.my_vtag)) { in sctp_ctlinput()
655 struct sctp_association *asoc; in sctp_disconnect() local
674 asoc = &stcb->asoc; in sctp_disconnect()
675 if (asoc->state & SCTP_STATE_ABOUT_TO_BE_FREED) { in sctp_disconnect()
703 if (TAILQ_EMPTY(&asoc->send_queue) && in sctp_disconnect()
704 TAILQ_EMPTY(&asoc->sent_queue) && in sctp_disconnect()
705 (asoc->stream_queue_cnt == 0)) { in sctp_disconnect()
707 if ((*asoc->ss_functions.sctp_ss_is_user_msgs_incomplete) (stcb, asoc)) { in sctp_disconnect()
721 if (stcb->asoc.alternate) { in sctp_disconnect()
722 netp = stcb->asoc.alternate; in sctp_disconnect()
724 netp = stcb->asoc.primary_destination; in sctp_disconnect()
744 if ((*asoc->ss_functions.sctp_ss_is_user_msgs_incomplete) (stcb, asoc)) { in sctp_disconnect()
747 if (TAILQ_EMPTY(&asoc->send_queue) && in sctp_disconnect()
748 TAILQ_EMPTY(&asoc->sent_queue) && in sctp_disconnect()
749 (asoc->state & SCTP_STATE_PARTIAL_MSG_LEFT)) { in sctp_disconnect()
783 struct sctp_association *asoc; in sctp_shutdown() local
847 stcb->asoc.size_on_all_streams += in sctp_shutdown()
895 asoc = &stcb->asoc; in sctp_shutdown()
896 if (asoc->state & SCTP_STATE_ABOUT_TO_BE_FREED) { in sctp_shutdown()
913 if (stcb->asoc.alternate) { in sctp_shutdown()
914 netp = stcb->asoc.alternate; in sctp_shutdown()
916 netp = stcb->asoc.primary_destination; in sctp_shutdown()
919 TAILQ_EMPTY(&asoc->send_queue) && in sctp_shutdown()
920 TAILQ_EMPTY(&asoc->sent_queue) && in sctp_shutdown()
921 (asoc->stream_queue_cnt == 0)) { in sctp_shutdown()
922 if ((*asoc->ss_functions.sctp_ss_is_user_msgs_incomplete) (stcb, asoc)) { in sctp_shutdown()
940 if ((*asoc->ss_functions.sctp_ss_is_user_msgs_incomplete) (stcb, asoc)) { in sctp_shutdown()
943 if (TAILQ_EMPTY(&asoc->send_queue) && in sctp_shutdown()
944 TAILQ_EMPTY(&asoc->sent_queue) && in sctp_shutdown()
945 (asoc->state & SCTP_STATE_PARTIAL_MSG_LEFT)) { in sctp_shutdown()
1016 loopback_scope = stcb->asoc.scope.loopback_scope; in sctp_fill_up_addresses_vrf()
1018 ipv4_local_scope = stcb->asoc.scope.ipv4_local_scope; in sctp_fill_up_addresses_vrf()
1019 ipv4_addr_legal = stcb->asoc.scope.ipv4_addr_legal; in sctp_fill_up_addresses_vrf()
1022 local_scope = stcb->asoc.scope.local_scope; in sctp_fill_up_addresses_vrf()
1023 site_scope = stcb->asoc.scope.site_scope; in sctp_fill_up_addresses_vrf()
1024 ipv6_addr_legal = stcb->asoc.scope.ipv6_addr_legal; in sctp_fill_up_addresses_vrf()
1457 stcb->asoc.delayed_connection = 1; in sctp_do_connect_x()
1458 sctp_timer_start(SCTP_TIMER_TYPE_INIT, inp, stcb, stcb->asoc.primary_destination); in sctp_do_connect_x()
1460 (void)SCTP_GETTIME_TIMEVAL(&stcb->asoc.time_entered); in sctp_do_connect_x()
1644 av->assoc_value = stcb->asoc.idata_supported;
1675 av->assoc_value = stcb->asoc.sctp_cmt_on_off;
1702 av->assoc_value = stcb->asoc.congestion_control_module;
1731 if (stcb->asoc.cc_functions.sctp_cwnd_socket_option == NULL) {
1734 error = (*stcb->asoc.cc_functions.sctp_cwnd_socket_option) (stcb, 0, cc_opt);
1748 av->assoc_value = stcb->asoc.stream_scheduling_module;
1775 if ((av->stream_id >= stcb->asoc.streamoutcnt) ||
1776 … (stcb->asoc.ss_functions.sctp_ss_get_value(stcb, &stcb->asoc, &stcb->asoc.strmout[av->stream_id],
1887 av->assoc_value = stcb->asoc.context;
1926 id->assoc_value = stcb->asoc.vrf_id;
1946 gnv->gn_peers_tag = stcb->asoc.peer_vtag;
1947 gnv->gn_local_tag = stcb->asoc.my_vtag;
1963 sack->sack_delay = stcb->asoc.delayed_ack;
1964 sack->sack_freq = stcb->asoc.sack_freq;
1993 ss->ss_total_sndbuf = stcb->asoc.total_output_queue_size;
1994 ss->ss_total_recv_buf = (stcb->asoc.size_on_reasm_queue +
1995 stcb->asoc.size_on_all_streams);
2012 av->assoc_value = stcb->asoc.max_burst;
2040 av->assoc_value = stcb->asoc.sctp_frag_point;
2153 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
2210 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
2423 paddrp->spp_pathmaxrxt = stcb->asoc.def_net_failure;
2424 paddrp->spp_pathmtu = stcb->asoc.default_mtu;
2425 if (stcb->asoc.default_dscp & 0x01) {
2426 paddrp->spp_dscp = stcb->asoc.default_dscp & 0xfc;
2430 if (stcb->asoc.default_flowlabel & 0x80000000) {
2431 paddrp->spp_ipv6_flowlabel = stcb->asoc.default_flowlabel & 0x000fffff;
2446 paddrp->spp_hbinterval = stcb->asoc.heart_beat_delay;
2605 sstat->sstat_state = sctp_map_assoc_state(stcb->asoc.state);
2607 sstat->sstat_rwnd = stcb->asoc.peers_rwnd;
2608 sstat->sstat_unackdata = stcb->asoc.sent_queue_cnt;
2613 sstat->sstat_penddata = (stcb->asoc.cnt_on_reasm_queue +
2614 stcb->asoc.cnt_on_all_streams);
2615 sstat->sstat_instrms = stcb->asoc.streamincnt;
2616 sstat->sstat_outstrms = stcb->asoc.streamoutcnt;
2618 net = stcb->asoc.primary_destination;
2643 switch (stcb->asoc.primary_destination->ro._l_addr.sa.sa_family) {
2673 srto->srto_initial = stcb->asoc.initial_rto;
2674 srto->srto_max = stcb->asoc.maxrto;
2675 srto->srto_min = stcb->asoc.minrto;
2705 stimo->stimo_init = stcb->asoc.timoinit;
2706 stimo->stimo_data = stcb->asoc.timodata;
2707 stimo->stimo_sack = stcb->asoc.timosack;
2708 stimo->stimo_shutdown = stcb->asoc.timoshutdown;
2709 stimo->stimo_heartbeat = stcb->asoc.timoheartbeat;
2710 stimo->stimo_cookie = stcb->asoc.timocookie;
2711 stimo->stimo_shutdownack = stcb->asoc.timoshutdownack;
2728 sasoc->sasoc_cookie_life = sctp_ticks_to_msecs(stcb->asoc.cookie_life);
2729 sasoc->sasoc_asocmaxrxt = stcb->asoc.max_send_times;
2730 sasoc->sasoc_number_peer_destinations = stcb->asoc.numnets;
2731 sasoc->sasoc_peer_rwnd = stcb->asoc.peers_rwnd;
2732 sasoc->sasoc_local_rwnd = stcb->asoc.my_rwnd;
2764 memcpy(s_info, &stcb->asoc.def_send, sizeof(stcb->asoc.def_send));
2809 addr = &stcb->asoc.primary_destination->ro._l_addr;
2885 scact->scact_keynumber = stcb->asoc.authinfo.active_keyid;
2917 chklist = stcb->asoc.local_auth_chunks;
2968 chklist = stcb->asoc.peer_auth_chunks;
3101 info->snd_sid = stcb->asoc.def_send.sinfo_stream;
3102 info->snd_flags = stcb->asoc.def_send.sinfo_flags;
3104 info->snd_ppid = stcb->asoc.def_send.sinfo_ppid;
3105 info->snd_context = stcb->asoc.def_send.sinfo_context;
3137 info->pr_policy = PR_SCTP_POLICY(stcb->asoc.def_send.sinfo_flags);
3138 info->pr_value = stcb->asoc.def_send.sinfo_timetolive;
3246 thlds->spt_pathmaxrxt = stcb->asoc.def_net_failure;
3247 thlds->spt_pathpfthld = stcb->asoc.def_net_pf_threshold;
3358 encaps->sue_port = stcb->asoc.port;
3387 av->assoc_value = stcb->asoc.ecn_supported;
3415 av->assoc_value = stcb->asoc.prsctp_supported;
3443 av->assoc_value = stcb->asoc.auth_supported;
3471 av->assoc_value = stcb->asoc.asconf_supported;
3499 av->assoc_value = stcb->asoc.reconfig_supported;
3527 av->assoc_value = stcb->asoc.nrsack_supported;
3555 av->assoc_value = stcb->asoc.pktdrop_supported;
3583 av->assoc_value = (uint32_t)stcb->asoc.local_strreset_support;
3616 (sid < stcb->asoc.streamoutcnt) &&
3621 sprstat->sprstat_abandoned_unsent = stcb->asoc.strmout[sid].abandoned_unsent[0];
3622 sprstat->sprstat_abandoned_sent = stcb->asoc.strmout[sid].abandoned_sent[0];
3624 sprstat->sprstat_abandoned_unsent = stcb->asoc.strmout[sid].abandoned_unsent[policy];
3625 sprstat->sprstat_abandoned_sent = stcb->asoc.strmout[sid].abandoned_sent[policy];
3629 (sid < stcb->asoc.streamoutcnt) &&
3631 sprstat->sprstat_abandoned_unsent = stcb->asoc.strmout[sid].abandoned_unsent[0];
3632 sprstat->sprstat_abandoned_sent = stcb->asoc.strmout[sid].abandoned_sent[0];
3660 sprstat->sprstat_abandoned_unsent = stcb->asoc.abandoned_unsent[0];
3661 sprstat->sprstat_abandoned_sent = stcb->asoc.abandoned_sent[0];
3663 sprstat->sprstat_abandoned_unsent = stcb->asoc.abandoned_unsent[policy];
3664 sprstat->sprstat_abandoned_sent = stcb->asoc.abandoned_sent[policy];
3686 av->assoc_value = stcb->asoc.max_cwnd;
3921 stcb->asoc.sctp_cmt_on_off = av->assoc_value;
3939 stcb->asoc.sctp_cmt_on_off = av->assoc_value;
3966 stcb->asoc.cc_functions = sctp_cc_functions[av->assoc_value];
3967 stcb->asoc.congestion_control_module = av->assoc_value;
3968 if (stcb->asoc.cc_functions.sctp_set_initial_cc_param != NULL) {
3969 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
3970 stcb->asoc.cc_functions.sctp_set_initial_cc_param(stcb, net);
3990 stcb->asoc.cc_functions = sctp_cc_functions[av->assoc_value];
3991 stcb->asoc.congestion_control_module = av->assoc_value;
3992 if (stcb->asoc.cc_functions.sctp_set_initial_cc_param != NULL) {
3993 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
3994 stcb->asoc.cc_functions.sctp_set_initial_cc_param(stcb, net);
4016 if (stcb->asoc.cc_functions.sctp_cwnd_socket_option) {
4017 (*stcb->asoc.cc_functions.sctp_cwnd_socket_option) (stcb, 1, cc_opt);
4026 if (stcb->asoc.cc_functions.sctp_cwnd_socket_option == NULL) {
4029 error = (*stcb->asoc.cc_functions.sctp_cwnd_socket_option) (stcb, 1,
4053 stcb->asoc.ss_functions.sctp_ss_clear(stcb, &stcb->asoc, true);
4054 stcb->asoc.ss_functions = sctp_ss_functions[av->assoc_value];
4055 stcb->asoc.stream_scheduling_module = av->assoc_value;
4056 stcb->asoc.ss_functions.sctp_ss_init(stcb, &stcb->asoc);
4074 stcb->asoc.ss_functions.sctp_ss_clear(stcb, &stcb->asoc, true);
4075 stcb->asoc.ss_functions = sctp_ss_functions[av->assoc_value];
4076 stcb->asoc.stream_scheduling_module = av->assoc_value;
4077 stcb->asoc.ss_functions.sctp_ss_init(stcb, &stcb->asoc);
4092 if ((av->stream_id >= stcb->asoc.streamoutcnt) ||
4093 … (stcb->asoc.ss_functions.sctp_ss_set_value(stcb, &stcb->asoc, &stcb->asoc.strmout[av->stream_id],
4105 if (av->stream_id < stcb->asoc.streamoutcnt) {
4106 stcb->asoc.ss_functions.sctp_ss_set_value(stcb,
4107 &stcb->asoc,
4108 &stcb->asoc.strmout[av->stream_id],
4137 stcb->asoc.context = av->assoc_value;
4155 stcb->asoc.context = av->assoc_value;
4205 stcb->asoc.delayed_ack = sack->sack_delay;
4208 stcb->asoc.sack_freq = sack->sack_freq;
4233 stcb->asoc.delayed_ack = sack->sack_delay;
4236 stcb->asoc.sack_freq = sack->sack_freq;
4284 shared_keys = &stcb->asoc.shared_keys;
4357 shared_keys = &stcb->asoc.shared_keys;
4582 stcb->asoc.local_strreset_support = (uint8_t)av->assoc_value;
4600 stcb->asoc.local_strreset_support = (uint8_t)av->assoc_value;
4621 if (stcb->asoc.reconfig_supported == 0) {
4644 if (stcb->asoc.stream_reset_outstanding) {
4668 (strrst->srs_stream_list[i] >= stcb->asoc.streamincnt)) {
4674 (strrst->srs_stream_list[i] >= stcb->asoc.streamoutcnt)) {
4691 if (stcb->asoc.strmout[strm].state == SCTP_STREAM_OPEN) {
4692 stcb->asoc.strmout[strm].state = SCTP_STREAM_RESET_PENDING;
4698 for (i = 0, cnt = 0; i < stcb->asoc.streamoutcnt; i++) {
4699 if (stcb->asoc.strmout[i].state == SCTP_STREAM_OPEN) {
4700 stcb->asoc.strmout[i].state = SCTP_STREAM_RESET_PENDING;
4741 if (stcb->asoc.reconfig_supported == 0) {
4756 if (stcb->asoc.stream_reset_outstanding) {
4771 if ((((int)add_o_strmcnt) + ((int)stcb->asoc.streamoutcnt)) > 0x0000ffff) {
4787 cnt += stcb->asoc.streamincnt;
4793 if (cnt > (int)stcb->asoc.max_inbound_streams) {
4817 if (stcb->asoc.reconfig_supported == 0) {
4832 if (stcb->asoc.stream_reset_outstanding) {
4842 if (!TAILQ_EMPTY(&stcb->asoc.send_queue) ||
4843 !TAILQ_EMPTY(&stcb->asoc.sent_queue)) {
4851 for (i = 0; i < stcb->asoc.streamoutcnt; i++) {
4852 if (!TAILQ_EMPTY(&stcb->asoc.strmout[i].outqueue)) {
4912 if (stcb->asoc.delayed_connection == 1) {
4913 stcb->asoc.delayed_connection = 0;
4914 (void)SCTP_GETTIME_TIMEVAL(&stcb->asoc.time_entered);
4916 stcb->asoc.primary_destination,
4938 stcb->asoc.max_burst = av->assoc_value;
4956 stcb->asoc.max_burst = av->assoc_value;
4972 stcb->asoc.sctp_frag_point = av->assoc_value;
5126 if (TAILQ_EMPTY(&stcb->asoc.send_queue) &&
5127 TAILQ_EMPTY(&stcb->asoc.sent_queue) &&
5128 (stcb->asoc.stream_queue_cnt == 0)) {
5169 if (s_info->sinfo_stream < stcb->asoc.streamoutcnt) {
5170 memcpy(&stcb->asoc.def_send, s_info, min(optsize, sizeof(stcb->asoc.def_send)));
5192 if (s_info->sinfo_stream < stcb->asoc.streamoutcnt) {
5193 memcpy(&stcb->asoc.def_send, s_info, min(optsize, sizeof(stcb->asoc.def_send)));
5359 if (net->mtu < stcb->asoc.smallest_mtu) {
5414 stcb->asoc.def_net_failure = paddrp->spp_pathmaxrxt;
5415 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
5447 stcb->asoc.heart_beat_delay = paddrp->spp_hbinterval;
5449 stcb->asoc.heart_beat_delay = 0;
5452 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
5468 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
5481 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
5503 if (net->mtu < stcb->asoc.smallest_mtu) {
5509 stcb->asoc.default_mtu = paddrp->spp_pathmtu;
5514 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
5520 stcb->asoc.default_mtu = 0;
5524 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
5528 stcb->asoc.default_dscp = paddrp->spp_dscp & 0xfc;
5529 stcb->asoc.default_dscp |= 0x01;
5533 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
5539 stcb->asoc.default_flowlabel = paddrp->spp_ipv6_flowlabel & 0x000fffff;
5540 stcb->asoc.default_flowlabel |= 0x80000000;
5620 new_init = stcb->asoc.initial_rto;
5624 new_max = stcb->asoc.maxrto;
5628 new_min = stcb->asoc.minrto;
5630 stcb->asoc.initial_rto = new_init;
5631 stcb->asoc.maxrto = new_max;
5632 stcb->asoc.minrto = new_min;
5689 stcb->asoc.max_send_times = sasoc->sasoc_asocmaxrxt;
5692 stcb->asoc.cookie_life = sctp_msecs_to_ticks(sasoc->sasoc_cookie_life);
5784 if (net != stcb->asoc.primary_destination) {
5788 if ((stcb->asoc.alternate) &&
5791 sctp_free_remote_addr(stcb->asoc.alternate);
5792 stcb->asoc.alternate = NULL;
5856 ifa = sctp_find_ifa_by_addr(addr, stcb->asoc.vrf_id, SCTP_ADDR_NOT_LOCKED);
6093 if (TAILQ_EMPTY(&stcb->asoc.send_queue) &&
6094 TAILQ_EMPTY(&stcb->asoc.sent_queue) &&
6095 (stcb->asoc.stream_queue_cnt == 0)) {
6190 if (info->snd_sid < stcb->asoc.streamoutcnt) {
6191 stcb->asoc.def_send.sinfo_stream = info->snd_sid;
6192 policy = PR_SCTP_POLICY(stcb->asoc.def_send.sinfo_flags);
6193 stcb->asoc.def_send.sinfo_flags = info->snd_flags;
6194 stcb->asoc.def_send.sinfo_flags |= policy;
6195 stcb->asoc.def_send.sinfo_ppid = info->snd_ppid;
6196 stcb->asoc.def_send.sinfo_context = info->snd_context;
6223 if (info->snd_sid < stcb->asoc.streamoutcnt) {
6224 stcb->asoc.def_send.sinfo_stream = info->snd_sid;
6225 policy = PR_SCTP_POLICY(stcb->asoc.def_send.sinfo_flags);
6226 stcb->asoc.def_send.sinfo_flags = info->snd_flags;
6227 stcb->asoc.def_send.sinfo_flags |= policy;
6228 stcb->asoc.def_send.sinfo_ppid = info->snd_ppid;
6229 stcb->asoc.def_send.sinfo_context = info->snd_context;
6254 stcb->asoc.def_send.sinfo_flags &= 0xfff0;
6255 stcb->asoc.def_send.sinfo_flags |= info->pr_policy;
6256 stcb->asoc.def_send.sinfo_timetolive = info->pr_value;
6276 stcb->asoc.def_send.sinfo_flags &= 0xfff0;
6277 stcb->asoc.def_send.sinfo_flags |= info->pr_policy;
6278 stcb->asoc.def_send.sinfo_timetolive = info->pr_value;
6408 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
6439 stcb->asoc.def_net_failure = thlds->spt_pathmaxrxt;
6440 stcb->asoc.def_net_pf_threshold = thlds->spt_pathpfthld;
6544 stcb->asoc.port = encaps->sue_port;
6809 stcb->asoc.max_cwnd = av->assoc_value;
6810 if (stcb->asoc.max_cwnd > 0) {
6811 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
6812 if ((net->cwnd > stcb->asoc.max_cwnd) &&
6814 net->cwnd = stcb->asoc.max_cwnd;
7074 (void)SCTP_GETTIME_TIMEVAL(&stcb->asoc.time_entered);
7300 store = stcb->asoc.primary_destination->ro._l_addr;
7326 if (stcb->asoc.state & SCTP_STATE_ABOUT_TO_BE_FREED) {
7397 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
7489 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {