Module ioctl

Source
Expand description

Unsafe ioctl API.

Unix systems expose a number of ioctl’s. ioctls have been adopted as a general purpose system call for making calls into the kernel. In addition to the wide variety of system calls that are included by default in the kernel, many drivers expose their own ioctl’s for controlling their behavior, some of which are proprietary. Therefore it is impossible to make a safe interface for every ioctl call, as they all have wildly varying semantics.

This module provides an unsafe interface to write your own ioctl API. To start, create a type that implements Ioctl. Then, pass it to ioctl to make the ioctl call.

Structs§

BadOpcode
Provides a bad opcode at compile time.
Getter
Implements the traditional “getter” pattern for ioctls.
IntegerSetter
Implements an ioctl that passes an integer into the ioctl.
NoArg
Implements an ioctl with no real arguments.
NoneOpcode
Provides a None code at compile time.
Opcode
The opcode used by an Ioctl.
ReadOpcode
Provides a read code at compile time.
ReadWriteOpcode
Provides a read/write code at compile time.
Setter
Implements the pattern for ioctls where a pointer argument is given to the ioctl.
Updater
Implements an “updater” pattern for ioctls.
WriteOpcode
Provides a write code at compile time.

Enums§

Direction
The direction that an ioctl is going.

Traits§

CompileTimeOpcode
Trait for something that provides an ioctl opcode at compile time.
Ioctl
A trait defining the properties of an ioctl command.

Functions§

ioctl
Perform an ioctl call.

Type Aliases§

IoctlOutput
The type used by the ioctl to signify the output.
RawOpcode
The type used by the ioctl to signify the command.