home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 1 / ARM_CLUB_CD.iso / contents / apps / desktop / t / utils / !Logger_H_internal < prev    next >
Encoding:
Text File  |  1993-05-23  |  2.5 KB  |  95 lines

  1. /*
  2.  *
  3.  *      Title     : Logger internal header file.
  4.  *      System    : Any
  5.  *      Version     "2.2"
  6.  *      Copyright : (c) John H. Winters
  7.  *      Date      : 28th September, 1992
  8.  *      Author    : John H. Winters
  9.  *
  10.  *      Function  : Declares items common between netlog and logger.
  11.  *
  12.  *
  13.  *      Modification history.
  14.  *
  15.  *      Version   : 2.1
  16.  *      Date      : 13th November, 1992
  17.  *      Author    : John H. Winters
  18.  *      Changes   : Added DROP_DEAD macro.
  19.  *
  20.  *      Version   : 2.2
  21.  *      Date      : 10th January, 1993
  22.  *      Author    : John H. Winters
  23.  *      Changes   : Adapted to suit new SDF i/f.
  24.  *
  25.  *      Version   :
  26.  *      Date      :
  27.  *      Author    :
  28.  *      Changes   :
  29.  *
  30.  */
  31.  
  32. /*
  33.  *============================================================================
  34.  *
  35.  *  Hash defines.
  36.  *
  37.  *============================================================================
  38.  */
  39.  
  40. #define BUFFER_SIZE      256
  41. #define DROP_DEAD        7
  42. #define FORMAT_VERSION   1
  43. #define LOG_IDENT        100
  44. #define LOG_MAX_TASKNAME 8
  45. #define MAILSLOT_NAME    "\\MAILSLOT\\LOGGER"
  46. #define OLD_LOG_IDENT    5
  47. #define QUEUE_NAME       "\\QUEUES\\LOGGER"
  48. #define QUEUE_PRIORITY   8
  49. #define REMOTE_SLOT      "\\\\*\\MAILSLOT\\LOGGER"
  50.  
  51. /*
  52.  *============================================================================
  53.  *
  54.  *  Type definitions.
  55.  *
  56.  *============================================================================
  57.  */
  58.  
  59. /*
  60.  *  These next two are for reverse compatibility only.  They allow the
  61.  *  new logger to accept messages from old processes.
  62.  */
  63. typedef struct {
  64.     u16 ident ;
  65.     u16 size ;
  66.     u16 padding ;
  67. } t_old_msg_header ;
  68.  
  69. typedef struct {
  70.     t_old_msg_header header ;
  71.     u8               body [BUFFER_SIZE] ;
  72. } t_old_msg ;
  73.  
  74. /*
  75.  *  Now the new structure.  Note that this structure is used to pass log
  76.  *  messages in two distinct ways.  It is passed from the generating
  77.  *  process to a logger process in a relatively raw form, in order to be
  78.  *  independent of the standard message building and communication libraries.
  79.  *  Once it has reached the logger process, it may be passed on further,
  80.  *  but then it will be a layer 7 data item in a proper inter-process
  81.  *  message, subject to all the usual session management etc.
  82.  */
  83. typedef struct {
  84.     u8        ident ;
  85.     u8        format_version ;
  86.     u8        text_length [2] ;
  87.     u8        severity ;
  88.     u8        task_name [LOG_MAX_TASKNAME] ;
  89.     u8        timestamp [LOG_TIMESTAMP_LEN] ;
  90.     /*
  91.      *  Followed by the text of the message.
  92.      */
  93. } t_NL_Header ;
  94.  
  95.