Lines Matching full:tsn

134     uint32_t tsn, uint32_t ppid,  in sctp_build_readq_entry()  argument
150 read_queue_e->sinfo_tsn = tsn; in sctp_build_readq_entry()
151 read_queue_e->sinfo_cumtsn = tsn; in sctp_build_readq_entry()
283 sctp_mark_non_revokable(struct sctp_association *asoc, uint32_t tsn) in sctp_mark_non_revokable() argument
291 if (SCTP_TSN_GE(asoc->cumulative_tsn, tsn)) { in sctp_mark_non_revokable()
293 * This tsn is behind the cum ack and thus we don't need to in sctp_mark_non_revokable()
298 SCTP_CALC_TSN_TO_GAP(gap, tsn, asoc->mapping_array_base_tsn); in sctp_mark_non_revokable()
304 if (SCTP_TSN_GT(tsn, asoc->highest_tsn_inside_nr_map)) { in sctp_mark_non_revokable()
305 asoc->highest_tsn_inside_nr_map = tsn; in sctp_mark_non_revokable()
310 if (tsn == asoc->highest_tsn_inside_map) { in sctp_mark_non_revokable()
312 for (i = tsn - 1; SCTP_TSN_GE(i, asoc->mapping_array_base_tsn); i--) { in sctp_mark_non_revokable()
423 "Reass %x,CF:%x,TSN=%8.8x,SID=%4.4x,FSN=%8.8x,MID:%8.8x", in sctp_abort_in_reasm()
426 chk->rec.data.tsn, in sctp_abort_in_reasm()
431 "Reass %x,CI:%x,TSN=%8.8x,SID=%4.4x,FSN=%4.4x,SSN:%4.4x", in sctp_abort_in_reasm()
434 chk->rec.data.tsn, in sctp_abort_in_reasm()
485 * could use the TSN to keep track of things, but this scheme breaks in sctp_queue_data_to_stream()
488 * send a message to stream 0. You have a situation where the TSN in sctp_queue_data_to_stream()
491 * TSN. in sctp_queue_data_to_stream()
493 * Could it also be legal for a peer to send ssn 1 with TSN 2 and in sctp_queue_data_to_stream()
494 * ssn 2 with TSN 1? If the peer is doing some sort of funky TSN/SSN in sctp_queue_data_to_stream()
521 SCTP_SNPRINTF(msg, sizeof(msg), "Delivered MID=%8.8x, got TSN=%8.8x, SID=%4.4x, MID=%8.8x", in sctp_queue_data_to_stream()
525 SCTP_SNPRINTF(msg, sizeof(msg), "Delivered SSN=%4.4x, got TSN=%8.8x, SID=%4.4x, SSN=%4.4x", in sctp_queue_data_to_stream()
759 * chunks/TSN's go to mid 0. So we have to do the old style watching in sctp_handle_old_unordered_data()
818 nc->sinfo_tsn = tchk->rec.data.tsn; in sctp_handle_old_unordered_data()
819 sctp_mark_non_revokable(asoc, tchk->rec.data.tsn); in sctp_handle_old_unordered_data()
917 * TSN than this one, even though this has a first, in sctp_inject_old_unordered_data()
926 * FIRST is greater then the old first (TSN i.e. FSN in sctp_inject_old_unordered_data()
943 * started the pd-api on the higher TSN in sctp_inject_old_unordered_data()
944 * (since the equals part is a TSN failure in sctp_inject_old_unordered_data()
950 * more TSN's higher before the in sctp_inject_old_unordered_data()
976 /* Fix the TSN included */ in sctp_inject_old_unordered_data()
978 control->sinfo_tsn = chk->rec.data.tsn; in sctp_inject_old_unordered_data()
979 chk->rec.data.tsn = tmp; in sctp_inject_old_unordered_data()
990 control->sinfo_tsn = chk->rec.data.tsn; in sctp_inject_old_unordered_data()
993 sctp_mark_non_revokable(asoc, chk->rec.data.tsn); in sctp_inject_old_unordered_data()
1015 * should not happen since the FSN is a TSN and it in sctp_inject_old_unordered_data()
1299 sctp_mark_non_revokable(asoc, chk->rec.data.tsn); in sctp_add_chk_to_control()
1303 control->sinfo_tsn = chk->rec.data.tsn; in sctp_add_chk_to_control()
1356 int *abort_flag, uint32_t tsn) in sctp_queue_data_for_reasm() argument
1386 if ((tsn == (asoc->cumulative_tsn + 1) && (asoc->idata_supported == 0))) { in sctp_queue_data_for_reasm()
1430 control->sinfo_tsn = chk->rec.data.tsn; in sctp_queue_data_for_reasm()
1433 sctp_mark_non_revokable(asoc, chk->rec.data.tsn); in sctp_queue_data_for_reasm()
1471 * we know the first FSN (which is the TSN). in sctp_queue_data_for_reasm()
1500 * we know the first FSN (which is the TSN). in sctp_queue_data_for_reasm()
1571 * wrapped. Maybe I should compare to TSN in sctp_queue_data_for_reasm()
1684 uint32_t tsn, fsn, gap, mid; in sctp_process_a_data_chunk() local
1706 tsn = ntohl(chunk->dp.tsn); in sctp_process_a_data_chunk()
1723 tsn = ntohl(chunk->dp.tsn); in sctp_process_a_data_chunk()
1726 fsn = tsn; in sctp_process_a_data_chunk()
1733 op_err = sctp_generate_no_user_data_cause(tsn); in sctp_process_a_data_chunk()
1744 sctp_log_map(tsn, asoc->cumulative_tsn, asoc->highest_tsn_inside_map, SCTP_MAP_TSN_ENTERS); in sctp_process_a_data_chunk()
1749 SCTP_LTRACE_CHK(stcb->sctp_ep, stcb, chk_type, tsn); in sctp_process_a_data_chunk()
1750 if (SCTP_TSN_GE(asoc->cumulative_tsn, tsn)) { in sctp_process_a_data_chunk()
1755 asoc->dup_tsns[asoc->numduptsns] = tsn; in sctp_process_a_data_chunk()
1761 /* Calculate the number of TSN's between the base and this TSN */ in sctp_process_a_data_chunk()
1762 SCTP_CALC_TSN_TO_GAP(gap, tsn, asoc->mapping_array_base_tsn); in sctp_process_a_data_chunk()
1774 if (SCTP_TSN_GT(tsn, *high_tsn)) { in sctp_process_a_data_chunk()
1775 *high_tsn = tsn; in sctp_process_a_data_chunk()
1783 asoc->dup_tsns[asoc->numduptsns] = tsn; in sctp_process_a_data_chunk()
1807 * MAY let one through only IF this TSN is the one we are waiting in sctp_process_a_data_chunk()
1836 if (SCTP_TSN_GT(tsn, asoc->highest_tsn_inside_nr_map)) { in sctp_process_a_data_chunk()
1837 asoc->highest_tsn_inside_nr_map = tsn; in sctp_process_a_data_chunk()
1839 if (tsn == (asoc->cumulative_tsn + 1)) { in sctp_process_a_data_chunk()
1841 asoc->cumulative_tsn = tsn; in sctp_process_a_data_chunk()
1882 "All fragments of a user message must be ordered or unordered (TSN=%8.8x)", in sctp_process_a_data_chunk()
1883 tsn); in sctp_process_a_data_chunk()
1892 "All fragments of a user message must be ordered or unordered (TSN=%8.8x)", in sctp_process_a_data_chunk()
1893 tsn); in sctp_process_a_data_chunk()
1911 (tsn == control->fsn_included + 1) && in sctp_process_a_data_chunk()
1938 if (SCTP_TSN_GT(tsn, asoc->highest_tsn_inside_map) && in sctp_process_a_data_chunk()
1939 SCTP_TSN_GT(tsn, asoc->highest_tsn_inside_nr_map)) { in sctp_process_a_data_chunk()
1968 asoc->in_tsnlog[asoc->tsn_in_at].tsn = tsn; in sctp_process_a_data_chunk()
1980 * an evil attacker. We can only have Nk chunks based on our TSN in sctp_process_a_data_chunk()
1994 SCTP_SNPRINTF(msg, sizeof(msg), "Delivered MID=%8.8x, got TSN=%8.8x, SID=%4.4x, MID=%8.8x", in sctp_process_a_data_chunk()
1996 tsn, in sctp_process_a_data_chunk()
2000 SCTP_SNPRINTF(msg, sizeof(msg), "Delivered SSN=%4.4x, got TSN=%8.8x, SID=%4.4x, SSN=%4.4x", in sctp_process_a_data_chunk()
2002 tsn, in sctp_process_a_data_chunk()
2073 sctp_build_readq_entry_mac(control, stcb, asoc->context, net, tsn, in sctp_process_a_data_chunk()
2117 if (SCTP_TSN_GT(tsn, asoc->highest_tsn_inside_nr_map)) { in sctp_process_a_data_chunk()
2118 asoc->highest_tsn_inside_nr_map = tsn; in sctp_process_a_data_chunk()
2133 sctp_log_strm_del_alt(stcb, tsn, mid, sid, in sctp_process_a_data_chunk()
2152 chk->rec.data.tsn = tsn; in sctp_process_a_data_chunk()
2170 /* Set the appropriate TSN mark */ in sctp_process_a_data_chunk()
2173 if (SCTP_TSN_GT(tsn, asoc->highest_tsn_inside_nr_map)) { in sctp_process_a_data_chunk()
2174 asoc->highest_tsn_inside_nr_map = tsn; in sctp_process_a_data_chunk()
2178 if (SCTP_TSN_GT(tsn, asoc->highest_tsn_inside_map)) { in sctp_process_a_data_chunk()
2179 asoc->highest_tsn_inside_map = tsn; in sctp_process_a_data_chunk()
2193 SCTP_TSN_GT(tsn, liste->tsn)) { in sctp_process_a_data_chunk()
2254 sctp_queue_data_for_reasm(stcb, asoc, control, chk, created_control, abort_flag, tsn); in sctp_process_a_data_chunk()
2267 if (tsn == (asoc->cumulative_tsn + 1)) { in sctp_process_a_data_chunk()
2269 asoc->cumulative_tsn = tsn; in sctp_process_a_data_chunk()
2282 sctp_log_strm_del_alt(stcb, tsn, mid, sid, SCTP_STR_LOG_FROM_MARK_TSN); in sctp_process_a_data_chunk()
2294 SCTP_TSN_GE(asoc->cumulative_tsn, liste->tsn)) { in sctp_process_a_data_chunk()
2296 * we have finished working through the backlogged TSN's now in sctp_process_a_data_chunk()
2323 if (SCTP_TSN_GT(control->sinfo_tsn, liste->tsn)) { in sctp_process_a_data_chunk()
2327 * if control->sinfo_tsn is <= liste->tsn we in sctp_process_a_data_chunk()
2329 * control->sinfo_tsn > liste->tsn in sctp_process_a_data_chunk()
2428 panic("huh, cumack 0x%x greater than high-tsn 0x%x in map", in sctp_slide_mapping_arrays()
2431 SCTP_PRINTF("huh, cumack 0x%x greater than high-tsn 0x%x in map - should panic?\n", in sctp_slide_mapping_arrays()
2477 * TSN value in sctp_slide_mapping_arrays()
2953 * CMT: CUCv2 algorithm. For each TSN being in sctp_process_segment_range()
2963 tp1->whoTo->pseudo_cumack = tp1->rec.data.tsn; in sctp_process_segment_range()
2969 tp1->whoTo->rtx_pseudo_cumack = tp1->rec.data.tsn; in sctp_process_segment_range()
2972 if (tp1->rec.data.tsn == theTSN) { in sctp_process_segment_range()
2986 if (SCTP_TSN_GT(tp1->rec.data.tsn, in sctp_process_segment_range()
2988 *biggest_newly_acked_tsn = tp1->rec.data.tsn; in sctp_process_segment_range()
3000 if (SCTP_TSN_GT(tp1->rec.data.tsn, in sctp_process_segment_range()
3003 tp1->rec.data.tsn; in sctp_process_segment_range()
3013 tp1->rec.data.tsn, in sctp_process_segment_range()
3018 *this_sack_lowest_newack = tp1->rec.data.tsn; in sctp_process_segment_range()
3028 if (tp1->rec.data.tsn == tp1->whoTo->pseudo_cumack) { in sctp_process_segment_range()
3035 sctp_log_cwnd(stcb, tp1->whoTo, tp1->rec.data.tsn, SCTP_CWND_LOG_FROM_SACK); in sctp_process_segment_range()
3037 if (tp1->rec.data.tsn == tp1->whoTo->rtx_pseudo_cumack) { in sctp_process_segment_range()
3046 tp1->rec.data.tsn, in sctp_process_segment_range()
3056 tp1->rec.data.tsn); in sctp_process_segment_range()
3092 if (SCTP_TSN_GT(tp1->rec.data.tsn, in sctp_process_segment_range()
3095 tp1->rec.data.tsn; in sctp_process_segment_range()
3147 } /* if (tp1->tsn == theTSN) */ in sctp_process_segment_range()
3148 if (SCTP_TSN_GT(tp1->rec.data.tsn, theTSN)) { in sctp_process_segment_range()
3239 if (SCTP_TSN_GT(tp1->rec.data.tsn, cumack)) { in sctp_check_for_revoked()
3246 if (SCTP_TSN_GT(tp1->rec.data.tsn, biggest_tsn_acked)) { in sctp_check_for_revoked()
3262 tp1->rec.data.tsn); in sctp_check_for_revoked()
3274 tp1->rec.data.tsn, in sctp_check_for_revoked()
3308 sending_seq = tp1->rec.data.tsn; in sctp_strike_gap_ack_chunks()
3331 tp1->rec.data.tsn, in sctp_strike_gap_ack_chunks()
3335 if (SCTP_TSN_GT(tp1->rec.data.tsn, biggest_tsn_acked) || in sctp_strike_gap_ack_chunks()
3353 if (SCTP_TSN_GT(tp1->rec.data.tsn, asoc->this_sack_highest_gap) && in sctp_strike_gap_ack_chunks()
3355 /* we are beyond the tsn in the sack */ in sctp_strike_gap_ack_chunks()
3362 /* Continue strikin FWD-TSN chunks */ in sctp_strike_gap_ack_chunks()
3379 SCTP_TSN_GT(tp1->rec.data.tsn, in sctp_strike_gap_ack_chunks()
3394 * and if so we see if the biggest TSN we saw in the sack is in sctp_strike_gap_ack_chunks()
3396 * the tsn... otherwise we CAN strike the TSN. in sctp_strike_gap_ack_chunks()
3405 * Strike the TSN if in fast-recovery and cum-ack in sctp_strike_gap_ack_chunks()
3410 tp1->rec.data.tsn, in sctp_strike_gap_ack_chunks()
3429 * received after this missing TSN. in sctp_strike_gap_ack_chunks()
3432 SCTP_TSN_GT(this_sack_lowest_newack, tp1->rec.data.tsn)) { in sctp_strike_gap_ack_chunks()
3435 tp1->rec.data.tsn, in sctp_strike_gap_ack_chunks()
3466 * Strike the TSN, since this ack is in sctp_strike_gap_ack_chunks()
3472 tp1->rec.data.tsn, in sctp_strike_gap_ack_chunks()
3499 * missing TSN. in sctp_strike_gap_ack_chunks()
3504 tp1->rec.data.tsn)) { in sctp_strike_gap_ack_chunks()
3507 tp1->rec.data.tsn, in sctp_strike_gap_ack_chunks()
3522 } else if (SCTP_TSN_GT(tp1->rec.data.tsn, in sctp_strike_gap_ack_chunks()
3526 * algorithm i.e. we don't strike If our TSN is in sctp_strike_gap_ack_chunks()
3527 * larger than the Highest TSN Newly Acked. in sctp_strike_gap_ack_chunks()
3531 /* Strike the TSN */ in sctp_strike_gap_ack_chunks()
3534 tp1->rec.data.tsn, in sctp_strike_gap_ack_chunks()
3553 * received after this missing TSN. in sctp_strike_gap_ack_chunks()
3556 SCTP_TSN_GT(this_sack_lowest_newack, tp1->rec.data.tsn)) { in sctp_strike_gap_ack_chunks()
3559 tp1->rec.data.tsn, in sctp_strike_gap_ack_chunks()
3576 tp1->rec.data.tsn); in sctp_strike_gap_ack_chunks()
3621 sctp_log_fr(tp1->rec.data.tsn, tp1->snd_count, in sctp_strike_gap_ack_chunks()
3685 * SCTP_PRINTF("Marking TSN for FR new value %x\n", in sctp_strike_gap_ack_chunks()
3686 * (uint32_t)tpi->rec.data.tsn); in sctp_strike_gap_ack_chunks()
3702 * lowest TSN) and subtract one to get the in sctp_strike_gap_ack_chunks()
3709 ttt->rec.data.tsn; in sctp_strike_gap_ack_chunks()
3757 tp1->rec.data.tsn, 0, 0); in sctp_try_advance_peer_ack_point()
3762 * We can't fwd-tsn past any that are reliable aka in sctp_try_advance_peer_ack_point()
3805 if (SCTP_TSN_GT(tp1->rec.data.tsn, asoc->advanced_peer_ack_point)) { in sctp_try_advance_peer_ack_point()
3806 asoc->advanced_peer_ack_point = tp1->rec.data.tsn; in sctp_try_advance_peer_ack_point()
3808 } else if (tp1->rec.data.tsn == asoc->advanced_peer_ack_point) { in sctp_try_advance_peer_ack_point()
3843 SCTP_PRINTF("Chk TSN: %u size: %d inflight cnt: %d\n", in sctp_fs_audit()
3844 chk->rec.data.tsn, in sctp_fs_audit()
3881 /* TSN's skipped we do NOT move back. */ in sctp_window_probe_recovery()
3886 tp1->rec.data.tsn); in sctp_window_probe_recovery()
3905 tp1->rec.data.tsn); in sctp_window_probe_recovery()
3977 send_s = tp1->rec.data.tsn + 1; in sctp_express_handle_sack()
3988 "Cum ack %8.8x greater or equal than TSN %8.8x", in sctp_express_handle_sack()
4005 /* process the new consecutive TSN first */ in sctp_express_handle_sack()
4007 if (SCTP_TSN_GE(cumack, tp1->rec.data.tsn)) { in sctp_express_handle_sack()
4023 tp1->rec.data.tsn); in sctp_express_handle_sack()
4060 * cumack'd TSNs, for each TSN being in sctp_express_handle_sack()
4075 sctp_log_cwnd(stcb, tp1->whoTo, tp1->rec.data.tsn, SCTP_CWND_LOG_FROM_SACK); in sctp_express_handle_sack()
4110 tp1->rec.data.tsn, in sctp_express_handle_sack()
4352 /* C3. See if we need to send a Fwd-TSN */ in sctp_express_handle_sack()
4355 * ISSUE with ECN, see FWD-TSN processing. in sctp_express_handle_sack()
4360 /* try to FR fwd-tsn's that get lost too */ in sctp_express_handle_sack()
4486 send_s = tp1->rec.data.tsn + 1; in sctp_handle_sack()
4496 * no way, we have not even sent this TSN out yet. Peer is in sctp_handle_sack()
4502 SCTP_PRINTF("Got send_s from tsn:%x + 1 of tp1: %p\n", in sctp_handle_sack()
4503 tp1->rec.data.tsn, (void *)tp1); in sctp_handle_sack()
4509 "Cum ack %8.8x greater or equal than TSN %8.8x", in sctp_handle_sack()
4586 /* process the new consecutive TSN first */ in sctp_handle_sack()
4588 if (SCTP_TSN_GE(last_tsn, tp1->rec.data.tsn)) { in sctp_handle_sack()
4617 tp1->rec.data.tsn); in sctp_handle_sack()
4629 this_sack_lowest_newack = tp1->rec.data.tsn; in sctp_handle_sack()
4658 * cumack'd TSNs, for each TSN being in sctp_handle_sack()
4674 tp1->rec.data.tsn, in sctp_handle_sack()
4680 sctp_log_cwnd(stcb, tp1->whoTo, tp1->rec.data.tsn, SCTP_CWND_LOG_FROM_SACK); in sctp_handle_sack()
4757 if (SCTP_TSN_GT(tp1->rec.data.tsn, cum_ack)) { in sctp_handle_sack()
4792 tp1->rec.data.tsn, in sctp_handle_sack()
4854 tp1->rec.data.tsn); in sctp_handle_sack()
5168 /* C3. See if we need to send a Fwd-TSN */ in sctp_handle_sack()
5171 * ISSUE with ECN, see FWD-TSN processing. in sctp_handle_sack()
5181 /* try to FR fwd-tsn's that get lost too */ in sctp_handle_sack()
5397 if (SCTP_TSN_GT(chk->rec.data.tsn, cumtsn)) { in sctp_flush_reassm_for_str_seq()
5485 /* The pr-sctp fwd tsn */ in sctp_handle_forward_tsn()
5506 "Bad size too small/big fwd-tsn\n"); in sctp_handle_forward_tsn()
5520 * now we know the new TSN is more advanced, let's find the actual in sctp_handle_forward_tsn()
5536 "New cum ack %8.8x too high, highest TSN %8.8x", in sctp_handle_forward_tsn()
5575 /* Flush all the un-ordered data based on cum-tsn */ in sctp_handle_forward_tsn()