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