home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.0 / NeXTSTEP3.0.iso / NextDeveloper / Headers / bsd / utmp.h < prev    next >
C/C++ Source or Header  |  1990-01-22  |  784b  |  29 lines

  1. /*
  2.  * Copyright (c) 1980 Regents of the University of California.
  3.  * All rights reserved.  The Berkeley software License Agreement
  4.  * specifies the terms and conditions for redistribution.
  5.  *
  6.  *    @(#)utmp.h    5.1 (Berkeley) 5/30/85
  7.  */
  8.  
  9. /*
  10.  * Structure of utmp and wtmp files.
  11.  *
  12.  * Assuming the number 8 is unwise.
  13.  */
  14. struct utmp {
  15.     char    ut_line[8];        /* tty name */
  16.     char    ut_name[8];        /* user id */
  17.     char    ut_host[16];        /* host name, if remote */
  18.     long    ut_time;        /* time on */
  19. };
  20.  
  21. /*
  22.  * This is a utmp entry that does not correspond to a genuine user
  23.  */
  24. #define nonuser(ut) ((ut).ut_host[0] == 0 && \
  25.     strncmp((ut).ut_line, "tty", 3) == 0 && ((ut).ut_line[3] == 'p' \
  26.                           || (ut).ut_line[3] == 'q' \
  27.                           || (ut).ut_line[3] == 'r' \
  28.                           || (ut).ut_line[3] == 's'))
  29.