419 int ic_cmd;
420 int ic_timout;
421 int ic_len;
422 char *ic_dp;
423
424 ic_cmd is the internal ioctl() command intended for a
425 downstream module or driver and ic_timout is the number of
426 seconds (-1 = infinite, 0 = use default, >0 = as specified)
427 an I_STR request will wait for acknowledgement before timing
428 out. ic_len is the number of bytes in the data argument and
429 ic_dp is a pointer to the data argument. The ic_len field
430 has two uses: on input, it contains the length of the data
431 argument passed in, and on return from the command, it
432 contains the number of bytes being returned to the user (the
433 buffer pointed to by ic_dp should be large enough to contain
434 the maximum amount of data that any module or the driver in
435 the stream can return).
436
437 At most one I_STR can be active on a stream. Further I_STR
438 calls will block until the active I_STR completes via a
439 positive or negative acknowlegment, a timeout, or an error
440 condition at the stream head. By setting the ic_timout
441 field to 0, the user is requesting STREAMS to provide the
442 DEFAULT timeout. The default timeout is specific to the
443 STREAMS implementation and may vary depending on which
444 release of Solaris you are using. For Solaris 8 (and
445 earlier versions), the default timeout is fifteen seconds.
446 The O_NDELAY and O_NONBLOCK (see open(2)) flags have no
447 effect on this call.
448
449 The stream head will convert the information pointed to by
450 the strioctl structure to an internal ioctl() command
451 message and send it downstream. On failure, errno is set to
452 one of the following values:
453
454 ENOSR Unable to allocate buffers for the ioctl() message
455 due to insufficient STREAMS memory resources.
456
457 EFAULT Either arg points outside the allocated address
458 space, or the buffer area specified by ic_dp and
459 ic_len (separately for data sent and data returned)
832
833 EINVAL fildes is the file descriptor of a pipe or FIFO.
834
835 An I_PUNLINK can also fail while waiting for the multiplexing
836 driver to acknowledge the link request if a message indicating
837 an error or a hangup is received at the stream head of fildes.
838 In addition, an error code can be returned in the positive or
839 negative acknowledgement message. For these cases, I_PUNLINK
840 will fail with errno set to the value in the message.
841
842 RETURN VALUES
843 Unless specified otherwise above, the return value from ioctl(2) is 0
844 upon success and -1 upon failure, with errno set as indicated.
845
846 SEE ALSO
847 close(2), fcntl(2), getmsg(2), ioctl(2), open(2), poll(2), putmsg(2),
848 read(2), write(2), Intro(3), signal(3C), signal.h(3HEAD)
849
850 STREAMS Programming Guide
851
852 illumos October 29, 2017 illumos
|
419 int ic_cmd;
420 int ic_timout;
421 int ic_len;
422 char *ic_dp;
423
424 ic_cmd is the internal ioctl() command intended for a
425 downstream module or driver and ic_timout is the number of
426 seconds (-1 = infinite, 0 = use default, >0 = as specified)
427 an I_STR request will wait for acknowledgement before timing
428 out. ic_len is the number of bytes in the data argument and
429 ic_dp is a pointer to the data argument. The ic_len field
430 has two uses: on input, it contains the length of the data
431 argument passed in, and on return from the command, it
432 contains the number of bytes being returned to the user (the
433 buffer pointed to by ic_dp should be large enough to contain
434 the maximum amount of data that any module or the driver in
435 the stream can return).
436
437 At most one I_STR can be active on a stream. Further I_STR
438 calls will block until the active I_STR completes via a
439 positive or negative acknowledgement, a timeout, or an error
440 condition at the stream head. By setting the ic_timout
441 field to 0, the user is requesting STREAMS to provide the
442 DEFAULT timeout. The default timeout is specific to the
443 STREAMS implementation and may vary depending on which
444 release of Solaris you are using. For Solaris 8 (and
445 earlier versions), the default timeout is fifteen seconds.
446 The O_NDELAY and O_NONBLOCK (see open(2)) flags have no
447 effect on this call.
448
449 The stream head will convert the information pointed to by
450 the strioctl structure to an internal ioctl() command
451 message and send it downstream. On failure, errno is set to
452 one of the following values:
453
454 ENOSR Unable to allocate buffers for the ioctl() message
455 due to insufficient STREAMS memory resources.
456
457 EFAULT Either arg points outside the allocated address
458 space, or the buffer area specified by ic_dp and
459 ic_len (separately for data sent and data returned)
832
833 EINVAL fildes is the file descriptor of a pipe or FIFO.
834
835 An I_PUNLINK can also fail while waiting for the multiplexing
836 driver to acknowledge the link request if a message indicating
837 an error or a hangup is received at the stream head of fildes.
838 In addition, an error code can be returned in the positive or
839 negative acknowledgement message. For these cases, I_PUNLINK
840 will fail with errno set to the value in the message.
841
842 RETURN VALUES
843 Unless specified otherwise above, the return value from ioctl(2) is 0
844 upon success and -1 upon failure, with errno set as indicated.
845
846 SEE ALSO
847 close(2), fcntl(2), getmsg(2), ioctl(2), open(2), poll(2), putmsg(2),
848 read(2), write(2), Intro(3), signal(3C), signal.h(3HEAD)
849
850 STREAMS Programming Guide
851
852 illumos February 17, 2020 illumos
|