Welcome to mirror list, hosted at ThFree Co, Russian Federation.

utmp.h « sys « include « cygwin « winsup - cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 8a63b348b88c1ac6bbec27af1faa48c2404d1f28 (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
50
51
52
53
54
/* sys/utmp.h

   Copyright 2001, 2003, 2004, 2005, 2008 Red Hat, Inc.

   This software is a copyrighted work licensed under the terms of the
   Cygwin license.  Please consult the file "CYGWIN_LICENSE" for
   details. */

#ifndef UTMP_H
#define UTMP_H

#include <cygwin/utmp.h>

#define UTMP_FILE _PATH_UTMP

#ifdef __cplusplus
extern "C" {
#endif

#ifndef ut_name
#define ut_name		ut_user
#endif


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

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

void login (const struct utmp *);
int logout (const char *);
int login_tty (int);
void updwtmp (const char *, const struct utmp *);
void logwtmp (const char *, const char *, const char *);

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