Get rid of some unneeded #ifdef TTCP lines. Also, get rid of some

bogus commons declared in header files.
This commit is contained in:
Garrett Wollman 1995-02-14 02:35:19 +00:00
parent 9e5c18f7b1
commit 2f96f1f446
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=6348
6 changed files with 26 additions and 41 deletions

View File

@ -31,16 +31,14 @@
* SUCH DAMAGE.
*
* @(#)tcp.h 8.1 (Berkeley) 6/10/93
* $Id: tcp.h,v 1.3 1994/08/21 05:27:34 paul Exp $
* $Id: tcp.h,v 1.4 1995/02/08 20:18:44 wollman Exp $
*/
#ifndef _NETINET_TCP_H_
#define _NETINET_TCP_H_
typedef u_long tcp_seq;
#ifdef TTCP
typedef u_long tcp_cc; /* connection count per rfc1644 */
#endif
/*
* TCP header.
@ -66,9 +64,8 @@ struct tcphdr {
#define TH_PUSH 0x08
#define TH_ACK 0x10
#define TH_URG 0x20
#ifdef TTCP
#define TH_FLAGS (TH_FIN|TH_SYN|TH_RST|TH_ACK|TH_URG)
#endif
u_short th_win; /* window */
u_short th_sum; /* checksum */
u_short th_urp; /* urgent pointer */
@ -89,7 +86,6 @@ struct tcphdr {
#define TCPOPT_TSTAMP_HDR \
(TCPOPT_NOP<<24|TCPOPT_NOP<<16|TCPOPT_TIMESTAMP<<8|TCPOLEN_TIMESTAMP)
#ifdef TTCP
#define TCPOPT_CC 11 /* CC options: RFC-1644 */
#define TCPOPT_CCNEW 12
#define TCPOPT_CCECHO 13
@ -97,7 +93,6 @@ struct tcphdr {
#define TCPOLEN_CC_APPA (TCPOLEN_CC+2)
#define TCPOPT_CC_HDR(ccopt) \
(TCPOPT_NOP<<24|TCPOPT_NOP<<16|(ccopt)<<8|TCPOLEN_CC)
#endif
/*
* Default maximum segment size for TCP.
@ -108,9 +103,7 @@ struct tcphdr {
#define TCP_MSS 512
#define TCP_MAXWIN 65535 /* largest value for (unscaled) window */
#ifdef TTCP
#define TTCP_CLIENT_SND_WND 4096 /* dflt send window for T/TCP client */
#endif
#define TCP_MAX_WINSHIFT 14 /* maximum window shift */
@ -123,9 +116,7 @@ struct tcphdr {
*/
#define TCP_NODELAY 0x01 /* don't delay send to coalesce packets */
#define TCP_MAXSEG 0x02 /* set maximum segment size */
#ifdef TTCP
#define TCP_NOPUSH 0x04 /* don't push last block of write */
#define TCP_NOOPT 0x08 /* don't use TCP options */
#endif
#endif

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)tcp_input.c 8.5 (Berkeley) 4/10/94
* $Id: tcp_input.c,v 1.10 1994/10/13 18:36:32 wollman Exp $
* $Id: tcp_input.c,v 1.11 1995/02/09 23:13:23 wollman Exp $
*/
#ifndef TUBA_INCLUDE
@ -65,6 +65,11 @@ struct tcpiphdr tcp_saveti;
int tcprexmtthresh = 3;
struct inpcb *tcp_last_inpcb = &tcb;
tcp_seq tcp_iss;
tcp_cc tcp_ccgen;
struct inpcb tcb;
struct tcpstat tcpstat;
u_long tcp_now;
#endif /* TUBA_INCLUDE */

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)tcp_input.c 8.5 (Berkeley) 4/10/94
* $Id: tcp_input.c,v 1.10 1994/10/13 18:36:32 wollman Exp $
* $Id: tcp_input.c,v 1.11 1995/02/09 23:13:23 wollman Exp $
*/
#ifndef TUBA_INCLUDE
@ -65,6 +65,11 @@ struct tcpiphdr tcp_saveti;
int tcprexmtthresh = 3;
struct inpcb *tcp_last_inpcb = &tcb;
tcp_seq tcp_iss;
tcp_cc tcp_ccgen;
struct inpcb tcb;
struct tcpstat tcpstat;
u_long tcp_now;
#endif /* TUBA_INCLUDE */

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)tcp_seq.h 8.1 (Berkeley) 6/10/93
* $Id: tcp_seq.h,v 1.3 1994/08/21 05:27:37 paul Exp $
* $Id: tcp_seq.h,v 1.4 1995/02/08 20:18:46 wollman Exp $
*/
#ifndef _NETINET_TCP_SEQ_H_
@ -50,7 +50,6 @@
#define TSTMP_LT(a,b) ((int)((a)-(b)) < 0)
#define TSTMP_GEQ(a,b) ((int)((a)-(b)) >= 0)
#ifdef TTCP
/*
* TCP connection counts are 32 bit integers operated
* on with modular arithmetic. These macros can be
@ -63,7 +62,6 @@
/* Macro to increment a CC: skip 0 which has a special meaning */
#define CC_INC(c) (++(c) == 0 ? ++(c) : (c))
#endif
/*
* Macros to initialize tcp sequence numbers for
@ -83,9 +81,7 @@
/* timestamp wrap-around time */
#ifdef KERNEL
tcp_seq tcp_iss; /* tcp initial send seq # */
#ifdef TTCP
tcp_cc tcp_ccgen; /* global connection count */
#endif
extern tcp_seq tcp_iss; /* tcp initial send seq # */
extern tcp_cc tcp_ccgen; /* global connection count */
#endif
#endif

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)tcp_timer.h 8.1 (Berkeley) 6/10/93
* $Id: tcp_timer.h,v 1.4 1994/08/21 05:27:38 paul Exp $
* $Id: tcp_timer.h,v 1.5 1995/02/08 20:18:47 wollman Exp $
*/
#ifndef _NETINET_TCP_TIMER_H_
@ -103,9 +103,7 @@
#define TCPTV_MIN ( 1*PR_SLOWHZ) /* minimum allowable value */
#define TCPTV_REXMTMAX ( 64*PR_SLOWHZ) /* max allowable REXMT value */
#ifdef TTCP
#define TCPTV_TWTRUNC 8 /* RTO factor to truncate TW */
#endif
#define TCP_LINGERTIME 120 /* linger at most 2 minutes */

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)tcp_var.h 8.3 (Berkeley) 4/10/94
* $Id: tcp_var.h,v 1.4 1995/02/08 20:18:47 wollman Exp $
* $Id: tcp_var.h,v 1.6 1995/02/09 23:13:27 wollman Exp $
*/
#ifndef _NETINET_TCP_VAR_H_
@ -65,13 +65,11 @@ struct tcpcb {
#define TF_REQ_TSTMP 0x0080 /* have/will request timestamps */
#define TF_RCVD_TSTMP 0x0100 /* a timestamp was received in SYN */
#define TF_SACK_PERMIT 0x0200 /* other side said I could SACK */
#ifdef TTCP
#define TF_NEEDSYN 0x0400 /* send SYN (implicit state) */
#define TF_NEEDFIN 0x0800 /* send FIN (implicit state) */
#define TF_NOPUSH 0x1000 /* don't push */
#define TF_REQ_CC 0x2000 /* have/will request CC */
#define TF_RCVD_CC 0x4000 /* a CC was received in SYN */
#endif
struct tcpiphdr *t_template; /* skeletal packet for transmit */
struct inpcb *t_inpcb; /* back pointer to internet pcb */
@ -134,18 +132,15 @@ struct tcpcb {
u_long ts_recent; /* timestamp echo data */
u_long ts_recent_age; /* when last updated */
tcp_seq last_ack_sent;
#ifdef TTCP
/* RFC 1644 variables */
tcp_cc cc_send; /* send connection count */
tcp_cc cc_recv; /* receive connection count */
u_long t_duration; /* connection duration */
#endif /* TTCP */
/* TUBA stuff */
caddr_t t_tuba_pcb; /* next level down pcb for TCP over z */
};
#ifdef TTCP
/*
* Structure to hold TCP options that are only used during segment
* processing (in tcp_input), but not held in the tcpcb.
@ -180,7 +175,6 @@ struct rmxp_tao {
#endif /* notyet */
};
#define rmx_taop(r) ((struct rmxp_tao *)(r).rmx_filler)
#endif /* TTCP */
#define intotcpcb(ip) ((struct tcpcb *)(ip)->inp_ppcb)
#define sototcpcb(so) (intotcpcb(sotoinpcb(so)))
@ -295,23 +289,21 @@ struct tcpstat {
#define TCPCTL_NAMES { \
{ 0, 0 }, \
{ "do_rfc1323", CTLTYPE_INT }, \
{ "do_rfc1644", CTLTYPE_INT }, \
{ "rfc1323", CTLTYPE_INT }, \
{ "rfc1644", CTLTYPE_INT }, \
{ "mssdflt", CTLTYPE_INT }, \
}
#ifdef KERNEL
struct inpcb tcb; /* head of queue of active tcpcb's */
struct tcpstat tcpstat; /* tcp statistics */
u_long tcp_now; /* for RFC 1323 timestamps */
extern struct inpcb tcb; /* head of queue of active tcpcb's */
extern struct tcpstat tcpstat; /* tcp statistics */
extern u_long tcp_now; /* for RFC 1323 timestamps */
int tcp_attach __P((struct socket *));
void tcp_canceltimers __P((struct tcpcb *));
struct tcpcb *
tcp_close __P((struct tcpcb *));
#ifdef TTCP
int tcp_connect __P((struct tcpcb *, struct mbuf *));
#endif
void tcp_ctlinput __P((int, struct sockaddr *, struct ip *));
int tcp_ctloutput __P((int, struct socket *, int, int, struct mbuf **));
struct tcpcb *
@ -327,10 +319,8 @@ void tcp_dooptions __P((struct tcpcb *,
#endif
void tcp_drain __P((void));
void tcp_fasttimo __P((void));
#ifdef TTCP
struct rmxp_tao *
tcp_gettaocache __P((struct inpcb *));
#endif
void tcp_init __P((void));
void tcp_input __P((struct mbuf *, int));
void tcp_mss __P((struct tcpcb *, int));
@ -360,6 +350,6 @@ struct tcpcb *
int tcp_usrreq __P((struct socket *,
int, struct mbuf *, struct mbuf *, struct mbuf *));
void tcp_xmit_timer __P((struct tcpcb *, int));
#endif
#endif /* KERNEL */
#endif
#endif /* _NETINET_TCP_VAR_H_ */