Home | History | Annotate | Download | only in netinet

Lines Matching defs:asoc

66 sctp_audit_retranmission_queue(struct sctp_association *asoc)
71 asoc->sent_queue_retran_cnt,
72 asoc->sent_queue_cnt);
73 asoc->sent_queue_retran_cnt = 0;
74 asoc->sent_queue_cnt = 0;
75 TAILQ_FOREACH(chk, &asoc->sent_queue, sctp_next) {
77 sctp_ucount_incr(asoc->sent_queue_retran_cnt);
79 asoc->sent_queue_cnt++;
81 TAILQ_FOREACH(chk, &asoc->control_send_queue, sctp_next) {
83 sctp_ucount_incr(asoc->sent_queue_retran_cnt);
86 TAILQ_FOREACH(chk, &asoc->asconf_send_queue, sctp_next) {
88 sctp_ucount_incr(asoc->sent_queue_retran_cnt);
92 asoc->sent_queue_retran_cnt,
93 asoc->sent_queue_cnt);
133 stcb->asoc.overall_error_count,
134 (stcb->asoc.overall_error_count+1),
138 stcb->asoc.overall_error_count++;
143 stcb->asoc.overall_error_count,
144 (stcb->asoc.overall_error_count+1),
148 stcb->asoc.overall_error_count++;
151 (void *)&stcb->asoc, stcb->asoc.overall_error_count,
158 if (stcb->asoc.overall_error_count > threshold) {
187 if (stcb->asoc.numnets == 1) {
189 return (TAILQ_FIRST(&stcb->asoc.nets));
199 TAILQ_FOREACH(mnet, &stcb->asoc.nets, sctp_next) {
259 if (stcb->asoc.hb_random_idx > 3) {
261 memcpy(stcb->asoc.hb_random_values, &rndval, sizeof(stcb->asoc.hb_random_values));
262 this_random = stcb->asoc.hb_random_values[0];
263 stcb->asoc.hb_random_idx++;
264 stcb->asoc.hb_ect_randombit = 0;
266 this_random = stcb->asoc.hb_random_values[stcb->asoc.hb_random_idx];
267 stcb->asoc.hb_random_idx++;
268 stcb->asoc.hb_ect_randombit = 0;
286 TAILQ_FOREACH(mnet, &stcb->asoc.nets, sctp_next) {
302 if (stcb->asoc.hb_random_idx > 3) {
304 memcpy(stcb->asoc.hb_random_values, &rndval,
305 sizeof(stcb->asoc.hb_random_values));
306 this_random = stcb->asoc.hb_random_values[0];
307 stcb->asoc.hb_random_idx = 0;
308 stcb->asoc.hb_ect_randombit = 0;
310 this_random = stcb->asoc.hb_random_values[stcb->asoc.hb_random_idx];
311 stcb->asoc.hb_random_idx++;
312 stcb->asoc.hb_ect_randombit = 0;
328 mnet = TAILQ_FIRST(&stcb->asoc.nets);
341 alt = TAILQ_FIRST(&stcb->asoc.nets);
370 return (TAILQ_FIRST(&stcb->asoc.nets));
378 alt = TAILQ_FIRST(&stcb->asoc.nets);
402 net->RTO = stcb->asoc.minrto;
405 if (net->RTO > stcb->asoc.maxrto) {
406 net->RTO = stcb->asoc.maxrto;
411 stcb->asoc.cc_functions.sctp_cwnd_update_after_timeout(stcb, net);
420 struct sctp_association *asoc;
422 asoc = &stcb->asoc;
423 TAILQ_FOREACH_SAFE(chk, &asoc->sent_queue, sctp_next, nchk) {
424 if (SCTP_TSN_GE(asoc->last_acked_seq, chk->rec.data.TSN_seq)) {
426 (void *)chk, chk->rec.data.TSN_seq, asoc->last_acked_seq);
428 if (asoc->strmout[chk->rec.data.stream_number].chunks_on_queues > 0) {
429 asoc->strmout[chk->rec.data.stream_number].chunks_on_queues--;
432 TAILQ_REMOVE(&asoc->sent_queue, chk, sctp_next);
434 if (asoc->pr_sctp_cnt != 0)
435 asoc->pr_sctp_cnt--;
439 sctp_free_bufspace(stcb, asoc, chk, 1);
442 if (asoc->peer_supports_prsctp && PR_SCTP_BUF_ENABLED(chk->flags)) {
443 asoc->sent_queue_cnt_removeable--;
446 asoc->sent_queue_cnt--;
451 TAILQ_FOREACH(chk, &asoc->sent_queue, sctp_next) {
497 stcb->asoc.peers_rwnd,
501 sctp_log_fr(net->flight_size, net->cwnd, stcb->asoc.total_flight, SCTP_FR_CWND_REPORT);
529 orig_tf = stcb->asoc.total_flight;
539 TAILQ_FOREACH_SAFE(chk, &stcb->asoc.sent_queue, sctp_next, nchk) {
540 if (SCTP_TSN_GE(stcb->asoc.last_acked_seq, chk->rec.data.TSN_seq)) {
543 (unsigned int)stcb->asoc.last_acked_seq, (unsigned int)chk->rec.data.TSN_seq);
600 if (stcb->asoc.peer_supports_prsctp && PR_SCTP_TTL_ENABLED(chk->flags)) {
618 if (stcb->asoc.peer_supports_prsctp && PR_SCTP_RTX_ENABLED(chk->flags)) {
632 sctp_ucount_incr(stcb->asoc.sent_queue_retran_cnt);
650 stcb->asoc.marked_retrans++;
660 stcb->asoc.peers_rwnd += chk->send_size;
661 stcb->asoc.peers_rwnd += SCTP_BASE_SYSCTL(sctp_peer_chunk_oh);
683 if (TAILQ_EMPTY(&stcb->asoc.send_queue)) {
684 chk->rec.data.fast_retran_tsn = stcb->asoc.sending_seq;
686 chk->rec.data.fast_retran_tsn = (TAILQ_FIRST(&stcb->asoc.send_queue))->rec.data.TSN_seq;
691 if (stcb->asoc.sctp_cmt_on_off > 0) {
704 if ((orig_flight - net->flight_size) != (orig_tf - stcb->asoc.total_flight)) {
717 num_mk, (u_long)stcb->asoc.peers_rwnd);
722 (int)stcb->asoc.peers_rwnd);
731 TAILQ_FOREACH(chk, &stcb->asoc.control_send_queue, sctp_next) {
741 sctp_ucount_incr(stcb->asoc.sent_queue_retran_cnt);
748 if ((stcb->asoc.sent_queue_retran_cnt == 0) && (could_be_sent)) {
750 sctp_ucount_incr(stcb->asoc.sent_queue_retran_cnt);
755 if (stcb->asoc.sent_queue_retran_cnt != cnt_mk) {
757 SCTP_PRINTF("Local Audit says there are %d for retran asoc cnt:%d we marked:%d this time\n",
758 cnt_mk, stcb->asoc.sent_queue_retran_cnt, num_mk);
761 stcb->asoc.sent_queue_retran_cnt = cnt_mk;
768 stcb->asoc.total_flight = 0;
769 stcb->asoc.total_flight_count = 0;
771 TAILQ_FOREACH(lnets, &stcb->asoc.nets, sctp_next) {
777 TAILQ_FOREACH(chk, &stcb->asoc.sent_queue, sctp_next) {
811 TAILQ_FOREACH(lnet, &stcb->asoc.nets, sctp_next) {
820 if ((stcb->asoc.peers_rwnd == 0) &&
821 (stcb->asoc.total_flight < net->mtu)) {
831 stcb->asoc.max_send_times)) {
835 if (net != stcb->asoc.primary_destination) {
865 stcb->asoc.max_send_times)) {
870 if (stcb->asoc.sctp_cmt_on_off > 0) {
899 stcb->asoc.fast_retran_loss_recovery = 0;
903 if ((stcb->asoc.cc_functions.sctp_cwnd_new_transmission_begins) &&
905 (*stcb->asoc.cc_functions.sctp_cwnd_new_transmission_begins)(stcb, net);
911 stcb->asoc.sat_t3_loss_recovery = 1;
912 stcb->asoc.sat_t3_recovery_tsn = stcb->asoc.sending_seq;
938 if ((stcb->asoc.primary_destination == net) && (alt != net)) {
946 if (stcb->asoc.alternate) {
947 sctp_free_remote_addr(stcb->asoc.alternate);
949 stcb->asoc.alternate = alt;
950 atomic_add_int(&stcb->asoc.alternate->ref_count, 1);
957 if (SCTP_GET_STATE(&stcb->asoc) == SCTP_STATE_COOKIE_ECHOED) {
960 * have not established the asoc
965 if (stcb->asoc.peer_supports_prsctp) {
968 lchk = sctp_try_advance_peer_ack_point(stcb, &stcb->asoc);
970 if (SCTP_TSN_GT(stcb->asoc.advanced_peer_ack_point, stcb->asoc.last_acked_seq)) {
971 send_forward_tsn(stcb, &stcb->asoc);
990 if (stcb->asoc.delayed_connection) {
995 stcb->asoc.delayed_connection = 0;
999 if (SCTP_GET_STATE((&stcb->asoc)) != SCTP_STATE_COOKIE_WAIT) {
1003 stcb->asoc.max_init_times)) {
1007 stcb->asoc.dropped_special_cnt = 0;
1008 sctp_backoff_on_timeout(stcb, stcb->asoc.primary_destination, 1, 0, 0);
1009 if (stcb->asoc.initial_init_rto_max < net->RTO) {
1010 net->RTO = stcb->asoc.initial_init_rto_max;
1012 if (stcb->asoc.numnets > 1) {
1016 alt = sctp_find_alternate_net(stcb, stcb->asoc.primary_destination, 0);
1017 if (alt != stcb->asoc.primary_destination) {
1018 sctp_move_chunks_from_net(stcb, stcb->asoc.primary_destination);
1019 stcb->asoc.primary_destination = alt;
1041 TAILQ_FOREACH(cookie, &stcb->asoc.control_send_queue, sctp_next) {
1047 if (SCTP_GET_STATE(&stcb->asoc) == SCTP_STATE_COOKIE_ECHOED) {
1059 asoc));
1067 stcb->asoc.max_init_times)) {
1075 stcb->asoc.dropped_special_cnt = 0;
1085 sctp_ucount_incr(stcb->asoc.sent_queue_retran_cnt);
1103 if (stcb->asoc.stream_reset_outstanding == 0) {
1107 (void)sctp_find_stream_reset(stcb, stcb->asoc.str_reset_seq_out, &strrst);
1113 stcb->asoc.max_send_times)) {
1128 TAILQ_FOREACH(chk, &stcb->asoc.control_send_queue, sctp_next) {
1134 sctp_ucount_incr(stcb->asoc.sent_queue_retran_cnt);
1149 sctp_ucount_incr(stcb->asoc.sent_queue_retran_cnt);
1165 if (TAILQ_EMPTY(&stcb->asoc.asconf_send_queue)) {
1174 asconf = TAILQ_FIRST(&stcb->asoc.asconf_send_queue);
1180 stcb->asoc.max_send_times)) {
1184 if (asconf->snd_count > stcb->asoc.max_send_times) {
1208 TAILQ_FOREACH(chk, &stcb->asoc.control_send_queue, sctp_next) {
1215 sctp_ucount_incr(stcb->asoc.sent_queue_retran_cnt);
1220 TAILQ_FOREACH(chk, &stcb->asoc.asconf_send_queue, sctp_next) {
1227 sctp_ucount_incr(stcb->asoc.sent_queue_retran_cnt);
1239 sctp_ucount_incr(stcb->asoc.sent_queue_retran_cnt);
1253 if (stcb->asoc.deleted_primary == NULL) {
1259 SCTPDBG_ADDR(SCTP_DEBUG_ASCONF1, &stcb->asoc.deleted_primary->ro._l_addr.sa);
1260 sctp_free_remote_addr(stcb->asoc.deleted_primary);
1261 stcb->asoc.deleted_primary = NULL;
1279 if (sctp_threshold_management(inp, stcb, net, stcb->asoc.max_send_times)) {
1302 if (sctp_threshold_management(inp, stcb, net, stcb->asoc.max_send_times)) {
1331 if (stcb->asoc.sent_queue_retran_cnt) {
1333 stcb->asoc.sent_queue_retran_cnt);
1334 stcb->asoc.sent_queue_retran_cnt = 0;
1336 if (stcb->asoc.ss_functions.sctp_ss_is_empty(stcb, &stcb->asoc)) {
1338 stcb->asoc.ss_functions.sctp_ss_init(stcb, &stcb->asoc, 0);
1339 if (!stcb->asoc.ss_functions.sctp_ss_is_empty(stcb, &stcb->asoc)) {
1344 stcb->asoc.total_output_queue_size = 0;
1348 for (i = 0; i < stcb->asoc.streamoutcnt; i++) {
1349 if (!TAILQ_EMPTY(&stcb->asoc.strmout[i].outqueue)) {
1350 TAILQ_FOREACH(sp, &stcb->asoc.strmout[i].outqueue, next) {
1357 if (chks_in_queue != stcb->asoc.stream_queue_cnt) {
1359 stcb->asoc.stream_queue_cnt, chks_in_queue);
1364 if ((TAILQ_EMPTY(&stcb->asoc.send_queue)) &&
1365 (TAILQ_EMPTY(&stcb->asoc.sent_queue))) {
1377 (u_long)stcb->asoc.total_output_queue_size);
1378 stcb->asoc.total_output_queue_size = 0;
1403 if (sctp_threshold_management(inp, stcb, net, stcb->asoc.max_send_times)) {
1412 if ((stcb->asoc.total_output_queue_size > 0) &&
1413 (TAILQ_EMPTY(&stcb->asoc.send_queue)) &&
1414 (TAILQ_EMPTY(&stcb->asoc.sent_queue))) {
1488 net, 0, stcb->asoc.vrf_id);
1523 struct sctp_association *asoc;
1527 if (stcb->asoc.sctp_autoclose_ticks &&
1530 asoc = &stcb->asoc;
1532 if (asoc->time_last_rcvd.tv_sec >
1533 asoc->time_last_sent.tv_sec) {
1534 tim_touse = &asoc->time_last_rcvd;
1536 tim_touse = &asoc->time_last_sent;
1541 (ticks_gone_by >= (int)asoc->sctp_autoclose_ticks)) {
1551 if (TAILQ_EMPTY(&asoc->send_queue) &&
1552 TAILQ_EMPTY(&asoc->sent_queue)) {
1557 if (SCTP_GET_STATE(asoc) != SCTP_STATE_SHUTDOWN_SENT) {
1561 if ((SCTP_GET_STATE(asoc) == SCTP_STATE_OPEN) ||
1562 (SCTP_GET_STATE(asoc) == SCTP_STATE_SHUTDOWN_RECEIVED)) {
1565 SCTP_SET_STATE(asoc, SCTP_STATE_SHUTDOWN_SENT);
1566 SCTP_CLEAR_SUBSTATE(asoc, SCTP_STATE_SHUTDOWN_PENDING);
1568 if (stcb->asoc.alternate) {
1569 netp = stcb->asoc.alternate;
1571 netp = stcb->asoc.primary_destination;
1590 tmp = asoc->sctp_autoclose_ticks;
1591 asoc->sctp_autoclose_ticks -= ticks_gone_by;
1595 asoc->sctp_autoclose_ticks = tmp;