#[repr(C)]pub struct utmp {
pub ut_type: c_short,
pub ut_pid: pid_t,
pub ut_line: [u8; 32],
pub ut_id: [u8; 4],
pub ut_user: [u8; 32],
pub ut_host: [u8; 256],
pub ut_exit: exit_status,
pub ut_session: i64,
pub ut_tv: timeval,
pub ut_addr_v6: [i32; 4],
pub __unused: [u8; 20],
}
Fields
ut_type: c_short
Type of record
ut_pid: pid_t
PID of login process
ut_line: [u8; 32]
Device name of tty - "/dev/"
ut_id: [u8; 4]
Terminal name suffix, or inittab(5)
ID
ut_user: [u8; 32]
Username
ut_host: [u8; 256]
Hostname for remote login, or kernel version for run-level message
ut_exit: exit_status
Exit status of a process marked as DEAD_PROCESS
; not used by Linux init
ut_session: i64
Session ID (getsid(2)
) used for windowing
ut_tv: timeval
Time entry was made
ut_addr_v6: [i32; 4]
Internet address of remote host; IPv4 address uses just ut_addr_v6[0]
__unused: [u8; 20]
Reserved for future use
Trait Implementations
sourceimpl FromBytes for utmp
impl FromBytes for utmp
sourcefn read_from<B>(bytes: B) -> Option<Self> where
B: ByteSlice,
fn read_from<B>(bytes: B) -> Option<Self> where
B: ByteSlice,
Reads a copy of Self
from bytes
. Read more
sourcefn read_from_prefix<B>(bytes: B) -> Option<Self> where
B: ByteSlice,
fn read_from_prefix<B>(bytes: B) -> Option<Self> where
B: ByteSlice,
Reads a copy of Self
from the prefix of bytes
. Read more
sourcefn read_from_suffix<B>(bytes: B) -> Option<Self> where
B: ByteSlice,
fn read_from_suffix<B>(bytes: B) -> Option<Self> where
B: ByteSlice,
Reads a copy of Self
from the suffix of bytes
. Read more
sourcefn new_zeroed() -> Self
fn new_zeroed() -> Self
Creates an instance of Self
from zeroed bytes.
impl Copy for utmp
Auto Trait Implementations
impl RefUnwindSafe for utmp
impl Send for utmp
impl Sync for utmp
impl Unpin for utmp
impl UnwindSafe for utmp
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more