#[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: i32,
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: i32
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§
Source§impl FromBytes for utmp
impl FromBytes for utmp
Source§fn slice_from_prefix(bytes: &[u8], count: usize) -> Option<(&[Self], &[u8])>where
Self: Sized,
fn slice_from_prefix(bytes: &[u8], count: usize) -> Option<(&[Self], &[u8])>where
Self: Sized,
Interprets the prefix of the given
bytes
as a &[Self]
with length
equal to count
without copying. Read moreSource§fn slice_from_suffix(bytes: &[u8], count: usize) -> Option<(&[u8], &[Self])>where
Self: Sized,
fn slice_from_suffix(bytes: &[u8], count: usize) -> Option<(&[u8], &[Self])>where
Self: Sized,
Interprets the suffix of the given
bytes
as a &[Self]
with length
equal to count
without copying. Read moreSource§impl FromZeroes for utmpwhere
c_short: FromZeroes,
pid_t: FromZeroes,
[u8; 32]: FromZeroes,
[u8; 4]: FromZeroes,
[u8; 256]: FromZeroes,
exit_status: FromZeroes,
i32: FromZeroes,
timeval: FromZeroes,
[i32; 4]: FromZeroes,
[u8; 20]: FromZeroes,
impl FromZeroes for utmpwhere
c_short: FromZeroes,
pid_t: FromZeroes,
[u8; 32]: FromZeroes,
[u8; 4]: FromZeroes,
[u8; 256]: FromZeroes,
exit_status: FromZeroes,
i32: FromZeroes,
timeval: FromZeroes,
[i32; 4]: FromZeroes,
[u8; 20]: FromZeroes,
impl Copy for utmp
Auto Trait Implementations§
impl Freeze for utmp
impl RefUnwindSafe for utmp
impl Send for utmp
impl Sync for utmp
impl Unpin for utmp
impl UnwindSafe for utmp
Blanket Implementations§
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
Mutably borrows from an owned value. Read more