finger.h revision 1590
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 * 3. All advertising materials mentioning features or use of this software 171590Srgrimes * must display the following acknowledgement: 181590Srgrimes * This product includes software developed by the University of 191590Srgrimes * California, Berkeley and its contributors. 201590Srgrimes * 4. Neither the name of the University nor the names of its contributors 211590Srgrimes * may be used to endorse or promote products derived from this software 221590Srgrimes * without specific prior written permission. 231590Srgrimes * 241590Srgrimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 251590Srgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 261590Srgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 271590Srgrimes * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 281590Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 291590Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 301590Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 311590Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 321590Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 331590Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 341590Srgrimes * SUCH DAMAGE. 351590Srgrimes * 361590Srgrimes * @(#)finger.h 8.1 (Berkeley) 6/6/93 371590Srgrimes */ 381590Srgrimes 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 */ 481590Srgrimes struct where *whead, *wtail; /* list of where user is or has been */ 491590Srgrimes} PERSON; 501590Srgrimes 511590Srgrimesenum status { LASTLOG, LOGGEDIN }; 521590Srgrimes 531590Srgrimestypedef struct where { 541590Srgrimes struct where *next; /* next place user is or has been */ 551590Srgrimes enum status info; /* type/status of request */ 561590Srgrimes short writable; /* tty is writable */ 571590Srgrimes time_t loginat; /* time of (last) login */ 581590Srgrimes time_t idletime; /* how long idle (if logged in) */ 591590Srgrimes char tty[UT_LINESIZE+1]; /* null terminated tty line */ 601590Srgrimes char host[UT_HOSTSIZE+1]; /* null terminated remote host name */ 611590Srgrimes} WHERE; 621590Srgrimes 631590Srgrimes#include "extern.h" 64