[SVN-NetXMS] revision 3288

From: NetXMS.org SVN Server <svn_at_DOMAIN_REMOVED>
Date: Tue, 27 May 2008 00:46:45 +0300

* { font-family: Consolas, Lucida Console, Courier New; font-size: 100%; }
h1 { font-size: 150%; }
td.linenos { background-color: #f0f0f0; padding-right: 10px; }
span.lineno { background-color: #f0f0f0; padding: 0 5px 0 5px; }
pre { line-height: 100%; width: 100%; }
.highlight span { width: 100%; display:-moz-inline-stack; display:inline-block; zoom:1; *display:inline; }
body { background: #ffffff; }
body .c { color: #999988; font-style: italic } /* Comment */
body .err { color: #a61717; background-color: #e3d2d2 } /* Error */
body .k { font-weight: bold } /* Keyword */
body .o { font-weight: bold } /* Operator */
body .cm { color: #999988; font-style: italic } /* Comment.Multiline */
body .cp { color: #999999; font-weight: bold } /* Comment.Preproc */
body .c1 { color: #999988; font-style: italic } /* Comment.Single */
body .cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */
body .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
body .ge { font-style: italic } /* Generic.Emph */
body .gr { color: #aa0000 } /* Generic.Error */
body .gh { color: #999999 } /* Generic.Heading */
body .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
body .go { color: #888888 } /* Generic.Output */
body .gp { color: #555555 } /* Generic.Prompt */
body .gs { font-weight: bold } /* Generic.Strong */
body .gu { color: #aaaaaa } /* Generic.Subheading */
body .gt { color: #aa0000 } /* Generic.Traceback */
body .kc { font-weight: bold } /* Keyword.Constant */
body .kd { font-weight: bold } /* Keyword.Declaration */
body .kp { font-weight: bold } /* Keyword.Pseudo */
body .kr { font-weight: bold } /* Keyword.Reserved */
body .kt { color: #445588; font-weight: bold } /* Keyword.Type */
body .m { color: #009999 } /* Literal.Number */
body .s { color: #bb8844 } /* Literal.String */
body .na { color: #008080 } /* Name.Attribute */
body .nb { color: #999999 } /* Name.Builtin */
body .nc { color: #445588; font-weight: bold } /* Name.Class */
body .no { color: #008080 } /* Name.Constant */
body .ni { color: #800080 } /* Name.Entity */
body .ne { color: #990000; font-weight: bold } /* Name.Exception */
body .nf { color: #990000; font-weight: bold } /* Name.Function */
body .nn { color: #555555 } /* Name.Namespace */
body .nt { color: #000080 } /* Name.Tag */
body .nv { color: #008080 } /* Name.Variable */
body .ow { font-weight: bold } /* Operator.Word */
body .w { color: #bbbbbb } /* Text.Whitespace */
body .mf { color: #009999 } /* Literal.Number.Float */
body .mh { color: #009999 } /* Literal.Number.Hex */
body .mi { color: #009999 } /* Literal.Number.Integer */
body .mo { color: #009999 } /* Literal.Number.Oct */
body .sb { color: #bb8844 } /* Literal.String.Backtick */
body .sc { color: #bb8844 } /* Literal.String.Char */
body .sd { color: #bb8844 } /* Literal.String.Doc */
body .s2 { color: #bb8844 } /* Literal.String.Double */
body .se { color: #bb8844 } /* Literal.String.Escape */
body .sh { color: #bb8844 } /* Literal.String.Heredoc */
body .si { color: #bb8844 } /* Literal.String.Interpol */
body .sx { color: #bb8844 } /* Literal.String.Other */
body .sr { color: #808000 } /* Literal.String.Regex */
body .s1 { color: #bb8844 } /* Literal.String.Single */
body .ss { color: #bb8844 } /* Literal.String.Symbol */
body .bp { color: #999999 } /* Name.Builtin.Pseudo */
body .vc { color: #008080 } /* Name.Variable.Class */
body .vg { color: #008080 } /* Name.Variable.Global */
body .vi { color: #008080 } /* Name.Variable.Instance */
body .il { color: #009999 } /* Literal.Number.Integer.Long */

Info

Revision:3288
Author:victor

Date:2008-05-27 00:46:43 +0300 (Tue, 27 May 2008)

Comment:- Module loading mechanism changed
- Prototype for HP Data Protector integration module added

Changes
U trunk/netxms.dsw
U trunk/src/server/core/config.cpp
U trunk/src/server/core/modules.cpp
U trunk/src/server/core/snmptrap.cpp
U trunk/src/server/include/nxmodule.h
A trunk/src/server/modules/
A trunk/src/server/modules/hpdp/
A trunk/src/server/modules/hpdp/Makefile.am
A trunk/src/server/modules/hpdp/hpdp.cpp
A trunk/src/server/modules/hpdp/hpdp.dsp
A trunk/src/server/modules/hpdp/hpdp.dsw
A trunk/src/server/modules/hpdp/hpdp.h

Diff
Modified: trunk/netxms.dsw
===================================================================
--- trunk/netxms.dsw 2008-05-24 15:44:39 UTC (rev 3287)
+++ trunk/netxms.dsw 2008-05-26 21:46:43 UTC (rev 3288)
@@ -33,6 +33,30 @@
 
 ###############################################################################
 
+Project: &quot;hpdp&quot;=.\src\server\modules\hpdp\hpdp.dsp - Package Owner=&lt;4&gt;
+
+Package=&lt;5&gt;
+{{{
+}}}
+
+Package=&lt;4&gt;
+{{{
+ Begin Project Dependency
+ Project_Dep_Name libnetxms
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name libnxsnmp
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name libnxsrv
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name nxcore
+ End Project Dependency
+}}}
+
+###############################################################################
+
 Project: &quot;libnetxms&quot;=.\src\libnetxms\libnetxms.dsp - Package Owner=&lt;4&gt;
 
 Package=&lt;5&gt;

Modified: trunk/src/server/core/config.cpp
===================================================================
--- trunk/src/server/core/config.cpp 2008-05-24 15:44:39 UTC (rev 3287)
+++ trunk/src/server/core/config.cpp 2008-05-26 21:46:43 UTC (rev 3288)
@@ -29,6 +29,7 @@
 //
 
 extern TCHAR g_szCodePage[];
+extern TCHAR *g_pszModLoadList;
 
 
 //
@@ -50,6 +51,7 @@
    { &quot;ListenAddress&quot;, CT_STRING, 0, 0, MAX_PATH, 0, g_szListenAddress },
    { &quot;LogFailedSQLQueries&quot;, CT_BOOLEAN, 0, 0, AF_LOG_SQL_ERRORS, 0, &amp;g_dwFlags },
    { &quot;LogFile&quot;, CT_STRING, 0, 0, MAX_PATH, 0, g_szLogFile },
+ { &quot;Module&quot;, CT_STRING_LIST, &#39;\n&#39;, 0, 0, 0, &amp;g_pszModLoadList },
    { &quot;&quot;, CT_END_OF_LIST, 0, 0, 0, 0, NULL }
 };
 

Modified: trunk/src/server/core/modules.cpp
===================================================================
--- trunk/src/server/core/modules.cpp 2008-05-24 15:44:39 UTC (rev 3287)
+++ trunk/src/server/core/modules.cpp 2008-05-26 21:46:43 UTC (rev 3288)
@@ -27,6 +27,7 @@
 // List of loaded modules
 //
 
+TCHAR *g_pszModLoadList = NULL;
 DWORD g_dwNumModules = 0;
 NXMODULE *g_pModuleList = NULL;
 
@@ -49,82 +50,72 @@
 
 void LoadNetXMSModules(void)
 {
- // TODO: should be redesigned
-
-/* DB_RESULT hResult;
- DWORD i, dwNumRows, dwFlags;
- TCHAR szBuffer[MAX_DB_STRING];
+ TCHAR szErrorText[256], *curr, *next;
    NXMODULE module;
+ HMODULE hModule;
 
- hResult = DBSelect(g_hCoreDB, _T(&quot;SELECT module_name,exec_name,module_flags FROM modules&quot;));
- if (hResult != NULL)
+ for(curr = g_pszModLoadList; curr != NULL; curr = next)
    {
- dwNumRows = DBGetNumRows(hResult);
- for(i = 0; i &lt; dwNumRows; i++)
+ next = _tcschr(curr, _T(&#39;\n&#39;));
+ if (next != NULL)
+ {
+ *next = 0;
+ next++;
+ }
+ StrStrip(curr);
+ if (*curr == 0)
+ continue;
+
+ memset(&amp;module, 0, sizeof(NXMODULE));
+
+ hModule = DLOpen(curr, szErrorText);
+ if (hModule != NULL)
       {
- memset(&amp;module, 0, sizeof(NXMODULE));
- dwFlags = DBGetFieldULong(hResult, i, 2);
- if (!(dwFlags &amp; MODFLAG_DISABLED))
- {
- char szErrorText[256];
- HMODULE hModule;
+ BOOL (* ModuleInit)(NXMODULE *);
 
- hModule = DLOpen(DBGetField(hResult, i, 1, szBuffer, MAX_DB_STRING), szErrorText);
- if (hModule != NULL)
+ ModuleInit = (BOOL (*)(NXMODULE *))DLGetSymbolAddr(hModule, _T(&quot;NetXMSModuleInit&quot;), szErrorText);
+ if (ModuleInit != NULL)
+ {
+ memset(&amp;module, 0, sizeof(NXMODULE));
+ if (ModuleInit(&amp;module))
             {
- BOOL (* ModuleInit)(NXMODULE *);
-
- ModuleInit = (BOOL (*)(NXMODULE *))DLGetSymbolAddr(hModule, _T(&quot;NetXMSModuleInit&quot;), szErrorText);
- if (ModuleInit != NULL)
+ if (module.dwSize == sizeof(NXMODULE))
                {
- memset(&amp;module, 0, sizeof(NXMODULE));
- if (ModuleInit(&amp;module))
- {
- if (module.dwSize == sizeof(NXMODULE))
- {
- // Add module to module&#39;s list
- g_pModuleList = (NXMODULE *)realloc(g_pModuleList,
- sizeof(NXMODULE) * (g_dwNumModules + 1));
- memcpy(&amp;g_pModuleList[g_dwNumModules], &amp;module, sizeof(NXMODULE));
- g_pModuleList[g_dwNumModules].hModule = hModule;
- g_pModuleList[g_dwNumModules].dwFlags = dwFlags;
- DBGetField(hResult, i, 0, g_pModuleList[g_dwNumModules].szName, MAX_OBJECT_NAME);
+ // Add module to module&#39;s list
+ g_pModuleList = (NXMODULE *)realloc(g_pModuleList,
+ sizeof(NXMODULE) * (g_dwNumModules + 1));
+ memcpy(&amp;g_pModuleList[g_dwNumModules], &amp;module, sizeof(NXMODULE));
+ g_pModuleList[g_dwNumModules].hModule = hModule;
 
- // Start module&#39;s main thread
- ThreadCreate(ModuleThreadStarter, 0, &amp;g_pModuleList[g_dwNumModules]);
+ // Start module&#39;s main thread
+ if (module.pfMain != NULL)
+ ThreadCreate(ModuleThreadStarter, 0, &amp;g_pModuleList[g_dwNumModules]);
 
- WriteLog(MSG_MODULE_LOADED, EVENTLOG_INFORMATION_TYPE,
- &quot;s&quot;, g_pModuleList[g_dwNumModules].szName);
- g_dwNumModules++;
- }
- else
- {
- WriteLog(MSG_MODULE_BAD_MAGIC, EVENTLOG_ERROR_TYPE,
- _T(&quot;s&quot;), DBGetField(hResult, i, 0, szBuffer, MAX_DB_STRING));
- DLClose(hModule);
- }
- }
- else
- {
- WriteLog(MSG_MODULE_INIT_FAILED, EVENTLOG_ERROR_TYPE,
- _T(&quot;s&quot;), DBGetField(hResult, i, 0, szBuffer, MAX_DB_STRING));
- DLClose(hModule);
- }
+ WriteLog(MSG_MODULE_LOADED, EVENTLOG_INFORMATION_TYPE,
+ &quot;s&quot;, g_pModuleList[g_dwNumModules].szName);
+ g_dwNumModules++;
                }
                else
                {
- WriteLog(MSG_NO_MODULE_ENTRY_POINT, EVENTLOG_ERROR_TYPE,
- _T(&quot;s&quot;), DBGetField(hResult, i, 0, szBuffer, MAX_DB_STRING));
+ WriteLog(MSG_MODULE_BAD_MAGIC, EVENTLOG_ERROR_TYPE, &quot;s&quot;, curr);
                   DLClose(hModule);
                }
             }
             else
             {
- WriteLog(MSG_DLOPEN_FAILED, EVENTLOG_ERROR_TYPE,
- _T(&quot;ss&quot;), DBGetField(hResult, i, 0, szBuffer, MAX_DB_STRING), szErrorText);
+ WriteLog(MSG_MODULE_INIT_FAILED, EVENTLOG_ERROR_TYPE, &quot;s&quot;, curr);
+ DLClose(hModule);
             }
          }
+ else
+ {
+ WriteLog(MSG_NO_MODULE_ENTRY_POINT, EVENTLOG_ERROR_TYPE, &quot;s&quot;, curr);
+ DLClose(hModule);
+ }
       }
- DBFreeResult(hResult);
- }*/
+ else
+ {
+ WriteLog(MSG_DLOPEN_FAILED, EVENTLOG_ERROR_TYPE, &quot;ss&quot;, curr, szErrorText);
+ }
+ }
 }

Modified: trunk/src/server/core/snmptrap.cpp
===================================================================
--- trunk/src/server/core/snmptrap.cpp 2008-05-24 15:44:39 UTC (rev 3287)
+++ trunk/src/server/core/snmptrap.cpp 2008-05-26 21:46:43 UTC (rev 3288)
@@ -1,6 +1,6 @@
 /*
 ** NetXMS - Network Management System
-** Copyright (C) 2003, 2004, 2005, 2006, 2007 Victor Kirhenshtein
+** Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Victor Kirhenshtein
 **
 ** This program is free software; you can redistribute it and/or modify
 ** it under the terms of the GNU General Public License as published by
@@ -239,6 +239,7 @@
    TCHAR *pszTrapArgs, szBuffer[4096];
    SNMP_Variable *pVar;
    Node *pNode;
+ BOOL processed = FALSE;
    int iResult;
 
    dwOriginAddr = ntohl(pOrigin-&gt;sin_addr.s_addr);
@@ -297,6 +298,15 @@
    // Process trap if it is coming from host registered in database
    if (pNode != NULL)
    {
+ // Pass trap to loaded modules
+ for(i = 0; i &lt; g_dwNumModules; i++)
+ if (g_pModuleList[i].pfTrapHandler != NULL)
+ if (g_pModuleList[i].pfTrapHandler(pdu, pNode))
+ {
+ processed = TRUE;
+ break; // Trap was processed by the module
+ }
+
       // Find if we have this trap in our list
       MutexLock(m_mutexTrapCfgAccess, INFINITE);
 
@@ -329,14 +339,8 @@
       }
       else // Process unmatched traps
       {
- // Pass trap to loaded modules
- for(i = 0; i &lt; g_dwNumModules; i++)
- if (g_pModuleList[i].pfTrapHandler != NULL)
- if (g_pModuleList[i].pfTrapHandler(pdu, pNode))
- break; // Message was processed by the module
-
          // Handle unprocessed traps
- if (i == g_dwNumModules)
+ if (!processed)
          {
             // Build trap&#39;s parameters string
             dwBufSize = pdu-&gt;GetNumVariables() * 4096 + 16;

Modified: trunk/src/server/include/nxmodule.h
===================================================================
--- trunk/src/server/include/nxmodule.h 2008-05-24 15:44:39 UTC (rev 3287)
+++ trunk/src/server/include/nxmodule.h 2008-05-26 21:46:43 UTC (rev 3288)
@@ -1,6 +1,6 @@
 /*
 ** NetXMS - Network Management System
-** Copyright (C) 2003, 2004 Victor Kirhenshtein
+** Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Victor Kirhenshtein
 **
 ** This program is free software; you can redistribute it and/or modify
 ** it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
 ** along with this program; if not, write to the Free Software
 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 **
-** $module: nxmodule.h
+** File: nxmodule.h
 **
 **/
 
@@ -30,6 +30,7 @@
 
 class ClientSession;
 class Node;
+class Event;
 
 
 //
@@ -40,10 +41,10 @@
 {
    DWORD dwSize; // Size of structure in bytes
    TCHAR szName[MAX_OBJECT_NAME];
- DWORD dwFlags;
    void (* pfMain)(void); // Pointer to module&#39;s main()
    BOOL (* pfCommandHandler)(DWORD dwCommand, CSCPMessage *pMsg, ClientSession *pSession);
    BOOL (* pfTrapHandler)(SNMP_PDU *pdu, Node *pNode);
+ BOOL (* pfEventHandler)(Event *event);
    HMODULE hModule;
 } NXMODULE;
 

Added: trunk/src/server/modules/hpdp/Makefile.am
===================================================================
--- trunk/src/server/modules/hpdp/Makefile.am (rev 0)
+++ trunk/src/server/modules/hpdp/Makefile.am 2008-05-26 21:46:43 UTC (rev 3288)
@@ -0,0 +1,10 @@
+INCLUDES=-I_at_top_srcdir@/include -I_at_top_srcdir@/src/server/include
+
+lib_LTLIBRARIES = libnxddr_odbc.la
+libnxddr_odbc_la_SOURCES = odbc.cpp
+libnxddr_odbc_la_LDFLAGS = -version-info $(NETXMS_LIBRARY_VERSION) ../../../libnetxms/libnetxms.la
+
+EXTRA_DIST = odbc.dsp odbc.dsw odbcdrv.h
+
+install-exec-hook:
+ if test &quot;x`uname -s`&quot; = &quot;xAIX&quot; ; then $(AR) x $(libdir)/libnxddr_odbc.a $(libdir)/libnxddr_odbc.so.0 ; fi

Added: trunk/src/server/modules/hpdp/hpdp.cpp
===================================================================
--- trunk/src/server/modules/hpdp/hpdp.cpp (rev 0)
+++ trunk/src/server/modules/hpdp/hpdp.cpp 2008-05-26 21:46:43 UTC (rev 3288)
@@ -0,0 +1,65 @@
+/*
+** HP Data Protector integration module
+** Copyright (C) 2008 Victor Kirhenshtein
+**
+** This program is free software; you can redistribute it and/or modify
+** it under the terms of the GNU General Public License as published by
+** the Free Software Foundation; either version 2 of the License, or
+** (at your option) any later version.
+**
+** This program is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+** GNU General Public License for more details.
+**
+** You should have received a copy of the GNU General Public License
+** along with this program; if not, write to the Free Software
+** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+**
+** File: hpdp.cpp
+**
+**/
+
+#include &quot;hpdp.h&quot;
+
+
+//
+// SNMP trap handler
+//
+
+static BOOL TrapHandler(SNMP_PDU *pdu, Node *pNode)
+{
+ if (_tcscmp(pdu-&gt;GetTrapId()-&gt;GetValueAsText(), _T(&quot;.1.3.6.1.4.1.??????&quot;)))
+ return FALSE;
+
+ return TRUE;
+}
+
+
+//
+// Module entry point
+//
+
+extern &quot;C&quot; BOOL EXPORT NetXMSModuleInit(NXMODULE *module)
+{
+ module-&gt;dwSize = sizeof(NXMODULE);
+ _tcscpy(module-&gt;szName, _T(&quot;HPDP&quot;));
+ module-&gt;pfTrapHandler = TrapHandler;
+ return TRUE;
+}
+
+
+//
+// DLL Entry point
+//
+
+#ifdef _WIN32
+
+BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
+{
+ if (dwReason == DLL_PROCESS_ATTACH)
+ DisableThreadLibraryCalls(hInstance);
+ return TRUE;
+}
+
+#endif

Added: trunk/src/server/modules/hpdp/hpdp.dsp
===================================================================
--- trunk/src/server/modules/hpdp/hpdp.dsp (rev 0)
+++ trunk/src/server/modules/hpdp/hpdp.dsp 2008-05-26 21:46:43 UTC (rev 3288)
@@ -0,0 +1,213 @@
+# Microsoft Developer Studio Project File - Name=&quot;hpdp&quot; - Package Owner=&lt;4&gt;
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE &quot;Win32 (x86) Dynamic-Link Library&quot; 0x0102
+
+CFG=hpdp - Win32 Debug AMD64
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f &quot;hpdp.mak&quot;.
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f &quot;hpdp.mak&quot; CFG=&quot;hpdp - Win32 Debug AMD64&quot;
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE &quot;hpdp - Win32 Release&quot; (based on &quot;Win32 (x86) Dynamic-Link Library&quot;)
+!MESSAGE &quot;hpdp - Win32 Debug&quot; (based on &quot;Win32 (x86) Dynamic-Link Library&quot;)
+!MESSAGE &quot;hpdp - Win32 Release AMD64&quot; (based on &quot;Win32 (x86) Dynamic-Link Library&quot;)
+!MESSAGE &quot;hpdp - Win32 Debug AMD64&quot; (based on &quot;Win32 (x86) Dynamic-Link Library&quot;)
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName &quot;&quot;
+# PROP Scc_LocalPath &quot;&quot;
+CPP=cl.exe
+MTL=midl.exe
+RSC=rc.exe
+
+!IF &quot;$(CFG)&quot; == &quot;hpdp - Win32 Release&quot;
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir &quot;Release&quot;
+# PROP BASE Intermediate_Dir &quot;Release&quot;
+# PROP BASE Target_Dir &quot;&quot;
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir &quot;Release&quot;
+# PROP Intermediate_Dir &quot;Release&quot;
+# PROP Ignore_Export_Lib 1
+# PROP Target_Dir &quot;&quot;
+# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D &quot;WIN32&quot; /D &quot;NDEBUG&quot; /D &quot;_WINDOWS&quot; /D &quot;_MBCS&quot; /D &quot;_USRDLL&quot; /D &quot;HPDP_EXPORTS&quot; /YX /FD /c
+# ADD CPP /nologo /MD /W3 /O2 /I &quot;..\..\include&quot; /I &quot;..\..\..\..\include&quot; /D &quot;WIN32&quot; /D &quot;NDEBUG&quot; /D &quot;_WINDOWS&quot; /D &quot;_MBCS&quot; /D &quot;_USRDLL&quot; /D &quot;HPDP_EXPORTS&quot; /YX /FD /c
+# ADD BASE MTL /nologo /D &quot;NDEBUG&quot; /mktyplib203 /win32
+# ADD MTL /nologo /D &quot;NDEBUG&quot; /mktyplib203 /win32
+# ADD BASE RSC /l 0x809 /d &quot;NDEBUG&quot;
+# ADD RSC /l 0x809 /d &quot;NDEBUG&quot;
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib libnetxms.lib libnxsnmp.lib libnxsrv.lib /nologo /dll /machine:I386 /out:&quot;Release/hpdp.nxm&quot; /libpath:&quot;..\..\..\libnetxms\Release&quot; /libpath:&quot;..\..\..\libnxsnmp\Release&quot; /libpath:&quot;..\..\libnxsrv\Release&quot;
+# Begin Special Build Tool
+SOURCE=&quot;$(InputPath)&quot;
+PostBuild_Desc=Copy files
+PostBuild_Cmds=copy Release\hpdp.nxm C:\NetXMS\bin
+# End Special Build Tool
+
+!ELSEIF &quot;$(CFG)&quot; == &quot;hpdp - Win32 Debug&quot;
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir &quot;Debug&quot;
+# PROP BASE Intermediate_Dir &quot;Debug&quot;
+# PROP BASE Target_Dir &quot;&quot;
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir &quot;Debug&quot;
+# PROP Intermediate_Dir &quot;Debug&quot;
+# PROP Ignore_Export_Lib 1
+# PROP Target_Dir &quot;&quot;
+# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D &quot;WIN32&quot; /D &quot;_DEBUG&quot; /D &quot;_WINDOWS&quot; /D &quot;_MBCS&quot; /D &quot;_USRDLL&quot; /D &quot;HPDP_EXPORTS&quot; /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /I &quot;..\..\include&quot; /I &quot;..\..\..\..\include&quot; /D &quot;WIN32&quot; /D &quot;_DEBUG&quot; /D &quot;_WINDOWS&quot; /D &quot;_MBCS&quot; /D &quot;_USRDLL&quot; /D &quot;HPDP_EXPORTS&quot; /YX /FD /GZ /c
+# ADD BASE MTL /nologo /D &quot;_DEBUG&quot; /mktyplib203 /win32
+# ADD MTL /nologo /D &quot;_DEBUG&quot; /mktyplib203 /win32
+# ADD BASE RSC /l 0x809 /d &quot;_DEBUG&quot;
+# ADD RSC /l 0x809 /d &quot;_DEBUG&quot;
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib libnetxms.lib libnxsnmp.lib libnxsrv.lib /nologo /dll /debug /machine:I386 /out:&quot;Debug/hpdp.nxm&quot; /pdbtype:sept /libpath:&quot;..\..\..\libnetxms\Debug&quot; /libpath:&quot;..\..\..\libnxsnmp\Debug&quot; /libpath:&quot;..\..\libnxsrv\Debug&quot;
+# Begin Special Build Tool
+SOURCE=&quot;$(InputPath)&quot;
+PostBuild_Desc=Copy files
+PostBuild_Cmds=copy Debug\hpdp.nxm ..\..\..\..\bin
+# End Special Build Tool
+
+!ELSEIF &quot;$(CFG)&quot; == &quot;hpdp - Win32 Release AMD64&quot;
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir &quot;odbc___Win32_Release_AMD64&quot;
+# PROP BASE Intermediate_Dir &quot;odbc___Win32_Release_AMD64&quot;
+# PROP BASE Ignore_Export_Lib 0
+# PROP BASE Target_Dir &quot;&quot;
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir &quot;Release64&quot;
+# PROP Intermediate_Dir &quot;Release64&quot;
+# PROP Ignore_Export_Lib 1
+# PROP Target_Dir &quot;&quot;
+# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I &quot;..\..\include&quot; /I &quot;..\..\..\..\include&quot; /D &quot;WIN32&quot; /D &quot;NDEBUG&quot; /D &quot;_WINDOWS&quot; /D &quot;_MBCS&quot; /D &quot;_USRDLL&quot; /D &quot;HPDP_EXPORTS&quot; /YX /FD /c
+# ADD CPP /nologo /MD /W3 /O2 /I &quot;..\..\include&quot; /I &quot;..\..\..\..\include&quot; /D &quot;WIN32&quot; /D &quot;NDEBUG&quot; /D &quot;_WINDOWS&quot; /D &quot;_MBCS&quot; /D &quot;_USRDLL&quot; /D &quot;HPDP_EXPORTS&quot; /D &quot;__64BIT__&quot; /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE MTL /nologo /D &quot;NDEBUG&quot; /mktyplib203 /win32
+# ADD MTL /nologo /D &quot;NDEBUG&quot; /mktyplib203 /win32
+# ADD BASE RSC /l 0x809 /d &quot;NDEBUG&quot;
+# ADD RSC /l 0x809 /d &quot;NDEBUG&quot;
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:&quot;Release/hpdp.ddr&quot;
+# ADD LINK32 bufferoverflowU.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib libnetxms.lib libnxsnmp.lib libnxsrv.lib /nologo /dll /machine:I386 /out:&quot;Release64/hpdp.nxm&quot; /libpath:&quot;..\..\..\libnetxms\Release64&quot; /libpath:&quot;..\..\..\libnxsnmp\Release64&quot; /libpath:&quot;..\..\libnxsrv\Release64&quot; /machine:AMD64
+# SUBTRACT LINK32 /pdb:none
+# Begin Special Build Tool
+SOURCE=&quot;$(InputPath)&quot;
+PostBuild_Desc=Copy files
+PostBuild_Cmds=copy Release64\hpdp.nxm C:\NetXMS\bin64
+# End Special Build Tool
+
+!ELSEIF &quot;$(CFG)&quot; == &quot;hpdp - Win32 Debug AMD64&quot;
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir &quot;odbc___Win32_Debug_AMD64&quot;
+# PROP BASE Intermediate_Dir &quot;odbc___Win32_Debug_AMD64&quot;
+# PROP BASE Ignore_Export_Lib 0
+# PROP BASE Target_Dir &quot;&quot;
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir &quot;Debug64&quot;
+# PROP Intermediate_Dir &quot;Debug64&quot;
+# PROP Ignore_Export_Lib 1
+# PROP Target_Dir &quot;&quot;
+# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I &quot;..\..\include&quot; /I &quot;..\..\..\..\include&quot; /D &quot;WIN32&quot; /D &quot;_DEBUG&quot; /D &quot;_WINDOWS&quot; /D &quot;_MBCS&quot; /D &quot;_USRDLL&quot; /D &quot;HPDP_EXPORTS&quot; /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /Zi /Od /I &quot;..\..\include&quot; /I &quot;..\..\..\..\include&quot; /D &quot;WIN32&quot; /D &quot;_DEBUG&quot; /D &quot;_WINDOWS&quot; /D &quot;_MBCS&quot; /D &quot;_USRDLL&quot; /D &quot;HPDP_EXPORTS&quot; /D &quot;__64BIT__&quot; /FD /GZ /c
+# SUBTRACT CPP /YX
+# ADD BASE MTL /nologo /D &quot;_DEBUG&quot; /mktyplib203 /win32
+# ADD MTL /nologo /D &quot;_DEBUG&quot; /mktyplib203 /win32
+# ADD BASE RSC /l 0x809 /d &quot;_DEBUG&quot;
+# ADD RSC /l 0x809 /d &quot;_DEBUG&quot;
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /out:&quot;Debug/hpdp.ddr&quot; /pdbtype:sept
+# ADD LINK32 bufferoverflowU.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib libnetxms.lib libnxsnmp.lib libnxsrv.lib /nologo /dll /debug /machine:I386 /out:&quot;Debug64/hpdp.nxm&quot; /pdbtype:sept /libpath:&quot;..\..\..\libnetxms\Debug64&quot; /libpath:&quot;..\..\..\libnxsnmp\Debug64&quot; /libpath:&quot;..\..\libnxsrv\Debug64&quot; /machine:AMD64
+# SUBTRACT LINK32 /pdb:none
+# Begin Special Build Tool
+SOURCE=&quot;$(InputPath)&quot;
+PostBuild_Desc=Copy files
+PostBuild_Cmds=copy Debug64\hpdp.nxm ..\..\..\..\bin64
+# End Special Build Tool
+
+!ENDIF
+
+# Begin Target
+
+# Name &quot;hpdp - Win32 Release&quot;
+# Name &quot;hpdp - Win32 Debug&quot;
+# Name &quot;hpdp - Win32 Release AMD64&quot;
+# Name &quot;hpdp - Win32 Debug AMD64&quot;
+# Begin Group &quot;Source Files&quot;
+
+# PROP Default_Filter &quot;cpp;c;cxx;rc;def;r;odl;idl;hpj;bat&quot;
+# Begin Source File
+
+SOURCE=.\hpdp.cpp
+# End Source File
+# End Group
+# Begin Group &quot;Header Files&quot;
+
+# PROP Default_Filter &quot;h;hpp;hxx;hm;inl&quot;
+# Begin Source File
+
+SOURCE=.\hpdp.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\include\nms_common.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\nms_core.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\nms_events.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\include\nms_util.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\nxmodule.h
+# End Source File
+# End Group
+# Begin Group &quot;Resource Files&quot;
+
+# PROP Default_Filter &quot;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe&quot;
+# End Group
+# End Target
+# End Project

Added: trunk/src/server/modules/hpdp/hpdp.dsw
===================================================================
--- trunk/src/server/modules/hpdp/hpdp.dsw (rev 0)
+++ trunk/src/server/modules/hpdp/hpdp.dsw 2008-05-26 21:46:43 UTC (rev 3288)
@@ -0,0 +1,29 @@
+Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: &quot;hpdp&quot;=.\hpdp.dsp - Package Owner=&lt;4&gt;
+
+Package=&lt;5&gt;
+{{{
+}}}
+
+Package=&lt;4&gt;
+{{{
+}}}
+
+###############################################################################
+
+Global:
+
+Package=&lt;5&gt;
+{{{
+}}}
+
+Package=&lt;3&gt;
+{{{
+}}}
+
+###############################################################################
+

Added: trunk/src/server/modules/hpdp/hpdp.h
===================================================================
--- trunk/src/server/modules/hpdp/hpdp.h (rev 0)
+++ trunk/src/server/modules/hpdp/hpdp.h 2008-05-26 21:46:43 UTC (rev 3288)
@@ -0,0 +1,37 @@
+/*
+** HP Data Protector integration module
+** Copyright (C) 2008 Victor Kirhenshtein
+**
+** This program is free software; you can redistribute it and/or modify
+** it under the terms of the GNU General Public License as published by
+** the Free Software Foundation; either version 2 of the License, or
+** (at your option) any later version.
+**
+** This program is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+** GNU General Public License for more details.
+**
+** You should have received a copy of the GNU General Public License
+** along with this program; if not, write to the Free Software
+** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+**
+** File: hpdp.h
+**
+**/
+
+#ifndef _hpdp_h_
+#define _hpdp_h_
+
+#include &lt;nms_common.h&gt;
+#include &lt;nms_util.h&gt;
+#include &lt;nms_core.h&gt;
+#include &lt;nxmodule.h&gt;
+
+#ifdef _WIN32
+#define EXPORT __declspec(dllexport)
+#else
+#define EXPORT
+#endif /* _WIN32 */
+
+#endif
Received on Tue May 27 2008 - 00:46:45 EEST

This archive was generated by hypermail 2.2.0 : Tue May 27 2008 - 00:44:48 EEST