diff -uwr sys/netinet.orig/tcp.h sys/netinet/tcp.h
--- sys/netinet.orig/tcp.h	2004-08-16 20:32:07.000000000 +0200
+++ sys/netinet/tcp.h	2005-03-10 02:39:04.000000000 +0100
@@ -40,6 +40,12 @@
 typedef	u_int32_t tcp_seq;
 typedef u_int32_t tcp_cc;		/* connection count per rfc1644 */
 
+#define DAYS_TO_TICKS(c)       ((c) * 100 /* Hz */ * 60 /* sec */ * 60 /* min */ * 24 /* hrs */)
+#define TICKS_TO_DAYS(c)       ((c) / ( 100 /* Hz */ * 60 /* sec */ * 60 /* min */ * 24 /* hrs */))
+
+#define TCP_ASAC_SPOOF_OFFSET       (tcp_do_asac_spoof ? DAYS_TO_TICKS( tcp_asac_spoof_offset ) : 0)
+#define TCP_TIMESTAMP           (ticks + TCP_ASAC_SPOOF_OFFSET )
+
 #define tcp6_seq	tcp_seq	/* for KAME src sync over BSD*'s */
 #define tcp6hdr		tcphdr	/* for KAME src sync over BSD*'s */
 
Only in sys/netinet: tcp.h~
diff -uwr sys/netinet.orig/tcp_input.c sys/netinet/tcp_input.c
--- sys/netinet.orig/tcp_input.c	2004-08-18 00:05:54.000000000 +0200
+++ sys/netinet/tcp_input.c	2005-03-10 02:39:04.000000000 +0100
@@ -976,7 +976,7 @@
 			INP_LOCK(inp);
 			tp = intotcpcb(inp);
 			tp->snd_wnd = tiwin;
-			tp->t_starttime = ticks;
+			tp->t_starttime = TCP_TIMESTAMP;
 			tp->t_state = TCPS_ESTABLISHED;
 
 			/*
@@ -1033,7 +1033,7 @@
 	 */
 	if (tcp_minmss && tcp_minmssoverload &&
 	    tp->t_state == TCPS_ESTABLISHED && tlen > 0) {
-		if (tp->rcv_second > ticks) {
+		if (tp->rcv_second > TCP_TIMESTAMP) {
 			tp->rcv_pps++;
 			tp->rcv_byps += tlen + off;
 			if (tp->rcv_pps > tcp_minmssoverload) {
@@ -1054,7 +1054,7 @@
 				}
 			}
 		} else {
-			tp->rcv_second = ticks + hz;
+			tp->rcv_second = TCP_TIMESTAMP + hz;
 			tp->rcv_pps = 1;
 			tp->rcv_byps = tlen + off;
 		}
@@ -1064,7 +1064,7 @@
 	 * Segment received on connection.
 	 * Reset idle time and keep-alive timer.
 	 */
-	tp->t_rcvtime = ticks;
+	tp->t_rcvtime = TCP_TIMESTAMP;
 	if (TCPS_HAVEESTABLISHED(tp->t_state))
 		callout_reset(tp->tt_keep, tcp_keepidle, tcp_timer_keep, tp);
 
@@ -1082,7 +1082,7 @@
 		if (to.to_flags & TOF_TS) {
 			tp->t_flags |= TF_RCVD_TSTMP;
 			tp->ts_recent = to.to_tsval;
-			tp->ts_recent_age = ticks;
+			tp->ts_recent_age = TCP_TIMESTAMP;
 		}
 		if (to.to_flags & (TOF_CC|TOF_CCNEW))
 			tp->t_flags |= TF_RCVD_CC;
@@ -1145,7 +1145,7 @@
 		 */
 		if ((to.to_flags & TOF_TS) != 0 &&
 		    SEQ_LEQ(th->th_seq, tp->last_ack_sent)) {
-			tp->ts_recent_age = ticks;
+			tp->ts_recent_age = TCP_TIMESTAMP;
 			tp->ts_recent = to.to_tsval;
 		}
 
@@ -1167,7 +1167,7 @@
 				 * "bad retransmit" recovery
 				 */
 				if (tp->t_rxtshift == 1 &&
-				    ticks < tp->t_badrxtwin) {
+				    TCP_TIMESTAMP < tp->t_badrxtwin) {
 					++tcpstat.tcps_sndrexmitbad;
 					tp->snd_cwnd = tp->snd_cwnd_prev;
 					tp->snd_ssthresh =
@@ -1190,11 +1190,11 @@
 				if ((to.to_flags & TOF_TS) != 0 &&
 				    to.to_tsecr) {
 					tcp_xmit_timer(tp,
-					    ticks - to.to_tsecr + 1);
+					    TCP_TIMESTAMP - to.to_tsecr + 1);
 				} else if (tp->t_rtttime &&
 					    SEQ_GT(th->th_ack, tp->t_rtseq)) {
 					tcp_xmit_timer(tp,
-							ticks - tp->t_rtttime);
+							TCP_TIMESTAMP - tp->t_rtttime);
 				}
 				tcp_xmit_bandwidth_limit(tp, th->th_ack);
 				acked = th->th_ack - tp->snd_una;
