Deleted Added
full compact
tcp_usrreq.c (153427) tcp_usrreq.c (157366)
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

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

22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * 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

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

22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * From: @(#)tcp_usrreq.c 8.2 (Berkeley) 1/3/94
30 * $FreeBSD: head/sys/netinet/tcp_usrreq.c 153427 2005-12-14 22:27:48Z mux $
30 * $FreeBSD: head/sys/netinet/tcp_usrreq.c 157366 2006-04-01 15:15:05Z rwatson $
31 */
32
33#include "opt_inet.h"
34#include "opt_inet6.h"
35#include "opt_tcpdebug.h"
36
37#include <sys/param.h>
38#include <sys/systm.h>

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

750 if (!unlocked)
751 INP_INFO_WUNLOCK(&tcbinfo);
752 return (error);
753}
754
755/*
756 * Abort the TCP.
757 */
31 */
32
33#include "opt_inet.h"
34#include "opt_inet6.h"
35#include "opt_tcpdebug.h"
36
37#include <sys/param.h>
38#include <sys/systm.h>

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

750 if (!unlocked)
751 INP_INFO_WUNLOCK(&tcbinfo);
752 return (error);
753}
754
755/*
756 * Abort the TCP.
757 */
758static int
758static void
759tcp_usr_abort(struct socket *so)
760{
759tcp_usr_abort(struct socket *so)
760{
761 int error = 0;
762 struct inpcb *inp;
763 struct tcpcb *tp;
761 struct inpcb *inp;
762 struct tcpcb *tp;
764 const int inirw = INI_WRITE;
763 TCPDEBUG0;
765
764
766 COMMON_START();
765 INP_INFO_WLOCK(&tcbinfo);
766 inp = sotoinpcb(so);
767 if (inp == NULL)
768 return;
769 INP_LOCK(inp);
770 tp = intotcpcb(inp);
771 TCPDEBUG1();
767 tp = tcp_drop(tp, ECONNABORTED);
772 tp = tcp_drop(tp, ECONNABORTED);
768 COMMON_END(PRU_ABORT);
773 TCPDEBUG2(PRU_ABORT);
774 if (tp)
775 INP_UNLOCK(inp);
776 INP_INFO_WUNLOCK(&tcbinfo);
769}
770
771/*
772 * Receive out-of-band data.
773 */
774static int
775tcp_usr_rcvoob(struct socket *so, struct mbuf *m, int flags)
776{

--- 529 unchanged lines hidden ---
777}
778
779/*
780 * Receive out-of-band data.
781 */
782static int
783tcp_usr_rcvoob(struct socket *so, struct mbuf *m, int flags)
784{

--- 529 unchanged lines hidden ---