# 2.11BSD#431 - /usr/src/sys/netns/spp_var.h

##### Variables

    spp_istat         X
    xnsCbug           X

##### Macros

    CUNIT             X
    SF_ACKNOW         X
    SF_DELACK         X
    SF_HI             X
    SF_HO             X
    SF_IOOB           X
    SF_PI             X
    SF_RVD            X
    SF_RXT            X
    SF_SOOB           X
    SF_WIN            X
    SPP_ISSINCR       X
    SSEQ_GEQ          X
    SSEQ_GT           X
    SSEQ_LEQ          X
    SSEQ_LT           X
    nstosppcb         X
    s_ack             X
    s_alo             X
    s_cc              X
    s_did             X
    s_dport           X
    s_dt              X
    s_seq             X
    s_sid             X
    sotosppcb         X
    sppstat           X

##### struct's

    spp_istat         X
    sppcb             X
    sppstat           X

       1: /*
       2:  * Copyright (c) 1984, 1985, 1986, 1987 Regents of the University of California.
       3:  * All rights reserved.
       4:  *
       5:  * Redistribution and use in source and binary forms are permitted
       6:  * provided that this notice is preserved and that due credit is given
       7:  * to the University of California at Berkeley. The name of the University
       8:  * may not be used to endorse or promote products derived from this
       9:  * software without specific prior written permission. This software
      10:  * is provided ``as is'' without express or implied warranty.
      11:  *
      12:  *      @(#)spp_var.h	7.4.1 (2.11BSD GTE) 12/31/93
      13:  */
      14:
      15: /*
      16:  * Sp control block, one per connection
      17:  */
      18: struct sppcb {
      19:     struct  spidp_q s_q;        /* queue for out-of-order receipt */
      20:     struct  nspcb   *s_nspcb;   /* backpointer to internet pcb */
      21:     u_char  s_state;
      22:     u_char  s_flags;
      23: #define SF_ACKNOW   0x01        /* Ack peer immediately */
      24: #define SF_DELACK   0x02        /* Ack, but try to delay it */
      25: #define SF_HI   0x04            /* Show headers on input */
      26: #define SF_HO   0x08            /* Show headers on output */
      27: #define SF_PI   0x10            /* Packet (datagram) interface */
      28: #define SF_WIN  0x20            /* Window info changed */
      29: #define SF_RXT  0x40            /* Rxt info changed */
      30: #define SF_RVD  0x80            /* Calling from read usrreq routine */
      31:     u_short s_mtu;          /* Max packet size for this stream */
      32: /* use sequence fields in headers to store sequence numbers for this
      33:    connection */
      34:     struct  idp *s_idp;
      35:     struct  sphdr   s_shdr;     /* prototype header to transmit */
      36: #define s_cc s_shdr.sp_cc       /* connection control (for EM bit) */
      37: #define s_dt s_shdr.sp_dt       /* datastream type */
      38: #define s_sid s_shdr.sp_sid     /* source connection identifier */
      39: #define s_did s_shdr.sp_did     /* destination connection identifier */
      40: #define s_seq s_shdr.sp_seq     /* sequence number */
      41: #define s_ack s_shdr.sp_ack     /* acknowledge number */
      42: #define s_alo s_shdr.sp_alo     /* allocation number */
      43: #define s_dport s_idp->idp_dna.x_port   /* where we are sending */
      44:     struct sphdr s_rhdr;        /* last received header (in effect!)*/
      45:     u_short s_rack;         /* their acknowledge number */
      46:     u_short s_ralo;         /* their allocation number */
      47:     u_short s_smax;         /* highest packet # we have sent */
      48:     u_short s_snxt;         /* which packet to send next */
      49:
      50: /* congestion control */
      51: #define CUNIT   1024            /* scaling for ... */
      52:     int s_cwnd;         /* Congestion-controlled window */
      53:                     /* in packets * CUNIT */
      54:     short   s_swnd;         /* == tcp snd_wnd, in packets */
      55:     short   s_smxw;         /* == tcp max_sndwnd */
      56:                     /* difference of two spp_seq's can be
      57: 					   no bigger than a short */
      58:     u_short s_swl1;         /* == tcp snd_wl1 */
      59:     u_short s_swl2;         /* == tcp snd_wl2 */
      60:     int s_cwmx;         /* max allowable cwnd */
      61:     int s_ssthresh;     /* s_cwnd size threshhold for
      62: 					 * slow start exponential-to-
      63: 					 * linear switch */
      64: /* transmit timing stuff
      65:  * srtt and rttvar are stored as fixed point, for convenience in smoothing.
      66:  * srtt has 3 bits to the right of the binary point, rttvar has 2.
      67:  */
      68:     short   s_idle;         /* time idle */
      69:     short   s_timer[SPPT_NTIMERS];  /* timers */
      70:     short   s_rxtshift;     /* log(2) of rexmt exp. backoff */
      71:     short   s_rxtcur;       /* current retransmit value */
      72:     u_short s_rtseq;        /* packet being timed */
      73:     short   s_rtt;          /* timer for round trips */
      74:     short   s_srtt;         /* averaged timer */
      75:     short   s_rttvar;       /* variance in round trip time */
      76:     char    s_force;        /* which timer expired */
      77:     char    s_dupacks;      /* counter to intuit xmt loss */
      78:
      79: /* out of band data */
      80:     char    s_oobflags;
      81: #define SF_SOOB 0x08            /* sending out of band data */
      82: #define SF_IOOB 0x10            /* receiving out of band data */
      83:     char    s_iobc;         /* input characters */
      84: /* debug stuff */
      85:     u_short s_want;         /* Last candidate for sending */
      86:     char    s_outx;         /* exit taken from spp_output */
      87:     char    s_inx;          /* exit taken from spp_input */
      88: };
      89:
      90: #define nstosppcb(np)   ((struct sppcb *)(np)->nsp_pcb)
      91: #define sotosppcb(so)   (nstosppcb(sotonspcb(so)))
      92:
      93: struct  sppstat {
      94:     long    spps_connattempt;   /* connections initiated */
      95:     long    spps_accepts;       /* connections accepted */
      96:     long    spps_connects;      /* connections established */
      97:     long    spps_drops;     /* connections dropped */
      98:     long    spps_conndrops;     /* embryonic connections dropped */
      99:     long    spps_closed;        /* conn. closed (includes drops) */
     100:     long    spps_segstimed;     /* segs where we tried to get rtt */
     101:     long    spps_rttupdated;    /* times we succeeded */
     102:     long    spps_delack;        /* delayed acks sent */
     103:     long    spps_timeoutdrop;   /* conn. dropped in rxmt timeout */
     104:     long    spps_rexmttimeo;    /* retransmit timeouts */
     105:     long    spps_persisttimeo;  /* persist timeouts */
     106:     long    spps_keeptimeo;     /* keepalive timeouts */
     107:     long    spps_keepprobe;     /* keepalive probes sent */
     108:     long    spps_keepdrops;     /* connections dropped in keepalive */
     109:
     110:     long    spps_sndtotal;      /* total packets sent */
     111:     long    spps_sndpack;       /* data packets sent */
     112:     long    spps_sndbyte;       /* data bytes sent */
     113:     long    spps_sndrexmitpack; /* data packets retransmitted */
     114:     long    spps_sndrexmitbyte; /* data bytes retransmitted */
     115:     long    spps_sndacks;       /* ack-only packets sent */
     116:     long    spps_sndprobe;      /* window probes sent */
     117:     long    spps_sndurg;        /* packets sent with URG only */
     118:     long    spps_sndwinup;      /* window update-only packets sent */
     119:     long    spps_sndctrl;       /* control (SYN|FIN|RST) packets sent */
     120:     long    spps_sndvoid;       /* couldn't find requested packet*/
     121:
     122:     long    spps_rcvtotal;      /* total packets received */
     123:     long    spps_rcvpack;       /* packets received in sequence */
     124:     long    spps_rcvbyte;       /* bytes received in sequence */
     125:     long    spps_rcvbadsum;     /* packets received with ccksum errs */
     126:     long    spps_rcvbadoff;     /* packets received with bad offset */
     127:     long    spps_rcvshort;      /* packets received too short */
     128:     long    spps_rcvduppack;    /* duplicate-only packets received */
     129:     long    spps_rcvdupbyte;    /* duplicate-only bytes received */
     130:     long    spps_rcvpartduppack;    /* packets with some duplicate data */
     131:     long    spps_rcvpartdupbyte;    /* dup. bytes in part-dup. packets */
     132:     long    spps_rcvoopack;     /* out-of-order packets received */
     133:     long    spps_rcvoobyte;     /* out-of-order bytes received */
     134:     long    spps_rcvpackafterwin;   /* packets with data after window */
     135:     long    spps_rcvbyteafterwin;   /* bytes rcvd after window */
     136:     long    spps_rcvafterclose; /* packets rcvd after "close" */
     137:     long    spps_rcvwinprobe;   /* rcvd window probe packets */
     138:     long    spps_rcvdupack;     /* rcvd duplicate acks */
     139:     long    spps_rcvacktoomuch; /* rcvd acks for unsent data */
     140:     long    spps_rcvackpack;    /* rcvd ack packets */
     141:     long    spps_rcvackbyte;    /* bytes acked by rcvd acks */
     142:     long    spps_rcvwinupd;     /* rcvd window update packets */
     143: };
     144: struct  spp_istat {
     145:     short   hdrops;
     146:     short   badsum;
     147:     short   badlen;
     148:     short   slotim;
     149:     short   fastim;
     150:     short   nonucn;
     151:     short   noconn;
     152:     short   notme;
     153:     short   wrncon;
     154:     short   bdreas;
     155:     short   gonawy;
     156:     short   notyet;
     157:     short   lstdup;
     158:     struct sppstat newstats;
     159: };
     160:
     161: #ifdef SUPERVISOR
     162: struct spp_istat spp_istat;
     163:
     164: /* Following was struct sppstat sppstat; */
     165: #ifndef sppstat
     166: #define sppstat spp_istat.newstats
     167: #endif
     168:
     169: u_short spp_iss;
     170: extern struct sppcb *spp_close(), *spp_disconnect(),
     171:     *spp_usrclosed(), *spp_timers(), *spp_drop();
     172: #endif
     173:
     174: #define SPP_ISSINCR 128
     175: /*
     176:  * SPP sequence numbers are 16 bit integers operated
     177:  * on with modular arithmetic.  These macros can be
     178:  * used to compare such integers.
     179:  */
     180: #ifdef sun
     181: short xnsCbug;
     182: #define SSEQ_LT(a,b)    ((xnsCbug = (short)((a)-(b))) < 0)
     183: #define SSEQ_LEQ(a,b)   ((xnsCbug = (short)((a)-(b))) <= 0)
     184: #define SSEQ_GT(a,b)    ((xnsCbug = (short)((a)-(b))) > 0)
     185: #define SSEQ_GEQ(a,b)   ((xnsCbug = (short)((a)-(b))) >= 0)
     186: #else
     187: #define SSEQ_LT(a,b)    (((short)((a)-(b))) < 0)
     188: #define SSEQ_LEQ(a,b)   (((short)((a)-(b))) <= 0)
     189: #define SSEQ_GT(a,b)    (((short)((a)-(b))) > 0)
     190: #define SSEQ_GEQ(a,b)   (((short)((a)-(b))) >= 0)
     191: #endif

