tcp_usrreq.c (102218) | tcp_usrreq.c (102291) |
---|---|
1/* 2 * Copyright (c) 1982, 1986, 1988, 1993 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_usrreq.c 8.2 (Berkeley) 1/3/94 | 1/* 2 * Copyright (c) 1982, 1986, 1988, 1993 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_usrreq.c 8.2 (Berkeley) 1/3/94 |
34 * $FreeBSD: head/sys/netinet/tcp_usrreq.c 102218 2002-08-21 11:57:12Z truckman $ | 34 * $FreeBSD: head/sys/netinet/tcp_usrreq.c 102291 2002-08-22 21:24:01Z archie $ |
35 */ 36 37#include "opt_ipsec.h" 38#include "opt_inet6.h" 39#include "opt_tcpdebug.h" 40 41#include <sys/param.h> 42#include <sys/systm.h> --- 923 unchanged lines hidden (view full) --- 966 otp = tcp_close(otp); 967 else 968 return EADDRINUSE; 969 } 970 if (IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_laddr)) 971 inp->in6p_laddr = *addr6; 972 inp->in6p_faddr = sin6->sin6_addr; 973 inp->inp_fport = sin6->sin6_port; | 35 */ 36 37#include "opt_ipsec.h" 38#include "opt_inet6.h" 39#include "opt_tcpdebug.h" 40 41#include <sys/param.h> 42#include <sys/systm.h> --- 923 unchanged lines hidden (view full) --- 966 otp = tcp_close(otp); 967 else 968 return EADDRINUSE; 969 } 970 if (IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_laddr)) 971 inp->in6p_laddr = *addr6; 972 inp->in6p_faddr = sin6->sin6_addr; 973 inp->inp_fport = sin6->sin6_port; |
974 if ((sin6->sin6_flowinfo & IPV6_FLOWINFO_MASK) != NULL) | 974 if ((sin6->sin6_flowinfo & IPV6_FLOWINFO_MASK) != 0) |
975 inp->in6p_flowinfo = sin6->sin6_flowinfo; 976 in_pcbrehash(inp); 977 978 /* Compute window scaling to request. */ 979 while (tp->request_r_scale < TCP_MAX_WINSHIFT && 980 (TCP_MAXWIN << tp->request_r_scale) < so->so_rcv.sb_hiwat) 981 tp->request_r_scale++; 982 --- 175 unchanged lines hidden (view full) --- 1158tcp_attach(so, td) 1159 struct socket *so; 1160 struct thread *td; 1161{ 1162 register struct tcpcb *tp; 1163 struct inpcb *inp; 1164 int error; 1165#ifdef INET6 | 975 inp->in6p_flowinfo = sin6->sin6_flowinfo; 976 in_pcbrehash(inp); 977 978 /* Compute window scaling to request. */ 979 while (tp->request_r_scale < TCP_MAX_WINSHIFT && 980 (TCP_MAXWIN << tp->request_r_scale) < so->so_rcv.sb_hiwat) 981 tp->request_r_scale++; 982 --- 175 unchanged lines hidden (view full) --- 1158tcp_attach(so, td) 1159 struct socket *so; 1160 struct thread *td; 1161{ 1162 register struct tcpcb *tp; 1163 struct inpcb *inp; 1164 int error; 1165#ifdef INET6 |
1166 int isipv6 = INP_CHECK_SOCKAF(so, AF_INET6) != NULL; | 1166 int isipv6 = INP_CHECK_SOCKAF(so, AF_INET6) != 0; |
1167#endif 1168 1169 if (so->so_snd.sb_hiwat == 0 || so->so_rcv.sb_hiwat == 0) { 1170 error = soreserve(so, tcp_sendspace, tcp_recvspace); 1171 if (error) 1172 return (error); 1173 } 1174 error = in_pcballoc(so, &tcbinfo, td); --- 103 unchanged lines hidden --- | 1167#endif 1168 1169 if (so->so_snd.sb_hiwat == 0 || so->so_rcv.sb_hiwat == 0) { 1170 error = soreserve(so, tcp_sendspace, tcp_recvspace); 1171 if (error) 1172 return (error); 1173 } 1174 error = in_pcballoc(so, &tcbinfo, td); --- 103 unchanged lines hidden --- |