11592Srgrimes/* $NetBSD: finger.h,v 1.9 2003/08/07 11:13:45 agc Exp $ */ 21592Srgrimes 31592Srgrimes/* 41592Srgrimes * Copyright (c) 1989, 1993 51592Srgrimes * The Regents of the University of California. All rights reserved. 61592Srgrimes * 71592Srgrimes * This code is derived from software contributed to Berkeley by 81592Srgrimes * Tony Nardo of the Johns Hopkins University/Applied Physics Lab. 91592Srgrimes * 101592Srgrimes * Redistribution and use in source and binary forms, with or without 111592Srgrimes * modification, are permitted provided that the following conditions 121592Srgrimes * are met: 131592Srgrimes * 1. Redistributions of source code must retain the above copyright 141592Srgrimes * notice, this list of conditions and the following disclaimer. 151592Srgrimes * 2. Redistributions in binary form must reproduce the above copyright 161592Srgrimes * notice, this list of conditions and the following disclaimer in the 171592Srgrimes * documentation and/or other materials provided with the distribution. 181592Srgrimes * 3. Neither the name of the University nor the names of its contributors 191592Srgrimes * may be used to endorse or promote products derived from this software 201592Srgrimes * without specific prior written permission. 211592Srgrimes * 221592Srgrimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 231592Srgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 241592Srgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 251592Srgrimes * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 261592Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 271592Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 281592Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 291592Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 301592Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 311592Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 321592Srgrimes * SUCH DAMAGE. 331592Srgrimes * 341592Srgrimes * from: @(#)finger.h 8.1 (Berkeley) 6/6/93 351592Srgrimes */ 361592Srgrimes 371592Srgrimes 381592Srgrimes/* 391592Srgrimes * All unique persons are linked in a list headed by "head" and linkd 401592Srgrimes * by the "next" field, as well as kept in a hash table. 411592Srgrimes */ 421592Srgrimes 431592Srgrimestypedef struct person { 441592Srgrimes uid_t uid; /* user id */ 451592Srgrimes char *dir; /* user's home directory */ 461592Srgrimes char *homephone; /* pointer to home phone no. */ 471592Srgrimes char *name; /* login name */ 481592Srgrimes char *office; /* pointer to office name */ 491592Srgrimes char *officephone; /* pointer to office phone no. */ 501592Srgrimes char *realname; /* pointer to full name */ 511592Srgrimes char *shell; /* user's shell */ 521592Srgrimes time_t mailread; /* last time mail was read */ 531592Srgrimes time_t mailrecv; /* last time mail was read */ 541592Srgrimes struct where *whead, *wtail; /* list of where user is or has been */ 551592Srgrimes} PERSON; 561592Srgrimes 571592Srgrimesenum status { LASTLOG, LOGGEDIN }; 581592Srgrimes 591592Srgrimestypedef struct where { 601592Srgrimes struct where *next; /* next place user is or has been */ 611592Srgrimes enum status info; /* type/status of request */ 621592Srgrimes short writable; /* tty is writable */ 631592Srgrimes time_t loginat; /* time of (last) login */ 641592Srgrimes time_t idletime; /* how long idle (if logged in) */ 651592Srgrimes char *tty; /* tty line */ 661592Srgrimes char *host; /* remote host name */ 671592Srgrimes} WHERE; 681592Srgrimes