xref: /original-bsd/sys/netiso/tp_user.h (revision 37acaaf2)
1 /*-
2  * Copyright (c) 1991 The Regents of the University of California.
3  * All rights reserved.
4  *
5  * %sccs.include.redist.c%
6  *
7  *	@(#)tp_user.h	7.11 (Berkeley) 07/29/91
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 #ifdef KERNEL
47 #include  "../sys/types.h"
48 #else KERNEL
49 #include  <sys/types.h>
50 #endif KERNEL
51 #endif
52 
53 #ifndef __TP_USER__
54 #define __TP_USER__
55 
56 struct tp_conn_param {
57 	/* PER CONNECTION parameters */
58 	short	p_Nretrans;
59 	short	p_dr_ticks;
60 
61 	short	p_cc_ticks;
62 	short	p_dt_ticks;
63 
64 	short	p_x_ticks;
65 	short	p_cr_ticks;
66 
67 	short	p_keepalive_ticks;
68 	short	p_sendack_ticks;
69 
70 	short	p_ref_ticks;
71 	short	p_inact_ticks;
72 
73 	short	p_unused;	/* was .. local credit fraction reported (>0) */
74 	short	p_winsize;
75 
76 	u_char	p_tpdusize; 	/* log 2 of size */
77 
78 	u_char	p_ack_strat;	/* see comments in tp_pcb.h */
79 	u_char	p_rx_strat;	/* see comments in tp_pcb.h */
80 	u_char	p_class;	 	/* class bitmask */
81 	u_char	p_xtd_format;
82 	u_char	p_xpd_service;
83 	u_char	p_use_checksum;
84 	u_char	p_use_nxpd; 	/* netwk expedited data: not implemented */
85 	u_char	p_use_rcc;	/* receipt confirmation: not implemented */
86 	u_char	p_use_efc;	/* explicit flow control: not implemented */
87 	u_char	p_no_disc_indications;	/* don't deliver indic on disc */
88 	u_char	p_dont_change_params;	/* use these params as they are */
89 	u_char	p_netservice;
90 	u_char	p_version;	/* only here for checking */
91 };
92 
93 /*
94  * These sockopt level definitions should be considered for socket.h
95  */
96 #define	SOL_TRANSPORT	0xfffe
97 #define	SOL_NETWORK	0xfffd
98 
99 /* get/set socket opt commands */
100 #define		TPACK_WINDOW	0x0 /* ack only on full window */
101 #define		TPACK_EACH		0x1 /* ack every packet */
102 
103 #define		TPRX_USE_CW		0x8 /* use congestion window transmit */
104 #define		TPRX_EACH		0x4 /* retrans each packet of a set */
105 #define		TPRX_FASTSTART	0x1 /* don't use slow start */
106 
107 #define TPOPT_INTERCEPT		0x200
108 #define TPOPT_FLAGS			0x300
109 #define TPOPT_CONN_DATA		0x400
110 #define TPOPT_DISC_DATA		0x500
111 #define TPOPT_CFRM_DATA		0x600
112 #define TPOPT_CDDATA_CLEAR	0x700
113 #define TPOPT_MY_TSEL		0x800
114 #define TPOPT_PEER_TSEL		0x900
115 #define TPOPT_PERF_MEAS		0xa00
116 #define TPOPT_PSTATISTICS	0xb00
117 #define TPOPT_PARAMS		0xc00 /* to replace a bunch of the others */
118 #define TPOPT_DISC_REASON	0xe00
119 
120 struct tp_disc_reason {
121 	struct cmsghdr dr_hdr;
122 	u_int	dr_reason;
123 };
124 
125 /*
126  ***********************flags**********************************
127  */
128 
129 /* read only flags */
130 #define TPFLAG_NLQOS_PDN		(u_char)0x01
131 #define TPFLAG_PEER_ON_SAMENET	(u_char)0x02
132 #define TPFLAG_GENERAL_ADDR		(u_char)0x04 /* bound to wildcard addr */
133 
134 
135 /*
136  ***********************end flags******************************
137  */
138 
139 
140 #endif __TP_USER__
141