tcp_input.c (f23b4c91c4fb94e1bb6aeb4e7747f4ccf7767b41) tcp_input.c (6a7be6e8e00c40ad6d03410d56236ca0ed3a635e)
1/*
2 * Copyright (c) 1982, 1986, 1988, 1990, 1993, 1994
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.5 (Berkeley) 4/10/94
1/*
2 * Copyright (c) 1982, 1986, 1988, 1990, 1993, 1994
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.5 (Berkeley) 4/10/94
34 * $Id: tcp_input.c,v 1.5 1994/08/02 07:49:01 davidg Exp $
34 * $Id: tcp_input.c,v 1.6 1994/08/18 22:35:32 wollman Exp $
35 */
36
37#ifndef TUBA_INCLUDE
38#include <sys/param.h>
39#include <sys/systm.h>
40#include <sys/malloc.h>
41#include <sys/mbuf.h>
42#include <sys/protosw.h>

--- 134 unchanged lines hidden (view full) ---

177 */
178 insque(ti, q->ti_prev);
179
180present:
181 /*
182 * Present data to user, advancing rcv_nxt through
183 * completed sequence space.
184 */
35 */
36
37#ifndef TUBA_INCLUDE
38#include <sys/param.h>
39#include <sys/systm.h>
40#include <sys/malloc.h>
41#include <sys/mbuf.h>
42#include <sys/protosw.h>

--- 134 unchanged lines hidden (view full) ---

177 */
178 insque(ti, q->ti_prev);
179
180present:
181 /*
182 * Present data to user, advancing rcv_nxt through
183 * completed sequence space.
184 */
185 if (TCPS_HAVERCVDSYN(tp->t_state) == 0)
185 if (TCPS_HAVEESTABLISHED(tp->t_state) == 0)
186 return (0);
187 ti = tp->seg_next;
188 if (ti == (struct tcpiphdr *)tp || ti->ti_seq != tp->rcv_nxt)
189 return (0);
190 if (tp->t_state == TCPS_SYN_RECEIVED && ti->ti_len)
191 return (0);
192 do {
193 tp->rcv_nxt += ti->ti_len;

--- 1471 unchanged lines hidden ---
186 return (0);
187 ti = tp->seg_next;
188 if (ti == (struct tcpiphdr *)tp || ti->ti_seq != tp->rcv_nxt)
189 return (0);
190 if (tp->t_state == TCPS_SYN_RECEIVED && ti->ti_len)
191 return (0);
192 do {
193 tp->rcv_nxt += ti->ti_len;

--- 1471 unchanged lines hidden ---