SPROMEPS.H 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746
  1. /***************************************************************************
  2. * SPROMEPS.H
  3. *
  4. * (C) Copyright 2008 SafeNet, Inc. All rights reserved.
  5. *
  6. * Description - SuperPro Multiple Entry Points Header file.
  7. *
  8. * Purpose - This module provides a method for performing SuperPro API
  9. * commands so you do not have to deal with command packets.
  10. * It provides a function for each API command.
  11. *
  12. * Revision 1.1 - Added new error codes and API's for 6.1
  13. * Revision 1.2 - Added new API's and typedef's for 6.2.0
  14. * Revision 1.3 - Added new API's and constants for 6.4.0
  15. * Revision 1.4 - Added new API, constants and updated Shell error codes for 6.5.0
  16. * Revision 1.5 - Added new API's, constants and error codes for 6.6.0
  17. *
  18. ****************************************************************************/
  19. #ifndef _SPROMEPS_H
  20. #define _SPROMEPS_H
  21. /***************************************************************************
  22. * Error Codes
  23. ****************************************************************************/
  24. /* SuperPro API Error Codes */
  25. #define SP_SUCCESS 0
  26. #define SP_INVALID_FUNCTION_CODE 1
  27. #define SP_INVALID_PACKET 2
  28. #define SP_UNIT_NOT_FOUND 3
  29. #define SP_ACCESS_DENIED 4
  30. #define SP_INVALID_MEMORY_ADDRESS 5
  31. #define SP_INVALID_ACCESS_CODE 6
  32. #define SP_PORT_IS_BUSY 7
  33. #define SP_WRITE_NOT_READY 8
  34. #define SP_NO_PORT_FOUND 9
  35. #define SP_ALREADY_ZERO 10
  36. #define SP_DRIVER_OPEN_ERROR 11
  37. #define SP_DRIVER_NOT_INSTALLED 12
  38. #define SP_IO_COMMUNICATIONS_ERROR 13
  39. #define SP_PACKET_TOO_SMALL 15
  40. #define SP_INVALID_PARAMETER 16
  41. #define SP_MEM_ACCESS_ERROR 17
  42. #define SP_VERSION_NOT_SUPPORTED 18
  43. #define SP_OS_NOT_SUPPORTED 19
  44. #define SP_QUERY_TOO_LONG 20
  45. #define SP_INVALID_COMMAND 21
  46. #define SP_MEM_ALIGNMENT_ERROR 29
  47. #define SP_DRIVER_IS_BUSY 30
  48. #define SP_PORT_ALLOCATION_FAILURE 31
  49. #define SP_PORT_RELEASE_FAILURE 32
  50. #define SP_ACQUIRE_PORT_TIMEOUT 39
  51. #define SP_SIGNAL_NOT_SUPPORTED 42
  52. #define SP_UNKNOWN_MACHINE 44
  53. #define SP_SYS_API_ERROR 45
  54. #define SP_UNIT_IS_BUSY 46
  55. #define SP_INVALID_PORT_TYPE 47
  56. #define SP_INVALID_MACH_TYPE 48
  57. #define SP_INVALID_IRQ_MASK 49
  58. #define SP_INVALID_CONT_METHOD 50
  59. #define SP_INVALID_PORT_FLAGS 51
  60. #define SP_INVALID_LOG_PORT_CFG 52
  61. #define SP_INVALID_OS_TYPE 53
  62. #define SP_INVALID_LOG_PORT_NUM 54
  63. #define SP_INVALID_ROUTER_FLGS 56
  64. #define SP_INIT_NOT_CALLED 57
  65. #define SP_DRVR_TYPE_NOT_SUPPORTED 58
  66. #define SP_FAIL_ON_DRIVER_COMM 59
  67. /* Networking Error Codes */
  68. #define SP_SERVER_PROBABLY_NOT_UP 60
  69. #define SP_UNKNOWN_HOST 61
  70. #define SP_SENDTO_FAILED 62
  71. #define SP_SOCKET_CREATION_FAILED 63
  72. #define SP_NORESOURCES 64
  73. #define SP_BROADCAST_NOT_SUPPORTED 65
  74. #define SP_BAD_SERVER_MESSAGE 66
  75. #define SP_NO_SERVER_RUNNING 67
  76. #define SP_NO_NETWORK 68
  77. #define SP_NO_SERVER_RESPONSE 69
  78. #define SP_NO_LICENSE_AVAILABLE 70
  79. #define SP_INVALID_LICENSE 71
  80. #define SP_INVALID_OPERATION 72
  81. #define SP_BUFFER_TOO_SMALL 73
  82. #define SP_INTERNAL_ERROR 74
  83. #define SP_PACKET_ALREADY_INITIALIZED 75
  84. #define SP_PROTOCOL_NOT_INSTALLED 76
  85. #define SP_NO_LEASE_FEATURE 101
  86. #define SP_LEASE_EXPIRED 102
  87. #define SP_COUNTER_LIMIT_REACHED 103
  88. #define SP_NO_DIGITAL_SIGNATURE 104
  89. #define SP_SYS_FILE_CORRUPTED 105
  90. #define SP_STRING_BUFFER_TOO_LONG 106
  91. #define SP_INVALID_DEV_CODE 107
  92. #define SP_DEVID_DOES_NOT_MATCH 108
  93. #define SP_DEVICE_SHARING_DETECTED 109
  94. #define SP_SERVER_VERSION_NOT_SUPPORTED 110
  95. /* Shell Error Codes */
  96. #define SH_SP_BAD_ALGO 401
  97. #define SH_SP_LONG_MSG 402
  98. #define SH_SP_READ_ERROR 403
  99. #define SH_SP_NOT_ENOUGH_MEMORY 404
  100. #define SH_SP_CANNOT_OPEN 405
  101. #define SH_SP_WRITE_ERROR 406
  102. #define SH_SP_CANNOT_OVERWRITE 407
  103. #define SH_SP_INVALID_HEADER 408
  104. #define SH_SP_TMP_CREATE_ERROR 409
  105. #define SH_SP_PATH_NOT_THERE 410
  106. #define SH_SP_BAD_FILE_INFO 411
  107. #define SH_SP_NOT_WIN32_FILE 412
  108. #define SH_SP_INVALID_MACHINE 413
  109. #define SH_SP_INVALID_SECTION 414
  110. #define SH_SP_INVALID_RELOC 415
  111. #define SH_SP_CRYPT_ERROR 416
  112. #define SH_SP_SMARTHEAP_ERROR 417
  113. #define SH_SP_IMPORT_OVERWRITE_ERROR 418
  114. #define SH_SP_NO_PESHELL 420
  115. #define SH_SP_FRAMEWORK_REQUIRED 421
  116. #define SH_SP_CANNOT_HANDLE_FILE 422
  117. #define SH_SP_IMPORT_DLL_ERROR 423
  118. #define SH_SP_IMPORT_FUNCTION_ERROR 424
  119. #define SH_SP_X64_SHELL_ENGINE 425
  120. #define SH_SP_STRONG_NAME 426
  121. #define SH_SP_FRAMEWORK_10 427
  122. #define SH_SP_FRAMEWORK_SDK_10 428
  123. #define SH_SP_FRAMEWORK_11 429
  124. #define SH_SP_FRAMEWORK_SDK_11 430
  125. #define SH_SP_FRAMEWORK_20_OR_30 431
  126. #define SH_SP_FRAMEWORK_SDK_20 432
  127. #define SH_SP_APP_NOT_SUPPORTED 433
  128. #define SH_SP_FILE_COPY 434
  129. #define SH_SP_HEADER_SIZE_EXCEED 435
  130. /***************************************************************************
  131. * Compiler Specific Definitions
  132. ****************************************************************************/
  133. /* Dword Alignment Roll-up */
  134. #define SPRO_APIPACKET_ALIGNMENT_VALUE (sizeof(unsigned long))
  135. #define SPRO_APIPACKET_SIZE (1024+SPRO_APIPACKET_ALIGNMENT_VALUE)
  136. #define SPRO_MAX_QUERY_SIZE 56 /* in bytes */
  137. /* Create SP types */
  138. #ifdef __cplusplus
  139. #define SP_EXPORT extern "C"
  140. #else
  141. #define SP_EXPORT extern
  142. #endif
  143. #define SP_LOCAL static
  144. /* Define OS */
  145. #ifndef _RBDRVR_INC
  146. #if ((defined(_NW_) || defined(CLIB_V311)) && !defined(_OS2_))
  147. #ifndef _NW_
  148. #define _NW_ 1
  149. #endif
  150. #endif
  151. #if ((defined(_WIN32_) || defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)) && !defined(_NW_) && !defined(_QNX_))
  152. #ifndef _WIN32_
  153. #define _WIN32_ 1
  154. #endif
  155. #endif
  156. #if ((defined(_WIN3_) || defined(__WINDOWS_H) || defined(_WINDOWS_) || \
  157. defined(_WIN_) || defined(__WINDOWS__) || defined(_WINDOWS) || \
  158. defined(_WINDLL)) && !defined(_OS2_) && !defined(_WIN32_))
  159. #ifndef _WIN_
  160. #define _WIN_ 1
  161. #endif
  162. #endif
  163. #if (!defined(_OS2_) && !defined(_WIN32_) && !defined(_WIN_) && !defined(_NW_) && !defined(_QNX_))
  164. #ifndef _DOS_
  165. #define _DOS_ 1
  166. #endif
  167. #endif
  168. #endif
  169. /* GNU C Definitions */
  170. #if (defined(__GNUC__) || defined(_GNUC_) || defined(__EMX__))
  171. #if defined(_OS2_)
  172. #define _RB_SYSCALL _System
  173. #define _RB_STDCALL
  174. #define _RB_FASTCALL
  175. #define _RB_PASCAL _Pascal
  176. #define _RB_CDECL _Cdecl
  177. #define _RB_FAR
  178. #define _RB_NEAR
  179. #define _RB_HUGE
  180. #define _RB_API EXPENTRY
  181. #define _RB_PTR *
  182. #endif
  183. #endif
  184. /* Borland C Definitions */
  185. #if defined(__BORLANDC__)
  186. #if defined(_WIN32_)
  187. #define _RB_STDCALL __stdcall
  188. #define _RB_FASTCALL __fastcall
  189. #define _RB_PASCAL
  190. #define _RB_CDECL __cdecl
  191. #define _RB_FAR
  192. #define _RB_NEAR
  193. #define _RB_HUGE
  194. #define _RB_API __stdcall
  195. #define _RB_PTR *
  196. #elif (defined(_WIN_) || defined(_WIN3_))
  197. #define _RB_LOADDS _loadds
  198. #define _RB_STDCALL
  199. #define _RB_FASTCALL
  200. #define _RB_PASCAL pascal
  201. #define _RB_CDECL _cdecl
  202. #define _RB_FAR far
  203. #define _RB_NEAR near
  204. #define _RB_HUGE huge
  205. #define _RB_PTR _RB_FAR *
  206. #define _RB_API __stdcall _RB_LOADDS
  207. #elif defined(_DOS_)
  208. #define _RB_STDCALL
  209. #define _RB_FASTCALL
  210. #define _RB_PASCAL pascal
  211. #define _RB_CDECL _cdecl
  212. #define _RB_FAR far
  213. #define _RB_NEAR near
  214. #define _RB_HUGE huge
  215. #if ( defined(_DOS4GW_) && defined(_WATC_) )
  216. #define _RB_PTR *
  217. #endif
  218. #if defined(_BPASF_)
  219. #define _RB_PTR _RB_FAR *
  220. #define _RB_API _RB_FAR _RB_PASCAL
  221. #elif defined(_BPASN_)
  222. #define _RB_PTR _RB_FAR *
  223. #define _RB_API _RB_NEAR _RB_PASCAL
  224. #else
  225. #if (defined(__SMALL__) || defined(__MEDIUM__) || defined(__LARGE__) || defined(__COMPACT__))
  226. #define _RB_PTR _RB_FAR *
  227. #elif defined(__HUGE__)
  228. #define _RB_PTR _RB_HUGE *
  229. #elif defined(__TINY__)
  230. #define _RB_PTR *
  231. #endif
  232. #define _RB_API _RB_FAR _RB_CDECL
  233. #endif
  234. #endif
  235. #endif
  236. /* Microsoft C Definitions */
  237. #if defined(_MSC_VER)
  238. #if defined(_WIN32_)
  239. #define _RB_STDCALL __stdcall
  240. #define _RB_FASTCALL __fastcall
  241. #define _RB_PASCAL
  242. #define _RB_CDECL __cdecl
  243. #define _RB_FAR
  244. #define _RB_NEAR
  245. #define _RB_HUGE
  246. #ifdef _DRVDRV_
  247. #define _RB_API _SP_API
  248. #else
  249. #define _RB_API __stdcall
  250. #endif
  251. #define _RB_PTR *
  252. #elif (defined(_WIN_) || defined(_WIN3_))
  253. #define _RB_LOADDS _loadds
  254. #define _SP_API
  255. #define _RB_FASTCALL _fastcall
  256. #define _RB_PASCAL _pascal
  257. #define _RB_CDECL _cdecl
  258. #define _RB_FAR _far
  259. #define _RB_NEAR _near
  260. #define _RB_HUGE _huge
  261. #define _RB_API __stdcall _RB_LOADDS
  262. #define _RB_PTR _RB_FAR *
  263. #elif (_MSC_VER <= 7)
  264. #define _RB_LOADDS _loadds
  265. #define _SP_API
  266. #define _RB_FASTCALL _fastcall
  267. #define _RB_PASCAL _pascal
  268. #define _RB_CDECL _cdecl
  269. #define _RB_FAR _far
  270. #define _RB_NEAR _near
  271. #define _RB_HUGE _huge
  272. #define _RB_API _RB_FAR _RB_PASCAL
  273. #define _RB_PTR _RB_FAR *
  274. #else
  275. #define _SP_API __stdcall
  276. #define _RB_FASTCALL __fastcall
  277. #define _RB_PASCAL
  278. #define _RB_CDECL __cdecl
  279. #define _RB_FAR
  280. #define _RB_NEAR
  281. #define _RB_HUGE
  282. #define _RB_API _RB_CDECL
  283. #define _RB_PTR *
  284. #endif
  285. #endif
  286. /* Watcom C Definitions */
  287. #if defined(__WATCOMC__)
  288. #if defined(_WIN32_)
  289. #define _RB_STDCALL __stdcall
  290. #define _RB_FASTCALL __fastcall
  291. #define _RB_PASCAL
  292. #define _RB_CDECL __cdecl
  293. #define _RB_FAR
  294. #define _RB_NEAR
  295. #define _RB_HUGE
  296. #define _RB_API __stdcall
  297. #define _RB_PTR *
  298. #elif defined(_NW_)
  299. #define _RB_STDCALL
  300. #define _RB_FASTCALL __fastcall
  301. #define _RB_PASCAL __pascal
  302. #define _RB_CDECL __cdecl
  303. #define _RB_FAR
  304. #define _RB_NEAR
  305. #define _RB_HUGE
  306. #define _RB_API _RB_CDECL
  307. #define _RB_PTR *
  308. #if defined(__FLAT__)
  309. #define _RB_FAR
  310. #define _RB_NEAR
  311. #define _RB_HUGE
  312. #define _RB_PTR *
  313. #define _RB_API _RB_CDECL
  314. #else
  315. #define _RB_FAR __far
  316. #define _RB_NEAR __near
  317. #define _RB_HUGE __huge
  318. #define _RB_PTR _RB_FAR *
  319. #define _RB_API _RB_FAR _RB_CDECL
  320. #endif
  321. #else
  322. #define _RB_STDCALL
  323. #define _RB_FASTCALL __fastcall
  324. #define _RB_PASCAL __pascal
  325. #define _RB_CDECL __cdecl
  326. #define _RB_FAR
  327. #define _RB_NEAR
  328. #define _RB_HUGE
  329. #define _RB_API _RB_CDECL
  330. #define _RB_PTR *
  331. #endif
  332. #endif
  333. #ifndef _ULTRAPRO_
  334. #define SP_LOADDS _RB_LOADDS
  335. #define SP_SYSCALL _RB_SYSCALL
  336. #define SP_STDCALL _SP_API
  337. #define SP_FASTCALL _RB_FASTCALL
  338. #define SP_PASCAL _RB_PASCAL
  339. #define SP_CDECL _RB_CDECL
  340. #define SP_FAR _RB_FAR
  341. #define SP_NEAR _RB_NEAR
  342. #define SP_HUGE _RB_HUGE
  343. #define SP_PTR _RB_PTR
  344. #if ( defined(_DOS4GW_) && defined(__BORLANDC__) && defined(_WATC_) )
  345. #define SP_API __cdecl
  346. #else
  347. #define SP_API _RB_API
  348. #endif
  349. #define _SUPERPRO_
  350. #endif
  351. #define SP_IN
  352. #define SP_OUT
  353. #define SP_IO
  354. /* Linux Definitions */
  355. #if defined(_SSP_RH_LINUX_)
  356. #define _RB_STDCALL
  357. #define _RB_FASTCALL
  358. #define _RB_PASCAL
  359. #define _RB_CDECL
  360. #define _RBFAR
  361. #define _RB_NEAR
  362. #define _RB_HUGE
  363. #define _RB_API
  364. #define _RB_PTR *
  365. #endif
  366. /***************************************************************************
  367. * SafeNet Specific Type Definitions and Constants
  368. ****************************************************************************/
  369. #if !defined(_RBTYPES_INC)
  370. typedef void RB_VOID;
  371. typedef unsigned char RB_BOOLEAN;
  372. typedef unsigned char RB_BYTE;
  373. typedef unsigned short int RB_WORD;
  374. typedef unsigned long int RB_DWORD;
  375. typedef long int RB_LONG;
  376. typedef char RB_CHAR;
  377. typedef RB_VOID SP_PTR RBP_VOID;
  378. typedef RB_BYTE SP_PTR RBP_BYTE;
  379. typedef RB_BOOLEAN SP_PTR RBP_BOOLEAN;
  380. typedef RB_WORD SP_PTR RBP_WORD;
  381. typedef RB_DWORD SP_PTR RBP_DWORD;
  382. typedef RB_CHAR SP_PTR RBP_CHAR;
  383. #endif
  384. /* Packet Definition */
  385. typedef RB_DWORD RB_SPRO_APIPACKET[SPRO_APIPACKET_SIZE/sizeof(RB_DWORD)];
  386. typedef RB_WORD SP_STATUS;
  387. typedef RBP_VOID RBP_SPRO_APIPACKET;
  388. /* OS Types */
  389. #define RB_MIN_OS_TYPE 0
  390. #define RB_AUTODETECT_OS_TYPE 0 /* Autodetect OS type */
  391. #define RB_OS_DOS 1 /* DOS operating system */
  392. #define RB_OS_RSRV1 2 /* reserved */
  393. #define RB_OS_RSRV2 3 /* reserved */
  394. #define RB_OS_WIN3x 4 // Windows 3.x operating env
  395. #define RB_OS_WINNT 5 // Windows NT operating system
  396. #define RB_OS_OS2 6 // OS/2 operating system
  397. #define RB_OS_WIN95 7 // Windows 95 operating system
  398. #define RB_OS_WIN32s 8 // Windows WIN32s env
  399. #define RB_OS_NW 9 // Netware operating system
  400. #define RB_OS_QNX 10
  401. #define RB_OS_LINUX 12 // Linux operating system
  402. #define RB_MAX_OS_TYPE 12
  403. /* Driver types */
  404. #define RB_DOSRM_LOCAL_DRVR 1 // DOS Real Mode local driver
  405. #define RB_WIN3x_LOCAL_DRVR 2 // Windows 3.x local driver
  406. #define RB_WIN32s_LOCAL_DRVR 3 // Win32s local driver
  407. #define RB_WIN3x_SYS_DRVR 4 // Windows 3.x system driver
  408. #define RB_WINNT_SYS_DRVR 5 // Windows NT system driver
  409. #define RB_OS2_SYS_DRVR 6 // OS/2 system driver
  410. #define RB_WIN95_SYS_DRVR 7 // Windows 95 system driver
  411. #define RB_NW_LOCAL_DRVR 8 // Netware local driver
  412. #define RB_QNX_LOCAL_DRVR 9 // QNX local driver
  413. #define RB_UNIX_SYS_DRVR 10 // UNIX local driver
  414. #define RB_SOLARIS_SYS_DRVR 11 // SOLARIS local driver
  415. #define RB_LINUX_SYS_DRVR 12 // Linux system driver
  416. #define RB_LINUX_LOCAL_DRVR 13 // Linux local driver
  417. #define RB_AIX_SYS_DRVR 14 // AIX system driver
  418. #define RB_UNIXWARE_SYS_DRVR 15 // UNIX system driver
  419. /* Heartbeat Constants */
  420. #define LIC_UPDATE_INT 120 // Default heartbeat - 2*60 = 2 min.
  421. #define MAX_HEARTBEAT 2592000 // Max heartbeat - 30*24*60*60 seconds
  422. #define MIN_HEARTBEAT 60 // Min heartbeat - 60 seconds
  423. #define INFINITE_HEARTBEAT 0xFFFFFFFF // Infinite heartbeat
  424. /* Enum Server Flags */
  425. typedef int ENUM_SERVER_FLAG;
  426. #define NSPRO_RET_ON_FIRST 1
  427. #define NSPRO_GET_ALL_SERVERS 2
  428. #define NSPRO_RET_ON_FIRST_AVAILABLE 4
  429. /* Set Protocol Flags */
  430. typedef RB_WORD PROTOCOL_FLAG;
  431. #define NSPRO_TCP_PROTOCOL 1
  432. #define NSPRO_IPX_PROTOCOL 2
  433. #define NSPRO_NETBEUI_PROTOCOL 4
  434. #define NSPRO_SAP_PROTOCOL 8
  435. /* Communication Modes */
  436. #define RNBO_STANDALONE "RNBO_STANDALONE"
  437. #define RNBO_SPN_DRIVER "RNBO_SPN_DRIVER"
  438. #define RNBO_SPN_LOCAL "RNBO_SPN_LOCAL"
  439. #define RNBO_SPN_BROADCAST "RNBO_SPN_BROADCAST"
  440. #define RNBO_SPN_ALL_MODES "RNBO_SPN_ALL_MODES"
  441. #define RNBO_SPN_SERVER_MODES "RNBO_SPN_SERVER_MODES"
  442. /* Sharing Flags */
  443. #define SP_SHARE_USERNAME 1
  444. #define SP_SHARE_MAC_ADDRESS 2
  445. #define SP_SHARE_DEFAULT 3
  446. /* SuperPro Sharing Flags */
  447. #define SP_DISABLE_MAINLIC_SHARING 0
  448. #define SP_ENABLE_MAINLIC_SHARING 1
  449. #define SP_DISABLE_DEVICE_SHARING 2
  450. #define SP_DISABLE_SUBLIC_SHARING 0
  451. #define SP_ENABLE_SUBLIC_SHARING 1
  452. /* Key Type Constants */
  453. #define SP_KEY_FORM_FACTOR_PARALLEL 0
  454. #define SP_KEY_FORM_FACTOR_USB 1
  455. #define SP_SUPERPRO_FAMILY_KEY 0
  456. #define SP_ULTRAPRO_FAMILY_KEY 1
  457. #define SP_UNKNOWN_FAMILY_KEY 16
  458. /* Maximum values */
  459. #define MAX_NUM_DEV 10 // Maximum number of devices
  460. #define MAX_NAME_LEN 64 // Maximum host name length
  461. #define MAX_ADDR_LEN 32 // Maximum host address length
  462. #define MAX_IPADDR_LEN 64 // Maximum IP address length
  463. /* Terminal Service flags */
  464. #define SP_TERM_SERV_CHECK_OFF 0
  465. #define SP_TERM_SERV_CHECK_ON 1
  466. /* Device Capabilities */
  467. #define SP_CAPS_AES_ALGO 1
  468. #define SP_CAPS_PASSWORD_COUNTER 2
  469. #define SP_CAPS_SECURE_TUNNEL 4
  470. #define SP_CAPS_DISABLE_DEVICE_SHARING 8
  471. /* Key Monitoring Information Used by NSPRO_MONITOR_INFO */
  472. typedef struct tag_nsproKeyMonitorInfo {
  473. RB_WORD devId; // developer id of the key
  474. RB_WORD hardLimit; // hardlimit of the key
  475. RB_WORD inUse; // Number of licenses in use for the key
  476. RB_WORD numTimeOut; // Number of timeouts recorded for the key
  477. RB_WORD highestUse; // Highest number of licenses issued from
  478. // the key throughout the life of server
  479. } NSPRO_KEY_MONITOR_INFO;
  480. /* Key Monitoring Information Used by NSPRO_MONITOR_INFO_EX */
  481. typedef struct tag_nsproKeyMonitorInfoEx {
  482. RB_DWORD devId; // developer id of the key
  483. RB_DWORD serialNum; // serial number of the key
  484. RB_DWORD capabilities; // capabilities of the key
  485. RB_DWORD hardLimit; // hard limit of the key
  486. RB_DWORD inUse; // number of licenses in use for the key
  487. RB_DWORD numTimeOut; // number of timeouts recorded for the key
  488. RB_DWORD highestUse; // highest number of licenses issued from
  489. // the key throughout the life of server
  490. RB_DWORD subLicLimit; // the sub-license limit of certain cell
  491. RB_DWORD subLicInUse; // the number of sub-licenses in use for certain cell
  492. RB_DWORD reserved; // reserved for future use
  493. } NSPRO_KEY_MONITOR_INFO_EX;
  494. /* Monitoring Information Returned by RNBOsproGetKeyInfo */
  495. typedef struct tag_nsproMonitorInfo {
  496. char serverName[MAX_NAME_LEN];
  497. char serverIPAddress[MAX_ADDR_LEN]; // Server's IP address
  498. char serverIPXAddress[MAX_ADDR_LEN]; // Server's IPX address
  499. char version[MAX_NAME_LEN]; // version of the server
  500. RB_WORD protocol; // Protocols supported by the server
  501. NSPRO_KEY_MONITOR_INFO sproKeyMonitorInfo;
  502. } NSPRO_MONITOR_INFO;
  503. /* Monitoring Information Returned by RNBOsproGetKeyInfoEx */
  504. typedef struct tag_nsproMonitorInfoEx {
  505. char serverName[MAX_NAME_LEN];
  506. char serverIPAddress[MAX_IPADDR_LEN];// Server's IP address
  507. char serverIPXAddress[MAX_ADDR_LEN]; // Server's IPX address
  508. char version[MAX_NAME_LEN]; // version of the server
  509. RB_DWORD protocol; // Protocols supported by the server
  510. RB_DWORD reserved; // reserved for future use
  511. NSPRO_KEY_MONITOR_INFO_EX sproKeyMonitorInfo;
  512. } NSPRO_MONITOR_INFO_EX;
  513. /* Server Information Returned by RNBOsproEnumServer */
  514. typedef struct tag_nsproServerInfo {
  515. char serverAddress[MAX_ADDR_LEN];
  516. RB_WORD numLicAvail;
  517. } NSPRO_SERVER_INFO;
  518. /***************************************************************************
  519. * Function Prototypes
  520. ****************************************************************************/
  521. SP_EXPORT SP_STATUS SP_API
  522. RNBOsproFormatPacket( SP_OUT RBP_SPRO_APIPACKET thePacket,
  523. SP_IN RB_WORD thePacketSize );
  524. SP_EXPORT SP_STATUS SP_API
  525. RNBOsproInitialize( SP_OUT RBP_SPRO_APIPACKET thePacket );
  526. SP_EXPORT SP_STATUS SP_API
  527. RNBOsproFindFirstUnit( SP_IN RBP_SPRO_APIPACKET thePacket,
  528. SP_IN RB_WORD developerID );
  529. SP_EXPORT SP_STATUS SP_API
  530. RNBOsproFindNextUnit( SP_IN RBP_SPRO_APIPACKET packet );
  531. SP_EXPORT SP_STATUS SP_API
  532. RNBOsproRead( SP_IN RBP_SPRO_APIPACKET thePacket,
  533. SP_IN RB_WORD address,
  534. SP_OUT RBP_WORD data );
  535. SP_EXPORT SP_STATUS SP_API
  536. RNBOsproExtendedRead( SP_IN RBP_SPRO_APIPACKET thePacket,
  537. SP_IN RB_WORD address,
  538. SP_OUT RBP_WORD data,
  539. SP_OUT RBP_BYTE accessCode );
  540. SP_EXPORT SP_STATUS SP_API
  541. RNBOsproWrite( SP_IN RBP_SPRO_APIPACKET thePacket,
  542. SP_IN RB_WORD writePassword,
  543. SP_IN RB_WORD address,
  544. SP_IN RB_WORD data,
  545. SP_IN RB_BYTE accessCode );
  546. SP_EXPORT SP_STATUS SP_API
  547. RNBOsproOverwrite( SP_IN RBP_SPRO_APIPACKET thePacket,
  548. SP_IN RB_WORD writePassword,
  549. SP_IN RB_WORD overwritePassword1,
  550. SP_IN RB_WORD overwritePassword2,
  551. SP_IN RB_WORD address,
  552. SP_IN RB_WORD data,
  553. SP_IN RB_BYTE accessCode );
  554. SP_EXPORT SP_STATUS SP_API
  555. RNBOsproDecrement( SP_IN RBP_SPRO_APIPACKET thePacket,
  556. SP_IN RB_WORD writePassword,
  557. SP_IN RB_WORD address );
  558. SP_EXPORT SP_STATUS SP_API
  559. RNBOsproActivate( SP_IN RBP_SPRO_APIPACKET thePacket,
  560. SP_IN RB_WORD writePassword,
  561. SP_IN RB_WORD activatePassword1,
  562. SP_IN RB_WORD activatePassword2,
  563. SP_IN RB_WORD address );
  564. SP_EXPORT SP_STATUS SP_API
  565. RNBOsproQuery( SP_IN RBP_SPRO_APIPACKET thePacket,
  566. SP_IN RB_WORD address,
  567. SP_IN RBP_VOID queryData,
  568. SP_OUT RBP_VOID response,
  569. SP_OUT RBP_DWORD response32,
  570. SP_IN RB_WORD length );
  571. SP_EXPORT SP_STATUS SP_API
  572. RNBOsproGetFullStatus( SP_IN RBP_SPRO_APIPACKET thePacket );
  573. SP_EXPORT SP_STATUS SP_API
  574. RNBOsproGetVersion( SP_IN RBP_SPRO_APIPACKET thePacket,
  575. SP_OUT RBP_BYTE majVer,
  576. SP_OUT RBP_BYTE minVer,
  577. SP_OUT RBP_BYTE rev,
  578. SP_OUT RBP_BYTE osDrvrType );
  579. SP_EXPORT SP_STATUS SP_API
  580. RNBOsproGetHardLimit( SP_IN RBP_SPRO_APIPACKET thePacket,
  581. SP_OUT RBP_WORD hardLimit );
  582. SP_EXPORT SP_STATUS SP_API
  583. RNBOsproGetSubLicense ( SP_IN RBP_SPRO_APIPACKET thePacket,
  584. SP_IN RB_WORD address );
  585. SP_EXPORT SP_STATUS SP_API
  586. RNBOsproReleaseLicense ( SP_IN RBP_SPRO_APIPACKET thePacket,
  587. SP_IN RB_WORD address,
  588. SP_IO RBP_WORD numSubLic );
  589. SP_EXPORT SP_STATUS SP_API
  590. RNBOsproSetContactServer ( SP_IN RBP_SPRO_APIPACKET thePacket,
  591. SP_IN RBP_CHAR serverName );
  592. SP_EXPORT SP_STATUS SP_API
  593. RNBOsproGetContactServer ( SP_IN RBP_SPRO_APIPACKET thePacket,
  594. SP_OUT RBP_CHAR serverNameBuf,
  595. SP_IN RB_WORD serverNameBufSz );
  596. SP_EXPORT SP_STATUS SP_API
  597. RNBOsproEnumServer ( SP_IN ENUM_SERVER_FLAG enumFlag,
  598. SP_IN RB_WORD developerId,
  599. SP_OUT NSPRO_SERVER_INFO *serverInfo,
  600. SP_IO RBP_WORD numServerInfo );
  601. SP_EXPORT SP_STATUS SP_API
  602. RNBOsproGetKeyInfo ( SP_IN RBP_SPRO_APIPACKET thePacket,
  603. SP_IN RB_WORD devId,
  604. SP_IN RB_WORD keyIndex,
  605. SP_OUT NSPRO_MONITOR_INFO *nsproMonitorInfo );
  606. SP_EXPORT SP_STATUS SP_API
  607. RNBOsproGetKeyInfoEx ( SP_IN RBP_SPRO_APIPACKET thePacket,
  608. SP_IN RB_DWORD devId,
  609. SP_IN RB_DWORD keyIndex,
  610. SP_IN RB_DWORD subLicAddress,
  611. SP_OUT NSPRO_MONITOR_INFO_EX *nsproMonitorInfoEx,
  612. SP_IN RB_DWORD size );
  613. SP_EXPORT SP_STATUS SP_API
  614. RNBOsproSetProtocol ( SP_IN RBP_SPRO_APIPACKET thePacket,
  615. SP_IN PROTOCOL_FLAG protocol );
  616. SP_EXPORT SP_STATUS SP_API
  617. RNBOsproSetHeartBeat( SP_IN RBP_SPRO_APIPACKET thePacket,
  618. SP_IN RB_DWORD heartBeatValue );
  619. SP_EXPORT SP_STATUS SP_API
  620. RNBOsproSetSharedLicense( SP_IN RBP_SPRO_APIPACKET thePacket,
  621. SP_IN RB_WORD shareMainLic,
  622. SP_IN RB_WORD shareSubLic );
  623. SP_EXPORT SP_STATUS SP_API
  624. RNBOsproCheckTerminalService( SP_IN RBP_SPRO_APIPACKET thePacket,
  625. SP_IN RB_WORD termserv );
  626. SP_EXPORT SP_STATUS SP_API
  627. RNBOsproSetDeveloperCode( SP_IN RBP_SPRO_APIPACKET thePacket,
  628. SP_IN RBP_VOID devCode,
  629. SP_IN RB_DWORD size );
  630. SP_EXPORT SP_STATUS SP_API
  631. RNBOsproGetKeyType( SP_IN RBP_SPRO_APIPACKET thePacket,
  632. SP_OUT RBP_WORD keyFamily,
  633. SP_OUT RBP_WORD keyFormFactor,
  634. SP_OUT RBP_WORD keyMemorySize );
  635. SP_EXPORT RB_VOID SP_API RNBOsproCleanup();
  636. #endif /* _SPROMEPS_H */
  637. /* end of file */