Documentation
¶
Overview ¶
Package ioctl provides facilities to define ioctl numbers and perform ioctls against file descriptors.
The Name field on all ioctl types is optional. If a name is specified, the name will be included in error messages returned by method calls.
In case of errors, all method calls return errors of type Error.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Error ¶ added in v0.3.0
type Error struct {
// Name is the name of the ioctl, e.g. "KVM_CREATE_VM".
//
// This field may be empty, in which case it is not included in the
// error message.
Name string
// Number is the 32 bit ioctl number. It is rendered in hexadecimal
// in the error message.
Number uint32
// Err is the underlying error, of type syscall.Errno.
Err error
}
Error records an error from an ioctl(2) system call.
type N ¶
N specifies an ioctl that does not exchange data with the kernel through a pointer. An N can nevertheless have an integer argument.
func (N) ExecInt ¶ added in v0.7.0
ExecInt executes n against fd with the integer argument val.
type R ¶
R specifies a read ioctl: information is passed from kernel to userspace.
func (R) Number ¶ added in v0.4.0
Number returns the ioctl number associated with r.
type W ¶
W specifies a write ioctl: information is passed from userspace into the kernel.
func (W) Number ¶ added in v0.4.0
Number returns the ioctl number associated with w.
Source Files
¶
- ioctl.go
- ioctl_14_2.go