- Changes in logging and debug output
[public/netxms.git] / src / console / win32 / globals.cpp
CommitLineData
3bf7e95e
VK
1/*
2** NetXMS - Network Management System
3** Windows Console
4** Copyright (C) 2004 Victor Kirhenshtein
5**
6** This program is free software; you can redistribute it and/or modify
7** it under the terms of the GNU General Public License as published by
8** the Free Software Foundation; either version 2 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 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** $module: globals.cpp
21** This file contain all global vartiables
22**
23**/
24
25#include "stdafx.h"
26#include "nxcon.h"
27
28
29//
30// Connection parameters
31//
32
33char g_szServer[MAX_SERVER_NAME_LEN] = "localhost";
34char g_szLogin[MAX_LOGIN_NAME_LEN] = "";
35char g_szPassword[MAX_PASSWORD_LEN] = "";
8c290af0 36DWORD g_dwEncryptionMethod = CSCP_ENCRYPTION_NONE;
3bf7e95e
VK
37
38
34870fc0
VK
39//
40// Global configurable parameters
41//
42
bfce8503 43DWORD g_dwOptions = 0;
34870fc0
VK
44char g_szWorkDir[MAX_PATH] = "";
45
46
f70fc197
VK
47//
48// Server image list
49//
50
51NXC_IMAGE_LIST *g_pSrvImageList = NULL;
52
53
cea97623
VK
54//
55// Image lists with object images
56//
57
58CImageList *g_pObjectSmallImageList = NULL;
59CImageList *g_pObjectNormalImageList = NULL;
60
61
3bf7e95e
VK
62//
63// Global string constants
64//
65
9eb7685c
VK
66char *g_szStatusText[] = { "NORMAL", "WARNING", "MINOR", "MAJOR", "CRITICAL", "UNKNOWN", "UNMANAGED", "DISABLED", "TESTING" };
67char *g_szStatusTextSmall[] = { "Normal", "Warning", "Minor", "Major", "Critical", "Unknown", "Unmanaged", "Disabled", "Testing" };
e6b958c4 68char *g_szObjectClass[] = { "Generic", "Subnet", "Node", "Interface", "Network", "Container", "Zone", "ServiceRoot" };
8c290af0 69char *g_szActionType[] = { "Execute", "Remote", "E-Mail", "SMS" };
89d4d2a2
VK
70char *g_szInterfaceTypes[] = {
71 "Unknown",
72 "Other",
73 "Regular 1822",
74 "HDH 1822",
75 "DDN X.25",
76 "RFC877 X.25",
77 "Ethernet CSMA/CD",
78 "ISO 802.3 CSMA/CD",
79 "ISO 802.4 Token Bus",
80 "ISO 802.5 Token Ring",
81 "ISO 802.6 MAN",
82 "StarLan",
83 "PROTEON 10 Mbps",
84 "PROTEON 80 Mbps",
85 "Hyper Channel",
86 "FDDI",
87 "LAPB",
88 "SDLC",
89 "DS1",
90 "E1",
91 "ISDN BRI",
92 "ISDN PRI",
93 "Proprietary Serial Pt-to-Pt",
94 "PPP",
95 "Software Loopback",
96 "EON (CLNP over IP)",
97 "Ethernet 3 Mbps",
98 "NSIP (XNS over IP)",
99 "SLIP",
100 "DS3",
101 "SMDS",
102 "Frame Relay"
103};
2060ba91
VK
104
105
6aaf0c07
VK
106//
107// Status color table
108//
109
9eb7685c 110COLORREF g_statusColorTable[9] =
6aaf0c07
VK
111{
112 RGB(0, 127, 0), // Normal
9eb7685c
VK
113 RGB(255, 255, 0), // Warning
114 RGB(249, 131, 0), // Minor
6aaf0c07
VK
115 RGB(248, 63, 1), // Major
116 RGB(200, 0, 0), // Critical
117 RGB(61, 12, 187), // Unknown
9eb7685c
VK
118 RGB(255, 255, 130), // Unmanaged
119 RGB(91, 0, 6), // Disabled
120 RGB(255, 135, 255) // Testing
6aaf0c07 121};
1c0c8dde
VK
122
123
124//
125// Data collection item texts
126//
127
128char *g_pszItemOrigin[] = { "Internal", "Agent", "SNMP" };
129char *g_pszItemOriginLong[] = { "Internal", "NetXMS Agent", "SNMP Agent" };
b1dd534d 130char *g_pszItemDataType[] = { "Integer", "Unsigned Integer", "Int64", "Unsigned Int64", "String", "Float" };
1c0c8dde 131char *g_pszItemStatus[] = { "Active", "Disabled", "Not supported" };
413e21e2 132char *g_pszThresholdOperation[] = { "<", "<=", "=", ">=", ">", "!=", "~", "!~" };
95838aec 133char *g_pszThresholdOperationLong[] = { "less", "less or equal", "equal", "greater or equal", "greater", "not equal", "like", "not like" };
34870fc0 134char *g_pszThresholdFunction[] = { "last", "average", "deviation" };
95838aec 135char *g_pszThresholdFunctionLong[] = { "last polled value", "average value", "mean deviation" };
34870fc0
VK
136
137
138//
139// SNMP codes
140//
141
142CODE_TO_TEXT g_ctSnmpMibStatus[] =
143{
144 { MIB_STATUS_MANDATORY, "Mandatory" },
145 { MIB_STATUS_OPTIONAL, "Optional" },
146 { MIB_STATUS_OBSOLETE, "Obsolete" },
147 { MIB_STATUS_DEPRECATED, "Deprecated" },
148 { MIB_STATUS_CURRENT, "Current" },
149 { 0, NULL } // End of list
150};
151CODE_TO_TEXT g_ctSnmpMibAccess[] =
152{
153 { MIB_ACCESS_READONLY, "Read" },
154 { MIB_ACCESS_READWRITE, "Read/Write" },
155 { MIB_ACCESS_WRITEONLY, "Write" },
156 { MIB_ACCESS_NOACCESS, "None" },
157 { MIB_ACCESS_NOTIFY, "Notify" },
158 { MIB_ACCESS_CREATE, "Create" },
159 { 0, NULL } // End of list
160};
161CODE_TO_TEXT g_ctSnmpMibType[] =
162{
163 { TYPE_OTHER, "Other" },
164 { TYPE_OBJID, "Object ID" },
165 { TYPE_OCTETSTR, "Octet String" },
166 { TYPE_INTEGER, "Integer" },
167 { TYPE_NETADDR, "Net Address" },
168 { TYPE_IPADDR, "IP Address" },
169 { TYPE_COUNTER, "Counter" },
170 { TYPE_GAUGE, "Gauge" },
171 { TYPE_TIMETICKS, "Timeticks" },
172 { TYPE_OPAQUE, "Opaque" },
173 { TYPE_NULL, "Null" },
174 { TYPE_COUNTER64, "Counter 64bit" },
175 { TYPE_BITSTRING, "Bit String" },
176 { TYPE_NSAPADDRESS, "NSAP Address" },
177 { TYPE_UINTEGER, "Unsigned Integer" },
178 { TYPE_UNSIGNED32, "Unsigned Integer 32bit" },
179 { TYPE_INTEGER32, "Integer 32bit" },
180 { TYPE_TRAPTYPE, "TRAPTYPE" },
181 { TYPE_NOTIFTYPE, "NOTIFTYPE" },
182 { TYPE_OBJGROUP, "Object Group" },
183 { TYPE_NOTIFGROUP, "NOTIFGROUP" },
184 { TYPE_MODID, "Module ID" },
185 { TYPE_AGENTCAP, "AGENTCAP" },
186 { TYPE_MODCOMP, "MODCOMP" },
187 { 0, NULL } // End of list
188};
51bd5a10
VK
189
190
191//
192// Default object image list
193//
194
195DWORD g_dwDefImgListSize = 0;
196DEF_IMG *g_pDefImgList = NULL;
c7863da1
VK
197
198
199//
200// Action list
201//
202
203DWORD g_dwNumActions = 0;
204NXC_ACTION *g_pActionList = NULL;
205HANDLE g_mutexActionListAccess = INVALID_HANDLE_VALUE;
6849d9be
VK
206
207
208//
209// Container categories list
210//
211
212NXC_CC_LIST *g_pCCList = NULL;