Lines Matching refs:chk

66     struct sctp_tmit_chunk *chk, int hold_rlock);
415 struct sctp_tmit_chunk *chk, in sctp_abort_in_reasm() argument
426 chk->rec.data.tsn, in sctp_abort_in_reasm()
427 chk->rec.data.sid, in sctp_abort_in_reasm()
428 chk->rec.data.fsn, chk->rec.data.mid); in sctp_abort_in_reasm()
434 chk->rec.data.tsn, in sctp_abort_in_reasm()
435 chk->rec.data.sid, in sctp_abort_in_reasm()
436 chk->rec.data.fsn, in sctp_abort_in_reasm()
437 (uint16_t)chk->rec.data.mid); in sctp_abort_in_reasm()
440 sctp_m_freem(chk->data); in sctp_abort_in_reasm()
441 chk->data = NULL; in sctp_abort_in_reasm()
442 sctp_free_a_chunk(stcb, chk, SCTP_SO_NOT_LOCKED); in sctp_abort_in_reasm()
454 struct sctp_tmit_chunk *chk, *nchk; in sctp_clean_up_control() local
456 TAILQ_FOREACH_SAFE(chk, &control->reasm, sctp_next, nchk) { in sctp_clean_up_control()
457 TAILQ_REMOVE(&control->reasm, chk, sctp_next); in sctp_clean_up_control()
458 if (chk->data) in sctp_clean_up_control()
459 sctp_m_freem(chk->data); in sctp_clean_up_control()
460 chk->data = NULL; in sctp_clean_up_control()
461 sctp_free_a_chunk(stcb, chk, SCTP_SO_NOT_LOCKED); in sctp_clean_up_control()
765 struct sctp_tmit_chunk *chk, *lchk, *tchk; in sctp_handle_old_unordered_data() local
779 TAILQ_FOREACH_SAFE(chk, &control->reasm, sctp_next, lchk) { in sctp_handle_old_unordered_data()
780 if (chk->rec.data.fsn == fsn) { in sctp_handle_old_unordered_data()
787 TAILQ_REMOVE(&control->reasm, chk, sctp_next); in sctp_handle_old_unordered_data()
788 sctp_add_chk_to_control(control, strm, stcb, asoc, chk, inp_read_lock_held); in sctp_handle_old_unordered_data()
791 chk = NULL; in sctp_handle_old_unordered_data()
898 struct sctp_tmit_chunk *chk, in sctp_inject_old_unordered_data() argument
908 if (chk->rec.data.rcv_flags & SCTP_DATA_FIRST_FRAG) { in sctp_inject_old_unordered_data()
912 chk->rec.data.fsn); in sctp_inject_old_unordered_data()
914 if (at && SCTP_TSN_GT(chk->rec.data.fsn, at->rec.data.fsn)) { in sctp_inject_old_unordered_data()
932 if (SCTP_TSN_GT(chk->rec.data.fsn, control->fsn_included)) { in sctp_inject_old_unordered_data()
939 if ((chk->rec.data.fsn == control->fsn_included) || in sctp_inject_old_unordered_data()
953 sctp_abort_in_reasm(stcb, control, chk, in sctp_inject_old_unordered_data()
966 control->data = chk->data; in sctp_inject_old_unordered_data()
967 chk->data = tdata; in sctp_inject_old_unordered_data()
969 chk->send_size = control->length; in sctp_inject_old_unordered_data()
974 control->fsn_included = chk->rec.data.fsn; in sctp_inject_old_unordered_data()
975 chk->rec.data.fsn = tmp; 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()
982 control->sinfo_ppid = chk->rec.data.ppid; in sctp_inject_old_unordered_data()
983 chk->rec.data.ppid = tmp; in sctp_inject_old_unordered_data()
988 control->fsn_included = chk->rec.data.fsn; in sctp_inject_old_unordered_data()
989 control->top_fsn = chk->rec.data.fsn; in sctp_inject_old_unordered_data()
990 control->sinfo_tsn = chk->rec.data.tsn; in sctp_inject_old_unordered_data()
991 control->sinfo_ppid = chk->rec.data.ppid; in sctp_inject_old_unordered_data()
992 control->data = chk->data; in sctp_inject_old_unordered_data()
993 sctp_mark_non_revokable(asoc, chk->rec.data.tsn); in sctp_inject_old_unordered_data()
994 chk->data = NULL; in sctp_inject_old_unordered_data()
995 sctp_free_a_chunk(stcb, chk, SCTP_SO_NOT_LOCKED); in sctp_inject_old_unordered_data()
1002 if (SCTP_TSN_GT(at->rec.data.fsn, chk->rec.data.fsn)) { in sctp_inject_old_unordered_data()
1007 asoc->size_on_reasm_queue += chk->send_size; in sctp_inject_old_unordered_data()
1010 TAILQ_INSERT_BEFORE(at, chk, sctp_next); in sctp_inject_old_unordered_data()
1012 } else if (at->rec.data.fsn == chk->rec.data.fsn) { in sctp_inject_old_unordered_data()
1018 sctp_abort_in_reasm(stcb, control, chk, in sctp_inject_old_unordered_data()
1026 asoc->size_on_reasm_queue += chk->send_size; in sctp_inject_old_unordered_data()
1028 control->top_fsn = chk->rec.data.fsn; in sctp_inject_old_unordered_data()
1029 TAILQ_INSERT_TAIL(&control->reasm, chk, sctp_next); in sctp_inject_old_unordered_data()
1271 struct sctp_tmit_chunk *chk, int hold_rlock) in sctp_add_chk_to_control() argument
1291 control->data = chk->data; in sctp_add_chk_to_control()
1294 sctp_add_to_tail_pointer(control, chk->data, &added); in sctp_add_chk_to_control()
1296 control->fsn_included = chk->rec.data.fsn; in sctp_add_chk_to_control()
1297 asoc->size_on_reasm_queue -= chk->send_size; in sctp_add_chk_to_control()
1299 sctp_mark_non_revokable(asoc, chk->rec.data.tsn); in sctp_add_chk_to_control()
1300 chk->data = NULL; in sctp_add_chk_to_control()
1301 if (chk->rec.data.rcv_flags & SCTP_DATA_FIRST_FRAG) { in sctp_add_chk_to_control()
1303 control->sinfo_tsn = chk->rec.data.tsn; in sctp_add_chk_to_control()
1304 control->sinfo_ppid = chk->rec.data.ppid; in sctp_add_chk_to_control()
1306 if (chk->rec.data.rcv_flags & SCTP_DATA_LAST_FRAG) { in sctp_add_chk_to_control()
1341 sctp_free_a_chunk(stcb, chk, SCTP_SO_NOT_LOCKED); in sctp_add_chk_to_control()
1354 struct sctp_tmit_chunk *chk, in sctp_queue_data_for_reasm() argument
1380 sctp_abort_in_reasm(stcb, control, chk, in sctp_queue_data_for_reasm()
1392 if ((chk->rec.data.rcv_flags & SCTP_DATA_FIRST_FRAG) == 0) { in sctp_queue_data_for_reasm()
1393 sctp_abort_in_reasm(stcb, control, chk, in sctp_queue_data_for_reasm()
1401 sctp_inject_old_unordered_data(stcb, asoc, control, chk, abort_flag); in sctp_queue_data_for_reasm()
1411 if (chk->rec.data.rcv_flags & SCTP_DATA_FIRST_FRAG) { in sctp_queue_data_for_reasm()
1415 chk->rec.data.fsn); in sctp_queue_data_for_reasm()
1423 sctp_abort_in_reasm(stcb, control, chk, in sctp_queue_data_for_reasm()
1429 control->sinfo_ppid = chk->rec.data.ppid; in sctp_queue_data_for_reasm()
1430 control->sinfo_tsn = chk->rec.data.tsn; in sctp_queue_data_for_reasm()
1431 control->fsn_included = chk->rec.data.fsn; in sctp_queue_data_for_reasm()
1432 control->data = chk->data; in sctp_queue_data_for_reasm()
1433 sctp_mark_non_revokable(asoc, chk->rec.data.tsn); in sctp_queue_data_for_reasm()
1434 chk->data = NULL; in sctp_queue_data_for_reasm()
1435 sctp_free_a_chunk(stcb, chk, SCTP_SO_NOT_LOCKED); in sctp_queue_data_for_reasm()
1444 if (SCTP_TSN_GT(chk->rec.data.fsn, control->top_fsn)) { in sctp_queue_data_for_reasm()
1447 chk->rec.data.fsn); in sctp_queue_data_for_reasm()
1448 control->top_fsn = chk->rec.data.fsn; in sctp_queue_data_for_reasm()
1450 if (chk->rec.data.rcv_flags & SCTP_DATA_LAST_FRAG) { in sctp_queue_data_for_reasm()
1453 chk->rec.data.fsn); in sctp_queue_data_for_reasm()
1455 if (SCTP_TSN_GT(control->top_fsn, chk->rec.data.fsn)) { in sctp_queue_data_for_reasm()
1458 chk->rec.data.fsn, in sctp_queue_data_for_reasm()
1460 sctp_abort_in_reasm(stcb, control, chk, in sctp_queue_data_for_reasm()
1473 if (SCTP_TSN_GE(control->fsn_included, chk->rec.data.fsn)) { in sctp_queue_data_for_reasm()
1478 sctp_abort_in_reasm(stcb, control, chk, in sctp_queue_data_for_reasm()
1485 if (chk->rec.data.rcv_flags & SCTP_DATA_LAST_FRAG) { in sctp_queue_data_for_reasm()
1489 chk->rec.data.fsn, control->top_fsn); in sctp_queue_data_for_reasm()
1491 chk, abort_flag, in sctp_queue_data_for_reasm()
1503 if (SCTP_TSN_GE(control->fsn_included, chk->rec.data.fsn)) { in sctp_queue_data_for_reasm()
1510 chk->rec.data.fsn, control->fsn_included); in sctp_queue_data_for_reasm()
1511 sctp_abort_in_reasm(stcb, control, chk, in sctp_queue_data_for_reasm()
1521 if (SCTP_TSN_GT(chk->rec.data.fsn, control->top_fsn)) { in sctp_queue_data_for_reasm()
1524 chk->rec.data.fsn, in sctp_queue_data_for_reasm()
1526 sctp_abort_in_reasm(stcb, control, chk, in sctp_queue_data_for_reasm()
1538 chk->rec.data.fsn); in sctp_queue_data_for_reasm()
1540 if (SCTP_TSN_GT(at->rec.data.fsn, chk->rec.data.fsn)) { in sctp_queue_data_for_reasm()
1541 if (chk->rec.data.rcv_flags & SCTP_DATA_LAST_FRAG) { in sctp_queue_data_for_reasm()
1546 chk, abort_flag, in sctp_queue_data_for_reasm()
1557 asoc->size_on_reasm_queue += chk->send_size; in sctp_queue_data_for_reasm()
1559 TAILQ_INSERT_BEFORE(at, chk, sctp_next); in sctp_queue_data_for_reasm()
1562 } else if (at->rec.data.fsn == chk->rec.data.fsn) { in sctp_queue_data_for_reasm()
1579 chk, abort_flag, in sctp_queue_data_for_reasm()
1587 chk->rec.data.fsn); in sctp_queue_data_for_reasm()
1588 asoc->size_on_reasm_queue += chk->send_size; in sctp_queue_data_for_reasm()
1590 TAILQ_INSERT_TAIL(&control->reasm, chk, sctp_next); in sctp_queue_data_for_reasm()
1682 struct sctp_tmit_chunk *chk = NULL; /* make gcc happy */ in sctp_process_a_data_chunk() local
2142 sctp_alloc_a_chunk(stcb, chk); in sctp_process_a_data_chunk()
2143 if (chk == NULL) { in sctp_process_a_data_chunk()
2152 chk->rec.data.tsn = tsn; in sctp_process_a_data_chunk()
2153 chk->no_fr_allowed = 0; in sctp_process_a_data_chunk()
2154 chk->rec.data.fsn = fsn; in sctp_process_a_data_chunk()
2155 chk->rec.data.mid = mid; in sctp_process_a_data_chunk()
2156 chk->rec.data.sid = sid; in sctp_process_a_data_chunk()
2157 chk->rec.data.ppid = ppid; in sctp_process_a_data_chunk()
2158 chk->rec.data.context = stcb->asoc.context; in sctp_process_a_data_chunk()
2159 chk->rec.data.doing_fast_retransmit = 0; in sctp_process_a_data_chunk()
2160 chk->rec.data.rcv_flags = chk_flags; in sctp_process_a_data_chunk()
2161 chk->asoc = asoc; in sctp_process_a_data_chunk()
2162 chk->send_size = the_len; in sctp_process_a_data_chunk()
2163 chk->whoTo = net; in sctp_process_a_data_chunk()
2165 chk, in sctp_process_a_data_chunk()
2168 chk->data = dmbuf; 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()
3826 struct sctp_tmit_chunk *chk; in sctp_fs_audit() local
3841 TAILQ_FOREACH(chk, &asoc->sent_queue, sctp_next) { in sctp_fs_audit()
3842 if (chk->sent < SCTP_DATAGRAM_RESEND) { in sctp_fs_audit()
3844 chk->rec.data.tsn, in sctp_fs_audit()
3845 chk->send_size, in sctp_fs_audit()
3846 chk->snd_count); in sctp_fs_audit()
3848 } else if (chk->sent == SCTP_DATAGRAM_RESEND) { in sctp_fs_audit()
3850 } else if (chk->sent < SCTP_DATAGRAM_ACKED) { in sctp_fs_audit()
3852 } else if (chk->sent > SCTP_DATAGRAM_ACKED) { in sctp_fs_audit()
5374 struct sctp_tmit_chunk *chk, *nchk; in sctp_flush_reassm_for_str_seq() local
5394 TAILQ_FOREACH_SAFE(chk, &control->reasm, sctp_next, nchk) { in sctp_flush_reassm_for_str_seq()
5397 if (SCTP_TSN_GT(chk->rec.data.tsn, cumtsn)) { in sctp_flush_reassm_for_str_seq()
5401 TAILQ_REMOVE(&control->reasm, chk, sctp_next); in sctp_flush_reassm_for_str_seq()
5402 if (asoc->size_on_reasm_queue >= chk->send_size) { in sctp_flush_reassm_for_str_seq()
5403 asoc->size_on_reasm_queue -= chk->send_size; in sctp_flush_reassm_for_str_seq()
5406 …panic("size_on_reasm_queue = %u smaller than chunk length %u", asoc->size_on_reasm_queue, chk->sen… in sctp_flush_reassm_for_str_seq()
5412 if (chk->data) { in sctp_flush_reassm_for_str_seq()
5413 sctp_m_freem(chk->data); in sctp_flush_reassm_for_str_seq()
5414 chk->data = NULL; in sctp_flush_reassm_for_str_seq()
5416 sctp_free_a_chunk(stcb, chk, SCTP_SO_NOT_LOCKED); in sctp_flush_reassm_for_str_seq()
5438 chk = TAILQ_FIRST(&control->reasm); in sctp_flush_reassm_for_str_seq()
5439 if (chk->rec.data.rcv_flags & SCTP_DATA_FIRST_FRAG) { in sctp_flush_reassm_for_str_seq()
5440 TAILQ_REMOVE(&control->reasm, chk, sctp_next); in sctp_flush_reassm_for_str_seq()
5442 chk, SCTP_READ_LOCK_HELD); in sctp_flush_reassm_for_str_seq()