Struct devela::os::linux::LINUX_IOCTL
source · pub struct LINUX_IOCTL;
linux
only.Expand description
Linux ioctl
constants.
Implementations§
source§impl LINUX_IOCTL
impl LINUX_IOCTL
sourcepub const TCGETS: c_ulong = 21_505u32
pub const TCGETS: c_ulong = 21_505u32
Get the current serial port settings.
Argument: struct termios *argp
sourcepub const TCSETS: c_ulong = 21_506u32
pub const TCSETS: c_ulong = 21_506u32
Set the current serial port settings.
Argument: const struct termios *argp
sourcepub const TCSETSW: c_ulong = 21_507u32
pub const TCSETSW: c_ulong = 21_507u32
Allow the output buffer to drain, and set the current serial port settings.
Argument: const struct termios *argp
sourcepub const TCSETSF: c_ulong = 21_508u32
pub const TCSETSF: c_ulong = 21_508u32
Allow the output buffer to drain, discard pending input, and set the current serial port settings.
Argument: const struct termios *argp
sourcepub const TCGETS2: c_ulong = 2_150_388_778u32
pub const TCGETS2: c_ulong = 2_150_388_778u32
Get the current serial port settings. (termios2)
Argument: struct termios2 *argp
sourcepub const TCSETS2: c_ulong = 1_076_646_955u32
pub const TCSETS2: c_ulong = 1_076_646_955u32
Set the current serial port settings. (termios2)
Argument: const struct termios2 *argp
sourcepub const TCSETSW2: c_ulong = 1_076_646_956u32
pub const TCSETSW2: c_ulong = 1_076_646_956u32
Allow the output buffer to drain, and set the current serial port settings. (termios2)
Argument: const struct termios2 *argp
sourcepub const TCSETSF2: c_ulong = 1_076_646_957u32
pub const TCSETSF2: c_ulong = 1_076_646_957u32
Allow the output buffer to drain, discard pending input, and set the current serial port settings. (termios2)
Argument: const struct termios2 *argp
sourcepub const TCGETA: c_ulong = 21_509u32
pub const TCGETA: c_ulong = 21_509u32
Get the current serial port settings. (termio)
Argument: struct termio *argp
sourcepub const TCSETA: c_ulong = 21_510u32
pub const TCSETA: c_ulong = 21_510u32
Set the current serial port settings. (termio)
Argument: const struct termio *argp
source§impl LINUX_IOCTL
impl LINUX_IOCTL
source§impl LINUX_IOCTL
impl LINUX_IOCTL
source§impl LINUX_IOCTL
impl LINUX_IOCTL
source§impl LINUX_IOCTL
impl LINUX_IOCTL
sourcepub const TIOCGWINSZ: c_ulong = 21_523u32
pub const TIOCGWINSZ: c_ulong = 21_523u32
Get window size.
Argument: struct winsize *argp
sourcepub const TIOCSWINSZ: c_ulong = 21_524u32
pub const TIOCSWINSZ: c_ulong = 21_524u32
Set window size.
Argument: const struct winsize *argp
source§impl LINUX_IOCTL
impl LINUX_IOCTL
sourcepub const TIOCMBIS: c_ulong = 21_526u32
pub const TIOCMBIS: c_ulong = 21_526u32
Set the indicated modem bits.
Argument: const int *argp
sourcepub const TIOCMBIC: c_ulong = 21_527u32
pub const TIOCMBIC: c_ulong = 21_527u32
Clear the indicated modem bits.
Argument: const int *argp
source§impl LINUX_IOCTL
impl LINUX_IOCTL
sourcepub const TIOCGSOFTCAR: c_ulong = 21_529u32
pub const TIOCGSOFTCAR: c_ulong = 21_529u32
(“Get software carrier flag”)
Get the status of the CLOCAL
flag in the c_cflag
field of the termios
structure.
Argument: int *argp
sourcepub const TIOCSSOFTCAR: c_ulong = 21_530u32
pub const TIOCSSOFTCAR: c_ulong = 21_530u32
(“Set software carrier flag”)
Set the CLOCAL
flag in the termios structure when *argp
is nonzero, and
clear it otherwise.
Argument: const int *argp
source§impl LINUX_IOCTL
impl LINUX_IOCTL
sourcepub const TCFLSH: c_ulong = 21_515u32
pub const TCFLSH: c_ulong = 21_515u32
See tcflush(3) for the argument values TCIFLUSH
, TCOFLUSH
, TCIOFLUSH
.
Equivalent to tcflush(fd, arg).
sourcepub const TIOCSERGETLSR: c_ulong = 21_593u32
pub const TIOCSERGETLSR: c_ulong = 21_593u32
Get line status register.
Status register has TIOCSER_TEMT
bit set when output buffer is empty and
also hardware transmitter is physically empty.
source§impl LINUX_IOCTL
impl LINUX_IOCTL
sourcepub const TIOCLINUX: c_ulong = 21_532u32
pub const TIOCLINUX: c_ulong = 21_532u32
Linux-specific ioctls.
The action of the following ioctls depends on the first byte in the struct pointed to by argp, referred to here as the subcode. These are legal only for the superuser or the owner of the current terminal. Symbolic subcodes are available in <linux/tiocl.h> since Linux 2.5.71.
See https://man7.org/linux/man-pages/man2/ioctl_console.2.html.
source§impl LINUX_IOCTL
impl LINUX_IOCTL
sourcepub const TIOCCONS: c_ulong = 21_533u32
pub const TIOCCONS: c_ulong = 21_533u32
Redirect output that would have gone to /dev/console
or /dev/tty0
to
the given terminal.
Argument: void
If that was a pseudoterminal master, send it to the slave. Before Linux
2.6.10, anybody can do this as long as the output was not redirected
yet; since Linux 2.6.10, only a process with the CAP_SYS_ADMIN
capability may do this. If output was redirected already, then EBUSY is
returned, but redirection can be stopped by using this ioctl with fd
pointing at /dev/console or /dev/tty0.
source§impl LINUX_IOCTL
impl LINUX_IOCTL
sourcepub const TIOCPKT: c_ulong = 21_536u32
pub const TIOCPKT: c_ulong = 21_536u32
Enable (when *argp is nonzero) or disable packet mode.
Argument: const int *argp
Can be applied to the master side of a pseudoterminal only (and will return ENOTTY otherwise).
In packet mode, each subsequent read(2) will return a packet that either contains a single nonzero control byte, or has a single byte containing zero (‘\0’) followed by data written on the slave side of the pseudoterminal.
If the first byte is not TIOCPKT_DATA (0), it is an OR of one or more of the following bits:
TIOCPKT_FLUSHREAD
The read queue for the terminal is flushed.TIOCPKT_FLUSHWRITE
The write queue for the terminal is flushed.TIOCPKT_STOP
Output to the terminal is stopped.TIOCPKT_START
Output to the terminal is restarted.TIOCPKT_DOSTOP
The start and stop characters are ^S/^Q.TIOCPKT_NOSTOP
The start and stop characters are not ^S/^Q.
sourcepub const TIOCSPTLCK: c_ulong = 1_074_025_521u32
pub const TIOCSPTLCK: c_ulong = 1_074_025_521u32
Set (if *argp is nonzero) or remove (if *argp is zero) the lock on the pseudoterminal slave device.
Argument: int *argp
sourcepub const TIOCGPKT: c_ulong = 2_147_767_352u32
pub const TIOCGPKT: c_ulong = 2_147_767_352u32
Return the current packet mode setting in the integer pointed to by argp.
Argument: const int *argp
sourcepub const TIOCGPTLCK: c_ulong = 2_147_767_353u32
pub const TIOCGPTLCK: c_ulong = 2_147_767_353u32
Place the current lock state of the pseudoterminal slave device in the location pointed to by argp.
Argument: int *argp
sourcepub const TIOCGPTPEER: c_ulong = 21_569u32
pub const TIOCGPTPEER: c_ulong = 21_569u32
Open and return a new file descriptor that refers to the peer pseudoterminal slave device.
Argument: int flags
Given a file descriptor in fd that refers to a pseudoterminal master, open (with the given open(2)-style flags) and return a new file descriptor that refers to the peer pseudoterminal slave device.
This operation can be performed regardless of whether the pathname of the slave device is accessible through the calling process’s mount namespace.
source§impl LINUX_IOCTL
impl LINUX_IOCTL
sourcepub const TIOCSCTTY: c_ulong = 21_518u32
pub const TIOCSCTTY: c_ulong = 21_518u32
Make the given terminal the controlling terminal of the calling process.
Argument: int arg
The calling process must be a session leader and not have a controlling terminal already. For this case, arg should be specified as zero.
If this terminal is already the controlling terminal of a different
session group, then the ioctl fails with EPERM
, unless the caller has
the CAP_SYS_ADMIN
capability and arg equals 1, in which case the
terminal is stolen, and all processes that had it as controlling
terminal lose it.
source§impl LINUX_IOCTL
impl LINUX_IOCTL
source§impl LINUX_IOCTL
impl LINUX_IOCTL
sourcepub const TCSBRK: c_ulong = 21_513u32
pub const TCSBRK: c_ulong = 21_513u32
Equivalent to tcsendbreak(fd, arg).
Argument: int arg
If the terminal is using asynchronous serial data transmission, and arg is zero, then send a break (a stream of zero bits) for between 0.25 and 0.5 seconds. If the terminal is not using asynchronous serial data transmission, then either a break is sent, or the function returns without doing anything. When arg is nonzero, nobody knows what will happen.
sourcepub const TCSBRKP: c_ulong = 21_541u32
pub const TCSBRKP: c_ulong = 21_541u32
So-called “POSIX version” of TCSBRK
.
It treats nonzero arg as a time interval measured in deciseconds, and does nothing when the driver does not support breaks.
Argument: int arg
source§impl LINUX_IOCTL
impl LINUX_IOCTL
sourcepub const TIOCGSID: c_ulong = 21_545u32
pub const TIOCGSID: c_ulong = 21_545u32
Get the session ID of the given terminal.
Argument: pid_t *argp
This fails with the error ENOTTY
if the terminal is not a master
pseudoterminal and not our controlling terminal.
source§impl LINUX_IOCTL
impl LINUX_IOCTL
sourcepub const FIONBIO: c_ulong = 21_537u32
pub const FIONBIO: c_ulong = 21_537u32
Set non-blocking I/O mode if the argument is non-zero.
In non-blocking mode, read(2) or write(2) calls return -1 and set errno to
EAGAIN
immediately when no data is available.
pub const TIOCGSERIAL: c_ulong = 21_534u32
pub const TIOCSSERIAL: c_ulong = 21_535u32
pub const TIOCGRS485: c_ulong = 21_550u32
pub const TIOCSRS485: c_ulong = 21_551u32
pub const TIOCGPTN: c_ulong = 2_147_767_344u32
pub const TIOCGDEV: c_ulong = 2_147_767_346u32
pub const TCGETX: c_ulong = 21_554u32
pub const TCSETX: c_ulong = 21_555u32
pub const TCSETXF: c_ulong = 21_556u32
pub const TCSETXW: c_ulong = 21_557u32
pub const TIOCSIG: c_ulong = 1_074_025_526u32
pub const TIOCVHANGUP: c_ulong = 21_559u32
pub const FIONCLEX: c_ulong = 21_584u32
pub const FIOCLEX: c_ulong = 21_585u32
pub const FIOASYNC: c_ulong = 21_586u32
pub const TIOCSERCONFIG: c_ulong = 21_587u32
pub const TIOCSERGWILD: c_ulong = 21_588u32
pub const TIOCSERSWILD: c_ulong = 21_589u32
pub const TIOCGLCKTRMIOS: c_ulong = 21_590u32
pub const TIOCSLCKTRMIOS: c_ulong = 21_591u32
pub const TIOCSERGSTRUCT: c_ulong = 21_592u32
pub const TIOCSERGETMULTI: c_ulong = 21_594u32
pub const TIOCSERSETMULTI: c_ulong = 21_595u32
pub const TIOCMIWAIT: c_ulong = 21_596u32
pub const TIOCGICOUNT: c_ulong = 21_597u32
pub const BLKIOMIN: c_ulong = 4_728u32
pub const BLKIOOPT: c_ulong = 4_729u32
pub const BLKSSZGET: c_ulong = 4_712u32
pub const BLKPBSZGET: c_ulong = 4_731u32
Auto Trait Implementations§
impl RefUnwindSafe for LINUX_IOCTL
impl Send for LINUX_IOCTL
impl Sync for LINUX_IOCTL
impl Unpin for LINUX_IOCTL
impl UnwindSafe for LINUX_IOCTL
Blanket Implementations§
source§impl<T> Also for T
impl<T> Also for T
source§impl<T> AnyExt for Twhere
T: Any,
impl<T> AnyExt for Twhere T: Any,
source§fn type_name(&self) -> &'static str
fn type_name(&self) -> &'static str
any
only.self
. Read moresource§fn as_any_ref(&self) -> &dyn Anywhere
Self: Sized,
fn as_any_ref(&self) -> &dyn Anywhere Self: Sized,
any
only.source§fn as_any_mut(&mut self) -> &mut dyn Anywhere
Self: Sized,
fn as_any_mut(&mut self) -> &mut dyn Anywhere Self: Sized,
any
only.source§impl<T, Res> Apply<Res> for Twhere
T: ?Sized,
impl<T, Res> Apply<Res> for Twhere T: ?Sized,
source§fn apply<F: FnOnce(Self) -> Res>(self, f: F) -> Reswhere
Self: Sized,
fn apply<F: FnOnce(Self) -> Res>(self, f: F) -> Reswhere Self: Sized,
result
only.source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where T: CheckedCast<Dst>,
source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere Src: CheckedCast<Dst>,
source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
source§impl<T> Mem for Twhere
T: ?Sized,
impl<T> Mem for Twhere T: ?Sized,
source§const NEEDS_DROP: bool = _
const NEEDS_DROP: bool = _
mem
only.source§fn mem_needs_drop(&self) -> bool
fn mem_needs_drop(&self) -> bool
mem
only.true
if dropping values of this type matters.source§fn mem_drop(self)where
Self: Sized,
fn mem_drop(self)where Self: Sized,
mem
only.self
by running its destructor.source§fn mem_forget(self)where
Self: Sized,
fn mem_forget(self)where Self: Sized,
mem
only.self
without running its destructor.source§fn mem_replace(&mut self, other: Self) -> Selfwhere
Self: Sized,
fn mem_replace(&mut self, other: Self) -> Selfwhere Self: Sized,
mem
only.self
with other, returning the previous value of self
.source§fn mem_take(&mut self) -> Selfwhere
Self: Default,
fn mem_take(&mut self) -> Selfwhere Self: Default,
mem
only.self
with its default value, returning the previous value of self
.source§fn mem_swap(&mut self, other: &mut Self)where
Self: Sized,
fn mem_swap(&mut self, other: &mut Self)where Self: Sized,
mem
only.self
and other
without deinitializing either one.source§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where T: OverflowingCast<Dst>,
source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere Src: OverflowingCast<Dst>,
source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere T: SaturatingCast<Dst>,
source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere Src: SaturatingCast<Dst>,
source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
source§impl<T> Size for T
impl<T> Size for T
source§const BYTE_ALIGN: usize = _
const BYTE_ALIGN: usize = _
mem
only.source§const BYTE_SIZE: usize = _
const BYTE_SIZE: usize = _
mem
only.source§const PTR_SIZE: usize = 4usize
const PTR_SIZE: usize = 4usize
mem
only.source§fn byte_align(&self) -> usize
fn byte_align(&self) -> usize
mem
only.