Lines Matching refs:chk

633 	struct sctp_tmit_chunk *chk;  in sctp_auditing()  local
669 TAILQ_FOREACH(chk, &stcb->asoc.sent_queue, sctp_next) { in sctp_auditing()
670 if (chk->sent == SCTP_DATAGRAM_RESEND) { in sctp_auditing()
672 } else if (chk->sent < SCTP_DATAGRAM_RESEND) { in sctp_auditing()
673 tot_out += chk->book_size; in sctp_auditing()
737 TAILQ_FOREACH(chk, &stcb->asoc.sent_queue, sctp_next) { in sctp_auditing()
738 if ((chk->whoTo == lnet) && in sctp_auditing()
739 (chk->sent < SCTP_DATAGRAM_RESEND)) { in sctp_auditing()
740 tot_out += chk->book_size; in sctp_auditing()
1841 struct sctp_tmit_chunk *chk; in sctp_timeout_handler() local
1849 TAILQ_FOREACH(chk, &stcb->asoc.sent_queue, sctp_next) { in sctp_timeout_handler()
1850 if (chk->whoTo != NULL) { in sctp_timeout_handler()
1854 if (chk != NULL) { in sctp_timeout_handler()
1855 sctp_timer_start(SCTP_TIMER_TYPE_SEND, stcb->sctp_ep, stcb, chk->whoTo); in sctp_timeout_handler()
3372 struct sctp_tmit_chunk *chk, int so_locked) in sctp_notify_send_failed() argument
3407 if (chk->send_size >= chkhdr_len) { in sctp_notify_send_failed()
3408 payload_len = chk->send_size - chkhdr_len; in sctp_notify_send_failed()
3413 if (chk->data != NULL) { in sctp_notify_send_failed()
3414 chkhdr = mtod(chk->data, struct sctp_chunkhdr *); in sctp_notify_send_failed()
3418 (chk->send_size >= chk_len) && in sctp_notify_send_failed()
3419 (chk->send_size - chk_len < 4)) { in sctp_notify_send_failed()
3420 padding_len = chk->send_size - chk_len; in sctp_notify_send_failed()
3421 payload_len = chk->send_size - chkhdr_len - padding_len; in sctp_notify_send_failed()
3437 ssfe->ssfe_info.snd_sid = chk->rec.data.sid; in sctp_notify_send_failed()
3438 ssfe->ssfe_info.snd_flags = chk->rec.data.rcv_flags; in sctp_notify_send_failed()
3439 ssfe->ssfe_info.snd_ppid = chk->rec.data.ppid; in sctp_notify_send_failed()
3440 ssfe->ssfe_info.snd_context = chk->rec.data.context; in sctp_notify_send_failed()
3455 ssf->ssf_info.sinfo_stream = chk->rec.data.sid; in sctp_notify_send_failed()
3456 ssf->ssf_info.sinfo_ssn = (uint16_t)chk->rec.data.mid; in sctp_notify_send_failed()
3457 ssf->ssf_info.sinfo_flags = chk->rec.data.rcv_flags; in sctp_notify_send_failed()
3458 ssf->ssf_info.sinfo_ppid = chk->rec.data.ppid; in sctp_notify_send_failed()
3459 ssf->ssf_info.sinfo_context = chk->rec.data.context; in sctp_notify_send_failed()
3463 if (chk->data != NULL) { in sctp_notify_send_failed()
3465 if (chk->send_size == chkhdr_len + payload_len + padding_len) { in sctp_notify_send_failed()
3466 m_adj(chk->data, chkhdr_len); in sctp_notify_send_failed()
3467 m_adj(chk->data, -padding_len); in sctp_notify_send_failed()
3468 sctp_mbuf_crush(chk->data); in sctp_notify_send_failed()
3469 chk->send_size -= (chkhdr_len + padding_len); in sctp_notify_send_failed()
3472 SCTP_BUF_NEXT(m_notify) = chk->data; in sctp_notify_send_failed()
3474 chk->data = NULL; in sctp_notify_send_failed()
4264 struct sctp_tmit_chunk *chk, *nchk; in sctp_report_all_outbound() local
4283 TAILQ_FOREACH_SAFE(chk, &asoc->sent_queue, sctp_next, nchk) { in sctp_report_all_outbound()
4284 TAILQ_REMOVE(&asoc->sent_queue, chk, sctp_next); in sctp_report_all_outbound()
4286 if (chk->sent != SCTP_DATAGRAM_NR_ACKED) { in sctp_report_all_outbound()
4287 if (asoc->strmout[chk->rec.data.sid].chunks_on_queues > 0) { in sctp_report_all_outbound()
4288 asoc->strmout[chk->rec.data.sid].chunks_on_queues--; in sctp_report_all_outbound()
4291 panic("No chunks on the queues for sid %u.", chk->rec.data.sid); in sctp_report_all_outbound()
4295 if (chk->data != NULL) { in sctp_report_all_outbound()
4296 sctp_free_bufspace(stcb, asoc, chk, 1); in sctp_report_all_outbound()
4298 error, chk, so_locked); in sctp_report_all_outbound()
4299 if (chk->data) { in sctp_report_all_outbound()
4300 sctp_m_freem(chk->data); in sctp_report_all_outbound()
4301 chk->data = NULL; in sctp_report_all_outbound()
4304 sctp_free_a_chunk(stcb, chk, so_locked); in sctp_report_all_outbound()
4308 TAILQ_FOREACH_SAFE(chk, &asoc->send_queue, sctp_next, nchk) { in sctp_report_all_outbound()
4309 TAILQ_REMOVE(&asoc->send_queue, chk, sctp_next); in sctp_report_all_outbound()
4311 if (asoc->strmout[chk->rec.data.sid].chunks_on_queues > 0) { in sctp_report_all_outbound()
4312 asoc->strmout[chk->rec.data.sid].chunks_on_queues--; in sctp_report_all_outbound()
4315 panic("No chunks on the queues for sid %u.", chk->rec.data.sid); in sctp_report_all_outbound()
4318 if (chk->data != NULL) { in sctp_report_all_outbound()
4319 sctp_free_bufspace(stcb, asoc, chk, 1); in sctp_report_all_outbound()
4321 error, chk, so_locked); in sctp_report_all_outbound()
4322 if (chk->data) { in sctp_report_all_outbound()
4323 sctp_m_freem(chk->data); in sctp_report_all_outbound()
4324 chk->data = NULL; in sctp_report_all_outbound()
4327 sctp_free_a_chunk(stcb, chk, so_locked); in sctp_report_all_outbound()
5070 struct sctp_tmit_chunk *chk = NULL, *tp2; in sctp_release_pr_sctp_chunk() local
5156 chk = tp1; in sctp_release_pr_sctp_chunk()
5200 if (chk == NULL) { in sctp_release_pr_sctp_chunk()
5202 sctp_alloc_a_chunk(stcb, chk); in sctp_release_pr_sctp_chunk()
5203 if (chk == NULL) { in sctp_release_pr_sctp_chunk()
5212 memset(chk, 0, sizeof(*chk)); in sctp_release_pr_sctp_chunk()
5213 chk->rec.data.rcv_flags = 0; in sctp_release_pr_sctp_chunk()
5214 chk->sent = SCTP_FORWARD_TSN_SKIP; in sctp_release_pr_sctp_chunk()
5215 chk->asoc = &stcb->asoc; in sctp_release_pr_sctp_chunk()
5218 chk->rec.data.mid = 0; in sctp_release_pr_sctp_chunk()
5220 chk->rec.data.mid = strq->next_mid_ordered; in sctp_release_pr_sctp_chunk()
5224 chk->rec.data.mid = strq->next_mid_unordered; in sctp_release_pr_sctp_chunk()
5226 chk->rec.data.mid = strq->next_mid_ordered; in sctp_release_pr_sctp_chunk()
5229 chk->rec.data.sid = sp->sid; in sctp_release_pr_sctp_chunk()
5230 chk->rec.data.ppid = sp->ppid; in sctp_release_pr_sctp_chunk()
5231 chk->rec.data.context = sp->context; in sctp_release_pr_sctp_chunk()
5232 chk->flags = sp->act_flags; in sctp_release_pr_sctp_chunk()
5233 chk->whoTo = NULL; in sctp_release_pr_sctp_chunk()
5234 chk->rec.data.tsn = atomic_fetchadd_int(&stcb->asoc.sending_seq, 1); in sctp_release_pr_sctp_chunk()
5236 TAILQ_INSERT_TAIL(&stcb->asoc.sent_queue, chk, sctp_next); in sctp_release_pr_sctp_chunk()
5240 chk->rec.data.rcv_flags |= SCTP_DATA_LAST_FRAG; in sctp_release_pr_sctp_chunk()
5242 chk->rec.data.rcv_flags |= SCTP_DATA_UNORDERED; in sctp_release_pr_sctp_chunk()