@@ -1426,7 +1426,7 @@
 			 *	SYN_SENT  --> ESTABLISHED
 			 *	SYN_SENT* --> FIN_WAIT_1
 			 */
-			tp->t_starttime = ticks;
+			tp->t_starttime = TCP_TIMESTAMP;
 			if (tp->t_flags & TF_NEEDFIN) {
 				tp->t_state = TCPS_FIN_WAIT_1;
 				tp->t_flags &= ~TF_NEEDFIN;
@@ -1460,7 +1460,7 @@
 					tao.tao_cc = to.to_cc;
 					tcp_hc_updatetao(&inp->inp_inc,
 						TCP_HC_TAO_CC, to.to_cc, 0);
-					tp->t_starttime = ticks;
+					tp->t_starttime = TCP_TIMESTAMP;
 					if (tp->t_flags & TF_NEEDFIN) {
 						tp->t_state = TCPS_FIN_WAIT_1;
 						tp->t_flags &= ~TF_NEEDFIN;
@@ -1539,7 +1539,7 @@
 		if ((thflags & TH_SYN) &&
 		    (to.to_flags & TOF_CC) && tp->cc_recv != 0) {
 			if (tp->t_state == TCPS_TIME_WAIT &&
-					(ticks - tp->t_starttime) > tcp_msl) {
+					(TCP_TIMESTAMP - tp->t_starttime) > tcp_msl) {
 				rstreason = BANDLIM_UNLIMITED;
 				goto dropwithreset;
 			}
@@ -1661,7 +1661,7 @@
 	    TSTMP_LT(to.to_tsval, tp->ts_recent)) {
 
 		/* Check to see if ts_recent is over 24 days old.  */
-		if ((int)(ticks - tp->ts_recent_age) > TCP_PAWS_IDLE) {
+		if ((int)(TCP_TIMESTAMP - tp->ts_recent_age) > TCP_PAWS_IDLE) {
 			/*
 			 * Invalidate ts_recent.  If this segment updates
 			 * ts_recent, the age will be reset later and ts_recent
@@ -1813,7 +1813,7 @@
 	 */
 	if ((to.to_flags & TOF_TS) != 0 &&
 	    SEQ_LEQ(th->th_seq, tp->last_ack_sent)) {
-		tp->ts_recent_age = ticks;
+		tp->ts_recent_age = TCP_TIMESTAMP;
 		tp->ts_recent = to.to_tsval;
 	}
 
@@ -1875,7 +1875,7 @@
 		 *      SYN-RECEIVED  -> ESTABLISHED
 		 *      SYN-RECEIVED* -> FIN-WAIT-1
 		 */
-		tp->t_starttime = ticks;
+		tp->t_starttime = TCP_TIMESTAMP;
 		if (tp->t_flags & TF_NEEDFIN) {
 			tp->t_state = TCPS_FIN_WAIT_1;
 			tp->t_flags &= ~TF_NEEDFIN;
@@ -2114,7 +2114,7 @@
 		 * original cwnd and ssthresh, and proceed to transmit where
 		 * we left off.
 		 */
-		if (tp->t_rxtshift == 1 && ticks < tp->t_badrxtwin) {
+		if (tp->t_rxtshift == 1 && TCP_TIMESTAMP < tp->t_badrxtwin) {
 			++tcpstat.tcps_sndrexmitbad;
 			tp->snd_cwnd = tp->snd_cwnd_prev;
 			tp->snd_ssthresh = tp->snd_ssthresh_prev;
@@ -2141,9 +2141,9 @@
 		 */
 		if ((to.to_flags & TOF_TS) != 0 &&
 		    to.to_tsecr) {
-			tcp_xmit_timer(tp, ticks - to.to_tsecr + 1);
+			tcp_xmit_timer(tp, TCP_TIMESTAMP - to.to_tsecr + 1);
 		} else if (tp->t_rtttime && SEQ_GT(th->th_ack, tp->t_rtseq)) {
-			tcp_xmit_timer(tp, ticks - tp->t_rtttime);
+			tcp_xmit_timer(tp, TCP_TIMESTAMP - tp->t_rtttime);
 		}
 		tcp_xmit_bandwidth_limit(tp, th->th_ack);
 
@@ -2457,7 +2457,7 @@
 		 * enter the CLOSE_WAIT state.
 		 */
 		case TCPS_SYN_RECEIVED:
-			tp->t_starttime = ticks;
+			tp->t_starttime = TCP_TIMESTAMP;
 			/*FALLTHROUGH*/
 		case TCPS_ESTABLISHED:
 			tp->t_state = TCPS_CLOSE_WAIT;
@@ -2839,7 +2839,7 @@
 	 * firing of the timer.  The bias will give us exactly the
 	 * 1.5 tick we need.  But, because the bias is
 	 * statistical, we have to test that we don't drop below
-	 * the minimum feasible timer (which is 2 ticks).
+	 * the minimum feasible timer (which is 2 TCP_TIMESTAMP).
 	 */
 	TCPT_RANGESET(tp->t_rxtcur, TCP_REXMTVAL(tp),
 		      max(tp->t_rttmin, rtt + 2), TCPTV_REXMTMAX);
@@ -3257,7 +3257,7 @@
 	 * else do normal processing.
 	 */
 	if ((thflags & TH_SYN) && (to->to_flags & TOF_CC) && tw->cc_recv != 0) {
-		if ((ticks - tw->t_starttime) > tcp_msl)
+		if ((TCP_TIMESTAMP - tw->t_starttime) > tcp_msl)
 			goto reset;
 		if (CC_GT(to->to_cc, tw->cc_recv)) {
 			(void) tcp_twclose(tw, 0);
diff -uwr sys/netinet.orig/tcp_output.c sys/netinet/tcp_output.c
--- sys/netinet.orig/tcp_output.c	2004-10-30 22:50:06.000000000 +0200
+++ sys/netinet/tcp_output.c	2005-03-10 02:39:04.000000000 +0100
@@ -146,7 +146,7 @@
 	 * to send, then transmit; otherwise, investigate further.
 	 */
 	idle = (tp->t_flags & TF_LASTIDLE) || (tp->snd_max == tp->snd_una);
-	if (idle && (ticks - tp->t_rcvtime) >= tp->t_rxtcur) {
+	if (idle && (TCP_TIMESTAMP - tp->t_rcvtime) >= tp->t_rxtcur) {
 		/*
 		 * We have been idle for "a while" and no acks are
 		 * expected to clock out any data we send --
@@ -560,7 +560,7 @@
 
 		/* Form timestamp option as shown in appendix A of RFC 1323. */
 		*lp++ = htonl(TCPOPT_TSTAMP_HDR);
-		*lp++ = htonl(ticks);
+		*lp++ = htonl(TCP_TIMESTAMP);
 		*lp   = htonl(tp->ts_recent);
 		optlen += TCPOLEN_TSTAMP_APPA;
 	}
@@ -977,7 +977,7 @@
 			 * not currently timing anything.
 			 */
 			if (tp->t_rtttime == 0) {
-				tp->t_rtttime = ticks;
+				tp->t_rtttime = TCP_TIMESTAMP;
 				tp->t_rtseq = startseq;
 				tcpstat.tcps_segstimed++;
 			}
diff -uwr sys/netinet.orig/tcp_subr.c sys/netinet/tcp_subr.c
--- sys/netinet.orig/tcp_subr.c	2004-10-21 11:30:47.000000000 +0200
+++ sys/netinet/tcp_subr.c	2005-03-10 02:39:04.000000000 +0100
@@ -213,6 +213,17 @@
 
 uma_zone_t sack_hole_zone;
 
+// >>> asac spoof section start: 
+int tcp_do_asac_spoof = 0;
+SYSCTL_INT(_net_inet_tcp, OID_AUTO, asac_spoof, CTLFLAG_RW,
+    &tcp_do_asac_spoof, 0, "Enable/Disable TCP ASAC Spoof");
+
+int tcp_asac_spoof_offset = 0;
+SYSCTL_INT(_net_inet_tcp, OID_AUTO, asac_spoof_offset, CTLFLAG_RW,
+    &tcp_asac_spoof_offset, 0, "Set ASAC Spoof Offset in days");
+// <<< asac spoof section end. 
+
+
 static struct inpcb *tcp_notify(struct inpcb *, int);
 static void	tcp_discardcb(struct tcpcb *);
 static void	tcp_isn_tick(void *);
@@ -634,8 +645,8 @@
 	tp->snd_cwnd = TCP_MAXWIN << TCP_MAX_WINSHIFT;
 	tp->snd_bwnd = TCP_MAXWIN << TCP_MAX_WINSHIFT;
 	tp->snd_ssthresh = TCP_MAXWIN << TCP_MAX_WINSHIFT;
-	tp->t_rcvtime = ticks;
-	tp->t_bw_rtttime = ticks;
+	tp->t_rcvtime = TCP_TIMESTAMP;
+	tp->t_bw_rtttime = TCP_TIMESTAMP;
 	/*
 	 * IPv4 TTL initialization is necessary for an IPv6 socket as well,
 	 * because the socket may be bound to an IPv6 wildcard address,
@@ -1315,9 +1326,9 @@
 	/* Seed if this is the first use, reseed if requested. */
 	if ((isn_last_reseed == 0) || ((tcp_isn_reseed_interval > 0) &&
 	     (((u_int)isn_last_reseed + (u_int)tcp_isn_reseed_interval*hz)
-		< (u_int)ticks))) {
+		< (u_int)TCP_TIMESTAMP))) {
 		read_random(&isn_secret, sizeof(isn_secret));
-		isn_last_reseed = ticks;
+		isn_last_reseed = TCP_TIMESTAMP;
 	}
 
 	/* Compute the md5 hash and return the ISN. */
@@ -1675,7 +1686,7 @@
  * a ts_recent from the last segment.
  */
 	/* Shorten TIME_WAIT [RFC-1644, p.28] */
-	if (tp->cc_recv != 0 && (ticks - tp->t_starttime) < tcp_msl) {
+	if (tp->cc_recv != 0 && (TCP_TIMESTAMP - tp->t_starttime) < tcp_msl) {
 		tw_time = tp->t_rxtcur * TCPTV_TWTRUNC;
 		/* For T/TCP client, force ACK now. */
 		acknow = 1;
@@ -1721,8 +1732,8 @@
 	tcp_seq new_iss = tw->iss;
 	tcp_seq new_irs = tw->irs;
 
-	new_iss += (ticks - tw->t_starttime) * (ISN_BYTES_PER_SECOND / hz);
-	new_irs += (ticks - tw->t_starttime) * (MS_ISN_BYTES_PER_SECOND / hz);
+	new_iss += (TCP_TIMESTAMP - tw->t_starttime) * (ISN_BYTES_PER_SECOND / hz);
+	new_irs += (TCP_TIMESTAMP - tw->t_starttime) * (MS_ISN_BYTES_PER_SECOND / hz);
 
 	if (SEQ_GT(new_iss, tw->snd_nxt) && SEQ_GT(new_irs, tw->rcv_nxt))
 		return 1;
@@ -1803,7 +1814,7 @@
 
 		/* Form timestamp option as shown in appendix A of RFC 1323. */
 		*lp++ = htonl(TCPOPT_TSTAMP_HDR);
-		*lp++ = htonl(ticks);
+		*lp++ = htonl(TCP_TIMESTAMP);
 		*lp   = htonl(tw->t_recent);
 		optp += TCPOLEN_TSTAMP_APPA;
 	}
@@ -1913,7 +1924,7 @@
 {
 	u_long bw;
 	u_long bwnd;
-	int save_ticks;
+	int save_TCP_TIMESTAMP;
 
 	/*
 	 * If inflight_enable is disabled in the middle of a tcp connection,
@@ -1933,16 +1944,16 @@
 	 * slop will ramp us up if this case occurs and the bandwidth later
 	 * increases.
 	 *
-	 * Note: if ticks rollover 'bw' may wind up negative.  We must
+	 * Note: if TCP_TIMESTAMP rollover 'bw' may wind up negative.  We must
 	 * effectively reset t_bw_rtttime for this case.
 	 */
-	save_ticks = ticks;
-	if ((u_int)(save_ticks - tp->t_bw_rtttime) < 1)
+	save_TCP_TIMESTAMP = TCP_TIMESTAMP;
+	if ((u_int)(save_TCP_TIMESTAMP - tp->t_bw_rtttime) < 1)
 		return;
 
 	bw = (int64_t)(ack_seq - tp->t_bw_rtseq) * hz /
-	    (save_ticks - tp->t_bw_rtttime);
-	tp->t_bw_rtttime = save_ticks;
+	    (save_TCP_TIMESTAMP - tp->t_bw_rtttime);
+	tp->t_bw_rtttime = save_TCP_TIMESTAMP;
 	tp->t_bw_rtseq = ack_seq;
 	if (tp->t_bw_rtttime == 0 || (int)bw < 0)
 		return;
@@ -1984,8 +1995,8 @@
 
 	if (tcp_inflight_debug > 0) {
 		static int ltime;
-		if ((u_int)(ticks - ltime) >= hz / tcp_inflight_debug) {
-			ltime = ticks;
+		if ((u_int)(TCP_TIMESTAMP - ltime) >= hz / tcp_inflight_debug) {
+			ltime = TCP_TIMESTAMP;
 			printf("%p bw %ld rttbest %d srtt %d bwnd %ld\n",
 			    tp,
 			    bw,
Only in sys/netinet: tcp_subr.c~
diff -uwr sys/netinet.orig/tcp_syncache.c sys/netinet/tcp_syncache.c
--- sys/netinet.orig/tcp_syncache.c	2004-09-23 18:38:53.000000000 +0200
+++ sys/netinet/tcp_syncache.c	2005-03-10 02:39:04.000000000 +0100
@@ -192,7 +192,7 @@
 
 #define SYNCACHE_TIMEOUT(sc, slot) do {				\
 	sc->sc_rxtslot = (slot);					\
-	sc->sc_rxttime = ticks + TCPTV_RTOBASE * tcp_backoff[(slot)];	\
+	sc->sc_rxttime = TCP_TIMESTAMP + TCPTV_RTOBASE * tcp_backoff[(slot)];	\
 	TAILQ_INSERT_TAIL(&tcp_syncache.timerq[(slot)], sc, sc_timerq);	\
 	if (!callout_active(&tcp_syncache.tt_timerq[(slot)]))		\
 		callout_reset(&tcp_syncache.tt_timerq[(slot)],		\
@@ -282,7 +282,7 @@
 		 * The bucket is full, toss the oldest element.
 		 */
 		sc2 = TAILQ_FIRST(&sch->sch_bucket);
-		sc2->sc_tp->ts_recent = ticks;
+		sc2->sc_tp->ts_recent = TCP_TIMESTAMP;
 		syncache_drop(sc2, sch);
 		tcpstat.tcps_sc_bucketoverflow++;
 	} else if (tcp_syncache.cache_count >= tcp_syncache.cache_limit) {
@@ -297,7 +297,7 @@
 			if (sc2 != NULL)
 				break;
 		}
-		sc2->sc_tp->ts_recent = ticks;
+		sc2->sc_tp->ts_recent = TCP_TIMESTAMP;
 		syncache_drop(sc2, NULL);
 		tcpstat.tcps_sc_cacheoverflow++;
 	}
@@ -366,7 +366,7 @@
 
 	nsc = TAILQ_FIRST(&tcp_syncache.timerq[slot]);
 	while (nsc != NULL) {
-		if (ticks < nsc->sc_rxttime)
+		if (TCP_TIMESTAMP < nsc->sc_rxttime)
 			break;
 		sc = nsc;
 		inp = sc->sc_tp->t_inpcb;
@@ -395,7 +395,7 @@
 	}
 	if (nsc != NULL)
 		callout_reset(&tcp_syncache.tt_timerq[slot],
-		    nsc->sc_rxttime - ticks, syncache_timer, (void *)(slot));
+		    nsc->sc_rxttime - TCP_TIMESTAMP, syncache_timer, (void *)(slot));
 	INP_INFO_WUNLOCK(&tcbinfo);
 }
 
@@ -692,7 +692,7 @@
 	if (sc->sc_flags & SCF_TIMESTAMP) {
 		tp->t_flags |= TF_REQ_TSTMP|TF_RCVD_TSTMP;
 		tp->ts_recent = sc->sc_tsrecent;
-		tp->ts_recent_age = ticks;
+		tp->ts_recent_age = TCP_TIMESTAMP;
 	}
 	if (sc->sc_flags & SCF_CC) {
 		/*
@@ -908,7 +908,7 @@
 			if (sc != NULL)
 				break;
 		}
-		sc->sc_tp->ts_recent = ticks;
+		sc->sc_tp->ts_recent = TCP_TIMESTAMP;
 		syncache_drop(sc, NULL);
 		tcpstat.tcps_sc_zonefail++;
 		sc = uma_zalloc(tcp_syncache.zone, M_NOWAIT);
@@ -1235,7 +1235,7 @@
 
 			/* Form timestamp option per appendix A of RFC 1323. */
 			*lp++ = htonl(TCPOPT_TSTAMP_HDR);
-			*lp++ = htonl(ticks);
+			*lp++ = htonl(TCP_TIMESTAMP);
 			*lp   = htonl(sc->sc_tsrecent);
 			optp += TCPOLEN_TSTAMP_APPA;
 		}
@@ -1373,11 +1373,11 @@
 
 	/* NB: single threaded; could add INP_INFO_WLOCK_ASSERT(&tcbinfo) */
 
-	idx = ((ticks << SYNCOOKIE_TIMESHIFT) / hz) & SYNCOOKIE_WNDMASK;
-	if (tcp_secret[idx].ts_expire < ticks) {
+	idx = ((TCP_TIMESTAMP << SYNCOOKIE_TIMESHIFT) / hz) & SYNCOOKIE_WNDMASK;
+	if (tcp_secret[idx].ts_expire < TCP_TIMESTAMP) {
 		for (i = 0; i < 4; i++)
 			tcp_secret[idx].ts_secbits[i] = arc4random();
-		tcp_secret[idx].ts_expire = ticks + SYNCOOKIE_TIMEOUT;
+		tcp_secret[idx].ts_expire = TCP_TIMESTAMP + SYNCOOKIE_TIMEOUT;
 	}
 	for (data = sizeof(tcp_msstab) / sizeof(int) - 1; data > 0; data--)
 		if (tcp_msstab[data] <= sc->sc_peer_mss)
@@ -1426,8 +1426,8 @@
 
 	data = (th->th_ack - 1) ^ (th->th_seq - 1);	/* remove ISS */
 	idx = data & SYNCOOKIE_WNDMASK;
-	if (tcp_secret[idx].ts_expire < ticks ||
-	    sototcpcb(so)->ts_recent + SYNCOOKIE_TIMEOUT < ticks)
+	if (tcp_secret[idx].ts_expire < TCP_TIMESTAMP ||
+	    sototcpcb(so)->ts_recent + SYNCOOKIE_TIMEOUT < TCP_TIMESTAMP)
 		return (NULL);
 	MD5Init(&syn_ctx);
 #ifdef INET6
Only in sys/netinet: tcp_syncache.c~
diff -uwr sys/netinet.orig/tcp_timer.c sys/netinet/tcp_timer.c
--- sys/netinet.orig/tcp_timer.c	2004-08-16 20:32:07.000000000 +0200
+++ sys/netinet/tcp_timer.c	2005-03-10 02:39:05.000000000 +0100
@@ -233,7 +233,7 @@
 	 * control block.  Otherwise, check again in a bit.
 	 */
 	if (tp->t_state != TCPS_TIME_WAIT &&
-	    (ticks - tp->t_rcvtime) <= tcp_maxidle)
+	    (TCP_TIMESTAMP - tp->t_rcvtime) <= tcp_maxidle)
 		callout_reset(tp->tt_2msl, tcp_keepintvl,
 			      tcp_timer_2msl, tp);
 	else
@@ -279,7 +279,7 @@
 
 	if (tw->tw_time != 0)
 		LIST_REMOVE(tw, tw_2msl);
-	tw->tw_time = timeo + ticks;
+	tw->tw_time = timeo + TCP_TIMESTAMP;
 	i = timeo > tcp_msl ? 1 : 0;
 	tw_tail = &twl_2msl[i].tw_tail;
 	LIST_INSERT_BEFORE(tw_tail, tw, tw_2msl);
@@ -305,7 +305,7 @@
 		tw_tail = &twl->tw_tail;
 		for (;;) {
 			tw = LIST_FIRST(&twl->tw_list);
-			if (tw == tw_tail || (!reuse && tw->tw_time > ticks))
+			if (tw == tw_tail || (!reuse && tw->tw_time > TCP_TIMESTAMP))
 				break;
 			INP_LOCK(tw->tw_inpcb);
 			if (tcp_twclose(tw, reuse) != NULL)
@@ -353,7 +353,7 @@
 		goto dropit;
 	if ((always_keepalive || inp->inp_socket->so_options & SO_KEEPALIVE) &&
 	    tp->t_state <= TCPS_CLOSING) {
-		if ((ticks - tp->t_rcvtime) >= tcp_keepidle + tcp_maxidle)
+		if ((TCP_TIMESTAMP - tp->t_rcvtime) >= tcp_keepidle + tcp_maxidle)
 			goto dropit;
 		/*
 		 * Send a packet designed to force a response
@@ -445,8 +445,8 @@
 	 * backoff that we would use if retransmitting.
 	 */
 	if (tp->t_rxtshift == TCP_MAXRXTSHIFT &&
-	    ((ticks - tp->t_rcvtime) >= tcp_maxpersistidle ||
-	     (ticks - tp->t_rcvtime) >= TCP_REXMTVAL(tp) * tcp_totbackoff)) {
+	    ((TCP_TIMESTAMP - tp->t_rcvtime) >= tcp_maxpersistidle ||
+	     (TCP_TIMESTAMP - tp->t_rcvtime) >= TCP_REXMTVAL(tp) * tcp_totbackoff)) {
 		tcpstat.tcps_persistdrop++;
 		tp = tcp_drop(tp, ETIMEDOUT);
 		goto out;
@@ -531,7 +531,7 @@
 		  tp->t_flags |= TF_WASFRECOVERY;
 		else
 		  tp->t_flags &= ~TF_WASFRECOVERY;
-		tp->t_badrxtwin = ticks + (tp->t_srtt >> (TCP_RTT_SHIFT + 1));
+		tp->t_badrxtwin = TCP_TIMESTAMP + (tp->t_srtt >> (TCP_RTT_SHIFT + 1));
 	}
 	tcpstat.tcps_rexmttimeo++;
 	if (tp->t_state == TCPS_SYN_SENT)
diff -uwr sys/netinet.orig/tcp_usrreq.c sys/netinet/tcp_usrreq.c
--- sys/netinet.orig/tcp_usrreq.c	2004-08-16 20:32:07.000000000 +0200
+++ sys/netinet/tcp_usrreq.c	2005-03-10 02:39:05.000000000 +0100
@@ -843,7 +843,7 @@
 	if (oinp) {
 		if (oinp != inp &&
 		    (oinp->inp_vflag & INP_TIMEWAIT) &&
-		    (ticks - (otw = intotw(oinp))->t_starttime) < tcp_msl &&
+		    (TCP_TIMESTAMP - (otw = intotw(oinp))->t_starttime) < tcp_msl &&
 		    otw->cc_recv != 0) {
 			inp->inp_faddr = oinp->inp_faddr;
 			inp->inp_fport = oinp->inp_fport;
@@ -930,7 +930,7 @@
 	if (oinp) {
 		if (oinp != inp &&
 		    (oinp->inp_vflag & INP_TIMEWAIT) &&
-		    (ticks - (otw = intotw(oinp))->t_starttime) < tcp_msl &&
+		    (TCP_TIMESTAMP - (otw = intotw(oinp))->t_starttime) < tcp_msl &&
 		    otw->cc_recv != 0) {
 			inp->inp_faddr = oinp->inp_faddr;
 			inp->inp_fport = oinp->inp_fport;
diff -uwr sys/netinet.orig/tcp_var.h sys/netinet/tcp_var.h
--- sys/netinet.orig/tcp_var.h	2004-08-16 20:32:07.000000000 +0200
+++ sys/netinet/tcp_var.h	2005-03-10 02:39:05.000000000 +0100
@@ -500,6 +500,8 @@
 #define	TCPCTL_V6MSSDFLT	13	/* MSS default for IPv6 */
 #define	TCPCTL_SACK		14	/* Selective Acknowledgement,rfc 2018 */
 #define	TCPCTL_MAXID		15
+#define	TCPCTL_ASAC_SPOOF	16      /* enable or disable asac spoof */
+#define	TCPCTL_ASAC_SPOOF_OFFSET		17   /* TCP offset in DAYS */
 
 #define TCPCTL_NAMES { \
 	{ 0, 0 }, \
@@ -517,6 +519,8 @@
 	{ "delacktime", CTLTYPE_INT }, \
 	{ "v6mssdflt", CTLTYPE_INT }, \
 	{ "maxid", CTLTYPE_INT }, \
+	{ "asac_spoof", CTLTYPE_INT }, \
+	{ "asac_spoof_offset", CTLTYPE_INT }, \
 }
 
 
@@ -539,6 +543,9 @@
 
 extern	int tcp_do_sack;	/* SACK enabled/disabled */
 
+extern	int tcp_do_asac_spoof;
+extern	int tcp_asac_spoof_offset;
+
 void	 tcp_canceltimers(struct tcpcb *);
 struct tcpcb *
 	 tcp_close(struct tcpcb *);
Only in sys/netinet: tcp_var.h~
