Lines Matching refs:chk

634 	struct sctp_tmit_chunk *chk;
670 TAILQ_FOREACH(chk, &stcb->asoc.sent_queue, sctp_next) {
671 if (chk->sent == SCTP_DATAGRAM_RESEND) {
673 } else if (chk->sent < SCTP_DATAGRAM_RESEND) {
674 tot_out += chk->book_size;
739 TAILQ_FOREACH(chk, &stcb->asoc.sent_queue, sctp_next) {
740 if ((chk->whoTo == lnet) &&
741 (chk->sent < SCTP_DATAGRAM_RESEND)) {
742 tot_out += chk->book_size;
1763 struct sctp_tmit_chunk *chk;
1771 TAILQ_FOREACH(chk, &stcb->asoc.sent_queue, sctp_next) {
1772 if (chk->whoTo != NULL) {
1776 if (chk != NULL) {
1777 sctp_timer_start(SCTP_TIMER_TYPE_SEND, stcb->sctp_ep, stcb, chk->whoTo);
2504 struct sctp_tmit_chunk *chk;
2514 TAILQ_FOREACH(chk, &asoc->send_queue, sctp_next) {
2515 if (chk->send_size > eff_mtu) {
2516 chk->flags |= CHUNK_FLAGS_FRAGMENT_OK;
2519 TAILQ_FOREACH(chk, &asoc->sent_queue, sctp_next) {
2520 if (chk->send_size > eff_mtu) {
2521 chk->flags |= CHUNK_FLAGS_FRAGMENT_OK;
3009 struct sctp_tmit_chunk *chk, int so_locked
3045 if (chk->send_size >= chkhdr_len) {
3046 payload_len = chk->send_size - chkhdr_len;
3051 if (chk->data != NULL) {
3052 chkhdr = mtod(chk->data, struct sctp_chunkhdr *);
3056 (chk->send_size >= chk_len) &&
3057 (chk->send_size - chk_len < 4)) {
3058 padding_len = chk->send_size - chk_len;
3059 payload_len = chk->send_size - chkhdr_len - padding_len;
3075 ssfe->ssfe_info.snd_sid = chk->rec.data.sid;
3076 ssfe->ssfe_info.snd_flags = chk->rec.data.rcv_flags;
3077 ssfe->ssfe_info.snd_ppid = chk->rec.data.ppid;
3078 ssfe->ssfe_info.snd_context = chk->rec.data.context;
3093 ssf->ssf_info.sinfo_stream = chk->rec.data.sid;
3094 ssf->ssf_info.sinfo_ssn = (uint16_t)chk->rec.data.mid;
3095 ssf->ssf_info.sinfo_flags = chk->rec.data.rcv_flags;
3096 ssf->ssf_info.sinfo_ppid = chk->rec.data.ppid;
3097 ssf->ssf_info.sinfo_context = chk->rec.data.context;
3101 if (chk->data != NULL) {
3103 if (chk->send_size == chkhdr_len + payload_len + padding_len) {
3104 m_adj(chk->data, chkhdr_len);
3105 m_adj(chk->data, -padding_len);
3106 sctp_mbuf_crush(chk->data);
3107 chk->send_size -= (chkhdr_len + padding_len);
3110 SCTP_BUF_NEXT(m_notify) = chk->data;
3112 chk->data = NULL;
3936 struct sctp_tmit_chunk *chk, *nchk;
3955 TAILQ_FOREACH_SAFE(chk, &asoc->sent_queue, sctp_next, nchk) {
3956 TAILQ_REMOVE(&asoc->sent_queue, chk, sctp_next);
3958 if (chk->sent != SCTP_DATAGRAM_NR_ACKED) {
3959 if (asoc->strmout[chk->rec.data.sid].chunks_on_queues > 0) {
3960 asoc->strmout[chk->rec.data.sid].chunks_on_queues--;
3963 panic("No chunks on the queues for sid %u.", chk->rec.data.sid);
3967 if (chk->data != NULL) {
3968 sctp_free_bufspace(stcb, asoc, chk, 1);
3970 error, chk, so_locked);
3971 if (chk->data) {
3972 sctp_m_freem(chk->data);
3973 chk->data = NULL;
3976 sctp_free_a_chunk(stcb, chk, so_locked);
3980 TAILQ_FOREACH_SAFE(chk, &asoc->send_queue, sctp_next, nchk) {
3981 TAILQ_REMOVE(&asoc->send_queue, chk, sctp_next);
3983 if (asoc->strmout[chk->rec.data.sid].chunks_on_queues > 0) {
3984 asoc->strmout[chk->rec.data.sid].chunks_on_queues--;
3987 panic("No chunks on the queues for sid %u.", chk->rec.data.sid);
3990 if (chk->data != NULL) {
3991 sctp_free_bufspace(stcb, asoc, chk, 1);
3993 error, chk, so_locked);
3994 if (chk->data) {
3995 sctp_m_freem(chk->data);
3996 chk->data = NULL;
3999 sctp_free_a_chunk(stcb, chk, so_locked);
4792 struct sctp_tmit_chunk *chk = NULL, *tp2;
4872 * save to chk in case we have some on stream out
4876 chk = tp1;
4921 if (chk == NULL) {
4923 sctp_alloc_a_chunk(stcb, chk);
4924 if (chk == NULL) {
4933 memset(chk, 0, sizeof(*chk));
4934 chk->rec.data.rcv_flags = 0;
4935 chk->sent = SCTP_FORWARD_TSN_SKIP;
4936 chk->asoc = &stcb->asoc;
4939 chk->rec.data.mid = 0;
4941 chk->rec.data.mid = strq->next_mid_ordered;
4945 chk->rec.data.mid = strq->next_mid_unordered;
4947 chk->rec.data.mid = strq->next_mid_ordered;
4950 chk->rec.data.sid = sp->sid;
4951 chk->rec.data.ppid = sp->ppid;
4952 chk->rec.data.context = sp->context;
4953 chk->flags = sp->act_flags;
4954 chk->whoTo = NULL;
4955 chk->rec.data.tsn = atomic_fetchadd_int(&stcb->asoc.sending_seq, 1);
4957 TAILQ_INSERT_TAIL(&stcb->asoc.sent_queue, chk, sctp_next);
4961 chk->rec.data.rcv_flags |= SCTP_DATA_LAST_FRAG;
4963 chk->rec.data.rcv_flags |= SCTP_DATA_UNORDERED;