*** ../../vanilla3.0/tcp_usrreq.c Tue Apr 28 10:28:02 1998 --- tcp_usrreq.c Tue Sep 15 15:59:34 1998 *************** *** 12,18 **** */ /* ! * Copyright (c) 1982, 1986, 1988, 1993, 1995 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without --- 12,18 ---- */ /* ! * Copyright (c) 1982, 1986, 1988, 1993, 1995, 1998 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without *************** *** 78,83 **** --- 78,86 ---- */ extern char *tcpstates[]; + #ifdef SACK + extern int tcp_do_sack; + #endif /* * Process a TCP user request for TCP tb. If this is a send request * then m is the mbuf chain of send data. If this is a timer expiration *************** *** 224,229 **** --- 227,240 ---- tp->t_timer[TCPT_KEEP] = tcp_conntimeo; tp->iss = tcp_iss; tcp_iss += TCP_ISSINCR/4; tcp_sendseqinit(tp); + #if defined(SACK) || defined (NEWRENO) + tp->snd_recover = tp->snd_una; + #endif + #if defined(SACK) && defined(FACK) + tp->snd_fack = tp->snd_una; + tp->retran_data = 0; + tp->snd_awnd = 0; + #endif error = tcp_output(tp); break; *************** *** 422,427 **** --- 433,449 ---- else tp->t_flags &= ~TF_STDURG; break; + #ifdef SACK + case TCP_SACK_DISABLE: + i = *mtod(m, int *); + tp->sack_disable = i; + break; + + case TCP_DO_SACK: + i = *mtod(m, int *); + tcp_do_sack = i; + break; + #endif default: error = ENOPROTOOPT; *************** *** 445,450 **** --- 467,481 ---- case TCP_STDURG: *mtod(m, int *) = tp->t_flags & TF_STDURG; break; + #ifdef SACK + case TCP_SACK_DISABLE: + *mtod(m, int *) = tp->sack_disable; + break; + + case TCP_DO_SACK: + *mtod(m, int *) = tcp_do_sack; + break; + #endif default: error = ENOPROTOOPT; break;