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

NAME

6       connld - line discipline for unique stream connections
7

SYNOPSIS

9       #include </sys/steam.h>
10
11
12       int ioctl(fd,I_PUSH,"connld");
13
14

DESCRIPTION

16       connld  is  a  STREAMS-based  module  that  provides unique connections
17       between server and  client  processes.  It  can  only  be  pushed  (see
18       streamio(7I))  onto  one  end  of  a STREAMS-based pipe that may subse‐
19       quently be attached to a name in the file system name space with   fat‐
20       tach(3C).  After the pipe end is attached, a new pipe is created inter‐
21       nally when an  originating process attempts to   open(2)  or   creat(2)
22       the  file system name. A file descriptor for one end of the new pipe is
23       packaged into a message identical to that for the ioctl  I_SENDFD  (see
24       streamio(7I)) and is transmitted along the stream to the server process
25       on the  other end. The originating process is blocked until the  server
26       responds.
27
28
29       The  server  responds  to  the   I_SENDFD request by accepting the file
30       descriptor through the  I_RECVFD ioctl message. When this happens,  the
31       file descriptor associated with the other end of the new pipe is trans‐
32       mitted to the originating process as the file descriptor returned  from
33       open(2) or creat(2).
34
35
36       If  the  server  does  not respond to the  I_SENDFD request, the stream
37       that the connld module is pushed on becomes uni-directional because the
38       server   will not be able to retrieve any data off the stream until the
39       I_RECVFD request is issued. If the server process exits before  issuing
40       the  I_RECVFD request, the open(2) or the creat(2) invocation will fail
41       and return -1 to the originating process.
42
43
44       When the connld module is pushed onto a pipe, it ignores messages going
45       back and forth  through the pipe.
46

ERRORS

48       On  success,  an  open of connld returns 0. On failure, errno is set to
49       the following values:
50
51       EINVAL     A stream onto which connld is being pushed is not a pipe  or
52                  the  pipe  does not have a write queue pointer pointing to a
53                  stream head read queue.
54
55
56       EINVAL     The other end of the pipe onto which connld is being  pushed
57                  is linked under a multiplexor.
58
59
60       EPIPE      connld is being pushed onto a pipe end whose other end is no
61                  longer there.
62
63
64       ENOMEM     An internal pipe could not be created.
65
66
67       ENXIO      An  M_HANGUP message is at the stream head of the pipe  onto
68                  which connld is being pushed.
69
70
71       EAGAIN     Internal data structures could not be allocated.
72
73
74       ENFILE     A file table entry could not be allocated.
75
76

SEE ALSO

78       creat(2), open(2), fattach(3C), streamio(7I)
79
80
81       STREAMS Programming Guide
82
83
84
85SunOS 5.11                        3 May 2004                        connld(7M)
Impressum