Lines Matching full:asoc

709 	loopback_scope = stcb->asoc.scope.loopback_scope;
711 ipv4_local_scope = stcb->asoc.scope.ipv4_local_scope;
712 ipv4_addr_legal = stcb->asoc.scope.ipv4_addr_legal;
715 local_scope = stcb->asoc.scope.local_scope;
716 site_scope = stcb->asoc.scope.site_scope;
717 ipv6_addr_legal = stcb->asoc.scope.ipv6_addr_legal;
721 vrf = sctp_find_vrf(stcb->asoc.vrf_id);
1043 if (stcb->asoc.state & SCTP_STATE_ABOUT_TO_BE_FREED) {
1054 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
1158 atomic_add_int(&locked_tcb->asoc.refcnt, 1);
1182 atomic_subtract_int(&locked_tcb->asoc.refcnt, 1);
1203 if (stcb->asoc.state & SCTP_STATE_ABOUT_TO_BE_FREED) {
1212 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
1245 atomic_subtract_int(&locked_tcb->asoc.refcnt, 1);
1275 atomic_subtract_int(&locked_tcb->asoc.refcnt, 1);
1304 if (stcb->asoc.state & SCTP_STATE_ABOUT_TO_BE_FREED) {
1313 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
1346 atomic_subtract_int(&locked_tcb->asoc.refcnt, 1);
1376 atomic_subtract_int(&locked_tcb->asoc.refcnt, 1);
1397 atomic_subtract_int(&locked_tcb->asoc.refcnt, 1);
1431 if (stcb->asoc.assoc_id == id) {
1440 if (stcb->asoc.state & SCTP_STATE_ABOUT_TO_BE_FREED) {
2010 if (stcb->asoc.my_vtag == vtag) {
2020 if (stcb->asoc.state & SCTP_STATE_ABOUT_TO_BE_FREED) {
2035 if (stcb->asoc.peer_vtag == remote_tag) {
2489 atomic_add_int(&stcb->asoc.refcnt, 1);
2495 atomic_subtract_int(&stcb->asoc.refcnt, 1);
2534 if (stcb->asoc.in_asocid_hash) {
2551 if (stcb->asoc.in_asocid_hash) {
2554 lhd = &new_inp->sctp_asocidhash[SCTP_PCBHASH_ASOC(stcb->asoc.assoc_id,
2559 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
2590 if (oladdr == stcb->asoc.last_used_address) {
2591 stcb->asoc.last_used_address = laddr;
2596 if (stcb->asoc.dack_timer.ep == old_inp) {
2598 stcb->asoc.dack_timer.ep = new_inp;
2601 if (stcb->asoc.asconf_timer.ep == old_inp) {
2603 stcb->asoc.asconf_timer.ep = new_inp;
2606 if (stcb->asoc.strreset_timer.ep == old_inp) {
2608 stcb->asoc.strreset_timer.ep = new_inp;
2611 if (stcb->asoc.shut_guard_timer.ep == old_inp) {
2613 stcb->asoc.shut_guard_timer.ep = new_inp;
2616 if (stcb->asoc.autoclose_timer.ep == old_inp) {
2618 stcb->asoc.autoclose_timer.ep = new_inp;
2621 if (stcb->asoc.delete_prim_timer.ep == old_inp) {
2623 stcb->asoc.delete_prim_timer.ep = new_inp;
2627 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
3248 if (stcb->asoc.state & SCTP_STATE_ABOUT_TO_BE_FREED) {
3251 if (stcb->asoc.state & SCTP_STATE_IN_ACCEPT_QUEUE) {
3254 * kill timer on the asoc due to it
3266 (stcb->asoc.total_output_queue_size == 0)) {
3280 if ((stcb->asoc.size_on_reasm_queue > 0) ||
3281 (stcb->asoc.size_on_all_streams > 0) ||
3299 } else if (TAILQ_EMPTY(&stcb->asoc.send_queue) &&
3300 TAILQ_EMPTY(&stcb->asoc.sent_queue) &&
3301 (stcb->asoc.stream_queue_cnt == 0)) {
3302 if ((*stcb->asoc.ss_functions.sctp_ss_is_user_msgs_incomplete) (stcb, &stcb->asoc)) {
3319 if (stcb->asoc.alternate) {
3320 netp = stcb->asoc.alternate;
3322 netp = stcb->asoc.primary_destination;
3333 if ((*stcb->asoc.ss_functions.sctp_ss_is_user_msgs_incomplete) (stcb, &stcb->asoc)) {
3336 if (TAILQ_EMPTY(&stcb->asoc.send_queue) &&
3337 TAILQ_EMPTY(&stcb->asoc.sent_queue) &&
3338 (stcb->asoc.state & SCTP_STATE_PARTIAL_MSG_LEFT)) {
3397 if (stcb->asoc.state & SCTP_STATE_ABOUT_TO_BE_FREED) {
3398 if (stcb->asoc.state & SCTP_STATE_IN_ACCEPT_QUEUE) {
3408 ((stcb->asoc.state & SCTP_STATE_ABOUT_TO_BE_FREED) == 0)) {
3415 } else if (stcb->asoc.state & SCTP_STATE_ABOUT_TO_BE_FREED) {
3497 * free each asoc if it is not already closed/free. we can't use the
3562 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
3643 stcb->asoc.scope.ipv4_local_scope = 1;
3648 (stcb->asoc.scope.ipv4_local_scope == 0)) {
3668 if (sctp_is_address_on_local_host(newaddr, stcb->asoc.vrf_id)) {
3669 stcb->asoc.scope.loopback_scope = 1;
3670 stcb->asoc.scope.local_scope = 0;
3671 stcb->asoc.scope.ipv4_local_scope = 1;
3672 stcb->asoc.scope.site_scope = 1;
3684 stcb->asoc.scope.ipv4_local_scope = 1;
3685 stcb->asoc.scope.site_scope = 1;
3692 stcb->asoc.scope.site_scope = 1;
3697 (stcb->asoc.scope.loopback_scope == 0)) {
3700 (stcb->asoc.scope.local_scope == 0)) {
3703 (stcb->asoc.scope.site_scope == 0)) {
3736 net->addr_is_local = sctp_is_address_on_local_host(newaddr, stcb->asoc.vrf_id);
3738 stcb->asoc.scope.loopback_scope = 1;
3739 stcb->asoc.scope.ipv4_local_scope = 1;
3740 stcb->asoc.scope.local_scope = 0;
3741 stcb->asoc.scope.site_scope = 1;
3744 net->failure_threshold = stcb->asoc.def_net_failure;
3745 net->pf_threshold = stcb->asoc.def_net_pf_threshold;
3764 stcb->asoc.numnets++;
3766 net->cwr_window_tsn = net->last_cwr_tsn = stcb->asoc.sending_seq - 1;
3768 net->dscp = stcb->asoc.default_dscp;
3770 net->flowlabel = stcb->asoc.default_flowlabel;
3782 net->heart_beat_delay = stcb->asoc.heart_beat_delay;
3800 stcb->asoc.vrf_id,
3811 stcb->asoc.vrf_id);
3812 if (stcb->asoc.default_mtu > 0) {
3813 net->mtu = stcb->asoc.default_mtu;
3854 if (stcb->asoc.default_mtu > 0) {
3855 net->mtu = stcb->asoc.default_mtu;
3898 stcb->asoc.smallest_mtu = net->mtu;
3900 if (stcb->asoc.smallest_mtu > net->mtu) {
3913 if (stcb->asoc.cc_functions.sctp_set_initial_cc_param != NULL)
3914 (*stcb->asoc.cc_functions.sctp_set_initial_cc_param) (stcb, net);
3923 net->flowid = stcb->asoc.my_vtag ^
3930 netfirst = TAILQ_FIRST(&stcb->asoc.nets);
3933 TAILQ_INSERT_TAIL(&stcb->asoc.nets, net, sctp_next);
3936 TAILQ_INSERT_HEAD(&stcb->asoc.nets, net, sctp_next);
3942 TAILQ_INSERT_HEAD(&stcb->asoc.nets, net, sctp_next);
3948 TAILQ_INSERT_HEAD(&stcb->asoc.nets, net, sctp_next);
3962 TAILQ_INSERT_TAIL(&stcb->asoc.nets, net, sctp_next);
3969 TAILQ_INSERT_AFTER(&stcb->asoc.nets, netlook,
3979 if (stcb->asoc.primary_destination == 0) {
3980 stcb->asoc.primary_destination = net;
3981 } else if ((stcb->asoc.primary_destination->ro.ro_nh == NULL) &&
3985 stcb->asoc.primary_destination = net;
3988 net = TAILQ_FIRST(&stcb->asoc.nets);
3989 if ((net != stcb->asoc.primary_destination) &&
3990 (stcb->asoc.primary_destination)) {
3996 TAILQ_REMOVE(&stcb->asoc.nets,
3997 stcb->asoc.primary_destination, sctp_next);
3998 TAILQ_INSERT_HEAD(&stcb->asoc.nets,
3999 stcb->asoc.primary_destination, sctp_next);
4031 stcb->asoc.in_asocid_hash = 1;
4050 struct sctp_association *asoc;
4193 asoc = &stcb->asoc;
4210 asoc->assoc_id = sctp_aloc_a_assoc_id(inp, stcb);
4212 head = &SCTP_BASE_INFO(sctp_asochash)[SCTP_PCBHASH_ASOC(stcb->asoc.my_vtag, SCTP_BASE_INFO(hashasocmark))];
4218 if (asoc->strmout) {
4219 SCTP_FREE(asoc->strmout, SCTP_M_STRMO);
4220 asoc->strmout = NULL;
4222 if (asoc->mapping_array) {
4223 SCTP_FREE(asoc->mapping_array, SCTP_M_MAP);
4224 asoc->mapping_array = NULL;
4226 if (asoc->nr_mapping_array) {
4227 SCTP_FREE(asoc->nr_mapping_array, SCTP_M_MAP);
4228 asoc->nr_mapping_array = NULL;
4242 SCTP_OS_TIMER_INIT(&asoc->dack_timer.timer);
4243 SCTP_OS_TIMER_INIT(&asoc->strreset_timer.timer);
4244 SCTP_OS_TIMER_INIT(&asoc->asconf_timer.timer);
4245 SCTP_OS_TIMER_INIT(&asoc->shut_guard_timer.timer);
4246 SCTP_OS_TIMER_INIT(&asoc->autoclose_timer.timer);
4247 SCTP_OS_TIMER_INIT(&asoc->delete_prim_timer.timer);
4314 struct sctp_association *asoc;
4317 asoc = &stcb->asoc;
4318 asoc->numnets--;
4319 TAILQ_REMOVE(&asoc->nets, net, sctp_next);
4320 if (net == asoc->primary_destination) {
4324 lnet = TAILQ_FIRST(&asoc->nets);
4335 if (asoc->deleted_primary != NULL) {
4339 asoc->deleted_primary = net;
4350 asoc->primary_destination = sctp_find_alternate_net(stcb, lnet, 0);
4352 if (net == asoc->last_data_chunk_from) {
4354 asoc->last_data_chunk_from = TAILQ_FIRST(&asoc->nets);
4356 if (net == asoc->last_control_chunk_from) {
4358 asoc->last_control_chunk_from = NULL;
4360 if (net == asoc->last_net_cmt_send_started) {
4362 asoc->last_net_cmt_send_started = NULL;
4364 if (net == stcb->asoc.alternate) {
4365 sctp_free_remote_addr(stcb->asoc.alternate);
4366 stcb->asoc.alternate = NULL;
4386 * (tasoc->asoc.nets) and then if it is there, we do a LIST_REMOVE
4390 struct sctp_association *asoc;
4393 asoc = &stcb->asoc;
4396 TAILQ_FOREACH_SAFE(net, &asoc->nets, sctp_next, nnet) {
4403 if (asoc->numnets < 2) {
4556 struct sctp_association *asoc;
4574 if (stcb->asoc.state == 0) {
4578 /* there is no asoc, really TSNH :-0 */
4581 if (stcb->asoc.alternate) {
4582 sctp_free_remote_addr(stcb->asoc.alternate);
4583 stcb->asoc.alternate = NULL;
4592 asoc = &stcb->asoc;
4605 if ((stcb->asoc.state & SCTP_STATE_ABOUT_TO_BE_FREED) &&
4611 if (stcb->asoc.refcnt) {
4614 /* no asoc destroyed */
4625 if ((stcb->asoc.state & SCTP_STATE_ABOUT_TO_BE_FREED) == 0) {
4631 sq->sinfo_cumtsn = stcb->asoc.cumulative_tsn;
4659 if ((stcb->asoc.refcnt) || (stcb->asoc.state & SCTP_STATE_IN_ACCEPT_QUEUE)) {
4664 if ((stcb->asoc.refcnt) ||
4684 /* no asoc destroyed */
4696 * killing of the asoc. Note that after getting back the TCB lock we
4701 atomic_add_int(&stcb->asoc.refcnt, 1);
4744 atomic_subtract_int(&stcb->asoc.refcnt, 1);
4746 if (stcb->asoc.refcnt) {
4756 asoc->state = 0;
4760 if (stcb->asoc.in_asocid_hash) {
4774 sctp_add_vtag_to_timewait(asoc->my_vtag, inp->sctp_lport, stcb->rport);
4786 for (i = 0; i < asoc->streamoutcnt; i++) {
4789 outs = &asoc->strmout[i];
4792 atomic_subtract_int(&asoc->stream_queue_cnt, 1);
4794 stcb->asoc.ss_functions.sctp_ss_remove_from_stream(stcb, asoc, outs, sp);
4795 sctp_free_spbufspace(stcb, asoc, sp);
4817 TAILQ_FOREACH_SAFE(strrst, &asoc->resetHead, next_resp, nstrrst) {
4818 TAILQ_REMOVE(&asoc->resetHead, strrst, next_resp);
4821 TAILQ_FOREACH_SAFE(sq, &asoc->pending_reply_queue, next, nsq) {
4822 TAILQ_REMOVE(&asoc->pending_reply_queue, sq, next);
4834 TAILQ_FOREACH_SAFE(chk, &asoc->free_chunks, sctp_next, nchk) {
4835 TAILQ_REMOVE(&asoc->free_chunks, chk, sctp_next);
4845 asoc->free_chunk_cnt--;
4849 TAILQ_FOREACH_SAFE(chk, &asoc->send_queue, sctp_next, nchk) {
4850 if (asoc->strmout[chk->rec.data.sid].chunks_on_queues > 0) {
4851 asoc->strmout[chk->rec.data.sid].chunks_on_queues--;
4857 TAILQ_REMOVE(&asoc->send_queue, chk, sctp_next);
4880 TAILQ_FOREACH_SAFE(chk, &asoc->sent_queue, sctp_next, nchk) {
4882 if (asoc->strmout[chk->rec.data.sid].chunks_on_queues > 0) {
4883 asoc->strmout[chk->rec.data.sid].chunks_on_queues--;
4890 TAILQ_REMOVE(&asoc->sent_queue, chk, sctp_next);
4910 for (i = 0; i < stcb->asoc.streamoutcnt; i++) {
4911 if (stcb->asoc.strmout[i].chunks_on_queues > 0) {
4912 panic("%u chunks left for stream %u.", stcb->asoc.strmout[i].chunks_on_queues, i);
4917 TAILQ_FOREACH_SAFE(chk, &asoc->control_send_queue, sctp_next, nchk) {
4918 TAILQ_REMOVE(&asoc->control_send_queue, chk, sctp_next);
4931 TAILQ_FOREACH_SAFE(chk, &asoc->asconf_send_queue, sctp_next, nchk) {
4932 TAILQ_REMOVE(&asoc->asconf_send_queue, chk, sctp_next);
4944 if (asoc->mapping_array) {
4945 SCTP_FREE(asoc->mapping_array, SCTP_M_MAP);
4946 asoc->mapping_array = NULL;
4948 if (asoc->nr_mapping_array) {
4949 SCTP_FREE(asoc->nr_mapping_array, SCTP_M_MAP);
4950 asoc->nr_mapping_array = NULL;
4953 if (asoc->strmout) {
4954 SCTP_FREE(asoc->strmout, SCTP_M_STRMO);
4955 asoc->strmout = NULL;
4957 asoc->strm_realoutsize = asoc->streamoutcnt = 0;
4958 if (asoc->strmin) {
4959 for (i = 0; i < asoc->streamincnt; i++) {
4960 sctp_clean_up_stream(stcb, &asoc->strmin[i].inqueue);
4961 sctp_clean_up_stream(stcb, &asoc->strmin[i].uno_inqueue);
4963 SCTP_FREE(asoc->strmin, SCTP_M_STRMI);
4964 asoc->strmin = NULL;
4966 asoc->streamincnt = 0;
4967 TAILQ_FOREACH_SAFE(net, &asoc->nets, sctp_next, nnet) {
4973 TAILQ_REMOVE(&asoc->nets, net, sctp_next);
4976 LIST_FOREACH_SAFE(laddr, &asoc->sctp_restricted_addrs, sctp_nxt_addr, naddr) {
4982 TAILQ_FOREACH_SAFE(aparam, &asoc->asconf_queue, next, naparam) {
4984 TAILQ_REMOVE(&asoc->asconf_queue, aparam, next);
4987 TAILQ_FOREACH_SAFE(aack, &asoc->asconf_ack_sent, next, naack) {
4989 TAILQ_REMOVE(&asoc->asconf_ack_sent, aack, next);
4996 if (asoc->local_hmacs)
4997 sctp_free_hmaclist(asoc->local_hmacs);
4998 if (asoc->peer_hmacs)
4999 sctp_free_hmaclist(asoc->peer_hmacs);
5001 if (asoc->local_auth_chunks)
5002 sctp_free_chunklist(asoc->local_auth_chunks);
5003 if (asoc->peer_auth_chunks)
5004 sctp_free_chunklist(asoc->peer_auth_chunks);
5006 sctp_free_authinfo(&asoc->authinfo);
5008 LIST_FOREACH_SAFE(shared_key, &asoc->shared_keys, next, nshared_key) {
5059 /* destroyed the asoc */
5230 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
5237 stcb->asoc.primary_destination = net;
5287 if (stcb->asoc.last_used_address == laddr)
5289 stcb->asoc.last_used_address = NULL;
5294 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
5329 list = &stcb->asoc.sctp_restricted_addrs;
5379 LIST_FOREACH(laddr, &stcb->asoc.sctp_restricted_addrs, sctp_nxt_addr) {
5861 * nets structure in the asoc. The from address in the mbuf should
5929 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
5935 atomic_add_int(&stcb->asoc.refcnt, 1);
5937 atomic_subtract_int(&stcb->asoc.refcnt, 1);
5945 if (stcb->asoc.scope.ipv4_addr_legal) {
5954 if (stcb->asoc.scope.ipv6_addr_legal) {
5974 if (stcb->asoc.state == 0) {
5995 if (stcb->asoc.scope.ipv4_addr_legal) {
6018 atomic_add_int(&stcb->asoc.refcnt, 1);
6021 atomic_subtract_int(&stcb->asoc.refcnt, 1);
6036 if (stcb->asoc.state == 0) {
6044 if (stcb->asoc.state == 0) {
6079 if (stcb->asoc.state == 0) {
6090 if (stcb->asoc.scope.ipv6_addr_legal) {
6117 atomic_add_int(&stcb->asoc.refcnt, 1);
6120 atomic_subtract_int(&stcb->asoc.refcnt, 1);
6128 if (stcb->asoc.state == 0) {
6144 if (stcb->asoc.state == 0) {
6178 if (stcb->asoc.state == 0) {
6190 if (stcb->asoc.state != SCTP_STATE_OPEN) {
6198 stcb->asoc.peers_adaptation = ntohl(aip->indication);
6199 stcb->asoc.adaptation_needed = 1;
6210 if (stcb->asoc.asconf_supported == 0) {
6264 stcb->asoc.peer_supports_nat = 1;
6283 (ntohl(zero_chksum_p->edmid) == stcb->asoc.rcv_edmid)) {
6284 stcb->asoc.snd_edmid = stcb->asoc.rcv_edmid;
6376 if (stcb->asoc.peer_hmacs != NULL)
6377 sctp_free_hmaclist(stcb->asoc.peer_hmacs);
6378 stcb->asoc.peer_hmacs = sctp_alloc_hmaclist(num_hmacs);
6379 if (stcb->asoc.peer_hmacs != NULL) {
6381 (void)sctp_auth_add_hmacid(stcb->asoc.peer_hmacs,
6402 if (stcb->asoc.peer_auth_chunks != NULL)
6403 sctp_clear_chunklist(stcb->asoc.peer_auth_chunks);
6405 stcb->asoc.peer_auth_chunks = sctp_alloc_chunklist();
6408 stcb->asoc.peer_auth_chunks);
6448 TAILQ_FOREACH_SAFE(net, &stcb->asoc.nets, sctp_next, nnet) {
6451 /* This address has been removed from the asoc */
6453 stcb->asoc.numnets--;
6454 TAILQ_REMOVE(&stcb->asoc.nets, net, sctp_next);
6455 if (net == stcb->asoc.alternate) {
6456 sctp_free_remote_addr(stcb->asoc.alternate);
6457 stcb->asoc.alternate = NULL;
6459 if (net == stcb->asoc.primary_destination) {
6460 stcb->asoc.primary_destination = NULL;
6466 if ((stcb->asoc.ecn_supported == 1) &&
6468 stcb->asoc.ecn_supported = 0;
6470 if ((stcb->asoc.prsctp_supported == 1) &&
6472 stcb->asoc.prsctp_supported = 0;
6474 if ((stcb->asoc.auth_supported == 1) &&
6477 stcb->asoc.auth_supported = 0;
6479 if ((stcb->asoc.asconf_supported == 1) &&
6481 (stcb->asoc.auth_supported == 0) ||
6483 stcb->asoc.asconf_supported = 0;
6485 if ((stcb->asoc.reconfig_supported == 1) &&
6487 stcb->asoc.reconfig_supported = 0;
6489 if ((stcb->asoc.idata_supported == 1) &&
6491 stcb->asoc.idata_supported = 0;
6493 if ((stcb->asoc.nrsack_supported == 1) &&
6495 stcb->asoc.nrsack_supported = 0;
6497 if ((stcb->asoc.pktdrop_supported == 1) &&
6499 stcb->asoc.pktdrop_supported = 0;
6543 if (stcb->asoc.authinfo.peer_random != NULL)
6544 sctp_free_key(stcb->asoc.authinfo.peer_random);
6545 stcb->asoc.authinfo.peer_random = new_key;
6546 sctp_clear_cachedkeys(stcb, stcb->asoc.authinfo.assoc_keyid);
6547 sctp_clear_cachedkeys(stcb, stcb->asoc.authinfo.recv_keyid);
6570 stcb->asoc.primary_destination = net;
6572 (stcb->asoc.alternate != NULL)) {
6573 sctp_free_remote_addr(stcb->asoc.alternate);
6574 stcb->asoc.alternate = NULL;
6576 net = TAILQ_FIRST(&stcb->asoc.nets);
6577 if (net != stcb->asoc.primary_destination) {
6583 TAILQ_REMOVE(&stcb->asoc.nets, stcb->asoc.primary_destination, sctp_next);
6584 TAILQ_INSERT_HEAD(&stcb->asoc.nets, stcb->asoc.primary_destination, sctp_next);
6609 if (stcb->asoc.my_vtag == tag) {
6631 struct sctp_association *asoc;
6641 asoc = &stcb->asoc;
6642 if (asoc->cumulative_tsn == asoc->highest_tsn_inside_map) {
6647 cumulative_tsn_p1 = asoc->cumulative_tsn + 1;
6650 for (strmat = 0; strmat < asoc->streamincnt; strmat++) {
6651 TAILQ_FOREACH_SAFE(control, &asoc->strmin[strmat].inqueue, next_instrm, ncontrol) {
6661 SCTP_CALC_TSN_TO_GAP(gap, control->sinfo_tsn, asoc->mapping_array_base_tsn);
6663 if (asoc->size_on_all_streams >= control->length) {
6664 asoc->size_on_all_streams -= control->length;
6667 panic("size_on_all_streams = %u smaller than control length %u", asoc->size_on_all_streams, control->length);
6669 asoc->size_on_all_streams = 0;
6672 sctp_ucount_decr(asoc->cnt_on_all_streams);
6673 SCTP_UNSET_TSN_PRESENT(asoc->mapping_array, gap);
6678 TAILQ_REMOVE(&asoc->strmin[strmat].inqueue, control, next_instrm);
6688 SCTP_CALC_TSN_TO_GAP(gap, chk->rec.data.tsn, asoc->mapping_array_base_tsn);
6690 if (asoc->size_on_reasm_queue >= chk->send_size) {
6691 asoc->size_on_reasm_queue -= chk->send_size;
6694 panic("size_on_reasm_queue = %u smaller than chunk length %u", asoc->size_on_reasm_queue, chk->send_size);
6696 asoc->size_on_reasm_queue = 0;
6699 sctp_ucount_decr(asoc->cnt_on_reasm_queue);
6700 SCTP_UNSET_TSN_PRESENT(asoc->mapping_array, gap);
6711 TAILQ_FOREACH_SAFE(control, &asoc->strmin[strmat].uno_inqueue, next_instrm, ncontrol) {
6721 SCTP_CALC_TSN_TO_GAP(gap, control->sinfo_tsn, asoc->mapping_array_base_tsn);
6723 if (asoc->size_on_all_streams >= control->length) {
6724 asoc->size_on_all_streams -= control->length;
6727 panic("size_on_all_streams = %u smaller than control length %u", asoc->size_on_all_streams, control->length);
6729 asoc->size_on_all_streams = 0;
6732 sctp_ucount_decr(asoc->cnt_on_all_streams);
6733 SCTP_UNSET_TSN_PRESENT(asoc->mapping_array, gap);
6738 TAILQ_REMOVE(&asoc->strmin[strmat].uno_inqueue, control, next_instrm);
6748 SCTP_CALC_TSN_TO_GAP(gap, chk->rec.data.tsn, asoc->mapping_array_base_tsn);
6750 if (asoc->size_on_reasm_queue >= chk->send_size) {
6751 asoc->size_on_reasm_queue -= chk->send_size;
6754 panic("size_on_reasm_queue = %u smaller than chunk length %u", asoc->size_on_reasm_queue, chk->send_size);
6756 asoc->size_on_reasm_queue = 0;
6759 sctp_ucount_decr(asoc->cnt_on_reasm_queue);
6760 SCTP_UNSET_TSN_PRESENT(asoc->mapping_array, gap);
6774 for (i = asoc->highest_tsn_inside_map; SCTP_TSN_GE(i, asoc->mapping_array_base_tsn); i--) {
6775 SCTP_CALC_TSN_TO_GAP(gap, i, asoc->mapping_array_base_tsn);
6776 if (SCTP_IS_TSN_PRESENT(asoc->mapping_array, gap)) {
6777 asoc->highest_tsn_inside_map = i;
6783 asoc->highest_tsn_inside_map = asoc->mapping_array_base_tsn - 1;
6807 * asoc->highest_tsn_inside_map?
6809 asoc->last_revoke_count = cnt;