Lines Matching refs:chk

316 		struct sctp_tmit_chunk *chk, *nchk;
320 TAILQ_FOREACH_SAFE(chk, &asoc->send_queue, sctp_next, nchk) {
321 if (chk->rec.data.sid >= newcnt) {
322 TAILQ_REMOVE(&asoc->send_queue, chk, sctp_next);
324 if (asoc->strmout[chk->rec.data.sid].chunks_on_queues > 0) {
325 asoc->strmout[chk->rec.data.sid].chunks_on_queues--;
328 panic("No chunks on the queues for sid %u.", chk->rec.data.sid);
331 if (chk->data != NULL) {
332 sctp_free_bufspace(stcb, asoc, chk, 1);
334 0, chk, SCTP_SO_NOT_LOCKED);
335 if (chk->data) {
336 sctp_m_freem(chk->data);
337 chk->data = NULL;
340 sctp_free_a_chunk(stcb, chk, SCTP_SO_NOT_LOCKED);
1821 struct sctp_tmit_chunk *chk;
1823 TAILQ_FOREACH(chk, &stcb->asoc.sent_queue, sctp_next) {
1824 if (chk->sent < SCTP_DATAGRAM_RESEND) {
1825 chk->sent = SCTP_DATAGRAM_RESEND;
1826 sctp_flight_size_decrease(chk);
1827 sctp_total_flight_decrease(stcb, chk);
2962 struct sctp_tmit_chunk *chk;
3067 TAILQ_FOREACH(chk, &asoc->sent_queue, sctp_next) {
3068 if (chk->whoTo != NULL) {
3072 if (chk != NULL) {
3073 sctp_timer_start(SCTP_TIMER_TYPE_SEND, stcb->sctp_ep, stcb, chk->whoTo);
3208 struct sctp_tmit_chunk *chk, *nchk;
3215 TAILQ_FOREACH_SAFE(chk, &stcb->asoc.control_send_queue, sctp_next, nchk) {
3216 if (chk->rec.chunk_id.id != SCTP_ECN_ECHO) {
3219 if ((override == 0) && (chk->whoTo != net)) {
3223 ecne = mtod(chk->data, struct sctp_ecne_chunk *);
3227 TAILQ_REMOVE(&stcb->asoc.control_send_queue, chk,
3230 sctp_m_freem(chk->data);
3231 chk->data = NULL;
3232 sctp_free_a_chunk(stcb, chk, SCTP_SO_NOT_LOCKED);
3618 struct sctp_tmit_chunk *chk;
3630 chk = stcb->asoc.str_reset;
3631 if (chk->data == NULL) {
3635 /* he wants a copy of the chk pointer */
3636 *bchk = chk;
3638 clen = chk->send_size;
3639 ch = mtod(chk->data, struct sctp_chunkhdr *);
3661 struct sctp_tmit_chunk *chk;
3664 chk = asoc->str_reset;
3665 if (chk == NULL) {
3670 chk->whoTo, SCTP_FROM_SCTP_INPUT + SCTP_LOC_28);
3671 TAILQ_REMOVE(&asoc->control_send_queue, chk, sctp_next);
3673 if (chk->data) {
3674 sctp_m_freem(chk->data);
3675 chk->data = NULL;
3677 sctp_free_a_chunk(stcb, chk, SCTP_SO_NOT_LOCKED);
3689 struct sctp_tmit_chunk *chk;
3700 req_param = sctp_find_stream_reset(stcb, seq, &chk);
3850 struct sctp_tmit_chunk *chk,
3902 sctp_add_stream_reset_result(chk, seq, asoc->last_reset_action[0]);
3905 sctp_add_stream_reset_result(chk, seq, asoc->last_reset_action[0]);
3907 sctp_add_stream_reset_result(chk, seq, asoc->last_reset_action[1]);
3909 sctp_add_stream_reset_result(chk, seq, SCTP_STREAM_RESET_RESULT_ERR_BAD_SEQNO);
3916 struct sctp_tmit_chunk *chk,
3964 sctp_add_stream_reset_result_tsn(chk, seq, asoc->last_reset_action[0],
3968 sctp_add_stream_reset_result_tsn(chk, seq, asoc->last_reset_action[0],
3971 sctp_add_stream_reset_result_tsn(chk, seq, asoc->last_reset_action[1],
3974 sctp_add_stream_reset_result(chk, seq, SCTP_STREAM_RESET_RESULT_ERR_BAD_SEQNO);
3981 struct sctp_tmit_chunk *chk,
4027 sctp_add_stream_reset_result(chk, seq, asoc->last_reset_action[0]);
4037 sctp_add_stream_reset_result(chk, seq, asoc->last_reset_action[0]);
4044 sctp_add_stream_reset_result(chk, seq, asoc->last_reset_action[0]);
4050 sctp_add_stream_reset_result(chk, seq, asoc->last_reset_action[1]);
4052 sctp_add_stream_reset_result(chk, seq, SCTP_STREAM_RESET_RESULT_ERR_BAD_SEQNO);
4057 sctp_handle_str_reset_add_strm(struct sctp_tcb *stcb, struct sctp_tmit_chunk *chk,
4129 sctp_add_stream_reset_result(chk, seq, asoc->last_reset_action[0]);
4136 sctp_add_stream_reset_result(chk, seq, asoc->last_reset_action[0]);
4142 sctp_add_stream_reset_result(chk, seq, asoc->last_reset_action[1]);
4144 sctp_add_stream_reset_result(chk, seq, SCTP_STREAM_RESET_RESULT_ERR_BAD_SEQNO);
4150 sctp_handle_str_reset_add_out_strm(struct sctp_tcb *stcb, struct sctp_tmit_chunk *chk,
4187 sctp_add_stream_reset_result(chk, seq, stcb->asoc.last_reset_action[0]);
4194 sctp_add_stream_reset_result(chk, seq, asoc->last_reset_action[0]);
4200 sctp_add_stream_reset_result(chk, seq, asoc->last_reset_action[1]);
4202 sctp_add_stream_reset_result(chk, seq, SCTP_STREAM_RESET_RESULT_ERR_BAD_SEQNO);
4219 struct sctp_tmit_chunk *chk;
4229 sctp_alloc_a_chunk(stcb, chk);
4230 if (chk == NULL) {
4233 chk->copy_by_ref = 0;
4234 chk->rec.chunk_id.id = SCTP_STREAM_RESET;
4235 chk->rec.chunk_id.can_take_data = 0;
4236 chk->flags = 0;
4237 chk->asoc = &stcb->asoc;
4238 chk->no_fr_allowed = 0;
4239 chk->book_size = chk->send_size = sizeof(struct sctp_chunkhdr);
4240 chk->book_size_scale = 0;
4241 chk->data = sctp_get_mbuf_for_msg(MCLBYTES, 0, M_NOWAIT, 1, MT_DATA);
4242 if (chk->data == NULL) {
4244 if (chk->data) {
4245 sctp_m_freem(chk->data);
4246 chk->data = NULL;
4248 sctp_free_a_chunk(stcb, chk, SCTP_SO_NOT_LOCKED);
4251 SCTP_BUF_RESV_UF(chk->data, SCTP_MIN_OVERHEAD);
4254 chk->sent = SCTP_DATAGRAM_UNSENT;
4255 chk->snd_count = 0;
4256 chk->whoTo = NULL;
4258 ch = mtod(chk->data, struct sctp_chunkhdr *);
4261 ch->chunk_length = htons(chk->send_size);
4262 SCTP_BUF_LEN(chk->data) = SCTP_SIZE32(chk->send_size);
4308 sctp_handle_str_reset_request_out(stcb, chk, req_out, trunc);
4317 sctp_handle_str_reset_add_strm(stcb, chk, str_add);
4326 sctp_handle_str_reset_add_out_strm(stcb, chk, str_add);
4332 sctp_handle_str_reset_request_in(stcb, chk, req_in, trunc);
4338 if (sctp_handle_str_reset_request_tsn(stcb, chk, req_tsn)) {
4374 chk,
5156 struct sctp_tmit_chunk *chk;
5219 TAILQ_FOREACH(chk, &stcb->asoc.sent_queue, sctp_next) {
5220 if (chk->whoTo != NULL) {
5224 if (chk != NULL) {
5225 sctp_timer_start(SCTP_TIMER_TYPE_SEND, stcb->sctp_ep, stcb, chk->whoTo);