Lines Matching defs:chk

58 	struct sctp_tmit_chunk *chk;
65 TAILQ_FOREACH(chk, &asoc->sent_queue, sctp_next) {
66 if (chk->sent == SCTP_DATAGRAM_RESEND) {
71 TAILQ_FOREACH(chk, &asoc->control_send_queue, sctp_next) {
72 if (chk->sent == SCTP_DATAGRAM_RESEND) {
76 TAILQ_FOREACH(chk, &asoc->asconf_send_queue, sctp_next) {
77 if (chk->sent == SCTP_DATAGRAM_RESEND) {
435 struct sctp_tmit_chunk *chk, *nchk;
439 TAILQ_FOREACH_SAFE(chk, &asoc->sent_queue, sctp_next, nchk) {
440 if (SCTP_TSN_GE(asoc->last_acked_seq, chk->rec.data.TSN_seq)) {
441 SCTP_PRINTF("Found chk:%p tsn:%x <= last_acked_seq:%x\n",
442 (void *)chk, chk->rec.data.TSN_seq, asoc->last_acked_seq);
443 if (chk->sent != SCTP_DATAGRAM_NR_ACKED) {
444 if (asoc->strmout[chk->rec.data.stream_number].chunks_on_queues > 0) {
445 asoc->strmout[chk->rec.data.stream_number].chunks_on_queues--;
448 TAILQ_REMOVE(&asoc->sent_queue, chk, sctp_next);
449 if (PR_SCTP_ENABLED(chk->flags)) {
453 if (chk->data) {
455 sctp_free_bufspace(stcb, asoc, chk, 1);
456 sctp_m_freem(chk->data);
457 chk->data = NULL;
458 if (asoc->peer_supports_prsctp && PR_SCTP_BUF_ENABLED(chk->flags)) {
463 sctp_free_a_chunk(stcb, chk, SCTP_SO_NOT_LOCKED);
467 TAILQ_FOREACH(chk, &asoc->sent_queue, sctp_next) {
468 SCTP_PRINTF("chk:%p TSN:%x\n", (void *)chk, chk->rec.data.TSN_seq);
489 struct sctp_tmit_chunk *chk, *nchk;
552 TAILQ_FOREACH_SAFE(chk, &stcb->asoc.sent_queue, sctp_next, nchk) {
553 if (SCTP_TSN_GE(stcb->asoc.last_acked_seq, chk->rec.data.TSN_seq)) {
555 SCTP_PRINTF("Our list is out of order? last_acked:%x chk:%x\n",
556 (unsigned int)stcb->asoc.last_acked_seq, (unsigned int)chk->rec.data.TSN_seq);
559 panic("last acked >= chk on sent-Q");
570 if ((chk->whoTo == net) && (chk->sent < SCTP_DATAGRAM_ACKED)) {
581 sctp_log_fr(chk->rec.data.TSN_seq,
582 chk->sent_rcv_time.tv_sec,
583 chk->sent_rcv_time.tv_usec,
586 if ((chk->sent_rcv_time.tv_sec > min_wait.tv_sec) && (window_probe == 0)) {
594 chk->sent_rcv_time.tv_sec,
595 chk->sent_rcv_time.tv_usec,
599 } else if ((chk->sent_rcv_time.tv_sec == min_wait.tv_sec) &&
605 if (chk->sent_rcv_time.tv_usec >= min_wait.tv_usec) {
613 if (stcb->asoc.peer_supports_prsctp && PR_SCTP_TTL_ENABLED(chk->flags)) {
615 if (timevalcmp(&now, &chk->rec.data.timetodrop, >)) {
617 if (chk->data) {
619 chk,
627 if (stcb->asoc.peer_supports_prsctp && PR_SCTP_RTX_ENABLED(chk->flags)) {
629 if (chk->snd_count > chk->rec.data.timetodrop.tv_sec) {
630 if (chk->data) {
632 chk,
640 if (chk->sent < SCTP_DATAGRAM_RESEND) {
645 tsnfirst = chk->rec.data.TSN_seq;
647 tsnlast = chk->rec.data.TSN_seq;
649 sctp_log_fr(chk->rec.data.TSN_seq, chk->snd_count,
652 if (chk->rec.data.chunk_was_revoked) {
654 chk->whoTo->cwnd -= chk->book_size;
655 chk->rec.data.chunk_was_revoked = 0;
661 chk->whoTo->flight_size,
662 chk->book_size,
663 (uintptr_t) chk->whoTo,
664 chk->rec.data.TSN_seq);
666 sctp_flight_size_decrease(chk);
667 sctp_total_flight_decrease(stcb, chk);
668 stcb->asoc.peers_rwnd += chk->send_size;
671 chk->sent = SCTP_DATAGRAM_RESEND;
675 chk->rec.data.doing_fast_retransmit = 0;
678 if (chk->do_rtt) {
679 if (chk->whoTo->rto_needed == 0) {
680 chk->whoTo->rto_needed = 1;
683 chk->do_rtt = 0;
685 sctp_free_remote_addr(chk->whoTo);
686 chk->no_fr_allowed = 1;
687 chk->whoTo = alt;
690 chk->no_fr_allowed = 0;
692 chk->rec.data.fast_retran_tsn = stcb->asoc.sending_seq;
694 chk->rec.data.fast_retran_tsn = (TAILQ_FIRST(&stcb->asoc.send_queue))->rec.data.TSN_seq;
701 chk->no_fr_allowed = 1;
704 } else if (chk->sent == SCTP_DATAGRAM_ACKED) {
706 could_be_sent = chk;
709 if (chk->sent == SCTP_DATAGRAM_RESEND) {
739 TAILQ_FOREACH(chk, &stcb->asoc.control_send_queue, sctp_next) {
740 if (chk->sent == SCTP_DATAGRAM_RESEND) {
743 if ((chk->whoTo == net) &&
744 (chk->rec.chunk_id.id == SCTP_ECN_ECHO)) {
745 sctp_free_remote_addr(chk->whoTo);
746 chk->whoTo = alt;
747 if (chk->sent != SCTP_DATAGRAM_RESEND) {
748 chk->sent = SCTP_DATAGRAM_RESEND;
785 TAILQ_FOREACH(chk, &stcb->asoc.sent_queue, sctp_next) {
786 if (chk->sent < SCTP_DATAGRAM_RESEND) {
789 chk->whoTo->flight_size,
790 chk->book_size,
791 (uintptr_t) chk->whoTo,
792 chk->rec.data.TSN_seq);
794 sctp_flight_size_increase(chk);
795 sctp_total_flight_increase(stcb, chk);
1118 struct sctp_tmit_chunk *strrst = NULL, *chk = NULL;
1145 TAILQ_FOREACH(chk, &stcb->asoc.control_send_queue, sctp_next) {
1146 if ((chk->whoTo == net) &&
1147 (chk->rec.chunk_id.id == SCTP_ECN_ECHO)) {
1148 sctp_free_remote_addr(chk->whoTo);
1149 if (chk->sent != SCTP_DATAGRAM_RESEND) {
1150 chk->sent = SCTP_DATAGRAM_RESEND;
1153 chk->whoTo = alt;
1160 * alternates for ALL chk's in queue
1179 struct sctp_tmit_chunk *asconf, *chk;
1225 TAILQ_FOREACH(chk, &stcb->asoc.control_send_queue, sctp_next) {
1226 if ((chk->whoTo == net) &&
1227 (chk->rec.chunk_id.id == SCTP_ECN_ECHO)) {
1228 sctp_free_remote_addr(chk->whoTo);
1229 chk->whoTo = alt;
1230 if (chk->sent != SCTP_DATAGRAM_RESEND) {
1231 chk->sent = SCTP_DATAGRAM_RESEND;
1237 TAILQ_FOREACH(chk, &stcb->asoc.asconf_send_queue, sctp_next) {
1238 if (chk->whoTo != alt) {
1239 sctp_free_remote_addr(chk->whoTo);
1240 chk->whoTo = alt;
1243 if (asconf->sent != SCTP_DATAGRAM_RESEND && chk->sent != SCTP_DATAGRAM_UNSENT)
1245 chk->sent = SCTP_DATAGRAM_RESEND;