home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / detk45he.zip / netinet / tcp_var.h < prev    next >
C/C++ Source or Header  |  1999-05-11  |  9KB  |  156 lines

  1. /*
  2.  * Copyright (c) 1982, 1986, 1993, 1994, 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
  9.  *    notice, this list of conditions and the following disclaimer.
  10.  * 2. Redistributions in binary form must reproduce the above copyright
  11.  *    notice, this list of conditions and the following disclaimer in the
  12.  *    documentation and/or other materials provided with the distribution.
  13.  * 3. All advertising materials mentioning features or use of this software
  14.  *    must display the following acknowledgement:
  15.  *      This product includes software developed by the University of
  16.  *      California, Berkeley and its contributors.
  17.  * 4. Neither the name of the University nor the names of its contributors
  18.  *    may be used to endorse or promote products derived from this software
  19.  *    without specific prior written permission.
  20.  *
  21.  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  22.  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  23.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  24.  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  25.  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  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_var.h   8.4 (Berkeley) 5/24/95
  34.  */
  35.  
  36. #ifndef _NETINET_TCP_VAR_H_
  37. #define _NETINET_TCP_VAR_H_
  38.  
  39. #ifdef TCPV40HDRS
  40. #error error: netinet\tcp_var.h is for TCP/IP toolkit 5.0 or later releases only
  41. #else
  42. /*
  43.  * TCP statistics.
  44.  * Many of these should be kept per connection,
  45.  * but that's inconvenient at the moment.
  46.  */
  47. struct  tcpstat {
  48.         u_long  tcps_connattempt;       /* connections initiated */
  49.         u_long  tcps_accepts;           /* connections accepted */
  50.         u_long  tcps_connects;          /* connections established */
  51.         u_long  tcps_drops;             /* connections dropped */
  52.         u_long  tcps_conndrops;         /* embryonic connections dropped */
  53.         u_long  tcps_closed;            /* conn. closed (includes drops) */
  54.         u_long  tcps_segstimed;         /* segs where we tried to get rtt */
  55.         u_long  tcps_rttupdated;        /* times we succeeded */
  56.         u_long  tcps_delack;            /* delayed acks sent */
  57.         u_long  tcps_timeoutdrop;       /* conn. dropped in rxmt timeout */
  58.         u_long  tcps_rexmttimeo;        /* retransmit timeouts */
  59.         u_long  tcps_persisttimeo;      /* persist timeouts */
  60.         u_long  tcps_keeptimeo;         /* keepalive timeouts */
  61.         u_long  tcps_keepprobe;         /* keepalive probes sent */
  62.         u_long  tcps_keepdrops;         /* connections dropped in keepalive */
  63.  
  64.         u_long  tcps_sndtotal;          /* total packets sent */
  65.         u_long  tcps_sndpack;           /* data packets sent */
  66.         u_long  tcps_sndbyte;           /* data bytes sent */
  67.         u_long  tcps_sndrexmitpack;     /* data packets retransmitted */
  68.         u_long  tcps_sndrexmitbyte;     /* data bytes retransmitted */
  69.         u_long  tcps_sndacks;           /* ack-only packets sent */
  70.         u_long  tcps_sndprobe;          /* window probes sent */
  71.         u_long  tcps_sndurg;            /* packets sent with URG only */
  72.         u_long  tcps_sndwinup;          /* window update-only packets sent */
  73.         u_long  tcps_sndctrl;           /* control (SYN|FIN|RST) packets sent */
  74.         u_long  tcps_sndrst;            /* RST packets send .... MIB II       */
  75.  
  76.         u_long  tcps_rcvtotal;          /* total packets received */
  77.         u_long  tcps_rcvpack;           /* packets received in sequence */
  78.         u_long  tcps_rcvbyte;           /* bytes received in sequence */
  79.         u_long  tcps_rcvbadsum;         /* packets received with ccksum errs */
  80.         u_long  tcps_rcvbadoff;         /* packets received with bad offset */
  81.         u_long  tcps_rcvshort;          /* packets received too short */
  82.         u_long  tcps_rcvduppack;        /* duplicate-only packets received */
  83.         u_long  tcps_rcvdupbyte;        /* duplicate-only bytes received */
  84.         u_long  tcps_rcvpartduppack;    /* packets with some duplicate data */
  85.         u_long  tcps_rcvpartdupbyte;    /* dup. bytes in part-dup. packets */
  86.         u_long  tcps_rcvoopack;         /* out-of-order packets received */
  87.         u_long  tcps_rcvoobyte;         /* out-of-order bytes received */
  88.         u_long  tcps_rcvpackafterwin;   /* packets with data after window */
  89.         u_long  tcps_rcvbyteafterwin;   /* bytes rcvd after window */
  90.         u_long  tcps_rcvafterclose;     /* packets rcvd after "close" */
  91.         u_long  tcps_rcvwinprobe;       /* rcvd window probe packets */
  92.         u_long  tcps_rcvdupack;         /* rcvd duplicate acks */
  93.         u_long  tcps_rcvacktoomuch;     /* rcvd acks for unsent data */
  94.         u_long  tcps_rcvackpack;        /* rcvd ack packets */
  95.         u_long  tcps_rcvackbyte;        /* bytes acked by rcvd acks */
  96.         u_long  tcps_rcvwinupd;         /* rcvd window update packets */
  97.         u_long  tcps_pawsdrop;          /* segments dropped due to PAWS */
  98.         u_long  tcps_predack;           /* times hdr predict ok for acks */
  99.         u_long  tcps_preddat;           /* times hdr predict ok for data pkts*/
  100.         u_long  tcps_pcbcachemiss;
  101.         u_long  tcps_persistdrop;       /* timeout in persist state */
  102.         u_long  tcps_badsyn;            /* bogus SYN, e.g. premature ACK */
  103.  
  104.         /* the fillowing 7 are for mtudisco and ttcp */
  105.  
  106.         u_long  tcps_mturesent;         /* resends due to MTU discovery */
  107.         u_long  tcps_cachedrtt;         /* times cached RTT in route updated */
  108.         u_long  tcps_cachedrttvar;      /* times cached rttvar updated */
  109.         u_long  tcps_cachedssthresh;    /* times cached ssthresh updated */
  110.         u_long  tcps_usedrtt;           /* times RTT initialized from route */
  111.         u_long  tcps_usedrttvar;        /* times RTTVAR initialized from rt */
  112.         u_long  tcps_usedssthresh;      /* times ssthresh initialized from rt*/
  113. };
  114.  
  115. /*
  116.  * Names for TCP sysctl objects
  117.  */
  118. #define TCPCTL_MSSDFLT          1       /* MSS default */
  119. #define TCPCTL_STATS            2       /* statistics (read-only) */
  120. #define TCPCTL_RTTDFLT          3       /* default RTT estimate */
  121. #define TCPCTL_MSL              4       /* No Of Keepalive probes */
  122. #define TCPCTL_INETCFG          6       /* Generic TCP Inetcfg switching */
  123. #define TCPCTL_LINGERTIME       7       /* Linger On close timer */
  124. #define TCPCTL_KEEPCNT          8       /* No Of Keepalive probes */
  125. #define TCPCTL_TCPSWIN          9       /* TCP Send Window Size    */
  126. #define TCPCTL_TCPRWIN          10      /* TCP Recieve Window Size */
  127. #define TCPCTL_TTL              11      /* TTL for TCP  packets */
  128. #define TCPCTL_MTU              12      /* Path MTU Discovery ON/OFF flg */
  129. #define TCPCTL_WINSCALE         13      /* Winow Scale (Fat Pipe) ON/OFF flg */
  130. #define TCPCTL_TIMESTMP         14      /* TCP TimeStamp ON/OFF flg */
  131. #define TCPCTL_CC               15      /* Cc, CCnew & Echo ON/OFF flg */
  132. #define TCPCTL_REALSLOW         16      /* Real Slow Timer for Time Wait Q */
  133. #define TCPCTL_REUSETW          17      /* Reuse TW inetcfg */
  134. #define TCPCTL_SYNCOOKIE        18      /* Syncookie inetcfg */
  135. #define TCPCTL_PERFHTTP        19      /* Fast Path HTTP */
  136.  
  137.  
  138. /*Inetcfg ioctl constants */
  139. #define ICFG_SETKEEPALIVE       20      /* sysctl code:Set the KeepAlive timer */
  140. #define ICFG_GETKEEPALIVE       21      /* sysctl code:Get the KeepAlive timer defaults */
  141.  
  142. #define TCPCTL_NAMES { \
  143.         { 0, 0 }, \
  144.         { "mssdflt", CTLTYPE_INT },    \
  145.         { "stats",   CTLTYPE_STRUCT }, \
  146.         { "rttdflt", CTLTYPE_INT },    \
  147.         { "inetcfg", CTLTYPE_INETCFG },\
  148. }
  149.  
  150. #ifdef KERNEL
  151. #include <private/tcp_var.h>
  152. #endif
  153.  
  154. #endif /* TCPV40HDRS */
  155. #endif /* _NETINET_TCP_VAR_H_ */
  156.