Lines Matching refs:ioctl
1 /// The datatype used for the ioctl number
37 // "Generic" ioctl protocol
81 /// Encode an ioctl command.
86 (($dir as $crate::sys::ioctl::ioctl_num_type
87 & $crate::sys::ioctl::DIRMASK)
88 << $crate::sys::ioctl::DIRSHIFT)
89 | (($ty as $crate::sys::ioctl::ioctl_num_type
90 & $crate::sys::ioctl::TYPEMASK)
91 << $crate::sys::ioctl::TYPESHIFT)
92 | (($nr as $crate::sys::ioctl::ioctl_num_type
93 & $crate::sys::ioctl::NRMASK)
94 << $crate::sys::ioctl::NRSHIFT)
95 | (($sz as $crate::sys::ioctl::ioctl_num_type
96 & $crate::sys::ioctl::SIZEMASK)
97 << $crate::sys::ioctl::SIZESHIFT)
101 /// Generate an ioctl request code for a command that passes no data.
103 /// This is equivalent to the `_IO()` macro exposed by the C ioctl API.
105 /// You should only use this macro directly if the `ioctl` you're working
119 ioc!($crate::sys::ioctl::NONE, $ty, $nr, 0)
123 /// Generate an ioctl request code for a command that reads.
125 /// This is equivalent to the `_IOR()` macro exposed by the C ioctl API.
127 /// You should only use this macro directly if the `ioctl` you're working
136 ioc!($crate::sys::ioctl::READ, $ty, $nr, $sz)
140 /// Generate an ioctl request code for a command that writes.
142 /// This is equivalent to the `_IOW()` macro exposed by the C ioctl API.
144 /// You should only use this macro directly if the `ioctl` you're working
153 ioc!($crate::sys::ioctl::WRITE, $ty, $nr, $sz)
157 /// Generate an ioctl request code for a command that reads and writes.
159 /// This is equivalent to the `_IOWR()` macro exposed by the C ioctl API.
161 /// You should only use this macro directly if the `ioctl` you're working
167 $crate::sys::ioctl::READ | $crate::sys::ioctl::WRITE,