tcp_output.c (109492) | tcp_output.c (109623) |
---|---|
1/* 2 * Copyright (c) 1982, 1986, 1988, 1990, 1993, 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_output.c 8.4 (Berkeley) 5/24/95 | 1/* 2 * Copyright (c) 1982, 1986, 1988, 1990, 1993, 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_output.c 8.4 (Berkeley) 5/24/95 |
34 * $FreeBSD: head/sys/netinet/tcp_output.c 109492 2003-01-18 19:03:26Z hsu $ | 34 * $FreeBSD: head/sys/netinet/tcp_output.c 109623 2003-01-21 08:56:16Z alfred $ |
35 */ 36 37#include "opt_inet6.h" 38#include "opt_ipsec.h" 39#include "opt_mac.h" 40#include "opt_tcpdebug.h" 41 42#include <sys/param.h> --- 555 unchanged lines hidden (view full) --- 598 goto out; 599 } 600 /* 601 * m_copypack left space for our hdr; use it. 602 */ 603 m->m_len += hdrlen; 604 m->m_data -= hdrlen; 605#else | 35 */ 36 37#include "opt_inet6.h" 38#include "opt_ipsec.h" 39#include "opt_mac.h" 40#include "opt_tcpdebug.h" 41 42#include <sys/param.h> --- 555 unchanged lines hidden (view full) --- 598 goto out; 599 } 600 /* 601 * m_copypack left space for our hdr; use it. 602 */ 603 m->m_len += hdrlen; 604 m->m_data -= hdrlen; 605#else |
606 MGETHDR(m, M_DONTWAIT, MT_HEADER); | 606 MGETHDR(m, M_NOWAIT, MT_HEADER); |
607 if (m == NULL) { 608 error = ENOBUFS; 609 goto out; 610 } 611#ifdef INET6 612 if (MHLEN < hdrlen + max_linkhdr) { | 607 if (m == NULL) { 608 error = ENOBUFS; 609 goto out; 610 } 611#ifdef INET6 612 if (MHLEN < hdrlen + max_linkhdr) { |
613 MCLGET(m, M_DONTWAIT); | 613 MCLGET(m, M_NOWAIT); |
614 if ((m->m_flags & M_EXT) == 0) { 615 m_freem(m); 616 error = ENOBUFS; 617 goto out; 618 } 619 } 620#endif 621 m->m_data += max_linkhdr; --- 24 unchanged lines hidden (view full) --- 646 tcpstat.tcps_sndacks++; 647 else if (flags & (TH_SYN|TH_FIN|TH_RST)) 648 tcpstat.tcps_sndctrl++; 649 else if (SEQ_GT(tp->snd_up, tp->snd_una)) 650 tcpstat.tcps_sndurg++; 651 else 652 tcpstat.tcps_sndwinup++; 653 | 614 if ((m->m_flags & M_EXT) == 0) { 615 m_freem(m); 616 error = ENOBUFS; 617 goto out; 618 } 619 } 620#endif 621 m->m_data += max_linkhdr; --- 24 unchanged lines hidden (view full) --- 646 tcpstat.tcps_sndacks++; 647 else if (flags & (TH_SYN|TH_FIN|TH_RST)) 648 tcpstat.tcps_sndctrl++; 649 else if (SEQ_GT(tp->snd_up, tp->snd_una)) 650 tcpstat.tcps_sndurg++; 651 else 652 tcpstat.tcps_sndwinup++; 653 |
654 MGETHDR(m, M_DONTWAIT, MT_HEADER); | 654 MGETHDR(m, M_NOWAIT, MT_HEADER); |
655 if (m == NULL) { 656 error = ENOBUFS; 657 goto out; 658 } 659#ifdef INET6 660 if (isipv6 && (MHLEN < hdrlen + max_linkhdr) && 661 MHLEN >= hdrlen) { 662 MH_ALIGN(m, hdrlen); --- 341 unchanged lines hidden --- | 655 if (m == NULL) { 656 error = ENOBUFS; 657 goto out; 658 } 659#ifdef INET6 660 if (isipv6 && (MHLEN < hdrlen + max_linkhdr) && 661 MHLEN >= hdrlen) { 662 MH_ALIGN(m, hdrlen); --- 341 unchanged lines hidden --- |