1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
//! Linux-specific definitions.
//!
//! On Linux, `ioctl(2)` identifiers are the size of C's `unsigned long` type,
//! equivalent to `u32` on 32-bit architectures and `u64` on 64-bit
//! architectures.
//!
//! The `ioctl(2)` identifier is divided into four fields. From most-significant to least-significant in the identifier:
//! * The direction of the `ioctl(2)` call.
//! * The size of the structure passed to the `ioctl(2)` call.
//! * A type identifier.
//! * A call identifier.
//!
//! The size of these fields varies by platform.
use ;
/// The identifier type for ioctl calls.
pub type IoctlId = c_ulong;
/// This is the same for all architectures.
///
/// Reference: [`include/uapi/asm-generic/ioctl.h`](https://github.com/torvalds/linux/blob/7c16f0a4ed1ce7b0dd1c01fc012e5bde89fe7748/include/uapi/asm-generic/ioctl.h#L23)
pub const IOC_NRBITS: usize = 8;
/// The number of bits available for `ioctl(2)` type identifiers.
///
/// This is the same for all architectures.
///
/// Reference: [`include/uapi/asm-generic/ioctl.h`](https://github.com/torvalds/linux/blob/7c16f0a4ed1ce7b0dd1c01fc012e5bde89fe7748/include/uapi/asm-generic/ioctl.h#L24)
pub const IOC_TYPEBITS: usize = 8;
/// The number of bits used to represent the size of the argument to the `ioctl(2)` call.
///
/// For Alpha (not supported by Rust), MIPS, and PowerPC, this is 13 bits. For all other architectures, this is 14 bits.
///
/// For SPARC, this is 14 bits with an [overlap on the direction field](https://github.com/torvalds/linux/blob/7c16f0a4ed1ce7b0dd1c01fc012e5bde89fe7748/arch/sparc/include/uapi/asm/ioctl.h#L6-L8).
///
/// References:
/// * Alpha: [`arch/alpha/include/uapi/asm/ioctl.h`](https://github.com/torvalds/linux/blob/7c16f0a4ed1ce7b0dd1c01fc012e5bde89fe7748/arch/mips/include/uapi/asm/ioctl.h#L6)
/// * MIPS: [`arch/mips/include/uapi/asm/ioctl.h`](https://github.com/torvalds/linux/blob/7c16f0a4ed1ce7b0dd1c01fc012e5bde89fe7748/arch/mips/include/uapi/asm/ioctl.h#L14)
/// * PowerPC: [`arch/powerpc/include/uapi/asm/ioctl.h`](https://github.com/torvalds/linux/blob/7c16f0a4ed1ce7b0dd1c01fc012e5bde89fe7748/arch/powerpc/include/uapi/asm/ioctl.h#L5)
/// * All others: [`include/uapi/asm-generic/ioctl.h`](https://github.com/torvalds/linux/blob/7c16f0a4ed1ce7b0dd1c01fc012e5bde89fe7748/include/uapi/asm-generic/ioctl.h#L32)
pub const IOC_SIZEBITS: usize = 13;
/// The number of bits used to represent the size of the argument to the `ioctl(2)` call.
///
/// For Alpha (not supported by Rust), MIPS, and PowerPC, this is 13 bits. For all other architectures, this is 14 bits.
///
/// For SPARC, this is 14 bits with an
/// [overlap on the direction field](https://github.com/torvalds/linux/blob/7c16f0a4ed1ce7b0dd1c01fc012e5bde89fe7748/arch/sparc/include/uapi/asm/ioctl.h#L6-L8).
///
/// References:
/// * Alpha: [`arch/alpha/include/uapi/asm/ioctl.h`](https://github.com/torvalds/linux/blob/7c16f0a4ed1ce7b0dd1c01fc012e5bde89fe7748/arch/mips/include/uapi/asm/ioctl.h#L6)
/// * MIPS: [`arch/mips/include/uapi/asm/ioctl.h`](https://github.com/torvalds/linux/blob/7c16f0a4ed1ce7b0dd1c01fc012e5bde89fe7748/arch/mips/include/uapi/asm/ioctl.h#L14)
/// * PowerPC: [`arch/powerpc/include/uapi/asm/ioctl.h`](https://github.com/torvalds/linux/blob/7c16f0a4ed1ce7b0dd1c01fc012e5bde89fe7748/arch/powerpc/include/uapi/asm/ioctl.h#L5)
/// * All others: [`include/uapi/asm-generic/ioctl.h`](https://github.com/torvalds/linux/blob/7c16f0a4ed1ce7b0dd1c01fc012e5bde89fe7748/include/uapi/asm-generic/ioctl.h#L32)
pub const IOC_SIZEBITS: usize = 14;
/// The number of bits used to represent the direction of the `ioctl(2)` call.
///
/// For Alpha (not supported by Rust), MIPS, PowerPC, and SPARC, this is 3 bits. For all other architectures, this is
/// 2 bits.
///
/// Note that on SPARC the direction field
/// [overlaps with the size field](https://github.com/torvalds/linux/blob/7c16f0a4ed1ce7b0dd1c01fc012e5bde89fe7748/arch/sparc/include/uapi/asm/ioctl.h#L6-L8).
///
/// References:
/// * Alpha: [`arch/alpha/include/uapi/asm/ioctl.h`](https://github.com/torvalds/linux/blob/7c16f0a4ed1ce7b0dd1c01fc012e5bde89fe7748/arch/alpha/include/uapi/asm/ioctl.h#L19)
/// * MIPS: [`arch/mips/include/uapi/asm/ioctl.h`](https://github.com/torvalds/linux/blob/7c16f0a4ed1ce7b0dd1c01fc012e5bde89fe7748/arch/mips/include/uapi/asm/ioctl.h#L15)
/// * PowerPC: [`arch/powerpc/include/uapi/asm/ioctl.h`](https://github.com/torvalds/linux/blob/7c16f0a4ed1ce7b0dd1c01fc012e5bde89fe7748/arch/sparc/include/uapi/asm/ioctl.h#L22)
/// * SPARC: [`arch/sparc/include/uapi/asm/ioctl.h`](https://github.com/torvalds/linux/blob/7c16f0a4ed1ce7b0dd1c01fc012e5bde89fe7748/arch/sparc/include/uapi/asm/ioctl.h#L22)
/// * All others: [`include/uapi/asm-generic/ioctl.h`](https://github.com/torvalds/linux/blob/7c16f0a4ed1ce7b0dd1c01fc012e5bde89fe7748/include/uapi/asm-generic/ioctl.h#L36)
pub const IOC_DIRBITS: usize = 3;
/// The number of bits used to represent the direction of the `ioctl(2)` call.
///
/// For Alpha (not supported by Rust), MIPS, PowerPC, and SPARC, this is 3 bits. For all other architectures, this is
/// 2 bits.
///
/// Note that on SPARC the direction field
/// [overlaps with the size field](https://github.com/torvalds/linux/blob/7c16f0a4ed1ce7b0dd1c01fc012e5bde89fe7748/arch/sparc/include/uapi/asm/ioctl.h#L6-L8).
///
/// References:
/// * Alpha: [`arch/alpha/include/uapi/asm/ioctl.h`](https://github.com/torvalds/linux/blob/7c16f0a4ed1ce7b0dd1c01fc012e5bde89fe7748/arch/alpha/include/uapi/asm/ioctl.h#L19)
/// * MIPS: [`arch/mips/include/uapi/asm/ioctl.h`](https://github.com/torvalds/linux/blob/7c16f0a4ed1ce7b0dd1c01fc012e5bde89fe7748/arch/mips/include/uapi/asm/ioctl.h#L15)
/// * PowerPC: [`arch/powerpc/include/uapi/asm/ioctl.h`](https://github.com/torvalds/linux/blob/7c16f0a4ed1ce7b0dd1c01fc012e5bde89fe7748/arch/sparc/include/uapi/asm/ioctl.h#L22)
/// * SPARC: [`arch/sparc/include/uapi/asm/ioctl.h`](https://github.com/torvalds/linux/blob/7c16f0a4ed1ce7b0dd1c01fc012e5bde89fe7748/arch/sparc/include/uapi/asm/ioctl.h#L22)
/// * All others: [`include/uapi/asm-generic/ioctl.h`](https://github.com/torvalds/linux/blob/7c16f0a4ed1ce7b0dd1c01fc012e5bde89fe7748/include/uapi/asm-generic/ioctl.h#L36)
pub const IOC_DIRBITS: usize = 2;
/// Direction bit specifying no data is read or written.
///
/// For Alpha (not supported by Rust), MIPS, PowerPC, and SPARC, this is 1. For all other architectures, this is
/// 0 (no bits are set).
///
/// References:
/// * Alpha: [`arch/alpha/include/uapi/asm/ioctl.h`](https://github.com/torvalds/linux/blob/7c16f0a4ed1ce7b0dd1c01fc012e5bde89fe7748/arch/alpha/include/uapi/asm/ioctl.h#L36)
/// * MIPS: [`arch/mips/include/uapi/asm/ioctl.h`](https://github.com/torvalds/linux/blob/7c16f0a4ed1ce7b0dd1c01fc012e5bde89fe7748/arch/mips/include/uapi/asm/ioctl.h#L22)
/// * PowerPC: [`arch/powerpc/include/uapi/asm/ioctl.h`](https://github.com/torvalds/linux/blob/7c16f0a4ed1ce7b0dd1c01fc012e5bde89fe7748/arch/powerpc/include/uapi/asm/ioctl.h#L8)
/// * Sparc: [`arch/sparc/include/uapi/asm/ioctl.h`](https://github.com/torvalds/linux/blob/7c16f0a4ed1ce7b0dd1c01fc012e5bde89fe7748/arch/sparc/include/uapi/asm/ioctl.h#L35)
/// * All others: [`include/uapi/asm-generic/ioctl.h`](https://github.com/torvalds/linux/blob/7c16f0a4ed1ce7b0dd1c01fc012e5bde89fe7748/arch/sparc/include/uapi/asm/ioctl.h#L35)
pub const IOC_NONE: IoctlId = 1;
/// Direction bit specifying no data is read or written.
///
/// For Alpha (not supported by Rust), MIPS, PowerPC, and SPARC, this is 1. For all other architectures, this is
/// 0 (no bits are set).
///
/// References:
/// * Alpha: [`arch/alpha/include/uapi/asm/ioctl.h`](https://github.com/torvalds/linux/blob/7c16f0a4ed1ce7b0dd1c01fc012e5bde89fe7748/arch/alpha/include/uapi/asm/ioctl.h#L36)
/// * MIPS: [`arch/mips/include/uapi/asm/ioctl.h`](https://github.com/torvalds/linux/blob/7c16f0a4ed1ce7b0dd1c01fc012e5bde89fe7748/arch/mips/include/uapi/asm/ioctl.h#L22)
/// * PowerPC: [`arch/powerpc/include/uapi/asm/ioctl.h`](https://github.com/torvalds/linux/blob/7c16f0a4ed1ce7b0dd1c01fc012e5bde89fe7748/arch/powerpc/include/uapi/asm/ioctl.h#L8)
/// * Sparc: [`arch/sparc/include/uapi/asm/ioctl.h`](https://github.com/torvalds/linux/blob/7c16f0a4ed1ce7b0dd1c01fc012e5bde89fe7748/arch/sparc/include/uapi/asm/ioctl.h#L35)
/// * All others: [`include/uapi/asm-generic/ioctl.h`](https://github.com/torvalds/linux/blob/7c16f0a4ed1ce7b0dd1c01fc012e5bde89fe7748/include/uapi/asm-generic/ioctl.h#L58)
pub const IOC_NONE: IoctlId = 0;
/// Direction bit specifying data is read.
///
/// This is 2 on all platforms (except PA-RISC, which is not supported by Rust).
///
/// References:
/// * Alpha: [`arch/alpha/include/uapi/asm/ioctl.h`](https://github.com/torvalds/linux/blob/7c16f0a4ed1ce7b0dd1c01fc012e5bde89fe7748/arch/alpha/include/uapi/asm/ioctl.h#L37)
/// * MIPS: [`arch/mips/include/uapi/asm/ioctl.h`](https://github.com/torvalds/linux/blob/7c16f0a4ed1ce7b0dd1c01fc012e5bde89fe7748/arch/mips/include/uapi/asm/ioctl.h#L23)
/// * PowerPC: [`arch/powerpc/include/uapi/asm/ioctl.h`](https://github.com/torvalds/linux/blob/7c16f0a4ed1ce7b0dd1c01fc012e5bde89fe7748/arch/powerpc/include/uapi/asm/ioctl.h#L9)
/// * Sparc: [`arch/sparc/include/uapi/asm/ioctl.h`](https://github.com/torvalds/linux/blob/7c16f0a4ed1ce7b0dd1c01fc012e5bde89fe7748/arch/sparc/include/uapi/asm/ioctl.h#L36)
/// * All others: [`include/uapi/asm-generic/ioctl.h`](https://github.com/torvalds/linux/blob/7c16f0a4ed1ce7b0dd1c01fc012e5bde89fe7748/include/uapi/asm-generic/ioctl.h#L62)
pub const IOC_READ: IoctlId = 2;
/// Direction bit specifying data is written.
///
/// For Alpha (not supported by Rust), MIPS, PowerPC, and SPARC, this is 4. For PA-RISC (not supported by Rust), this
/// is 2. For all other architectures, this is 1.
///
/// References:
/// * Alpha: [`arch/alpha/include/uapi/asm/ioctl.h`](https://github.com/torvalds/linux/blob/7c16f0a4ed1ce7b0dd1c01fc012e5bde89fe7748/arch/alpha/include/uapi/asm/ioctl.h#L38)
/// * MIPS: [`arch/mips/include/uapi/asm/ioctl.h`](https://github.com/torvalds/linux/blob/7c16f0a4ed1ce7b0dd1c01fc012e5bde89fe7748/arch/mips/include/uapi/asm/ioctl.h#L24)
/// * PowerPC: [`arch/powerpc/include/uapi/asm/ioctl.h`](https://github.com/torvalds/linux/blob/7c16f0a4ed1ce7b0dd1c01fc012e5bde89fe7748/arch/powerpc/include/uapi/asm/ioctl.h#L10)
/// * Sparc: [`arch/sparc/include/uapi/asm/ioctl.h`](https://github.com/torvalds/linux/blob/7c16f0a4ed1ce7b0dd1c01fc012e5bde89fe7748/arch/sparc/include/uapi/asm/ioctl.h#L37)
/// * All others: [`include/uapi/asm-generic/ioctl.h`](https://github.com/torvalds/linux/blob/7c16f0a4ed1ce7b0dd1c01fc012e5bde89fe7748/include/uapi/asm-generic/ioctl.h#L66)
pub const IOC_WRITE: IoctlId = 4;
/// Direction bit specifying data is written.
///
/// For Alpha (not supported by Rust), MIPS, PowerPC, and SPARC, this is 4. For PA-RISC (not supported by Rust), this
/// is 2. For all other architectures, this is 1.
///
/// References:
/// * Alpha: [`arch/alpha/include/uapi/asm/ioctl.h`](https://github.com/torvalds/linux/blob/7c16f0a4ed1ce7b0dd1c01fc012e5bde89fe7748/arch/alpha/include/uapi/asm/ioctl.h#L38)
/// * MIPS: [`arch/mips/include/uapi/asm/ioctl.h`](https://github.com/torvalds/linux/blob/7c16f0a4ed1ce7b0dd1c01fc012e5bde89fe7748/arch/mips/include/uapi/asm/ioctl.h#L24)
/// * PowerPC: [`arch/powerpc/include/uapi/asm/ioctl.h`](https://github.com/torvalds/linux/blob/7c16f0a4ed1ce7b0dd1c01fc012e5bde89fe7748/arch/powerpc/include/uapi/asm/ioctl.h#L10)
/// * Sparc: [`arch/sparc/include/uapi/asm/ioctl.h`](https://github.com/torvalds/linux/blob/7c16f0a4ed1ce7b0dd1c01fc012e5bde89fe7748/arch/sparc/include/uapi/asm/ioctl.h#L37)
/// * All others: [`include/uapi/asm-generic/ioctl.h`](https://github.com/torvalds/linux/blob/7c16f0a4ed1ce7b0dd1c01fc012e5bde89fe7748/include/uapi/asm-generic/ioctl.h#L66)
pub const IOC_WRITE: IoctlId = 1;
/// Bitmask for valid `ioctl(2)` call identifiers.
///
/// This is applied to the unshifted call identifier.
///
/// Reference: [`include/uapi/asm-generic/ioctl.h`](https://github.com/torvalds/linux/blob/7c16f0a4ed1ce7b0dd1c01fc012e5bde89fe7748/include/uapi/asm-generic/ioctl.h#L39)
pub const IOC_NRMASK: IoctlId = - 1;
/// Bitmask for valid `ioctl(2)` type identifiers.
///
/// This is applied to the unshifted type identifier.
///
/// Reference: [`include/uapi/asm-generic/ioctl.h`](https://github.com/torvalds/linux/blob/7c16f0a4ed1ce7b0dd1c01fc012e5bde89fe7748/include/uapi/asm-generic/ioctl.h#L40)
pub const IOC_TYPEMASK: IoctlId = - 1;
/// Bitmask for valid `ioctl(2)` size values.
///
/// This is applied to the unshifted size value.
///
/// Reference: [`include/uapi/asm-generic/ioctl.h`](https://github.com/torvalds/linux/blob/7c16f0a4ed1ce7b0dd1c01fc012e5bde89fe7748/include/uapi/asm-generic/ioctl.h#L41)
pub const IOC_SIZEMASK: IoctlId = - 1;
/// Bitmask for valid `ioctl(2)` direction values.
///
/// This is applied to the unshifted direction value.
///
/// Reference: [`include/uapi/asm-generic/ioctl.h`](https://github.com/torvalds/linux/blob/7c16f0a4ed1ce7b0dd1c01fc012e5bde89fe7748/include/uapi/asm-generic/ioctl.h#L42)
pub const IOC_DIRMASK: IoctlId = - 1;
/// The number of bits to shift `ioctl(2)` call identifiers by.
///
/// Reference: [`include/uapi/asm-generic/ioctl.h`](https://github.com/torvalds/linux/blob/7c16f0a4ed1ce7b0dd1c01fc012e5bde89fe7748/include/uapi/asm-generic/ioctl.h#L44)
pub const IOC_NRSHIFT: usize = 0;
/// The number of bits to shift `ioctl(2)` type identifiers by.
///
/// Reference: [`include/uapi/asm-generic/ioctl.h`](https://github.com/torvalds/linux/blob/7c16f0a4ed1ce7b0dd1c01fc012e5bde89fe7748/include/uapi/asm-generic/ioctl.h#L45)
pub const IOC_TYPESHIFT: usize = IOC_NRSHIFT + IOC_NRBITS;
/// The number of bits to shift `ioctl(2)` size values by.
///
/// For SPARC, this is decremented by 1 to account for the overlap with the direction field.
///
/// Reference: [`include/uapi/asm-generic/ioctl.h`](https://github.com/torvalds/linux/blob/7c16f0a4ed1ce7b0dd1c01fc012e5bde89fe7748/include/uapi/asm-generic/ioctl.h#L46)
///
/// SPARC Reference: [`arch/sparc/include/uapi/asm/ioctl.h`](https://github.com/torvalds/linux/blob/7c16f0a4ed1ce7b0dd1c01fc012e5bde89fe7748/arch/sparc/include/uapi/asm/ioctl.h#L26-L32)
pub const IOC_SIZESHIFT: usize = IOC_TYPESHIFT + IOC_TYPEBITS - 1;
/// The number of bits to shift `ioctl(2)` size values by.
///
/// For SPARC, this is decremented by 1 to account for the overlap with the direction field.
///
/// Reference: [`include/uapi/asm-generic/ioctl.h`](https://github.com/torvalds/linux/blob/7c16f0a4ed1ce7b0dd1c01fc012e5bde89fe7748/include/uapi/asm-generic/ioctl.h#L46)
///
/// SPARC Reference: [`arch/sparc/include/uapi/asm/ioctl.h`](https://github.com/torvalds/linux/blob/7c16f0a4ed1ce7b0dd1c01fc012e5bde89fe7748/arch/sparc/include/uapi/asm/ioctl.h#L26-L32)
pub const IOC_SIZESHIFT: usize = IOC_TYPESHIFT + IOC_TYPEBITS;
/// The number of bits to shift `ioctl(2)` direction values by.
///
/// Reference: [`include/uapi/asm-generic/ioctl.h`](https://github.com/torvalds/linux/blob/7c16f0a4ed1ce7b0dd1c01fc012e5bde89fe7748/include/uapi/asm-generic/ioctl.h#L47)
pub const IOC_DIRSHIFT: usize = IOC_SIZESHIFT + IOC_SIZEBITS;
/// Create an `ioctl(2)` identifier from a direction value, type identifier,
/// call identifier, and size value.
///
/// Note that the order of the parameters does not match their shift values. This matches the definition of the
/// `_IOC()` macro from the C headers.
///
/// Reference: [`include/uapi/asm-generic/ioctl.h`](https://github.com/torvalds/linux/blob/7c16f0a4ed1ce7b0dd1c01fc012e5bde89fe7748/include/uapi/asm-generic/ioctl.h#L69-L73)
pub const
/// Create an `ioctl(2)` identifier for a call that passes no data.
///
/// This is the equivalent of the `_IO()` macro from the C headers.
///
/// Reference: [`include/uapi/asm-generic/ioctl.h`](https://github.com/torvalds/linux/blob/7c16f0a4ed1ce7b0dd1c01fc012e5bde89fe7748/include/uapi/asm-generic/ioctl.h#L85)
pub const
/// Create an `ioctl(2)` identifier for a call that reads data.
///
/// This is the equivalent of the `_IOR()` macro from the C headers. The type must be passed as a generic parameter
/// to this function.
///
/// Reference: [`include/uapi/asm-generic/ioctl.h`](https://github.com/torvalds/linux/blob/7c16f0a4ed1ce7b0dd1c01fc012e5bde89fe7748/include/uapi/asm-generic/ioctl.h#L86)
pub const
/// Create an `ioctl(2)` identifier for a call that writes data.
///
/// This is the equivalent of the `_IOW()` macro from the C headers. The type must be passed as a generic parameter
/// to this function.
///
/// Reference: [`include/uapi/asm-generic/ioctl.h`](https://github.com/torvalds/linux/blob/7c16f0a4ed1ce7b0dd1c01fc012e5bde89fe7748/include/uapi/asm-generic/ioctl.h#L86)
pub const
/// Create an `ioctl(2)` identifier for a call that reads and writes data.
///
/// This is the equivalent of the `_IOWR()` macro from the C headers. The type must be passed as a generic parameter
/// to this function.
///
/// Reference: [`include/uapi/asm-generic/ioctl.h`](https://github.com/torvalds/linux/blob/7c16f0a4ed1ce7b0dd1c01fc012e5bde89fe7748/include/uapi/asm-generic/ioctl.h#L87)
pub const
/// Decode the direction value from an `ioctl(2)` identifier.
///
/// This is the equivalent of the `_IOC_DIR()` macro from the C headers.
///
/// Reference: [`include/uapi/asm-generic/ioctl.h`](https://github.com/torvalds/linux/blob/7c16f0a4ed1ce7b0dd1c01fc012e5bde89fe7748/include/uapi/asm-generic/ioctl.h#L94)
pub const
/// Decode the type identifier from an `ioctl(2)` identifier.
///
/// This is the equivalent of the `_IOC_TYPE()` macro from the C headers.
///
/// Reference: [`include/uapi/asm-generic/ioctl.h`](https://github.com/torvalds/linux/blob/7c16f0a4ed1ce7b0dd1c01fc012e5bde89fe7748/include/uapi/asm-generic/ioctl.h#L95)
pub const
/// Decode the call identifier from an `ioctl(2)` identifier.
///
/// This is the equivalent of the `_IOC_NR()` macro from the C headers.
///
/// Reference: [`include/uapi/asm-generic/ioctl.h`](https://github.com/torvalds/linux/blob/7c16f0a4ed1ce7b0dd1c01fc012e5bde89fe7748/include/uapi/asm-generic/ioctl.h#L96)
pub const
/// Decode the size identifier from an `ioctl(2)` identifier.
///
/// This is the equivalent of the `_IOC_SIZE()` macro from the C headers.
///
/// Reference: [`include/uapi/asm-generic/ioctl.h`](https://github.com/torvalds/linux/blob/7c16f0a4ed1ce7b0dd1c01fc012e5bde89fe7748/include/uapi/asm-generic/ioctl.h#L97)
pub const