DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH
 

timod(M)


timod -- Transport Layer Interface cooperating STREAMS module

Syntax

#include <stropts.h>

Description

timod is a STREAMS module for use with the Transport Layer Interface (TLI) functions (see Intro(NET) and the Network Programming Interfaces). The timod module converts a set of ioctl(S) calls into STREAMS messages that may be consumed by a transport protocol provider which supports the Transport Layer Interface. This allows a user to initiate certain TLI functions as atomic operations.

The timod module must only be pushed onto a stream terminated by a transport protocol provider which supports the TLI.

All STREAMS messages, with the exception of the message types generated from the ioctl commands described below, will be transparently passed to the neighboring STREAMS module or driver. The messages generated from the following ioctl commands are recognized and processed by the timod module. The format of the ioctl call is:

   #include <stropts.h>
   ...
   struct strioctl strioctl;
   ...
   strioctl.ic_cmd = cmd;
   strioctl.ic_timeout = INFTIM;
   strioctl.ic_len = size;
   strioctl.ic_dp = (char *)buf
   ioctl(fildes, I_STR, &strioctl);
where, on issuance, size is the size of the appropriate TLI message to be sent to the transport provider and on return, size is the size of the appropriate TLI message from the transport provider in response to the issued TLI message. buf is a pointer to a buffer large enough to hold the contents of the appropriate TLI messages. The TLI message types are defined in <sys/tihdr.h>. The possible values for the cmd field are:

TI_BIND
Bind an address to the underlying transport protocol provider. The message issued to the TI_BIND ioctl is equivalent to the TLI message type T_BIND_REQ and the message returned by the successful completion of the ioctl is equivalent to the TLI message type T_BIND_ACK.

TI_UNBIND
Unbind an address from the underlying transport protocol provider. The message issued to the TI_UNBIND ioctl is equivalent to the TLI message type T_UNBIND_REQ and the message returned by the successful completion of the ioctl is equivalent to the TLI message type T_OK_ACK.

TI_GETINFO
Get the TLI protocol specific information from the transport protocol provider. The message issued to the TI_GETINFO ioctl is equivalent to the TLI message type T_INFO_REQ and the message returned by the successful completion of the ioctl is equivalent to the TLI message type T_INFO_ACK.

TI_OPTMGMT
Get, set, or negotiate protocol specific options with the transport protocol provider. The message issued to the TI_OPTMGMT ioctl is equivalent to the TLI message type T_OPTMGMT_REQ, and the message returned by the successful completion of the ioctl is equivalent to the TLI message type T_OPTMGMT_ACK.

Return values

If the ioctl system call returns with a value greater than 0, the lower 8 bits of the return value will be one of the TLI error codes as defined in <sys/tiuser.h>. If the TLI error is of type TSYSERR, then the next 8 bits of the return value will contain an error as defined in <sys/errno.h> (see Intro(S)).

Limitations

The NUMTIM kernel parameter limits the number of timod modules that can be pushed (for example, by calls to t_open(NET)).

Files

/usr/include/stropts.h
/usr/include/sys/errno.h
/usr/include/sys/stropts.h
/usr/include/sys/tihdr.h
/usr/include/sys/tiuser.h

See also

t_open(NET), tirdwr(M)

AT&T STREAMS Primer
AT&T STREAMS Programmer's Guide


© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003