#### Defined variables

spp_istat defined in line 162; used 21 times

- in line 166
- in /usr/src/sys/netns/spp_usrreq.c line 143, 159, 184, 208, 438, 454-457(2)
- in /usr/src/ucb/netstat/ns.c line 147-163(13)

xnsCbug defined in line 181; used 4 times

- in line 182-185(4)

#### Defined struct's

spp_istat defined in line 144; used 4 times

- in line 162(2)
- in /usr/src/ucb/netstat/ns.c line 147(2)

sppcb defined in line 18; used 68 times

- in line 170(2)
- in /usr/src/sys/netns/spp_debug.c line 47(2)
- in /usr/src/sys/netns/spp_usrreq.c line 60(2), 93(2), 271(2), 569(2), 587(2), 598(4), 643(2), 1043(2), 1068(2), 1182(2), 1227(2), 1427(2), 1440(2), 1466-1468(4), 1488(2), 1495-1503(8), 1511-1513(4), 1537(2), 1548(2), 1554(2), 1572(2), 1610-1612(4), 1710(2)
- in /usr/src/ucb/netstat/ns.c line 49(2)
- in /usr/src/usr.sbin/trsp/trsp.c line 244(2)

sppstat defined in line 93; used 2 times

- in line 158(2)

#### Defined macros

