diff options
author | Robert de Bath <rdebath@poboxes.com> | 1996-03-24 17:45:55 +0100 |
---|---|---|
committer | Lubomir Rintel <lkundrak@v3.sk> | 2013-10-23 23:29:43 +0200 |
commit | fe22c37817ce338fbbc90b239320248c270957fa (patch) | |
tree | d9550410c4a20bdd382fcc58d2d3d7c5e04e5245 /libc-0.0.4/include/utmp.h | |
parent | a7aba15e8efffb1c5d3097656f1a93955a64f01f (diff) | |
parent | 42192453ea219b80d0bf9f41e51e36d3d4d0740b (diff) | |
download | dev86-fe22c37817ce338fbbc90b239320248c270957fa.tar.gz |
Import Dev86-0.0.4.tar.gzv0.0.4
Diffstat (limited to 'libc-0.0.4/include/utmp.h')
-rw-r--r-- | libc-0.0.4/include/utmp.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/libc-0.0.4/include/utmp.h b/libc-0.0.4/include/utmp.h new file mode 100644 index 0000000..ca630a3 --- /dev/null +++ b/libc-0.0.4/include/utmp.h @@ -0,0 +1,48 @@ +/* utmp.h <ndf@linux.mit.edu> */ + +#ifndef __UTMP_H +#define __UTMP_H + +#include <features.h> +#include <sys/types.h> +#include <paths.h> +#include <time.h> + +#define UT_UNKNOWN 0 +#define UT_LINESIZE 12 +#define UT_NAMESIZE 8 +#define UT_HOSTSIZE 16 + +#define RUN_LVL 1 +#define BOOT_TIME 2 +#define NEW_TIME 3 +#define OLD_TIME 4 + +#define INIT_PROCESS 5 +#define LOGIN_PROCESS 6 +#define USER_PROCESS 7 +#define DEAD_PROCESS 8 + +struct utmp +{ + short ut_type; /* type of login */ + pid_t ut_pid; /* pid of login-process */ + char ut_line[UT_LINESIZE]; /* devicename of tty -"/dev/", null-term */ + char ut_id[2]; /* abbrev. ttyname, as 01, s1 etc. */ + time_t ut_time; /* logintime */ + char ut_user[UT_NAMESIZE]; /* username, not null-term */ + char ut_host[UT_HOSTSIZE]; /* hostname for remote login... */ + long ut_addr; /* IP addr of remote host */ + +}; + +extern void setutent __P ((void)); +extern void utmpname __P ((__const char *)); +extern struct utmp *getutent __P ((void)); +extern struct utmp *getutid __P ((struct utmp *)); +extern struct utmp *getutline __P ((struct utmp *)); +extern void pututline __P ((struct utmp *)); +extern struct utmp *_getutline __P ((struct utmp *)); +extern void endutent __P ((void)); + +#endif /* __UTMP_H */ |