tcp_reass.c (25201) | tcp_reass.c (27135) |
---|---|
1/* 2 * Copyright (c) 1982, 1986, 1988, 1990, 1993, 1994, 1995 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 17 unchanged lines hidden (view full) --- 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)tcp_input.c 8.12 (Berkeley) 5/24/95 | 1/* 2 * Copyright (c) 1982, 1986, 1988, 1990, 1993, 1994, 1995 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 17 unchanged lines hidden (view full) --- 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)tcp_input.c 8.12 (Berkeley) 5/24/95 |
34 * $Id: tcp_input.c,v 1.57 1997/02/22 09:41:40 peter Exp $ | 34 * $Id: tcp_input.c,v 1.58 1997/04/27 20:01:13 wollman Exp $ |
35 */ 36 37#ifndef TUBA_INCLUDE 38#include <sys/param.h> 39#include <sys/queue.h> 40#include <sys/systm.h> 41#include <sys/kernel.h> 42#include <sys/sysctl.h> --- 556 unchanged lines hidden (view full) --- 599 * Receive window is amount of space in rcv queue, 600 * but not less than advertised window. 601 */ 602 { int win; 603 604 win = sbspace(&so->so_rcv); 605 if (win < 0) 606 win = 0; | 35 */ 36 37#ifndef TUBA_INCLUDE 38#include <sys/param.h> 39#include <sys/queue.h> 40#include <sys/systm.h> 41#include <sys/kernel.h> 42#include <sys/sysctl.h> --- 556 unchanged lines hidden (view full) --- 599 * Receive window is amount of space in rcv queue, 600 * but not less than advertised window. 601 */ 602 { int win; 603 604 win = sbspace(&so->so_rcv); 605 if (win < 0) 606 win = 0; |
607 tp->rcv_wnd = max(win, (int)(tp->rcv_adv - tp->rcv_nxt)); | 607 tp->rcv_wnd = imax(win, (int)(tp->rcv_adv - tp->rcv_nxt)); |
608 } 609 610 switch (tp->t_state) { 611 612 /* 613 * If the state is LISTEN then ignore segment if it contains an RST. 614 * If the segment contains an ACK then it is bad and send a RST. 615 * If it does not contain a SYN then it is not interesting; drop it. --- 1518 unchanged lines hidden --- | 608 } 609 610 switch (tp->t_state) { 611 612 /* 613 * If the state is LISTEN then ignore segment if it contains an RST. 614 * If the segment contains an ACK then it is bad and send a RST. 615 * If it does not contain a SYN then it is not interesting; drop it. --- 1518 unchanged lines hidden --- |