cltp_usrreq.c made separate file in conf/files
[unix-history] / usr / src / sys / netiso / tp_user.h
CommitLineData
ebaa9b50
KS
1/***********************************************************
2 Copyright IBM Corporation 1987
3
4 All Rights Reserved
5
6Permission to use, copy, modify, and distribute this software and its
7documentation for any purpose and without fee is hereby granted,
8provided that the above copyright notice appear in all copies and that
9both that copyright notice and this permission notice appear in
10supporting documentation, and that the name of IBM not be
11used in advertising or publicity pertaining to distribution of the
12software without specific, written prior permission.
13
14IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
15ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
16IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
17ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
18WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
19ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
20SOFTWARE.
21
22******************************************************************/
23
24/*
25 * ARGO Project, Computer Sciences Dept., University of Wisconsin - Madison
26 */
27/*
28 * ARGO TP
29 *
30 * $Header: tp_user.h,v 5.2 88/11/04 15:44:44 nhall Exp $
31 * $Source: /usr/argo/sys/netiso/RCS/tp_user.h,v $
25d45a7a 32 * @(#)tp_user.h 7.5 (Berkeley) %G%
ebaa9b50
KS
33 *
34 * These are the values a real-live user ;-) needs.
35 */
36
25d45a7a 37#ifndef _TYPES_
ebaa9b50 38#ifdef KERNEL
25d45a7a 39#include "../sys/types.h"
ebaa9b50
KS
40#else KERNEL
41#include <sys/types.h>
42#endif KERNEL
25d45a7a 43#endif
ebaa9b50
KS
44
45#ifndef __TP_USER__
46#define __TP_USER__
47
48struct tp_conn_param {
49 /* PER CONNECTION parameters */
50 short p_Nretrans;
51 short p_dr_ticks;
52
53 short p_cc_ticks;
54 short p_dt_ticks;
55
56 short p_x_ticks;
57 short p_cr_ticks;
58
59 short p_keepalive_ticks;
60 short p_sendack_ticks;
61
62 short p_ref_ticks;
63 short p_inact_ticks;
64
65 short p_unused; /* local credit fraction reported (>0) no longer used*/
66 short p_winsize;
67
68 u_char p_tpdusize; /* log 2 of size */
69
70 u_char p_ack_strat; /* see comments in tp_pcb.h */
71 u_char p_rx_strat; /* see comments in tp_pcb.h */
72 u_char p_class; /* class bitmask */
73 u_char p_xtd_format;
74 u_char p_xpd_service;
75 u_char p_use_checksum;
76 u_char p_use_nxpd; /* netwk expedited data: not implemented */
77 u_char p_use_rcc; /* receipt confirmation: not implemented */
78 u_char p_use_efc; /* explicit flow control: not implemented */
79 u_char p_no_disc_indications; /* don't deliver indic on disc */
80 u_char p_dont_change_params; /* use these params as they are */
81 u_char p_netservice;
82};
83
a50e2bc0
KS
84struct tp_control_hdr {
85 u_short cmsg_len;
86 u_short cmsg_type; /* TPOPT_[CONN,DISC,CFRM]_DATA */
87 u_short cmsg_level; /* e.g. SOL_SOCKET, _TRANSPORT, etc. */
88/* u_char cmsg_data[msg_len - sizeof(tp_control_hdr)]; */
89};
90/*
91 * These sockopt level definitions should be considered for socket.h
92 */
93#define SOL_TRANSPORT 0xfffe
94#define SOL_NETWORK 0xfffd
95
ebaa9b50
KS
96/* get/set socket opt commands */
97#define TPACK_WINDOW 0x0 /* ack only on full window */
98#define TPACK_EACH 0x1 /* ack every packet */
99
100#define TPRX_USE_CW 0x8 /* use congestion window transmit */
101#define TPRX_EACH 0x4 /* retrans each packet of a set */
102#define TPRX_FASTSTART 0x1 /* don't use slow start */
103
104#define TPOPT_FLAGS 0x300
105#define TPOPT_CONN_DATA 0x400
106#define TPOPT_DISC_DATA 0x500
a50e2bc0 107#define TPOPT_CFRM_DATA 0x600
ebaa9b50
KS
108#define TPOPT_CDDATA_CLEAR 0x700
109#define TPOPT_PERF_MEAS 0xa00
110#define TPOPT_PSTATISTICS 0xb00
111#define TPOPT_PARAMS 0xc00 /* to replace a bunch of the others */
112#define TPOPT_MY_TSEL 0x800
113#define TPOPT_PEER_TSEL 0x900
44f52ea5 114#define TPOPT_NGC8_ACCEPT 0xd00 /* negotiate connection requests */
ebaa9b50
KS
115
116/*
117 ***********************flags**********************************
118 */
119
120/* read only flags */
121#define TPFLAG_DISC_DATA_OUT (u_char)0x10 /* disc data present */
122#define TPFLAG_DISC_DATA_IN (u_char)0x20 /* disc data present */
123#define TPFLAG_CONN_DATA_OUT (u_char)0x40 /* conn data present */
124#define TPFLAG_CONN_DATA_IN (u_char)0x80 /* conn data present */
125#define TPFLAG_XPD_PRESENT (u_char)0x08 /* xpd data present */
126#define TPFLAG_PEER_ON_SAMENET (u_char)0x02
127#define TPFLAG_NLQOS_PDN (u_char)0x01
44f52ea5 128#define TPFLAG_NGC8_ACCEPT (u_char)0x04 /* negotiate conn rq's */
ebaa9b50
KS
129
130
131/*
132 ***********************end flags******************************
133 */
134
135
136#endif __TP_USER__