tcp_output.c (2cdbfa66ee9fb0e288ad9fa249b07cddcb6092c0) tcp_output.c (34333b16cdbff9a44599686b809052878716f44e)
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

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

742 goto out;
743 }
744 /*
745 * m_copypack left space for our hdr; use it.
746 */
747 m->m_len += hdrlen;
748 m->m_data -= hdrlen;
749#else
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

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

742 goto out;
743 }
744 /*
745 * m_copypack left space for our hdr; use it.
746 */
747 m->m_len += hdrlen;
748 m->m_data -= hdrlen;
749#else
750 MGETHDR(m, M_DONTWAIT, MT_HEADER);
750 MGETHDR(m, M_DONTWAIT, MT_DATA);
751 if (m == NULL) {
752 SOCKBUF_UNLOCK(&so->so_snd);
753 error = ENOBUFS;
754 goto out;
755 }
756#ifdef INET6
757 if (MHLEN < hdrlen + max_linkhdr) {
758 MCLGET(m, M_DONTWAIT);

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

795 tcpstat.tcps_sndacks++;
796 else if (flags & (TH_SYN|TH_FIN|TH_RST))
797 tcpstat.tcps_sndctrl++;
798 else if (SEQ_GT(tp->snd_up, tp->snd_una))
799 tcpstat.tcps_sndurg++;
800 else
801 tcpstat.tcps_sndwinup++;
802
751 if (m == NULL) {
752 SOCKBUF_UNLOCK(&so->so_snd);
753 error = ENOBUFS;
754 goto out;
755 }
756#ifdef INET6
757 if (MHLEN < hdrlen + max_linkhdr) {
758 MCLGET(m, M_DONTWAIT);

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

795 tcpstat.tcps_sndacks++;
796 else if (flags & (TH_SYN|TH_FIN|TH_RST))
797 tcpstat.tcps_sndctrl++;
798 else if (SEQ_GT(tp->snd_up, tp->snd_una))
799 tcpstat.tcps_sndurg++;
800 else
801 tcpstat.tcps_sndwinup++;
802
803 MGETHDR(m, M_DONTWAIT, MT_HEADER);
803 MGETHDR(m, M_DONTWAIT, MT_DATA);
804 if (m == NULL) {
805 error = ENOBUFS;
806 goto out;
807 }
808#ifdef INET6
809 if (isipv6 && (MHLEN < hdrlen + max_linkhdr) &&
810 MHLEN >= hdrlen) {
811 MH_ALIGN(m, hdrlen);

--- 370 unchanged lines hidden ---
804 if (m == NULL) {
805 error = ENOBUFS;
806 goto out;
807 }
808#ifdef INET6
809 if (isipv6 && (MHLEN < hdrlen + max_linkhdr) &&
810 MHLEN >= hdrlen) {
811 MH_ALIGN(m, hdrlen);

--- 370 unchanged lines hidden ---