devela::all

Struct LINUX_IOCTL

Source
pub struct LINUX_IOCTL;
Available on crate feature linux only.
Expand description

Linux ioctl constants.

Implementations§

Source§

impl LINUX_IOCTL

§Get and set terminal attributes


Source

pub const TCGETS: c_ulong = 21_505u64

Get the current serial port settings.

Argument: struct termios *argp

Source

pub const TCSETS: c_ulong = 21_506u64

Set the current serial port settings.

Argument: const struct termios *argp

Source

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

Source

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

Source

pub const TCGETS2: c_ulong = 2_150_388_778u64

Get the current serial port settings. (termios2)

Argument: struct termios2 *argp

Source

pub const TCSETS2: c_ulong = 1_076_646_955u64

Set the current serial port settings. (termios2)

Argument: const struct termios2 *argp

Source

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

Source

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

Source

pub const TCGETA: c_ulong = 21_509u64

Get the current serial port settings. (termio)

Argument: struct termio *argp

Source

pub const TCSETA: c_ulong = 21_510u64

Set the current serial port settings. (termio)

Argument: const struct termio *argp

Source

pub const TCSETAW: c_ulong = 21_511u64

Allow the output buffer to drain, and set the current serial port settings. (termio)

Argument: const struct termio *argp

Source

pub const TCSETAF: c_ulong = 21_512u64

Allow the output buffer to drain, discard pending input, and set the current serial port settings. (termio)

Argument: const struct termio *argp

Source§

impl LINUX_IOCTL

§Software flow control


Source

pub const TCXONC: c_ulong = 21_514u64

Equivalent to tcflow(fd, arg).

Argument: int arg

See tcflow(3) for the argument values TCOOFF, TCOON, TCIOFF, TCION.

Source

pub const TCOOFF: c_int = 0i32

Suspends output.

Source

pub const TCOON: c_int = 1i32

Resumes suspended output.

Source

pub const TCIOFF: c_int = 2i32

Sends a STOP character to the terminal, to stop the terminal from sending any further input.

Source

pub const TCION: c_int = 3i32

Sends a START character to the terminal, to tell the terminal that it can resume sending input.

Source§

impl LINUX_IOCTL

§Exclusive mode


Source

pub const TIOCEXCL: c_ulong = 21_516u64

Put the terminal into exclusive mode.

No further open(2) operations on the terminal are permitted. (They fail with EBUSY, except for a process with the CAP_SYS_ADMIN capability.)

Source

pub const TIOCNXCL: c_ulong = 21_517u64

Disable exclusive mode.

Source

pub const TIOCGEXCL: c_ulong = 2_147_767_360u64

(since Linux 3.8) If the terminal is currently in exclusive mode, place a nonzero value in the location pointed to by argp; otherwise, place zero in *argp.

Source§

impl LINUX_IOCTL

§Faking input


Source

pub const TIOCSTI: c_ulong = 21_522u64

Insert the given byte in the input queue.

Argument: const char *argp

Source§

impl LINUX_IOCTL

§Get and set window size


Source

pub const TIOCGWINSZ: c_ulong = 21_523u64

Get window size.

Argument: struct winsize *argp

Source

pub const TIOCSWINSZ: c_ulong = 21_524u64

Set window size.

Argument: const struct winsize *argp

Source§

impl LINUX_IOCTL

§Modem control


Source

pub const TIOCMGET: c_ulong = 21_525u64

Get the status of modem bits.

Argument: int *argp

Source

pub const TIOCMBIS: c_ulong = 21_526u64

Set the indicated modem bits.

Argument: const int *argp

Source

pub const TIOCMBIC: c_ulong = 21_527u64

Clear the indicated modem bits.

Argument: const int *argp

Source

pub const TIOCMSET: c_ulong = 21_528u64

Set the status of modem bits.

Argument: const int *argp

Source

pub const TIOCM_LE: c_int = 1i32

DSR (data set ready/line enable)

Source

pub const TIOCM_DTR: c_int = 2i32

DTR (data terminal ready)

Source

pub const TIOCM_RTS: c_int = 4i32

RTS (request to send)

Source

pub const TIOCM_ST: c_int = 8i32

Secondary TXD (transmit)

Source

pub const TIOCM_SR: c_int = 16i32

Secondary RXD (receive)

Source

pub const TIOCM_CTS: c_int = 32i32

CTS (clear to send)

Source

pub const TIOCM_CAR: c_int = 64i32

DCD (data carrier detect)

Source

pub const TIOCM_CD: c_int = 64i32

Source

pub const TIOCM_RNG: c_int = 128i32

RNG (ring)

Source

pub const TIOCM_RI: c_int = 128i32

Source

pub const TIOCM_DSR: c_int = 256i32

DSR (data set ready)

Source§

impl LINUX_IOCTL

§Marking a line as local


Source

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

Source

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


Source

pub const FIONREAD: c_ulong = 21_531u64

Get the number of bytes in the input buffer.

Source

pub const TIOCINQ: c_ulong = 21_531u64

Same as FIONREAD.