CUNIT defined in line 51; used 12 times

- in /usr/src/sys/netns/spp_usrreq.c line 307-312(2), 380, 590, 775, 1241-1243(2), 1452-1455(2), 1667-1671(3)

SF_ACKNOW defined in line 23; used 9 times

- in /usr/src/sys/netns/spp_usrreq.c line 217, 239, 287, 823, 847, 916, 922, 1031, 1557

SF_DELACK defined in line 24; used 4 times

- in /usr/src/sys/netns/spp_usrreq.c line 287, 1031, 1555-1556(2)

SF_HI defined in line 25; used 4 times

- in /usr/src/sys/netns/spp_usrreq.c line 277, 1093, 1137, 1428

SF_HO defined in line 26; used 5 times

- in /usr/src/sys/netns/spp_usrreq.c line 667, 732, 1097, 1141, 1428

SF_IOOB defined in line 82; used 3 times

- in /usr/src/sys/netns/spp_usrreq.c line 481, 495, 1366

SF_PI defined in line 27; used 4 times

- in /usr/src/sys/netns/spp_usrreq.c line 670, 732, 1143, 1428

SF_RVD defined in line 30; used 2 times

- in /usr/src/sys/netns/spp_usrreq.c line 1350-1352(2)

SF_RXT defined in line 29; used 3 times

