66ec826152341f305a7245751198d3425b6e1ece
[public/netxms.git] / include / nxclapi.h
1 /* $Id$ */
2 /*
3 ** NetXMS - Network Management System
4 ** Client Library API
5 ** Copyright (C) 2004-2009 Victor Kirhenshtein
6 **
7 ** This program is free software; you can redistribute it and/or modify
8 ** it under the terms of the GNU General Public License as published by
9 ** the Free Software Foundation; either version 2 of the License, or
10 ** (at your option) any later version.
11 **
12 ** This program is distributed in the hope that it will be useful,
13 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
14 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ** GNU General Public License for more details.
16 **
17 ** You should have received a copy of the GNU General Public License
18 ** along with this program; if not, write to the Free Software
19 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 **
21 ** File: nxclapi.h
22 **
23 **/
24
25 #ifndef _nxclapi_h_
26 #define _nxclapi_h_
27
28 #include <nms_common.h>
29 #include <nms_util.h>
30 #include <nxevent.h>
31 #include <nximage.h>
32 #include <nxcpapi.h>
33 #include <nxtools.h>
34 #include <nxlog.h>
35 #include <uuid.h>
36
37 #ifdef _WIN32
38 #ifdef LIBNXCL_EXPORTS
39 #define LIBNXCL_EXPORTABLE __declspec(dllexport)
40 #else
41 #define LIBNXCL_EXPORTABLE __declspec(dllimport)
42 #endif
43 #else /* _WIN32 */
44 #define LIBNXCL_EXPORTABLE
45 #endif
46
47
48 //
49 // Session handle type
50 //
51
52 typedef void * NXC_SESSION;
53
54
55 //
56 // Some constants
57 //
58
59 #define MAX_COMMUNITY_LENGTH 128
60 #define MAX_OID_LENGTH 1024
61 #define MAX_EVENT_MSG_LENGTH 256
62 #define MAX_EVENT_NAME 64
63 #define MAX_USERTAG_LENGTH 64
64 #define MAX_SESSION_NAME 256
65 #define MAX_USER_NAME 64
66 #define MAX_USER_FULLNAME 128
67 #define MAX_USER_DESCR 256
68 #define MAX_ITEM_NAME 256
69 #define MAX_STRING_VALUE 256
70 #define MAX_VARIABLE_NAME 256
71 #define MAX_AGENT_VERSION_LEN 64
72 #define MAX_PLATFORM_NAME_LEN 64
73 #define MAX_PACKAGE_NAME_LEN 64
74 #define MAX_HELPDESK_REF_LEN 64
75 #define GROUP_EVERYONE ((DWORD)0x80000000)
76 #define INVALID_UID ((DWORD)0xFFFFFFFF)
77 #define OBJECT_STATUS_COUNT 9
78 #define MAX_RCPT_ADDR_LEN 256
79 #define MAX_EMAIL_SUBJECT_LEN 256
80 #define MAC_ADDR_LENGTH 6
81 #define CURRENT_USER ((DWORD)0xFFFFFFFF)
82 #define MAX_DCI_DATA_RECORDS 200000
83
84
85 //
86 // Module flags
87 //
88
89 #define MODFLAG_DISABLED 0x0001
90 #define MODFLAG_ACCEPT_ALL_COMMANDS 0x0002
91
92
93 //
94 // Image formats
95 //
96
97 #define IMAGE_FORMAT_ICO 0
98 #define IMAGE_FORMAT_PNG 1
99
100
101 //
102 // Authentication methods
103 //
104
105 #define AUTH_NONE 0
106 #define AUTH_PLAINTEXT 1
107 #define AUTH_MD5_HASH 2
108 #define AUTH_SHA1_HASH 3
109
110
111 //
112 // Client-server authentication types
113 //
114
115 #define NETXMS_AUTH_TYPE_PASSWORD 0
116 #define NETXMS_AUTH_TYPE_CERTIFICATE 1
117
118
119 //
120 // Forced poll types
121 //
122
123 #define POLL_STATUS 1
124 #define POLL_CONFIGURATION 2
125 #define POLL_INTERFACE_NAMES 3
126
127
128 //
129 // Object types
130 //
131
132 #define OBJECT_GENERIC 0
133 #define OBJECT_SUBNET 1
134 #define OBJECT_NODE 2
135 #define OBJECT_INTERFACE 3
136 #define OBJECT_NETWORK 4
137 #define OBJECT_CONTAINER 5
138 #define OBJECT_ZONE 6
139 #define OBJECT_SERVICEROOT 7
140 #define OBJECT_TEMPLATE 8
141 #define OBJECT_TEMPLATEGROUP 9
142 #define OBJECT_TEMPLATEROOT 10
143 #define OBJECT_NETWORKSERVICE 11
144 #define OBJECT_VPNCONNECTOR 12
145 #define OBJECT_CONDITION 13
146 #define OBJECT_CLUSTER 14
147 #define OBJECT_AGENTPOLICY 15
148 #define OBJECT_POLICYGROUP 16
149 #define OBJECT_POLICYROOT 17
150
151
152 //
153 // Object's status
154 //
155
156 #define STATUS_NORMAL 0
157 #define STATUS_WARNING 1
158 #define STATUS_MINOR 2
159 #define STATUS_MAJOR 3
160 #define STATUS_CRITICAL 4
161 #define STATUS_UNKNOWN 5
162 #define STATUS_UNMANAGED 6
163 #define STATUS_DISABLED 7
164 #define STATUS_TESTING 8
165
166
167 //
168 // Event and alarm severity
169 //
170
171 #define SEVERITY_NORMAL 0
172 #define SEVERITY_WARNING 1
173 #define SEVERITY_MINOR 2
174 #define SEVERITY_MAJOR 3
175 #define SEVERITY_CRITICAL 4
176 #define SEVERITY_FROM_EVENT 5
177 #define SEVERITY_TERMINATE 6
178
179
180 //
181 // Alarm states
182 //
183
184 #define ALARM_STATE_OUTSTANDING 0
185 #define ALARM_STATE_ACKNOWLEDGED 1
186 #define ALARM_STATE_TERMINATED 2
187
188
189 //
190 // Alarm state in help desk system
191 //
192
193 #define ALARM_HELPDESK_IGNORED 0
194 #define ALARM_HELPDESK_OPEN 1
195 #define ALARM_HELPDESK_CLOSED 2
196
197
198 //
199 // Node flags
200 //
201
202 #define NF_SYSTEM_FLAGS 0x0000FFFF
203 #define NF_USER_FLAGS 0xFFFF0000
204
205 #define NF_IS_SNMP 0x00000001
206 #define NF_IS_NATIVE_AGENT 0x00000002
207 #define NF_IS_BRIDGE 0x00000004
208 #define NF_IS_ROUTER 0x00000008
209 #define NF_IS_LOCAL_MGMT 0x00000010
210 #define NF_IS_PRINTER 0x00000020
211 #define NF_IS_OSPF 0x00000040
212 #define NF_BEHIND_NAT 0x00000080
213 #define NF_IS_CPSNMP 0x00000100 /* CheckPoint SNMP agent on port 260 */
214 #define NF_IS_CDP 0x00000200
215 #define NF_IS_SONMP 0x00000400 /* Supports Nortel (Synoptics/Bay Networks) topology discovery */
216 #define NF_IS_LLDP 0x00000800 /* Supports Link Layer Discovery Protocol */
217
218 #define NF_DISABLE_SNMP 0x01000000
219 #define NF_DISABLE_NXCP 0x02000000
220 #define NF_DISABLE_ICMP 0x04000000
221 #define NF_FORCE_ENCRYPTION 0x08000000
222 #define NF_DISABLE_STATUS_POLL 0x10000000
223 #define NF_DISABLE_CONF_POLL 0x20000000
224 #define NF_DISABLE_ROUTE_POLL 0x40000000
225 #define NF_DISABLE_DATA_COLLECT 0x80000000
226
227
228 //
229 // Node ifXTable usage mode
230 //
231
232 #define IFXTABLE_DEFAULT 0
233 #define IFXTABLE_ENABLED 1
234 #define IFXTABLE_DISABLED 2
235
236
237 //
238 // Status calculation and propagation algorithms
239 //
240
241 #define SA_CALCULATE_DEFAULT 0
242 #define SA_CALCULATE_MOST_CRITICAL 1
243 #define SA_CALCULATE_SINGLE_THRESHOLD 2
244 #define SA_CALCULATE_MULTIPLE_THRESHOLDS 3
245
246 #define SA_PROPAGATE_DEFAULT 0
247 #define SA_PROPAGATE_UNCHANGED 1
248 #define SA_PROPAGATE_FIXED 2
249 #define SA_PROPAGATE_RELATIVE 3
250 #define SA_PROPAGATE_TRANSLATED 4
251
252
253 //
254 // Components that can be locked by management pack installer
255 //
256
257 #define NXMP_LC_EVENTDB 0
258 #define NXMP_LC_EPP 1
259 #define NXMP_LC_TRAPCFG 2
260
261
262 //
263 // Service types
264 //
265
266 enum
267 {
268 NETSRV_CUSTOM,
269 NETSRV_SSH,
270 NETSRV_POP3,
271 NETSRV_SMTP,
272 NETSRV_FTP,
273 NETSRV_HTTP,
274 NETSRV_TELNET
275 };
276
277
278 //
279 // Address list types
280 //
281
282 #define ADDR_LIST_DISCOVERY_TARGETS 1
283 #define ADDR_LIST_DISCOVERY_FILTER 2
284
285
286 //
287 // Discovery filter flags
288 //
289
290 #define DFF_ALLOW_AGENT 0x0001
291 #define DFF_ALLOW_SNMP 0x0002
292 #define DFF_ONLY_RANGE 0x0004
293
294
295 //
296 // Events
297 //
298
299 #define NXC_EVENT_CONNECTION_BROKEN 1
300 #define NXC_EVENT_NEW_ELOG_RECORD 2
301 #define NXC_EVENT_USER_DB_CHANGED 3
302 #define NXC_EVENT_OBJECT_CHANGED 4
303 #define NXC_EVENT_NOTIFICATION 5
304 #define NXC_EVENT_DEPLOYMENT_STATUS 6
305 #define NXC_EVENT_NEW_SYSLOG_RECORD 7
306 #define NXC_EVENT_NEW_SNMP_TRAP 8
307 #define NXC_EVENT_SITUATION_UPDATE 9
308 #define NXC_EVENT_JOB_CHANGE 10
309
310
311 //
312 // States (used both by client library and server)
313 //
314
315 #define STATE_DISCONNECTED 0
316 #define STATE_CONNECTING 1
317 #define STATE_CONNECTED 2
318 #define STATE_AUTHENTICATED 3
319
320
321 //
322 // Notification codes
323 //
324
325 #define NX_NOTIFY_SHUTDOWN 1
326 #define NX_NOTIFY_EVENTDB_CHANGED 2
327 #define NX_NOTIFY_ALARM_DELETED 3
328 #define NX_NOTIFY_NEW_ALARM 4
329 #define NX_NOTIFY_ALARM_CHANGED 5
330 #define NX_NOTIFY_ACTION_CREATED 6
331 #define NX_NOTIFY_ACTION_MODIFIED 7
332 #define NX_NOTIFY_ACTION_DELETED 8
333 #define NX_NOTIFY_OBJTOOLS_CHANGED 9
334 #define NX_NOTIFY_DBCONN_STATUS 10
335 #define NX_NOTIFY_ALARM_TERMINATED 11
336 #define NX_NOTIFY_GRAPHS_CHANGED 12
337
338
339 //
340 // Request completion codes
341 //
342
343 #define RCC_SUCCESS ((DWORD)0)
344 #define RCC_COMPONENT_LOCKED ((DWORD)1)
345 #define RCC_ACCESS_DENIED ((DWORD)2)
346 #define RCC_INVALID_REQUEST ((DWORD)3)
347 #define RCC_TIMEOUT ((DWORD)4)
348 #define RCC_OUT_OF_STATE_REQUEST ((DWORD)5)
349 #define RCC_DB_FAILURE ((DWORD)6)
350 #define RCC_INVALID_OBJECT_ID ((DWORD)7)
351 #define RCC_ALREADY_EXIST ((DWORD)8)
352 #define RCC_COMM_FAILURE ((DWORD)9)
353 #define RCC_SYSTEM_FAILURE ((DWORD)10)
354 #define RCC_INVALID_USER_ID ((DWORD)11)
355 #define RCC_INVALID_ARGUMENT ((DWORD)12)
356 #define RCC_DUPLICATE_DCI ((DWORD)13)
357 #define RCC_INVALID_DCI_ID ((DWORD)14)
358 #define RCC_OUT_OF_MEMORY ((DWORD)15)
359 #define RCC_IO_ERROR ((DWORD)16)
360 #define RCC_INCOMPATIBLE_OPERATION ((DWORD)17)
361 #define RCC_OBJECT_CREATION_FAILED ((DWORD)18)
362 #define RCC_OBJECT_LOOP ((DWORD)19)
363 #define RCC_INVALID_OBJECT_NAME ((DWORD)20)
364 #define RCC_INVALID_ALARM_ID ((DWORD)21)
365 #define RCC_INVALID_ACTION_ID ((DWORD)22)
366 #define RCC_OPERATION_IN_PROGRESS ((DWORD)23)
367 #define RCC_DCI_COPY_ERRORS ((DWORD)24)
368 #define RCC_INVALID_EVENT_CODE ((DWORD)25)
369 #define RCC_NO_WOL_INTERFACES ((DWORD)26)
370 #define RCC_NO_MAC_ADDRESS ((DWORD)27)
371 #define RCC_NOT_IMPLEMENTED ((DWORD)28)
372 #define RCC_INVALID_TRAP_ID ((DWORD)29)
373 #define RCC_DCI_NOT_SUPPORTED ((DWORD)30)
374 #define RCC_VERSION_MISMATCH ((DWORD)31)
375 #define RCC_NPI_PARSE_ERROR ((DWORD)32)
376 #define RCC_DUPLICATE_PACKAGE ((DWORD)33)
377 #define RCC_PACKAGE_FILE_EXIST ((DWORD)34)
378 #define RCC_RESOURCE_BUSY ((DWORD)35)
379 #define RCC_INVALID_PACKAGE_ID ((DWORD)36)
380 #define RCC_INVALID_IP_ADDR ((DWORD)37)
381 #define RCC_ACTION_IN_USE ((DWORD)38)
382 #define RCC_VARIABLE_NOT_FOUND ((DWORD)39)
383 #define RCC_BAD_PROTOCOL ((DWORD)40)
384 #define RCC_ADDRESS_IN_USE ((DWORD)41)
385 #define RCC_NO_CIPHERS ((DWORD)42)
386 #define RCC_INVALID_PUBLIC_KEY ((DWORD)43)
387 #define RCC_INVALID_SESSION_KEY ((DWORD)44)
388 #define RCC_NO_ENCRYPTION_SUPPORT ((DWORD)45)
389 #define RCC_INTERNAL_ERROR ((DWORD)46)
390 #define RCC_EXEC_FAILED ((DWORD)47)
391 #define RCC_INVALID_TOOL_ID ((DWORD)48)
392 #define RCC_SNMP_ERROR ((DWORD)49)
393 #define RCC_BAD_REGEXP ((DWORD)50)
394 #define RCC_UNKNOWN_PARAMETER ((DWORD)51)
395 #define RCC_FILE_IO_ERROR ((DWORD)52)
396 #define RCC_CORRUPTED_MIB_FILE ((DWORD)53)
397 #define RCC_TRANSFER_IN_PROGRESS ((DWORD)54)
398 #define RCC_INVALID_JOB_ID ((DWORD)55)
399 #define RCC_INVALID_SCRIPT_ID ((DWORD)56)
400 #define RCC_INVALID_SCRIPT_NAME ((DWORD)57)
401 #define RCC_UNKNOWN_MAP_NAME ((DWORD)58)
402 #define RCC_INVALID_MAP_ID ((DWORD)59)
403 #define RCC_ACCOUNT_DISABLED ((DWORD)60)
404 #define RCC_NO_GRACE_LOGINS ((DWORD)61)
405 #define RCC_CONNECTION_BROKEN ((DWORD)62)
406 #define RCC_INVALID_CONFIG_ID ((DWORD)63)
407 #define RCC_DB_CONNECTION_LOST ((DWORD)64)
408 #define RCC_ALARM_OPEN_IN_HELPDESK ((DWORD)65)
409 #define RCC_ALARM_NOT_OUTSTANDING ((DWORD)66)
410 #define RCC_NOT_PUSH_DCI ((DWORD)67)
411 #define RCC_NXMP_PARSE_ERROR ((DWORD)68)
412 #define RCC_NXMP_VALIDATION_ERROR ((DWORD)69)
413 #define RCC_INVALID_GRAPH_ID ((DWORD)70)
414 #define RCC_LOCAL_CRYPTO_ERROR ((DWORD)71)
415 #define RCC_UNSUPPORTED_AUTH_TYPE ((DWORD)72)
416 #define RCC_BAD_CERTIFICATE ((DWORD)73)
417 #define RCC_INVALID_CERT_ID ((DWORD)74)
418 #define RCC_SNMP_FAILURE ((DWORD)75)
419 #define RCC_NO_L2_TOPOLOGY_SUPPORT ((DWORD)76)
420 #define RCC_INVALID_SITUATION_ID ((DWORD)77)
421 #define RCC_INSTANCE_NOT_FOUND ((DWORD)78)
422 #define RCC_INVALID_EVENT_ID ((DWORD)79)
423 #define RCC_AGENT_ERROR ((DWORD)80)
424 #define RCC_UNKNOWN_VARIABLE ((DWORD)81)
425 #define RCC_RESOURCE_NOT_AVAILABLE ((DWORD)82)
426 #define RCC_JOB_CANCEL_FAILED ((DWORD)83)
427
428
429 //
430 // Mask bits for NXCModifyEventTemplate()
431 //
432
433 #define EM_SEVERITY ((DWORD)0x01)
434 #define EM_FLAGS ((DWORD)0x02)
435 #define EM_NAME ((DWORD)0x04)
436 #define EM_MESSAGE ((DWORD)0x08)
437 #define EM_DESCRIPTION ((DWORD)0x10)
438 #define EM_ALL ((DWORD)0x1F)
439
440
441 //
442 // Mask bits (flags) for NXCModifyObject()
443 //
444
445 #define OBJ_UPDATE_NAME ((QWORD)_ULL(0x0000000001))
446 #define OBJ_UPDATE_AGENT_PORT ((QWORD)_ULL(0x0000000002))
447 #define OBJ_UPDATE_AGENT_AUTH ((QWORD)_ULL(0x0000000004))
448 #define OBJ_UPDATE_AGENT_SECRET ((QWORD)_ULL(0x0000000008))
449 #define OBJ_UPDATE_SNMP_VERSION ((QWORD)_ULL(0x0000000010))
450 #define OBJ_UPDATE_SNMP_COMMUNITY ((QWORD)_ULL(0x0000000020))
451 #define OBJ_UPDATE_ACL ((QWORD)_ULL(0x0000000040))
452 #define OBJ_UPDATE_IMAGE ((QWORD)_ULL(0x0000000080))
453 #define OBJ_UPDATE_SYNC_NETS ((QWORD)_ULL(0x0000000100))
454 #define OBJ_UPDATE_SERVICE_TYPE ((QWORD)_ULL(0x0000000200))
455 #define OBJ_UPDATE_IP_PROTO ((QWORD)_ULL(0x0000000400))
456 #define OBJ_UPDATE_IP_PORT ((QWORD)_ULL(0x0000000800))
457 #define OBJ_UPDATE_CHECK_REQUEST ((QWORD)_ULL(0x0000001000))
458 #define OBJ_UPDATE_CHECK_RESPONSE ((QWORD)_ULL(0x0000002000))
459 #define OBJ_UPDATE_POLLER_NODE ((QWORD)_ULL(0x0000004000))
460 #define OBJ_UPDATE_IP_ADDR ((QWORD)_ULL(0x0000008000))
461 #define OBJ_UPDATE_PEER_GATEWAY ((QWORD)_ULL(0x0000010000))
462 #define OBJ_UPDATE_NETWORK_LIST ((QWORD)_ULL(0x0000020000))
463 #define OBJ_UPDATE_STATUS_ALG ((QWORD)_ULL(0x0000040000))
464 #define OBJ_UPDATE_PROXY_NODE ((QWORD)_ULL(0x0000080000))
465 #define OBJ_UPDATE_NODE_FLAGS ((QWORD)_ULL(0x0000100000))
466 #define OBJ_UPDATE_ACT_EVENT ((QWORD)_ULL(0x0000200000))
467 #define OBJ_UPDATE_DEACT_EVENT ((QWORD)_ULL(0x0000400000))
468 #define OBJ_UPDATE_SOURCE_OBJECT ((QWORD)_ULL(0x0000800000))
469 #define OBJ_UPDATE_ACTIVE_STATUS ((QWORD)_ULL(0x0001000000))
470 #define OBJ_UPDATE_INACTIVE_STATUS ((QWORD)_ULL(0x0002000000))
471 #define OBJ_UPDATE_DCI_LIST ((QWORD)_ULL(0x0004000000))
472 #define OBJ_UPDATE_SCRIPT ((QWORD)_ULL(0x0008000000))
473 #define OBJ_UPDATE_CLUSTER_TYPE ((QWORD)_ULL(0x0010000000))
474 #define OBJ_UPDATE_RESOURCES ((QWORD)_ULL(0x0020000000))
475 #define OBJ_UPDATE_SNMP_PROXY ((QWORD)_ULL(0x0040000000))
476 #define OBJ_UPDATE_REQUIRED_POLLS ((QWORD)_ULL(0x0080000000))
477 #define OBJ_UPDATE_TRUSTED_NODES ((QWORD)_ULL(0x0100000000))
478 #define OBJ_UPDATE_CUSTOM_ATTRS ((QWORD)_ULL(0x0200000000))
479 #define OBJ_UPDATE_USE_IFXTABLE ((QWORD)_ULL(0x0400000000))
480 #define OBJ_UPDATE_AUTO_APPLY ((QWORD)_ULL(0x0800000000))
481 #define OBJ_UPDATE_AUTO_BIND ((QWORD)_ULL(0x1000000000))
482
483
484 //
485 // Global user rights
486 //
487
488 #define SYSTEM_ACCESS_MANAGE_USERS 0x00000001
489 #define SYSTEM_ACCESS_SERVER_CONFIG 0x00000002
490 #define SYSTEM_ACCESS_CONFIGURE_TRAPS 0x00000004
491 #define SYSTEM_ACCESS_MANAGE_SESSIONS 0x00000008
492 #define SYSTEM_ACCESS_VIEW_EVENT_DB 0x00000010
493 #define SYSTEM_ACCESS_EDIT_EVENT_DB 0x00000020
494 #define SYSTEM_ACCESS_EPP 0x00000040
495 #define SYSTEM_ACCESS_MANAGE_ACTIONS 0x00000080
496 #define SYSTEM_ACCESS_DELETE_ALARMS 0x00000100
497 #define SYSTEM_ACCESS_MANAGE_PACKAGES 0x00000200
498 // OBSOLETE: #define SYSTEM_ACCESS_MANAGE_LPP 0x00000400
499 #define SYSTEM_ACCESS_MANAGE_TOOLS 0x00000800
500 #define SYSTEM_ACCESS_MANAGE_SCRIPTS 0x00001000
501 #define SYSTEM_ACCESS_VIEW_TRAP_LOG 0x00002000
502 // OBSOLETE: #define SYSTEM_ACCESS_MANAGE_MODULES 0x00004000
503 #define SYSTEM_ACCESS_MANAGE_AGENT_CFG 0x00008000
504 #define SYSTEM_ACCESS_MANAGE_SITUATIONS 0x00010000
505 #define SYSTEM_ACCESS_SEND_SMS 0x00020000
506 #define SYSTEM_ACCESS_MANAGE_MAPS 0x00040000
507 #define SYSTEM_ACCESS_REGISTER_AGENTS 0x00080000
508 #define SYSTEM_ACCESS_READ_FILES 0x00100000
509
510 #define SYSTEM_ACCESS_FULL 0x001FFFFF
511
512
513 //
514 // Object access rights
515 //
516
517 #define OBJECT_ACCESS_READ 0x00000001
518 #define OBJECT_ACCESS_MODIFY 0x00000002
519 #define OBJECT_ACCESS_CREATE 0x00000004
520 #define OBJECT_ACCESS_DELETE 0x00000008
521 #define OBJECT_ACCESS_READ_ALARMS 0x00000010
522 #define OBJECT_ACCESS_ACL 0x00000020
523 #define OBJECT_ACCESS_ACK_ALARMS 0x00000040
524 #define OBJECT_ACCESS_SEND_EVENTS 0x00000080
525 #define OBJECT_ACCESS_CONTROL 0x00000100
526 #define OBJECT_ACCESS_TERM_ALARMS 0x00000200
527 #define OBJECT_ACCESS_PUSH_DATA 0x00000400
528
529
530 //
531 // User/group flags
532 //
533
534 #define UF_MODIFIED 0x0001
535 #define UF_DELETED 0x0002
536 #define UF_DISABLED 0x0004
537 #define UF_CHANGE_PASSWORD 0x0008
538 #define UF_CANNOT_CHANGE_PASSWORD 0x0010
539
540
541 //
542 // User certificate mapping methods
543 //
544
545 #define USER_MAP_CERT_BY_SUBJECT 0
546 #define USER_MAP_CERT_BY_PUBKEY 1
547
548
549 //
550 // User database change notification types
551 //
552
553 #define USER_DB_CREATE 0
554 #define USER_DB_DELETE 1
555 #define USER_DB_MODIFY 2
556
557
558 //
559 // Situation change notification types
560 //
561
562 #define SITUATION_CREATE 1
563 #define SITUATION_DELETE 2
564 #define SITUATION_UPDATE 3
565 #define SITUATION_INSTANCE_UPDATE 4
566 #define SITUATION_INSTANCE_DELETE 5
567
568
569 //
570 // Data sources
571 //
572
573 #define DS_INTERNAL 0
574 #define DS_NATIVE_AGENT 1
575 #define DS_SNMP_AGENT 2
576 #define DS_CHECKPOINT_AGENT 3
577 #define DS_PUSH_AGENT 4
578
579
580 //
581 // Item status
582 //
583
584 #define ITEM_STATUS_ACTIVE 0
585 #define ITEM_STATUS_DISABLED 1
586 #define ITEM_STATUS_NOT_SUPPORTED 2
587
588
589 //
590 // Delta calculation methods for DCIs
591 //
592
593 #define DCM_ORIGINAL_VALUE 0
594 #define DCM_SIMPLE 1
595 #define DCM_AVERAGE_PER_SECOND 2
596 #define DCM_AVERAGE_PER_MINUTE 3
597
598
599 //
600 // Threshold functions and operations
601 //
602
603 #define F_LAST 0
604 #define F_AVERAGE 1
605 #define F_DEVIATION 2
606 #define F_DIFF 3
607 #define F_ERROR 4
608
609 #define OP_LE 0
610 #define OP_LE_EQ 1
611 #define OP_EQ 2
612 #define OP_GT_EQ 3
613 #define OP_GT 4
614 #define OP_NE 5
615 #define OP_LIKE 6
616 #define OP_NOTLIKE 7
617
618
619 //
620 // DCI base units
621 //
622
623 #define DCI_BASEUNITS_OTHER 0
624 #define DCI_BASEUNITS_CUSTOM 1
625 #define DCI_BASEUNITS_BYTES 2
626 #define DCI_BASEUNITS_BITS 3
627 #define DCI_BASEUNITS_SECONDS 4
628 #define DCI_BASEUNITS_PERCENTS 5
629 #define DCI_BASEUNITS_BITS_PER_SECOND 6
630 #define DCI_BASEUNITS_BYTES_PER_SECOND 7
631
632
633 //
634 // Event policy rule flags
635 //
636
637 #define RF_STOP_PROCESSING 0x0001
638 #define RF_NEGATED_SOURCE 0x0002
639 #define RF_NEGATED_EVENTS 0x0004
640 #define RF_GENERATE_ALARM 0x0008
641 #define RF_DISABLED 0x0010
642 #define RF_SEVERITY_INFO 0x0100
643 #define RF_SEVERITY_WARNING 0x0200
644 #define RF_SEVERITY_MINOR 0x0400
645 #define RF_SEVERITY_MAJOR 0x0800
646 #define RF_SEVERITY_CRITICAL 0x1000
647
648
649 //
650 // Action types
651 //
652
653 #define ACTION_EXEC 0
654 #define ACTION_REMOTE 1
655 #define ACTION_SEND_EMAIL 2
656 #define ACTION_SEND_SMS 3
657 #define ACTION_FORWARD_EVENT 4
658
659
660 //
661 // Deployment manager status codes
662 //
663
664 #define DEPLOYMENT_STATUS_PENDING 0
665 #define DEPLOYMENT_STATUS_TRANSFER 1
666 #define DEPLOYMENT_STATUS_INSTALLATION 2
667 #define DEPLOYMENT_STATUS_COMPLETED 3
668 #define DEPLOYMENT_STATUS_FAILED 4
669 #define DEPLOYMENT_STATUS_INITIALIZE 5
670 #define DEPLOYMENT_STATUS_FINISHED 255
671
672
673 //
674 // Session subscription codes (data channels)
675 //
676
677 #define NXC_CHANNEL_EVENTS 0x0001
678 #define NXC_CHANNEL_SYSLOG 0x0002
679 #define NXC_CHANNEL_ALARMS 0x0004
680 #define NXC_CHANNEL_OBJECTS 0x0008
681 #define NXC_CHANNEL_SNMP_TRAPS 0x0010
682 #define NXC_CHANNEL_AUDIT_LOG 0x0020
683 #define NXC_CHANNEL_SITUATIONS 0x0040
684
685
686 //
687 // Node creation flags
688 //
689
690 #define NXC_NCF_DISABLE_ICMP 0x0001
691 #define NXC_NCF_DISABLE_NXCP 0x0002
692 #define NXC_NCF_DISABLE_SNMP 0x0004
693 #define NXC_NCF_CREATE_UNMANAGED 0x0008
694
695
696 //
697 // Server components
698 //
699
700 #define SRV_COMPONENT_DISCOVERY_MGR 1
701
702
703 //
704 // Management pack installation flags
705 //
706
707 #define NXMPIF_REPLACE_EVENT_BY_CODE 0x0001
708 #define NXMPIF_REPLACE_EVENT_BY_NAME 0x0002
709
710
711 //
712 // Graph access flags
713 //
714
715 #define NXGRAPH_ACCESS_READ 0x01
716 #define NXGRAPH_ACCESS_WRITE 0x02
717
718
719 //
720 // Cluster types
721 //
722
723 #define CLUSTER_TYPE_GENERIC 0
724
725
726 //
727 // IP network
728 //
729
730 typedef struct
731 {
732 DWORD dwAddr;
733 DWORD dwMask;
734 } IP_NETWORK;
735
736
737 //
738 // Agent's parameter information
739 //
740
741 typedef struct
742 {
743 TCHAR szName[MAX_PARAM_NAME];
744 TCHAR szDescription[MAX_DB_STRING];
745 int iDataType;
746 } NXC_AGENT_PARAM;
747
748
749 //
750 // Action structure
751 //
752
753 typedef struct
754 {
755 DWORD dwId;
756 int iType;
757 BOOL bIsDisabled;
758 TCHAR szName[MAX_OBJECT_NAME];
759 TCHAR szRcptAddr[MAX_RCPT_ADDR_LEN];
760 TCHAR szEmailSubject[MAX_EMAIL_SUBJECT_LEN];
761 TCHAR *pszData;
762 } NXC_ACTION;
763
764
765 //
766 // Alarm structure
767 //
768
769 typedef struct
770 {
771 QWORD qwSourceEventId; // Originating event ID
772 DWORD dwAlarmId; // Unique alarm ID
773 DWORD dwCreationTime; // Alarm creation time in UNIX time format
774 DWORD dwLastChangeTime; // Alarm's last change time in UNIX time format
775 DWORD dwSourceObject; // Source object ID
776 DWORD dwSourceEventCode;// Originating event code
777 BYTE nCurrentSeverity; // Alarm's current severity
778 BYTE nOriginalSeverity; // Alarm's original severity
779 BYTE nState; // Current state
780 BYTE nHelpDeskState; // State of alarm in helpdesk system
781 DWORD dwAckByUser; // Id of user who was acknowledged this alarm (0 for system)
782 DWORD dwTermByUser; // ID of user who was terminated this alarm (0 for system)
783 DWORD dwRepeatCount;
784 DWORD dwTimeout;
785 DWORD dwTimeoutEvent;
786 TCHAR szMessage[MAX_DB_STRING];
787 TCHAR szKey[MAX_DB_STRING];
788 TCHAR szHelpDeskRef[MAX_HELPDESK_REF_LEN];
789 void *pUserData; // Can be freely used by client application
790 } NXC_ALARM;
791
792
793 //
794 // Image information
795 //
796
797 typedef struct
798 {
799 DWORD dwId;
800 TCHAR szName[MAX_OBJECT_NAME];
801 BYTE hash[MD5_DIGEST_SIZE];
802 } NXC_IMAGE;
803
804
805 //
806 // Image list
807 //
808
809 typedef struct
810 {
811 DWORD dwNumImages;
812 NXC_IMAGE *pImageList;
813 } NXC_IMAGE_LIST;
814
815
816 //
817 // Trap parameter mapping entry
818 //
819
820 typedef struct
821 {
822 DWORD *pdwObjectId; // Trap OID
823 DWORD dwOidLen; // Trap OID length
824 TCHAR szDescription[MAX_DB_STRING];
825 } NXC_OID_MAP;
826
827
828 //
829 // Trap configuration entry
830 //
831
832 typedef struct
833 {
834 DWORD dwId; // Entry ID
835 DWORD *pdwObjectId; // Trap OID
836 DWORD dwOidLen; // Trap OID length (if highest bit is set, than it's a position)
837 DWORD dwEventCode; // Event code
838 DWORD dwNumMaps; // Number of parameter mappings
839 NXC_OID_MAP *pMaps;
840 TCHAR szDescription[MAX_DB_STRING];
841 TCHAR szUserTag[MAX_USERTAG_LENGTH];
842 } NXC_TRAP_CFG_ENTRY;
843
844
845 //
846 // Condition's input DCI definition
847 //
848
849 typedef struct
850 {
851 DWORD dwId;
852 DWORD dwNodeId;
853 int nFunction; // Average, last, diff
854 int nPolls; // Number of polls used for average
855 } INPUT_DCI;
856
857
858 //
859 // Cluster resource
860 //
861
862 typedef struct
863 {
864 DWORD dwId;
865 TCHAR szName[MAX_DB_STRING];
866 DWORD dwIpAddr;
867 DWORD dwCurrOwner;
868 } CLUSTER_RESOURCE;
869
870
871 /********************************************************************
872 * Following part of this file shouldn't be included by server code *
873 ********************************************************************/
874
875 #ifndef LIBNXCL_NO_DECLARATIONS
876
877
878 //
879 // NXCConnect flags
880 //
881
882 #define NXCF_DEFAULT 0
883 #define NXCF_ENCRYPT 0x01
884 #define NXCF_EXACT_VERSION_MATCH 0x02
885 #define NXCF_USE_CERTIFICATE 0x04
886
887
888 //
889 // Callbacks data types
890 //
891
892 typedef void (* NXC_EVENT_HANDLER)(NXC_SESSION hSession, DWORD dwEvent, DWORD dwCode, void *pArg);
893 typedef void (* NXC_DEBUG_CALLBACK)(TCHAR *pMsg);
894
895
896 //
897 // Event log record structure
898 //
899
900 typedef struct
901 {
902 QWORD qwEventId;
903 DWORD dwTimeStamp;
904 DWORD dwEventCode;
905 DWORD dwSourceId;
906 DWORD dwSeverity;
907 TCHAR szMessage[MAX_EVENT_MSG_LENGTH];
908 TCHAR szUserTag[MAX_USERTAG_LENGTH];
909 } NXC_EVENT;
910
911
912 //
913 // Syslog record structure
914 //
915
916 typedef struct
917 {
918 QWORD qwMsgId;
919 DWORD dwTimeStamp;
920 WORD wFacility;
921 WORD wSeverity;
922 DWORD dwSourceObject;
923 TCHAR szHost[MAX_SYSLOG_HOSTNAME_LEN];
924 TCHAR szTag[MAX_SYSLOG_TAG_LEN];
925 TCHAR *pszText;
926 } NXC_SYSLOG_RECORD;
927
928
929 //
930 // Server's configuration variable
931 //
932
933 typedef struct
934 {
935 TCHAR szName[MAX_OBJECT_NAME];
936 TCHAR szValue[MAX_DB_STRING];
937 BOOL bNeedRestart;
938 } NXC_SERVER_VARIABLE;
939
940
941 //
942 // Agent package information
943 //
944
945 typedef struct
946 {
947 DWORD dwId;
948 TCHAR szName[MAX_PACKAGE_NAME_LEN];
949 TCHAR szVersion[MAX_AGENT_VERSION_LEN];
950 TCHAR szPlatform[MAX_PLATFORM_NAME_LEN];
951 TCHAR szFileName[MAX_DB_STRING];
952 TCHAR szDescription[MAX_DB_STRING];
953 } NXC_PACKAGE_INFO;
954
955
956 //
957 // Event configuration structure
958 //
959
960 typedef struct
961 {
962 DWORD dwCode;
963 DWORD dwSeverity;
964 DWORD dwFlags;
965 TCHAR szName[MAX_EVENT_NAME];
966 TCHAR *pszMessage;
967 TCHAR *pszDescription;
968 } NXC_EVENT_TEMPLATE;
969
970
971 //
972 // Entry in object's ACL
973 //
974
975 typedef struct
976 {
977 DWORD dwUserId;
978 DWORD dwAccessRights;
979 } NXC_ACL_ENTRY;
980
981
982 //
983 // Network object structure
984 //
985
986 struct __nxc_object_iface
987 {
988 DWORD dwIpNetMask; // Ip netmask.
989 DWORD dwIfIndex; // Interface index.
990 DWORD dwIfType; // Interface type
991 BYTE bMacAddr[MAC_ADDR_LENGTH];
992 WORD wRequiredPollCount;
993 };
994
995 struct __nxc_object_node
996 {
997 DWORD dwFlags;
998 DWORD dwNodeType;
999 DWORD dwPollerNode;
1000 DWORD dwProxyNode;
1001 DWORD dwSNMPProxy;
1002 DWORD dwZoneGUID;
1003 TCHAR szSharedSecret[MAX_SECRET_LENGTH];
1004 TCHAR szCommunityString[MAX_COMMUNITY_LENGTH];
1005 TCHAR szObjectId[MAX_OID_LENGTH];
1006 WORD wAgentPort; // Listening TCP port for native agent
1007 WORD wAuthMethod; // Native agent's authentication method
1008 TCHAR szAgentVersion[MAX_AGENT_VERSION_LEN];
1009 TCHAR szPlatformName[MAX_PLATFORM_NAME_LEN];
1010 BYTE nUseIfXTable;
1011 BYTE nSNMPVersion;
1012 WORD wRequiredPollCount;
1013 TCHAR szSysDescription[MAX_DB_STRING];
1014 };
1015
1016 struct __nxc_object_subnet
1017 {
1018 DWORD dwIpNetMask;
1019 DWORD dwZoneGUID;
1020 };
1021
1022 struct __nxc_object_container
1023 {
1024 DWORD dwCategory;
1025 BOOL isAutoBindEnabled;
1026 TCHAR *pszAutoBindFilter;
1027 };
1028
1029 struct __nxc_object_dct
1030 {
1031 DWORD dwVersion;
1032 BOOL isAutoApplyEnabled;
1033 TCHAR *pszAutoApplyFilter;
1034 };
1035
1036 struct __nxc_object_netsrv
1037 {
1038 int iServiceType;
1039 WORD wProto;
1040 WORD wPort;
1041 DWORD dwPollerNode;
1042 TCHAR *pszRequest;
1043 TCHAR *pszResponse;
1044 WORD wRequiredPollCount;
1045 };
1046
1047 struct __nxc_object_zone
1048 {
1049 DWORD dwZoneGUID;
1050 DWORD dwControllerIpAddr;
1051 DWORD dwAddrListSize;
1052 DWORD *pdwAddrList;
1053 WORD wZoneType;
1054 };
1055
1056 struct __nxc_object_vpnc
1057 {
1058 DWORD dwPeerGateway;
1059 DWORD dwNumLocalNets;
1060 DWORD dwNumRemoteNets;
1061 IP_NETWORK *pLocalNetList;
1062 IP_NETWORK *pRemoteNetList;
1063 };
1064
1065 struct __nxc_object_cond
1066 {
1067 TCHAR *pszScript;
1068 DWORD dwActivationEvent;
1069 DWORD dwDeactivationEvent;
1070 DWORD dwSourceObject;
1071 WORD wActiveStatus;
1072 WORD wInactiveStatus;
1073 DWORD dwNumDCI;
1074 INPUT_DCI *pDCIList;
1075 };
1076
1077 struct __nxc_object_cluster
1078 {
1079 DWORD dwClusterType;
1080 DWORD dwNumSyncNets;
1081 IP_NETWORK *pSyncNetList;
1082 DWORD dwNumResources;
1083 CLUSTER_RESOURCE *pResourceList;
1084 };
1085
1086 typedef struct
1087 {
1088 DWORD dwId; // Unique object's identifier
1089 int iClass; // Object's class
1090 int iStatus; // Object's status
1091 DWORD dwIpAddr; // IP address
1092 TCHAR szName[MAX_OBJECT_NAME];
1093 DWORD dwNumParents;
1094 DWORD *pdwParentList;
1095 DWORD dwNumChilds;
1096 DWORD *pdwChildList;
1097 BOOL bIsDeleted; // TRUE for deleted objects
1098 BOOL bInheritRights;
1099 DWORD dwAclSize;
1100 NXC_ACL_ENTRY *pAccessList;
1101 DWORD dwImage; // Image ID or IMG_DEFAULT for default image
1102 int iStatusCalcAlg; // Status calculation algorithm
1103 int iStatusPropAlg; // Status propagation alhorithm
1104 int iFixedStatus; // Status to be propagated if alg = SA_PROPAGATE_FIXED
1105 int iStatusShift; // Status shift for SA_PROPAGATE_RELATIVE
1106 int iStatusTrans[4];
1107 int iStatusSingleTh;
1108 int iStatusThresholds[4];
1109 TCHAR *pszComments;
1110 DWORD dwNumTrustedNodes;
1111 DWORD *pdwTrustedNodes;
1112 #ifdef __cplusplus
1113 StringMap *pCustomAttrs;
1114 #else
1115 void *pCustomAttrs;
1116 #endif
1117 union
1118 {
1119 struct __nxc_object_iface iface;
1120 struct __nxc_object_node node;
1121 struct __nxc_object_subnet subnet;
1122 struct __nxc_object_container container;
1123 struct __nxc_object_dct dct;
1124 struct __nxc_object_netsrv netsrv;
1125 struct __nxc_object_zone zone;
1126 struct __nxc_object_vpnc vpnc; // VPN connector
1127 struct __nxc_object_cond cond; // Condition
1128 struct __nxc_object_cluster cluster;
1129 };
1130 } NXC_OBJECT;
1131
1132
1133 //
1134 // Structure with data for NXCModifyObject
1135 //
1136
1137 typedef struct
1138 {
1139 QWORD qwFlags;
1140 DWORD dwObjectId;
1141 const TCHAR *pszName;
1142 int iAgentPort;
1143 int iAuthType;
1144 const TCHAR *pszSecret;
1145 const TCHAR *pszCommunity;
1146 BOOL bInheritRights;
1147 DWORD dwImage;
1148 DWORD dwAclSize;
1149 NXC_ACL_ENTRY *pAccessList;
1150 WORD wSNMPVersion;
1151 int iServiceType;
1152 WORD wProto;
1153 WORD wPort;
1154 DWORD dwPollerNode;
1155 const TCHAR *pszRequest;
1156 const TCHAR *pszResponse;
1157 DWORD dwIpAddr;
1158 DWORD dwPeerGateway;
1159 DWORD dwNumLocalNets;
1160 DWORD dwNumRemoteNets;
1161 IP_NETWORK *pLocalNetList;
1162 IP_NETWORK *pRemoteNetList;
1163 int iStatusCalcAlg; // Status calculation algorithm
1164 int iStatusPropAlg; // Status propagation alhorithm
1165 int iFixedStatus; // Status to be propagated if alg = SA_PROPAGATE_FIXED
1166 int iStatusShift; // Status shift for SA_PROPAGATE_RELATIVE
1167 int iStatusTrans[4];
1168 int iStatusSingleTh;
1169 int iStatusThresholds[4];
1170 DWORD dwProxyNode;
1171 DWORD dwSNMPProxy;
1172 DWORD dwNodeFlags;
1173 DWORD dwActivationEvent;
1174 DWORD dwDeactivationEvent;
1175 DWORD dwSourceObject;
1176 int nActiveStatus;
1177 int nInactiveStatus;
1178 DWORD dwNumDCI;
1179 INPUT_DCI *pDCIList;
1180 const TCHAR *pszScript;
1181 DWORD dwClusterType;
1182 DWORD dwNumSyncNets;
1183 IP_NETWORK *pSyncNetList;
1184 DWORD dwNumResources;
1185 CLUSTER_RESOURCE *pResourceList;
1186 WORD wRequiredPollCount;
1187 DWORD dwNumTrustedNodes;
1188 DWORD *pdwTrustedNodes;
1189 int nUseIfXTable;
1190 BOOL isAutoApplyEnabled;
1191 const TCHAR *pszAutoApplyFilter;
1192 BOOL isAutoBindEnabled;
1193 const TCHAR *pszAutoBindFilter;
1194 #ifdef __cplusplus
1195 StringMap *pCustomAttrs;
1196 #else
1197 void *pCustomAttrs;
1198 #endif
1199 } NXC_OBJECT_UPDATE;
1200
1201
1202 //
1203 // NetXMS user information structure
1204 //
1205
1206 typedef struct
1207 {
1208 TCHAR szName[MAX_USER_NAME];
1209 uuid_t guid;
1210 DWORD dwId;
1211 DWORD dwSystemRights;
1212 WORD wFlags;
1213 WORD nAuthMethod; // Only for users
1214 DWORD dwNumMembers; // Only for groups
1215 DWORD *pdwMemberList; // Only for groups
1216 TCHAR szFullName[MAX_USER_FULLNAME]; // Only for users
1217 TCHAR szDescription[MAX_USER_DESCR];
1218 int nCertMappingMethod; // Only for users
1219 TCHAR *pszCertMappingData; // Only for users
1220 } NXC_USER;
1221
1222
1223 //
1224 // Data collection item threshold structure
1225 //
1226
1227 typedef struct
1228 {
1229 DWORD dwId;
1230 DWORD dwEvent;
1231 DWORD dwRearmEvent;
1232 WORD wFunction;
1233 WORD wOperation;
1234 DWORD dwArg1;
1235 DWORD dwArg2;
1236 LONG nRepeatInterval;
1237 union
1238 {
1239 DWORD dwInt32;
1240 INT64 qwInt64;
1241 double dFloat;
1242 TCHAR szString[MAX_STRING_VALUE];
1243 } value;
1244 } NXC_DCI_THRESHOLD;
1245
1246
1247 //
1248 // Data collection item structure
1249 //
1250
1251 typedef struct
1252 {
1253 DWORD dwId;
1254 DWORD dwTemplateId;
1255 DWORD dwResourceId;
1256 TCHAR szName[MAX_ITEM_NAME];
1257 TCHAR szDescription[MAX_DB_STRING];
1258 TCHAR szInstance[MAX_DB_STRING];
1259 int iPollingInterval;
1260 int iRetentionTime;
1261 BYTE iSource;
1262 BYTE iDataType;
1263 BYTE iStatus;
1264 BYTE iDeltaCalculation;
1265 BYTE iAdvSchedule;
1266 BYTE iProcessAllThresholds;
1267 DWORD dwNumThresholds;
1268 NXC_DCI_THRESHOLD *pThresholdList;
1269 TCHAR *pszFormula;
1270 DWORD dwNumSchedules;
1271 TCHAR **ppScheduleList;
1272 DWORD dwProxyNode;
1273 int nBaseUnits;
1274 int nMultiplier;
1275 TCHAR *pszCustomUnitName;
1276 TCHAR *pszPerfTabSettings;
1277 } NXC_DCI;
1278
1279
1280 //
1281 // Node's data collection list information
1282 //
1283
1284 typedef struct
1285 {
1286 DWORD dwNodeId;
1287 DWORD dwNumItems;
1288 NXC_DCI *pItems;
1289 } NXC_DCI_LIST;
1290
1291
1292 //
1293 // Row structure
1294 //
1295
1296 #pragma pack(1)
1297
1298 typedef struct
1299 {
1300 DWORD dwTimeStamp;
1301 union
1302 {
1303 DWORD dwInt32;
1304 INT64 qwInt64;
1305 double dFloat;
1306 TCHAR szString[MAX_STRING_VALUE];
1307 } value;
1308 } NXC_DCI_ROW;
1309
1310 #pragma pack()
1311
1312
1313 //
1314 // DCI's collected data
1315 //
1316
1317 typedef struct
1318 {
1319 DWORD dwNodeId; // Owner's node id
1320 DWORD dwItemId; // Item id
1321 DWORD dwNumRows; // Number of rows in set
1322 WORD wDataType; // Data type (integer, string, etc.)
1323 WORD wRowSize; // Size of single row in bytes
1324 NXC_DCI_ROW *pRows; // Array of rows
1325 } NXC_DCI_DATA;
1326
1327
1328 //
1329 // MIB file list
1330 //
1331
1332 typedef struct
1333 {
1334 DWORD dwNumFiles;
1335 TCHAR **ppszName;
1336 BYTE **ppHash;
1337 } NXC_MIB_LIST;
1338
1339
1340 //
1341 // Event processing policy rule
1342 //
1343
1344 typedef struct
1345 {
1346 DWORD dwFlags;
1347 DWORD dwId;
1348 DWORD dwNumActions;
1349 DWORD dwNumEvents;
1350 DWORD dwNumSources;
1351 DWORD *pdwActionList;
1352 DWORD *pdwEventList;
1353 DWORD *pdwSourceList;
1354 TCHAR *pszComment;
1355 TCHAR *pszScript;
1356 TCHAR szAlarmKey[MAX_DB_STRING];
1357 TCHAR szAlarmMessage[MAX_DB_STRING];
1358 WORD wAlarmSeverity;
1359 DWORD dwAlarmTimeout;
1360 DWORD dwAlarmTimeoutEvent;
1361 DWORD dwSituationId;
1362 TCHAR szSituationInstance[MAX_DB_STRING];
1363 #ifdef __cplusplus
1364 StringMap *pSituationAttrList;
1365 #else
1366 void *pSituationAttrList;
1367 #endif
1368 } NXC_EPP_RULE;
1369
1370
1371 //
1372 // Event processing policy
1373 //
1374
1375 typedef struct
1376 {
1377 DWORD dwNumRules;
1378 NXC_EPP_RULE *pRuleList;
1379 } NXC_EPP;
1380
1381
1382 //
1383 // Package deployment status information
1384 //
1385
1386 typedef struct
1387 {
1388 DWORD dwNodeId;
1389 DWORD dwStatus;
1390 TCHAR *pszErrorMessage;
1391 } NXC_DEPLOYMENT_STATUS;
1392
1393
1394 //
1395 // Object creation information structure
1396 //
1397
1398 typedef struct
1399 {
1400 int iClass;
1401 DWORD dwParentId;
1402 TCHAR *pszName;
1403 TCHAR *pszComments;
1404 union
1405 {
1406 struct
1407 {
1408 DWORD dwIpAddr;
1409 DWORD dwNetMask;
1410 DWORD dwCreationFlags;
1411 DWORD dwProxyNode;
1412 DWORD dwSNMPProxy;
1413 } node;
1414 struct
1415 {
1416 DWORD dwCategory;
1417 } container;
1418 struct
1419 {
1420 int iServiceType;
1421 WORD wProto;
1422 WORD wPort;
1423 TCHAR *pszRequest;
1424 TCHAR *pszResponse;
1425 } netsrv;
1426 } cs;
1427 } NXC_OBJECT_CREATE_INFO;
1428
1429
1430 //
1431 // Container category
1432 //
1433
1434 typedef struct
1435 {
1436 DWORD dwId;
1437 DWORD dwImageId;
1438 TCHAR szName[MAX_OBJECT_NAME];
1439 TCHAR *pszDescription;
1440 } NXC_CONTAINER_CATEGORY;
1441
1442
1443 //
1444 // Container categories list
1445 //
1446
1447 typedef struct
1448 {
1449 DWORD dwNumElements;
1450 NXC_CONTAINER_CATEGORY *pElements;
1451 } NXC_CC_LIST;
1452
1453
1454 //
1455 // DCI information and last value for NXCGetLastValues()
1456 //
1457
1458 typedef struct
1459 {
1460 DWORD dwId;
1461 DWORD dwTimestamp;
1462 TCHAR szName[MAX_ITEM_NAME];
1463 TCHAR szDescription[MAX_DB_STRING];
1464 TCHAR szValue[MAX_DB_STRING];
1465 BYTE nDataType;
1466 BYTE nSource;
1467 BYTE nStatus;
1468 } NXC_DCI_VALUE;
1469
1470
1471 //
1472 // Object tool
1473 //
1474
1475 typedef struct
1476 {
1477 DWORD dwId;
1478 DWORD dwFlags;
1479 WORD wType;
1480 TCHAR szName[MAX_DB_STRING];
1481 TCHAR szDescription[MAX_DB_STRING];
1482 TCHAR *pszMatchingOID;
1483 TCHAR *pszData;
1484 TCHAR *pszConfirmationText;
1485 } NXC_OBJECT_TOOL;
1486
1487
1488 //
1489 // Results of table object tool execution
1490 //
1491
1492 typedef struct
1493 {
1494 DWORD dwNumCols;
1495 DWORD dwNumRows;
1496 TCHAR *pszTitle; // Table's title
1497 TCHAR **ppszColNames;
1498 LONG *pnColFormat;
1499 TCHAR **ppszData;
1500 } NXC_TABLE_DATA;
1501
1502
1503 //
1504 // Object tool column information
1505 //
1506
1507 typedef struct
1508 {
1509 TCHAR szName[MAX_DB_STRING];
1510 TCHAR szOID[MAX_DB_STRING];
1511 int nFormat;
1512 int nSubstr;
1513 } NXC_OBJECT_TOOL_COLUMN;
1514
1515
1516 //
1517 // Object tool detailed information
1518 //
1519
1520 typedef struct
1521 {
1522 DWORD dwId;
1523 DWORD dwFlags;
1524 TCHAR szName[MAX_DB_STRING];
1525 TCHAR szDescription[MAX_DB_STRING];
1526 TCHAR *pszMatchingOID;
1527 TCHAR *pszData;
1528 TCHAR *pszConfirmationText;
1529 DWORD *pdwACL;
1530 DWORD dwACLSize;
1531 WORD wType;
1532 WORD wNumColumns;
1533 NXC_OBJECT_TOOL_COLUMN *pColList;
1534 } NXC_OBJECT_TOOL_DETAILS;
1535
1536
1537 //
1538 // Server stats
1539 //
1540
1541 typedef struct
1542 {
1543 DWORD dwNumAlarms;
1544 DWORD dwAlarmsBySeverity[5];
1545 DWORD dwNumObjects;
1546 DWORD dwNumNodes;
1547 DWORD dwNumDCI;
1548 DWORD dwNumClientSessions;
1549 DWORD dwServerUptime;
1550 DWORD dwServerProcessVMSize;
1551 DWORD dwServerProcessWorkSet;
1552 TCHAR szServerVersion[MAX_DB_STRING];
1553 DWORD dwQSizeConditionPoller;
1554 DWORD dwQSizeConfPoller;
1555 DWORD dwQSizeDCIPoller;
1556 DWORD dwQSizeDBWriter;
1557 DWORD dwQSizeEvents;
1558 DWORD dwQSizeDiscovery;
1559 DWORD dwQSizeNodePoller;
1560 DWORD dwQSizeRoutePoller;
1561 DWORD dwQSizeStatusPoller;
1562 } NXC_SERVER_STATS;
1563
1564
1565 //
1566 // Script info
1567 //
1568
1569 typedef struct
1570 {
1571 DWORD dwId;
1572 TCHAR szName[MAX_DB_STRING];
1573 } NXC_SCRIPT_INFO;
1574
1575
1576 //
1577 // Client session information
1578 //
1579
1580 typedef struct
1581 {
1582 DWORD dwSessionId;
1583 int nCipher;
1584 TCHAR szUserName[MAX_USER_NAME];
1585 TCHAR szClientApp[MAX_DB_STRING];
1586 } NXC_CLIENT_SESSION_INFO;
1587
1588
1589 //
1590 // Trap log records
1591 //
1592
1593 typedef struct
1594 {
1595 QWORD qwId;
1596 DWORD dwTimeStamp;
1597 DWORD dwIpAddr;
1598 DWORD dwObjectId;
1599 TCHAR szTrapOID[MAX_DB_STRING];
1600 TCHAR *pszTrapVarbinds;
1601 } NXC_SNMP_TRAP_LOG_RECORD;
1602
1603
1604 //
1605 // Map information
1606 //
1607
1608 typedef struct
1609 {
1610 DWORD dwMapId;
1611 DWORD dwObjectId;
1612 DWORD dwAccess; // Access rights to the map for current user
1613 TCHAR szName[MAX_DB_STRING];
1614 } NXC_MAP_INFO;
1615
1616
1617 //
1618 // Agent configuration info
1619 //
1620
1621 typedef struct
1622 {
1623 DWORD dwId;
1624 DWORD dwSequence;
1625 TCHAR szName[MAX_DB_STRING];
1626 } NXC_AGENT_CONFIG_INFO;
1627
1628
1629 //
1630 // Agent configuration - all data
1631 //
1632
1633 typedef struct
1634 {
1635 DWORD dwId;
1636 DWORD dwSequence;
1637 TCHAR szName[MAX_DB_STRING];
1638 TCHAR *pszText;
1639 TCHAR *pszFilter;
1640 } NXC_AGENT_CONFIG;
1641
1642
1643 //
1644 // DCI push data
1645 //
1646
1647 typedef struct
1648 {
1649 DWORD dwId; // DCI ID or 0 if name is used
1650 TCHAR *pszName;
1651 DWORD dwNodeId; // Node ID or 0 if name is used
1652 TCHAR *pszNodeName;
1653 TCHAR *pszValue;
1654 } NXC_DCI_PUSH_DATA;
1655
1656
1657 //
1658 // Address entry for address list
1659 //
1660
1661 typedef struct
1662 {
1663 DWORD dwAddr1;
1664 DWORD dwAddr2;
1665 DWORD dwType; // 0 = address/mask, 1 = address range
1666 } NXC_ADDR_ENTRY;
1667
1668
1669 //
1670 // Graph ACL element
1671 //
1672
1673 typedef struct
1674 {
1675 DWORD dwUserId;
1676 DWORD dwAccess;
1677 } NXC_GRAPH_ACL_ENTRY;
1678
1679
1680 //
1681 // Graph information
1682 //
1683
1684 typedef struct
1685 {
1686 DWORD dwId;
1687 TCHAR *pszName;
1688 TCHAR *pszConfig;
1689 DWORD dwOwner;
1690 DWORD dwAclSize;
1691 NXC_GRAPH_ACL_ENTRY *pACL;
1692 } NXC_GRAPH;
1693
1694
1695 //
1696 // System DCI information
1697 //
1698
1699 typedef struct
1700 {
1701 DWORD dwId;
1702 TCHAR szName[MAX_DB_STRING];
1703 int nStatus;
1704 } NXC_SYSTEM_DCI;
1705
1706
1707 //
1708 // Certificate information
1709 //
1710
1711 typedef struct
1712 {
1713 DWORD dwId;
1714 int nType;
1715 TCHAR *pszSubject;
1716 TCHAR *pszComments;
1717 } NXC_CERT_INFO;
1718
1719
1720 //
1721 // Certificate list
1722 //
1723
1724 typedef struct
1725 {
1726 DWORD dwNumElements;
1727 NXC_CERT_INFO *pElements;
1728 } NXC_CERT_LIST;
1729
1730
1731
1732 // All situation stuff will be available only in C++
1733 #ifdef __cplusplus
1734
1735 //
1736 // Situation instance
1737 //
1738
1739 typedef struct
1740 {
1741 TCHAR *m_name;
1742 StringMap *m_attrList;
1743 } NXC_SITUATION_INSTANCE;
1744
1745
1746 //
1747 // Situation
1748 //
1749
1750 typedef struct
1751 {
1752 DWORD m_id;
1753 TCHAR *m_name;
1754 TCHAR *m_comments;
1755 int m_instanceCount;
1756 NXC_SITUATION_INSTANCE *m_instanceList;
1757 } NXC_SITUATION;
1758
1759
1760 //
1761 // Situation list
1762 //
1763
1764 typedef struct
1765 {
1766 int m_count;
1767 NXC_SITUATION *m_situations;
1768 } NXC_SITUATION_LIST;
1769
1770 #endif /* __cplusplus */
1771
1772
1773 //
1774 // Functions
1775 //
1776
1777 #ifdef __cplusplus
1778 extern "C" {
1779 #endif
1780
1781 /** Library info/management **/
1782 DWORD LIBNXCL_EXPORTABLE NXCGetVersion(void);
1783 const TCHAR LIBNXCL_EXPORTABLE *NXCGetErrorText(DWORD dwError);
1784
1785 BOOL LIBNXCL_EXPORTABLE NXCInitialize(void);
1786 void LIBNXCL_EXPORTABLE NXCShutdown(void);
1787 void LIBNXCL_EXPORTABLE NXCSetDebugCallback(NXC_DEBUG_CALLBACK pFunc);
1788
1789 /** Low-level messaging **/
1790 DWORD LIBNXCL_EXPORTABLE NXCGenerateMessageId(NXC_SESSION hSession);
1791 BOOL LIBNXCL_EXPORTABLE NXCSendMessage(NXC_SESSION hSession, CSCPMessage *msg);
1792 CSCPMessage LIBNXCL_EXPORTABLE *NXCWaitForMessage(NXC_SESSION hSession, WORD wCode, DWORD dwRqId);
1793 DWORD LIBNXCL_EXPORTABLE NXCWaitForRCC(NXC_SESSION hSession, DWORD dwRqId);
1794
1795 /** Session management **/
1796 DWORD LIBNXCL_EXPORTABLE NXCConnect(DWORD dwFlags, const TCHAR *pszServer, const TCHAR *pszLogin,
1797 const TCHAR *pszPassword, DWORD dwCertLen,
1798 BOOL (* pfSign)(BYTE *, DWORD, BYTE *, DWORD *, void *),
1799 void *pSignArg, NXC_SESSION *phSession, const TCHAR *pszClientInfo,
1800 TCHAR **ppszUpgradeURL);
1801 void LIBNXCL_EXPORTABLE NXCDisconnect(NXC_SESSION hSession);
1802 void LIBNXCL_EXPORTABLE NXCStartWatchdog(NXC_SESSION hSession);
1803 void LIBNXCL_EXPORTABLE NXCSetEventHandler(NXC_SESSION hSession, NXC_EVENT_HANDLER pHandler);
1804 void LIBNXCL_EXPORTABLE NXCSetCommandTimeout(NXC_SESSION hSession, DWORD dwTimeout);
1805 void LIBNXCL_EXPORTABLE NXCGetServerID(NXC_SESSION hSession, BYTE *pbsId);
1806 BOOL LIBNXCL_EXPORTABLE NXCIsDBConnLost(NXC_SESSION hSession);
1807 DWORD LIBNXCL_EXPORTABLE NXCSubscribe(NXC_SESSION hSession, DWORD dwChannels);
1808 DWORD LIBNXCL_EXPORTABLE NXCUnsubscribe(NXC_SESSION hSession, DWORD dwChannels);
1809 void LIBNXCL_EXPORTABLE NXCGetLastLockOwner(NXC_SESSION hSession, TCHAR *pszBuffer,
1810 int nBufSize);
1811 const TCHAR LIBNXCL_EXPORTABLE *NXCGetServerTimeZone(NXC_SESSION hSession);
1812
1813 /** SMS **/
1814 DWORD LIBNXCL_EXPORTABLE NXCSendSMS(NXC_SESSION hSession, TCHAR *phone, TCHAR *message);
1815
1816 /** Get/set client data associated with session **/
1817 void LIBNXCL_EXPORTABLE *NXCGetClientData(NXC_SESSION hSession);
1818 void LIBNXCL_EXPORTABLE NXCSetClientData(NXC_SESSION hSession, void *pData);
1819
1820 /** Objects **/
1821 DWORD LIBNXCL_EXPORTABLE NXCSyncObjects(NXC_SESSION hSession);
1822 DWORD LIBNXCL_EXPORTABLE NXCSyncObjectsEx(NXC_SESSION hSession, const TCHAR *pszCacheFile,
1823 BOOL bSyncComments);
1824 NXC_OBJECT LIBNXCL_EXPORTABLE *NXCFindObjectById(NXC_SESSION hSession, DWORD dwId);
1825 NXC_OBJECT LIBNXCL_EXPORTABLE *NXCFindObjectByIdNoLock(NXC_SESSION hSession, DWORD dwId);
1826 NXC_OBJECT LIBNXCL_EXPORTABLE *NXCFindObjectByName(NXC_SESSION hSession, TCHAR *pszName, DWORD dwCurrObject);
1827 NXC_OBJECT LIBNXCL_EXPORTABLE *NXCFindObjectByIPAddress(NXC_SESSION hSession, DWORD dwIpAddr, DWORD dwCurrObject);
1828 void LIBNXCL_EXPORTABLE NXCEnumerateObjects(NXC_SESSION hSession, BOOL (* pHandler)(NXC_OBJECT *));
1829 NXC_OBJECT LIBNXCL_EXPORTABLE *NXCGetTopologyRootObject(NXC_SESSION hSession);
1830 NXC_OBJECT LIBNXCL_EXPORTABLE *NXCGetServiceRootObject(NXC_SESSION hSession);
1831 NXC_OBJECT LIBNXCL_EXPORTABLE *NXCGetTemplateRootObject(NXC_SESSION hSession);
1832 void LIBNXCL_EXPORTABLE *NXCGetObjectIndex(NXC_SESSION hSession, DWORD *pdwNumObjects);
1833 void LIBNXCL_EXPORTABLE NXCLockObjectIndex(NXC_SESSION hSession);
1834 void LIBNXCL_EXPORTABLE NXCUnlockObjectIndex(NXC_SESSION hSession);
1835 DWORD LIBNXCL_EXPORTABLE NXCModifyObject(NXC_SESSION hSession, NXC_OBJECT_UPDATE *pData);
1836 DWORD LIBNXCL_EXPORTABLE NXCSetObjectMgmtStatus(NXC_SESSION hSession, DWORD dwObjectId, BOOL bIsManaged);
1837 DWORD LIBNXCL_EXPORTABLE NXCChangeNodeIP(NXC_SESSION hSession, DWORD dwNodeId, DWORD dwIpAddr);
1838 DWORD LIBNXCL_EXPORTABLE NXCCreateObject(NXC_SESSION hSession, NXC_OBJECT_CREATE_INFO *pCreateInfo, DWORD *pdwObjectId);
1839 DWORD LIBNXCL_EXPORTABLE NXCBindObject(NXC_SESSION hSession, DWORD dwParentObject, DWORD dwChildObject);
1840 DWORD LIBNXCL_EXPORTABLE NXCUnbindObject(NXC_SESSION hSession, DWORD dwParentObject, DWORD dwChildObject);
1841 DWORD LIBNXCL_EXPORTABLE NXCRemoveTemplate(NXC_SESSION hSession, DWORD dwTemplateId,
1842 DWORD dwNodeId, BOOL bRemoveDCI);
1843 DWORD LIBNXCL_EXPORTABLE NXCDeleteObject(NXC_SESSION hSession, DWORD dwObject);
1844 DWORD LIBNXCL_EXPORTABLE NXCPollNode(NXC_SESSION hSession, DWORD dwObjectId, int iPollType,
1845 void (* pCallback)(TCHAR *, void *), void *pArg);
1846 DWORD LIBNXCL_EXPORTABLE NXCWakeUpNode(NXC_SESSION hSession, DWORD dwObjectId);
1847 DWORD LIBNXCL_EXPORTABLE NXCGetSupportedParameters(NXC_SESSION hSession, DWORD dwNodeId,
1848 DWORD *pdwNumParams,
1849 NXC_AGENT_PARAM **ppParamList);
1850 void LIBNXCL_EXPORTABLE NXCGetComparableObjectName(NXC_SESSION hSession, DWORD dwObjectId,
1851 TCHAR *pszName);
1852 void LIBNXCL_EXPORTABLE NXCGetComparableObjectNameEx(NXC_OBJECT *pObject, TCHAR *pszName);
1853 DWORD LIBNXCL_EXPORTABLE NXCSaveObjectCache(NXC_SESSION hSession, const TCHAR *pszFile);
1854 DWORD LIBNXCL_EXPORTABLE NXCGetAgentConfig(NXC_SESSION hSession, DWORD dwNodeId,
1855 TCHAR **ppszConfig);
1856 DWORD LIBNXCL_EXPORTABLE NXCUpdateAgentConfig(NXC_SESSION hSession, DWORD dwNodeId,
1857 TCHAR *pszConfig, BOOL bApply);
1858 DWORD LIBNXCL_EXPORTABLE NXCExecuteAction(NXC_SESSION hSession, DWORD dwObjectId,
1859 TCHAR *pszAction);
1860 DWORD LIBNXCL_EXPORTABLE NXCGetObjectComments(NXC_SESSION hSession,
1861 DWORD dwObjectId, TCHAR **ppszText);
1862 DWORD LIBNXCL_EXPORTABLE NXCUpdateObjectComments(NXC_SESSION hSession,
1863 DWORD dwObjectId, TCHAR *pszText);
1864 BOOL LIBNXCL_EXPORTABLE NXCIsParent(NXC_SESSION hSession, DWORD dwParent, DWORD dwChild);
1865 DWORD LIBNXCL_EXPORTABLE NXCGetDCIEventsList(NXC_SESSION hSession, DWORD dwObjectId,
1866 DWORD **ppdwList, DWORD *pdwListSize);
1867 DWORD LIBNXCL_EXPORTABLE NXCGetDCIInfo(NXC_SESSION hSession, DWORD dwNodeId,
1868 DWORD dwItemId, NXC_DCI *pInfo);
1869
1870 /** Container categories **/
1871 DWORD LIBNXCL_EXPORTABLE NXCLoadCCList(NXC_SESSION hSession, NXC_CC_LIST **ppList);
1872 void LIBNXCL_EXPORTABLE NXCDestroyCCList(NXC_CC_LIST *pList);
1873
1874 /** Events **/
1875 DWORD LIBNXCL_EXPORTABLE NXCSyncEvents(NXC_SESSION hSession, DWORD dwMaxRecords);
1876 DWORD LIBNXCL_EXPORTABLE NXCLoadEventDB(NXC_SESSION hSession);
1877 DWORD LIBNXCL_EXPORTABLE NXCSetEventInfo(NXC_SESSION hSession, NXC_EVENT_TEMPLATE *pArg);
1878 DWORD LIBNXCL_EXPORTABLE NXCGenerateEventCode(NXC_SESSION hSession, DWORD *pdwEventCode);
1879 void LIBNXCL_EXPORTABLE NXCAddEventTemplate(NXC_SESSION hSession, NXC_EVENT_TEMPLATE *pEventTemplate);
1880 void LIBNXCL_EXPORTABLE NXCDeleteEDBRecord(NXC_SESSION hSession, DWORD dwEventCode);
1881 DWORD LIBNXCL_EXPORTABLE NXCDeleteEventTemplate(NXC_SESSION hSession, DWORD dwEventCode);
1882 DWORD LIBNXCL_EXPORTABLE NXCLockEventDB(NXC_SESSION hSession);
1883 DWORD LIBNXCL_EXPORTABLE NXCUnlockEventDB(NXC_SESSION hSession);
1884 BOOL LIBNXCL_EXPORTABLE NXCGetEventDB(NXC_SESSION hSession, NXC_EVENT_TEMPLATE ***pppTemplateList, DWORD *pdwNumRecords);
1885 const TCHAR LIBNXCL_EXPORTABLE *NXCGetEventName(NXC_SESSION hSession, DWORD dwId);
1886 BOOL LIBNXCL_EXPORTABLE NXCGetEventNameEx(NXC_SESSION hSession, DWORD dwId, TCHAR *pszBuffer, DWORD dwBufSize);
1887 int LIBNXCL_EXPORTABLE NXCGetEventSeverity(NXC_SESSION hSession, DWORD dwId);
1888 BOOL LIBNXCL_EXPORTABLE NXCGetEventText(NXC_SESSION hSession, DWORD dwId, TCHAR *pszBuffer, DWORD dwBufSize);
1889 DWORD LIBNXCL_EXPORTABLE NXCSendEvent(NXC_SESSION hSession, DWORD dwEventCode, DWORD dwObjectId,
1890 int iNumArgs, TCHAR **pArgList, TCHAR *pszUserTag);
1891
1892 /** Syslog **/
1893 DWORD LIBNXCL_EXPORTABLE NXCSyncSyslog(NXC_SESSION hSession, DWORD dwMaxRecords);
1894
1895 /** User management **/
1896 DWORD LIBNXCL_EXPORTABLE NXCLoadUserDB(NXC_SESSION hSession);
1897 NXC_USER LIBNXCL_EXPORTABLE *NXCFindUserById(NXC_SESSION hSession, DWORD dwId);
1898 BOOL LIBNXCL_EXPORTABLE NXCGetUserDB(NXC_SESSION hSession, NXC_USER **ppUserList, DWORD *pdwNumUsers);
1899 DWORD LIBNXCL_EXPORTABLE NXCLockUserDB(NXC_SESSION hSession);
1900 DWORD LIBNXCL_EXPORTABLE NXCUnlockUserDB(NXC_SESSION hSession);
1901 DWORD LIBNXCL_EXPORTABLE NXCCreateUser(NXC_SESSION hSession, TCHAR *pszName, BOOL bIsGroup, DWORD *pdwNewId);
1902 DWORD LIBNXCL_EXPORTABLE NXCDeleteUser(NXC_SESSION hSession, DWORD dwId);
1903 DWORD LIBNXCL_EXPORTABLE NXCModifyUser(NXC_SESSION hSession, NXC_USER *pUserInfo);
1904 DWORD LIBNXCL_EXPORTABLE NXCSetPassword(NXC_SESSION hSession, DWORD dwUserId, TCHAR *pszNewPassword);
1905 BOOL LIBNXCL_EXPORTABLE NXCNeedPasswordChange(NXC_SESSION hSession);
1906 DWORD LIBNXCL_EXPORTABLE NXCGetUserVariable(NXC_SESSION hSession, DWORD dwUserId,
1907 TCHAR *pszVarName, TCHAR *pszValue, DWORD dwSize);
1908 DWORD LIBNXCL_EXPORTABLE NXCSetUserVariable(NXC_SESSION hSession, DWORD dwUserId,
1909 TCHAR *pszVarName, TCHAR *pszValue);
1910 DWORD LIBNXCL_EXPORTABLE NXCCopyUserVariable(NXC_SESSION hSession, DWORD dwSrcUserId,
1911 DWORD dwDstUserId, TCHAR *pszVarName,
1912 BOOL bMove);
1913 DWORD LIBNXCL_EXPORTABLE NXCEnumUserVariables(NXC_SESSION hSession, DWORD dwUserId,
1914 TCHAR *pszPattern, DWORD *pdwNumVars,
1915 TCHAR ***pppszVarList);
1916 DWORD LIBNXCL_EXPORTABLE NXCDeleteUserVariable(NXC_SESSION hSession, DWORD dwUserId,
1917 TCHAR *pszVarName);
1918 DWORD LIBNXCL_EXPORTABLE NXCGetSessionList(NXC_SESSION hSession, DWORD *pdwNumSessions,
1919 NXC_CLIENT_SESSION_INFO **ppList);
1920 DWORD LIBNXCL_EXPORTABLE NXCKillSession(NXC_SESSION hSession, DWORD dwSessionId);
1921 DWORD LIBNXCL_EXPORTABLE NXCGetCurrentUserId(NXC_SESSION hSession);
1922 DWORD LIBNXCL_EXPORTABLE NXCGetCurrentSystemAccess(NXC_SESSION hSession);
1923
1924 /** Data collection **/
1925 DWORD LIBNXCL_EXPORTABLE NXCOpenNodeDCIList(NXC_SESSION hSession, DWORD dwNodeId, NXC_DCI_LIST **ppItemList);
1926 DWORD LIBNXCL_EXPORTABLE NXCCloseNodeDCIList(NXC_SESSION hSession, NXC_DCI_LIST *pItemList);
1927 DWORD LIBNXCL_EXPORTABLE NXCCreateNewDCI(NXC_SESSION hSession, NXC_DCI_LIST *pItemList, DWORD *pdwItemId);
1928 DWORD LIBNXCL_EXPORTABLE NXCUpdateDCI(NXC_SESSION hSession, DWORD dwNodeId, NXC_DCI *pItem);
1929 DWORD LIBNXCL_EXPORTABLE NXCDeleteDCI(NXC_SESSION hSession, NXC_DCI_LIST *pItemList, DWORD dwItemId);
1930 DWORD LIBNXCL_EXPORTABLE NXCSetDCIStatus(NXC_SESSION hSession, DWORD dwNodeId, DWORD dwNumItems,
1931 DWORD *pdwItemList, int iStatus);
1932 DWORD LIBNXCL_EXPORTABLE NXCCopyDCI(NXC_SESSION hSession, DWORD dwSrcNodeId, DWORD dwDstNodeId,
1933 DWORD dwNumItems, DWORD *pdwItemList, BOOL bMove);
1934 DWORD LIBNXCL_EXPORTABLE NXCApplyTemplate(NXC_SESSION hSession, DWORD dwTemplateId, DWORD dwNodeId);
1935 DWORD LIBNXCL_EXPORTABLE NXCItemIndex(NXC_DCI_LIST *pItemList, DWORD dwItemId);
1936 DWORD LIBNXCL_EXPORTABLE NXCGetDCIData(NXC_SESSION hSession, DWORD dwNodeId, DWORD dwItemId, DWORD dwMaxRows,
1937 DWORD dwTimeFrom, DWORD dwTimeTo, NXC_DCI_DATA **ppData);
1938 void LIBNXCL_EXPORTABLE NXCDestroyDCIData(NXC_DCI_DATA *pData);
1939 NXC_DCI_ROW LIBNXCL_EXPORTABLE *NXCGetRowPtr(NXC_DCI_DATA *pData, DWORD dwRow);
1940 DWORD LIBNXCL_EXPORTABLE NXCGetLastValues(NXC_SESSION hSession, DWORD dwNodeId,
1941 DWORD *pdwNumItems, NXC_DCI_VALUE **ppValueList);
1942 DWORD LIBNXCL_EXPORTABLE NXCClearDCIData(NXC_SESSION hSession, DWORD dwNodeId, DWORD dwItemId);
1943 DWORD LIBNXCL_EXPORTABLE NXCAddThresholdToItem(NXC_DCI *pItem, NXC_DCI_THRESHOLD *pThreshold);
1944 BOOL LIBNXCL_EXPORTABLE NXCDeleteThresholdFromItem(NXC_DCI *pItem, DWORD dwIndex);
1945 BOOL LIBNXCL_EXPORTABLE NXCSwapThresholds(NXC_DCI *pItem, DWORD dwIndex1, DWORD dwIndex2);
1946 DWORD LIBNXCL_EXPORTABLE NXCQueryParameter(NXC_SESSION hSession, DWORD dwNodeId, int iOrigin, TCHAR *pszParameter,
1947 TCHAR *pszBuffer, DWORD dwBufferSize);
1948 DWORD LIBNXCL_EXPORTABLE NXCResolveDCINames(NXC_SESSION hSession, DWORD dwNumDCI,
1949 INPUT_DCI *pDCIList, TCHAR ***pppszNames);
1950 DWORD LIBNXCL_EXPORTABLE NXCGetSystemDCIList(NXC_SESSION hSession, DWORD dwNodeId,
1951 DWORD *pdwNumItems, NXC_SYSTEM_DCI **ppList);
1952 DWORD LIBNXCL_EXPORTABLE NXCPushDCIData(NXC_SESSION hSession, DWORD dwNumItems,
1953 NXC_DCI_PUSH_DATA *pItems, DWORD *pdwIndex);
1954 DWORD LIBNXCL_EXPORTABLE NXCTestDCITransformation(NXC_SESSION hSession, DWORD dwNodeId, DWORD dwItemId,
1955 const TCHAR *script, const TCHAR *value, BOOL *execStatus,
1956 TCHAR *execResult, size_t resultBufSize);
1957
1958 /** MIB files **/
1959 DWORD LIBNXCL_EXPORTABLE NXCGetMIBFileTimeStamp(NXC_SESSION hSession, DWORD *pdwTimeStamp);
1960 DWORD LIBNXCL_EXPORTABLE NXCDownloadMIBFile(NXC_SESSION hSession, const TCHAR *pszName);
1961
1962 /** Event processing policy **/
1963 NXC_EPP LIBNXCL_EXPORTABLE *NXCCreateEmptyEventPolicy();
1964 DWORD LIBNXCL_EXPORTABLE NXCOpenEventPolicy(NXC_SESSION hSession, NXC_EPP **ppEventPolicy);
1965 DWORD LIBNXCL_EXPORTABLE NXCCloseEventPolicy(NXC_SESSION hSession);
1966 DWORD LIBNXCL_EXPORTABLE NXCSaveEventPolicy(NXC_SESSION hSession, NXC_EPP *pEventPolicy);
1967 void LIBNXCL_EXPORTABLE NXCDestroyEventPolicy(NXC_EPP *pEventPolicy);
1968 void LIBNXCL_EXPORTABLE NXCAddPolicyRule(NXC_EPP *policy, NXC_EPP_RULE *rule, BOOL dynAllocated);
1969 void LIBNXCL_EXPORTABLE NXCDeletePolicyRule(NXC_EPP *pEventPolicy, DWORD dwRule);
1970 NXC_EPP_RULE LIBNXCL_EXPORTABLE *NXCCopyEventPolicyRule(NXC_EPP_RULE *src);
1971 void LIBNXCL_EXPORTABLE NXCCopyEventPolicyRuleToBuffer(NXC_EPP_RULE *dst, NXC_EPP_RULE *src);
1972
1973 /** Images **/
1974 DWORD LIBNXCL_EXPORTABLE NXCSyncImages(NXC_SESSION hSession, NXC_IMAGE_LIST **ppImageList, TCHAR *pszCacheDir, WORD wFormat);
1975 DWORD LIBNXCL_EXPORTABLE NXCLoadImageFile(NXC_SESSION hSession, DWORD dwImageId, TCHAR *pszCacheDir, WORD wFormat);
1976 void LIBNXCL_EXPORTABLE NXCDestroyImageList(NXC_IMAGE_LIST *pImageList);
1977 DWORD LIBNXCL_EXPORTABLE NXCLoadDefaultImageList(NXC_SESSION hSession, DWORD *pdwListSize,
1978 DWORD **ppdwClassId, DWORD **ppdwImageId);
1979
1980 /** Alarms **/
1981 DWORD LIBNXCL_EXPORTABLE NXCLoadAllAlarms(NXC_SESSION hSession, BOOL bIncludeAck, DWORD *pdwNumAlarms, NXC_ALARM **ppAlarmList);
1982 DWORD LIBNXCL_EXPORTABLE NXCAcknowledgeAlarm(NXC_SESSION hSession, DWORD dwAlarmId);
1983 DWORD LIBNXCL_EXPORTABLE NXCTerminateAlarm(NXC_SESSION hSession, DWORD dwAlarmId);
1984 DWORD LIBNXCL_EXPORTABLE NXCDeleteAlarm(NXC_SESSION hSession, DWORD dwAlarmId);
1985 DWORD LIBNXCL_EXPORTABLE NXCOpenAlarm(NXC_SESSION hSession, DWORD dwAlarmId, TCHAR *pszHelpdeskRef);
1986 DWORD LIBNXCL_EXPORTABLE NXCCloseAlarm(NXC_SESSION hSession, DWORD dwAlarmId);
1987 TCHAR LIBNXCL_EXPORTABLE *NXCFormatAlarmText(NXC_SESSION session, NXC_ALARM *alarm, TCHAR *format);
1988
1989 /** Actions **/
1990 DWORD LIBNXCL_EXPORTABLE NXCLoadActions(NXC_SESSION hSession, DWORD *pdwNumActions, NXC_ACTION **ppActionList);
1991 DWORD LIBNXCL_EXPORTABLE NXCLockActionDB(NXC_SESSION hSession);
1992 DWORD LIBNXCL_EXPORTABLE NXCUnlockActionDB(NXC_SESSION hSession);
1993 DWORD LIBNXCL_EXPORTABLE NXCCreateAction(NXC_SESSION hSession, TCHAR *pszName, DWORD *pdwNewId);
1994 DWORD LIBNXCL_EXPORTABLE NXCModifyAction(NXC_SESSION hSession, NXC_ACTION *pAction);
1995 DWORD LIBNXCL_EXPORTABLE NXCDeleteAction(NXC_SESSION hSession, DWORD dwActionId);
1996
1997 /** SNMP trap configuration **/
1998 DWORD LIBNXCL_EXPORTABLE NXCLockTrapCfg(NXC_SESSION hSession);
1999 DWORD LIBNXCL_EXPORTABLE NXCUnlockTrapCfg(NXC_SESSION hSession);
2000 DWORD LIBNXCL_EXPORTABLE NXCLoadTrapCfg(NXC_SESSION hSession, DWORD *pdwNumTraps, NXC_TRAP_CFG_ENTRY **ppTrapList);
2001 void LIBNXCL_EXPORTABLE NXCDestroyTrapList(DWORD dwNumTraps, NXC_TRAP_CFG_ENTRY *pTrapList);
2002 DWORD LIBNXCL_EXPORTABLE NXCCreateTrap(NXC_SESSION hSession, DWORD *pdwTrapId);
2003 DWORD LIBNXCL_EXPORTABLE NXCModifyTrap(NXC_SESSION hSession, NXC_TRAP_CFG_ENTRY *pTrap);
2004 DWORD LIBNXCL_EXPORTABLE NXCDeleteTrap(NXC_SESSION hSession, DWORD dwTrapId);
2005 DWORD LIBNXCL_EXPORTABLE NXCSyncSNMPTrapLog(NXC_SESSION hSession, DWORD dwMaxRecords);
2006 DWORD LIBNXCL_EXPORTABLE NXCGetTrapCfgRO(NXC_SESSION hSession, DWORD *pdwNumTraps,
2007 NXC_TRAP_CFG_ENTRY **ppTrapList);
2008
2009 /** Packages **/
2010 DWORD LIBNXCL_EXPORTABLE NXCLockPackageDB(NXC_SESSION hSession);
2011 DWORD LIBNXCL_EXPORTABLE NXCUnlockPackageDB(NXC_SESSION hSession);
2012 DWORD LIBNXCL_EXPORTABLE NXCGetPackageList(NXC_SESSION hSession, DWORD *pdwNumPackages,
2013 NXC_PACKAGE_INFO **ppList);
2014 DWORD LIBNXCL_EXPORTABLE NXCInstallPackage(NXC_SESSION hSession, NXC_PACKAGE_INFO *pInfo,
2015 TCHAR *pszFullPkgPath);
2016 DWORD LIBNXCL_EXPORTABLE NXCRemovePackage(NXC_SESSION hSession, DWORD dwPkgId);
2017 DWORD LIBNXCL_EXPORTABLE NXCParseNPIFile(TCHAR *pszInfoFile, NXC_PACKAGE_INFO *pInfo);
2018 DWORD LIBNXCL_EXPORTABLE NXCDeployPackage(NXC_SESSION hSession, DWORD dwPkgId,
2019 DWORD dwNumObjects, DWORD *pdwObjectList,
2020 DWORD *pdwRqId);
2021
2022 /** Server management **/
2023 DWORD LIBNXCL_EXPORTABLE NXCResetServerComponent(NXC_SESSION hSession, DWORD dwComponent);
2024 DWORD LIBNXCL_EXPORTABLE NXCGetServerStats(NXC_SESSION hSession, NXC_SERVER_STATS *pStats);
2025 DWORD LIBNXCL_EXPORTABLE NXCGetServerVariables(NXC_SESSION hSession,
2026 NXC_SERVER_VARIABLE **ppVarList,
2027 DWORD *pdwNumVars);
2028 DWORD LIBNXCL_EXPORTABLE NXCSetServerVariable(NXC_SESSION hSession, TCHAR *pszVarName,
2029 TCHAR *pszValue);
2030 DWORD LIBNXCL_EXPORTABLE NXCDeleteServerVariable(NXC_SESSION hSession, TCHAR *pszVarName);
2031 DWORD LIBNXCL_EXPORTABLE NXCGetServerConfigCLOB(NXC_SESSION hSession, const TCHAR *name, TCHAR **value);
2032 DWORD LIBNXCL_EXPORTABLE NXCSetServerConfigCLOB(NXC_SESSION hSession, const TCHAR *name, const TCHAR *value);
2033
2034 /** Object tools **/
2035 DWORD LIBNXCL_EXPORTABLE NXCGetObjectTools(NXC_SESSION hSession, DWORD *pdwNumTools,
2036 NXC_OBJECT_TOOL **ppToolList);
2037 void LIBNXCL_EXPORTABLE NXCDestroyObjectToolList(DWORD dwNumTools, NXC_OBJECT_TOOL *pList);
2038 DWORD LIBNXCL_EXPORTABLE NXCExecuteTableTool(NXC_SESSION hSession, DWORD dwNodeId,
2039 DWORD dwToolId, NXC_TABLE_DATA **ppData);
2040 void LIBNXCL_EXPORTABLE NXCDestroyTableData(NXC_TABLE_DATA *pData);
2041 DWORD LIBNXCL_EXPORTABLE NXCLockObjectTools(NXC_SESSION hSession);
2042 DWORD LIBNXCL_EXPORTABLE NXCUnlockObjectTools(NXC_SESSION hSession);
2043 DWORD LIBNXCL_EXPORTABLE NXCGetObjectToolDetails(NXC_SESSION hSession, DWORD dwToolId,
2044 NXC_OBJECT_TOOL_DETAILS **ppData);
2045 void LIBNXCL_EXPORTABLE NXCDestroyObjectToolDetails(NXC_OBJECT_TOOL_DETAILS *pData);
2046 DWORD LIBNXCL_EXPORTABLE NXCDeleteObjectTool(NXC_SESSION hSession, DWORD dwToolId);
2047 DWORD LIBNXCL_EXPORTABLE NXCGenerateObjectToolId(NXC_SESSION hSession, DWORD *pdwToolId);
2048 DWORD LIBNXCL_EXPORTABLE NXCUpdateObjectTool(NXC_SESSION hSession,
2049 NXC_OBJECT_TOOL_DETAILS *pData);
2050 BOOL LIBNXCL_EXPORTABLE NXCIsAppropriateTool(NXC_OBJECT_TOOL *pTool, NXC_OBJECT *pObject);
2051
2052 /** Script library **/
2053 DWORD LIBNXCL_EXPORTABLE NXCGetScriptList(NXC_SESSION hSession, DWORD *pdwNumScrpts,
2054 NXC_SCRIPT_INFO **ppList);
2055 DWORD LIBNXCL_EXPORTABLE NXCGetScript(NXC_SESSION hSession, DWORD dwId, TCHAR **ppszCode);
2056 DWORD LIBNXCL_EXPORTABLE NXCUpdateScript(NXC_SESSION hSession, DWORD *pdwId,
2057 TCHAR *pszName, TCHAR *pszCode);
2058 DWORD LIBNXCL_EXPORTABLE NXCRenameScript(NXC_SESSION hSession, DWORD dwId,
2059 TCHAR *pszName);
2060 DWORD LIBNXCL_EXPORTABLE NXCDeleteScript(NXC_SESSION hSession, DWORD dwId);
2061
2062 /** SNMP **/
2063 DWORD LIBNXCL_EXPORTABLE NXCSnmpWalk(NXC_SESSION hSession, DWORD dwNode,
2064 TCHAR *pszRootOID, void *pUserData,
2065 void (* pfCallback)(TCHAR *, DWORD, TCHAR *, void *));
2066 DWORD LIBNXCL_EXPORTABLE NXCGetSnmpCommunityList(NXC_SESSION hSession, DWORD *pdwNumStrings,
2067 TCHAR ***pppszStringList);
2068 DWORD LIBNXCL_EXPORTABLE NXCUpdateSnmpCommunityList(NXC_SESSION hSession, DWORD dwNumStrings,
2069 TCHAR **ppszStringList);
2070
2071 /** Maps **/
2072 DWORD LIBNXCL_EXPORTABLE NXCGetMapList(NXC_SESSION hSession, DWORD *pdwNumMaps,
2073 NXC_MAP_INFO **ppMapList);
2074 DWORD LIBNXCL_EXPORTABLE NXCSaveMap(NXC_SESSION hSession, void *pMap);
2075 DWORD LIBNXCL_EXPORTABLE NXCLoadMap(NXC_SESSION hSession, DWORD dwMapId, void **ppMap);
2076 DWORD LIBNXCL_EXPORTABLE NXCResolveMapName(NXC_SESSION hSession, TCHAR *pszMapName,
2077 DWORD *pdwMapId);
2078 DWORD LIBNXCL_EXPORTABLE NXCUploadSubmapBkImage(NXC_SESSION hSession, DWORD dwMapId,
2079 DWORD dwSubmapId, TCHAR *pszFile);
2080 DWORD LIBNXCL_EXPORTABLE NXCDownloadSubmapBkImage(NXC_SESSION hSession, DWORD dwMapId,
2081 DWORD dwSubmapId, TCHAR *pszFile);
2082 DWORD LIBNXCL_EXPORTABLE NXCCreateMap(NXC_SESSION hSession, DWORD dwRootObj,
2083 TCHAR *pszName, DWORD *pdwMapId);
2084 DWORD LIBNXCL_EXPORTABLE NXCDeleteMap(NXC_SESSION hSession, DWORD dwMapId);
2085 DWORD LIBNXCL_EXPORTABLE NXCRenameMap(NXC_SESSION hSession, DWORD dwMapId, const TCHAR *pszName);
2086
2087 /** Address lists **/
2088 DWORD LIBNXCL_EXPORTABLE NXCGetAddrList(NXC_SESSION hSession, DWORD dwListType,
2089 DWORD *pdwAddrCount, NXC_ADDR_ENTRY **ppAddrList);
2090 DWORD LIBNXCL_EXPORTABLE NXCSetAddrList(NXC_SESSION hSession, DWORD dwListType,
2091 DWORD dwAddrCount, NXC_ADDR_ENTRY *pAddrList);
2092
2093 /** Agent configurations **/
2094 DWORD LIBNXCL_EXPORTABLE NXCGetAgentConfigList(NXC_SESSION hSession, DWORD *pdwNumRecs,
2095 NXC_AGENT_CONFIG_INFO **ppList);
2096 DWORD LIBNXCL_EXPORTABLE NXCOpenAgentConfig(NXC_SESSION hSession, DWORD dwCfgId,
2097 NXC_AGENT_CONFIG *pConfig);
2098 DWORD LIBNXCL_EXPORTABLE NXCSaveAgentConfig(NXC_SESSION hSession, NXC_AGENT_CONFIG *pConfig);
2099 DWORD LIBNXCL_EXPORTABLE NXCDeleteAgentConfig(NXC_SESSION hSession, DWORD dwCfgId);
2100 DWORD LIBNXCL_EXPORTABLE NXCSwapAgentConfigs(NXC_SESSION hSession, DWORD dwCfgId1, DWORD dwCfgId2);
2101
2102 /** MAnagement packs **/
2103 DWORD LIBNXCL_EXPORTABLE NXCCreateMPFile(NXC_SESSION hSession, TCHAR *pszDescr,
2104 DWORD dwNumEvents, DWORD *pdwEventList,
2105 DWORD dwNumTemplates, DWORD *pdwTemplateList,
2106 DWORD dwNumTraps, DWORD *pdwTrapList,
2107 TCHAR **ppszContent);
2108 DWORD LIBNXCL_EXPORTABLE NXCInstallMP(NXC_SESSION hSession, TCHAR *pszContent,
2109 DWORD dwFlags, TCHAR *pszErrorText, int nErrorLen);
2110
2111 /** Predefined graphs **/
2112 DWORD LIBNXCL_EXPORTABLE NXCGetGraphList(NXC_SESSION hSession, DWORD *pdwNumGraphs, NXC_GRAPH **ppGraphList);
2113 void LIBNXCL_EXPORTABLE NXCDestroyGraphList(DWORD dwNumGraphs, NXC_GRAPH *pList);
2114 DWORD LIBNXCL_EXPORTABLE NXCDefineGraph(NXC_SESSION hSession, NXC_GRAPH *pGraph);
2115 DWORD LIBNXCL_EXPORTABLE NXCDeleteGraph(NXC_SESSION hSession, DWORD dwGraphId);
2116
2117 /** Certificates **/
2118 DWORD LIBNXCL_EXPORTABLE NXCAddCACertificate(NXC_SESSION hSession, DWORD dwCertLen,
2119 BYTE *pCert, TCHAR *pszComments);
2120 DWORD LIBNXCL_EXPORTABLE NXCUpdateCertificateComments(NXC_SESSION hSession, DWORD dwCertId,
2121 TCHAR *pszComments);
2122 DWORD LIBNXCL_EXPORTABLE NXCDeleteCertificate(NXC_SESSION hSession, DWORD dwCertId);
2123 DWORD LIBNXCL_EXPORTABLE NXCGetCertificateList(NXC_SESSION hSession, NXC_CERT_LIST **ppList);
2124 void LIBNXCL_EXPORTABLE NXCDestroyCertificateList(NXC_CERT_LIST *pList);
2125
2126 /** Layer 2 topology **/
2127 DWORD LIBNXCL_EXPORTABLE NXCQueryL2Topology(NXC_SESSION hSession, DWORD dwNodeId, void **ppTopology);
2128
2129 /** Situations **/
2130 DWORD LIBNXCL_EXPORTABLE NXCCreateSituation(NXC_SESSION hSession, const TCHAR *name, const TCHAR *comments, DWORD *pdwId);
2131 DWORD LIBNXCL_EXPORTABLE NXCModifySituation(NXC_SESSION hSession, DWORD id,
2132 const TCHAR *name, const TCHAR *comments);
2133 DWORD LIBNXCL_EXPORTABLE NXCDeleteSituation(NXC_SESSION hSession, DWORD id);
2134 DWORD LIBNXCL_EXPORTABLE NXCDeleteSituationInstance(NXC_SESSION hSession, DWORD id, const TCHAR *instance);
2135
2136 #ifdef __cplusplus
2137 DWORD LIBNXCL_EXPORTABLE NXCGetSituationList(NXC_SESSION hSession, NXC_SITUATION_LIST **list);
2138 void LIBNXCL_EXPORTABLE NXCDestroySituationList(NXC_SITUATION_LIST *list);
2139 void LIBNXCL_EXPORTABLE NXCUpdateSituationList(NXC_SITUATION_LIST *list, int code, NXC_SITUATION *update);
2140 #endif
2141
2142 #ifdef __cplusplus
2143 }
2144 #endif
2145
2146 #endif /* LIBNXCL_NO_DECLARATIONS */
2147
2148 #endif /* _nxclapi_h_ */