1 /* $OpenBSD: spx_var.h,v 1.4 2003/06/02 23:28:16 millert Exp $ */ 2 3 /*- 4 * 5 * Copyright (c) 1996 Michael Shalayeff 6 * Copyright (c) 1995, Mike Mitchell 7 * Copyright (c) 1984, 1985, 1986, 1987, 1993 8 * The Regents of the University of California. All rights reserved. 9 * 10 * Redistribution and use in source and binary forms, with or without 11 * modification, are permitted provided that the following conditions 12 * are met: 13 * 1. Redistributions of source code must retain the above copyright 14 * notice, this list of conditions and the following disclaimer. 15 * 2. Redistributions in binary form must reproduce the above copyright 16 * notice, this list of conditions and the following disclaimer in the 17 * documentation and/or other materials provided with the distribution. 18 * 3. Neither the name of the University nor the names of its contributors 19 * may be used to endorse or promote products derived from this software 20 * without specific prior written permission. 21 * 22 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 23 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 26 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32 * SUCH DAMAGE. 33 * 34 * @(#)spx_var.h 35 * 36 * from FreeBSD Id: spx_var.h,v 1.4 1995/11/04 09:03:47 julian Exp 37 */ 38 39 #ifndef _NETIPX_SPX_VAR_H_ 40 #define _NETIPX_SPX_VAR_H_ 41 42 struct spxstat { 43 long spxs_connattempt; /* connections initiated */ 44 long spxs_accepts; /* connections accepted */ 45 long spxs_connects; /* connections established */ 46 long spxs_drops; /* connections dropped */ 47 long spxs_conndrops; /* embryonic connections dropped */ 48 long spxs_closed; /* conn. closed (includes drops) */ 49 long spxs_segstimed; /* segs where we tried to get rtt */ 50 long spxs_rttupdated; /* times we succeeded */ 51 long spxs_delack; /* delayed acks sent */ 52 long spxs_timeoutdrop; /* conn. dropped in rxmt timeout */ 53 long spxs_rexmttimeo; /* retransmit timeouts */ 54 long spxs_persisttimeo; /* persist timeouts */ 55 long spxs_keeptimeo; /* keepalive timeouts */ 56 long spxs_keepprobe; /* keepalive probes sent */ 57 long spxs_keepdrops; /* connections dropped in keepalive */ 58 59 long spxs_sndtotal; /* total packets sent */ 60 long spxs_sndpack; /* data packets sent */ 61 long spxs_sndbyte; /* data bytes sent */ 62 long spxs_sndrexmitpack; /* data packets retransmitted */ 63 long spxs_sndrexmitbyte; /* data bytes retransmitted */ 64 long spxs_sndacks; /* ack-only packets sent */ 65 long spxs_sndprobe; /* window probes sent */ 66 long spxs_sndurg; /* packets sent with URG only */ 67 long spxs_sndwinup; /* window update-only packets sent */ 68 long spxs_sndctrl; /* control (SYN|FIN|RST) packets sent */ 69 long spxs_sndvoid; /* couldn't find requested packet*/ 70 71 long spxs_rcvtotal; /* total packets received */ 72 long spxs_rcvpack; /* packets received in sequence */ 73 long spxs_rcvbyte; /* bytes received in sequence */ 74 long spxs_rcvbadsum; /* packets received with ccksum errs */ 75 long spxs_rcvbadoff; /* packets received with bad offset */ 76 long spxs_rcvshort; /* packets received too short */ 77 long spxs_rcvduppack; /* duplicate-only packets received */ 78 long spxs_rcvdupbyte; /* duplicate-only bytes received */ 79 long spxs_rcvpartduppack; /* packets with some duplicate data */ 80 long spxs_rcvpartdupbyte; /* dup. bytes in part-dup. packets */ 81 long spxs_rcvoopack; /* out-of-order packets received */ 82 long spxs_rcvoobyte; /* out-of-order bytes received */ 83 long spxs_rcvpackafterwin; /* packets with data after window */ 84 long spxs_rcvbyteafterwin; /* bytes rcvd after window */ 85 long spxs_rcvafterclose; /* packets rcvd after "close" */ 86 long spxs_rcvwinprobe; /* rcvd window probe packets */ 87 long spxs_rcvdupack; /* rcvd duplicate acks */ 88 long spxs_rcvacktoomuch; /* rcvd acks for unsent data */ 89 long spxs_rcvackpack; /* rcvd ack packets */ 90 long spxs_rcvackbyte; /* bytes acked by rcvd acks */ 91 long spxs_rcvwinupd; /* rcvd window update packets */ 92 }; 93 94 struct spx_istat { 95 short hdrops; 96 short badsum; 97 short badlen; 98 short slotim; 99 short fastim; 100 short nonucn; 101 short noconn; 102 short notme; 103 short wrncon; 104 short bdreas; 105 short gonawy; 106 short notyet; 107 short lstdup; 108 struct spxstat newstats; 109 }; 110 111 #ifdef _KERNEL 112 extern struct spx_istat spx_istat; 113 extern u_short spx_iss; 114 115 /* Following was struct spxstat spxstat; */ 116 #ifndef spxstat 117 #define spxstat spx_istat.newstats 118 #endif 119 120 #endif 121 122 #define SPX_ISSINCR 128 123 /* 124 * spx sequence numbers are 16 bit integers operated 125 * on with modular arithmetic. These macros can be 126 * used to compare such integers. 127 */ 128 #define SSEQ_LT(a,b) (((short)((a)-(b))) < 0) 129 #define SSEQ_LEQ(a,b) (((short)((a)-(b))) <= 0) 130 #define SSEQ_GT(a,b) (((short)((a)-(b))) > 0) 131 #define SSEQ_GEQ(a,b) (((short)((a)-(b))) >= 0) 132 133 /* 134 * Names for SPX sysctl objects. 135 */ 136 137 #define SPXCTL_MAXID 1 138 139 #define SPXCTL_NAMES { \ 140 { 0, 0}, \ 141 } 142 143 144 #endif 145