home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 15 / 15.iso / s / s053 / 9.ddi / usr / include / sys / strlog.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-12-08  |  1.9 KB  |  76 lines

  1. /*    Copyright (c) 1990 UNIX System Laboratories, Inc.    */
  2. /*    Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T    */
  3. /*      All Rights Reserved      */
  4.  
  5. /*    THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF         */
  6. /*    UNIX System Laboratories, Inc.                         */
  7. /*    The copyright notice above does not evidence any       */
  8. /*    actual or intended publication of such source code.    */
  9.  
  10. #ifndef _SYS_STRLOG_H
  11. #define _SYS_STRLOG_H
  12.  
  13. #ident    "@(#)/usr/include/sys/strlog.h.sl 1.1 4.0 12/08/90 36663 AT&T-USL"
  14. /*
  15.  * Streams Log Driver Interface Definitions
  16.  */
  17.  
  18. /*
  19.  * structure of control portion of log message
  20.  */
  21. struct log_ctl {
  22.     short    mid;
  23.     short    sid;
  24.     char     level;        /* level of message for tracing */
  25.     short    flags;        /* message disposition */
  26.     clock_t    ltime;        /* time in machine ticks since boot */
  27.     time_t    ttime;        /* time in seconds since 1970 */
  28.     long    seq_no;        /* sequence number */
  29.     int    pri;        /* priority = (facility|level) */
  30. };
  31.  
  32. /* Flags for log messages */
  33.  
  34. #define SL_FATAL    0x01    /* indicates fatal error */
  35. #define SL_NOTIFY    0x02    /* logger must notify administrator */
  36. #define SL_ERROR    0x04    /* include on the error log */
  37. #define SL_TRACE    0x08    /* include on the trace log */
  38. #define SL_CONSOLE    0x10    /* log message to console */
  39. #define SL_WARN        0x20    /* warning message */
  40. #define SL_NOTE        0x40    /* notice message */
  41.  
  42. /*
  43.  * Structure defining ids and levels desired by the tracer (I_TRCLOG).
  44.  */
  45. struct trace_ids {
  46.     short ti_mid;
  47.     short ti_sid;
  48.     char  ti_level;
  49. };
  50.  
  51. /*
  52.  * Log Driver I_STR ioctl commands
  53.  */
  54.  
  55. #define LOGCTL        (('L')<<8)
  56. #define I_TRCLOG    (LOGCTL|1)    /* process is tracer */
  57. #define I_ERRLOG    (LOGCTL|2)    /* process is error logger */
  58. #define I_CONSLOG    (LOGCTL|3)    /* process is console logger */
  59.  
  60. /*
  61.  * Parameter definitions for logger messages 
  62.  */
  63. #define LOGMSGSZ    1024
  64. #define NLOGARGS    3
  65.  
  66. #ifdef _KERNEL
  67. #if defined(__STDC__)
  68. /*PRINTFLIKE5*/
  69. extern int strlog(short, short, char, unsigned short, char *, ...);
  70. #else
  71. extern int strlog();
  72. #endif
  73. #endif
  74.  
  75. #endif    /* _SYS_STRLOG_H */
  76.