'\" te .\" Copyright 1989 AT&T .\" Copyright (C) 1999, Sun Microsystems, Inc. All Rights Reserved .\" 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. .\" 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. .\" 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] .TH timod 7M "26 Mar 1993" "SunOS 5.11" "STREAMS Modules" .SH NAME timod \- Transport Interface cooperating STREAMS module .SH SYNOPSIS .LP .nf #include .fi .LP .nf ioctl(\fIfildes\fR, I_STR, &\fImy_strioctl\fR); .fi .SH DESCRIPTION .sp .LP \fBtimod\fR is a STREAMS module for use with the Transport Interface ("\fBTI\fR") functions of the Network Services library. The \fBtimod\fR module converts a set of \fBioctl\fR(2) calls into STREAMS messages that may be consumed by a transport protocol provider that supports the Transport Interface. This allows a user to initiate certain TI functions as atomic operations. .sp .LP The \fBtimod\fR module must be pushed onto only a stream terminated by a transport protocol provider that supports the \fBTI\fR. .sp .LP All STREAMS messages, with the exception of the message types generated from the \fBioctl\fR commands described below, will be transparently passed to the neighboring module or driver. The messages generated from the following \fBioctl\fR commands are recognized and processed by the \fBtimod\fR module. The format of the \fBioctl\fR call is: .sp .in +2 .nf \fB#include - - struct strioctl my_strioctl; - - strioctl.ic_cmd = \fR\fIcmd\fR; strioctl.ic_timout = INFTIM; strioctl.ic_len = \fBsize\fR; strioctl.ic_dp = (char *)\fIbuf\fR ioctl(\fIfildes\fR, I_STR, &\fImy_strioctl\fR); .fi .in -2 .sp .LP On issuance, \fBsize\fR is the size of the appropriate \fBTI\fR message to be sent to the transport provider and on return \fBsize\fR is the size of the appropriate \fBTI\fR message from the transport provider in response to the issued \fBTI \fRmessage. \fIbuf\fR is a pointer to a buffer large enough to hold the contents of the appropriate \fBTI\fR messages. The \fBTI\fR message types are defined in <\fBsys/tihdr.h\fR>. The possible values for the \fIcmd\fR field are: .sp .ne 2 .mk .na \fB\fBTI_BIND\fR \fR .ad .RS 15n .rt Bind an address to the underlying transport protocol provider. The message issued to the \fBTI_BIND\fR ioctl is equivalent to the \fBTI\fR message type \fBT_BIND_REQ\fR and the message returned by the successful completion of the \fBioctl\fR is equivalent to the \fBTI\fR message type \fBT_BIND_ACK.\fR .RE .sp .ne 2 .mk .na \fB\fBTI_UNBIND\fR \fR .ad .RS 15n .rt Unbind an address from the underlying transport protocol provider. The message issued to the \fBTI_UNBIND\fR ioctl is equivalent to the \fBTI\fR message type \fBT_UNBIND_REQ\fR and the message returned by the successful completion of the \fBioctl\fR is equivalent to the \fBTI\fR message type \fBT_OK_ACK.\fR .RE .sp .ne 2 .mk .na \fB\fBTI_GETINFO\fR \fR .ad .RS 15n .rt Get the \fBTI\fR protocol specific information from the transport protocol provider. The message issued to the \fBTI_GETINFO\fR ioctl is equivalent to the \fBTI\fR message type \fBT_INFO_REQ\fR and the message returned by the successful completion of the \fBioctl\fR is equivalent to the \fBTI\fR message type \fBT_INFO_ACK.\fR .RE .sp .ne 2 .mk .na \fB\fBTI_OPTMGMT\fR \fR .ad .RS 15n .rt Get, set, or negotiate protocol specific options with the transport protocol provider. The message issued to the \fBTI_OPTMGMT\fR ioctl is equivalent to the TI message type \fBT_OPTMGMT_REQ\fR and the message returned by the successful completion of the \fBioctl\fR is equivalent to the \fBTI\fR message type \fBT_OPTMGMT_ACK.\fR .RE .SH FILES .sp .ne 2 .mk .na \fB<\fBsys/timod.h\fR> \fR .ad .RS 19n .rt ioctl definitions .RE .sp .ne 2 .mk .na \fB<\fBsys/tiuser.h\fR> \fR .ad .RS 19n .rt \fBTLI\fR interface declaration and structure file .RE .sp .ne 2 .mk .na \fB<\fBsys/tihdr.h\fR> \fR .ad .RS 19n .rt \fBTPI\fR declarations and user-level code .RE .sp .ne 2 .mk .na \fB<\fBsys/errno.h\fR> \fR .ad .RS 19n .rt system error messages file. Please see \fBerrno\fR(3C). .RE .SH SEE ALSO .sp .LP \fBIntro\fR(3), \fBioctl\fR(2), \fBerrno\fR(3C), \fBtirdwr\fR(7M) .sp .LP \fISTREAMS Programming Guide\fR .SH DIAGNOSTICS .sp .LP If the \fBioctl\fR returns with a value greater than 0, the lower 8 bits of the return value will be one of the \fBTI \fRerror codes as defined in <\fBsys/tiuser.h\fR>. If the \fBTI\fR error is of type \fBTSYSERR\fR, then the next 8 bits of the return value will contain an error as defined in <\fBsys/errno.h\fR> (see \fBIntro\fR(3)).