11590Srgrimes/*
21590Srgrimes * Copyright (c) 1989, 1993
31590Srgrimes *	The Regents of the University of California.  All rights reserved.
41590Srgrimes *
51590Srgrimes * This code is derived from software contributed to Berkeley by
61590Srgrimes * Tony Nardo of the Johns Hopkins University/Applied Physics Lab.
71590Srgrimes *
81590Srgrimes * Redistribution and use in source and binary forms, with or without
91590Srgrimes * modification, are permitted provided that the following conditions
101590Srgrimes * are met:
111590Srgrimes * 1. Redistributions of source code must retain the above copyright
121590Srgrimes *    notice, this list of conditions and the following disclaimer.
131590Srgrimes * 2. Redistributions in binary form must reproduce the above copyright
141590Srgrimes *    notice, this list of conditions and the following disclaimer in the
151590Srgrimes *    documentation and/or other materials provided with the distribution.
161590Srgrimes * 4. Neither the name of the University nor the names of its contributors
171590Srgrimes *    may be used to endorse or promote products derived from this software
181590Srgrimes *    without specific prior written permission.
191590Srgrimes *
201590Srgrimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
211590Srgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
221590Srgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
231590Srgrimes * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
241590Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
251590Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
261590Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
271590Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
281590Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
291590Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
301590Srgrimes * SUCH DAMAGE.
311590Srgrimes *
321590Srgrimes *	@(#)finger.h	8.1 (Berkeley) 6/6/93
3350477Speter * $FreeBSD$
341590Srgrimes */
351590Srgrimes
36126963Sjmallett#ifndef	_FINGER_H_
37126963Sjmallett#define	_FINGER_H_
38126963Sjmallett
391590Srgrimestypedef struct person {
401590Srgrimes	uid_t uid;			/* user id */
411590Srgrimes	char *dir;			/* user's home directory */
421590Srgrimes	char *homephone;		/* pointer to home phone no. */
431590Srgrimes	char *name;			/* login name */
441590Srgrimes	char *office;			/* pointer to office name */
451590Srgrimes	char *officephone;		/* pointer to office phone no. */
461590Srgrimes	char *realname;			/* pointer to full name */
471590Srgrimes	char *shell;			/* user's shell */
482537Spst	time_t mailread;		/* last time mail was read */
492537Spst	time_t mailrecv;		/* last time mail was received */
501590Srgrimes	struct where *whead, *wtail;	/* list of where user is or has been */
511590Srgrimes} PERSON;
521590Srgrimes
531590Srgrimesenum status { LASTLOG, LOGGEDIN };
541590Srgrimes
551590Srgrimestypedef struct where {
561590Srgrimes	struct where *next;		/* next place user is or has been */
571590Srgrimes	enum status info;		/* type/status of request */
581590Srgrimes	short writable;			/* tty is writable */
591590Srgrimes	time_t loginat;			/* time of (last) login */
601590Srgrimes	time_t idletime;		/* how long idle (if logged in) */
61201140Sed	char tty[sizeof ((struct utmpx *)0)->ut_line];  /* tty line */
62201140Sed	char host[sizeof ((struct utmpx *)0)->ut_host]; /* host name */
631590Srgrimes} WHERE;
641590Srgrimes
6546662Sobrien#define UNPRIV_NAME	"nobody"	/* Preferred privilege level */
6646662Sobrien#define UNPRIV_UGID	32767		/* Default uid and gid */
6746662Sobrien#define OUTPUT_MAX	100000		/* Do not keep listinging forever */
6846662Sobrien#define TIME_LIMIT	360		/* Do not keep listinging forever */
6946662Sobrien
701590Srgrimes#include "extern.h"
71126963Sjmallett
72126963Sjmallett#endif /* !_FINGER_H_ */
73