blob: b357ac8c4351461c97a404ddbaafe6b5086afcfd [file] [log] [blame]
Rich Felker0b44a032011-02-12 00:22:29 -05001#ifndef _UTMP_H
2#define _UTMP_H
3
Rich Felkereee150f2011-02-20 15:06:26 -05004#ifdef __cplusplus
5extern "C" {
6#endif
7
Rich Felker0b44a032011-02-12 00:22:29 -05008#include <utmpx.h>
9
Rich Felkerfa3bbbd2012-01-31 14:39:17 -050010#define ACCOUNTING 9
Rich Felker96e0aca2012-02-01 14:10:38 -050011#define UT_NAMESIZE 32
Rich Felkerfa3bbbd2012-01-31 14:39:17 -050012#define UT_HOSTSIZE 256
13
Rich Felker4a994402012-05-06 16:35:32 -040014struct lastlog {
15 time_t ll_time;
16 char ll_line[UT_LINESIZE];
17 char ll_host[UT_HOSTSIZE];
18};
19
Rich Felker0b44a032011-02-12 00:22:29 -050020#define ut_time ut_tv.tv_sec
21#define ut_name ut_user
Rich Felker1e2281b2013-06-27 20:00:29 -040022#define ut_addr ut_addr_v6[0]
Rich Felker0b44a032011-02-12 00:22:29 -050023#define utmp utmpx
Rich Felker0b44a032011-02-12 00:22:29 -050024#define utmpname(x) (-1)
25
Rich Felkereee150f2011-02-20 15:06:26 -050026void endutent(void);
27struct utmp *getutent(void);
28struct utmp *getutid(const struct utmp *);
29struct utmp *getutline(const struct utmp *);
30struct utmp *pututline(const struct utmp *);
31void setutent(void);
32
Rich Felkerf5ba2bc2011-03-18 21:52:26 -040033void updwtmp(const char *, const struct utmp *);
34
Rich Felker1e2281b2013-06-27 20:00:29 -040035#define _PATH_UTMP "/dev/null/utmp"
36#define _PATH_WTMP "/dev/null/wtmp"
37
38#define UTMP_FILE _PATH_UTMP
39#define WTMP_FILE _PATH_WTMP
40#define UTMP_FILENAME _PATH_UTMP
41#define WTMP_FILENAME _PATH_WTMP
Rich Felker0b44a032011-02-12 00:22:29 -050042
Rich Felkereee150f2011-02-20 15:06:26 -050043#ifdef __cplusplus
44}
45#endif
46
Rich Felker0b44a032011-02-12 00:22:29 -050047#endif