// IoctlRetInt performs an ioctl operation specified by req on a device // associated with opened file descriptor fd, and returns a non-negative // integer that is returned by the ioctl syscall. func IoctlRetInt(fd int, req uint) (int, error) { … } func IoctlGetUint32(fd int, req uint) (uint32, error) { … } func IoctlGetRTCTime(fd int) (*RTCTime, error) { … } func IoctlSetRTCTime(fd int, value *RTCTime) error { … } func IoctlGetRTCWkAlrm(fd int) (*RTCWkAlrm, error) { … } func IoctlSetRTCWkAlrm(fd int, value *RTCWkAlrm) error { … } // IoctlGetEthtoolDrvinfo fetches ethtool driver information for the network // device specified by ifname. func IoctlGetEthtoolDrvinfo(fd int, ifname string) (*EthtoolDrvinfo, error) { … } // IoctlGetWatchdogInfo fetches information about a watchdog device from the // Linux watchdog API. For more information, see: // https://www.kernel.org/doc/html/latest/watchdog/watchdog-api.html. func IoctlGetWatchdogInfo(fd int) (*WatchdogInfo, error) { … } // IoctlWatchdogKeepalive issues a keepalive ioctl to a watchdog device. For // more information, see: // https://www.kernel.org/doc/html/latest/watchdog/watchdog-api.html. func IoctlWatchdogKeepalive(fd int) error { … } // IoctlFileCloneRange performs an FICLONERANGE ioctl operation to clone the // range of data conveyed in value to the file associated with the file // descriptor destFd. See the ioctl_ficlonerange(2) man page for details. func IoctlFileCloneRange(destFd int, value *FileCloneRange) error { … } // IoctlFileClone performs an FICLONE ioctl operation to clone the entire file // associated with the file description srcFd to the file associated with the // file descriptor destFd. See the ioctl_ficlone(2) man page for details. func IoctlFileClone(destFd, srcFd int) error { … } type FileDedupeRange … type FileDedupeRangeInfo … // IoctlFileDedupeRange performs an FIDEDUPERANGE ioctl operation to share the // range of data conveyed in value from the file associated with the file // descriptor srcFd to the value.Info destinations. See the // ioctl_fideduperange(2) man page for details. func IoctlFileDedupeRange(srcFd int, value *FileDedupeRange) error { … } func IoctlHIDGetDesc(fd int, value *HIDRawReportDescriptor) error { … } func IoctlHIDGetRawInfo(fd int) (*HIDRawDevInfo, error) { … } func IoctlHIDGetRawName(fd int) (string, error) { … } func IoctlHIDGetRawPhys(fd int) (string, error) { … } func IoctlHIDGetRawUniq(fd int) (string, error) { … } // IoctlIfreq performs an ioctl using an Ifreq structure for input and/or // output. See the netdevice(7) man page for details. func IoctlIfreq(fd int, req uint, value *Ifreq) error { … } // ioctlIfreqData performs an ioctl using an ifreqData structure for input // and/or output. See the netdevice(7) man page for details. func ioctlIfreqData(fd int, req uint, value *ifreqData) error { … } // IoctlKCMClone attaches a new file descriptor to a multiplexor by cloning an // existing KCM socket, returning a structure containing the file descriptor of // the new socket. func IoctlKCMClone(fd int) (*KCMClone, error) { … } // IoctlKCMAttach attaches a TCP socket and associated BPF program file // descriptor to a multiplexor. func IoctlKCMAttach(fd int, info KCMAttach) error { … } // IoctlKCMUnattach unattaches a TCP socket file descriptor from a multiplexor. func IoctlKCMUnattach(fd int, info KCMUnattach) error { … } // IoctlLoopGetStatus64 gets the status of the loop device associated with the // file descriptor fd using the LOOP_GET_STATUS64 operation. func IoctlLoopGetStatus64(fd int) (*LoopInfo64, error) { … } // IoctlLoopSetStatus64 sets the status of the loop device associated with the // file descriptor fd using the LOOP_SET_STATUS64 operation. func IoctlLoopSetStatus64(fd int, value *LoopInfo64) error { … } // IoctlLoopConfigure configures all loop device parameters in a single step func IoctlLoopConfigure(fd int, value *LoopConfig) error { … }