pub struct LINUX_IOCTL;
linux
only.Expand description
Linux ioctl
constants.
Implementations§
Source§impl LINUX_IOCTL
§Get and set terminal attributes
impl LINUX_IOCTL
§Get and set terminal attributes
Sourcepub const TCGETS: c_ulong = 21_505u64
pub const TCGETS: c_ulong = 21_505u64
Get the current serial port settings.
Argument: struct termios *argp
Sourcepub const TCSETS: c_ulong = 21_506u64
pub const TCSETS: c_ulong = 21_506u64
Set the current serial port settings.
Argument: const struct termios *argp
Sourcepub const TCSETSW: c_ulong = 21_507u64
pub const TCSETSW: c_ulong = 21_507u64
Allow the output buffer to drain, and set the current serial port settings.
Argument: const struct termios *argp
Sourcepub const TCSETSF: c_ulong = 21_508u64
pub const TCSETSF: c_ulong = 21_508u64
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_778u64
pub const TCGETS2: c_ulong = 2_150_388_778u64
Get the current serial port settings. (termios2)
Argument: struct termios2 *argp
Sourcepub const TCSETS2: c_ulong = 1_076_646_955u64
pub const TCSETS2: c_ulong = 1_076_646_955u64
Set the current serial port settings. (termios2)
Argument: const struct termios2 *argp
Sourcepub const TCSETSW2: c_ulong = 1_076_646_956u64
pub const TCSETSW2: c_ulong = 1_076_646_956u64
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_957u64
pub const TCSETSF2: c_ulong = 1_076_646_957u64
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_509u64
pub const TCGETA: c_ulong = 21_509u64
Get the current serial port settings. (termio)
Argument: struct termio *argp
Sourcepub const TCSETA: c_ulong = 21_510u64
pub const TCSETA: c_ulong = 21_510u64
Set the current serial port settings. (termio)
Argument: const struct termio *argp
Source§impl LINUX_IOCTL
§Software flow control
impl LINUX_IOCTL
§Software flow control
Source§impl LINUX_IOCTL
§Exclusive mode
impl LINUX_IOCTL
§Exclusive mode
Source§impl LINUX_IOCTL
§Faking input
impl LINUX_IOCTL
§Faking input
Source§impl LINUX_IOCTL
§Get and set window size
impl LINUX_IOCTL
§Get and set window size
Sourcepub const TIOCGWINSZ: c_ulong = 21_523u64
pub const TIOCGWINSZ: c_ulong = 21_523u64
Get window size.
Argument: struct winsize *argp
Sourcepub const TIOCSWINSZ: c_ulong = 21_524u64
pub const TIOCSWINSZ: c_ulong = 21_524u64
Set window size.
Argument: const struct winsize *argp
Source§impl LINUX_IOCTL
§Modem control
impl LINUX_IOCTL
§Modem control
Sourcepub const TIOCMBIS: c_ulong = 21_526u64
pub const TIOCMBIS: c_ulong = 21_526u64
Set the indicated modem bits.
Argument: const int *argp
Sourcepub const TIOCMBIC: c_ulong = 21_527u64
pub const TIOCMBIC: c_ulong = 21_527u64
Clear the indicated modem bits.
Argument: const int *argp
Source§impl LINUX_IOCTL
§Marking a line as local
impl LINUX_IOCTL
§Marking a line as local
Sourcepub const TIOCGSOFTCAR: c_ulong = 21_529u64
pub const TIOCGSOFTCAR: c_ulong = 21_529u64
(“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_530u64
pub const TIOCSSOFTCAR: c_ulong = 21_530u64
(“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
§Buffer count and flushing
impl LINUX_IOCTL
§Buffer count and flushing
Sourcepub const TCFLSH: c_ulong = 21_515u64
pub const TCFLSH: c_ulong = 21_515u64
See tcflush(3) for the argument values TCIFLUSH
, TCOFLUSH
, TCIOFLUSH
.
Equivalent to tcflush(fd, arg).
Sourcepub const TIOCSERGETLSR: c_ulong = 21_593u64
pub const TIOCSERGETLSR: c_ulong = 21_593u64
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
§Linux-specific
impl LINUX_IOCTL
§Linux-specific
Sourcepub const TIOCLINUX: c_ulong = 21_532u64
pub const TIOCLINUX: c_ulong = 21_532u64
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
§Redirecting console output
impl LINUX_IOCTL
§Redirecting console output
Sourcepub const TIOCCONS: c_ulong = 21_533u64
pub const TIOCCONS: c_ulong = 21_533u64
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
§Pseudoterminal ioctls
impl LINUX_IOCTL
§Pseudoterminal ioctls
Sourcepub const TIOCPKT: c_ulong = 21_536u64
pub const TIOCPKT: c_ulong = 21_536u64
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_521u64
pub const TIOCSPTLCK: c_ulong = 1_074_025_521u64
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_352u64
pub const TIOCGPKT: c_ulong = 2_147_767_352u64
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_353u64
pub const TIOCGPTLCK: c_ulong = 2_147_767_353u64
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_569u64
pub const TIOCGPTPEER: c_ulong = 21_569u64
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
§Controlling terminal
impl LINUX_IOCTL
§Controlling terminal
Sourcepub const TIOCSCTTY: c_ulong = 21_518u64
pub const TIOCSCTTY: c_ulong = 21_518u64
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
§Line discipline
impl LINUX_IOCTL
§Line discipline
Source§impl LINUX_IOCTL
§Sending a break
impl LINUX_IOCTL
§Sending a break
Sourcepub const TCSBRK: c_ulong = 21_513u64
pub const TCSBRK: c_ulong = 21_513u64
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_541u64
pub const TCSBRKP: c_ulong = 21_541u64
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
§Process group and session ID
impl LINUX_IOCTL
§Process group and session ID
Sourcepub const TIOCGSID: c_ulong = 21_545u64
pub const TIOCGSID: c_ulong = 21_545u64
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
§Miscellaneous
impl LINUX_IOCTL
§Miscellaneous
Sourcepub const FIONBIO: c_ulong = 21_537u64
pub const FIONBIO: c_ulong = 21_537u64
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_534u64
pub const TIOCSSERIAL: c_ulong = 21_535u64
pub const TIOCGRS485: c_ulong = 21_550u64
pub const TIOCSRS485: c_ulong = 21_551u64
pub const TIOCGPTN: c_ulong = 2_147_767_344u64
pub const TIOCGDEV: c_ulong = 2_147_767_346u64
pub const TCGETX: c_ulong = 21_554u64
pub const TCSETX: c_ulong = 21_555u64
pub const TCSETXF: c_ulong = 21_556u64
pub const TCSETXW: c_ulong = 21_557u64
pub const TIOCSIG: c_ulong = 1_074_025_526u64
pub const TIOCVHANGUP: c_ulong = 21_559u64
pub const FIONCLEX: c_ulong = 21_584u64
pub const FIOCLEX: c_ulong = 21_585u64
pub const FIOASYNC: c_ulong = 21_586u64
pub const TIOCSERCONFIG: c_ulong = 21_587u64
pub const TIOCSERGWILD: c_ulong = 21_588u64
pub const TIOCSERSWILD: c_ulong = 21_589u64
pub const TIOCGLCKTRMIOS: c_ulong = 21_590u64
pub const TIOCSLCKTRMIOS: c_ulong = 21_591u64
pub const TIOCSERGSTRUCT: c_ulong = 21_592u64
pub const TIOCSERGETMULTI: c_ulong = 21_594u64
pub const TIOCSERSETMULTI: c_ulong = 21_595u64
pub const TIOCMIWAIT: c_ulong = 21_596u64
pub const TIOCGICOUNT: c_ulong = 21_597u64
pub const BLKIOMIN: c_ulong = 4_728u64
pub const BLKIOOPT: c_ulong = 4_729u64
pub const BLKSSZGET: c_ulong = 4_712u64
pub const BLKPBSZGET: c_ulong = 4_731u64
Auto Trait Implementations§
impl Freeze for LINUX_IOCTL
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§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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> ByteSized for T
impl<T> ByteSized for T
Source§const BYTE_ALIGN: usize = _
const BYTE_ALIGN: usize = _
Source§fn byte_align(&self) -> usize ⓘ
fn byte_align(&self) -> usize ⓘ
Source§fn ptr_size_ratio(&self) -> [usize; 2]
fn ptr_size_ratio(&self) -> [usize; 2]
Source§impl<T, R> Chain<R> for Twhere
T: ?Sized,
impl<T, R> Chain<R> for Twhere
T: ?Sized,
Source§impl<T> ExtAny for T
impl<T> ExtAny for T
Source§fn as_any_mut(&mut self) -> &mut dyn Anywhere
Self: Sized,
fn as_any_mut(&mut self) -> &mut dyn Anywhere
Self: Sized,
Source§impl<T> ExtMem for Twhere
T: ?Sized,
impl<T> ExtMem for Twhere
T: ?Sized,
Source§const NEEDS_DROP: bool = _
const NEEDS_DROP: bool = _
Source§fn mem_align_of_val(&self) -> usize ⓘ
fn mem_align_of_val(&self) -> usize ⓘ
Source§fn mem_size_of_val(&self) -> usize ⓘ
fn mem_size_of_val(&self) -> usize ⓘ
Source§fn mem_needs_drop(&self) -> bool
fn mem_needs_drop(&self) -> bool
true
if dropping values of this type matters. Read moreSource§fn mem_forget(self)where
Self: Sized,
fn mem_forget(self)where
Self: Sized,
self
without running its destructor. Read moreSource§fn mem_replace(&mut self, other: Self) -> Selfwhere
Self: Sized,
fn mem_replace(&mut self, other: Self) -> Selfwhere
Self: Sized,
Source§unsafe fn mem_zeroed<T>() -> T
unsafe fn mem_zeroed<T>() -> T
unsafe_layout
only.T
represented by the all-zero byte-pattern. Read moreSource§unsafe fn mem_transmute_copy<Src, Dst>(src: &Src) -> Dst
unsafe fn mem_transmute_copy<Src, Dst>(src: &Src) -> Dst
unsafe_layout
only.T
represented by the all-zero byte-pattern. Read moreSource§fn mem_as_bytes(&self) -> &[u8] ⓘ
fn mem_as_bytes(&self) -> &[u8] ⓘ
unsafe_slice
only.§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> Hook for T
impl<T> Hook for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError> ⓘ
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError> ⓘ
§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out
indicating that a T
is niched.