agent: added options to disable IPv4 or IPv6
[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 #define AF_DISABLE_IPV4 0x00080000
135 #define AF_DISABLE_IPV6 0x00100000
136
137
138 #ifdef _WIN32
139
140 //
141 // Request types for H_MemoryInfo
142 //
143
144 #define MEMINFO_PHYSICAL_FREE 1
145 #define MEMINFO_PHYSICAL_FREE_PCT 2
146 #define MEMINFO_PHYSICAL_TOTAL 3
147 #define MEMINFO_PHYSICAL_USED 4
148 #define MEMINFO_PHYSICAL_USED_PCT 5
149 #define MEMINFO_VIRTUAL_FREE 6
150 #define MEMINFO_VIRTUAL_FREE_PCT 7
151 #define MEMINFO_VIRTUAL_TOTAL 8
152 #define MEMINFO_VIRTUAL_USED 9
153 #define MEMINFO_VIRTUAL_USED_PCT 10
154
155
156 //
157 // Request types for H_DiskInfo
158 //
159
160 #define DISKINFO_FREE_BYTES 1
161 #define DISKINFO_USED_BYTES 2
162 #define DISKINFO_TOTAL_BYTES 3
163 #define DISKINFO_FREE_SPACE_PCT 4
164 #define DISKINFO_USED_SPACE_PCT 5
165
166 #endif /* _WIN32 */
167
168
169 //
170 // Request types for H_DirInfo
171 //
172
173 #define DIRINFO_FILE_COUNT 1
174 #define DIRINFO_FILE_SIZE 2
175
176
177 //
178 // Request types for H_FileTime
179 //
180
181 #define FILETIME_ATIME 1
182 #define FILETIME_MTIME 2
183 #define FILETIME_CTIME 3
184
185
186 //
187 // Action types
188 //
189
190 #define AGENT_ACTION_EXEC 1
191 #define AGENT_ACTION_SUBAGENT 2
192 #define AGENT_ACTION_SHELLEXEC 3
193
194 /**
195 * Pipe handle
196 */
197 #ifdef _WIN32
198 #define HPIPE HANDLE
199 #define INVALID_PIPE_HANDLE INVALID_HANDLE_VALUE
200 #else
201 #define HPIPE int
202 #define INVALID_PIPE_HANDLE (-1)
203 #endif
204
205 /**
206 * Action definition structure
207 */
208 typedef struct
209 {
210 TCHAR szName[MAX_PARAM_NAME];
211 int iType;
212 union
213 {
214 TCHAR *pszCmdLine; // to TCHAR
215 struct __subagentAction
216 {
217 LONG (*fpHandler)(const TCHAR *, StringList *, const TCHAR *);
218 const TCHAR *pArg;
219 TCHAR szSubagentName[MAX_PATH];
220 } sa;
221 } handler;
222 TCHAR szDescription[MAX_DB_STRING];
223 } ACTION;
224
225 /**
226 * Loaded subagent information
227 */
228 struct SUBAGENT
229 {
230 HMODULE hModule; // Subagent's module handle
231 NETXMS_SUBAGENT_INFO *pInfo; // Information provided by subagent
232 TCHAR szName[MAX_PATH]; // Name of the module // to TCHAR by LWX
233 #ifdef _NETWARE
234 char szEntryPoint[256]; // Name of agent's entry point
235 #endif
236 };
237
238 /**
239 * External subagent information
240 */
241 class ExternalSubagent
242 {
243 private:
244 TCHAR m_name[MAX_SUBAGENT_NAME];
245 TCHAR m_user[MAX_ESA_USER_NAME];
246 HPIPE m_pipe;
247 #ifdef _WIN32
248 HANDLE m_readEvent;
249 #endif
250 bool m_connected;
251 MsgWaitQueue *m_msgQueue;
252 UINT32 m_requestId;
253 MUTEX m_mutexPipeWrite;
254
255 bool sendMessage(CSCPMessage *msg);
256 CSCPMessage *waitForMessage(WORD code, UINT32 id);
257 UINT32 waitForRCC(UINT32 id);
258 NETXMS_SUBAGENT_PARAM *getSupportedParameters(UINT32 *count);
259 NETXMS_SUBAGENT_LIST *getSupportedLists(UINT32 *count);
260 NETXMS_SUBAGENT_TABLE *getSupportedTables(UINT32 *count);
261
262 public:
263 ExternalSubagent(const TCHAR *name, const TCHAR *user);
264 ~ExternalSubagent();
265
266 void connect(HPIPE hPipe);
267
268 bool isConnected() { return m_connected; }
269 const TCHAR *getName() { return m_name; }
270 const TCHAR *getUserName() { return m_user; }
271
272 UINT32 getParameter(const TCHAR *name, TCHAR *buffer);
273 UINT32 getTable(const TCHAR *name, Table *value);
274 UINT32 getList(const TCHAR *name, StringList *value);
275 void listParameters(CSCPMessage *msg, UINT32 *baseId, UINT32 *count);
276 void listParameters(StringList *list);
277 void listLists(CSCPMessage *msg, UINT32 *baseId, UINT32 *count);
278 void listLists(StringList *list);
279 void listTables(CSCPMessage *msg, UINT32 *baseId, UINT32 *count);
280 void listTables(StringList *list);
281 void shutdown();
282 };
283
284 /**
285 * Server information
286 */
287 class ServerInfo
288 {
289 private:
290 char *m_name;
291 InetAddress m_address;
292 bool m_control;
293 bool m_master;
294 time_t m_lastResolveTime;
295 bool m_redoResolve;
296 MUTEX m_mutex;
297
298 void resolve();
299
300 public:
301 ServerInfo(const TCHAR *name, bool control, bool master);
302 ~ServerInfo();
303
304 bool match(const InetAddress &addr);
305
306 bool isMaster() { return m_master; }
307 bool isControl() { return m_control; }
308 };
309
310 /**
311 * Communication session
312 */
313 class CommSession : public AbstractCommSession
314 {
315 private:
316 SOCKET m_hSocket;
317 Queue *m_pSendQueue;
318 Queue *m_pMessageQueue;
319 CSCP_BUFFER *m_pMsgBuffer;
320 THREAD m_hWriteThread;
321 THREAD m_hProcessingThread;
322 THREAD m_hProxyReadThread;
323 InetAddress m_serverAddr; // IP address of connected host
324 UINT32 m_dwIndex;
325 bool m_authenticated;
326 bool m_masterServer;
327 bool m_controlServer;
328 bool m_proxyConnection;
329 bool m_acceptTraps;
330 int m_hCurrFile;
331 UINT32 m_dwFileRqId;
332 NXCPEncryptionContext *m_pCtx;
333 time_t m_ts; // Last activity timestamp
334 SOCKET m_hProxySocket; // Socket for proxy connection
335 MUTEX m_socketWriteMutex;
336
337 BOOL sendRawMessage(CSCP_MESSAGE *pMsg, NXCPEncryptionContext *pCtx);
338 void authenticate(CSCPMessage *pRequest, CSCPMessage *pMsg);
339 void getConfig(CSCPMessage *pMsg);
340 void updateConfig(CSCPMessage *pRequest, CSCPMessage *pMsg);
341 void getParameter(CSCPMessage *pRequest, CSCPMessage *pMsg);
342 void getList(CSCPMessage *pRequest, CSCPMessage *pMsg);
343 void getTable(CSCPMessage *pRequest, CSCPMessage *pMsg);
344 void action(CSCPMessage *pRequest, CSCPMessage *pMsg);
345 void recvFile(CSCPMessage *pRequest, CSCPMessage *pMsg);
346 void getLocalFile(CSCPMessage *pRequest, CSCPMessage *pMsg);
347 void cancelFileMonitoring(CSCPMessage *pRequest, CSCPMessage *pMsg);
348 UINT32 upgrade(CSCPMessage *pRequest);
349 UINT32 setupProxyConnection(CSCPMessage *pRequest);
350
351 void readThread();
352 void writeThread();
353 void processingThread();
354 void proxyReadThread();
355
356 static THREAD_RESULT THREAD_CALL readThreadStarter(void *);
357 static THREAD_RESULT THREAD_CALL writeThreadStarter(void *);
358 static THREAD_RESULT THREAD_CALL processingThreadStarter(void *);
359 static THREAD_RESULT THREAD_CALL proxyReadThreadStarter(void *);
360
361 public:
362 CommSession(SOCKET hSocket, const InetAddress &serverAddr, bool masterServer, bool controlServer);
363 ~CommSession();
364
365 void run();
366 void disconnect();
367
368 virtual void sendMessage(CSCPMessage *pMsg) { m_pSendQueue->Put(pMsg->createMessage()); }
369 virtual void sendRawMessage(CSCP_MESSAGE *pMsg) { m_pSendQueue->Put(nx_memdup(pMsg, ntohl(pMsg->dwSize))); }
370 virtual bool sendFile(UINT32 requestId, const TCHAR *file, long offset);
371
372 virtual const InetAddress& getServerAddress() { return m_serverAddr; }
373
374 UINT32 getIndex() { return m_dwIndex; }
375 void setIndex(UINT32 dwIndex) { if (m_dwIndex == INVALID_INDEX) m_dwIndex = dwIndex; }
376
377 time_t getTimeStamp() { return m_ts; }
378 void updateTimeStamp() { m_ts = time(NULL); }
379
380 bool canAcceptTraps() { return m_acceptTraps; }
381
382 virtual bool isMasterServer() { return m_masterServer; }
383 virtual bool isControlServer() { return m_controlServer; }
384
385 virtual UINT32 openFile(TCHAR* nameOfFile, UINT32 requestId);
386 };
387
388 /**
389 * Session agent connector
390 */
391 class SessionAgentConnector : public RefCountObject
392 {
393 private:
394 UINT32 m_id;
395 SOCKET m_socket;
396 MUTEX m_mutex;
397 CSCP_BUFFER m_msgBuffer;
398 MsgWaitQueue m_msgQueue;
399 UINT32 m_sessionId;
400 TCHAR *m_sessionName;
401 INT16 m_sessionState;
402 TCHAR *m_userName;
403 VolatileCounter m_requestId;
404
405 void readThread();
406 bool sendMessage(CSCPMessage *msg);
407 UINT32 nextRequestId() { return InterlockedIncrement(&m_requestId); }
408
409 static THREAD_RESULT THREAD_CALL readThreadStarter(void *);
410
411 public:
412 SessionAgentConnector(UINT32 id, SOCKET s);
413 ~SessionAgentConnector();
414
415 void run();
416 void disconnect();
417
418 UINT32 getId() { return m_id; }
419 UINT32 getSessionId() { return m_sessionId; }
420 INT16 getSessionState() { return m_sessionState; }
421 const TCHAR *getSessionName() { return CHECK_NULL(m_sessionName); }
422 const TCHAR *getUserName() { return CHECK_NULL(m_userName); }
423
424 bool testConnection();
425 void takeScreenshot(CSCPMessage *msg);
426 };
427
428 /**
429 * Functions
430 */
431 BOOL Initialize();
432 void Shutdown();
433 void Main();
434
435 void ConsolePrintf(const TCHAR *pszFormat, ...)
436 #if !defined(UNICODE) && (defined(__GNUC__) || defined(__clang__))
437 __attribute__ ((format(printf, 1, 2)))
438 #endif
439 ;
440
441 void DebugPrintf(UINT32 dwSessionId, int level, const TCHAR *pszFormat, ...)
442 #if !defined(UNICODE) && (defined(__GNUC__) || defined(__clang__))
443 __attribute__ ((format(printf, 3, 4)))
444 #endif
445 ;
446
447 void DebugPrintfCallback(int level, const TCHAR *pszFormat, va_list args);
448
449 void BuildFullPath(TCHAR *pszFileName, TCHAR *pszFullPath);
450
451 BOOL DownloadConfig(TCHAR *pszServer);
452
453 BOOL InitParameterList();
454
455 void AddParameter(const TCHAR *szName, LONG (* fpHandler)(const TCHAR *, const TCHAR *, TCHAR *), const TCHAR *pArg,
456 int iDataType, const TCHAR *pszDescription);
457 void AddPushParameter(const TCHAR *name, int dataType, const TCHAR *description);
458 void AddList(const TCHAR *name, LONG (* handler)(const TCHAR *, const TCHAR *, StringList *), const TCHAR *arg);
459 void AddTable(const TCHAR *name, LONG (* handler)(const TCHAR *, const TCHAR *, Table *), const TCHAR *arg, const TCHAR *instanceColumns, const TCHAR *description);
460 BOOL AddExternalParameter(TCHAR *pszCfgLine, BOOL bShellExec, BOOL bIsList);
461 UINT32 GetParameterValue(UINT32 dwSessionId, TCHAR *pszParam, TCHAR *pszValue);
462 UINT32 GetListValue(UINT32 dwSessionId, TCHAR *pszParam, StringList *pValue);
463 UINT32 GetTableValue(UINT32 dwSessionId, TCHAR *pszParam, Table *pValue);
464 void GetParameterList(CSCPMessage *pMsg);
465 void GetEnumList(CSCPMessage *pMsg);
466 void GetTableList(CSCPMessage *pMsg);
467 BOOL LoadSubAgent(TCHAR *szModuleName);
468 void UnloadAllSubAgents();
469 BOOL InitSubAgent(HMODULE hModule, const TCHAR *pszModuleName,
470 BOOL (* SubAgentInit)(NETXMS_SUBAGENT_INFO **, Config *),
471 const TCHAR *pszEntryPoint);
472 BOOL ProcessCmdBySubAgent(UINT32 dwCommand, CSCPMessage *pRequest, CSCPMessage *pResponse, AbstractCommSession *session);
473 BOOL AddAction(const TCHAR *pszName, int iType, const TCHAR *pArg,
474 LONG (*fpHandler)(const TCHAR *, StringList *, const TCHAR *),
475 const TCHAR *pszSubAgent, const TCHAR *pszDescription);
476 BOOL AddActionFromConfig(TCHAR *pszLine, BOOL bShellExec);
477 UINT32 ExecAction(const TCHAR *action, StringList *args);
478 UINT32 ExecActionWithOutput(CommSession *session, UINT32 requestId, const TCHAR *action, StringList *args);
479 UINT32 ExecuteCommand(TCHAR *pszCommand, StringList *pArgs, pid_t *pid);
480 UINT32 ExecuteShellCommand(TCHAR *pszCommand, StringList *pArgs);
481
482 void StartParamProvidersPoller();
483 bool AddParametersProvider(const TCHAR *line);
484 LONG GetParameterValueFromExtProvider(const TCHAR *name, TCHAR *buffer);
485 void ListParametersFromExtProviders(CSCPMessage *msg, UINT32 *baseId, UINT32 *count);
486 void ListParametersFromExtProviders(StringList *list);
487
488 bool AddExternalSubagent(const TCHAR *config);
489 UINT32 GetParameterValueFromExtSubagent(const TCHAR *name, TCHAR *buffer);
490 UINT32 GetTableValueFromExtSubagent(const TCHAR *name, Table *value);
491 UINT32 GetListValueFromExtSubagent(const TCHAR *name, StringList *value);
492 void ListParametersFromExtSubagents(CSCPMessage *msg, UINT32 *baseId, UINT32 *count);
493 void ListParametersFromExtSubagents(StringList *list);
494 void ListListsFromExtSubagents(CSCPMessage *msg, UINT32 *baseId, UINT32 *count);
495 void ListListsFromExtSubagents(StringList *list);
496 void ListTablesFromExtSubagents(CSCPMessage *msg, UINT32 *baseId, UINT32 *count);
497 void ListTablesFromExtSubagents(StringList *list);
498 CSCPMessage *ReadMessageFromPipe(HPIPE hPipe, HANDLE hEvent);
499 bool SendMessageToPipe(HPIPE hPipe, CSCP_MESSAGE *msg);
500 bool SendMessageToMasterAgent(CSCPMessage *msg);
501 bool SendRawMessageToMasterAgent(CSCP_MESSAGE *msg);
502 void ShutdownExtSubagents();
503
504 void RegisterApplicationAgent(const TCHAR *name);
505 UINT32 GetParameterValueFromAppAgent(const TCHAR *name, TCHAR *buffer);
506
507 BOOL WaitForProcess(const TCHAR *name);
508
509 UINT32 UpgradeAgent(TCHAR *pszPkgFile);
510
511 void SendTrap(UINT32 dwEventCode, const TCHAR *eventName, int iNumArgs, TCHAR **ppArgList);
512 void SendTrap(UINT32 dwEventCode, const TCHAR *eventName, const char *pszFormat, ...);
513 void SendTrap(UINT32 dwEventCode, const TCHAR *eventName, const char *pszFormat, va_list args);
514 void ForwardTrap(CSCPMessage *msg);
515
516 Config *OpenRegistry();
517 void CloseRegistry(bool modified);
518
519 void StartPushConnector();
520 bool PushData(const TCHAR *parameter, const TCHAR *value, UINT32 objectId);
521
522 void StartStorageDiscoveryConnector();
523
524 void StartControlConnector();
525 bool SendControlMessage(CSCPMessage *msg);
526
527 void StartSessionAgentConnector();
528 SessionAgentConnector *AcquireSessionAgentConnector(const TCHAR *sessionName);
529
530 #ifdef _WIN32
531
532 void InitService();
533 void InstallService(TCHAR *execName, TCHAR *confFile);
534 void RemoveService();
535 void StartAgentService();
536 void StopAgentService();
537 bool WaitForService(DWORD dwDesiredState);
538 void InstallEventSource(const TCHAR *path);
539 void RemoveEventSource();
540
541 TCHAR *GetPdhErrorText(UINT32 dwError, TCHAR *pszBuffer, int iBufSize);
542
543 #endif
544
545
546 //
547 // Global variables
548 //
549
550 extern UINT32 g_dwFlags;
551 extern TCHAR g_szLogFile[];
552 extern TCHAR g_szSharedSecret[];
553 extern TCHAR g_szConfigFile[];
554 extern TCHAR g_szFileStore[];
555 extern TCHAR g_szConfigServer[];
556 extern TCHAR g_szRegistrar[];
557 extern TCHAR g_szListenAddress[];
558 extern TCHAR g_szConfigIncludeDir[];
559 extern TCHAR g_masterAgent[];
560 extern UINT16 g_wListenPort;
561 extern ObjectArray<ServerInfo> g_serverList;
562 extern UINT32 g_dwServerCount;
563 extern time_t g_tmAgentStartTime;
564 extern TCHAR g_szPlatformSuffix[];
565 extern UINT32 g_dwStartupDelay;
566 extern UINT32 g_dwIdleTimeout;
567 extern UINT32 g_dwMaxSessions;
568 extern UINT32 g_dwExecTimeout;
569 extern UINT32 g_dwSNMPTimeout;
570 extern UINT32 g_debugLevel;
571 extern UINT16 g_sessionAgentPort;
572
573 extern Config *g_config;
574
575 extern UINT32 g_dwAcceptErrors;
576 extern UINT32 g_dwAcceptedConnections;
577 extern UINT32 g_dwRejectedConnections;
578
579 extern CommSession **g_pSessionList;
580 extern MUTEX g_hSessionListAccess;
581
582 #ifdef _WIN32
583 extern TCHAR g_windowsEventSourceName[];
584 #endif /* _WIN32 */
585
586 #endif /* _nxagentd_h_ */