xref: /original-bsd/sys/netiso/tp_user.h (revision 3705696b)
1 /*-
2  * Copyright (c) 1991, 1993
3  *	The Regents of the University of California.  All rights reserved.
4  *
5  * %sccs.include.redist.c%
6  *
7  *	@(#)tp_user.h	8.1 (Berkeley) 06/10/93
8  */
9 
10 /***********************************************************
11 		Copyright IBM Corporation 1987
12 
13                       All Rights Reserved
14 
15 Permission to use, copy, modify, and distribute this software and its
16 documentation for any purpose and without fee is hereby granted,
17 provided that the above copyright notice appear in all copies and that
18 both that copyright notice and this permission notice appear in
19 supporting documentation, and that the name of IBM not be
20 used in advertising or publicity pertaining to distribution of the
21 software without specific, written prior permission.
22 
23 IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
24 ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
25 IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
26 ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
27 WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
28 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
29 SOFTWARE.
30 
31 ******************************************************************/
32 
33 /*
34  * ARGO Project, Computer Sciences Dept., University of Wisconsin - Madison
35  */
36 /*
37  * ARGO TP
38  *
39  * $Header: tp_user.h,v 5.2 88/11/04 15:44:44 nhall Exp $
40  * $Source: /usr/argo/sys/netiso/RCS/tp_user.h,v $
41  *
42  * These are the values a real-live user ;-) needs.
43  */
44 
45 #ifndef _TYPES_
46 #include  <sys/types.h>
47 #endif
48 
49 #ifndef __TP_USER__
50 #define __TP_USER__
51 
52 struct tp_conn_param {
53 	/* PER CONNECTION parameters */
54 	short	p_Nretrans;
55 	short	p_dr_ticks;
56 
57 	short	p_cc_ticks;
58 	short	p_dt_ticks;
59 
60 	short	p_x_ticks;
61 	short	p_cr_ticks;
62 
63 	short	p_keepalive_ticks;
64 	short	p_sendack_ticks;
65 
66 	short	p_ref_ticks;
67 	short	p_inact_ticks;
68 
69 	short	p_ptpdusize;	/* preferred tpdusize/128 */
70 	short	p_winsize;
71 
72 	u_char	p_tpdusize; 	/* log 2 of size */
73 
74 	u_char	p_ack_strat;	/* see comments in tp_pcb.h */
75 	u_char	p_rx_strat;	/* see comments in tp_pcb.h */
76 	u_char	p_class;	 	/* class bitmask */
77 	u_char	p_xtd_format;
78 	u_char	p_xpd_service;
79 	u_char	p_use_checksum;
80 	u_char	p_use_nxpd; 	/* netwk expedited data: not implemented */
81 	u_char	p_use_rcc;	/* receipt confirmation: not implemented */
82 	u_char	p_use_efc;	/* explicit flow control: not implemented */
83 	u_char	p_no_disc_indications;	/* don't deliver indic on disc */
84 	u_char	p_dont_change_params;	/* use these params as they are */
85 	u_char	p_netservice;
86 	u_char	p_version;	/* only here for checking */
87 };
88 
89 /*
90  * These sockopt level definitions should be considered for socket.h
91  */
92 #define	SOL_TRANSPORT	0xfffe
93 #define	SOL_NETWORK	0xfffd
94 
95 /* get/set socket opt commands */
96 #define		TPACK_WINDOW	0x0 /* ack only on full window */
97 #define		TPACK_EACH		0x1 /* ack every packet */
98 
99 #define		TPRX_USE_CW		0x8 /* use congestion window transmit */
100 #define		TPRX_EACH		0x4 /* retrans each packet of a set */
101 #define		TPRX_FASTSTART	0x1 /* don't use slow start */
102 
103 #define TPOPT_INTERCEPT		0x200
104 #define TPOPT_FLAGS			0x300
105 #define TPOPT_CONN_DATA		0x400
106 #define TPOPT_DISC_DATA		0x500
107 #define TPOPT_CFRM_DATA		0x600
108 #define TPOPT_CDDATA_CLEAR	0x700
109 #define TPOPT_MY_TSEL		0x800
110 #define TPOPT_PEER_TSEL		0x900
111 #define TPOPT_PERF_MEAS		0xa00
112 #define TPOPT_PSTATISTICS	0xb00
113 #define TPOPT_PARAMS		0xc00 /* to replace a bunch of the others */
114 #define TPOPT_DISC_REASON	0xe00
115 
116 struct tp_disc_reason {
117 	struct cmsghdr dr_hdr;
118 	u_int	dr_reason;
119 };
120 
121 /*
122  ***********************flags**********************************
123  */
124 
125 /* read only flags */
126 #define TPFLAG_NLQOS_PDN		(u_char)0x01
127 #define TPFLAG_PEER_ON_SAMENET	(u_char)0x02
128 #define TPFLAG_GENERAL_ADDR		(u_char)0x04 /* bound to wildcard addr */
129 
130 
131 /*
132  ***********************end flags******************************
133  */
134 
135 
136 #endif /* __TP_USER__ */
137