blob: c24d0a8d0a54a2cf93624a706f2561336631b562 [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 Felker0b44a032011-02-12 00:22:29 -050022#define utmp utmpx
Rich Felker0b44a032011-02-12 00:22:29 -050023#define utmpname(x) (-1)
24
Rich Felkereee150f2011-02-20 15:06:26 -050025void endutent(void);
26struct utmp *getutent(void);
27struct utmp *getutid(const struct utmp *);
28struct utmp *getutline(const struct utmp *);
29struct utmp *pututline(const struct utmp *);
30void setutent(void);
31
Rich Felkerf5ba2bc2011-03-18 21:52:26 -040032void updwtmp(const char *, const struct utmp *);
33
Rich Felker0b44a032011-02-12 00:22:29 -050034#define _PATH_UTMP "/dev/null"
35#define _PATH_WTMP "/dev/null"
36
Rich Felkereee150f2011-02-20 15:06:26 -050037#ifdef __cplusplus
38}
39#endif
40
Rich Felker0b44a032011-02-12 00:22:29 -050041#endif