1tirdwr(7M)                      STREAMS Modules                     tirdwr(7M)
2
3
4

NAME

6       tirdwr - Transport Interface read/write interface STREAMS module
7

SYNOPSIS

9       int ioctl( fd, I_PUSH, "tirdwr");
10
11

DESCRIPTION

13       tirdwr  is  a STREAMS module  that provides an alternate interface to a
14       transport provider which supports the  Transport Interface ("TI") func‐
15       tions  of the Network Services library (see Section 3N). This alternate
16       interface allows a user to  communicate  with  the  transport  protocol
17       provider  using the  read(2) and  write(2) system calls. The  putmsg(2)
18       and  getmsg(2) system calls may  also  be  used.  However,  putmsg  and
19       getmsg  can  only transfer data messages between  user and stream; con‐
20       trol portions are disallowed.
21
22
23       The tirdwr module must only be pushed  (see  I_PUSH  in   streamio(7I))
24       onto  a  stream  terminated by a transport protocol provider which sup‐
25       ports the TI. After the tirdwr module has been pushed  onto  a  stream,
26       none  of the TI functions can be used. Subsequent calls to TI functions
27       cause an error on the stream. Once the error  is  detected,  subsequent
28       system calls on the stream return an error with errno set to EPROTO.
29
30
31       The following are the actions taken by the tirdwr module when pushed on
32       the stream, popped (see I_POP in  streamio(7I))  off   the  stream,  or
33       when data passes through it.
34
35       push     When  the module is pushed onto a stream, it checks any exist‐
36                ing data destined for the user to  ensure  that  only  regular
37                data  messages  are  present.  It  ignores any messages on the
38                stream that relate to process  management,  such  as  messages
39                that  generate  signals  to the user processes associated with
40                the stream. If any other messages are present, the I_PUSH will
41                return an error with errno set to EPROTO.
42
43
44       write    The module takes the following actions on data that originated
45                from a write system call:
46
47                    o      All messages with the exception  of  messages  that
48                           contain control portions (see the putmsg and getmsg
49                           system calls) are  transparently  passed  onto  the
50                           module's downstream neighbor.
51
52                    o      Any zero length data messages are freed by the mod‐
53                           ule and they will not be passed onto  the  module's
54                           downstream neighbor.
55
56                    o      Any  messages  with  control  portions  generate an
57                           error, and any further system calls associated with
58                           the stream fails with errno set to EPROTO.
59
60
61       read     The module takes the following actions on data that originated
62                from the transport protocol provider.
63
64                All messages with the exception of those that contain  control
65                portions  (see  the putmsg and getmsg system calls) are trans‐
66                parently passed  onto  the  module's  upstream  neighbor.  The
67                action taken on messages with control portions will be as fol‐
68                lows:
69
70                    o      Any data messages with control  portions  have  the
71                           control portions removed from the message before to
72                           passing the message on to the upstream neighbor.
73
74                    o      Messages that represent an orderly release  indica‐
75                           tion  from  the  transport provider generate a zero
76                           length data message, indicating the  end  of  file,
77                           which will be sent to the reader of the stream. The
78                           orderly release message itself is freed by the mod‐
79                           ule.
80
81                    o      Messages  that  represent  an  abortive  disconnect
82                           indication from the transport  provider  cause  all
83                           further  write and putmsg system calls to fail with
84                           errno set to ENXIO. All  further  read  and  getmsg
85                           system  calls  return  zero length data (indicating
86                           end of file) once all previous data has been read.
87
88                    o      With the exception of the above  rules,  all  other
89                           messages  with  control  portions generate an error
90                           and all further system calls  associated  with  the
91                           stream will fail with errno set to EPROTO.
92                Any zero length data messages are freed by the module and they
93                are not passed onto the module's upstream neighbor.
94
95
96       pop      When the module is popped off the  stream  or  the  stream  is
97                closed, the module takes the following action:
98
99                    o      If  an  orderly  release indication has been previ‐
100                           ously received, then  an  orderly  release  request
101                           will  be  sent  to the remote side of the transport
102                           connection.
103
104

SEE ALSO

106       Intro(3),   getmsg(2),   putmsg(2),   read(2),   write(2),    Intro(3),
107       streamio(7I), timod(7M)
108
109
110       STREAMS Programming Guide
111
112
113
114SunOS 5.11                        3 Jul 1990                        tirdwr(7M)
Impressum