- in /usr/src/sys/netns/spp_usrreq.c line 239-241(2), 371

SF_SOOB defined in line 81; used 4 times

- in /usr/src/sys/netns/spp_usrreq.c line 750, 814-818(2), 1380

SF_WIN defined in line 28; used 4 times

- in /usr/src/sys/netns/spp_usrreq.c line 239-241(2), 289, 414

SPP_ISSINCR defined in line 174; used 2 times

- in /usr/src/sys/netns/spp_usrreq.c line 1450, 1604

SSEQ_GEQ defined in line 190; never used
SSEQ_GT defined in line 189; used 7 times

- in /usr/src/sys/netns/spp_usrreq.c line 288, 314, 328, 338, 420, 427, 1032

SSEQ_LEQ defined in line 188; used 2 times

- in /usr/src/sys/netns/spp_usrreq.c line 290, 881

SSEQ_LT defined in line 187; used 12 times

- in /usr/src/sys/netns/spp_usrreq.c line 388, 397-404(5), 453, 469, 898, 912, 959, 982

nstosppcb defined in line 90; used 7 times

- in line 91
- in /usr/src/sys/netns/spp_usrreq.c line 73, 113, 587, 1080, 1201, 1585

s_ack defined in line 41; used 7 times

- in /usr/src/sys/netns/spp_usrreq.c line 453-456(2), 491-492(2), 841, 897, 1000

s_alo defined in line 42; used 8 times

- in /usr/src/sys/netns/spp_usrreq.c line 420, 427, 841, 898-899(2), 1032-1033(2), 1451

s_cc defined in line 36; used 5 times

- in /usr/src/sys/netns/spp_usrreq.c line 674-676(2), 686, 693, 1161

s_did defined in line 39; used 3 times

- in /usr/src/sys/netns/spp_usrreq.c line 165, 212, 1295

s_dport defined in line 43; used 1 times

- in /usr/src/sys/netns/spp_usrreq.c line 215

s_dt defined in line 37; used 1 times

- in /usr/src/sys/netns/spp_usrreq.c line 1160

s_seq defined in line 40; used 2 times

- in /usr/src/sys/netns/spp_usrreq.c line 769, 789

s_sid defined in line 38; used 3 times

- in /usr/src/sys/netns/spp_usrreq.c line 183, 207, 1449

sotosppcb defined in line 91; never used
sppstat defined in line 166; used 85 times

- in line 165
- in /usr/src/sys/netns/spp_usrreq.c line 67, 78, 172, 193, 211, 292, 329-332(2), 339, 405-406(2), 422-425(2), 455, 466-470(2), 504, 820, 846, 889, 913-915(2), 921-923(2), 962, 1023, 1293, 1487, 1524-1528(2), 1558, 1638-1642(2), 1680, 1690, 1696, 1703
- in /usr/src/ucb/netstat/ns.c line 164-210(47)

#### Usage of this include

spp_var.h used 4 times

- in /usr/src/sys/netns/spp_debug.c line 36
- in /usr/src/sys/netns/spp_usrreq.c line 37
- in /usr/src/ucb/netstat/ns.c line 40
- in /usr/src/usr.sbin/trsp/trsp.c line 38

Last modified: 1994-01-11 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 820 |