/* 
 * tcp.h
 *
 * Derived from:
 *
 * Copyright (c) 1982, 1986 Regents of the University of California.
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms are permitted
 * provided that this notice is preserved and that due credit is given
 * to the University of California at Berkeley. The name of the University
 * may not be used to endorse or promote products derived from this
 * software without specific prior written permission. This software
 * is provided ``as is'' without express or implied warranty.
 *
 * Modified for x-kernel v3.3
 * Modifications Copyright (c) 1993,1991,1990,1996  Arizona Board of Regents
 *
 * $Revision: 1.4 $
 * $Date: 1996/02/01 15:14:45 $
 */

#ifndef tcp_h
#define tcp_h


#define TCP_PUSH		(TCP_CTL*MAXOPS + 0)
#define TCP_GETSTATEINFO	(TCP_CTL*MAXOPS + 1)
#define TCP_DUMPSTATEINFO	(TCP_CTL*MAXOPS + 2)

/* ACB: Changed PROT -> PORT in next two #define's */
#define TCP_GETFREEPORTNUM	(TCP_CTL*MAXOPS + 3)
#define TCP_RELEASEPORTNUM	(TCP_CTL*MAXOPS + 4)

#define TCP_SETRCVBUFSPACE	(TCP_CTL*MAXOPS + 5)	/* set rx buf space */
#define TCP_GETSNDBUFSPACE	(TCP_CTL*MAXOPS + 6)	/* get tx buf space */
#define TCP_SETRCVBUFSIZE	(TCP_CTL*MAXOPS + 7)	/* set rx buf size */
#define TCP_SETSNDBUFSIZE	(TCP_CTL*MAXOPS + 8)	/* set tx buf size */
#define TCP_SETOOBINLINE	(TCP_CTL*MAXOPS + 9)	/* set oob inlining */
#define TCP_GETOOBDATA		(TCP_CTL*MAXOPS + 10)	/* read the oob data */
#define TCP_OOBPUSH		(TCP_CTL*MAXOPS + 11)	/* send oob message */
#define TCP_OOBMODE		(TCP_CTL*MAXOPS + 12)	/* this is an upcall */
/* LSB 8/9/94 next three */
#define TCP_SETPUSHALWAYS       (TCP_CTL*MAXOPS + 13)   /* always push */
#define TCP_SETRCVACKALWAYS     (TCP_CTL*MAXOPS + 14)	/* not implemented */
#define TCP_SETKEEPALIVE	(TCP_CTL*MAXOPS + 15)	/* not implemented */

/* Vegas control ops */
#define TCP_SETREXMTTHRESH	(TCP_CTL*MAXOPS + 16)	/* Reno and Vegas 
							   usually retransmit
							   on 3rd dup ACK,
							   this can change it*/
#define TCP_SETSLOWSTART	(TCP_CTL*MAXOPS + 17)	/* How many packets
							   to send when there
							   are none in 
							   transit */
#define TCP_DUMPTRACE		(TCP_CTL*MAXOPS + 18)	/* Save trace info to
							   file */
#define TCP_GETINFO		(TCP_CTL*MAXOPS + 19)	/* Get TCP info */
#define TCP_SETVEGAS		(TCP_CTL*MAXOPS + 20)	/* Set Vegas 
							   parameters */
#define TCP_SETTHRESH		(TCP_CTL*MAXOPS + 21)   /* Set send threshold*/

/* --- LSB vegasFlags */
#define V_EXP_INC_SLOW_FLAG	0x1	/* Only increase window every other
					   RTT during slow-start */
#define V_SPIKE_PREV_FLAG	0x2	/* Spike prevention. Prevents too
					   much data from being sent at
					   one time */
#define V_CONG_DETECT_FLAG	0x4	/* Congestion detection */
#define V_PREDICT_FLAG		0x8	/* Congestion prediction. Tries to
					   predict avaialble bandwidth
					   during slow-start */

#  ifdef __STDC__

void	tcp_init(Protl);

#  endif


#endif
