ioImpl
Function parameters
Parameters
- io_type:u8
- nr:u8
- IOT:type
Type definitions in this namespace
Types
- AT_SUN
- Extensions to the ELF auxiliary vector.
- AF_SUN
- ELF auxiliary vector flags.
- FILE_EVENT
- User watchable file events.
- lifreq
- IP interface request.
Functions in this namespace
Functions
= 0
Values
- GETCONTEXT
- = 0
- SETCONTEXT
- = 1
- GETUSTACK
- = 2
- SETUSTACK
- = 3
- SIOCGLIFINDEX
- = IOWR('i', 133, lifreq)
Source
Implementation
fn ioImpl(cmd: IoCtlCommand, io_type: u8, nr: u8, comptime IOT: type) i32 {
const size = @as(u32, @intCast(@as(u8, @truncate(@sizeOf(IOT))))) << 16;
const t = @as(u32, @intCast(io_type)) << 8;
return @as(i32, @bitCast(@intFromEnum(cmd) | size | t | nr));
}