HP rp4440 HP DLPI Programmer's Guide - Page 169
ioctl Processing, Length of the data that is passed
View all HP rp4440 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 169 highlights
Chapter 3 DLPI Input/Output Controls ioctl Processing ioctl 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: • I_STR as the second parameter • Address to a strioctl structure as the third parameter The strioctl structure contains the following members: struct strioctl { int ic_cmd; int ic_timout; int ic_len; char *ic_dp; }; The description of the members of the strioctl structure is as follows: ic_cmd Command to be sent downstream ic_timout Timeout period for positive acknowledgement (ACK) or negative acknowledgement (NAK) ic_len Length of the data that is passed ic_dp Pointer to the data that is passed 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. 169