xref: /csrg-svn/sys/netiso/tp_user.h (revision 48735)
136419Ssklower /***********************************************************
236419Ssklower 		Copyright IBM Corporation 1987
336419Ssklower 
436419Ssklower                       All Rights Reserved
536419Ssklower 
636419Ssklower Permission to use, copy, modify, and distribute this software and its
736419Ssklower documentation for any purpose and without fee is hereby granted,
836419Ssklower provided that the above copyright notice appear in all copies and that
936419Ssklower both that copyright notice and this permission notice appear in
1036419Ssklower supporting documentation, and that the name of IBM not be
1136419Ssklower used in advertising or publicity pertaining to distribution of the
1236419Ssklower software without specific, written prior permission.
1336419Ssklower 
1436419Ssklower IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
1536419Ssklower ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
1636419Ssklower IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
1736419Ssklower ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
1836419Ssklower WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
1936419Ssklower ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
2036419Ssklower SOFTWARE.
2136419Ssklower 
2236419Ssklower ******************************************************************/
2336419Ssklower 
2436419Ssklower /*
2536419Ssklower  * ARGO Project, Computer Sciences Dept., University of Wisconsin - Madison
2636419Ssklower  */
2736419Ssklower /*
2836419Ssklower  * ARGO TP
2936419Ssklower  *
3036419Ssklower  * $Header: tp_user.h,v 5.2 88/11/04 15:44:44 nhall Exp $
3136419Ssklower  * $Source: /usr/argo/sys/netiso/RCS/tp_user.h,v $
32*48735Ssklower  *	@(#)tp_user.h	7.9 (Berkeley) 04/26/91
3336419Ssklower  *
3436419Ssklower  * These are the values a real-live user ;-) needs.
3536419Ssklower  */
3636419Ssklower 
3739191Ssklower #ifndef _TYPES_
3836419Ssklower #ifdef KERNEL
3939191Ssklower #include  "../sys/types.h"
4036419Ssklower #else KERNEL
4136419Ssklower #include  <sys/types.h>
4236419Ssklower #endif KERNEL
4339191Ssklower #endif
4436419Ssklower 
4536419Ssklower #ifndef __TP_USER__
4636419Ssklower #define __TP_USER__
4736419Ssklower 
4836419Ssklower struct tp_conn_param {
4936419Ssklower 	/* PER CONNECTION parameters */
5036419Ssklower 	short	p_Nretrans;
5142490Ssklower 	short	p_dr_ticks;
5236419Ssklower 
5342490Ssklower 	short	p_cc_ticks;
5442490Ssklower 	short	p_dt_ticks;
5536419Ssklower 
5642490Ssklower 	short	p_x_ticks;
5742490Ssklower 	short	p_cr_ticks;
5836419Ssklower 
5942490Ssklower 	short	p_keepalive_ticks;
6042490Ssklower 	short	p_sendack_ticks;
6136419Ssklower 
6242490Ssklower 	short	p_ref_ticks;
6342490Ssklower 	short	p_inact_ticks;
6436419Ssklower 
6542490Ssklower 	short	p_unused;	/* was .. local credit fraction reported (>0) */
6642490Ssklower 	short	p_winsize;
6736419Ssklower 
6842490Ssklower 	u_char	p_tpdusize; 	/* log 2 of size */
6936419Ssklower 
7036419Ssklower 	u_char	p_ack_strat;	/* see comments in tp_pcb.h */
7136419Ssklower 	u_char	p_rx_strat;	/* see comments in tp_pcb.h */
7236419Ssklower 	u_char	p_class;	 	/* class bitmask */
7336419Ssklower 	u_char	p_xtd_format;
7436419Ssklower 	u_char	p_xpd_service;
7536419Ssklower 	u_char	p_use_checksum;
7636419Ssklower 	u_char	p_use_nxpd; 	/* netwk expedited data: not implemented */
7736419Ssklower 	u_char	p_use_rcc;	/* receipt confirmation: not implemented */
7836419Ssklower 	u_char	p_use_efc;	/* explicit flow control: not implemented */
7942490Ssklower 	u_char	p_no_disc_indications;	/* don't deliver indic on disc */
8042490Ssklower 	u_char	p_dont_change_params;	/* use these params as they are */
8136419Ssklower 	u_char	p_netservice;
8242490Ssklower 	u_char	p_version;	/* only here for checking */
8336419Ssklower };
8436419Ssklower 
8537469Ssklower /*
8637469Ssklower  * These sockopt level definitions should be considered for socket.h
8737469Ssklower  */
8837469Ssklower #define	SOL_TRANSPORT	0xfffe
8937469Ssklower #define	SOL_NETWORK	0xfffd
9037469Ssklower 
9136419Ssklower /* get/set socket opt commands */
9236419Ssklower #define		TPACK_WINDOW	0x0 /* ack only on full window */
9336419Ssklower #define		TPACK_EACH		0x1 /* ack every packet */
9436419Ssklower 
9536419Ssklower #define		TPRX_USE_CW		0x8 /* use congestion window transmit */
9636419Ssklower #define		TPRX_EACH		0x4 /* retrans each packet of a set */
9736419Ssklower #define		TPRX_FASTSTART	0x1 /* don't use slow start */
9836419Ssklower 
9944424Ssklower #define TPOPT_INTERCEPT		0x200
10036419Ssklower #define TPOPT_FLAGS			0x300
10136419Ssklower #define TPOPT_CONN_DATA		0x400
10236419Ssklower #define TPOPT_DISC_DATA		0x500
10337469Ssklower #define TPOPT_CFRM_DATA		0x600
10436419Ssklower #define TPOPT_CDDATA_CLEAR	0x700
10536419Ssklower #define TPOPT_PERF_MEAS		0xa00
10636419Ssklower #define TPOPT_PSTATISTICS	0xb00
10736419Ssklower #define TPOPT_PARAMS		0xc00 /* to replace a bunch of the others */
10836419Ssklower #define TPOPT_MY_TSEL		0x800
10936419Ssklower #define TPOPT_PEER_TSEL		0x900
11038841Ssklower #define TPOPT_NGC8_ACCEPT	0xd00 /* negotiate connection requests */
111*48735Ssklower #define TPOPT_DISC_REASON	0xe00
11236419Ssklower 
113*48735Ssklower struct tp_disc_reason {
114*48735Ssklower 	struct cmsghdr dr_hdr;
115*48735Ssklower 	u_int	dr_reason;
116*48735Ssklower };
117*48735Ssklower 
11836419Ssklower /*
11936419Ssklower  ***********************flags**********************************
12036419Ssklower  */
12136419Ssklower 
12236419Ssklower /* read only flags */
12336419Ssklower #define TPFLAG_DISC_DATA_OUT	(u_char)0x10 /* disc data present */
12436419Ssklower #define TPFLAG_DISC_DATA_IN		(u_char)0x20 /* disc data present */
12536419Ssklower #define TPFLAG_CONN_DATA_OUT	(u_char)0x40 /* conn data present */
12636419Ssklower #define TPFLAG_CONN_DATA_IN		(u_char)0x80 /* conn data present */
12736419Ssklower #define TPFLAG_XPD_PRESENT		(u_char)0x08 /* xpd data present */
12836419Ssklower #define TPFLAG_PEER_ON_SAMENET	(u_char)0x02
12936419Ssklower #define TPFLAG_NLQOS_PDN		(u_char)0x01
13038841Ssklower #define TPFLAG_NGC8_ACCEPT		(u_char)0x04 /* negotiate conn rq's */
13136419Ssklower 
13236419Ssklower 
13336419Ssklower /*
13436419Ssklower  ***********************end flags******************************
13536419Ssklower  */
13636419Ssklower 
13736419Ssklower 
13836419Ssklower #endif __TP_USER__
139