Merge commit 'dc97a43d4a70c8773a619f11b95b07a787f6f5b7' into merges
[unleashed.git] / share / man / man7m / timod.7m
blobaef50e882e9113180f551a7b57585c4ffc00f90d
1 '\" te
2 .\"  Copyright 1989 AT&T
3 .\" Copyright (C) 1999, Sun Microsystems, Inc. All Rights Reserved
4 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
5 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
6 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
7 .TH TIMOD 7M "Mar 26, 1993"
8 .SH NAME
9 timod \- Transport Interface cooperating STREAMS module
10 .SH SYNOPSIS
11 .LP
12 .nf
13 #include <sys/stropts.h>
14 .fi
16 .LP
17 .nf
18 ioctl(\fIfildes\fR, I_STR, &\fImy_strioctl\fR);
19 .fi
21 .SH DESCRIPTION
22 .sp
23 .LP
24 \fBtimod\fR is a STREAMS module for use with the Transport Interface
25 ("\fBTI\fR") functions of the Network Services library. The \fBtimod\fR module
26 converts a set of  \fBioctl\fR(2) calls into STREAMS messages that may be
27 consumed by a transport protocol provider that supports the Transport
28 Interface. This allows a user to initiate certain TI functions as atomic
29 operations.
30 .sp
31 .LP
32 The \fBtimod\fR module must be pushed onto only a stream terminated by a
33 transport protocol provider that supports the \fBTI\fR.
34 .sp
35 .LP
36 All STREAMS messages, with the exception of the message types generated from
37 the \fBioctl\fR commands described below, will be transparently passed to the
38 neighboring module or driver. The messages generated from the following
39 \fBioctl\fR commands are recognized and processed by the \fBtimod\fR module.
40 The format of the \fBioctl\fR call is:
41 .sp
42 .in +2
43 .nf
44 \fB#include <sys/stropts.h>
45                 -
46                 -
47 struct strioctl my_strioctl;
48                 -
49                 -
50 strioctl.ic_cmd = \fR\fIcmd\fR;
51 strioctl.ic_timout = INFTIM;
52 strioctl.ic_len = \fBsize\fR;
53 strioctl.ic_dp = (char *)\fIbuf\fR
54 ioctl(\fIfildes\fR, I_STR, &\fImy_strioctl\fR);
55 .fi
56 .in -2
58 .sp
59 .LP
60 On issuance, \fBsize\fR is the size of the appropriate \fBTI\fR message to be
61 sent to the transport provider and on return \fBsize\fR is the size of the
62 appropriate \fBTI\fR message from the transport provider in response to the
63 issued \fBTI \fRmessage. \fIbuf\fR is a pointer to a buffer large enough to
64 hold the contents of the appropriate \fBTI\fR messages. The \fBTI\fR message
65 types are defined in <\fBsys/tihdr.h\fR>. The possible values for the \fIcmd\fR
66 field are:
67 .sp
68 .ne 2
69 .na
70 \fB\fBTI_BIND\fR \fR
71 .ad
72 .RS 15n
73 Bind an address to the underlying transport protocol provider. The message
74 issued to the  \fBTI_BIND\fR ioctl is equivalent to the \fBTI\fR message type
75 \fBT_BIND_REQ\fR and the message returned by the successful completion of the
76 \fBioctl\fR is equivalent to the \fBTI\fR message type \fBT_BIND_ACK.\fR
77 .RE
79 .sp
80 .ne 2
81 .na
82 \fB\fBTI_UNBIND\fR \fR
83 .ad
84 .RS 15n
85 Unbind an address from the underlying transport protocol provider. The message
86 issued to the  \fBTI_UNBIND\fR ioctl is equivalent to the \fBTI\fR message type
87 \fBT_UNBIND_REQ\fR and the message returned by the successful completion of the
88 \fBioctl\fR is equivalent to the \fBTI\fR message type \fBT_OK_ACK.\fR
89 .RE
91 .sp
92 .ne 2
93 .na
94 \fB\fBTI_GETINFO\fR \fR
95 .ad
96 .RS 15n
97 Get the \fBTI\fR protocol specific information from the transport protocol
98 provider. The message issued to the  \fBTI_GETINFO\fR ioctl is equivalent to
99 the \fBTI\fR message type  \fBT_INFO_REQ\fR and the message returned by the
100 successful completion of the \fBioctl\fR is equivalent to the \fBTI\fR message
101 type \fBT_INFO_ACK.\fR
105 .ne 2
107 \fB\fBTI_OPTMGMT\fR \fR
109 .RS 15n
110 Get, set, or negotiate protocol specific options with the transport protocol
111 provider. The message issued to the  \fBTI_OPTMGMT\fR ioctl is equivalent to
112 the TI message type  \fBT_OPTMGMT_REQ\fR and the message returned by the
113 successful completion of the \fBioctl\fR is equivalent to the \fBTI\fR message
114 type \fBT_OPTMGMT_ACK.\fR
117 .SH FILES
119 .ne 2
121 \fB<\fBsys/timod.h\fR> \fR
123 .RS 19n
124 ioctl definitions
128 .ne 2
130 \fB<\fBsys/tiuser.h\fR> \fR
132 .RS 19n
133 \fBTLI\fR interface declaration and structure file
137 .ne 2
139 \fB<\fBsys/tihdr.h\fR> \fR
141 .RS 19n
142 \fBTPI\fR declarations and user-level code
146 .ne 2
148 \fB<\fBsys/errno.h\fR> \fR
150 .RS 19n
151 system error messages file. Please see \fBerrno\fR(3C).
154 .SH SEE ALSO
157 \fBIntro\fR(3), \fBioctl\fR(2), \fBerrno\fR(3C), \fBtirdwr\fR(7M)
160 \fISTREAMS Programming Guide\fR
161 .SH DIAGNOSTICS
164 If the \fBioctl\fR returns with a value greater than 0, the lower 8 bits of the
165 return value will be one of the \fBTI \fRerror codes as defined in
166 <\fBsys/tiuser.h\fR>. If the \fBTI\fR error is of type  \fBTSYSERR\fR, then the
167 next 8 bits of the return value will contain an error as defined in
168 <\fBsys/errno.h\fR> (see  \fBIntro\fR(3)).