SCCS-vsn: sys/netiso/tp_subr.c 7.5
SCCS-vsn: sys/netiso/tp_pcb.c 7.5
SCCS-vsn: sys/netiso/tp_emit.c 7.4
*
* $Header: tp_emit.c,v 5.5 88/11/18 17:27:20 nhall Exp $
* $Source: /usr/argo/sys/netiso/RCS/tp_emit.c,v $
*
* $Header: tp_emit.c,v 5.5 88/11/18 17:27:20 nhall Exp $
* $Source: /usr/argo/sys/netiso/RCS/tp_emit.c,v $
- * @(#)tp_emit.c 7.3 (Berkeley) %G% *
+ * @(#)tp_emit.c 7.4 (Berkeley) %G% *
*
* This file contains tp_emit() and tp_error_emit(), which
* form TPDUs and hand them to ip.
*
* This file contains tp_emit() and tp_error_emit(), which
* form TPDUs and hand them to ip.
case CR_TPDU_type:
hdr->tpdu_CRdref_0 = htons(0); /* must be zero */
case CR_TPDU_type:
hdr->tpdu_CRdref_0 = htons(0); /* must be zero */
+ if (!tpcb->tp_cebit_off) {
+ tpcb->tp_win_recv = tp_start_win << 8;
+ LOCAL_CREDIT(tpcb);
+ CONG_INIT_SAMPLE(tpcb);
+ tpcb->tp_ackrcvd = 0;
+ }
+ else
+ LOCAL_CREDIT(tpcb);
+
hdr->tpdu_CCsref = htons(tpcb->tp_lref); /* same as CRsref */
if( tpcb->tp_class > TP_CLASS_1 ) {
hdr->tpdu_CCsref = htons(tpcb->tp_lref); /* same as CRsref */
if( tpcb->tp_class > TP_CLASS_1 ) {
+/* ifdef CE_BIT, we did this in tp_input when the CR came in */
+ if (tpcb->tp_cebit_off)
+ LOCAL_CREDIT( tpcb );
tpcb->tp_sent_uwe = tpcb->tp_lcredit -1;
tpcb->tp_sent_rcvnxt = 1;
tpcb->tp_sent_lcdt = tpcb->tp_lcredit;
tpcb->tp_sent_uwe = tpcb->tp_lcredit -1;
tpcb->tp_sent_rcvnxt = 1;
tpcb->tp_sent_lcdt = tpcb->tp_lcredit;
*
* $Header: tp_pcb.c,v 5.4 88/11/18 17:28:24 nhall Exp $
* $Source: /usr/argo/sys/netiso/RCS/tp_pcb.c,v $
*
* $Header: tp_pcb.c,v 5.4 88/11/18 17:28:24 nhall Exp $
* $Source: /usr/argo/sys/netiso/RCS/tp_pcb.c,v $
- * @(#)tp_pcb.c 7.4 (Berkeley) %G% *
+ * @(#)tp_pcb.c 7.5 (Berkeley) %G% *
*
*
* This is the initialization and cleanup stuff -
*
*
* This is the initialization and cleanup stuff -
/* FOR ISO */
tp_isopcb.isop_next = tp_isopcb.isop_prev = &tp_isopcb;
/* FOR ISO */
tp_isopcb.isop_next = tp_isopcb.isop_prev = &tp_isopcb;
tp_timerinit();
bzero((caddr_t)&tp_stat, sizeof(struct tp_stat));
return 0;
tp_timerinit();
bzero((caddr_t)&tp_stat, sizeof(struct tp_stat));
return 0;
*
* $Header: tp_subr.c,v 5.3 88/11/18 17:28:43 nhall Exp $
* $Source: /usr/argo/sys/netiso/RCS/tp_subr.c,v $
*
* $Header: tp_subr.c,v 5.3 88/11/18 17:28:43 nhall Exp $
* $Source: /usr/argo/sys/netiso/RCS/tp_subr.c,v $
- * @(#)tp_subr.c 7.4 (Berkeley) %G%
+ * @(#)tp_subr.c 7.5 (Berkeley) %G%
*
* The main work of data transfer is done here.
* These routines are called from tp.trans.
*
* The main work of data transfer is done here.
* These routines are called from tp.trans.
0,0,0);
ENDTRACE
sbdrop( &tpcb->tp_Xsnd, (int)(tpcb->tp_Xsnd.sb_cc));
0,0,0);
ENDTRACE
sbdrop( &tpcb->tp_Xsnd, (int)(tpcb->tp_Xsnd.sb_cc));
/* increase congestion window but don't let it get too big */
{
register int maxcdt = tpcb->tp_xtd_format?0xffff:0xf;
/* increase congestion window but don't let it get too big */
{
register int maxcdt = tpcb->tp_xtd_format?0xffff:0xf;
-
- if( ++tpcb->tp_cong_win > maxcdt )
- tpcb->tp_cong_win = maxcdt;
}
/* Compute smoothed round trip time.
* Only measure rtt for tp_snduna if tp_snduna was among
}
/* Compute smoothed round trip time.
* Only measure rtt for tp_snduna if tp_snduna was among
- * the last TP_RTT_NUM seq numbers sent.
+ * the last TP_RTT_NUM seq numbers sent, and if the data
+ * were not retransmitted.
*/
if (SEQ_GEQ(tpcb, tpcb->tp_snduna,
*/
if (SEQ_GEQ(tpcb, tpcb->tp_snduna,
- SEQ(tpcb, tpcb->tp_sndhiwat - TP_RTT_NUM))) {
+ SEQ(tpcb, tpcb->tp_sndhiwat - TP_RTT_NUM))
+ && SEQ_GT(tpcb, seq, SEQ_ADD(tpcb, tpcb->tp_retrans_hiwat, 1))) {
struct timeval *t = &tpcb->tp_rttemit[tpcb->tp_snduna & TP_RTT_NUM];
struct timeval x;
struct timeval *t = &tpcb->tp_rttemit[tpcb->tp_snduna & TP_RTT_NUM];
struct timeval x;
}
}
tpcb->tp_snduna = seq;
}
}
tpcb->tp_snduna = seq;
+ tpcb->tp_retrans = tpcb->tp_Nretrans; /* CE_BIT */