2003-05-12 13:06:27 +02:00
|
|
|
/* sys/utmp.h
|
|
|
|
|
2008-07-30 06:58:24 +02:00
|
|
|
Copyright 2001, 2003, 2004, 2005, 2008 Red Hat, Inc.
|
2003-05-12 13:06:27 +02:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2004-12-15 18:29:01 +01:00
|
|
|
#include <cygwin/utmp.h>
|
2003-05-12 13:06:27 +02:00
|
|
|
|
|
|
|
#define UTMP_FILE _PATH_UTMP
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2005-03-03 23:08:12 +01:00
|
|
|
#ifndef ut_name
|
|
|
|
#define ut_name ut_user
|
|
|
|
#endif
|
|
|
|
|
2003-05-12 13:06:27 +02:00
|
|
|
|
2005-05-02 05:50:11 +02:00
|
|
|
struct utmp
|
2003-05-12 13:06:27 +02:00
|
|
|
{
|
2005-05-02 05:50:11 +02:00
|
|
|
short ut_type;
|
|
|
|
pid_t ut_pid;
|
2003-05-12 13:06:27 +02:00
|
|
|
char ut_line[UT_LINESIZE];
|
|
|
|
char ut_id[UT_IDLEN];
|
2005-05-02 05:50:11 +02:00
|
|
|
time_t ut_time;
|
|
|
|
char ut_user[UT_NAMESIZE];
|
|
|
|
char ut_host[UT_HOSTSIZE];
|
|
|
|
long ut_addr;
|
2003-05-12 13:06:27 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
extern struct utmp *getutent (void);
|
2008-07-30 06:58:24 +02:00
|
|
|
extern struct utmp *getutid (const struct utmp *);
|
|
|
|
extern struct utmp *getutline (const struct utmp *);
|
|
|
|
extern struct utmp *pututline (const struct utmp *);
|
2003-05-12 13:06:27 +02:00
|
|
|
extern void endutent (void);
|
|
|
|
extern void setutent (void);
|
|
|
|
extern void utmpname (const char *);
|
|
|
|
|
2008-07-30 06:58:24 +02:00
|
|
|
void login (const struct utmp *);
|
|
|
|
int logout (const char *);
|
2003-05-12 13:06:27 +02:00
|
|
|
int login_tty (int);
|
2003-09-10 17:51:59 +02:00
|
|
|
void updwtmp (const char *, const struct utmp *);
|
|
|
|
void logwtmp (const char *, const char *, const char *);
|
2003-05-12 13:06:27 +02:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif /* UTMP_H */
|