geolocation stuff slightly improved
[public/netxms.git] / src / server / include / nxsrvapi.h
CommitLineData
5039dede
AK
1/*
2** NetXMS - Network Management System
3** Server Library
619e5c9b 4** Copyright (C) 2003-2011 Victor Kirhenshtein
5039dede
AK
5**
6** This program is free software; you can redistribute it and/or modify
0702ed69
VK
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
5039dede
AK
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**
0702ed69 16** You should have received a copy of the GNU Lesser General Public License
5039dede
AK
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: nxsrvapi.h
21**
22**/
23
24#ifndef _nxsrvapi_h_
25#define _nxsrvapi_h_
26
27#ifdef _WIN32
28#ifdef LIBNXSRV_EXPORTS
29#define LIBNXSRV_EXPORTABLE __declspec(dllexport)
30#else
31#define LIBNXSRV_EXPORTABLE __declspec(dllimport)
32#endif
33#else /* _WIN32 */
34#define LIBNXSRV_EXPORTABLE
35#endif
36
37#ifndef LIBNXCL_NO_DECLARATIONS
38#define LIBNXCL_NO_DECLARATIONS 1
39#endif
40#include <nxclapi.h>
41#include <nxcpapi.h>
42#include <nms_agent.h>
944016d6 43#include "../libnxsrv/messages.h"
5039dede
AK
44#include <nxsnmp.h>
45#include <netxms_isc.h>
46
47
48//
49// Default files
50//
51
52#ifdef _WIN32
53
9796ce45
VK
54#define DEFAULT_CONFIG_FILE _T("C:\\netxmsd.conf")
55
56#define DEFAULT_SHELL _T("cmd.exe")
57#define DEFAULT_LOG_FILE _T("C:\\NetXMS.log")
58#define DEFAULT_DATA_DIR _T("C:\\NetXMS\\var")
59#define DEFAULT_LIBDIR _T("C:\\NetXMS\\lib")
60#define DEFAULT_DUMP_DIR _T("C:\\")
61
62#define LDIR_NDD _T("\\ndd")
63
64#define DDIR_MIBS _T("\\mibs")
65#define DDIR_PACKAGES _T("\\packages")
66#define DDIR_BACKGROUNDS _T("\\backgrounds")
67#define DDIR_SHARED_FILES _T("\\shared")
68#define DFILE_KEYS _T("\\server_key")
69#define DFILE_COMPILED_MIB _T("\\mibs\\netxms.mib")
70#define DDIR_IMAGES _T("\\images")
71#define DDIR_FILES _T("\\files")
5039dede
AK
72
73#else /* _WIN32 */
74
9796ce45 75#define DEFAULT_CONFIG_FILE _T("{search}")
5039dede 76
9796ce45 77#define DEFAULT_SHELL _T("/bin/sh")
5039dede 78
9796ce45
VK
79#ifndef DATADIR
80#define DATADIR _T("/var/netxms")
81#endif
5039dede 82
9796ce45
VK
83#ifndef LIBDIR
84#define LIBDIR _T("/usr/lib")
85#endif
5039dede 86
644f97f5
VK
87#ifndef PKGLIBDIR
88#define PKGLIBDIR _T("/usr/lib/netxms")
89#endif
90
9796ce45
VK
91#define DEFAULT_LOG_FILE DATADIR _T("/log/netxmsd.log")
92#define DEFAULT_DATA_DIR DATADIR
644f97f5 93#define DEFAULT_LIBDIR PKGLIBDIR
9796ce45
VK
94#define DEFAULT_DUMP_DIR _T("/")
95
96#define LDIR_NDD _T("/ndd")
97
98#define DDIR_MIBS _T("/mibs")
99#define DDIR_PACKAGES _T("/packages")
100#define DDIR_BACKGROUNDS _T("/backgrounds")
101#define DDIR_SHARED_FILES _T("/shared")
102#define DFILE_KEYS _T("/.server_key")
103#define DFILE_COMPILED_MIB _T("/mibs/netxms.mib")
104#define DDIR_IMAGES _T("/images")
105#define DDIR_FILES _T("/files")
5039dede
AK
106
107#endif /* _WIN32 */
108
109
110//
111// Application flags
112//
113
114#define AF_DAEMON 0x00000001
115#define AF_USE_SYSLOG 0x00000002
116#define AF_ENABLE_NETWORK_DISCOVERY 0x00000004
117#define AF_ACTIVE_NETWORK_DISCOVERY 0x00000008
118#define AF_LOG_SQL_ERRORS 0x00000010
119#define AF_DELETE_EMPTY_SUBNETS 0x00000020
120#define AF_ENABLE_SNMP_TRAPD 0x00000040
121#define AF_ENABLE_ZONING 0x00000080
122#define AF_SYNC_NODE_NAMES_WITH_DNS 0x00000100
123#define AF_CHECK_TRUSTED_NODES 0x00000200
cbc777ee 124#define AF_WRITE_FULL_DUMP 0x00080000
5039dede
AK
125#define AF_RESOLVE_NODE_NAMES 0x00100000
126#define AF_CATCH_EXCEPTIONS 0x00200000
127#define AF_INTERNAL_CA 0x00400000
128#define AF_DB_LOCKED 0x01000000
129#define AF_ENABLE_MULTIPLE_DB_CONN 0x02000000
130#define AF_DB_CONNECTION_LOST 0x04000000
131#define AF_NO_NETWORK_CONNECTIVITY 0x08000000
132#define AF_EVENT_STORM_DETECTED 0x08000000
133#define AF_SERVER_INITIALIZED 0x40000000
134#define AF_SHUTDOWN 0x80000000
135
136#define IsStandalone() (!(g_dwFlags & AF_DAEMON))
137#define ShutdownInProgress() (g_dwFlags & AF_SHUTDOWN)
138
139
140//
141// Encryption usage policies
142//
143
144#define ENCRYPTION_DISABLED 0
145#define ENCRYPTION_ALLOWED 1
146#define ENCRYPTION_PREFERRED 2
147#define ENCRYPTION_REQUIRED 3
148
149
5ad2167d
VK
150//
151// Flags for SnmpGet
152//
153
154#define SG_VERBOSE 0x0001
155#define SG_STRING_RESULT 0x0002
156#define SG_RAW_RESULT 0x0004
157#define SG_HSTRING_RESULT 0x0008
158
159
5039dede
AK
160//
161// Win32 service and syslog constants
162//
163
164#ifdef _WIN32
165
166#define CORE_SERVICE_NAME _T("NetXMSCore")
167#define CORE_EVENT_SOURCE _T("NetXMSCore")
168#define NETXMSD_SYSLOG_NAME CORE_EVENT_SOURCE
169
170#else
171
172#define NETXMSD_SYSLOG_NAME _T("netxmsd")
173
174#endif /* _WIN32 */
175
176
177//
178// Single ARP cache entry
179//
180
181typedef struct
182{
183 DWORD dwIndex; // Interface index
184 DWORD dwIpAddr;
185 BYTE bMacAddr[MAC_ADDR_LENGTH];
186} ARP_ENTRY;
187
188
189//
190// ARP cache structure used by discovery functions and AgentConnection class
191//
192
193typedef struct
194{
195 DWORD dwNumEntries;
196 ARP_ENTRY *pEntries;
197} ARP_CACHE;
198
199
200//
201// Interface information structure used by discovery functions and AgentConnection class
202//
203
204typedef struct
205{
478d4ff4
VK
206 TCHAR szName[MAX_DB_STRING]; // Interface display name
207 TCHAR szDescription[MAX_DB_STRING]; // Value of ifDescr MIB variable for SNMP agents
5039dede
AK
208 DWORD dwIndex;
209 DWORD dwType;
eec253a8
VK
210 DWORD dwBridgePortNumber;
211 DWORD dwSlotNumber;
212 DWORD dwPortNumber;
5039dede
AK
213 DWORD dwIpAddr;
214 DWORD dwIpNetMask;
215 BYTE bMacAddr[MAC_ADDR_LENGTH];
216 int iNumSecondary; // Number of secondary IP's on this interface
4c16cdc7 217 bool isPhysicalPort;
36e44abe 218} NX_INTERFACE_INFO;
5039dede
AK
219
220
221//
222// Interface list used by discovery functions and AgentConnection class
223//
224
98762401 225class LIBNXSRV_EXPORTABLE InterfaceList
5039dede 226{
98762401
VK
227private:
228 int m_size; // Number of valid entries
229 int m_allocated; // Number of allocated entries
230 void *m_data; // Can be used by custom enumeration handlers
36e44abe 231 NX_INTERFACE_INFO *m_interfaces; // Interface entries
98762401
VK
232
233public:
234 InterfaceList(int initialAlloc = 8);
235 ~InterfaceList();
236
36e44abe 237 void add(NX_INTERFACE_INFO *iface);
98762401
VK
238 void remove(int index);
239 void removeLoopbacks();
240
241 int getSize() { return m_size; }
36e44abe 242 NX_INTERFACE_INFO *get(int index) { return ((index >= 0) && (index < m_size)) ? &m_interfaces[index] : NULL; }
98762401
VK
243
244 void setData(void *data) { m_data = data; }
245 void *getData() { return m_data; }
246};
5039dede
AK
247
248
77c7801c
VK
249//
250// Vlan information
251//
252
253class LIBNXSRV_EXPORTABLE VlanInfo
254{
255private:
256 int m_vlanId;
257 TCHAR *m_name;
258 int m_allocated;
259 int m_numPorts; // Number of ports in VLAN
260 DWORD *m_ports; // member ports (slot/port pairs)
261
262public:
263 VlanInfo(int vlanId);
264 ~VlanInfo();
265
266 int getVlanId() { return m_vlanId; }
267 const TCHAR *getName() { return CHECK_NULL_EX(m_name); }
268 int getNumPorts() { return m_numPorts; }
269 DWORD *getPorts() { return m_ports; }
270
271 void add(DWORD slot, DWORD port);
272 void setName(const TCHAR *name);
273};
274
275
276//
277// Vlan list
278//
279
7f632dfe 280class LIBNXSRV_EXPORTABLE VlanList : public RefCountObject
77c7801c
VK
281{
282private:
283 int m_size; // Number of valid entries
284 int m_allocated; // Number of allocated entries
285 void *m_data; // Can be used by custom enumeration handlers
286 VlanInfo **m_vlans; // VLAN entries
287
288public:
289 VlanList(int initialAlloc = 8);
7f632dfe 290 virtual ~VlanList();
77c7801c
VK
291
292 void add(VlanInfo *vlan);
293
294 int getSize() { return m_size; }
295 VlanInfo *get(int index) { return ((index >= 0) && (index < m_size)) ? m_vlans[index] : NULL; }
296
297 void setData(void *data) { m_data = data; }
298 void *getData() { return m_data; }
7f632dfe
VK
299
300 void fillMessage(CSCPMessage *msg);
77c7801c
VK
301};
302
303
5039dede
AK
304//
305// Route information
306//
307
308typedef struct
309{
310 DWORD dwDestAddr;
311 DWORD dwDestMask;
312 DWORD dwNextHop;
313 DWORD dwIfIndex;
314 DWORD dwRouteType;
315} ROUTE;
316
317
318//
319// Routing table
320//
321
322typedef struct
323{
324 int iNumEntries; // Number of entries
325 ROUTE *pRoutes; // Route list
326} ROUTING_TABLE;
327
328
1f385e47
VK
329//
330// Information about policies installed on agent
331//
332
333class LIBNXSRV_EXPORTABLE AgentPolicyInfo
334{
335private:
336 int m_size;
337 BYTE *m_guidList;
338 int *m_typeList;
339 TCHAR **m_serverList;
340
341public:
342 AgentPolicyInfo(CSCPMessage *msg);
343 ~AgentPolicyInfo();
344
345 int getSize() { return m_size; }
346 bool getGuid(int index, uuid_t guid);
347 int getType(int index) { return ((index >= 0) && (index < m_size)) ? m_typeList[index] : -1; }
348 const TCHAR *getServer(int index) { return ((index >= 0) && (index < m_size)) ? m_serverList[index] : NULL; }
349};
350
351
5039dede
AK
352//
353// Agent connection
354//
355
356class LIBNXSRV_EXPORTABLE AgentConnection
357{
358private:
359 DWORD m_dwAddr;
360 int m_nProtocolVersion;
361 int m_iAuthMethod;
08b214c6 362 char m_szSecret[MAX_SECRET_LENGTH];
5039dede
AK
363 time_t m_tLastCommandTime;
364 SOCKET m_hSocket;
365 DWORD m_dwNumDataLines;
366 DWORD m_dwRequestId;
367 DWORD m_dwCommandTimeout;
7c521895 368 DWORD m_connectionTimeout;
5039dede
AK
369 DWORD m_dwRecvTimeout;
370 TCHAR **m_ppDataLines;
371 MsgWaitQueue *m_pMsgWaitQueue;
372 BOOL m_bIsConnected;
373 MUTEX m_mutexDataLock;
d3a7cf4c 374 MUTEX m_mutexSocketWrite;
5039dede
AK
375 THREAD m_hReceiverThread;
376 CSCP_ENCRYPTION_CONTEXT *m_pCtx;
377 int m_iEncryptionPolicy;
378 BOOL m_bUseProxy;
379 DWORD m_dwProxyAddr;
380 WORD m_wPort;
381 WORD m_wProxyPort;
382 int m_iProxyAuth;
08b214c6 383 char m_szProxySecret[MAX_SECRET_LENGTH];
5039dede 384 int m_hCurrFile;
9f6d453a 385 TCHAR m_currentFileName[MAX_PATH];
bb85e341
VK
386 DWORD m_dwDownloadRequestId;
387 CONDITION m_condFileDownload;
388 BOOL m_fileDownloadSucceeded;
389 void (*m_downloadProgressCallback)(size_t, void *);
390 void *m_downloadProgressCallbackArg;
901a5a9b 391 bool m_deleteFileOnDownloadFailure;
4685a2ad 392 bool m_fileUploadInProgress;
5039dede
AK
393
394 void ReceiverThread(void);
395 static THREAD_RESULT THREAD_CALL ReceiverThreadStarter(void *);
396
397protected:
7c521895
VK
398 void destroyResultData();
399 BOOL sendMessage(CSCPMessage *pMsg);
400 CSCPMessage *waitForMessage(WORD wCode, DWORD dwId, DWORD dwTimeOut) { return m_pMsgWaitQueue->WaitForMessage(wCode, dwId, dwTimeOut); }
401 DWORD waitForRCC(DWORD dwRqId, DWORD dwTimeOut);
402 DWORD setupEncryption(RSA *pServerKey);
403 DWORD authenticate(BOOL bProxyData);
404 DWORD setupProxyConnection();
405 DWORD getIpAddr() { return ntohl(m_dwAddr); }
406 DWORD prepareFileDownload(const TCHAR *fileName, DWORD rqId, bool append, void (*downloadProgressCallback)(size_t, void *), void *cbArg);
5039dede
AK
407
408 virtual void PrintMsg(const TCHAR *pszFormat, ...);
f480bdd4
VK
409 virtual void onTrap(CSCPMessage *pMsg);
410 virtual void onDataPush(CSCPMessage *msg);
90284364 411 virtual bool processCustomMessage(CSCPMessage *pMsg);
f480bdd4 412 virtual void onFileDownload(BOOL success);
5039dede
AK
413
414 void Lock(void) { MutexLock(m_mutexDataLock, INFINITE); }
415 void Unlock(void) { MutexUnlock(m_mutexDataLock); }
416
417public:
5039dede
AK
418 AgentConnection(DWORD dwAddr, WORD wPort = AGENT_LISTEN_PORT,
419 int iAuthMethod = AUTH_NONE, const TCHAR *pszSecret = NULL);
420 virtual ~AgentConnection();
421
c3acd0f6 422 BOOL connect(RSA *pServerKey = NULL, BOOL bVerbose = FALSE, DWORD *pdwError = NULL, DWORD *pdwSocketError = NULL);
7c521895
VK
423 void disconnect();
424 BOOL isConnected() { return m_bIsConnected; }
425 int getProtocolVersion() { return m_nProtocolVersion; }
5039dede 426
45d84f8a 427 SOCKET getSocket() { return m_hSocket; }
5a9e58a3 428
4687826e 429 ARP_CACHE *getArpCache();
98762401 430 InterfaceList *getInterfaceList();
4687826e
VK
431 ROUTING_TABLE *getRoutingTable();
432 DWORD getParameter(const TCHAR *pszParam, DWORD dwBufSize, TCHAR *pszBuffer);
433 DWORD getList(const TCHAR *pszParam);
434 DWORD getTable(const TCHAR *pszParam, Table **table);
7c521895 435 DWORD nop();
4687826e 436 DWORD execAction(const TCHAR *pszAction, int argc, TCHAR **argv);
619e5c9b 437 DWORD uploadFile(const TCHAR *localFile, const TCHAR *destinationFile = NULL, void (* progressCallback)(INT64, void *) = NULL, void *cbArg = NULL);
4687826e
VK
438 DWORD startUpgrade(const TCHAR *pszPkgName);
439 DWORD checkNetworkService(DWORD *pdwStatus, DWORD dwIpAddr, int iServiceType, WORD wPort = 0,
5039dede 440 WORD wProto = 0, const TCHAR *pszRequest = NULL, const TCHAR *pszResponse = NULL);
4687826e
VK
441 DWORD getSupportedParameters(DWORD *pdwNumParams, NXC_AGENT_PARAM **ppParamList);
442 DWORD getConfigFile(TCHAR **ppszConfig, DWORD *pdwSize);
45d84f8a 443 DWORD updateConfigFile(const TCHAR *pszConfig);
7c521895 444 DWORD enableTraps();
1f385e47
VK
445 DWORD getPolicyInventory(AgentPolicyInfo **info);
446 DWORD uninstallPolicy(uuid_t guid);
e58b5e54
VK
447
448 DWORD generateRequestId() { return m_dwRequestId++; }
45d84f8a 449 CSCPMessage *customRequest(CSCPMessage *pRequest, const TCHAR *recvFile = NULL, bool appendFile = false,
f2665675 450 void (*downloadProgressCallback)(size_t, void *) = NULL, void *cbArg = NULL);
5039dede 451
7c521895
VK
452 DWORD getNumDataLines() { return m_dwNumDataLines; }
453 const TCHAR *getDataLine(DWORD dwIndex) { return dwIndex < m_dwNumDataLines ? m_ppDataLines[dwIndex] : _T("(error)"); }
5039dede 454
7c521895
VK
455 void setConnectionTimeout(DWORD dwTimeout) { m_connectionTimeout = max(dwTimeout, 1000); }
456 DWORD getConnectionTimeout() { return m_connectionTimeout; }
45d84f8a
VK
457 void setCommandTimeout(DWORD dwTimeout) { m_dwCommandTimeout = max(dwTimeout, 500); }
458 DWORD getCommandTimeout() { return m_dwCommandTimeout; }
7c521895
VK
459 void setRecvTimeout(DWORD dwTimeout) { m_dwRecvTimeout = max(dwTimeout, 10000); }
460 void setEncryptionPolicy(int iPolicy) { m_iEncryptionPolicy = iPolicy; }
461 void setProxy(DWORD dwAddr, WORD wPort = AGENT_LISTEN_PORT,
5039dede 462 int iAuthMethod = AUTH_NONE, const TCHAR *pszSecret = NULL);
7c521895 463 void setPort(WORD wPort) { m_wPort = wPort; }
08b214c6 464 void setAuthData(int nMethod, const char *pszSecret) { m_iAuthMethod = nMethod; strncpy(m_szSecret, pszSecret, MAX_SECRET_LENGTH); m_szSecret[MAX_SECRET_LENGTH - 1] = 0; }
901a5a9b 465 void setDeleteFileOnDownloadFailure(bool flag) { m_deleteFileOnDownloadFailure = flag; }
5039dede
AK
466};
467
468
469//
470// Proxy SNMP transport
471//
472
473class LIBNXSRV_EXPORTABLE SNMP_ProxyTransport : public SNMP_Transport
474{
475protected:
476 AgentConnection *m_pAgentConnection;
477 CSCPMessage *m_pResponse;
478 DWORD m_dwIpAddr;
479 WORD m_wPort;
480
481public:
482 SNMP_ProxyTransport(AgentConnection *pConn, DWORD dwIpAddr, WORD wPort);
483 virtual ~SNMP_ProxyTransport();
484
c4366266 485 virtual int readMessage(SNMP_PDU **ppData, DWORD dwTimeout = INFINITE,
cd9f247e
VK
486 struct sockaddr *pSender = NULL, socklen_t *piAddrSize = NULL,
487 SNMP_SecurityContext* (*contextFinder)(struct sockaddr *, socklen_t) = NULL);
c4366266 488 virtual int sendMessage(SNMP_PDU *pdu);
5039dede
AK
489};
490
491
492//
493// ISC flags
494//
495
496#define ISCF_IS_CONNECTED ((DWORD)0x00000001)
497#define ISCF_REQUIRE_ENCRYPTION ((DWORD)0x00000002)
498
499
500//
501// Inter-server connection (ISC)
502//
503
504class LIBNXSRV_EXPORTABLE ISC
505{
506private:
507 DWORD m_flags;
508 DWORD m_addr;
509 WORD m_port;
510 SOCKET m_socket;
511 int m_protocolVersion;
512 DWORD m_requestId;
513 DWORD m_recvTimeout;
514 MsgWaitQueue *m_msgWaitQueue;
515 MUTEX m_mutexDataLock;
7b8b337e 516 MUTEX m_socketLock;
5039dede
AK
517 THREAD m_hReceiverThread;
518 CSCP_ENCRYPTION_CONTEXT *m_ctx;
519 DWORD m_commandTimeout;
520
521 void ReceiverThread(void);
522 static THREAD_RESULT THREAD_CALL ReceiverThreadStarter(void *);
523
524protected:
525 void DestroyResultData(void);
526 DWORD SetupEncryption(RSA *pServerKey);
527 DWORD ConnectToService(DWORD service);
528
529 void Lock(void) { MutexLock(m_mutexDataLock, INFINITE); }
530 void Unlock(void) { MutexUnlock(m_mutexDataLock); }
531
532 virtual void PrintMsg(const TCHAR *format, ...);
533
534public:
535 ISC();
536 ISC(DWORD addr, WORD port = NETXMS_ISC_PORT);
537 virtual ~ISC();
538
539 DWORD Connect(DWORD service, RSA *serverKey = NULL, BOOL requireEncryption = FALSE);
540 void Disconnect();
541
542 BOOL SendMessage(CSCPMessage *msg);
543 CSCPMessage *WaitForMessage(WORD code, DWORD id, DWORD timeOut) { return m_msgWaitQueue->WaitForMessage(code, id, timeOut); }
544 DWORD WaitForRCC(DWORD rqId, DWORD timeOut);
545
546 DWORD Nop(void);
547};
548
549
550//
551// Functions
552//
553
554void LIBNXSRV_EXPORTABLE DestroyArpCache(ARP_CACHE *pArpCache);
5039dede
AK
555void LIBNXSRV_EXPORTABLE DestroyRoutingTable(ROUTING_TABLE *pRT);
556void LIBNXSRV_EXPORTABLE SortRoutingTable(ROUTING_TABLE *pRT);
557const TCHAR LIBNXSRV_EXPORTABLE *AgentErrorCodeToText(int iError);
558
559void LIBNXSRV_EXPORTABLE WriteLogOther(WORD wType, const TCHAR *format, ...);
560void LIBNXSRV_EXPORTABLE DbgPrintf(int level, const TCHAR *format, ...);
9d88cdc9 561void LIBNXSRV_EXPORTABLE DbgPrintf2(int level, const TCHAR *format, va_list args);
c20b2798 562
5039dede
AK
563void LIBNXSRV_EXPORTABLE SetAgentDEP(int iPolicy);
564
565const TCHAR LIBNXSRV_EXPORTABLE *ISCErrorCodeToText(DWORD code);
566
5ad2167d
VK
567DWORD LIBNXSRV_EXPORTABLE SnmpNewRequestId();
568DWORD LIBNXSRV_EXPORTABLE SnmpGet(DWORD dwVersion, SNMP_Transport *pTransport,
569 const TCHAR *szOidStr, const DWORD *oidBinary, DWORD dwOidLen, void *pValue,
570 DWORD dwBufferSize, DWORD dwFlags);
571DWORD LIBNXSRV_EXPORTABLE SnmpEnumerate(DWORD dwVersion, SNMP_Transport *pTransport, const TCHAR *szRootOid,
572 DWORD (* pHandler)(DWORD, SNMP_Variable *, SNMP_Transport *, void *),
573 void *pUserArg, BOOL bVerbose);
574
5039dede
AK
575
576//
577// Variables
578//
579
580extern DWORD LIBNXSRV_EXPORTABLE g_dwFlags;
5ad2167d 581extern DWORD LIBNXSRV_EXPORTABLE g_dwSNMPTimeout;
5039dede 582extern int LIBNXSRV_EXPORTABLE g_nDebugLevel;
5039dede
AK
583
584#endif /* _nxsrvapi_h_ */