source: trunk/include/helpers/ras.h@ 7

Last change on this file since 7 was 7, checked in by umoeller, 25 years ago

Initial checkin of helpers code, which used to be in WarpIN.

  • Property svn:eol-style set to CRLF
  • Property svn:keywords set to Author Date Id Revision
File size: 5.5 KB
Line 
1/*
2 *@@sourcefile ras.h:
3 * "Reliability, Availability, Serviceability" (RAS)
4 * prototypes. In other words, undocumented OS/2 functions
5 * for problem determination (system dumps, process dumps,
6 * tracing, etc.).
7 *
8 * This file has been taken directly from the OS/2 Debugging
9 * Handbook, V0.7a.
10 *
11 *@@added V0.9.0
12 */
13
14#ifndef RAS_HEADER_INCLUDED
15 #define RAS_HEADER_INCLUDED
16
17 /* definitions for DosDumpProcess */
18 #define DDP_DISABLEPROCDUMP 0x00000000L /* disable process dumps */
19 #define DDP_ENABLEPROCDUMP 0x00000001L /* enable process dumps */
20 #define DDP_PERFORMPROCDUMP 0x00000002L /* perform process dump */
21
22 /* definitions for DosSuppressPopUps */
23 #define SPU_DISABLESUPPRESSION 0x00000000L /* disable popup suppression */
24 #define SPU_ENABLESUPPRESSION 0x00000001L /* enable popup suppression */
25
26 /* definitions for DosQueryRASInfo Index */
27 #define SIS_MMIOADDR 0
28 #define SIS_MEC_TABLE 1
29 #define SIS_SYS_LOG 2
30 #define LF_LOGENABLE 0x0001 /* Logging enabled */
31 #define LF_LOGAVAILABLE 0x0002 /* Logging available */
32
33 APIRET APIENTRY DosQueryRASInfo(ULONG Index, PPVOID Addr);
34
35 APIRET APIENTRY DosForceSystemDump(ULONG reserved);
36
37 APIRET APIENTRY DosDumpProcess(ULONG Flag, ULONG Drive, PID Pid);
38
39 APIRET APIENTRY DosSuppressPopUps(ULONG Flag, ULONG Drive);
40
41 APIRET16 APIENTRY16 DosSysTrace(USHORT Majorcode, USHORT Length,
42 USHORT Minorcode, PCHAR pData);
43
44 APIRET16 APIENTRY16 DosGetSTDA(SEL, SHORT, SHORT );
45
46 /* 32-bit Logging Facility Function Prototypes */
47
48 /*--------------------------------------------*/
49 /* Logging Defines */
50 /*--------------------------------------------*/
51 #define ERRLOG_SERVICE 1L
52 #define ERRLOG_VERSION 1
53
54 /*--------------------------------------------*/
55 /* LogRecord status bits */
56 /*--------------------------------------------*/
57 #define LF_BIT_PROCNAME 0x0001L
58 #define LF_BIT_ORIGIN_256 0x0002L
59 #define LF_BIT_DATETIME 0x0004L
60 #define LF_BIT_SUSPEND 0x0008L
61 #define LF_BIT_RESUME 0x0010L
62 #define LF_BIT_REDIRECT 0x0020L
63 #define LF_BIT_GETSTATUS 0x0040L
64 #define LF_BIT_REGISTER 0x0080L
65 #define LF_BIT_REMOTE_FAIL 0x0100L
66
67 /*--------------------------------------------*/
68 /* Log Entry Record Header for 2.X */
69 /* This is format used by 2.0 device */
70 /* drivers and callers of LogAddEntries */
71 /*--------------------------------------------*/
72 typedef struct LogRecord
73 {
74 USHORT len ; /* this record length(includes len field)*/
75 USHORT rec_id ; /* record id */
76 ULONG status ; /* record status bits(see LF_BIT_) */
77 UCHAR qualifier[4] ; /* qualifier tag */
78 ULONG reserved ;
79 ULONG time ; /* hours minutes seconds hundreds */
80 ULONG date ; /* day month (USHORT)year */
81 UCHAR data[1] ; /* begin of variable data that includes: */
82 /* Originator(256 bytes if LF_BIT_ORIGIN_256)*/
83 /* else 8 bytes long */
84 /* Processname(260 bytes) only if status */
85 /* LF_BIT_PROCNMAME set */
86 /* FormatDLLName(12 bytes) */
87 /* Variable data */
88 } LOGRECORD ;
89 /* typedef LOGRECORD far *PLOGREC ; */
90
91 /*----------------------------------------------*/
92 /* Format of buffer sent to LogAddEntries */
93 /*----------------------------------------------*/
94 typedef struct LogEntryRec
95 {
96 USHORT version ; /* this version is 1 */
97 USHORT count ; /* number of log records in this buffer*/
98 LOGRECORD logrec ; /* repeated count times */
99 } LOGENTRYREC ;
100 /* typedef LOGENTRYREC far *PLOGENTRYREC ; */
101
102 /*--------------------------------------------------*/
103 /* Logging facility Function prototypes */
104 /*--------------------------------------------------*/
105 APIRET APIENTRY LogOpen( PHFILE phf );
106
107 APIRET APIENTRY LogClose( HFILE hf );
108
109 APIRET APIENTRY LogAddEntries( HFILE hf, ULONG ulService, PVOID pLogEntries );
110
111
112 /* 16-bit Logging Facility Function Prototypes */
113
114
115 APIRET16 APIENTRY16 DosLogRegister(PUSHORT LogHandle,
116 PVOID LogRegList,
117 PUSHORT RequestID);
118
119
120 APIRET16 APIENTRY16 DosLogEntry(USHORT Function,
121 PVOID LogData);
122
123 APIRET16 APIENTRY16 DosLogRead(USHORT LogHandle,
124 USHORT Length,
125 PVOID LogBuffer,
126 PUSHORT ReadSize);
127
128#endif
129
Note: See TracBrowser for help on using the repository browser.