home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 11 Util / 11-Util.zip / 3COMM.ZIP / H.ZIP / ERRLOG.H < prev    next >
C/C++ Source or Header  |  1989-05-17  |  14KB  |  516 lines

  1. /********************************************************************
  2.  **                   Microsoft OS/2 LAN Manager                   **
  3.  **            Copyright(c) Microsoft Corp., 1987, 1988            **
  4.  ********************************************************************/
  5.  
  6. /********************************************************************
  7.  *                                    *
  8.  *  About this file ...  ERRLOG.H                    *
  9.  *                                    *
  10.  *  This file contains information about the NetErrorLog APIs.        *
  11.  *                                    *
  12.  *    Function prototypes.                        *
  13.  *                                    *
  14.  *    Data structure templates.                    *
  15.  *                                    *
  16.  *    Definition of special values.                    *
  17.  *                                    *
  18.  *                                    *
  19.  *  NOTE:  You must include NETCONS.H before this file, since this  *
  20.  *       file    depends on values defined in NETCONS.H.            *
  21.  *                                    *
  22.  ********************************************************************/
  23.  
  24.  
  25. /**************************************************************** 
  26.  *                                *
  27.  *          Function prototypes                 *
  28.  *                                *
  29.  ****************************************************************/
  30.  
  31. extern API_FUNCTION
  32.   NetErrorLogOpen ( const char far *, unsigned far *, char far * );
  33.  
  34. extern API_FUNCTION
  35.   NetErrorLogClear ( const char far *, const char far *, char far * );
  36.  
  37. extern API_FUNCTION
  38.   NetErrorLogWrite ( char far *, unsigned short, const char far *, 
  39.                     const char far *, 
  40.                       unsigned short, const char far *, 
  41.                     unsigned short, char far * );
  42.  
  43.  
  44. /**************************************************************** 
  45.  *                                *
  46.  *          Data structure templates            *
  47.  *                                *
  48.  ****************************************************************/
  49.  
  50.  
  51. struct error_log {
  52.     unsigned short    el_len;
  53.     unsigned short  el_reserved;
  54.     unsigned long    el_time;
  55.     unsigned short    el_error;
  56.         char            el_name[SNLEN+1];
  57.     unsigned short  el_data_offset;
  58.     unsigned short  el_nstrings;
  59. }; /* error_log */
  60.  
  61.  
  62. /**************************************************************** 
  63.  *                                *
  64.  *          Special values and constants            *
  65.  *                                *
  66.  ****************************************************************/
  67.  
  68.  
  69. /***    ERRLOG_BASE is the base of error log codes,
  70.  *    chosen to avoid conflict with OS, redirector,
  71.  *    and netapi codes.
  72.  */
  73.  
  74. #define ERRLOG_BASE    3100        /* NELOG errs start here */
  75.  
  76.  
  77.  
  78. /*
  79.  *    Generic (could be used by more than one service)
  80.  *      error log messages from 0 to 25
  81.  */
  82.  
  83. #define NELOG_Internal_Error        (ERRLOG_BASE + 0)
  84.     /*
  85.      * The operation failed because a network software error occurred.
  86.      */
  87.  
  88.  
  89. #define NELOG_Resource_Shortage        (ERRLOG_BASE + 1)
  90.     /*
  91.      * The system ran out of the resource controlled by initialization
  92.      *  parameter %1.
  93.      */
  94.  
  95. #define NELOG_Unable_To_Lock_Segment    (ERRLOG_BASE + 2)
  96.     /*
  97.      * The service failed to obtain a long-term lock on the 
  98.      *  segment for NCBs. The error code is the data.
  99.      */
  100.  
  101. #define NELOG_Unable_To_Unlock_Segment    (ERRLOG_BASE + 3)
  102.     /*
  103.      * The service failed to release the long-term lock on the
  104.      *  segment for NCBs. The error code is the data.
  105.      */
  106.  
  107. #define NELOG_Uninstall_Service        (ERRLOG_BASE + 4)
  108.     /*
  109.      * There was an error uninstalling service %1.
  110.      *  The error code from NetServiceControl is the data.
  111.      */
  112.  
  113. #define NELOG_Init_Exec_Fail        (ERRLOG_BASE + 5)
  114.     /*
  115.      * Initialization failed because of an OS\2 exec failure on 
  116.      *  path %1. The OS\2 error code is the data.
  117.      */
  118.  
  119. #define NELOG_Ncb_Error            (ERRLOG_BASE + 6)
  120.     /*
  121.      * An unexpected NCB was received. The NCB is the data.
  122.      */
  123.  
  124. #define NELOG_Net_Not_Started        (ERRLOG_BASE + 7)
  125.     /*
  126.       * The network is not started.
  127.      */
  128.  
  129. #define NELOG_Ioctl_Error        (ERRLOG_BASE + 8)
  130.     /*
  131.       * DosDevIoctl to the redirector failed.
  132.      *    data is:  DWORD  approx CS:IP of call to ioctl
  133.      *          WORD   error code
  134.      *          WORD   ioctl number
  135.      */
  136.  
  137. #define NELOG_System_Semaphore        (ERRLOG_BASE + 9)
  138.     /*
  139.      * Unable to create or open system semaphore %1.
  140.      *  The error code is the data.
  141.      */
  142.  
  143. #define NELOG_Init_OpenCreate_Err    (ERRLOG_BASE + 10)
  144.     /*
  145.      * Initialization failed because of an open/create error on the
  146.      *  file %1. The OS/2 error code is in the data.
  147.      */
  148.  
  149. #define NELOG_NetBios            (ERRLOG_BASE + 11)
  150.     /*
  151.      * An unexpected NetBios error occurred.
  152.      *  The error code is the data.
  153.      */
  154.  
  155. #define NELOG_SMB_Illegal        (ERRLOG_BASE + 12)
  156.     /*
  157.      * An illegal SMB was received.
  158.      *  The SMB is the data.
  159.      */
  160.  
  161. #define NELOG_Service_Fail        (ERRLOG_BASE + 13)
  162.     /*
  163.      * Initialization failed because the requested service %1 
  164.      *  could not be installed.
  165.      */
  166.  
  167. #define NELOG_Entries_Lost        (ERRLOG_BASE + 14)
  168.     /*
  169.       * Some error log entries have been lost due to buffer overflow.
  170.      */
  171.  
  172.  
  173. /*
  174.  *    Server specific error log messages from 20 to 40
  175.  */
  176.  
  177. #define NELOG_Init_Seg_Overflow        (ERRLOG_BASE + 20)
  178.     /*
  179.      * Initialization parameters controlling resource usage other
  180.      *  than net buffers are sized so that too much memory is needed. 
  181.      */
  182.  
  183. #define NELOG_Srv_No_Mem_Grow        (ERRLOG_BASE + 21)
  184.     /* 
  185.      * The Server cannot increase the size of a memory segment.
  186.      */
  187.  
  188. #define NELOG_Access_File_Bad        (ERRLOG_BASE + 22)
  189.     /*
  190.      * Initialization failed because account file: %1 is either incorrect
  191.      * or not present.
  192.      */
  193.  
  194. #define NELOG_Srvnet_Not_Started    (ERRLOG_BASE + 23)
  195.     /*
  196.      * Initialization failed because network: %1 was not started.
  197.      */
  198.  
  199. #define NELOG_Init_Chardev_Err        (ERRLOG_BASE + 24)
  200.     /*
  201.      * The Server failed to install. Either all three chdev 
  202.      *  parameters must be zero or all three must be nonzero.
  203.      */
  204.  
  205. #define NELOG_Remote_API        (ERRLOG_BASE + 25)
  206.     /* A remote API request was halted due to the following
  207.      * invalid description string: %1.
  208.      */
  209.  
  210. #define NELOG_Ncb_TooManyErr        (ERRLOG_BASE + 26)
  211.     /* The network described by %1 has run out of ncb's.  Suggest you
  212.      *  increase the configured ncb's for this net.  The raw data
  213.      *  contains the count of server submitted ncb's at the time of
  214.      *  the error.
  215.      */
  216.  
  217. #define NELOG_Mailslot_err        (ERRLOG_BASE + 27)
  218.     /* There was an error creating the mailslot %1.  
  219.      * The server cannot process the RELEASEMEMORY alert.  The error 
  220.      * is in the data.
  221.      */
  222.  
  223. #define NELOG_ReleaseMem_Alert        (ERRLOG_BASE + 28)
  224.     /* The server failed to register for the RELEASEMEMORY alert,
  225.      * with recipient %1.  The error code from 
  226.      * NetAlertStart is in the data.
  227.      */
  228.  
  229. #define NELOG_AT_cannot_write        (ERRLOG_BASE + 29)
  230.     /* The server cannot update the AT schedule file.  The file
  231.      * is corrupt.
  232.      */
  233.  
  234. /*
  235.  *    Message service and POPUP specific error log messages from 40 to 55
  236.  */
  237.  
  238. #define NELOG_Msg_Shutdown        (ERRLOG_BASE + 40)
  239.     /*
  240.      * The service has stopped due to repeated consecutive
  241.      *  occurrences of an NCB error. NCB follows in raw data.
  242.      */
  243.      
  244. #define NELOG_Msg_Sem_Shutdown        (ERRLOG_BASE + 41)
  245.     /*
  246.      * The Message Server has stopped due to a lock on the
  247.      *  Message Server shared data segment.
  248.      */
  249.  
  250. #define    NELOG_Msg_Log_Err        (ERRLOG_BASE + 50)
  251.     /*
  252.      * A file system error occurred while opening or writing to the 
  253.      *  system message log file, %1. Message logging has been 
  254.      *  switched off due to the error. The error code is the data.
  255.      */
  256.  
  257.  
  258. #define NELOG_VIO_POPUP_ERR        (ERRLOG_BASE + 51)
  259.     /*
  260.      * Unable to display message POPUP due to OS/2 VIO call error.
  261.      *  The error code is the data.
  262.      */
  263.  
  264.  
  265. #define    NELOG_Msg_Unexpected_SMB_Type    (ERRLOG_BASE + 52)
  266.     /*
  267.      * An illegal SMB was received.
  268.      *  The SMB is the data.
  269.      */
  270.  
  271.     
  272. /*
  273.  *    Workstation specific error log messages from 60 to 75
  274.  */
  275.  
  276.  
  277. #define NELOG_Wksta_Infoseg        (ERRLOG_BASE + 60)
  278.     /*
  279.      * The Workstation information segment is bigger than 64k bytes.
  280.      *  The DWORD size is the data.
  281.      */
  282.  
  283. #define NELOG_Wksta_Compname        (ERRLOG_BASE + 61)
  284.     /*
  285.      * The Workstation was unable to get the name-number of computer name.
  286.      */
  287.  
  288. #define NELOG_Wksta_BiosThreadFailure    (ERRLOG_BASE + 62)
  289.     /*
  290.      * The Workstation could not initialize the Async NetBios Thread
  291.      *  The error code is the data.
  292.      */
  293.  
  294. #define NELOG_Wksta_IniSeg        (ERRLOG_BASE + 63)
  295.     /*
  296.      * The Workstation could not open the initial shared segment.
  297.      *  The error code is the data.
  298.      */
  299.  
  300.  
  301. #define NELOG_Wksta_HostTab_Full    (ERRLOG_BASE + 64)
  302.     /*
  303.      * The Workstation host table is full.
  304.      */
  305.  
  306.  
  307. #define NELOG_Wksta_Bad_Mailslot_SMB    (ERRLOG_BASE + 65)
  308.     /*
  309.      * A bad mailslot SMB was received.
  310.      *  The SMB is the data.
  311.      */
  312.  
  313.  
  314.  
  315. /*
  316.  *    Alerter service specific error log messages from 70 to 79
  317.  */
  318.  
  319.  
  320. #define NELOG_Build_Name        (ERRLOG_BASE + 70)
  321.     /*
  322.      * There was an error in building the list of names to alert. The
  323.      *  error code is %1.
  324.      */
  325.  
  326. #define NELOG_Name_Expansion        (ERRLOG_BASE + 71)
  327.     /*
  328.      * There was an error expanding %1 as a group name. Try
  329.      *  splitting the group into two or more smaller groups.
  330.      */
  331.  
  332.  
  333. #define NELOG_Message_Send        (ERRLOG_BASE + 72)
  334.     /*
  335.      * There was an error sending %2 the alert message -
  336.      *  (
  337.      *  %3 )
  338.      *  The error code is %1.
  339.      */
  340.  
  341.  
  342. #define NELOG_Mail_Slt_Err        (ERRLOG_BASE + 73)
  343.     /*
  344.      * There was an error in creating or reading the alerter mailslot.
  345.      *  The error code is %1.
  346.      */
  347.  
  348.  
  349.  
  350. #define NELOG_AT_cannot_read        (ERRLOG_BASE + 74)
  351.     /*
  352.      * The Server could not read the AT schedule file.
  353.      */
  354.  
  355. #define NELOG_AT_sched_err        (ERRLOG_BASE + 75)
  356.     /*
  357.      * The Server found an invalid AT schedule record.
  358.      */
  359.  
  360. #define NELOG_AT_schedule_file_created    (ERRLOG_BASE + 76)
  361.     /*
  362.      * The Server could not find an AT schedule file so it created one.
  363.      */
  364.  
  365. #define NELOG_Srvnet_NB_Open        (ERRLOG_BASE + 77)
  366.     /*
  367.      * The Server could not NetBiosOpen network %1.
  368.      */
  369.  
  370. #define NELOG_AT_Exec_Err        (ERRLOG_BASE + 78)
  371.     /*
  372.      * The AT processor could not exec %1.
  373.          */
  374.  
  375. /*
  376.  *      Cache Lazy Write specific error log messages from 80 to 84
  377.  */
  378.  
  379. #define NELOG_Lazy_Write_Err            (ERRLOG_BASE + 80)
  380.         /*
  381.          * WARNING : The Lazy Write process encountered an error when
  382.          *           writing to drive %1. The disk contains corrupted
  383.          *           data. The cache has been stopped.
  384.          */
  385.  
  386.  
  387. /*
  388.  *    Netwksta.sys specific error log messages from 90 to 99
  389.  */
  390.  
  391. #define NELOG_NetWkSta_Internal_Error    (ERRLOG_BASE + 90)
  392.     /*
  393.      * A NetWksta internal error has occurred:
  394.      *  %1
  395.      */
  396.  
  397. #define NELOG_NetWkSta_No_Resource    (ERRLOG_BASE + 91)
  398.     /*
  399.      * The redirector is out of a resource: %1.
  400.      */
  401.  
  402. #define NELOG_NetWkSta_SMB_Err        (ERRLOG_BASE + 92)
  403.     /*
  404.      * An SMB error occurred on connection to %1.
  405.      *  The SMB header is the data.
  406.      */
  407.  
  408. #define NELOG_NetWkSta_VC_Err        (ERRLOG_BASE + 93)
  409.     /*
  410.      * A Virtual Circuit error occurred on the session to %1.
  411.      *  The NCB command and return code is the data.
  412.      */
  413.  
  414. #define NELOG_NetWkSta_Stuck_VC_Err    (ERRLOG_BASE + 94)
  415.     /*
  416.      * Hanging up a stuck session to %1.
  417.      */
  418.  
  419. #define NELOG_NetWkSta_NCB_Err        (ERRLOG_BASE + 95)
  420.     /*
  421.      * An NCB error occurred (%1).
  422.      *  The NCB is the data.
  423.      */
  424.  
  425. #define NELOG_NetWkSta_Write_Behind_Err    (ERRLOG_BASE + 96)
  426.     /*
  427.      * A write operation to %1 failed.
  428.      *  Data may have been lost.
  429.      */
  430.  
  431. #define NELOG_NetWkSta_Reset_Err    (ERRLOG_BASE + 97)
  432.     /*
  433.      * Reset of driver %1 failed to complete the NCB.
  434.      *  The NCB is the data.
  435.      */
  436.  
  437. #define    NELOG_NetWkSta_Too_Many        (ERRLOG_BASE + 98)
  438.     /*
  439.          * The amount of resource %1 requested was more 
  440.      *  than the maximum. The maximum amount was allocated.
  441.      */
  442.  
  443. /*
  444. /*
  445.  *    Spooler specific error log messages from 100 to 109
  446.  */
  447.  
  448. #define NELOG_Spooler_Exec_Failed        (ERRLOG_BASE + 100)
  449.     /*
  450.      * The exec of SPOOLER.EXE failed.
  451.      */
  452.  
  453. #define NELOG_Cannot_Make_Spooldir        (ERRLOG_BASE + 101)
  454.     /*
  455.      * Spooler initialization cannot make the spool directory.
  456.      */
  457.  
  458. #define NELOG_Spooler_Handshake_Failed        (ERRLOG_BASE + 102)
  459.     /*
  460.      * The Spooler did not handshake with initialization process.
  461.      */
  462.  
  463. #define NELOG_Q_Config_Error            (ERRLOG_BASE + 103)
  464.     /*
  465.      * A print queue %1 configuration error occurred. 
  466.      *  The %2 file cannot be found.
  467.      */
  468.  
  469. #define NELOG_Srv_Thread_Failure        (ERRLOG_BASE + 104)
  470.     /*
  471.      * The server could not create a thread.
  472.      *  The THREADS parameter in CONFIG.SYS should be increased.
  473.      */
  474.  
  475. #define NELOG_Srv_Close_Failure         (ERRLOG_BASE + 105)
  476.     /*
  477.      * The server could not close %1.
  478.      *  The file is probably corrupt.
  479.      */
  480.      
  481. #define NELOG_Srv_DBToo_Small                   (ERRLOG_BASE + 106)
  482.     /*
  483.          * The user access file is not large enough to hold all the user
  484.          *  and group information.
  485.      */
  486.      
  487. #define NELOG_Srv_Encryp_Err                    (ERRLOG_BASE + 107)
  488.     /*
  489.          * There is an encryption problem.
  490.          *  Your Server/Redirector combination may be incompatible.
  491.      */
  492.      
  493. /**************************************************************** 
  494.  * Microsoft has created a generic error log entry for OEMs to use to
  495.  * log errors from OEM value added services.  The code, which is the
  496.  * 2nd arg to NetErrorLogWrite, is 3299.  This value is manifest in
  497.  * net/h/errlog.h as NELOG_OEM_Code.  The text for error log entry
  498.  * NELOG_OEM_Code is:  "%1 %2 %3 %4 %5 %6 %7 %8 %9.".
  499.  * 
  500.  * Microsoft suggests that OEMs use the insertion strings as follows:
  501.  * %1:  OEM System Name (e.g. 3+Open)
  502.  * %2:  OEM Service Name (e.g. 3+Mail)
  503.  * %3:  Severity level (e.g.  error, warning, etc.)
  504.  * %4:  OEM error log entry sub-identifier  (e.g. error code #)
  505.  * %5 - % 9:  Text.
  506.  * 
  507.  * The call to NetErrorWrite must set nstrings = 9, and provide 9
  508.  * ASCIIZ strings.  If the caller does not have 9 insertion strings,
  509.  * provide null strings for the empty insertion strings.
  510.  ****************************************************************/
  511.  
  512. #define NELOG_OEM_Code                 (ERRLOG_BASE + 199)
  513.     /*
  514.      * %1 %2 %3 %4 %5 %6 %7 %8 %9.
  515.      */
  516.