pub struct LINUX_IOCTL;linux only.Expand description
Implementationsยง
Sourceยงimpl LINUX_IOCTL
ยงGet and set terminal attributes
impl LINUX_IOCTL
ยงGet and set terminal attributes
Sourcepub const TCGETS: c_ulong = 0x5401
pub const TCGETS: c_ulong = 0x5401
Get the current serial port settings.
Argument: struct termios *argp
Sourcepub const TCSETS: c_ulong = 0x5402
pub const TCSETS: c_ulong = 0x5402
Set the current serial port settings.
Argument: const struct termios *argp
Sourcepub const TCSETSW: c_ulong = 0x5403
pub const TCSETSW: c_ulong = 0x5403
Allow the output buffer to drain, and set the current serial port settings.
Argument: const struct termios *argp
Sourcepub const TCSETSF: c_ulong = 0x5404
pub const TCSETSF: c_ulong = 0x5404
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 = 0x802c_542a
pub const TCGETS2: c_ulong = 0x802c_542a
Get the current serial port settings. (termios2)
Argument: struct termios2 *argp
Sourcepub const TCSETS2: c_ulong = 0x402c_542b
pub const TCSETS2: c_ulong = 0x402c_542b
Set the current serial port settings. (termios2)
Argument: const struct termios2 *argp
Sourcepub const TCSETSW2: c_ulong = 0x402c_542c
pub const TCSETSW2: c_ulong = 0x402c_542c
Allow the output buffer to drain, and set the current serial port settings. (termios2)
Argument: const struct termios2 *argp
Sourcepub const TCSETSF2: c_ulong = 0x402c_542d
pub const TCSETSF2: c_ulong = 0x402c_542d
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 = 0x5405
pub const TCGETA: c_ulong = 0x5405
Get the current serial port settings. (termio)
Argument: struct termio *argp
Sourcepub const TCSETA: c_ulong = 0x5406
pub const TCSETA: c_ulong = 0x5406
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 = 0x5413
pub const TIOCGWINSZ: c_ulong = 0x5413
Get window size.
Argument: struct winsize *argp
Sourcepub const TIOCSWINSZ: c_ulong = 0x5414
pub const TIOCSWINSZ: c_ulong = 0x5414
Set window size.
Argument: const struct winsize *argp
Sourceยงimpl LINUX_IOCTL
ยงModem control
impl LINUX_IOCTL
ยงModem control
Sourceยงimpl LINUX_IOCTL
ยงMarking a line as local
impl LINUX_IOCTL
ยงMarking a line as local
Sourcepub const TIOCGSOFTCAR: c_ulong = 0x5419
pub const TIOCGSOFTCAR: c_ulong = 0x5419
(โ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 = 0x541A
pub const TIOCSSOFTCAR: c_ulong = 0x541A
(โ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 = 0x540B
pub const TCFLSH: c_ulong = 0x540B
See tcflush(3) for the argument values TCIFLUSH, TCOFLUSH, TCIOFLUSH.
Equivalent to tcflush(fd, arg).
Sourcepub const TIOCSERGETLSR: c_ulong = 0x5459
pub const TIOCSERGETLSR: c_ulong = 0x5459
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 = 0x541C
pub const TIOCLINUX: c_ulong = 0x541C
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 = 0x541D
pub const TIOCCONS: c_ulong = 0x541D
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 = 0x5420
pub const TIOCPKT: c_ulong = 0x5420
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_FLUSHREADThe read queue for the terminal is flushed.TIOCPKT_FLUSHWRITEThe write queue for the terminal is flushed.TIOCPKT_STOPOutput to the terminal is stopped.TIOCPKT_STARTOutput to the terminal is restarted.TIOCPKT_DOSTOPThe start and stop characters are ^S/^Q.TIOCPKT_NOSTOPThe start and stop characters are not ^S/^Q.
Sourcepub const TIOCSPTLCK: c_ulong = 0x4004_5431
pub const TIOCSPTLCK: c_ulong = 0x4004_5431
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 = 0x8004_5438
pub const TIOCGPKT: c_ulong = 0x8004_5438
Return the current packet mode setting in the integer pointed to by argp.
Argument: const int *argp
Sourcepub const TIOCGPTLCK: c_ulong = 0x8004_5439
pub const TIOCGPTLCK: c_ulong = 0x8004_5439
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 = 0x5441
pub const TIOCGPTPEER: c_ulong = 0x5441
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 = 0x540E
pub const TIOCSCTTY: c_ulong = 0x540E
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 = 0x5409
pub const TCSBRK: c_ulong = 0x5409
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 = 0x5425
pub const TCSBRKP: c_ulong = 0x5425
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 = 0x5429
pub const TIOCGSID: c_ulong = 0x5429
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 = 0x5421
pub const FIONBIO: c_ulong = 0x5421
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 = 0x541E
pub const TIOCSSERIAL: c_ulong = 0x541F
pub const TIOCGRS485: c_ulong = 0x542E
pub const TIOCSRS485: c_ulong = 0x542F
pub const TIOCGPTN: c_ulong = 0x8004_5430
pub const TIOCGDEV: c_ulong = 0x8004_5432
pub const TCGETX: c_ulong = 0x5432
pub const TCSETX: c_ulong = 0x5433
pub const TCSETXF: c_ulong = 0x5434
pub const TCSETXW: c_ulong = 0x5435
pub const TIOCSIG: c_ulong = 0x4004_5436
pub const TIOCVHANGUP: c_ulong = 0x5437
pub const FIONCLEX: c_ulong = 0x5450
pub const FIOCLEX: c_ulong = 0x5451
pub const FIOASYNC: c_ulong = 0x5452
pub const TIOCSERCONFIG: c_ulong = 0x5453
pub const TIOCSERGWILD: c_ulong = 0x5454
pub const TIOCSERSWILD: c_ulong = 0x5455
pub const TIOCGLCKTRMIOS: c_ulong = 0x5456
pub const TIOCSLCKTRMIOS: c_ulong = 0x5457
pub const TIOCSERGSTRUCT: c_ulong = 0x5458
pub const TIOCSERGETMULTI: c_ulong = 0x545A
pub const TIOCSERSETMULTI: c_ulong = 0x545B
pub const TIOCMIWAIT: c_ulong = 0x545C
pub const TIOCGICOUNT: c_ulong = 0x545D
pub const BLKIOMIN: c_ulong = 0x1278
pub const BLKIOOPT: c_ulong = 0x1279
pub const BLKSSZGET: c_ulong = 0x1268
pub const BLKPBSZGET: c_ulong = 0x127B
Trait Implementationsยง
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 UnsafeUnpin for LINUX_IOCTL
impl UnwindSafe for LINUX_IOCTL
Blanket Implementationsยง
Sourceยงimpl<T> AnyExt for T
impl<T> AnyExt for T
Sourceยงfn type_hash_with<H: Hasher>(&self, hasher: H) -> u64
fn type_hash_with<H: Hasher>(&self, hasher: H) -> u64
TypeId of Self using a custom hasher.Sourceยงfn as_any_mut(&mut self) -> &mut dyn Anywhere
Self: Sized,
fn as_any_mut(&mut self) -> &mut dyn Anywhere
Self: Sized,
Sourceยงfn as_any_box(self: Box<Self>) -> Box<dyn Any>where
Self: Sized,
fn as_any_box(self: Box<Self>) -> Box<dyn Any>where
Self: Sized,
alloc 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> 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> MemExt for Twhere
T: ?Sized,
impl<T> MemExt for Twhere
T: ?Sized,
Sourceยงconst NEEDS_DROP: bool = _
const NEEDS_DROP: bool = _
Sourceยงfn mem_align_of<T>() -> usize
fn mem_align_of<T>() -> usize
Sourceยงfn mem_align_of_val(&self) -> usize
fn mem_align_of_val(&self) -> usize
Sourceยงfn mem_size_of<T>() -> usize
fn mem_size_of<T>() -> 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.