Lines Matching refs:tsn
89 sctp_ack_add(sctp_set_t **head, uint32_t tsn, int *num)
104 (*head)->begin = tsn;
105 (*head)->end = tsn;
116 if (SEQ_LT(tsn + 1, (*head)->begin)) {
124 t->begin = tsn;
125 t->end = tsn;
135 * 1. tsn is entirely less than p; create a new set before p.
136 * 2. tsn borders p from less; coalesce p with tsn.
137 * 3. tsn is withing p; do nothing.
138 * 4. tsn borders p from greater; coalesce p with tsn.
141 * 5. tsn is entirely greater then all sets; add a new set at
145 if (SEQ_LT(tsn + 1, p->begin)) {
152 t->begin = tsn;
153 t->end = tsn;
163 if ((tsn + 1) == p->begin) {
165 p->begin = tsn;
169 if (SEQ_GEQ(tsn, p->begin) && SEQ_LEQ(tsn, p->end)) {
174 if ((p->end + 1) == tsn) {
176 p->end = tsn;
178 if (p->next != NULL && (tsn + 1) == p->next->begin) {
198 t->begin = tsn;
199 t->end = tsn;
205 if (SEQ_GT(tsn, p->end + 1))
674 uint32_t tsn = ntohl((*dc)->sdh_tsn);
692 if (SEQ_GT(ntsn, tsn)) {
726 if ((int32_t)(tsn - ntsn) > 1) {
733 tsn = ntsn;
736 tsn = ntohl((*dc)->sdh_tsn);
744 if ((int32_t)(ntsn - tsn) > 1) {
751 tsn = ntsn;
814 uint32_t tsn;
826 tsn = ntohl(qdc->sdh_tsn) + 1;
841 if (ntohl(qdc->sdh_tsn) != tsn)
845 tsn++;
854 srp->sr_nexttsn = tsn;
862 * the next deliverable tsn. When the next deliverable
943 uint32_t tsn;
972 * Arriving fragments will be inserted in tsn order on the
1021 /* tail always the highest tsn on the reassembly queue for this ssn */
1144 tsn = srp->sr_nexttsn;
1147 if (tsn != ntohl(qdc->sdh_tsn))
1150 tsn++;
1152 srp->sr_nexttsn = tsn;
1248 sctp_add_dup(uint32_t tsn, mblk_t **dups)
1251 size_t bsize = SCTP_DUP_MBLK_SZ * sizeof (tsn);
1271 /* add the duplicate tsn */
1272 bcopy(&tsn, mp->b_wptr, sizeof (tsn));
1273 mp->b_wptr += sizeof (tsn);
1295 uint32_t tsn;
1302 #define SCTP_ACK_IT(sctp, tsn) \
1303 if (tsn == sctp->sctp_ftsn) { \
1304 dprint(2, ("data_chunk: acking next %x\n", tsn)); \
1308 } else if (SEQ_GT(tsn, sctp->sctp_ftsn)) { \
1311 dprint(2, ("data_chunk: acking gap %x\n", tsn)); \
1312 sctp_ack_add(&sctp->sctp_sack_info, tsn, \
1320 tsn = ntohl(dc->sdh_tsn);
1322 dprint(3, ("sctp_data_chunk: mp=%p tsn=%x\n", (void *)mp, tsn));
1325 if (SEQ_LT(tsn, sctp->sctp_ftsn)) {
1338 if (SEQ_GEQ(tsn, sp->begin) && SEQ_LEQ(tsn, sp->end)) {
1365 (tsn != sctp->sctp_ftsn || sctp->sctp_rwnd == 0)) {
1369 "dlen %d ssn %d tsn %x\n", sctp->sctp_rwnd,
1389 SCTP_ACK_IT(sctp, tsn);
1466 SCTP_ACK_IT(sctp, tsn);
1468 int, sid, int, tsn, uint16_t, ssn);
1525 SCTP_ACK_IT(sctp, tsn);
1527 int, sid, int, tsn, uint16_t, ssn);
1565 SCTP_ACK_IT(sctp, tsn);
1574 SCTP_ACK_IT(sctp, tsn);
1598 int, sid, int, tsn, uint16_t, ssn);
1605 sctp_t *, sctp, int, sid, int, tsn,
1610 " tsn 0x%x ftsn 0x%x"
1613 tsn, sctp->sctp_ftsn, ssn,
1623 sctp_t *, sctp, int, sid, int, tsn,
1633 int, tsn, uint16_t, ssn);
1645 tsn = ntohl(dc->sdh_tsn);
1651 int, sid, int, tsn, uint16_t, ssn);
1671 * reach the frag with the last tsn in order to advance ftsn
1703 SCTP_ACK_IT(sctp, tsn);
1712 SCTP_ACK_IT(sctp, tsn);
2029 sctp_cumack(sctp_t *sctp, uint32_t tsn, mblk_t **first_unacked)
2074 if (SEQ_GEQ(tsn, xtsn)) {
2148 sctp->sctp_lastack_rxd = tsn;
3607 uint32_t tsn;
3789 tsn = sdc->sdh_tsn;
3791 SCTP_ERR_NO_USR_DATA, (char *)&tsn,
3792 sizeof (tsn), mp, 0, B_FALSE, ira);