home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OpenStep 4.2J (Developer)
/
os42jdev.iso
/
NextDeveloper
/
Headers
/
bsd
/
utmp.h
< prev
next >
Wrap
C/C++ Source or Header
|
1995-01-23
|
784b
|
29 lines
/*
* Copyright (c) 1980 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
* @(#)utmp.h 5.1 (Berkeley) 5/30/85
*/
/*
* Structure of utmp and wtmp files.
*
* Assuming the number 8 is unwise.
*/
struct utmp {
char ut_line[8]; /* tty name */
char ut_name[8]; /* user id */
char ut_host[16]; /* host name, if remote */
long ut_time; /* time on */
};
/*
* This is a utmp entry that does not correspond to a genuine user
*/
#define nonuser(ut) ((ut).ut_host[0] == 0 && \
strncmp((ut).ut_line, "tty", 3) == 0 && ((ut).ut_line[3] == 'p' \
|| (ut).ut_line[3] == 'q' \
|| (ut).ut_line[3] == 'r' \
|| (ut).ut_line[3] == 's'))