Deleted Added
full compact
tcp_reass.c (6480) tcp_reass.c (7090)
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 * From: @(#)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 * From: @(#)tcp_input.c 8.5 (Berkeley) 4/10/94
34 * $Id: tcp_input.c,v 1.14 1995/02/16 00:55:39 wollman Exp $
34 * $Id: tcp_input.c,v 1.15 1995/02/16 01:39:19 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>

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

1876 register struct rtentry *rt;
1877 struct ifnet *ifp;
1878 register int rtt, mss;
1879 u_long bufsize;
1880 struct inpcb *inp;
1881 struct socket *so;
1882 struct rmxp_tao *taop;
1883 int origoffer = offer;
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>

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

1876 register struct rtentry *rt;
1877 struct ifnet *ifp;
1878 register int rtt, mss;
1879 u_long bufsize;
1880 struct inpcb *inp;
1881 struct socket *so;
1882 struct rmxp_tao *taop;
1883 int origoffer = offer;
1884 extern int tcp_do_rfc1644;
1885 extern int tcp_mssdflt;
1886
1887 inp = tp->t_inpcb;
1888 if ((rt = tcp_rtlookup(inp)) == NULL) {
1889 tp->t_maxopd = tp->t_maxseg = tcp_mssdflt;
1890 return;
1891 }
1892 ifp = rt->rt_ifp;
1893 so = inp->inp_socket;

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

2035/*
2036 * Determine the MSS option to send on an outgoing SYN.
2037 */
2038int
2039tcp_mssopt(tp)
2040 struct tcpcb *tp;
2041{
2042 struct rtentry *rt;
1884
1885 inp = tp->t_inpcb;
1886 if ((rt = tcp_rtlookup(inp)) == NULL) {
1887 tp->t_maxopd = tp->t_maxseg = tcp_mssdflt;
1888 return;
1889 }
1890 ifp = rt->rt_ifp;
1891 so = inp->inp_socket;

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

2033/*
2034 * Determine the MSS option to send on an outgoing SYN.
2035 */
2036int
2037tcp_mssopt(tp)
2038 struct tcpcb *tp;
2039{
2040 struct rtentry *rt;
2043 extern int tcp_mssdflt;
2044
2045 rt = tcp_rtlookup(tp->t_inpcb);
2046 if (rt == NULL)
2047 return tcp_mssdflt;
2048
2049 /*
2050 * if there's an mtu associated with the route, use it
2051 */
2052 if (rt->rt_rmx.rmx_mtu)
2053 return rt->rt_rmx.rmx_mtu - sizeof(struct tcpiphdr);
2054
2055 return rt->rt_ifp->if_mtu - sizeof(struct tcpiphdr);
2056}
2057#endif /* TUBA_INCLUDE */
2041
2042 rt = tcp_rtlookup(tp->t_inpcb);
2043 if (rt == NULL)
2044 return tcp_mssdflt;
2045
2046 /*
2047 * if there's an mtu associated with the route, use it
2048 */
2049 if (rt->rt_rmx.rmx_mtu)
2050 return rt->rt_rmx.rmx_mtu - sizeof(struct tcpiphdr);
2051
2052 return rt->rt_ifp->if_mtu - sizeof(struct tcpiphdr);
2053}
2054#endif /* TUBA_INCLUDE */