Source

pub const TIOCOUTQ: c_ulong = 21_521u64

Get the number of bytes in the output buffer.

Source

pub const TCFLSH: c_ulong = 21_515u64

See tcflush(3) for the argument values TCIFLUSH, TCOFLUSH, TCIOFLUSH.

Equivalent to tcflush(fd, arg).

Source

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


Source

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


Source

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


Source

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.
Source

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

Source

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

Source

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

Source

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


Source

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

pub const TIOCNOTTY: c_ulong = 21_538u64

Give up this controlling terminal.

Argument: void

If the process was session leader, then send SIGHUP and SIGCONT to the foreground process group and all processes in the current session lose their controlling terminal.

Source§

impl LINUX_IOCTL

§Line discipline


Source

pub const TIOCSETD: c_ulong = 21_539u64

Get the line discipline of the terminal.

Argument: int *argp

Source

pub const TIOCGETD: c_ulong = 21_540u64

Set the line discipline of the terminal.

Argument: const int *argp

Source§

impl LINUX_IOCTL

§Sending a break


Source

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.

Source

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

pub const TIOCSBRK: c_ulong = 21_543u64

Turn break on, that is, start sending zero bits.

Argument: void

Source

pub const TIOCCBRK: c_ulong = 21_544u64

Turn break off, that is, stop sending zero bits.

Argument: void

Source§

impl LINUX_IOCTL

§Process group and session ID
Source

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

pub const TIOCGPGRP: c_ulong = 21_519u64

Get the process group ID of the foreground process group on this terminal.

Argument: pid_t *argp

Source

pub const TIOCSPGRP: c_ulong = 21_520u64

Set the foreground process group ID of this terminal.

Argument: const pid_t *argp

Source§

impl LINUX_IOCTL

§Miscellaneous


Source

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.

Source

pub const TIOCGSERIAL: c_ulong = 21_534u64

Source

pub const TIOCSSERIAL: c_ulong = 21_535u64

Source

pub const TIOCGRS485: c_ulong = 21_550u64

Source

pub const TIOCSRS485: c_ulong = 21_551u64

Source

pub const TIOCGPTN: c_ulong = 2_147_767_344u64

Source

pub const TIOCGDEV: c_ulong = 2_147_767_346u64

Source

pub const TCGETX: c_ulong = 21_554u64

Source

pub const TCSETX: c_ulong = 21_555u64

Source

pub const TCSETXF: c_ulong = 21_556u64

Source

pub const TCSETXW: c_ulong = 21_557u64

Source

pub const TIOCSIG: c_ulong = 1_074_025_526u64

Source

pub const TIOCVHANGUP: c_ulong = 21_559u64

Source

pub const FIONCLEX: c_ulong = 21_584u64

Source

pub const FIOCLEX: c_ulong = 21_585u64

Source

pub const FIOASYNC: c_ulong = 21_586u64

Source

pub const TIOCSERCONFIG: c_ulong = 21_587u64

Source

pub const TIOCSERGWILD: c_ulong = 21_588u64

Source

pub const TIOCSERSWILD: c_ulong = 21_589u64

Source

pub const TIOCGLCKTRMIOS: c_ulong = 21_590u64

Source

pub const TIOCSLCKTRMIOS: c_ulong = 21_591u64

Source

pub const TIOCSERGSTRUCT: c_ulong = 21_592u64

Source

pub const TIOCSERGETMULTI: c_ulong = 21_594u64

Source

pub const TIOCSERSETMULTI: c_ulong = 21_595u64

Source

pub const TIOCMIWAIT: c_ulong = 21_596u64

Source

pub const TIOCGICOUNT: c_ulong = 21_597u64

Source

pub const BLKIOMIN: c_ulong = 4_728u64

Source

pub const BLKIOOPT: c_ulong = 4_729u64

Source

pub const BLKSSZGET: c_ulong = 4_712u64

Source

pub const BLKPBSZGET: c_ulong = 4_731u64

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> ArchivePointee for T

§

type ArchivedMetadata = ()

The archived version of the pointer metadata for this type.
§

fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata

Converts some archived metadata to the pointer metadata for itself.
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> ByteSized for T

Source§

const BYTE_ALIGN: usize = _

The alignment of this type in bytes.
Source§

const BYTE_SIZE: usize = _

The size of this type in bytes.
Source§

fn byte_align(&self) -> usize

Returns the alignment of this type in bytes.
Source§

fn byte_size(&self) -> usize

Returns the size of this type in bytes. Read more
Source§

fn ptr_size_ratio(&self) -> [usize; 2]

Returns the size ratio between Ptr::BYTES and BYTE_SIZE. Read more
Source§

impl<T, R> Chain<R> for T
where T: ?Sized,

Source§

fn chain<F>(self, f: F) -> R
where F: FnOnce(Self) -> R, Self: Sized,

Chain a function which takes the parameter by value.
Source§

fn chain_ref<F>(&self, f: F) -> R
where F: FnOnce(&Self) -> R,

Chain a function which takes the parameter by shared reference.
Source§

