1: /*
   2:  * Copyright (c) 1984, 1985, 1986 Regents of the University of California.
   3:  * All rights reserved.  The Berkeley software License Agreement
   4:  * specifies the terms and conditions for redistribution.
   5:  *
   6:  *	@(#)spp_var.h	7.1 (Berkeley) 6/5/86
   7:  */
   8: 
   9: /*
  10:  * Sp control block, one per connection
  11:  */
  12: struct sppcb {
  13:     struct  spidp_q s_q;        /* queue for out-of-order receipt */
  14:     struct  nspcb   *s_nspcb;   /* backpointer to internet pcb */
  15:     u_char  s_state;
  16:     u_char  s_flags;
  17: #define SF_AK   0x01            /* Acknowledgement requested */
  18: #define SF_DELACK 0x02          /* Ak, waiting to see if we xmit*/
  19: #define SF_HI   0x04            /* Show headers on input */
  20: #define SF_HO   0x08            /* Show headers on output */
  21: #define SF_PI   0x10            /* Packet (datagram) interface */
  22:     u_short s_mtu;          /* Max packet size for this stream */
  23: /* use sequence fields in headers to store sequence numbers for this
  24:    connection */
  25:     struct  spidp s_shdr;       /* prototype header to transmit */
  26: #define s_cc s_shdr.si_cc       /* connection control (for EM bit) */
  27: #define s_dt s_shdr.si_dt       /* datastream type */
  28: #define s_sid s_shdr.si_sid     /* source connection identifier */
  29: #define s_did s_shdr.si_did     /* destination connection identifier */
  30: #define s_seq s_shdr.si_seq     /* sequence number */
  31: #define s_ack s_shdr.si_ack     /* acknowledge number */
  32: #define s_alo s_shdr.si_alo     /* allocation number */
  33: #define s_dport s_shdr.si_dna.x_port    /* where we are sending */
  34:     struct sphdr s_rhdr;        /* last received header (in effect!)*/
  35:     u_short s_rack;         /* their acknowledge number */
  36:     u_short s_ralo;         /* their allocation number */
  37:     u_short s_snt;          /* highest packet # we have sent */
  38: 
  39: /* timeout stuff */
  40:     short   s_idle;         /* time idle */
  41:     short   s_timer[TCPT_NTIMERS];  /* timers */
  42:     short   s_rxtshift;     /* log(2) of rexmt exp. backoff */
  43:     u_short s_rtseq;        /* packet being timed */
  44:     short   s_rtt;          /* timer for round trips */
  45:     short   s_srtt;         /* averaged timer */
  46:     char    s_force;        /* which timer expired */
  47: 
  48: /* out of band data */
  49:     char    s_oobflags;
  50: #define SF_SOOB 0x08            /* sending out of band data */
  51: #define SF_IOOB 0x10            /* receiving out of band data */
  52:     char    s_iobc;         /* input characters */
  53: /* debug stuff */
  54:     u_short s_want;         /* Last candidate for sending */
  55: };
  56: 
  57: #define nstosppcb(np)   ((struct sppcb *)(np)->nsp_pcb)
  58: #define sotosppcb(so)   (nstosppcb(sotonspcb(so)))
  59: 
  60: struct  spp_istat {
  61:     short   hdrops;
  62:     short   badsum;
  63:     short   badlen;
  64:     short   slotim;
  65:     short   fastim;
  66:     short   nonucn;
  67:     short   noconn;
  68:     short   notme;
  69:     short   wrncon;
  70:     short   bdreas;
  71:     short   gonawy;
  72:     short   notyet;
  73:     short   lstdup;
  74: };
  75: 
  76: #ifdef KERNEL
  77: struct spp_istat spp_istat;
  78: u_short spp_iss;
  79: extern struct sppcb *spp_close(), *spp_disconnect(),
  80:     *spp_usrclosed(), *spp_timers(), *spp_drop();
  81: #endif
  82: 
  83: #define SPP_ISSINCR 128
  84: /*
  85:  * SPP sequence numbers are 16 bit integers operated
  86:  * on with modular arithmetic.  These macros can be
  87:  * used to compare such integers.
  88:  */
  89: #define SSEQ_LT(a,b)    (((short)((a)-(b))) < 0)
  90: #define SSEQ_LEQ(a,b)   (((short)((a)-(b))) <= 0)
  91: #define SSEQ_GT(a,b)    (((short)((a)-(b))) > 0)
  92: #define SSEQ_GEQ(a,b)   (((short)((a)-(b))) >= 0)

Defined variables

spp_istat defined in line 77; used 9 times

Defined struct's

spp_istat defined in line 60; used 2 times
  • in line 77(2)
sppcb defined in line 12; used 58 times

Defined macros

SF_AK defined in line 17; used 7 times
SF_DELACK defined in line 18; used 5 times
SF_HI defined in line 19; used 4 times
SF_HO defined in line 20; used 5 times
SF_IOOB defined in line 51; used 3 times
SF_PI defined in line 21; used 4 times
SF_SOOB defined in line 50; used 4 times
SPP_ISSINCR defined in line 83; used 2 times
SSEQ_GEQ defined in line 92; used 2 times
SSEQ_GT defined in line 91; used 5 times
SSEQ_LEQ defined in line 90; never used
SSEQ_LT defined in line 89; used 8 times
nstosppcb defined in line 57; used 6 times
s_ack defined in line 31; used 7 times
s_alo defined in line 32; used 7 times
s_cc defined in line 26; used 5 times
s_did defined in line 29; used 3 times
s_dport defined in line 33; used 1 times
s_dt defined in line 27; used 1 times
s_seq defined in line 30; used 3 times
s_sid defined in line 28; used 2 times
sotosppcb defined in line 58; never used

Usage of this include

Last modified: 1986-06-05
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1104
Valid CSS Valid XHTML 1.0 Strict