/*
 * $Header: /smsa/bsd:include/utmp.h:bsd  1.6  $
 * $Source: /smsa/bsd:include/utmp.h: $
 *
 * Copyright (c) 1988 Acorn Computers Ltd., Cambridge, England
 */

/*
 * 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	1.2 88/05/17 4.0NFSSRC SMI; from	5.1 (Berkeley) 5/30/85
 */

#ifndef __utmp_h
#define __utmp_h

#ifndef __sys_types_h
#include "sys/types.h"
#endif

/*
 * 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 */
	time_t	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'))

#endif/*__utmp_h*/

/* EOF utmp.h */
