| United States-English |
|
|
|
![]() |
HP DLPI Programmer's Guide: HP-UX 11i v2 > Chapter 3 DLPI Input/Output Controlsioctl Processing |
|
User space applications can send an ioctl command after obtaining a valid file descriptor and attaching itself to a specific PPA with which it needs to communicate. To send an ioctl command, you can use the I_STR ioctl. You can create the I_STR ioctl by passing the following to the ioctl()(2) system call:
The strioctl structure contains the following members: struct strioctl { The description of the members of the strioctl structure is as follows: ic_cmd
ic_timout
ic_len
ic_dp
The I_STR ioctl causes the stream head to create an M_IOCTL message that includes the associated information (passed in ic_dp) required by DLPI or the device driver to process the command (passed in ic_cmd). The associated information is passed as the second message block following the M_IOCTL message block. All the ioctl commands with an I_STR request are passed to the driver instance and DLPI through the ioc_cmd field (present in iocblk structure). The STREAMS kernel modules that reside on top of DLPI (transport layer) can generate ioctl by constructing an M_IOCTL message block that contains the iocblk structure.
For more information, see STREAMS/UX for the HP 9000 Reference Manual. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||