man(1) Manual page archive


     CONNLD(4)                                               CONNLD(4)

     NAME
          conn_ld - line discipline for unique stream connection

     SYNOPSIS
          #include <sys/filio.h>

     DESCRIPTION
          This line discipline provides unique connections to a
          server.  The server process should push the line discipline
          on a pipe (see FIOPUSHLD in stream(4)) and fmount(2) the
          pipe end on a file.  A subsequent attempt to open(2) or
          creat that file causes a new pipe to be created.  A file
          descriptor for one end of the new pipe is passed on the
          mounted pipe to to the server process as if by FIOSNDFD; see
          stream(4). The opening process is blocked until the server
          responds.  The server should receive the passed file
          descriptor with FIORCVFD and respond in one of the following
          ways:

          -    Accept the new file descriptor by performing

                    ioctl(fd, FIOACCEPT, (void *)0);

               The originating open completes and returns a file
               descriptor for the other end of the new pipe.

          -    Write some data on the new file descriptor.  This per-
               forms an implicit `FIOACCEPT'.

          -    Pass a different file descriptor:

                    ioctl(fd, FIOSNDFD, &newfd);

               The originator's end of the new pipe is closed, and a
               file descriptor for the open file designated by newfd
               is returned to the originating open.

          -    Reject the connection, by closing the new file descrip-
               tor or by performing

                    ioctl(fd, FIOREJECT, (void *)0);

               The originating open fails with ENXIO and the new pipe
               is discarded.

     SEE ALSO
          fmount(2), stream(4)