1*406cdd95SThomas Cort /* $NetBSD: finger.h,v 1.10 2007/05/05 16:55:17 christos Exp $ */ 2*406cdd95SThomas Cort 3*406cdd95SThomas Cort /* 4*406cdd95SThomas Cort * Copyright (c) 1989, 1993 5*406cdd95SThomas Cort * The Regents of the University of California. All rights reserved. 6*406cdd95SThomas Cort * 7*406cdd95SThomas Cort * This code is derived from software contributed to Berkeley by 8*406cdd95SThomas Cort * Tony Nardo of the Johns Hopkins University/Applied Physics Lab. 9*406cdd95SThomas Cort * 10*406cdd95SThomas Cort * Redistribution and use in source and binary forms, with or without 11*406cdd95SThomas Cort * modification, are permitted provided that the following conditions 12*406cdd95SThomas Cort * are met: 13*406cdd95SThomas Cort * 1. Redistributions of source code must retain the above copyright 14*406cdd95SThomas Cort * notice, this list of conditions and the following disclaimer. 15*406cdd95SThomas Cort * 2. Redistributions in binary form must reproduce the above copyright 16*406cdd95SThomas Cort * notice, this list of conditions and the following disclaimer in the 17*406cdd95SThomas Cort * documentation and/or other materials provided with the distribution. 18*406cdd95SThomas Cort * 3. Neither the name of the University nor the names of its contributors 19*406cdd95SThomas Cort * may be used to endorse or promote products derived from this software 20*406cdd95SThomas Cort * without specific prior written permission. 21*406cdd95SThomas Cort * 22*406cdd95SThomas Cort * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 23*406cdd95SThomas Cort * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24*406cdd95SThomas Cort * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25*406cdd95SThomas Cort * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 26*406cdd95SThomas Cort * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 27*406cdd95SThomas Cort * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 28*406cdd95SThomas Cort * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29*406cdd95SThomas Cort * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30*406cdd95SThomas Cort * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31*406cdd95SThomas Cort * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32*406cdd95SThomas Cort * SUCH DAMAGE. 33*406cdd95SThomas Cort * 34*406cdd95SThomas Cort * from: @(#)finger.h 8.1 (Berkeley) 6/6/93 35*406cdd95SThomas Cort */ 36*406cdd95SThomas Cort 37*406cdd95SThomas Cort 38*406cdd95SThomas Cort /* 39*406cdd95SThomas Cort * All unique persons are linked in a list headed by "head" and linkd 40*406cdd95SThomas Cort * by the "next" field, as well as kept in a hash table. 41*406cdd95SThomas Cort */ 42*406cdd95SThomas Cort 43*406cdd95SThomas Cort typedef struct person { 44*406cdd95SThomas Cort uid_t uid; /* user id */ 45*406cdd95SThomas Cort char *dir; /* user's home directory */ 46*406cdd95SThomas Cort char *homephone; /* pointer to home phone no. */ 47*406cdd95SThomas Cort char *name; /* login name */ 48*406cdd95SThomas Cort char *office; /* pointer to office name */ 49*406cdd95SThomas Cort char *officephone; /* pointer to office phone no. */ 50*406cdd95SThomas Cort char *realname; /* pointer to full name */ 51*406cdd95SThomas Cort char *shell; /* user's shell */ 52*406cdd95SThomas Cort time_t mailread; /* last time mail was read */ 53*406cdd95SThomas Cort time_t mailrecv; /* last time mail was read */ 54*406cdd95SThomas Cort struct where *whead, *wtail; /* list of where user is or has been */ 55*406cdd95SThomas Cort } PERSON; 56*406cdd95SThomas Cort 57*406cdd95SThomas Cort enum status { LASTLOG, LOGGEDIN }; 58*406cdd95SThomas Cort 59*406cdd95SThomas Cort typedef struct where { 60*406cdd95SThomas Cort struct where *next; /* next place user is or has been */ 61*406cdd95SThomas Cort enum status info; /* type/status of request */ 62*406cdd95SThomas Cort short writable; /* tty is writable */ 63*406cdd95SThomas Cort time_t loginat; /* time of (last) login */ 64*406cdd95SThomas Cort time_t idletime; /* how long idle (if logged in) */ 65*406cdd95SThomas Cort char *tty; /* tty line */ 66*406cdd95SThomas Cort char *host; /* remote host name */ 67*406cdd95SThomas Cort } WHERE; 68