+ if ($P.tp_sndhiwat <= $P.tp_retrans_hiwat &&
+ $P.tp_snduna <= $P.tp_retrans_hiwat) {
+
+ register struct mbuf *m;
+ /* extern struct mbuf *m_copy(); */
+ register struct tp_rtc *r;
+ SeqNum high, retrans, low_save;
+
+ high = SEQ_MIN($P, SEQ_ADD($P, $P.tp_snduna,
+ MIN($P.tp_cong_win, $P.tp_fcredit)) - 1,
+ $P.tp_sndhiwat);
+ low_save = retrans = SEQ_MAX($P, SEQ_ADD($P, $P.tp_last_retrans, 1),
+ $P.tp_snduna);
+ for (; SEQ_LEQ($P, retrans, high); SEQ_INC($P, retrans)) {
+
+ for (r = $P.tp_snduna_rtc; r; r = r->tprt_next){
+ if ( r->tprt_seq == retrans ){
+ if(( m = m_copy(r->tprt_data, 0, r->tprt_octets ))
+ == MNULL)
+ break;
+ (void) tp_emit(DT_TPDU_type, $P, retrans,
+ r->tprt_eot, m);
+ $P.tp_last_retrans = retrans;
+ IncStat(ts_retrans_dt);
+ break;
+ }
+ }
+ if ( r == (struct tp_rtc *)0 ){
+ IFDEBUG(D_RTC)
+ printf( "tp: retrans rtc list is GONE!\n");
+ ENDDEBUG
+ break;
+ }
+ }
+ tp_etimeout($P.tp_refp, TM_data_retrans, (caddr_t)low_save,
+ (caddr_t)high, $P.tp_retrans, (int)$P.tp_dt_ticks);
+ if (SEQ_DEC($P, retrans) == $P.tp_retrans_hiwat)
+ tp_send($P);
+ }
+ else {
+ tp_send($P);
+ }