fn chain_mut<F>(&mut self, f: F) -> R
where F: FnOnce(&mut Self) -> R,

Chain a function which takes the parameter by exclusive reference.
Source§

impl<T> ExtAny for T
where T: Any + ?Sized,

Source§

fn type_id() -> TypeId

Returns the TypeId of Self. Read more
Source§

fn type_of(&self) -> TypeId

Returns the TypeId of self. Read more
Source§

fn type_name(&self) -> &'static str

Returns the type name of self. Read more
Source§

fn type_is<T: 'static>(&self) -> bool

Returns true if Self is of type T. Read more
Source§

fn as_any_ref(&self) -> &dyn Any
where Self: Sized,

Upcasts &self as &dyn Any. Read more
Source§

fn as_any_mut(&mut self) -> &mut dyn Any
where Self: Sized,

Upcasts &mut self as &mut dyn Any. Read more
Source§

fn as_any_box(self: Box<Self>) -> Box<dyn Any>
where Self: Sized,

Upcasts Box<self> as Box<dyn Any>. Read more
Source§

fn downcast_ref<T: 'static>(&self) -> Option<&T>

Available on crate feature unsafe_layout only.
Returns some shared reference to the inner value if it is of type T. Read more
Source§

fn downcast_mut<T: 'static>(&mut self) -> Option<&mut T>

Available on crate feature unsafe_layout only.
Returns some exclusive reference to the inner value if it is of type T. Read more
Source§

impl<T> ExtMem for T
where T: ?Sized,

Source§

const NEEDS_DROP: bool = _

Know whether dropping values of this type matters, in compile-time.
Source§

fn mem_align_of<T>() -> usize

Returns the minimum alignment of the type in bytes. Read more
Source§

fn mem_align_of_val(&self) -> usize

Returns the alignment of the pointed-to value in bytes. Read more
Source§

fn mem_size_of<T>() -> usize

Returns the size of a type in bytes. Read more
Source§

fn mem_size_of_val(&self) -> usize

Returns the size of the pointed-to value in bytes. Read more
Source§

fn mem_copy(&self) -> Self
where Self: Copy,

Bitwise-copies a value. Read more
Source§

fn mem_needs_drop(&self) -> bool

Returns true if dropping values of this type matters. Read more
Source§

fn mem_drop(self)
where Self: Sized,

Drops self by running its destructor. Read more
Source§

fn mem_forget(self)
where Self: Sized,

Forgets about self without running its destructor. Read more
Source§

fn mem_replace(&mut self, other: Self) -> Self
where Self: Sized,

Replaces self with other, returning the previous value of self. Read more
Source§

fn mem_take(&mut self) -> Self
where Self: Default,

Replaces self with its default value, returning the previous value of self. Read more
Source§

fn mem_swap(&mut self, other: &mut Self)
where Self: Sized,

Swaps the value of self and other without deinitializing either one. Read more
Source§

unsafe fn mem_zeroed<T>() -> T

Available on crate feature unsafe_layout only.
Returns the value of type T represented by the all-zero byte-pattern. Read more
Source§

unsafe fn mem_transmute_copy<Src, Dst>(src: &Src) -> Dst

Available on crate feature unsafe_layout only.
Returns the value of type T represented by the all-zero byte-pattern. Read more
Source§

fn mem_as_bytes(&self) -> &[u8]
where Self: Sync + Unpin,

Available on crate feature unsafe_slice only.
View a Sync + Unpin self as &[u8]. Read more
Source§

fn mem_as_bytes_mut(&mut self) -> &mut [u8]
where Self: Sync + Unpin,

Available on crate feature unsafe_slice only.
View a Sync + Unpin self as &mut [u8]. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<S> FromSample<S> for S

§

fn from_sample_(s: S) -> S

Source§

impl<T> Hook for T

Source§

fn hook_ref<F>(self, f: F) -> Self
where F: FnOnce(&Self),

Applies a function which takes the parameter by shared reference, and then returns the (possibly) modified owned value. Read more
Source§

fn hook_mut<F>(self, f: F) -> Self
where F: FnOnce(&mut Self),

Applies a function which takes the parameter by exclusive reference, and then returns the (possibly) modified owned value. Read more
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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 F
where T: FromSample<F>,

§

fn into_sample(self) -> T

§

impl<T> LayoutRaw for T

§

fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>

Returns the layout of the type.
§

impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
where T: SharedNiching<N1, N2>, N1: Niching<T>, N2: Niching<T>,

§

unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool

Returns whether the given value has been niched. Read more
§

fn resolve_niched(out: Place<NichedOption<T, N1>>)

Writes data to out indicating that a T is niched.
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> Pointee for T

§

type Metadata = ()

The metadata type for pointers and references to this type.
§

impl<T, U> ToSample<U> for T
where U: FromSample<T>,

§

fn to_sample_(self) -> U

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
§

impl<S, T> Duplex<S> for T
where T: FromSample<S> + ToSample<S>,

§

impl<T> Ungil for T
where T: Send,