Converts a set of streamio operations into STREAMS messages.
The timod module is a STREAMS module for use with the Transport Interface (TI) functions of the Network Services Library. The timod module converts a set of streamio operations 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.
The timod module must only be pushed (see "Pushable Modules" in AIX® Version 7.1 Communications Programming Concepts) onto a stream terminated by a transport protocol provider that supports the TI.
All STREAMS messages, with the exception of the message types generated from the streamio operations described below as values for the cmd field, will be transparently passed to the neighboring STREAMS module or driver. The messages generated from the following streamio operations are recognized and processed by the timod module.
This module is part of STREAMS Kernel Extensions.
The fields are described as follows:
Field | Description |
---|---|
cmd | Specifies the command to be carried out. The possible values
for this field are:
|
len | (On issuance) Specifies the size of the appropriate TI message
to be sent to the transport provider. (On return) Specifies the size of the appropriate TI message from the transport provider in response to the issued TI message. |
dp | Specifies a pointer to a buffer large enough to hold the contents of the appropriate TI messages. The TI message types are defined in the sys/tihdr.h file. |
The following is an example of how to use the timod module:
#include <sys/stropts.h>
-
-
struct strioctl strioctl;
strucu t_info info;
-
-
strioctl.ic_cmd = TI_GETINFO;
strioctl.ic_timeout = INFTIM;
strioctl.ic_len = sizeof (info);
strioctl.ic_dp = (char *)&info;
ioctl(fildes, I_STR, &strioctl);