Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

connld(7m) [sunos man page]

connld(7M)							  STREAMS Modules							connld(7M)

NAME
connld - line discipline for unique stream connections SYNOPSIS
#include </sys/steam.h> int ioctl(fd,I_PUSH,"connld"); DESCRIPTION
connld is a STREAMS-based module that provides unique connections between server and client processes. It can only be pushed (see streamio(7I)) onto one end of a STREAMS-based pipe that may subsequently be attached to a name in the file system name space with fattach(3C). After the pipe end is attached, a new pipe is created internally when an originating process attempts to open(2) or creat(2) the file system name. A file descriptor for one end of the new pipe is packaged into a message identical to that for the ioctl I_SENDFD (see streamio(7I)) and is transmitted along the stream to the server process on the other end. The originating process is blocked until the server responds. The server responds to the I_SENDFD request by accepting the file descriptor through the I_RECVFD ioctl message. When this happens, the file descriptor associated with the other end of the new pipe is transmitted to the originating process as the file descriptor returned from open(2) or creat(2). If the server does not respond to the I_SENDFD request, the stream that the connld module is pushed on becomes uni-directional because the server will not be able to retrieve any data off the stream until the I_RECVFD request is issued. If the server process exits before issuing the I_RECVFD request, the open(2) or the creat(2) invocation will fail and return -1 to the originating process. When the connld module is pushed onto a pipe, it ignores messages going back and forth through the pipe. ERRORS
On success, an open of connld returns 0. On failure, errno is set to the following values: EINVAL A stream onto which connld is being pushed is not a pipe or the pipe does not have a write queue pointer pointing to a stream head read queue. EINVAL The other end of the pipe onto which connld is being pushed is linked under a multiplexor. EPIPE connld is being pushed onto a pipe end whose other end is no longer there. ENOMEM An internal pipe could not be created. ENXIO An M_HANGUP message is at the stream head of the pipe onto which connld is being pushed. EAGAIN Internal data structures could not be allocated. ENFILE A file table entry could not be allocated. SEE ALSO
creat(2), open(2), fattach(3C), streamio(7I) STREAMS Programming Guide SunOS 5.10 3 May 2004 connld(7M)

Check Out this Related Man Page

pipemod(7M)							  STREAMS Modules						       pipemod(7M)

NAME
pipemod - STREAMS pipe flushing module DESCRIPTION
The typical stream is composed of a stream head connected to modules and terminated by a driver. Some stream configurations such as pipes and FIFOs do not have a driver and hence certain features commonly supported by the driver need to be provided by other means. Flushing is one such feature, and it is provided by the pipemod module. Pipes and FIFOs in their simplest configurations only have stream heads. A write side is connected to a read side. This remains true when modules are pushed. The twist occurs at a point known as the mid-point. When an M_FLUSH message is passed from a write queue to a read queue the FLUSHR and/or FLUSHW bits have to be switched. The mid-point of a pipe is not always easily detectable, especially if there are numerous modules pushed on either end of the pipe. In that case there needs to be a mechanism to intercept all message passing through the stream. If the message is an M_FLUSH message and it is at the mid-point, the flush bits need to be switched. This bit switching is handled by the pipemod module. pipemod should be pushed onto a pipe or FIFO where flushing of any kind will take place. The pipemod module can be pushed on either end of the pipe. The only requirement is that it is pushed onto an end that previously did not have modules on it. That is, pipemod must be the first module pushed onto a pipe so that it is at the mid-point of the pipe itself. The pipemod module handles only M_FLUSH messages. All other messages are passed on to the next module using the putnext() utility routine. If an M_FLUSH message is passed to pipemod and the FLUSHR and FLUSHW bits are set, the message is not processed but is passed to the next module using the putnext() routine. If only the FLUSHR bit is set, the FLUSHR bit is turned off and the FLUSHW bit is set. The message is then passed on to the next module using putnext(). Similarly, if the FLUSHW bit is the only bit set in the M_FLUSH message, the FLUSHW bit is turned off and the FLUSHR bit is turned on. The message is then passed to the next module on the stream. The pipemod module can be pushed on any stream that desires the bit switching. It must be pushed onto a pipe or FIFO if any form of flush- ing must take place. SEE ALSO
STREAMS Programming Guide SunOS 5.11 21 Aug 1992 pipemod(7M)
Man Page