sys_info.h 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417
  1. /* BSDI sys_info.h,v 1.6 1998/06/03 19:14:59 karels Exp */
  2. /*
  3. * Copyright (c) 1996-1999 Distributed Processing Technology Corporation
  4. * All rights reserved.
  5. *
  6. * Redistribution and use in source form, with or without modification, are
  7. * permitted provided that redistributions of source code must retain the
  8. * above copyright notice, this list of conditions and the following disclaimer.
  9. *
  10. * This software is provided `as is' by Distributed Processing Technology and
  11. * any express or implied warranties, including, but not limited to, the
  12. * implied warranties of merchantability and fitness for a particular purpose,
  13. * are disclaimed. In no event shall Distributed Processing Technology be
  14. * liable for any direct, indirect, incidental, special, exemplary or
  15. * consequential damages (including, but not limited to, procurement of
  16. * substitute goods or services; loss of use, data, or profits; or business
  17. * interruptions) however caused and on any theory of liability, whether in
  18. * contract, strict liability, or tort (including negligence or otherwise)
  19. * arising in any way out of the use of this driver software, even if advised
  20. * of the possibility of such damage.
  21. *
  22. */
  23. #ifndef __SYS_INFO_H
  24. #define __SYS_INFO_H
  25. /*File - SYS_INFO.H
  26. ****************************************************************************
  27. *
  28. *Description:
  29. *
  30. * This file contains structure definitions for the OS dependent
  31. *layer system information buffers.
  32. *
  33. *Copyright Distributed Processing Technology, Corp.
  34. * 140 Candace Dr.
  35. * Maitland, Fl. 32751 USA
  36. * Phone: (407) 830-5522 Fax: (407) 260-5366
  37. * All Rights Reserved
  38. *
  39. *Author: Don Kemper
  40. *Date: 5/10/94
  41. *
  42. *Editors:
  43. *
  44. *Remarks:
  45. *
  46. *
  47. *****************************************************************************/
  48. /*Include Files ------------------------------------------------------------- */
  49. #include "osd_util.h"
  50. #ifndef NO_PACK
  51. #if defined (_DPT_AIX)
  52. #pragma options align=packed
  53. #else
  54. #pragma pack(1)
  55. #endif /* aix */
  56. #endif // no unpack
  57. /*struct - driveParam_S - start
  58. *===========================================================================
  59. *
  60. *Description:
  61. *
  62. * This structure defines the drive parameters seen during
  63. *booting.
  64. *
  65. *---------------------------------------------------------------------------*/
  66. #ifdef __cplusplus
  67. struct driveParam_S {
  68. #else
  69. typedef struct {
  70. #endif
  71. uSHORT cylinders; /* Up to 1024 */
  72. uCHAR heads; /* Up to 255 */
  73. uCHAR sectors; /* Up to 63 */
  74. #ifdef __cplusplus
  75. //---------- Portability Additions ----------- in sp_sinfo.cpp
  76. #ifdef DPT_PORTABLE
  77. uSHORT netInsert(dptBuffer_S *buffer);
  78. uSHORT netExtract(dptBuffer_S *buffer);
  79. #endif // DPT PORTABLE
  80. //--------------------------------------------
  81. };
  82. #else
  83. } driveParam_S;
  84. #endif
  85. /*driveParam_S - end */
  86. /*struct - sysInfo_S - start
  87. *===========================================================================
  88. *
  89. *Description:
  90. *
  91. * This structure defines the command system information that
  92. *should be returned by every OS dependent layer.
  93. *
  94. *---------------------------------------------------------------------------*/
  95. /*flags - bit definitions */
  96. #define SI_CMOS_Valid 0x0001
  97. #define SI_NumDrivesValid 0x0002
  98. #define SI_ProcessorValid 0x0004
  99. #define SI_MemorySizeValid 0x0008
  100. #define SI_DriveParamsValid 0x0010
  101. #define SI_SmartROMverValid 0x0020
  102. #define SI_OSversionValid 0x0040
  103. #define SI_OSspecificValid 0x0080 /* 1 if OS structure returned */
  104. #define SI_BusTypeValid 0x0100
  105. #define SI_ALL_VALID 0x0FFF /* All Std SysInfo is valid */
  106. #define SI_NO_SmartROM 0x8000
  107. /*busType - definitions */
  108. #define SI_ISA_BUS 0x00
  109. #define SI_MCA_BUS 0x01
  110. #define SI_EISA_BUS 0x02
  111. #define SI_PCI_BUS 0x04
  112. #ifdef __cplusplus
  113. struct sysInfo_S {
  114. #else
  115. typedef struct {
  116. #endif
  117. uCHAR drive0CMOS; /* CMOS Drive 0 Type */
  118. uCHAR drive1CMOS; /* CMOS Drive 1 Type */
  119. uCHAR numDrives; /* 0040:0075 contents */
  120. uCHAR processorFamily; /* Same as DPTSIG's definition */
  121. uCHAR processorType; /* Same as DPTSIG's definition */
  122. uCHAR smartROMMajorVersion;
  123. uCHAR smartROMMinorVersion; /* SmartROM version */
  124. uCHAR smartROMRevision;
  125. uSHORT flags; /* See bit definitions above */
  126. uSHORT conventionalMemSize; /* in KB */
  127. uINT extendedMemSize; /* in KB */
  128. uINT osType; /* Same as DPTSIG's definition */
  129. uCHAR osMajorVersion;
  130. uCHAR osMinorVersion; /* The OS version */
  131. uCHAR osRevision;
  132. #ifdef _SINIX_ADDON
  133. uCHAR busType; /* See defininitions above */
  134. uSHORT osSubRevision;
  135. uCHAR pad[2]; /* For alignment */
  136. #else
  137. uCHAR osSubRevision;
  138. uCHAR busType; /* See defininitions above */
  139. uCHAR pad[3]; /* For alignment */
  140. #endif
  141. driveParam_S drives[16]; /* SmartROM Logical Drives */
  142. #ifdef __cplusplus
  143. //---------- Portability Additions ----------- in sp_sinfo.cpp
  144. #ifdef DPT_PORTABLE
  145. uSHORT netInsert(dptBuffer_S *buffer);
  146. uSHORT netExtract(dptBuffer_S *buffer);
  147. #endif // DPT PORTABLE
  148. //--------------------------------------------
  149. };
  150. #else
  151. } sysInfo_S;
  152. #endif
  153. /*sysInfo_S - end */
  154. /*struct - DOS_Info_S - start
  155. *===========================================================================
  156. *
  157. *Description:
  158. *
  159. * This structure defines the system information specific to a
  160. *DOS workstation.
  161. *
  162. *---------------------------------------------------------------------------*/
  163. /*flags - bit definitions */
  164. #define DI_DOS_HIGH 0x01 /* DOS is loaded high */
  165. #define DI_DPMI_VALID 0x02 /* DPMI version is valid */
  166. #ifdef __cplusplus
  167. struct DOS_Info_S {
  168. #else
  169. typedef struct {
  170. #endif
  171. uCHAR flags; /* See bit definitions above */
  172. uSHORT driverLocation; /* SmartROM BIOS address */
  173. uSHORT DOS_version;
  174. uSHORT DPMI_version;
  175. #ifdef __cplusplus
  176. //---------- Portability Additions ----------- in sp_sinfo.cpp
  177. #ifdef DPT_PORTABLE
  178. uSHORT netInsert(dptBuffer_S *buffer);
  179. uSHORT netExtract(dptBuffer_S *buffer);
  180. #endif // DPT PORTABLE
  181. //--------------------------------------------
  182. };
  183. #else
  184. } DOS_Info_S;
  185. #endif
  186. /*DOS_Info_S - end */
  187. /*struct - Netware_Info_S - start
  188. *===========================================================================
  189. *
  190. *Description:
  191. *
  192. * This structure defines the system information specific to a
  193. *Netware machine.
  194. *
  195. *---------------------------------------------------------------------------*/
  196. #ifdef __cplusplus
  197. struct Netware_Info_S {
  198. #else
  199. typedef struct {
  200. #endif
  201. uCHAR driverName[13]; /* ie PM12NW31.DSK */
  202. uCHAR serverName[48];
  203. uCHAR netwareVersion; /* The Netware OS version */
  204. uCHAR netwareSubVersion;
  205. uCHAR netwareRevision;
  206. uSHORT maxConnections; /* Probably 250 or 1000 */
  207. uSHORT connectionsInUse;
  208. uSHORT maxVolumes;
  209. uCHAR unused;
  210. uCHAR SFTlevel;
  211. uCHAR TTSlevel;
  212. uCHAR clibMajorVersion; /* The CLIB.NLM version */
  213. uCHAR clibMinorVersion;
  214. uCHAR clibRevision;
  215. #ifdef __cplusplus
  216. //---------- Portability Additions ----------- in sp_sinfo.cpp
  217. #ifdef DPT_PORTABLE
  218. uSHORT netInsert(dptBuffer_S *buffer);
  219. uSHORT netExtract(dptBuffer_S *buffer);
  220. #endif // DPT PORTABLE
  221. //--------------------------------------------
  222. };
  223. #else
  224. } Netware_Info_S;
  225. #endif
  226. /*Netware_Info_S - end */
  227. /*struct - OS2_Info_S - start
  228. *===========================================================================
  229. *
  230. *Description:
  231. *
  232. * This structure defines the system information specific to an
  233. *OS/2 machine.
  234. *
  235. *---------------------------------------------------------------------------*/
  236. #ifdef __cplusplus
  237. struct OS2_Info_S {
  238. #else
  239. typedef struct {
  240. #endif
  241. uCHAR something;
  242. #ifdef __cplusplus
  243. //---------- Portability Additions ----------- in sp_sinfo.cpp
  244. #ifdef DPT_PORTABLE
  245. uSHORT netInsert(dptBuffer_S *buffer);
  246. uSHORT netExtract(dptBuffer_S *buffer);
  247. #endif // DPT PORTABLE
  248. //--------------------------------------------
  249. };
  250. #else
  251. } OS2_Info_S;
  252. #endif
  253. /*OS2_Info_S - end */
  254. /*struct - WinNT_Info_S - start
  255. *===========================================================================
  256. *
  257. *Description:
  258. *
  259. * This structure defines the system information specific to a
  260. *Windows NT machine.
  261. *
  262. *---------------------------------------------------------------------------*/
  263. #ifdef __cplusplus
  264. struct WinNT_Info_S {
  265. #else
  266. typedef struct {
  267. #endif
  268. uCHAR something;
  269. #ifdef __cplusplus
  270. //---------- Portability Additions ----------- in sp_sinfo.cpp
  271. #ifdef DPT_PORTABLE
  272. uSHORT netInsert(dptBuffer_S *buffer);
  273. uSHORT netExtract(dptBuffer_S *buffer);
  274. #endif // DPT PORTABLE
  275. //--------------------------------------------
  276. };
  277. #else
  278. } WinNT_Info_S;
  279. #endif
  280. /*WinNT_Info_S - end */
  281. /*struct - SCO_Info_S - start
  282. *===========================================================================
  283. *
  284. *Description:
  285. *
  286. * This structure defines the system information specific to an
  287. *SCO UNIX machine.
  288. *
  289. *---------------------------------------------------------------------------*/
  290. #ifdef __cplusplus
  291. struct SCO_Info_S {
  292. #else
  293. typedef struct {
  294. #endif
  295. uCHAR something;
  296. #ifdef __cplusplus
  297. //---------- Portability Additions ----------- in sp_sinfo.cpp
  298. #ifdef DPT_PORTABLE
  299. uSHORT netInsert(dptBuffer_S *buffer);
  300. uSHORT netExtract(dptBuffer_S *buffer);
  301. #endif // DPT PORTABLE
  302. //--------------------------------------------
  303. };
  304. #else
  305. } SCO_Info_S;
  306. #endif
  307. /*SCO_Info_S - end */
  308. /*struct - USL_Info_S - start
  309. *===========================================================================
  310. *
  311. *Description:
  312. *
  313. * This structure defines the system information specific to a
  314. *USL UNIX machine.
  315. *
  316. *---------------------------------------------------------------------------*/
  317. #ifdef __cplusplus
  318. struct USL_Info_S {
  319. #else
  320. typedef struct {
  321. #endif
  322. uCHAR something;
  323. #ifdef __cplusplus
  324. //---------- Portability Additions ----------- in sp_sinfo.cpp
  325. #ifdef DPT_PORTABLE
  326. uSHORT netInsert(dptBuffer_S *buffer);
  327. uSHORT netExtract(dptBuffer_S *buffer);
  328. #endif // DPT PORTABLE
  329. //--------------------------------------------
  330. };
  331. #else
  332. } USL_Info_S;
  333. #endif
  334. /*USL_Info_S - end */
  335. /* Restore default structure packing */
  336. #ifndef NO_UNPACK
  337. #if defined (_DPT_AIX)
  338. #pragma options align=reset
  339. #elif defined (UNPACK_FOUR)
  340. #pragma pack(4)
  341. #else
  342. #pragma pack()
  343. #endif /* aix */
  344. #endif // no unpack
  345. #endif // __SYS_INFO_H