- /*
- * an ack should be sent when at least one of the
- * following holds:
- * a) the TPDU that just arrived represents the
- * full window last advertised, or
- * b) when seq X arrives [ where
- * X = last_sent_uwe - 1/2 last_lcredit_sent
- * (the packet representing 1/2 the last advertised window) ]
- * and lcredit at the time of X arrival > last_lcredit_sent/2
- * In other words, if the last ack sent advertised cdt=8 and uwe = 8
- * then when seq 4 arrives I'd like to send a new ack
- * iff the credit at the time of 4's arrival is > 4.
- * The other end thinks it has cdt of 4 so if local cdt
- * is still 4 there's no point in sending an ack, but if
- * my credit has increased because the receiver has taken
- * some data out of the buffer (soreceive doesn't notify
- * me until the SYSTEM CALL finishes), I'd like to tell
- * the other end.
- */