Deleted Added
full compact
spx_var.h (11819) spx_var.h (11947)
1/*
2 * Copyright (c) 1995, Mike Mitchell
3 * Copyright (c) 1984, 1985, 1986, 1987, 1993
4 * The Regents of the University of California. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 23 unchanged lines hidden (view full) ---

32 * SUCH DAMAGE.
33 *
34 * @(#)spx_var.h
35 */
36
37#ifndef _NETIPX_SPX_VAR_H_
38#define _NETIPX_SPX_VAR_H_
39
1/*
2 * Copyright (c) 1995, Mike Mitchell
3 * Copyright (c) 1984, 1985, 1986, 1987, 1993
4 * The Regents of the University of California. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 23 unchanged lines hidden (view full) ---

32 * SUCH DAMAGE.
33 *
34 * @(#)spx_var.h
35 */
36
37#ifndef _NETIPX_SPX_VAR_H_
38#define _NETIPX_SPX_VAR_H_
39
40/*
41 * SPX control block, one per connection
42 */
43struct spxpcb {
44 struct spx_q s_q; /* queue for out-of-order receipt */
45 struct ipxpcb *s_ipxpcb; /* backpointer to internet pcb */
46 u_char s_state;
47 u_char s_flags;
48#define SF_ACKNOW 0x01 /* Ack peer immediately */
49#define SF_DELACK 0x02 /* Ack, but try to delay it */
50#define SF_HI 0x04 /* Show headers on input */
51#define SF_HO 0x08 /* Show headers on output */
52#define SF_PI 0x10 /* Packet (datagram) interface */
53#define SF_WIN 0x20 /* Window info changed */
54#define SF_RXT 0x40 /* Rxt info changed */
55#define SF_RVD 0x80 /* Calling from read usrreq routine */
56 u_short s_mtu; /* Max packet size for this stream */
57/* use sequence fields in headers to store sequence numbers for this
58 connection */
59 struct ipx *s_ipx;
60 struct spxhdr s_shdr; /* prototype header to transmit */
61#define s_cc s_shdr.spx_cc /* connection control (for EM bit) */
62#define s_dt s_shdr.spx_dt /* datastream type */
63#define s_sid s_shdr.spx_sid /* source connection identifier */
64#define s_did s_shdr.spx_did /* destination connection identifier */
65#define s_seq s_shdr.spx_seq /* sequence number */
66#define s_ack s_shdr.spx_ack /* acknowledge number */
67#define s_alo s_shdr.spx_alo /* allocation number */
68#define s_dport s_ipx->ipx_dna.x_port /* where we are sending */
69 struct spxhdr s_rhdr; /* last received header (in effect!)*/
70 u_short s_rack; /* their acknowledge number */
71 u_short s_ralo; /* their allocation number */
72 u_short s_smax; /* highest packet # we have sent */
73 u_short s_snxt; /* which packet to send next */
74
75/* congestion control */
76#define CUNIT 1024 /* scaling for ... */
77 int s_cwnd; /* Congestion-controlled window */
78 /* in packets * CUNIT */
79 short s_swnd; /* == tcp snd_wnd, in packets */
80 short s_smxw; /* == tcp max_sndwnd */
81 /* difference of two spx_seq's can be
82 no bigger than a short */
83 u_short s_swl1; /* == tcp snd_wl1 */
84 u_short s_swl2; /* == tcp snd_wl2 */
85 int s_cwmx; /* max allowable cwnd */
86 int s_ssthresh; /* s_cwnd size threshhold for
87 * slow start exponential-to-
88 * linear switch */
89/* transmit timing stuff
90 * srtt and rttvar are stored as fixed point, for convenience in smoothing.
91 * srtt has 3 bits to the right of the binary point, rttvar has 2.
92 */
93 short s_idle; /* time idle */
94 short s_timer[SPXT_NTIMERS]; /* timers */
95 short s_rxtshift; /* log(2) of rexmt exp. backoff */
96 short s_rxtcur; /* current retransmit value */
97 u_short s_rtseq; /* packet being timed */
98 short s_rtt; /* timer for round trips */
99 short s_srtt; /* averaged timer */
100 short s_rttvar; /* variance in round trip time */
101 char s_force; /* which timer expired */
102 char s_dupacks; /* counter to intuit xmt loss */
103
104/* out of band data */
105 char s_oobflags;
106#define SF_SOOB 0x08 /* sending out of band data */
107#define SF_IOOB 0x10 /* receiving out of band data */
108 char s_iobc; /* input characters */
109/* debug stuff */
110 u_short s_want; /* Last candidate for sending */
111 char s_outx; /* exit taken from spx_output */
112 char s_inx; /* exit taken from spx_input */
113 u_short s_flags2; /* more flags for testing */
114#define SF_NEWCALL 0x100 /* for new_recvmsg */
115#define SO_NEWCALL 10 /* for new_recvmsg */
116};
117
118#define ipxtospxpcb(np) ((struct spxpcb *)(np)->ipxp_pcb)
119#define sotospxpcb(so) (ipxtospxpcb(sotoipxpcb(so)))
120
121struct spxstat {
122 long spxs_connattempt; /* connections initiated */
123 long spxs_accepts; /* connections accepted */
124 long spxs_connects; /* connections established */
125 long spxs_drops; /* connections dropped */
126 long spxs_conndrops; /* embryonic connections dropped */
127 long spxs_closed; /* conn. closed (includes drops) */
128 long spxs_segstimed; /* segs where we tried to get rtt */

--- 83 unchanged lines hidden ---
40struct spxstat {
41 long spxs_connattempt; /* connections initiated */
42 long spxs_accepts; /* connections accepted */
43 long spxs_connects; /* connections established */
44 long spxs_drops; /* connections dropped */
45 long spxs_conndrops; /* embryonic connections dropped */
46 long spxs_closed; /* conn. closed (includes drops) */
47 long spxs_segstimed; /* segs where we tried to get rtt */

--- 83 unchanged lines hidden ---