home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume25 / finger / part02 / luser.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-04-03  |  1.8 KB  |  57 lines

  1. /*
  2.  * luser.h -- per utmp entry information (December 1985)
  3.  *
  4.  * Copyright (C) 1986, 1990  Philip L. Budne
  5.  *
  6.  * This file is part of "Phil's Finger Program".
  7.  *
  8.  * This program is free software; you can redistribute it and/or modify
  9.  * it under the terms of the GNU General Public License as published by
  10.  * the Free Software Foundation; either version 1, or (at your option)
  11.  * any later version.
  12.  *
  13.  */
  14.  
  15. # define LUSER_RCSID "$Id: luser.h,v 3.0 90/07/06 13:11:17 budd Rel $"
  16.  
  17. # define ULEN 9            /* user length */
  18. # define TLEN 9            /* tty (line) length */
  19. # define HLEN 40        /* host name length */
  20.  
  21. typedef struct luser {        /* per-login/tty information */
  22.     /* use pointers for user, line, host? */
  23.     char u_user[ULEN];        /* user name */
  24.     char u_line[TLEN];        /* tty name */
  25.     char u_host[HLEN];        /* fn host (if any) */
  26.     time_t u_time;        /* login time */
  27.     time_t u_idle;        /* time of last terminal act. */
  28.     struct person *u_person;    /* personal information */
  29.     struct luser *u_left, *u_right; /* children for btree */
  30.     unsigned short u_flags;    /* flagies */
  31.     dev_t u_ttydev;        /* device number of tty */
  32.     struct pr *u_command, *u_daemonp; /* "current" process, daemon process */
  33.     struct daemon *u_daemon;    /* daemon if any */
  34. # ifdef Umax
  35.     long  u_ttyaddr;        /* inet addr of annex/rdp tty */
  36.     short u_ttytype;        /* device type of annex/rdp tty */
  37.     short u_ttynum;        /* device number of annex/rdp tty */
  38. # endif /* Umax defined */
  39.     struct switches u_sw;    /* per luser arg flags (from selector!) */
  40. } LUSER;
  41.  
  42. # define LTREE LUSER
  43.  
  44. /* in u_flags */
  45. # define U_NOWRITE 001        /* msg n */
  46. # define U_BIFF       002        /* biff y */
  47. # define U_NLI     004        /* not logged in */
  48. # define U_FOUND   010        /* found logged in */
  49. # define U_HUNGRY  020        /* hungry y */
  50. # define U_BADTTY  040        /* could not stat tty */
  51.  
  52. /*
  53.  * Local variables:
  54.  * comment-column: 32
  55.  * End:
  56.  */
  57.