62931efa4499e3fa31d42a301bc5bb5228fdc9f3
[public/netxms.git] / src / agent / core / nxagentd.h
1 /*
2 ** NetXMS multiplatform core agent
3 ** Copyright (C) 2003-2012 Victor Kirhenshtein
4 **
5 ** This program is free software; you can redistribute it and/or modify
6 ** it under the terms of the GNU General Public License as published by
7 ** the Free Software Foundation; either version 2 of the License, or
8 ** (at your option) any later version.
9 **
10 ** This program is distributed in the hope that it will be usefu,,
11 ** but ITHOUT ANY WARRANTY; without even the implied warranty of
12 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 ** GNU General Public License for more details.
14 **
15 ** You should have received a copy of the GNU General Public License
16 ** along with this program; if not, write to the Free Software
17 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 **
19 ** File: nxagentd.h
20 **
21 **/
22
23 #ifndef _nxagentd_h_
24 #define _nxagentd_h_
25
26 #include <nms_common.h>
27 #include <nms_util.h>
28 #include <nms_threads.h>
29 #include <nms_agent.h>
30 #include <nms_cscp.h>
31 #include <stdio.h>
32 #include <stdarg.h>
33 #include <nxqueue.h>
34 #include <nxlog.h>
35 #include "messages.h"
36
37 #define LIBNXCL_NO_DECLARATIONS
38 #include <nxclapi.h>
39
40 #ifdef _NETWARE
41 #undef SEVERITY_CRITICAL
42 #endif
43
44 #ifdef _WIN32
45 #include <aclapi.h>
46 #else
47 #include <sys/socket.h>
48 #include <sys/un.h>
49 #endif
50
51 #ifndef SUN_LEN
52 #define SUN_LEN(su) (sizeof(*(su)) - sizeof((su)->sun_path) + strlen((su)->sun_path))
53 #endif
54
55
56 //
57 // Version
58 //
59
60 #ifdef _DEBUG
61 #define DEBUG_SUFFIX _T("-debug")
62 #else
63 #define DEBUG_SUFFIX _T("")
64 #endif
65 #define AGENT_VERSION_STRING NETXMS_VERSION_STRING DEBUG_SUFFIX
66
67 /**
68 * Default files
69 */
70 #if defined(_WIN32)
71 #define AGENT_DEFAULT_CONFIG _T("C:\\nxagentd.conf")
72 #define AGENT_DEFAULT_CONFIG_D _T("C:\\nxagentd.conf.d")
73 #define AGENT_DEFAULT_LOG _T("C:\\nxagentd.log")
74 #define AGENT_DEFAULT_FILE_STORE _T("C:\\")
75 #define AGENT_DEFAULT_DATA_DIR _T("C:\\")
76 #elif defined(_NETWARE)
77 #define AGENT_DEFAULT_CONFIG "SYS:ETC/nxagentd.conf"
78 #define AGENT_DEFAULT_CONFIG_D "SYS:ETC/nxagentd.conf.d"
79 #define AGENT_DEFAULT_LOG "SYS:ETC/nxagentd.log"
80 #define AGENT_DEFAULT_FILE_STORE "SYS:\\"
81 #define AGENT_DEFAULT_DATA_DIR "SYS:ETC"
82 #elif defined(_IPSO)
83 #define AGENT_DEFAULT_CONFIG _T("/opt/netxms/etc/nxagentd.conf")
84 #define AGENT_DEFAULT_CONFIG_D _T("/opt/netxms/etc/nxagentd.conf.d")
85 #define AGENT_DEFAULT_LOG _T("/opt/netxms/log/nxagentd.log")
86 #define AGENT_DEFAULT_FILE_STORE _T("/opt/netxms/store")
87 #define AGENT_DEFAULT_DATA_DIR _T("/opt/netxms/data")
88 #else
89 #define AGENT_DEFAULT_CONFIG _T("{search}")
90 #define AGENT_DEFAULT_CONFIG_D _T("{search}")
91 #define AGENT_DEFAULT_LOG _T("/var/log/nxagentd")
92 #define AGENT_DEFAULT_FILE_STORE _T("/tmp")
93 #define AGENT_DEFAULT_DATA_DIR _T("{default}")
94 #endif
95
96 #define REGISTRY_FILE_NAME _T("registry.dat")
97
98
99 //
100 // Constants
101 //
102
103 #ifdef _WIN32
104 #define DEFAULT_AGENT_SERVICE_NAME _T("NetXMSAgentdW32")
105 #define DEFAULT_AGENT_EVENT_SOURCE _T("NetXMS Win32 Agent")
106 #define NXAGENTD_SYSLOG_NAME g_windowsEventSourceName
107 #else
108 #define NXAGENTD_SYSLOG_NAME _T("nxagentd")
109 #endif
110
111 #define MAX_PSUFFIX_LENGTH 32
112 #define MAX_SERVERS 32
113 #define MAX_ESA_USER_NAME 64
114
115 #define AF_DAEMON 0x00000001
116 #define AF_USE_SYSLOG 0x00000002
117 #define AF_SUBAGENT_LOADER 0x00000004
118 #define AF_REQUIRE_AUTH 0x00000008
119 #define AF_LOG_UNRESOLVED_SYMBOLS 0x00000010
120 #define AF_ENABLE_ACTIONS 0x00000020
121 #define AF_REQUIRE_ENCRYPTION 0x00000040
122 #define AF_HIDE_WINDOW 0x00000080
123 #define AF_ENABLE_AUTOLOAD 0x00000100
124 #define AF_ENABLE_PROXY 0x00000200
125 #define AF_CENTRAL_CONFIG 0x00000400
126 #define AF_ENABLE_SNMP_PROXY 0x00000800
127 #define AF_SHUTDOWN 0x00001000
128 #define AF_INTERACTIVE_SERVICE 0x00002000
129 #define AF_REGISTER 0x00004000
130 #define AF_ENABLE_WATCHDOG 0x00008000
131 #define AF_CATCH_EXCEPTIONS 0x00010000
132 #define AF_WRITE_FULL_DUMP 0x00020000
133 #define AF_ENABLE_CONTROL_CONNECTOR 0x00040000
134
135
136 #ifdef _WIN32
137
138 //
139 // Request types for H_MemoryInfo
140 //
141
142 #define MEMINFO_PHYSICAL_FREE 1
143 #define MEMINFO_PHYSICAL_FREE_PCT 2
144 #define MEMINFO_PHYSICAL_TOTAL 3
145 #define MEMINFO_PHYSICAL_USED 4
146 #define MEMINFO_PHYSICAL_USED_PCT 5
147 #define MEMINFO_VIRTUAL_FREE 6
148 #define MEMINFO_VIRTUAL_FREE_PCT 7
149 #define MEMINFO_VIRTUAL_TOTAL 8
150 #define MEMINFO_VIRTUAL_USED 9
151 #define MEMINFO_VIRTUAL_USED_PCT 10
152
153
154 //
155 // Request types for H_DiskInfo
156 //
157
158 #define DISKINFO_FREE_BYTES 1
159 #define DISKINFO_USED_BYTES 2
160 #define DISKINFO_TOTAL_BYTES 3
161 #define DISKINFO_FREE_SPACE_PCT 4
162 #define DISKINFO_USED_SPACE_PCT 5
163
164 #endif /* _WIN32 */
165
166
167 //
168 // Request types for H_DirInfo
169 //
170
171 #define DIRINFO_FILE_COUNT 1
172 #define DIRINFO_FILE_SIZE 2
173
174
175 //
176 // Request types for H_FileTime
177 //
178
179 #define FILETIME_ATIME 1
180 #define FILETIME_MTIME 2
181 #define FILETIME_CTIME 3
182
183
184 //
185 // Action types
186 //
187
188 #define AGENT_ACTION_EXEC 1
189 #define AGENT_ACTION_SUBAGENT 2
190 #define AGENT_ACTION_SHELLEXEC 3
191
192 /**
193 * Pipe handle
194 */
195 #ifdef _WIN32
196 #define HPIPE HANDLE
197 #define INVALID_PIPE_HANDLE INVALID_HANDLE_VALUE
198 #else
199 #define HPIPE int
200 #define INVALID_PIPE_HANDLE (-1)
201 #endif
202
203 /**
204 * Action definition structure
205 */
206 typedef struct
207 {
208 TCHAR szName[MAX_PARAM_NAME];
209 int iType;
210 union
211 {
212 TCHAR *pszCmdLine; // to TCHAR
213 struct __subagentAction
214 {
215 LONG (*fpHandler)(const TCHAR *, StringList *, const TCHAR *);
216 const TCHAR *pArg;
217 TCHAR szSubagentName[MAX_PATH];
218 } sa;
219 } handler;
220 TCHAR szDescription[MAX_DB_STRING];
221 } ACTION;
222
223 /**
224 * Loaded subagent information
225 */
226 struct SUBAGENT
227 {
228 HMODULE hModule; // Subagent's module handle
229 NETXMS_SUBAGENT_INFO *pInfo; // Information provided by subagent
230 TCHAR szName[MAX_PATH]; // Name of the module // to TCHAR by LWX
231 #ifdef _NETWARE
232 char szEntryPoint[256]; // Name of agent's entry point
233 #endif
234 };
235
236 /**
237 * External subagent information
238 */
239 class ExternalSubagent
240 {
241 private:
242 TCHAR m_name[MAX_SUBAGENT_NAME];
243 TCHAR m_user[MAX_ESA_USER_NAME];
244 HPIPE m_pipe;
245 #ifdef _WIN32
246 HANDLE m_readEvent;
247 #endif
248 bool m_connected;
249 MsgWaitQueue *m_msgQueue;
250 UINT32 m_requestId;
251 MUTEX m_mutexPipeWrite;
252
253 bool sendMessage(CSCPMessage *msg);
254 CSCPMessage *waitForMessage(WORD code, UINT32 id);
255 UINT32 waitForRCC(UINT32 id);
256 NETXMS_SUBAGENT_PARAM *getSupportedParameters(UINT32 *count);
257 NETXMS_SUBAGENT_LIST *getSupportedLists(UINT32 *count);
258 NETXMS_SUBAGENT_TABLE *getSupportedTables(UINT32 *count);
259
260 public:
261 ExternalSubagent(const TCHAR *name, const TCHAR *user);
262 ~ExternalSubagent();
263
264 void connect(HPIPE hPipe);
265
266 bool isConnected() { return m_connected; }
267 const TCHAR *getName() { return m_name; }
268 const TCHAR *getUserName() { return m_user; }
269
270 UINT32 getParameter(const TCHAR *name, TCHAR *buffer);
271 UINT32 getTable(const TCHAR *name, Table *value);
272 UINT32 getList(const TCHAR *name, StringList *value);
273 void listParameters(CSCPMessage *msg, UINT32 *baseId, UINT32 *count);
274 void listParameters(StringList *list);
275 void listLists(CSCPMessage *msg, UINT32 *baseId, UINT32 *count);
276 void listLists(StringList *list);
277 void listTables(CSCPMessage *msg, UINT32 *baseId, UINT32 *count);
278 void listTables(StringList *list);
279 void shutdown();
280 };
281
282 /**
283 * Server information
284 */
285 class ServerInfo
286 {
287 private:
288 char *m_name;
289 InetAddress m_address;
290 bool m_control;
291 bool m_master;
292 time_t m_lastResolveTime;
293 bool m_redoResolve;
294 MUTEX m_mutex;
295
296 void resolve();
297
298 public:
299 ServerInfo(const TCHAR *name, bool control, bool master);
300 ~ServerInfo();
301
302 bool match(const InetAddress &addr);
303
304 bool isMaster() { return m_master; }
305 bool isControl() { return m_control; }
306 };
307
308 /**
309 * Communication session
310 */
311 class CommSession : public AbstractCommSession
312 {
313 private:
314 SOCKET m_hSocket;
315 Queue *m_pSendQueue;
316 Queue *m_pMessageQueue;
317 CSCP_BUFFER *m_pMsgBuffer;
318 THREAD m_hWriteThread;
319 THREAD m_hProcessingThread;
320 THREAD m_hProxyReadThread;
321 InetAddress m_serverAddr; // IP address of connected host
322 UINT32 m_dwIndex;
323 bool m_authenticated;
324 bool m_masterServer;
325 bool m_controlServer;
326 bool m_proxyConnection;
327 bool m_acceptTraps;
328 int m_hCurrFile;
329 UINT32 m_dwFileRqId;
330 NXCPEncryptionContext *m_pCtx;
331 time_t m_ts; // Last activity timestamp
332 SOCKET m_hProxySocket; // Socket for proxy connection
333 MUTEX m_socketWriteMutex;
334
335 BOOL sendRawMessage(CSCP_MESSAGE *pMsg, NXCPEncryptionContext *pCtx);
336 void authenticate(CSCPMessage *pRequest, CSCPMessage *pMsg);
337 void getConfig(CSCPMessage *pMsg);
338 void updateConfig(CSCPMessage *pRequest, CSCPMessage *pMsg);
339 void getParameter(CSCPMessage *pRequest, CSCPMessage *pMsg);
340 void getList(CSCPMessage *pRequest, CSCPMessage *pMsg);
341 void getTable(CSCPMessage *pRequest, CSCPMessage *pMsg);
342 void action(CSCPMessage *pRequest, CSCPMessage *pMsg);
343 void recvFile(CSCPMessage *pRequest, CSCPMessage *pMsg);
344 void getLocalFile(CSCPMessage *pRequest, CSCPMessage *pMsg);
345 void cancelFileMonitoring(CSCPMessage *pRequest, CSCPMessage *pMsg);
346 UINT32 upgrade(CSCPMessage *pRequest);
347 UINT32 setupProxyConnection(CSCPMessage *pRequest);
348
349 void readThread();
350 void writeThread();
351 void processingThread();
352 void proxyReadThread();
353
354 static THREAD_RESULT THREAD_CALL readThreadStarter(void *);
355 static THREAD_RESULT THREAD_CALL writeThreadStarter(void *);
356 static THREAD_RESULT THREAD_CALL processingThreadStarter(void *);
357 static THREAD_RESULT THREAD_CALL proxyReadThreadStarter(void *);
358
359 public:
360 CommSession(SOCKET hSocket, const InetAddress &serverAddr, bool masterServer, bool controlServer);
361 ~CommSession();
362
363 void run();
364 void disconnect();
365
366 virtual void sendMessage(CSCPMessage *pMsg) { m_pSendQueue->Put(pMsg->createMessage()); }
367 virtual void sendRawMessage(CSCP_MESSAGE *pMsg) { m_pSendQueue->Put(nx_memdup(pMsg, ntohl(pMsg->dwSize))); }
368 virtual bool sendFile(UINT32 requestId, const TCHAR *file, long offset);
369
370 virtual const InetAddress& getServerAddress() { return m_serverAddr; }
371
372 UINT32 getIndex() { return m_dwIndex; }
373 void setIndex(UINT32 dwIndex) { if (m_dwIndex == INVALID_INDEX) m_dwIndex = dwIndex; }
374
375 time_t getTimeStamp() { return m_ts; }
376 void updateTimeStamp() { m_ts = time(NULL); }
377
378 bool canAcceptTraps() { return m_acceptTraps; }
379
380 virtual bool isMasterServer() { return m_masterServer; }
381 virtual bool isControlServer() { return m_controlServer; }
382
383 virtual UINT32 openFile(TCHAR* nameOfFile, UINT32 requestId);
384 };
385
386 /**
387 * Session agent connector
388 */
389 class SessionAgentConnector : public RefCountObject
390 {
391 private:
392 UINT32 m_id;
393 SOCKET m_socket;
394 MUTEX m_mutex;
395 CSCP_BUFFER m_msgBuffer;
396 MsgWaitQueue m_msgQueue;
397 UINT32 m_sessionId;
398 TCHAR *m_sessionName;
399 INT16 m_sessionState;
400 TCHAR *m_userName;
401 VolatileCounter m_requestId;
402
403 void readThread();
404 bool sendMessage(CSCPMessage *msg);
405 UINT32 nextRequestId() { return InterlockedIncrement(&m_requestId); }
406
407 static THREAD_RESULT THREAD_CALL readThreadStarter(void *);
408
409 public:
410 SessionAgentConnector(UINT32 id, SOCKET s);
411 ~SessionAgentConnector();
412
413 void run();
414 void disconnect();
415
416 UINT32 getId() { return m_id; }
417 UINT32 getSessionId() { return m_sessionId; }
418 INT16 getSessionState() { return m_sessionState; }
419 const TCHAR *getSessionName() { return CHECK_NULL(m_sessionName); }
420 const TCHAR *getUserName() { return CHECK_NULL(m_userName); }
421
422 bool testConnection();
423 void takeScreenshot(CSCPMessage *msg);
424 };
425
426 /**
427 * Functions
428 */
429 BOOL Initialize();
430 void Shutdown();
431 void Main();
432
433 void ConsolePrintf(const TCHAR *pszFormat, ...)
434 #if !defined(UNICODE) && (defined(__GNUC__) || defined(__clang__))
435 __attribute__ ((format(printf, 1, 2)))
436 #endif
437 ;
438
439 void DebugPrintf(UINT32 dwSessionId, int level, const TCHAR *pszFormat, ...)
440 #if !defined(UNICODE) && (defined(__GNUC__) || defined(__clang__))
441 __attribute__ ((format(printf, 3, 4)))
442 #endif
443 ;
444
445 void DebugPrintfCallback(int level, const TCHAR *pszFormat, va_list args);
446
447 void BuildFullPath(TCHAR *pszFileName, TCHAR *pszFullPath);
448
449 BOOL DownloadConfig(TCHAR *pszServer);
450
451 BOOL InitParameterList();
452
453 void AddParameter(const TCHAR *szName, LONG (* fpHandler)(const TCHAR *, const TCHAR *, TCHAR *), const TCHAR *pArg,
454 int iDataType, const TCHAR *pszDescription);
455 void AddPushParameter(const TCHAR *name, int dataType, const TCHAR *description);
456 void AddList(const TCHAR *name, LONG (* handler)(const TCHAR *, const TCHAR *, StringList *), const TCHAR *arg);
457 void AddTable(const TCHAR *name, LONG (* handler)(const TCHAR *, const TCHAR *, Table *), const TCHAR *arg, const TCHAR *instanceColumns, const TCHAR *description);
458 BOOL AddExternalParameter(TCHAR *pszCfgLine, BOOL bShellExec, BOOL bIsList);
459 UINT32 GetParameterValue(UINT32 dwSessionId, TCHAR *pszParam, TCHAR *pszValue);
460 UINT32 GetListValue(UINT32 dwSessionId, TCHAR *pszParam, StringList *pValue);
461 UINT32 GetTableValue(UINT32 dwSessionId, TCHAR *pszParam, Table *pValue);
462 void GetParameterList(CSCPMessage *pMsg);
463 void GetEnumList(CSCPMessage *pMsg);
464 void GetTableList(CSCPMessage *pMsg);
465 BOOL LoadSubAgent(TCHAR *szModuleName);
466 void UnloadAllSubAgents();
467 BOOL InitSubAgent(HMODULE hModule, const TCHAR *pszModuleName,
468 BOOL (* SubAgentInit)(NETXMS_SUBAGENT_INFO **, Config *),
469 const TCHAR *pszEntryPoint);
470 BOOL ProcessCmdBySubAgent(UINT32 dwCommand, CSCPMessage *pRequest, CSCPMessage *pResponse, AbstractCommSession *session);
471 BOOL AddAction(const TCHAR *pszName, int iType, const TCHAR *pArg,
472 LONG (*fpHandler)(const TCHAR *, StringList *, const TCHAR *),
473 const TCHAR *pszSubAgent, const TCHAR *pszDescription);
474 BOOL AddActionFromConfig(TCHAR *pszLine, BOOL bShellExec);
475 UINT32 ExecAction(const TCHAR *action, StringList *args);
476 UINT32 ExecActionWithOutput(CommSession *session, UINT32 requestId, const TCHAR *action, StringList *args);
477 UINT32 ExecuteCommand(TCHAR *pszCommand, StringList *pArgs, pid_t *pid);
478 UINT32 ExecuteShellCommand(TCHAR *pszCommand, StringList *pArgs);
479
480 void StartParamProvidersPoller();
481 bool AddParametersProvider(const TCHAR *line);
482 LONG GetParameterValueFromExtProvider(const TCHAR *name, TCHAR *buffer);
483 void ListParametersFromExtProviders(CSCPMessage *msg, UINT32 *baseId, UINT32 *count);
484 void ListParametersFromExtProviders(StringList *list);
485
486 bool AddExternalSubagent(const TCHAR *config);
487 UINT32 GetParameterValueFromExtSubagent(const TCHAR *name, TCHAR *buffer);
488 UINT32 GetTableValueFromExtSubagent(const TCHAR *name, Table *value);
489 UINT32 GetListValueFromExtSubagent(const TCHAR *name, StringList *value);
490 void ListParametersFromExtSubagents(CSCPMessage *msg, UINT32 *baseId, UINT32 *count);
491 void ListParametersFromExtSubagents(StringList *list);
492 void ListListsFromExtSubagents(CSCPMessage *msg, UINT32 *baseId, UINT32 *count);
493 void ListListsFromExtSubagents(StringList *list);
494 void ListTablesFromExtSubagents(CSCPMessage *msg, UINT32 *baseId, UINT32 *count);
495 void ListTablesFromExtSubagents(StringList *list);
496 CSCPMessage *ReadMessageFromPipe(HPIPE hPipe, HANDLE hEvent);
497 bool SendMessageToPipe(HPIPE hPipe, CSCP_MESSAGE *msg);
498 bool SendMessageToMasterAgent(CSCPMessage *msg);
499 bool SendRawMessageToMasterAgent(CSCP_MESSAGE *msg);
500 void ShutdownExtSubagents();
501
502 void RegisterApplicationAgent(const TCHAR *name);
503 UINT32 GetParameterValueFromAppAgent(const TCHAR *name, TCHAR *buffer);
504
505 BOOL WaitForProcess(const TCHAR *name);
506
507 UINT32 UpgradeAgent(TCHAR *pszPkgFile);
508
509 void SendTrap(UINT32 dwEventCode, const TCHAR *eventName, int iNumArgs, TCHAR **ppArgList);
510 void SendTrap(UINT32 dwEventCode, const TCHAR *eventName, const char *pszFormat, ...);
511 void SendTrap(UINT32 dwEventCode, const TCHAR *eventName, const char *pszFormat, va_list args);
512 void ForwardTrap(CSCPMessage *msg);
513
514 Config *OpenRegistry();
515 void CloseRegistry(bool modified);
516
517 void StartPushConnector();
518 bool PushData(const TCHAR *parameter, const TCHAR *value, UINT32 objectId);
519
520 void StartStorageDiscoveryConnector();
521
522 void StartControlConnector();
523 bool SendControlMessage(CSCPMessage *msg);
524
525 void StartSessionAgentConnector();
526 SessionAgentConnector *AcquireSessionAgentConnector(const TCHAR *sessionName);
527
528 #ifdef _WIN32
529
530 void InitService();
531 void InstallService(TCHAR *execName, TCHAR *confFile);
532 void RemoveService();
533 void StartAgentService();
534 void StopAgentService();
535 bool WaitForService(DWORD dwDesiredState);
536 void InstallEventSource(const TCHAR *path);
537 void RemoveEventSource();
538
539 TCHAR *GetPdhErrorText(UINT32 dwError, TCHAR *pszBuffer, int iBufSize);
540
541 #endif
542
543
544 //
545 // Global variables
546 //
547
548 extern UINT32 g_dwFlags;
549 extern TCHAR g_szLogFile[];
550 extern TCHAR g_szSharedSecret[];
551 extern TCHAR g_szConfigFile[];
552 extern TCHAR g_szFileStore[];
553 extern TCHAR g_szConfigServer[];
554 extern TCHAR g_szRegistrar[];
555 extern TCHAR g_szListenAddress[];
556 extern TCHAR g_szConfigIncludeDir[];
557 extern TCHAR g_masterAgent[];
558 extern UINT16 g_wListenPort;
559 extern ObjectArray<ServerInfo> g_serverList;
560 extern UINT32 g_dwServerCount;
561 extern time_t g_tmAgentStartTime;
562 extern TCHAR g_szPlatformSuffix[];
563 extern UINT32 g_dwStartupDelay;
564 extern UINT32 g_dwIdleTimeout;
565 extern UINT32 g_dwMaxSessions;
566 extern UINT32 g_dwExecTimeout;
567 extern UINT32 g_dwSNMPTimeout;
568 extern UINT32 g_debugLevel;
569 extern UINT16 g_sessionAgentPort;
570
571 extern Config *g_config;
572
573 extern UINT32 g_dwAcceptErrors;
574 extern UINT32 g_dwAcceptedConnections;
575 extern UINT32 g_dwRejectedConnections;
576
577 extern CommSession **g_pSessionList;
578 extern MUTEX g_hSessionListAccess;
579
580 #ifdef _WIN32
581 extern TCHAR g_windowsEventSourceName[];
582 #endif /* _WIN32 */
583
584 #endif /* _nxagentd_h_ */