1 .\" Copyright (c) 2009 Ed Schouten <ed@FreeBSD.org>
2 .\" All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
13 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 .Nd read user login records
39 .Ft struct ulog_utmpx *
40 .Fn ulog_getutxent "void"
42 .Fn ulog_setutxent "void"
44 .Fn ulog_endutxent "void"
48 function returns a pointer to an object, with the following structure,
49 containing stored information of an active user login session.
52 char *ut_user; /* Username. */
53 char *ut_line; /* TTY device. */
54 char *ut_host; /* Remote hostname. */
55 struct timeval ut_tv; /* Timestamp. */
59 The fields are as follows:
60 .Bl -tag -width ut_user
62 The username of the logged in user.
64 The pathname of the TTY device, without the leading
68 An optional hostname of a remote system, if the login session is
69 provided through a networked login service.
71 Timestamp indicating when the entry was last modified.
76 function reads the next entry from the utmp file, opening the file if
80 opens the file, closing it first if already opened.
83 function closes any open files.
87 function reads from the beginning of the file until and EOF is
92 function returns a null pointer on EOF or error.
97 These functions appeared in