bind9 subagent added to Windows installer
[public/netxms.git] / include / nxcldefs.h
CommitLineData
bf6fb6c3
VK
1/*
2** NetXMS - Network Management System
3** Common defines for client library and server
4** Copyright (C) 2003-2014 Victor Kirhenshtein
5**
6** This program is free software; you can redistribute it and/or modify
7** it under the terms of the GNU Lesser General Public License as published by
8** the Free Software Foundation; either version 3 of the License, or
9** (at your option) any later version.
10**
11** This program is distributed in the hope that it will be useful,
12** but WITHOUT ANY WARRANTY; without even the implied warranty of
13** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14** GNU General Public License for more details.
15**
16** You should have received a copy of the GNU Lesser General Public License
17** along with this program; if not, write to the Free Software
18** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19**
20** File: nxcldefs.h
21**
22**/
23
24#ifndef _nxcldefs_h_
25#define _nxcldefs_h_
26
27#include <nxlog.h>
28
29/**
30 * Some constants
31 */
32#define MAX_COMMUNITY_LENGTH 128
33#define MAX_OID_LENGTH 1024
34#define MAX_EVENT_MSG_LENGTH 2000
35#define MAX_EVENT_NAME 64
36#define MAX_USERTAG_LENGTH 64
37#define MAX_SESSION_NAME 256
38#define MAX_USER_NAME 64
39#define MAX_USER_FULLNAME 128
40#define MAX_USER_DESCR 256
41#define MAX_ITEM_NAME 1024
42#define MAX_STRING_VALUE 256
43#define MAX_VARIABLE_NAME 256
44#define MAX_AGENT_VERSION_LEN 64
45#define MAX_PLATFORM_NAME_LEN 64
46#define MAX_PACKAGE_NAME_LEN 64
e980db40 47#define MAX_NODE_SUBTYPE_LENGTH 128
bf6fb6c3
VK
48#define GROUP_EVERYONE ((UINT32)0x80000000)
49#define INVALID_UID ((UINT32)0xFFFFFFFF)
50#define OBJECT_STATUS_COUNT 9
51#define MAX_RCPT_ADDR_LEN 256
52#define MAX_EMAIL_SUBJECT_LEN 256
53#define MAC_ADDR_LENGTH 6
54#define CURRENT_USER ((UINT32)0xFFFFFFFF)
55#define MAX_DCI_DATA_RECORDS 200000
56#define MAX_POLICY_CONFIG_NAME 64
57
58/**
59 * NetXMS agent authentication methods
60 */
61#define AUTH_NONE 0
62#define AUTH_PLAINTEXT 1
63#define AUTH_MD5_HASH 2
64#define AUTH_SHA1_HASH 3
65
66/**
67 * Client-server authentication types
68 */
69#define NETXMS_AUTH_TYPE_PASSWORD 0
70#define NETXMS_AUTH_TYPE_CERTIFICATE 1
71#define NETXMS_AUTH_TYPE_SSO_TICKET 2
72
73/**
74 * Client type
75 */
76#define CLIENT_TYPE_DESKTOP 0
77#define CLIENT_TYPE_WEB 1
78#define CLIENT_TYPE_MOBILE 2
79#define CLIENT_TYPE_TABLET 3
80#define CLIENT_TYPE_APPLICATION 4
81
82/**
83 * Forced poll types
84 */
f7e3eb5a
VK
85#define POLL_STATUS 1
86#define POLL_CONFIGURATION_FULL 2
87#define POLL_INTERFACE_NAMES 3
88#define POLL_TOPOLOGY 4
89#define POLL_CONFIGURATION_NORMAL 5
90#define POLL_INSTANCE_DISCOVERY 6
bf6fb6c3
VK
91
92/**
93 * Object types
94 */
3df8bccd
Z
95#define OBJECT_GENERIC 0
96#define OBJECT_SUBNET 1
97#define OBJECT_NODE 2
98#define OBJECT_INTERFACE 3
99#define OBJECT_NETWORK 4
100#define OBJECT_CONTAINER 5
101#define OBJECT_ZONE 6
102#define OBJECT_SERVICEROOT 7
103#define OBJECT_TEMPLATE 8
104#define OBJECT_TEMPLATEGROUP 9
105#define OBJECT_TEMPLATEROOT 10
106#define OBJECT_NETWORKSERVICE 11
107#define OBJECT_VPNCONNECTOR 12
108#define OBJECT_CONDITION 13
109#define OBJECT_CLUSTER 14
110#define OBJECT_POLICYGROUP 15
111#define OBJECT_POLICYROOT 16
112#define OBJECT_AGENTPOLICY 17
113#define OBJECT_AGENTPOLICY_CONFIG 18
114#define OBJECT_NETWORKMAPROOT 19
115#define OBJECT_NETWORKMAPGROUP 20
116#define OBJECT_NETWORKMAP 21
117#define OBJECT_DASHBOARDROOT 22
118#define OBJECT_DASHBOARD 23
119#define OBJECT_BUSINESSSERVICEROOT 27
120#define OBJECT_BUSINESSSERVICE 28
121#define OBJECT_NODELINK 29
122#define OBJECT_SLMCHECK 30
123#define OBJECT_MOBILEDEVICE 31
124#define OBJECT_RACK 32
125#define OBJECT_ACCESSPOINT 33
126#define OBJECT_AGENTPOLICY_LOGPARSER 34
e4926628 127#define OBJECT_CHASSIS 35
bf6fb6c3
VK
128
129/** Base value for custom object classes */
e4926628 130#define OBJECT_CUSTOM 10000
bf6fb6c3
VK
131
132/**
133 * Object's status
134 */
135#define STATUS_NORMAL 0
136#define STATUS_WARNING 1
137#define STATUS_MINOR 2
138#define STATUS_MAJOR 3
139#define STATUS_CRITICAL 4
140#define STATUS_UNKNOWN 5
141#define STATUS_UNMANAGED 6
142#define STATUS_DISABLED 7
143#define STATUS_TESTING 8
144
145/**
146 * Event and alarm severity
147 */
148#define SEVERITY_NORMAL 0
149#define SEVERITY_WARNING 1
150#define SEVERITY_MINOR 2
151#define SEVERITY_MAJOR 3
152#define SEVERITY_CRITICAL 4
153#define SEVERITY_FROM_EVENT 5
154#define SEVERITY_TERMINATE 6
155#define SEVERITY_RESOLVE 7
156
157/**
158 * Alarm states
159 */
160#define ALARM_STATE_OUTSTANDING 0x00
161#define ALARM_STATE_ACKNOWLEDGED 0x01
162#define ALARM_STATE_RESOLVED 0x02
163#define ALARM_STATE_TERMINATED 0x03
164#define ALARM_STATE_MASK 0x0F /* mask for selecting alarm state */
165#define ALARM_STATE_STICKY 0x10 /* bit flag indicating sticky state */
166
167/**
168 * Alarm state in help desk system
169 */
170#define ALARM_HELPDESK_IGNORED 0
171#define ALARM_HELPDESK_OPEN 1
172#define ALARM_HELPDESK_CLOSED 2
173
174/**
175 * Node flags
176 */
177#define NF_SYSTEM_FLAGS 0x003FFF7F
178#define NF_USER_FLAGS 0xFFC00080
179
180#define NF_IS_SNMP 0x00000001
181#define NF_IS_NATIVE_AGENT 0x00000002
182#define NF_IS_BRIDGE 0x00000004
183#define NF_IS_ROUTER 0x00000008
184#define NF_IS_LOCAL_MGMT 0x00000010
185#define NF_IS_PRINTER 0x00000020
186#define NF_IS_OSPF 0x00000040
187#define NF_REMOTE_AGENT 0x00000080
188#define NF_IS_CPSNMP 0x00000100 /* CheckPoint SNMP agent on port 260 */
189#define NF_IS_CDP 0x00000200
190#define NF_IS_NDP 0x00000400 /* Supports Nortel (Synoptics/Bay Networks) topology discovery */
191#define NF_IS_SONMP 0x00000400 /* SONMP is an old name for NDP */
192#define NF_IS_LLDP 0x00000800 /* Supports Link Layer Discovery Protocol */
193#define NF_IS_VRRP 0x00001000 /* VRRP support */
194#define NF_HAS_VLANS 0x00002000 /* VLAN information available */
195#define NF_IS_8021X 0x00004000 /* 802.1x support enabled on node */
196#define NF_IS_STP 0x00008000 /* Spanning Tree (IEEE 802.1d) enabled on node */
197#define NF_HAS_ENTITY_MIB 0x00010000 /* Supports ENTITY-MIB */
198#define NF_HAS_IFXTABLE 0x00020000 /* Supports ifXTable */
199#define NF_HAS_AGENT_IFXCOUNTERS 0x00040000 /* Agent supports 64-bit interface counters */
200#define NF_HAS_WINPDH 0x00080000 /* Node supports Windows PDH parameters */
201#define NF_IS_WIFI_CONTROLLER 0x00100000 /* Node is wireless network controller */
202#define NF_IS_SMCLP 0x00200000 /* Node supports SMCLP protocol */
203#define NF_DISABLE_DISCOVERY_POLL 0x00400000
204#define NF_DISABLE_TOPOLOGY_POLL 0x00800000
205#define NF_DISABLE_SNMP 0x01000000
206#define NF_DISABLE_NXCP 0x02000000
207#define NF_DISABLE_ICMP 0x04000000
208#define NF_FORCE_ENCRYPTION 0x08000000
209#define NF_DISABLE_STATUS_POLL 0x10000000
210#define NF_DISABLE_CONF_POLL 0x20000000
211#define NF_DISABLE_ROUTE_POLL 0x40000000
212#define NF_DISABLE_DATA_COLLECT 0x80000000
213
214/**
215 * Template flags
216 */
217#define TF_AUTO_APPLY 0x00000001
218#define TF_AUTO_REMOVE 0x00000002
219
220/**
221 * Container flags
222 */
223#define CF_AUTO_BIND 0x00000001
224#define CF_AUTO_UNBIND 0x00000002
225
32a400d9
VK
226/**
227 * Chassis flags
228 */
229#define CHF_BIND_UNDER_CONTROLLER 0x00000001
230
bf6fb6c3
VK
231/**
232 * Interface flags
233 */
234#define IF_SYNTHETIC_MASK 0x00000001
235#define IF_PHYSICAL_PORT 0x00000002
236#define IF_EXCLUDE_FROM_TOPOLOGY 0x00000004
237#define IF_LOOPBACK 0x00000008
238#define IF_CREATED_MANUALLY 0x00000010
239#define IF_PEER_REFLECTION 0x00000020 /* topology information obtained by reflection */
240#define IF_EXPECTED_STATE_MASK 0x30000000 /* 2-bit field holding expected interface state */
241#define IF_USER_FLAGS_MASK (IF_EXCLUDE_FROM_TOPOLOGY) /* flags that can be changed by user */
242
243/**
244 * Expected interface states
245 */
246#define IF_EXPECTED_STATE_UP 0
247#define IF_EXPECTED_STATE_DOWN 1
248#define IF_EXPECTED_STATE_IGNORE 2
c908b63b
VK
249#define IF_EXPECTED_STATE_AUTO 3
250
251/**
252 * Default expected state for new interface creation
253 */
254#define IF_DEFAULT_EXPECTED_STATE_UP 0
255#define IF_DEFAULT_EXPECTED_STATE_AUTO 1
256#define IF_DEFAULT_EXPECTED_STATE_IGNORE 2
bf6fb6c3
VK
257
258/**
259 * Interface administrative states
260 */
42c6d15b
VK
261enum InterfaceAdminState
262{
263 IF_ADMIN_STATE_UNKNOWN = 0,
264 IF_ADMIN_STATE_UP = 1,
265 IF_ADMIN_STATE_DOWN = 2,
266 IF_ADMIN_STATE_TESTING = 3
267};
bf6fb6c3
VK
268
269/**
270 * Interface operational states
271 */
42c6d15b
VK
272enum InterfaceOperState
273{
274 IF_OPER_STATE_UNKNOWN = 0,
275 IF_OPER_STATE_UP = 1,
276 IF_OPER_STATE_DOWN = 2,
277 IF_OPER_STATE_TESTING = 3
278};
bf6fb6c3
VK
279
280/**
281 * Node ifXTable usage mode
282 */
283#define IFXTABLE_DEFAULT 0
284#define IFXTABLE_ENABLED 1
285#define IFXTABLE_DISABLED 2
286
287/**
288 * Status calculation and propagation algorithms
289 */
290#define SA_CALCULATE_DEFAULT 0
291#define SA_CALCULATE_MOST_CRITICAL 1
292#define SA_CALCULATE_SINGLE_THRESHOLD 2
293#define SA_CALCULATE_MULTIPLE_THRESHOLDS 3
294
295#define SA_PROPAGATE_DEFAULT 0
296#define SA_PROPAGATE_UNCHANGED 1
297#define SA_PROPAGATE_FIXED 2
298#define SA_PROPAGATE_RELATIVE 3
299#define SA_PROPAGATE_TRANSLATED 4
300
301/**
302 * Network map types
303 */
304#define MAP_TYPE_CUSTOM 0
305#define MAP_TYPE_LAYER2_TOPOLOGY 1
306#define MAP_TYPE_IP_TOPOLOGY 2
307
308/**
309 * Components that can be locked by management pack installer
310 */
311#define NXMP_LC_EVENTDB 0
312#define NXMP_LC_EPP 1
313#define NXMP_LC_TRAPCFG 2
314
315/**
316 * Network service types
317 */
318enum
319{
320 NETSRV_CUSTOM,
321 NETSRV_SSH,
322 NETSRV_POP3,
323 NETSRV_SMTP,
324 NETSRV_FTP,
325 NETSRV_HTTP,
326 NETSRV_HTTPS,
327 NETSRV_TELNET
328};
329
330/**
331 * Address list types
332 */
333#define ADDR_LIST_DISCOVERY_TARGETS 1
334#define ADDR_LIST_DISCOVERY_FILTER 2
335
336/**
337 * Discovery filter flags
338 */
339#define DFF_ALLOW_AGENT 0x0001
340#define DFF_ALLOW_SNMP 0x0002
341#define DFF_ONLY_RANGE 0x0004
342
343/**
344 * Connection point types
345 */
346#define CP_TYPE_INDIRECT 0
347#define CP_TYPE_DIRECT 1
348#define CP_TYPE_WIRELESS 2
349
350/**
351 * Events
352 */
353#define NXC_EVENT_CONNECTION_BROKEN 1
354#define NXC_EVENT_NEW_ELOG_RECORD 2
355#define NXC_EVENT_USER_DB_CHANGED 3
356#define NXC_EVENT_OBJECT_CHANGED 4
357#define NXC_EVENT_NOTIFICATION 5
358#define NXC_EVENT_DEPLOYMENT_STATUS 6
359#define NXC_EVENT_NEW_SYSLOG_RECORD 7
360#define NXC_EVENT_NEW_SNMP_TRAP 8
361#define NXC_EVENT_SITUATION_UPDATE 9
362#define NXC_EVENT_JOB_CHANGE 10
363
364/**
365 * Session states (used both by client library and server)
366 */
367enum SessionState
368{
369 STATE_DISCONNECTED = 0,
370 STATE_CONNECTING = 1,
371 STATE_CONNECTED = 2,
372 STATE_AUTHENTICATED = 3
373};
374
375/**
376 * Notification codes
377 */
378#define NX_NOTIFY_SHUTDOWN 1
8d9ee864 379#define NX_NOTIFY_RELOAD_EVENT_DB 2
bf6fb6c3
VK
380#define NX_NOTIFY_ALARM_DELETED 3
381#define NX_NOTIFY_NEW_ALARM 4
382#define NX_NOTIFY_ALARM_CHANGED 5
383#define NX_NOTIFY_ACTION_CREATED 6
384#define NX_NOTIFY_ACTION_MODIFIED 7
385#define NX_NOTIFY_ACTION_DELETED 8
386#define NX_NOTIFY_OBJTOOLS_CHANGED 9
387#define NX_NOTIFY_DBCONN_STATUS 10
388#define NX_NOTIFY_ALARM_TERMINATED 11
389#define NX_NOTIFY_GRAPHS_CHANGED 12
390#define NX_NOTIFY_ETMPL_CHANGED 13
391#define NX_NOTIFY_ETMPL_DELETED 14
392#define NX_NOTIFY_OBJTOOL_DELETED 15
393#define NX_NOTIFY_TRAPCFG_CREATED 16
394#define NX_NOTIFY_TRAPCFG_MODIFIED 17
395#define NX_NOTIFY_TRAPCFG_DELETED 18
396#define NX_NOTIFY_MAPTBL_CHANGED 19
397#define NX_NOTIFY_MAPTBL_DELETED 20
398#define NX_NOTIFY_DCISUMTBL_CHANGED 21
399#define NX_NOTIFY_DCISUMTBL_DELETED 22
400#define NX_NOTIFY_CERTIFICATE_CHANGED 23
401#define NX_NOTIFY_ALARM_STATUS_FLOW_CHANGED 24
402#define NX_NOTIFY_FILE_LIST_CHANGED 25
403#define NX_NOTIFY_FILE_MONITORING_FAILED 26
404#define NX_NOTIFY_SESSION_KILLED 27
8284dc9a 405#define NX_NOTIFY_GRAPHS_DELETED 28
b3beb7f4 406#define NX_NOTIFY_SCHEDULE_UPDATE 29
bf6fb6c3
VK
407
408/**
409 * Request completion codes
410 */
411#define RCC_SUCCESS ((UINT32)0)
412#define RCC_COMPONENT_LOCKED ((UINT32)1)
413#define RCC_ACCESS_DENIED ((UINT32)2)
414#define RCC_INVALID_REQUEST ((UINT32)3)
415#define RCC_TIMEOUT ((UINT32)4)
416#define RCC_OUT_OF_STATE_REQUEST ((UINT32)5)
417#define RCC_DB_FAILURE ((UINT32)6)
418#define RCC_INVALID_OBJECT_ID ((UINT32)7)
419#define RCC_ALREADY_EXIST ((UINT32)8)
420#define RCC_COMM_FAILURE ((UINT32)9)
421#define RCC_SYSTEM_FAILURE ((UINT32)10)
422#define RCC_INVALID_USER_ID ((UINT32)11)
423#define RCC_INVALID_ARGUMENT ((UINT32)12)
424#define RCC_DUPLICATE_DCI ((UINT32)13)
425#define RCC_INVALID_DCI_ID ((UINT32)14)
426#define RCC_OUT_OF_MEMORY ((UINT32)15)
427#define RCC_IO_ERROR ((UINT32)16)
428#define RCC_INCOMPATIBLE_OPERATION ((UINT32)17)
429#define RCC_OBJECT_CREATION_FAILED ((UINT32)18)
430#define RCC_OBJECT_LOOP ((UINT32)19)
431#define RCC_INVALID_OBJECT_NAME ((UINT32)20)
432#define RCC_INVALID_ALARM_ID ((UINT32)21)
433#define RCC_INVALID_ACTION_ID ((UINT32)22)
434#define RCC_OPERATION_IN_PROGRESS ((UINT32)23)
435#define RCC_DCI_COPY_ERRORS ((UINT32)24)
436#define RCC_INVALID_EVENT_CODE ((UINT32)25)
437#define RCC_NO_WOL_INTERFACES ((UINT32)26)
438#define RCC_NO_MAC_ADDRESS ((UINT32)27)
439#define RCC_NOT_IMPLEMENTED ((UINT32)28)
440#define RCC_INVALID_TRAP_ID ((UINT32)29)
441#define RCC_DCI_NOT_SUPPORTED ((UINT32)30)
442#define RCC_VERSION_MISMATCH ((UINT32)31)
443#define RCC_NPI_PARSE_ERROR ((UINT32)32)
444#define RCC_DUPLICATE_PACKAGE ((UINT32)33)
445#define RCC_PACKAGE_FILE_EXIST ((UINT32)34)
446#define RCC_RESOURCE_BUSY ((UINT32)35)
447#define RCC_INVALID_PACKAGE_ID ((UINT32)36)
448#define RCC_INVALID_IP_ADDR ((UINT32)37)
449#define RCC_ACTION_IN_USE ((UINT32)38)
450#define RCC_VARIABLE_NOT_FOUND ((UINT32)39)
451#define RCC_BAD_PROTOCOL ((UINT32)40)
452#define RCC_ADDRESS_IN_USE ((UINT32)41)
453#define RCC_NO_CIPHERS ((UINT32)42)
454#define RCC_INVALID_PUBLIC_KEY ((UINT32)43)
455#define RCC_INVALID_SESSION_KEY ((UINT32)44)
456#define RCC_NO_ENCRYPTION_SUPPORT ((UINT32)45)
457#define RCC_INTERNAL_ERROR ((UINT32)46)
458#define RCC_EXEC_FAILED ((UINT32)47)
459#define RCC_INVALID_TOOL_ID ((UINT32)48)
460#define RCC_SNMP_ERROR ((UINT32)49)
461#define RCC_BAD_REGEXP ((UINT32)50)
462#define RCC_UNKNOWN_PARAMETER ((UINT32)51)
463#define RCC_FILE_IO_ERROR ((UINT32)52)
464#define RCC_CORRUPTED_MIB_FILE ((UINT32)53)
465#define RCC_TRANSFER_IN_PROGRESS ((UINT32)54)
466#define RCC_INVALID_JOB_ID ((UINT32)55)
467#define RCC_INVALID_SCRIPT_ID ((UINT32)56)
468#define RCC_INVALID_SCRIPT_NAME ((UINT32)57)
469#define RCC_UNKNOWN_MAP_NAME ((UINT32)58)
470#define RCC_INVALID_MAP_ID ((UINT32)59)
471#define RCC_ACCOUNT_DISABLED ((UINT32)60)
472#define RCC_NO_GRACE_LOGINS ((UINT32)61)
473#define RCC_CONNECTION_BROKEN ((UINT32)62)
474#define RCC_INVALID_CONFIG_ID ((UINT32)63)
475#define RCC_DB_CONNECTION_LOST ((UINT32)64)
476#define RCC_ALARM_OPEN_IN_HELPDESK ((UINT32)65)
477#define RCC_ALARM_NOT_OUTSTANDING ((UINT32)66)
478#define RCC_NOT_PUSH_DCI ((UINT32)67)
479#define RCC_CONFIG_PARSE_ERROR ((UINT32)68)
480#define RCC_CONFIG_VALIDATION_ERROR ((UINT32)69)
481#define RCC_INVALID_GRAPH_ID ((UINT32)70)
482#define RCC_LOCAL_CRYPTO_ERROR ((UINT32)71)
483#define RCC_UNSUPPORTED_AUTH_TYPE ((UINT32)72)
484#define RCC_BAD_CERTIFICATE ((UINT32)73)
485#define RCC_INVALID_CERT_ID ((UINT32)74)
486#define RCC_SNMP_FAILURE ((UINT32)75)
487#define RCC_NO_L2_TOPOLOGY_SUPPORT ((UINT32)76)
488#define RCC_INVALID_SITUATION_ID ((UINT32)77)
82493366 489#define RCC_NO_SUCH_INSTANCE ((UINT32)78)
bf6fb6c3
VK
490#define RCC_INVALID_EVENT_ID ((UINT32)79)
491#define RCC_AGENT_ERROR ((UINT32)80)
492#define RCC_UNKNOWN_VARIABLE ((UINT32)81)
493#define RCC_RESOURCE_NOT_AVAILABLE ((UINT32)82)
494#define RCC_JOB_CANCEL_FAILED ((UINT32)83)
495#define RCC_INVALID_POLICY_ID ((UINT32)84)
496#define RCC_UNKNOWN_LOG_NAME ((UINT32)85)
497#define RCC_INVALID_LOG_HANDLE ((UINT32)86)
498#define RCC_WEAK_PASSWORD ((UINT32)87)
499#define RCC_REUSED_PASSWORD ((UINT32)88)
500#define RCC_INVALID_SESSION_HANDLE ((UINT32)89)
501#define RCC_CLUSTER_MEMBER_ALREADY ((UINT32)90)
502#define RCC_JOB_HOLD_FAILED ((UINT32)91)
503#define RCC_JOB_UNHOLD_FAILED ((UINT32)92)
504#define RCC_ZONE_ID_ALREADY_IN_USE ((UINT32)93)
505#define RCC_INVALID_ZONE_ID ((UINT32)94)
506#define RCC_ZONE_NOT_EMPTY ((UINT32)95)
507#define RCC_NO_COMPONENT_DATA ((UINT32)96)
508#define RCC_INVALID_ALARM_NOTE_ID ((UINT32)97)
509#define RCC_ENCRYPTION_ERROR ((UINT32)98)
510#define RCC_INVALID_MAPPING_TABLE_ID ((UINT32)99)
511#define RCC_NO_SOFTWARE_PACKAGE_DATA ((UINT32)100)
512#define RCC_INVALID_SUMMARY_TABLE_ID ((UINT32)101)
513#define RCC_USER_LOGGED_IN ((UINT32)102)
514#define RCC_XML_PARSE_ERROR ((UINT32)103)
515#define RCC_HIGH_QUERY_COST ((UINT32)104)
516#define RCC_LICENSE_VIOLATION ((UINT32)105)
517#define RCC_CLIENT_LICENSE_EXCEEDED ((UINT32)106)
518#define RCC_OBJECT_ALREADY_EXISTS ((UINT32)107)
519#define RCC_NO_HDLINK ((UINT32)108)
520#define RCC_HDLINK_COMM_FAILURE ((UINT32)109)
521#define RCC_HDLINK_ACCESS_DENIED ((UINT32)110)
522#define RCC_HDLINK_INTERNAL_ERROR ((UINT32)111)
523#define RCC_NO_LDAP_CONNECTION ((UINT32)112)
524#define RCC_NO_ROUTING_TABLE ((UINT32)113)
525#define RCC_NO_FDB ((UINT32)114)
526#define RCC_NO_LOCATION_HISTORY ((UINT32)115)
527#define RCC_OBJECT_IN_USE ((UINT32)116)
528#define RCC_NXSL_COMPILATION_ERROR ((UINT32)117)
529#define RCC_NXSL_EXECUTION_ERROR ((UINT32)118)
c85c8ef2 530#define RCC_UNKNOWN_CONFIG_VARIABLE ((UINT32)119)
77a08c86 531#define RCC_UNSUPPORTED_AUTH_METHOD ((UINT32)120)
bf6fb6c3
VK
532
533/**
534 * Mask bits for NXCModifyEventTemplate()
535 */
536#define EM_SEVERITY ((UINT32)0x01)
537#define EM_FLAGS ((UINT32)0x02)
538#define EM_NAME ((UINT32)0x04)
539#define EM_MESSAGE ((UINT32)0x08)
540#define EM_DESCRIPTION ((UINT32)0x10)
541#define EM_ALL ((UINT32)0x1F)
542
543/**
544 * Mask bits (flags) for NXCModifyObject()
545 */
546#define OBJ_UPDATE_NAME ((QWORD)_ULL(0x0000000001))
547#define OBJ_UPDATE_AGENT_PORT ((QWORD)_ULL(0x0000000002))
548#define OBJ_UPDATE_AGENT_AUTH ((QWORD)_ULL(0x0000000004))
549#define OBJ_UPDATE_AGENT_SECRET ((QWORD)_ULL(0x0000000008))
550#define OBJ_UPDATE_SNMP_VERSION ((QWORD)_ULL(0x0000000010))
551#define OBJ_UPDATE_SNMP_AUTH ((QWORD)_ULL(0x0000000020))
552#define OBJ_UPDATE_ACL ((QWORD)_ULL(0x0000000040))
553#define OBJ_UPDATE_GEOLOCATION ((QWORD)_ULL(0x0000000080))
554#define OBJ_UPDATE_SYNC_NETS ((QWORD)_ULL(0x0000000100))
555#define OBJ_UPDATE_SERVICE_TYPE ((QWORD)_ULL(0x0000000200))
556#define OBJ_UPDATE_IP_PROTO ((QWORD)_ULL(0x0000000400))
557#define OBJ_UPDATE_IP_PORT ((QWORD)_ULL(0x0000000800))
558#define OBJ_UPDATE_CHECK_REQUEST ((QWORD)_ULL(0x0000001000))
559#define OBJ_UPDATE_CHECK_RESPONSE ((QWORD)_ULL(0x0000002000))
560#define OBJ_UPDATE_POLLER_NODE ((QWORD)_ULL(0x0000004000))
561#define OBJ_UPDATE_IP_ADDR ((QWORD)_ULL(0x0000008000))
562#define OBJ_UPDATE_PEER_GATEWAY ((QWORD)_ULL(0x0000010000))
563#define OBJ_UPDATE_NETWORK_LIST ((QWORD)_ULL(0x0000020000))
564#define OBJ_UPDATE_STATUS_ALG ((QWORD)_ULL(0x0000040000))
565#define OBJ_UPDATE_PROXY_NODE ((QWORD)_ULL(0x0000080000))
566#define OBJ_UPDATE_FLAGS ((QWORD)_ULL(0x0000100000))
567#define OBJ_UPDATE_ACT_EVENT ((QWORD)_ULL(0x0000200000))
568#define OBJ_UPDATE_DEACT_EVENT ((QWORD)_ULL(0x0000400000))
569#define OBJ_UPDATE_SOURCE_OBJECT ((QWORD)_ULL(0x0000800000))
570#define OBJ_UPDATE_ACTIVE_STATUS ((QWORD)_ULL(0x0001000000))
571#define OBJ_UPDATE_INACTIVE_STATUS ((QWORD)_ULL(0x0002000000))
572#define OBJ_UPDATE_DCI_LIST ((QWORD)_ULL(0x0004000000))
573#define OBJ_UPDATE_SCRIPT ((QWORD)_ULL(0x0008000000))
574#define OBJ_UPDATE_CLUSTER_TYPE ((QWORD)_ULL(0x0010000000))
575#define OBJ_UPDATE_RESOURCES ((QWORD)_ULL(0x0020000000))
576#define OBJ_UPDATE_SNMP_PROXY ((QWORD)_ULL(0x0040000000))
577#define OBJ_UPDATE_REQUIRED_POLLS ((QWORD)_ULL(0x0080000000))
578#define OBJ_UPDATE_TRUSTED_NODES ((QWORD)_ULL(0x0100000000))
579#define OBJ_UPDATE_CUSTOM_ATTRS ((QWORD)_ULL(0x0200000000))
580#define OBJ_UPDATE_USE_IFXTABLE ((QWORD)_ULL(0x0400000000))
581#define OBJ_UPDATE_AUTOBIND ((QWORD)_ULL(0x1000000000))
582#define OBJ_UPDATE_SNMP_PORT ((QWORD)_ULL(0x2000000000))
583#define OBJ_UPDATE_PRIMARY_NAME ((QWORD)_ULL(0x4000000000))
584
585/**
586 * Global user rights
587 */
588#ifndef NETXMS_CUSTOM_USER_RIGHTS
589
badd6e08
VK
590#define SYSTEM_ACCESS_MANAGE_USERS _ULL(0x000000000001)
591#define SYSTEM_ACCESS_SERVER_CONFIG _ULL(0x000000000002)
592#define SYSTEM_ACCESS_CONFIGURE_TRAPS _ULL(0x000000000004)
593#define SYSTEM_ACCESS_MANAGE_SESSIONS _ULL(0x000000000008)
594#define SYSTEM_ACCESS_VIEW_EVENT_DB _ULL(0x000000000010)
595#define SYSTEM_ACCESS_EDIT_EVENT_DB _ULL(0x000000000020)
596#define SYSTEM_ACCESS_EPP _ULL(0x000000000040)
597#define SYSTEM_ACCESS_MANAGE_ACTIONS _ULL(0x000000000080)
598#define SYSTEM_ACCESS_DELETE_ALARMS _ULL(0x000000000100)
599#define SYSTEM_ACCESS_MANAGE_PACKAGES _ULL(0x000000000200)
600#define SYSTEM_ACCESS_VIEW_EVENT_LOG _ULL(0x000000000400)
601#define SYSTEM_ACCESS_MANAGE_TOOLS _ULL(0x000000000800)
602#define SYSTEM_ACCESS_MANAGE_SCRIPTS _ULL(0x000000001000)
603#define SYSTEM_ACCESS_VIEW_TRAP_LOG _ULL(0x000000002000)
604#define SYSTEM_ACCESS_VIEW_AUDIT_LOG _ULL(0x000000004000)
605#define SYSTEM_ACCESS_MANAGE_AGENT_CFG _ULL(0x000000008000)
606#define SYSTEM_ACCESS_MANAGE_SITUATIONS _ULL(0x000000010000)
607#define SYSTEM_ACCESS_SEND_SMS _ULL(0x000000020000)
608#define SYSTEM_ACCESS_MOBILE_DEVICE_LOGIN _ULL(0x000000040000)
609#define SYSTEM_ACCESS_REGISTER_AGENTS _ULL(0x000000080000)
610#define SYSTEM_ACCESS_READ_SERVER_FILES _ULL(0x000000100000)
611#define SYSTEM_ACCESS_SERVER_CONSOLE _ULL(0x000000200000)
612#define SYSTEM_ACCESS_MANAGE_SERVER_FILES _ULL(0x000000400000)
613#define SYSTEM_ACCESS_MANAGE_MAPPING_TBLS _ULL(0x000000800000)
614#define SYSTEM_ACCESS_MANAGE_SUMMARY_TBLS _ULL(0x000001000000)
615#define SYSTEM_ACCESS_REPORTING_SERVER _ULL(0x000002000000)
616#define SYSTEM_ACCESS_XMPP_COMMANDS _ULL(0x000004000000)
617#define SYSTEM_ACCESS_MANAGE_IMAGE_LIB _ULL(0x000008000000)
618#define SYSTEM_ACCESS_UNLINK_ISSUES _ULL(0x000010000000)
619#define SYSTEM_ACCESS_VIEW_SYSLOG _ULL(0x000020000000)
620#define SYSTEM_ACCESS_USER_SCHEDULED_TASKS _ULL(0x000040000000)
621#define SYSTEM_ACCESS_OWN_SCHEDULED_TASKS _ULL(0x000080000000)
622#define SYSTEM_ACCESS_ALL_SCHEDULED_TASKS _ULL(0x000100000000)
623#define SYSTEM_ACCESS_SCHEDULE_SCRIPT _ULL(0x000200000000)
624#define SYSTEM_ACCESS_SCHEDULE_FILE_UPLOAD _ULL(0x000400000000)
625#define SYSTEM_ACCESS_SCHEDULE_MAINTENANCE _ULL(0x000800000000)
626#define SYSTEM_ACCESS_MANAGE_REPOSITORIES _ULL(0x001000000000)
627#define SYSTEM_ACCESS_VIEW_REPOSITORIES _ULL(0x002000000000)
628
629#define SYSTEM_ACCESS_FULL _ULL(0x003FFFFFFFFF)
bf6fb6c3
VK
630
631#endif /* NETXMS_CUSTOM_USER_RIGHTS */
632
633/**
634 * Object access rights
635 */
636#define OBJECT_ACCESS_READ 0x00000001
637#define OBJECT_ACCESS_MODIFY 0x00000002
638#define OBJECT_ACCESS_CREATE 0x00000004
639#define OBJECT_ACCESS_DELETE 0x00000008
640#define OBJECT_ACCESS_READ_ALARMS 0x00000010
641#define OBJECT_ACCESS_ACL 0x00000020
642#define OBJECT_ACCESS_UPDATE_ALARMS 0x00000040
643#define OBJECT_ACCESS_SEND_EVENTS 0x00000080
644#define OBJECT_ACCESS_CONTROL 0x00000100
645#define OBJECT_ACCESS_TERM_ALARMS 0x00000200
646#define OBJECT_ACCESS_PUSH_DATA 0x00000400
647#define OBJECT_ACCESS_CREATE_ISSUE 0x00000800
648#define OBJECT_ACCESS_DOWNLOAD 0x00001000
649#define OBJECT_ACCESS_UPLOAD 0x00002000
650#define OBJECT_ACCESS_MANAGE_FILES 0x00004000
651
652/**
653 * Object sync flags
654 */
655#define OBJECT_SYNC_SEND_UPDATES 0x0001
656#define OBJECT_SYNC_DUAL_CONFIRM 0x0002
657
658/**
659 * User/group flags
660 */
661#define UF_MODIFIED 0x0001
662#define UF_DELETED 0x0002
663#define UF_DISABLED 0x0004
664#define UF_CHANGE_PASSWORD 0x0008
665#define UF_CANNOT_CHANGE_PASSWORD 0x0010
666#define UF_INTRUDER_LOCKOUT 0x0020
667#define UF_PASSWORD_NEVER_EXPIRES 0x0040
668#define UF_LDAP_USER 0x0080
669#define UF_SYNC_EXCEPTION 0x0100
27858eaa 670#define UF_CLOSE_OTHER_SESSIONS 0x0200
bf6fb6c3
VK
671
672/**
673 * Fields for NXCModifyUserEx
674 */
675#define USER_MODIFY_LOGIN_NAME 0x00000001
676#define USER_MODIFY_DESCRIPTION 0x00000002
677#define USER_MODIFY_FULL_NAME 0x00000004
678#define USER_MODIFY_FLAGS 0x00000008
679#define USER_MODIFY_ACCESS_RIGHTS 0x00000010
680#define USER_MODIFY_MEMBERS 0x00000020
681#define USER_MODIFY_CERT_MAPPING 0x00000040
682#define USER_MODIFY_AUTH_METHOD 0x00000080
683#define USER_MODIFY_PASSWD_LENGTH 0x00000100
684#define USER_MODIFY_TEMP_DISABLE 0x00000200
685#define USER_MODIFY_CUSTOM_ATTRIBUTES 0x00000400
686#define USER_MODIFY_XMPP_ID 0x00000800
687#define USER_MODIFY_GROUP_MEMBERSHIP 0x00001000
688
689/**
690 * User certificate mapping methods
691 */
692#define USER_MAP_CERT_BY_SUBJECT 0
693#define USER_MAP_CERT_BY_PUBKEY 1
694#define USER_MAP_CERT_BY_CN 2
695
696/**
697 * User database change notification types
698 */
699#define USER_DB_CREATE 0
700#define USER_DB_DELETE 1
701#define USER_DB_MODIFY 2
702
703/**
704 * Situation change notification types
705 */
706#define SITUATION_CREATE 1
707#define SITUATION_DELETE 2
708#define SITUATION_UPDATE 3
709#define SITUATION_INSTANCE_UPDATE 4
710#define SITUATION_INSTANCE_DELETE 5
711
712/**
713 * Data collection object types
714 */
715#define DCO_TYPE_GENERIC 0
716#define DCO_TYPE_ITEM 1
717#define DCO_TYPE_TABLE 2
87fff547 718#define DCO_TYPE_LIST 3
bf6fb6c3
VK
719
720/**
721 * DCI flags
722 */
723#define DCF_ADVANCED_SCHEDULE ((UINT16)0x0001)
724#define DCF_ALL_THRESHOLDS ((UINT16)0x0002)
725#define DCF_RAW_VALUE_OCTET_STRING ((UINT16)0x0004)
726#define DCF_SHOW_ON_OBJECT_TOOLTIP ((UINT16)0x0008)
727#define DCF_AGGREGATE_FUNCTION_MASK ((UINT16)0x0070)
728#define DCF_AGGREGATE_ON_CLUSTER ((UINT16)0x0080)
729#define DCF_TRANSFORM_AGGREGATED ((UINT16)0x0100)
730#define DCF_NO_STORAGE ((UINT16)0x0200)
1fa2ca0e
VK
731#define DCF_CALCULATE_NODE_STATUS ((UINT16)0x0400)
732#define DCF_SHOW_IN_OBJECT_OVERVIEW ((UINT16)0x0800)
9708eff4 733#define DCF_CACHE_MODE_MASK ((UINT16)0x3000)
b9a4ef7c 734#define DCF_AGGREGATE_WITH_ERRORS ((UINT16)0x4000)
bf6fb6c3
VK
735
736/**
737 * Get cluster aggregation function from DCI flags
738 */
739#define DCF_GET_AGGREGATION_FUNCTION(flags) (((flags) & DCF_AGGREGATE_FUNCTION_MASK) >> 4)
9708eff4
VK
740
741/**
742 * Set cluster aggregation function in DCI flags
743 */
bf6fb6c3
VK
744#define DCF_SET_AGGREGATION_FUNCTION(flags,func) (((flags) & ~DCF_AGGREGATE_FUNCTION_MASK) | (((func) & 0x07) << 4))
745
9708eff4
VK
746/**
747 * Get cache mode from DCI flags
748 */
749#define DCF_GET_CACHE_MODE(flags) (((flags) & DCF_CACHE_MODE_MASK) >> 12)
750
751/**
752 * Set cache mode in DCI flags
753 */
754#define DCF_SET_CACHE_MODE(flags,mode) (((flags) & ~DCF_CACHE_MODE_MASK) | (((mode) & 0x03) << 12))
755
bf6fb6c3
VK
756/**
757 * DCTable column flags
758 */
759#define TCF_DATA_TYPE_MASK ((UINT16)0x000F)
760#define TCF_AGGREGATE_FUNCTION_MASK ((UINT16)0x0070)
761#define TCF_INSTANCE_COLUMN ((UINT16)0x0100)
762#define TCF_INSTANCE_LABEL_COLUMN ((UINT16)0x0200)
763
764/**
765 * Get cluster aggregation function from column flags
766 */
767#define TCF_GET_AGGREGATION_FUNCTION(flags) (((flags) & TCF_AGGREGATE_FUNCTION_MASK) >> 4)
768#define TCF_SET_AGGREGATION_FUNCTION(flags,func) (((flags) & ~DCF_AGGREGATE_FUNCTION_MASK) | (((func) & 0x07) << 4))
769
770/**
771 * Get data type from column flags
772 */
773#define TCF_GET_DATA_TYPE(flags) ((flags) & TCF_DATA_TYPE_MASK)
774#define TCF_SET_DATA_TYPE(flags,dt) (((flags) & ~TCF_DATA_TYPE_MASK) | ((dt) & 0x0F))
775
776/**
777 * Aggregation functions
778 */
779#define DCF_FUNCTION_SUM 0
780#define DCF_FUNCTION_AVG 1
781#define DCF_FUNCTION_MIN 2
782#define DCF_FUNCTION_MAX 3
783
784/**
785 * SNMP raw types
786 */
787#define SNMP_RAWTYPE_NONE 0
788#define SNMP_RAWTYPE_INT32 1
789#define SNMP_RAWTYPE_UINT32 2
790#define SNMP_RAWTYPE_INT64 3
791#define SNMP_RAWTYPE_UINT64 4
792#define SNMP_RAWTYPE_DOUBLE 5
793#define SNMP_RAWTYPE_IP_ADDR 6
794#define SNMP_RAWTYPE_MAC_ADDR 7
795
796/**
797 * Data sources
798 */
799#define DS_INTERNAL 0
800#define DS_NATIVE_AGENT 1
801#define DS_SNMP_AGENT 2
802#define DS_CHECKPOINT_AGENT 3
803#define DS_PUSH_AGENT 4
804#define DS_WINPERF 5
805#define DS_SMCLP 6
806#define DS_SCRIPT 7
241541f4 807#define DS_SSH 8
bf6fb6c3
VK
808
809/**
810 * Item status
811 */
812#define ITEM_STATUS_ACTIVE 0
813#define ITEM_STATUS_DISABLED 1
814#define ITEM_STATUS_NOT_SUPPORTED 2
815
816/**
817 * Delta calculation methods for DCIs
818 */
819#define DCM_ORIGINAL_VALUE 0
820#define DCM_SIMPLE 1
821#define DCM_AVERAGE_PER_SECOND 2
822#define DCM_AVERAGE_PER_MINUTE 3
823
824/**
825 * Threshold functions
826 */
827#define F_LAST 0
828#define F_AVERAGE 1
829#define F_DEVIATION 2
830#define F_DIFF 3
831#define F_ERROR 4
832#define F_SUM 5
833#define F_SCRIPT 6
834
835/**
836 * DCI aggregation functions
837 */
838enum AggregationFunction
839{
840 DCI_AGG_LAST = 0,
841 DCI_AGG_MIN = 1,
842 DCI_AGG_MAX = 2,
843 DCI_AGG_AVG = 3,
844 DCI_AGG_SUM = 4
845};
846
847/**
848 * Threshold operations
849 */
850#define OP_LE 0
851#define OP_LE_EQ 1
852#define OP_EQ 2
853#define OP_GT_EQ 3
854#define OP_GT 4
855#define OP_NE 5
856#define OP_LIKE 6
857#define OP_NOTLIKE 7
858
859/**
860 * DCI base units
861 */
862#define DCI_BASEUNITS_OTHER 0
863#define DCI_BASEUNITS_CUSTOM 1
864#define DCI_BASEUNITS_BYTES 2
865#define DCI_BASEUNITS_BITS 3
866#define DCI_BASEUNITS_SECONDS 4
867#define DCI_BASEUNITS_PERCENTS 5
868#define DCI_BASEUNITS_BITS_PER_SECOND 6
869#define DCI_BASEUNITS_BYTES_PER_SECOND 7
870
871/**
872 * DCI instance discovery methods
873 */
874#define IDM_NONE 0
875#define IDM_AGENT_LIST 1
876#define IDM_AGENT_TABLE 2
877#define IDM_SNMP_WALK_VALUES 3
878#define IDM_SNMP_WALK_OIDS 4
d32e7ef1 879#define IDM_SCRIPT 5
bf6fb6c3
VK
880
881/**
882 * Event policy rule flags
883 */
884#define RF_STOP_PROCESSING 0x0001
885#define RF_NEGATED_SOURCE 0x0002
886#define RF_NEGATED_EVENTS 0x0004
887#define RF_GENERATE_ALARM 0x0008
888#define RF_DISABLED 0x0010
889#define RF_TERMINATE_BY_REGEXP 0x0020
890#define RF_SEVERITY_INFO 0x0100
891#define RF_SEVERITY_WARNING 0x0200
892#define RF_SEVERITY_MINOR 0x0400
893#define RF_SEVERITY_MAJOR 0x0800
894#define RF_SEVERITY_CRITICAL 0x1000
895
896/**
897 * Action types
898 */
899#define ACTION_EXEC 0
900#define ACTION_REMOTE 1
901#define ACTION_SEND_EMAIL 2
902#define ACTION_SEND_SMS 3
903#define ACTION_FORWARD_EVENT 4
904#define ACTION_NXSL_SCRIPT 5
905#define ACTION_XMPP_MESSAGE 6
906
907/**
908 * Network map types
909 */
910#define NETMAP_USER_DEFINED 0
911#define NETMAP_IP_TOPOLOGY 1
912#define NETMAP_L2_TOPOLOGY 2
913
914/**
915 * Network map flags
916 */
917#define MF_SHOW_STATUS_ICON 0x00000001
918#define MF_SHOW_STATUS_FRAME 0x00000002
919#define MF_SHOW_STATUS_BKGND 0x00000004
920#define MF_SHOW_END_NODES 0x00000008
921#define MF_CALCULATE_STATUS 0x00000010
53e39123 922#define MF_FILTER_OBJECTS 0x00000020
bf6fb6c3
VK
923
924/**
925 * Network map layouts
926 */
927#define MAP_LAYOUT_MANUAL 0x7FFF
928#define MAP_LAYOUT_SPRING 0
929#define MAP_LAYOUT_RADIAL 1
930#define MAP_LAYOUT_HTREE 2
931#define MAP_LAYOUT_VTREE 3
932#define MAP_LAYOUT_SPARSE_VTREE 4
933
934
935//
936// Deployment manager status codes
937//
938
939#define DEPLOYMENT_STATUS_PENDING 0
940#define DEPLOYMENT_STATUS_TRANSFER 1
941#define DEPLOYMENT_STATUS_INSTALLATION 2
942#define DEPLOYMENT_STATUS_COMPLETED 3
943#define DEPLOYMENT_STATUS_FAILED 4
944#define DEPLOYMENT_STATUS_INITIALIZE 5
945#define DEPLOYMENT_STATUS_FINISHED 255
946
947/**
c044d4f3
VK
948 * Core subscription channels
949 */
950#define NXC_CHANNEL_EVENTS _T("Core.Events")
951#define NXC_CHANNEL_SYSLOG _T("Core.Syslog")
952#define NXC_CHANNEL_ALARMS _T("Core.Alarms")
953#define NXC_CHANNEL_OBJECTS _T("Core.Objects")
954#define NXC_CHANNEL_SNMP_TRAPS _T("Core.SNMP.Traps")
955#define NXC_CHANNEL_AUDIT_LOG _T("Core.Audit")
956#define NXC_CHANNEL_SITUATIONS _T("Core.Situations")
25880ae2 957#define NXC_CHANNEL_USERDB _T("Core.UserDB")
bf6fb6c3 958
9708eff4
VK
959/**
960 * Node creation flags
961 */
bf6fb6c3
VK
962#define NXC_NCF_DISABLE_ICMP 0x0001
963#define NXC_NCF_DISABLE_NXCP 0x0002
964#define NXC_NCF_DISABLE_SNMP 0x0004
965#define NXC_NCF_CREATE_UNMANAGED 0x0008
966
9708eff4
VK
967/**
968 * Agent data cache modes
969 */
55d81770 970#define AGENT_CACHE_DEFAULT 0
9708eff4 971#define AGENT_CACHE_ON 1
55d81770 972#define AGENT_CACHE_OFF 2
bf6fb6c3 973
9708eff4
VK
974/**
975 * Server components
976 */
bf6fb6c3
VK
977#define SRV_COMPONENT_DISCOVERY_MGR 1
978
9708eff4
VK
979/**
980 * Configuration import flags
981 */
bf6fb6c3
VK
982#define CFG_IMPORT_REPLACE_EVENT_BY_CODE 0x0001
983#define CFG_IMPORT_REPLACE_EVENT_BY_NAME 0x0002
984
985
986//
987// Graph access flags
988//
989
990#define NXGRAPH_ACCESS_READ 0x01
991#define NXGRAPH_ACCESS_WRITE 0x02
992
993
994//
995// Cluster types
996//
997
998#define CLUSTER_TYPE_GENERIC 0
999
1000
1001//
1002// SNMP trap flags
1003//
1004
1005#define TRAP_VARBIND_FORCE_TEXT 0x0001
1006
4e5a9b7b
VK
1007#ifdef __cplusplus
1008
bf6fb6c3
VK
1009/**
1010 * IP network
1011 */
1012typedef struct
1013{
1014 UINT32 dwAddr;
1015 UINT32 dwMask;
1016} IP_NETWORK;
1017
1018/**
1019 * Agent's parameter information
1020 */
1021typedef struct
1022{
1023 TCHAR szName[MAX_PARAM_NAME];
1024 TCHAR szDescription[MAX_DB_STRING];
1025 int iDataType;
1026} NXC_AGENT_PARAM;
1027
1028/**
1029 * Server action definition structure
1030 */
1031typedef struct
1032{
1033 UINT32 dwId;
1034 int iType;
1035 BOOL bIsDisabled;
1036 TCHAR szName[MAX_OBJECT_NAME];
1037 TCHAR szRcptAddr[MAX_RCPT_ADDR_LEN];
1038 TCHAR szEmailSubject[MAX_EMAIL_SUBJECT_LEN];
1039 TCHAR *pszData;
1040} NXC_ACTION;
1041
1042/**
1043 * Alarm structure
1044 */
1045typedef struct
1046{
d727efe6 1047 UINT64 sourceEventId; // Originating event ID
65ce7452
VK
1048 UINT32 alarmId; // Unique alarm ID
1049 UINT32 creationTime; // Alarm creation time in UNIX time format
1050 UINT32 lastChangeTime; // Alarm's last change time in UNIX time format
1051 UINT32 sourceObject; // Source object ID
1052 UINT32 sourceEventCode; // Originating event code
1053 UINT32 dciId; // related DCI ID
1054 BYTE currentSeverity; // Alarm's current severity
1055 BYTE originalSeverity; // Alarm's original severity
1056 BYTE state; // Current state
1057 BYTE helpDeskState; // State of alarm in helpdesk system
1058 UINT32 ackByUser; // ID of user who was acknowledged this alarm (0 for system)
1059 UINT32 resolvedByUser; // ID of user who was resolved this alarm (0 for system)
1060 UINT32 termByUser; // ID of user who was terminated this alarm (0 for system)
1061 UINT32 repeatCount;
1062 UINT32 timeout;
1063 UINT32 timeoutEvent;
1064 TCHAR message[MAX_EVENT_MSG_LENGTH];
1065 TCHAR key[MAX_DB_STRING];
1066 TCHAR helpDeskRef[MAX_HELPDESK_REF_LEN];
1067 void *userData; // Can be freely used by client application
1068 UINT32 noteCount; // Number of notes added to alarm
1069 UINT32 ackTimeout; // Sticky acknowledgment end time. If acknowladgmant without timeout put 0
bf6fb6c3
VK
1070} NXC_ALARM;
1071
1072/**
1073 * Trap parameter mapping entry
1074 */
1075typedef struct
1076{
1077 UINT32 *pdwObjectId; // Trap OID
1078 UINT32 dwOidLen; // Trap OID length (if highest bit is set, then it's a position)
1079 UINT32 dwFlags;
1080 TCHAR szDescription[MAX_DB_STRING];
1081} NXC_OID_MAP;
1082
1083/**
1084 * Trap configuration entry
1085 */
1086typedef struct
1087{
1088 UINT32 dwId; // Entry ID
1089 UINT32 *pdwObjectId; // Trap OID
1090 UINT32 dwOidLen; // Trap OID length
1091 UINT32 dwEventCode; // Event code
1092 UINT32 dwNumMaps; // Number of parameter mappings
1093 NXC_OID_MAP *pMaps;
1094 TCHAR szDescription[MAX_DB_STRING];
1095 TCHAR szUserTag[MAX_USERTAG_LENGTH];
1096} NXC_TRAP_CFG_ENTRY;
1097
1098/**
1099 * Condition's input DCI definition
1100 */
1101typedef struct
1102{
1103 UINT32 id;
1104 UINT32 nodeId;
1105 int function; // Average, last, diff
1106 int polls; // Number of polls used for average
1107} INPUT_DCI;
1108
1109/**
1110 * Cluster resource
1111 */
1112typedef struct
1113{
1114 UINT32 dwId;
1115 TCHAR szName[MAX_DB_STRING];
c75e9ee4 1116 InetAddress ipAddr;
bf6fb6c3
VK
1117 UINT32 dwCurrOwner;
1118} CLUSTER_RESOURCE;
1119
4e5a9b7b
VK
1120#endif /* __cplusplus */
1121
bf6fb6c3 1122#endif /* _nxcldefs_h_ */