BSD 4_4_Lite1 release
[unix-history] / usr / src / sys / netinet / tcp_var.h
index b4f9679..8a8e751 100644 (file)
@@ -1,61 +1,37 @@
 /*
 /*
- * Copyright (c) 1982, 1986, 1993
+ * Copyright (c) 1982, 1986, 1993, 1994
  *     The Regents of the University of California.  All rights reserved.
  *
  *     The Regents of the University of California.  All rights reserved.
  *
- * %sccs.include.redist.c%
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *     This product includes software developed by the University of
+ *     California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
  *
  *
- *     @(#)tcp_var.h   8.2 (Berkeley) %G%
- */
-
-/*
- * TCP configuration:  This is a half-assed attempt to make TCP
- * self-configure for a few varieties of 4.2 and 4.3-based unixes.
- * If you don't have a) a 4.3bsd vax or b) a 3.x Sun (x<6), check
- * this carefully (it's probably not right).  Please send me mail
- * if you run into configuration problems.
- *  - Van Jacobson (van@lbl-csam.arpa)
- */
-
-#ifndef BSD
-#define BSD 42 /* if we're not 4.3, pretend we're 4.2 */
-#define OLDSTAT        /* set if we have to use old netstat binaries */
-#endif
-
-/* #define OLDSTAT     /* set if we have to use old netstat binaries */
-
-#if sun || BSD < 43
-#define TCP_COMPAT_42  /* set if we have to interop w/4.2 systems */
-#endif
-
-#ifndef SB_MAX
-#ifdef SB_MAXCOUNT
-#define        SB_MAX  SB_MAXCOUNT     /* Sun has to be a little bit different... */
-#else
-#define SB_MAX 32767           /* XXX */
-#endif SB_MAXCOUNT
-#endif SB_MAX
-
-/*
- * Bill Nowicki pointed out that the page size (CLBYTES) has
- * nothing to do with the mbuf cluster size.  So, we followed
- * Sun's lead and made the new define MCLBYTES stand for the mbuf
- * cluster size.  The following define makes up backwards compatible
- * with 4.3 and 4.2.  If CLBYTES is >1024 on your machine, check
- * this against the mbuf cluster definitions in /usr/include/sys/mbuf.h.
- */
-#ifndef MCLBYTES
-#define        MCLBYTES CLBYTES        /* XXX */
-#endif
-
-/*
- * The routine in_localaddr is broken in Sun's 3.4.  We redefine ours
- * (in tcp_input.c) so we use can it but won't have a name conflict.
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *     @(#)tcp_var.h   8.3 (Berkeley) 4/10/94
  */
  */
-#ifdef sun
-#define in_localaddr tcp_in_localaddr
-#endif
-
-/* --------------- end of TCP config ---------------- */
 
 /*
  * Kernel variables for tcp.
 
 /*
  * Kernel variables for tcp.
@@ -201,22 +177,6 @@ struct tcpcb {
  * but that's inconvenient at the moment.
  */
 struct tcpstat {
  * but that's inconvenient at the moment.
  */
 struct tcpstat {
-#ifdef OLDSTAT
-       /*
-        * Declare statistics the same as in 4.3
-        * at the start of tcpstat (same size and
-        * position) for netstat.
-        */
-       int     tcps_rcvbadsum;
-       int     tcps_rcvbadoff;
-       int     tcps_rcvshort;
-       int     tcps_badsegs;
-       int     tcps_unack;
-#define        tcps_badsum     tcps_rcvbadsum
-#define        tcps_badoff     tcps_rcvbadoff
-#define        tcps_hdrops     tcps_rcvshort
-
-#endif OLDSTAT
        u_long  tcps_connattempt;       /* connections initiated */
        u_long  tcps_accepts;           /* connections accepted */
        u_long  tcps_connects;          /* connections established */
        u_long  tcps_connattempt;       /* connections initiated */
        u_long  tcps_accepts;           /* connections accepted */
        u_long  tcps_connects;          /* connections established */
@@ -250,7 +210,6 @@ struct      tcpstat {
        u_long  tcps_rcvbadsum;         /* packets received with ccksum errs */
        u_long  tcps_rcvbadoff;         /* packets received with bad offset */
        u_long  tcps_rcvshort;          /* packets received too short */
        u_long  tcps_rcvbadsum;         /* packets received with ccksum errs */
        u_long  tcps_rcvbadoff;         /* packets received with bad offset */
        u_long  tcps_rcvshort;          /* packets received too short */
-#endif
        u_long  tcps_rcvduppack;        /* duplicate-only packets received */
        u_long  tcps_rcvdupbyte;        /* duplicate-only bytes received */
        u_long  tcps_rcvpartduppack;    /* packets with some duplicate data */
        u_long  tcps_rcvduppack;        /* duplicate-only packets received */
        u_long  tcps_rcvdupbyte;        /* duplicate-only bytes received */
        u_long  tcps_rcvpartduppack;    /* packets with some duplicate data */
@@ -267,6 +226,9 @@ struct      tcpstat {
        u_long  tcps_rcvackbyte;        /* bytes acked by rcvd acks */
        u_long  tcps_rcvwinupd;         /* rcvd window update packets */
        u_long  tcps_pawsdrop;          /* segments dropped due to PAWS */
        u_long  tcps_rcvackbyte;        /* bytes acked by rcvd acks */
        u_long  tcps_rcvwinupd;         /* rcvd window update packets */
        u_long  tcps_pawsdrop;          /* segments dropped due to PAWS */
+       u_long  tcps_predack;           /* times hdr predict ok for acks */
+       u_long  tcps_preddat;           /* times hdr predict ok for data pkts */
+       u_long  tcps_pcbcachemiss;
 };
 
 #ifdef KERNEL
 };
 
 #ifdef KERNEL