summaryrefslogtreecommitdiff
path: root/newlib/libc/sys/cygwin/sys/utmp.h
blob: 1c1c9aa0a83985ccae88451fd2b19e6e44d82d50 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#ifndef UTMP_H
#define UTMP_H

#include <sys/types.h>
#include <time.h>
#include <paths.h>

#ifdef __cplusplus
extern "C" {
#endif

#define UT_LINESIZE	16
#define UT_NAMESIZE	16
#define UT_HOSTSIZE	256
#define ut_name ut_user

struct utmp 
{
 short	ut_type;	
 pid_t	ut_pid;		
 char	ut_line[UT_LINESIZE];
 char	ut_id[2];
 time_t ut_time;	
 char	ut_user[UT_NAMESIZE];	
 char	ut_host[UT_HOSTSIZE];	
 long	ut_addr;	
};

#define INIT_PROCESS	5
#define LOGIN_PROCESS	6
#define USER_PROCESS	7
#define DEAD_PROCESS	8

extern struct utmp *_getutline (struct utmp *);
extern struct utmp *getutent (void);
extern struct utmp *getutid (struct utmp *);
extern struct utmp *getutline (struct utmp *);
extern void endutent (void);
extern void pututline (struct utmp *);
extern void setutent (void);
extern void utmpname (const char *);

void login (struct utmp *);
int logout (char *);

#ifdef __cplusplus
}
#endif
#endif /* UTMP_H */