fixed broken multi-seed network map update; libnxmap library merged into server core...
authorVictor Kirhenshtein <victor@netxms.org>
Mon, 15 May 2017 08:04:20 +0000 (11:04 +0300)
committerVictor Kirhenshtein <victor@netxms.org>
Mon, 15 May 2017 08:04:20 +0000 (11:04 +0300)
20 files changed:
configure.ac
include/Makefile.am
src/libnxmap/Makefile.am [deleted file]
src/libnxmap/Makefile.w32 [deleted file]
src/libnxmap/libnxmap.h [deleted file]
src/libnxmap/libnxmap.vcproj [deleted file]
src/libnxmap/main.cpp [deleted file]
src/server/core/Makefile.am
src/server/core/layer2.cpp
src/server/core/netmap.cpp
src/server/core/netmap_element.cpp [moved from src/libnxmap/element.cpp with 98% similarity]
src/server/core/netmap_link.cpp [moved from src/libnxmap/link.cpp with 96% similarity]
src/server/core/netmap_objlist.cpp [moved from src/libnxmap/objlist.cpp with 80% similarity]
src/server/core/node.cpp
src/server/core/session.cpp
src/server/core/subnet.cpp
src/server/include/Makefile.am
src/server/include/netxms_maps.h [moved from include/netxms_maps.h with 86% similarity]
src/server/include/nms_objects.h
src/server/include/nms_topo.h

index c86a84d..8753034 100644 (file)
@@ -640,7 +640,7 @@ AC_ARG_ENABLE(64bit,
 AC_ARG_WITH(dist,
 [AS_HELP_STRING(--with-dist,for maintainers only)],
        DB_DRIVERS=" mysql pgsql odbc mssql sqlite oracle db2 informix"
-       MODULES="appagent jansson libexpat libstrophe libtre zlib libnetxms install sqlite snmp libnxsl libnxmb libnxlp libnxcc db server smsdrv agent libnxmap client nxscript nxcproxy nxlptest tools"
+       MODULES="appagent jansson libexpat libstrophe libtre zlib libnetxms install sqlite snmp libnxsl libnxmb libnxlp libnxcc db server smsdrv agent client nxscript nxcproxy nxlptest tools"
        SUBAGENT_DIRS="linux ds18x20 freebsd openbsd minix mqtt mysql netbsd sunos aix ipso hpux odbcquery informix oracle lmsensors darwin rpi java jmx bind9 ubntlw netsvc db2 tuxedo mongodb ssh vmgr"
        AGENT_DIRS="libnxtux"
        SMSDRV_DIRS="anysms kannel mymobile nexmo nxagent slack smseagle text2reach websms"
@@ -850,7 +850,7 @@ if test $? = 0; then
                AC_MSG_ERROR(You must select at least one database driver when building server.)
        fi
        BUILD_SERVER="yes"
-       MODULES="$MODULES libnxmap libnxsl libnxcc server smsdrv nxscript"
+       MODULES="$MODULES libnxsl libnxcc server smsdrv nxscript"
        TOP_LEVEL_MODULES="$TOP_LEVEL_MODULES sql images"
        CONTRIB_MODULES="$CONTRIB_MODULES mibs backgrounds music templates"
        SMSDRV_DIRS="$SMSDRV_DIRS nxagent"
@@ -944,9 +944,9 @@ fi
 check_substr "$COMPONENTS" "sdk"
 if test $? = 0; then
        if test "x$STATIC_BUILD" = "xyes"; then
-               MODULES="$MODULES appagent libnxmap client libnxmb"
+               MODULES="$MODULES appagent client libnxmb"
        else
-               MODULES="$MODULES appagent libnxmap client libnxsl libnxmb libnxlp libnxcc db nxscript smsdrv snmp"
+               MODULES="$MODULES appagent client libnxsl libnxmb libnxlp libnxcc db nxscript smsdrv snmp"
        fi
 fi
 
@@ -3481,7 +3481,6 @@ AC_CONFIG_FILES([
        src/libnetxms/Makefile
        src/libnxcc/Makefile
        src/libnxlp/Makefile
-       src/libnxmap/Makefile
        src/libnxmb/Makefile
        src/libnxsl/Makefile
        src/libstrophe/Makefile
index 7977b01..015bf1d 100644 (file)
@@ -22,7 +22,6 @@ include_HEADERS = \
        netxmsdb.h \
        netxms_getopt.h \
        netxms_isc.h \
-       netxms_maps.h \
        netxms-regex.h \
        netxms-version.h \
        nms_agent.h \
diff --git a/src/libnxmap/Makefile.am b/src/libnxmap/Makefile.am
deleted file mode 100644 (file)
index 27b7169..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-SOURCES = element.cpp link.cpp main.cpp objlist.cpp
-
-lib_LTLIBRARIES = libnxmap.la
-
-libnxmap_la_SOURCES = $(SOURCES)
-libnxmap_la_CPPFLAGS=-I@top_srcdir@/include
-libnxmap_la_LDFLAGS = -version-info $(NETXMS_LIBRARY_VERSION)
-libnxmap_la_LIBADD = ../libnetxms/libnetxms.la
-
-EXTRA_DIST = \
-       libnxmap.vcproj \
-       libnxmap.h
diff --git a/src/libnxmap/Makefile.w32 b/src/libnxmap/Makefile.w32
deleted file mode 100644 (file)
index dc373ce..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-TARGET=libnxmap.dll
-TYPE=dll
-SOURCES=element.cpp link.cpp main.cpp objlist.cpp
-
-CPPFLAGS=/DLIBNXMAP_EXPORTS
-LIBS=libnetxms.lib
-         
-include ../../Makefile.inc.w32
diff --git a/src/libnxmap/libnxmap.h b/src/libnxmap/libnxmap.h
deleted file mode 100644 (file)
index 09cd91c..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/* 
-** NetXMS - Network Management System
-** Network Map Library
-** Copyright (C) 2003-2010 Victor Kirhenshtein
-**
-** This program is free software; you can redistribute it and/or modify
-** it under the terms of the GNU Lesser General Public License as published by
-** the Free Software Foundation; either version 3 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 Lesser General Public License
-** along with this program; if not, write to the Free Software
-** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-**
-** File: libnxmap.h
-**
-**/
-
-#ifndef _libnxmap_h_
-#define _libnxmap_h_
-
-#include <nms_common.h>
-#include <nms_util.h>
-#include <nms_threads.h>
-#include <nxcpapi.h>
-#include <netxms_maps.h>
-
-#endif   /* _libnxmap_h_ */
diff --git a/src/libnxmap/libnxmap.vcproj b/src/libnxmap/libnxmap.vcproj
deleted file mode 100644 (file)
index 6a4af16..0000000
+++ /dev/null
@@ -1,404 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
-       ProjectType="Visual C++"
-       Version="8.00"
-       Name="libnxmap"
-       ProjectGUID="{AB386821-B630-49F5-95C3-677B9DCE1270}"
-       RootNamespace="libnxmap"
-       Keyword="Win32Proj"
-       >
-       <Platforms>
-               <Platform
-                       Name="Win32"
-               />
-               <Platform
-                       Name="x64"
-               />
-       </Platforms>
-       <ToolFiles>
-       </ToolFiles>
-       <Configurations>
-               <Configuration
-                       Name="Debug|Win32"
-                       OutputDirectory="$(SolutionDir)$(ConfigurationName)"
-                       IntermediateDirectory="$(ConfigurationName)"
-                       ConfigurationType="2"
-                       CharacterSet="1"
-                       >
-                       <Tool
-                               Name="VCPreBuildEventTool"
-                       />
-                       <Tool
-                               Name="VCCustomBuildTool"
-                       />
-                       <Tool
-                               Name="VCXMLDataGeneratorTool"
-                       />
-                       <Tool
-                               Name="VCWebServiceProxyGeneratorTool"
-                       />
-                       <Tool
-                               Name="VCMIDLTool"
-                       />
-                       <Tool
-                               Name="VCCLCompilerTool"
-                               Optimization="0"
-                               AdditionalIncludeDirectories="..\..\include"
-                               PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBNXMAP_EXPORTS;_CRT_SECURE_NO_DEPRECATE"
-                               MinimalRebuild="true"
-                               BasicRuntimeChecks="3"
-                               RuntimeLibrary="3"
-                               UsePrecompiledHeader="0"
-                               WarningLevel="3"
-                               Detect64BitPortabilityProblems="false"
-                               DebugInformationFormat="4"
-                       />
-                       <Tool
-                               Name="VCManagedResourceCompilerTool"
-                       />
-                       <Tool
-                               Name="VCResourceCompilerTool"
-                       />
-                       <Tool
-                               Name="VCPreLinkEventTool"
-                       />
-                       <Tool
-                               Name="VCLinkerTool"
-                               LinkIncremental="2"
-                               GenerateDebugInformation="true"
-                               SubSystem="2"
-                               TargetMachine="1"
-                       />
-                       <Tool
-                               Name="VCALinkTool"
-                       />
-                       <Tool
-                               Name="VCManifestTool"
-                       />
-                       <Tool
-                               Name="VCXDCMakeTool"
-                       />
-                       <Tool
-                               Name="VCBscMakeTool"
-                       />
-                       <Tool
-                               Name="VCFxCopTool"
-                       />
-                       <Tool
-                               Name="VCAppVerifierTool"
-                       />
-                       <Tool
-                               Name="VCWebDeploymentTool"
-                       />
-                       <Tool
-                               Name="VCPostBuildEventTool"
-                       />
-               </Configuration>
-               <Configuration
-                       Name="Debug|x64"
-                       OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
-                       IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
-                       ConfigurationType="2"
-                       CharacterSet="1"
-                       >
-                       <Tool
-                               Name="VCPreBuildEventTool"
-                       />
-                       <Tool
-                               Name="VCCustomBuildTool"
-                       />
-                       <Tool
-                               Name="VCXMLDataGeneratorTool"
-                       />
-                       <Tool
-                               Name="VCWebServiceProxyGeneratorTool"
-                       />
-                       <Tool
-                               Name="VCMIDLTool"
-                               TargetEnvironment="3"
-                       />
-                       <Tool
-                               Name="VCCLCompilerTool"
-                               Optimization="0"
-                               AdditionalIncludeDirectories="..\..\include"
-                               PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBNXMAP_EXPORTS;_CRT_SECURE_NO_DEPRECATE"
-                               MinimalRebuild="true"
-                               BasicRuntimeChecks="3"
-                               RuntimeLibrary="3"
-                               UsePrecompiledHeader="0"
-                               WarningLevel="3"
-                               Detect64BitPortabilityProblems="true"
-                               DebugInformationFormat="3"
-                       />
-                       <Tool
-                               Name="VCManagedResourceCompilerTool"
-                       />
-                       <Tool
-                               Name="VCResourceCompilerTool"
-                       />
-                       <Tool
-                               Name="VCPreLinkEventTool"
-                       />
-                       <Tool
-                               Name="VCLinkerTool"
-                               LinkIncremental="2"
-                               GenerateDebugInformation="true"
-                               SubSystem="2"
-                               TargetMachine="17"
-                       />
-                       <Tool
-                               Name="VCALinkTool"
-                       />
-                       <Tool
-                               Name="VCManifestTool"
-                       />
-                       <Tool
-                               Name="VCXDCMakeTool"
-                       />
-                       <Tool
-                               Name="VCBscMakeTool"
-                       />
-                       <Tool
-                               Name="VCFxCopTool"
-                       />
-                       <Tool
-                               Name="VCAppVerifierTool"
-                       />
-                       <Tool
-                               Name="VCWebDeploymentTool"
-                       />
-                       <Tool
-                               Name="VCPostBuildEventTool"
-                       />
-               </Configuration>
-               <Configuration
-                       Name="Release|Win32"
-                       OutputDirectory="$(SolutionDir)$(ConfigurationName)"
-                       IntermediateDirectory="$(ConfigurationName)"
-                       ConfigurationType="2"
-                       CharacterSet="1"
-                       WholeProgramOptimization="1"
-                       >
-                       <Tool
-                               Name="VCPreBuildEventTool"
-                       />
-                       <Tool
-                               Name="VCCustomBuildTool"
-                       />
-                       <Tool
-                               Name="VCXMLDataGeneratorTool"
-                       />
-                       <Tool
-                               Name="VCWebServiceProxyGeneratorTool"
-                       />
-                       <Tool
-                               Name="VCMIDLTool"
-                       />
-                       <Tool
-                               Name="VCCLCompilerTool"
-                               AdditionalIncludeDirectories="..\..\include"
-                               PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBNXMAP_EXPORTS;_CRT_SECURE_NO_DEPRECATE"
-                               RuntimeLibrary="2"
-                               UsePrecompiledHeader="0"
-                               WarningLevel="3"
-                               Detect64BitPortabilityProblems="false"
-                               DebugInformationFormat="3"
-                       />
-                       <Tool
-                               Name="VCManagedResourceCompilerTool"
-                       />
-                       <Tool
-                               Name="VCResourceCompilerTool"
-                       />
-                       <Tool
-                               Name="VCPreLinkEventTool"
-                       />
-                       <Tool
-                               Name="VCLinkerTool"
-                               LinkIncremental="1"
-                               GenerateDebugInformation="true"
-                               SubSystem="2"
-                               OptimizeReferences="2"
-                               EnableCOMDATFolding="2"
-                               TargetMachine="1"
-                       />
-                       <Tool
-                               Name="VCALinkTool"
-                       />
-                       <Tool
-                               Name="VCManifestTool"
-                       />
-                       <Tool
-                               Name="VCXDCMakeTool"
-                       />
-                       <Tool
-                               Name="VCBscMakeTool"
-                       />
-                       <Tool
-                               Name="VCFxCopTool"
-                       />
-                       <Tool
-                               Name="VCAppVerifierTool"
-                       />
-                       <Tool
-                               Name="VCWebDeploymentTool"
-                       />
-                       <Tool
-                               Name="VCPostBuildEventTool"
-                       />
-               </Configuration>
-               <Configuration
-                       Name="Release|x64"
-                       OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
-                       IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
-                       ConfigurationType="2"
-                       CharacterSet="1"
-                       WholeProgramOptimization="1"
-                       >
-                       <Tool
-                               Name="VCPreBuildEventTool"
-                       />
-                       <Tool
-                               Name="VCCustomBuildTool"
-                       />
-                       <Tool
-                               Name="VCXMLDataGeneratorTool"
-                       />
-                       <Tool
-                               Name="VCWebServiceProxyGeneratorTool"
-                       />
-                       <Tool
-                               Name="VCMIDLTool"
-                               TargetEnvironment="3"
-                       />
-                       <Tool
-                               Name="VCCLCompilerTool"
-                               AdditionalIncludeDirectories="..\..\include"
-                               PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBNXMAP_EXPORTS;_CRT_SECURE_NO_DEPRECATE"
-                               RuntimeLibrary="2"
-                               UsePrecompiledHeader="0"
-                               WarningLevel="3"
-                               Detect64BitPortabilityProblems="true"
-                               DebugInformationFormat="3"
-                       />
-                       <Tool
-                               Name="VCManagedResourceCompilerTool"
-                       />
-                       <Tool
-                               Name="VCResourceCompilerTool"
-                       />
-                       <Tool
-                               Name="VCPreLinkEventTool"
-                       />
-                       <Tool
-                               Name="VCLinkerTool"
-                               LinkIncremental="1"
-                               GenerateDebugInformation="true"
-                               SubSystem="2"
-                               OptimizeReferences="2"
-                               EnableCOMDATFolding="2"
-                               TargetMachine="17"
-                       />
-                       <Tool
-                               Name="VCALinkTool"
-                       />
-                       <Tool
-                               Name="VCManifestTool"
-                       />
-                       <Tool
-                               Name="VCXDCMakeTool"
-                       />
-                       <Tool
-                               Name="VCBscMakeTool"
-                       />
-                       <Tool
-                               Name="VCFxCopTool"
-                       />
-                       <Tool
-                               Name="VCAppVerifierTool"
-                       />
-                       <Tool
-                               Name="VCWebDeploymentTool"
-                       />
-                       <Tool
-                               Name="VCPostBuildEventTool"
-                       />
-               </Configuration>
-       </Configurations>
-       <References>
-       </References>
-       <Files>
-               <Filter
-                       Name="Source Files"
-                       Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
-                       UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
-                       >
-                       <File
-                               RelativePath=".\element.cpp"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\link.cpp"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\main.cpp"
-                               >
-                       </File>
-                       <File
-                               RelativePath=".\objlist.cpp"
-                               >
-                       </File>
-               </Filter>
-               <Filter
-                       Name="Header Files"
-                       Filter="h;hpp;hxx;hm;inl;inc;xsd"
-                       UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
-                       >
-                       <File
-                               RelativePath=".\libnxmap.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath="..\..\include\netxms-regex.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath="..\..\include\netxms-version.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath="..\..\include\netxms_maps.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath="..\..\include\nms_common.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath="..\..\include\nms_threads.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath="..\..\include\nms_util.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath="..\..\include\nxconfig.h"
-                               >
-                       </File>
-                       <File
-                               RelativePath="..\..\include\unicode.h"
-                               >
-                       </File>
-               </Filter>
-               <Filter
-                       Name="Resource Files"
-                       Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
-                       UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
-                       >
-               </Filter>
-       </Files>
-       <Globals>
-       </Globals>
-</VisualStudioProject>
diff --git a/src/libnxmap/main.cpp b/src/libnxmap/main.cpp
deleted file mode 100644 (file)
index e64607a..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-/* 
-** NetXMS - Network Management System
-** Network Maps Library
-** Copyright (C) 2003-2010 Victor Kirhenshtein
-**
-** This program is free software; you can redistribute it and/or modify
-** it under the terms of the GNU Lesser General Public License as published by
-** the Free Software Foundation; either version 3 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 Lesser General Public License
-** along with this program; if not, write to the Free Software
-** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-**
-** File: main.cpp
-**
-**/
-
-#include "libnxmap.h"
-
-
-//
-// DLL entry point
-//
-
-#if defined(_WIN32) && !defined(UNDER_CE)
-
-BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
-{
-   if (dwReason == DLL_PROCESS_ATTACH)
-      DisableThreadLibraryCalls(hInstance);
-   return TRUE;
-}
-
-#endif   /* _WIN32 */
index 0ca53cf..6c60bdb 100644 (file)
@@ -23,7 +23,8 @@ libnxcore_la_SOURCES =  accesspoint.cpp acl.cpp actions.cpp addrlist.cpp \
                        loghandle.cpp logs.cpp macdb.cpp main.cpp maint.cpp \
                        market.cpp mdconn.cpp mdsession.cpp mobile.cpp \
                        modules.cpp mt.cpp ndd.cpp ndp.cpp \
-                       netinfo.cpp netmap.cpp netobj.cpp netsrv.cpp \
+                       netinfo.cpp netmap.cpp netmap_element.cpp netmap_link.cpp \
+                       netmap_objlist.cpp netobj.cpp netsrv.cpp \
                        node.cpp nodelink.cpp np.cpp npe.cpp nxsl_classes.cpp \
                        nxslext.cpp objects.cpp objtools.cpp package.cpp \
                        pds.cpp poll.cpp ps.cpp rack.cpp radius.cpp \
@@ -40,7 +41,6 @@ libnxcore_la_LDFLAGS = -version-info $(NETXMS_LIBRARY_VERSION) @MQTT_LDFLAGS@ @Z
 libnxcore_la_LIBADD = \
        ../libnxsrv/libnxsrv.la \
        ../../snmp/libnxsnmp/libnxsnmp.la \
-       ../../libnxmap/libnxmap.la \
        ../../libnxlp/libnxlp.la \
        ../../db/libnxdb/libnxdb.la \
        ../../libnxsl/libnxsl.la \
index d337255..98ba3d6 100644 (file)
@@ -25,7 +25,7 @@
 /**
  * Build layer 2 topology for switch
  */
-void BuildL2Topology(nxmap_ObjList &topology, Node *root, int nDepth, bool includeEndNodes)
+void BuildL2Topology(NetworkMapObjectList &topology, Node *root, int nDepth, bool includeEndNodes)
 {
        if (topology.isObjectExist(root->getId()))
                return;  // loop in object connections
index 1dc3d3a..094df0b 100644 (file)
@@ -661,55 +661,49 @@ UINT32 NetworkMap::modifyFromMessageInternal(NXCPMessage *request)
 void NetworkMap::updateContent()
 {
    nxlog_debug(6, _T("NetworkMap::updateContent(%s [%d]): map type %d"), m_name, m_id, m_mapType);
-   ObjectArray<nxmap_ObjList> objects(m_seedObjects->size(), 8, true);
+   NetworkMapObjectList objects;
    for(int i = 0; i < m_seedObjects->size(); i++)
    {
       Node *seed = (Node *)FindObjectById(m_seedObjects->get(i), OBJECT_NODE);
       if (seed != NULL)
       {
          UINT32 status;
-         nxmap_ObjList *topology;
+         NetworkMapObjectList *topology;
          switch(m_mapType)
          {
             case MAP_TYPE_LAYER2_TOPOLOGY:
                topology = seed->buildL2Topology(&status, m_discoveryRadius, (m_flags & MF_SHOW_END_NODES) != 0);
-               if (topology != NULL)
-                  objects.add(topology);
-               else
-                  nxlog_debug(3, _T("NetworkMap::updateContent(%s [%d]): call to buildL2Topology on object %d failed"), m_name, m_id, m_seedObjects->get(i));;
                break;
             case MAP_TYPE_IP_TOPOLOGY:
                topology = seed->buildIPTopology(&status, m_discoveryRadius, (m_flags & MF_SHOW_END_NODES) != 0);
-               if (topology != NULL)
-                  objects.add(topology);
-               else
-                  nxlog_debug(3, _T("NetworkMap::updateContent(%s [%d]): call to BuildIPTopology on object %d failed"), m_name, m_id, m_seedObjects->get(i));
                break;
             default:
+               topology = NULL;
                break;
          }
+         if (topology != NULL)
+         {
+            objects.merge(topology);
+            delete topology;
+         }
+         else
+         {
+            nxlog_debug(3, _T("NetworkMap::updateContent(%s [%d]): cannot get topology information for node %s [%d]"), m_name, m_id, seed->getName(), seed->getId());
+         }
       }
       else
       {
          nxlog_debug(3, _T("NetworkMap::updateContent(%s [%d]): seed object %d cannot be found"), m_name, m_id, m_seedObjects->get(i));
       }
    }
-   if (objects.size() > 0)
-   {
-      for(int i = 0; i < objects.size(); i++)
-         updateObjects(objects.get(i));
-      nxlog_debug(6, _T("NetworkMap::updateContent(%s [%d]): completed"), m_name, m_id);
-   }
-   else
-   {
-      nxlog_debug(3, _T("NetworkMap::updateContent(%s [%d]): failed"), m_name, m_id);
-   }
+   updateObjects(&objects);
+   nxlog_debug(6, _T("NetworkMap::updateContent(%s [%d]): completed"), m_name, m_id);
 }
 
 /**
  * Update objects from given list
  */
-void NetworkMap::updateObjects(nxmap_ObjList *objects)
+void NetworkMap::updateObjects(NetworkMapObjectList *objects)
 {
    bool modified = false;
 
similarity index 98%
rename from src/libnxmap/element.cpp
rename to src/server/core/netmap_element.cpp
index 63ec2bb..7b8b7b8 100644 (file)
@@ -1,7 +1,6 @@
 /*
 ** NetXMS - Network Management System
-** Network Maps Library
-** Copyright (C) 2003-2010 Victor Kirhenshtein
+** Copyright (C) 2003-2017 Victor Kirhenshtein
 **
 ** This program is free software; you can redistribute it and/or modify
 ** it under the terms of the GNU Lesser General Public License as published by
 ** along with this program; if not, write to the Free Software
 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 **
-** File: element.cpp
+** File: netmap_element.cpp
 **
 **/
 
-#include "libnxmap.h"
+#include "nxcore.h"
 
 /**************************
  * Network Map Element
similarity index 96%
rename from src/libnxmap/link.cpp
rename to src/server/core/netmap_link.cpp
index 06b28fc..018a648 100644 (file)
@@ -1,7 +1,6 @@
 /*
 ** NetXMS - Network Management System
-** Network Maps Library
-** Copyright (C) 2003-2010 Victor Kirhenshtein
+** Copyright (C) 2003-2017 Victor Kirhenshtein
 **
 ** This program is free software; you can redistribute it and/or modify
 ** it under the terms of the GNU Lesser General Public License as published by
 ** along with this program; if not, write to the Free Software
 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 **
-** File: link.cpp
+** File: netmap_link.cpp
 **
 **/
 
-#include "libnxmap.h"
-
+#include "nxcore.h"
 
 /**
  * Constructor
similarity index 80%
rename from src/libnxmap/objlist.cpp
rename to src/server/core/netmap_objlist.cpp
index 50ec72c..3b47c21 100644 (file)
@@ -1,7 +1,6 @@
 /*
 ** NetXMS - Network Management System
-** Network Maps Library
-** Copyright (C) 2003-2010 Victor Kirhenshtein
+** Copyright (C) 2003-2017 Victor Kirhenshtein
 **
 ** This program is free software; you can redistribute it and/or modify
 ** it under the terms of the GNU Lesser General Public License as published by
 ** along with this program; if not, write to the Free Software
 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 **
-** File: objlist.cpp
+** File: netmap_objlist.cpp
 **
 **/
 
-#include "libnxmap.h"
+#include "nxcore.h"
 
 /**
- * ObjLink class implementation
+ * Create empty object link
  */
-
-/**
- * Constructors
- */
-
 ObjLink::ObjLink()
 {
    id1 = 0;
@@ -43,6 +37,9 @@ ObjLink::ObjLink()
        flags = 0;
 }
 
+/**
+ * Create new object link
+ */
 ObjLink::ObjLink(UINT32 id1, UINT32 id2, LONG type, TCHAR* port1, TCHAR* port2, int portIdCount, UINT32* portIdArray1, UINT32* portIdArray2, TCHAR* config, UINT32 flags)
 {
    this->id1 = id1;
@@ -65,48 +62,52 @@ ObjLink::ObjLink(UINT32 id1, UINT32 id2, LONG type, TCHAR* port1, TCHAR* port2,
        this->flags = flags;
 }
 
-ObjLink::ObjLink(ObjLink* old)
+/**
+ * Object link copy constructor
+ */
+ObjLink::ObjLink(const ObjLink *src)
 {
-   id1 = old->id1;
-   id2 = old->id2;
-   type = old->type;
-   _tcscpy(port1, old->port1);
-       _tcscpy(port2, old->port2);
-       portIdCount = old->portIdCount;
+   id1 = src->id1;
+   id2 = src->id2;
+   type = src->type;
+   _tcscpy(port1, src->port1);
+       _tcscpy(port2, src->port2);
+       portIdCount = src->portIdCount;
 
        for(int i = 0; i < portIdCount; i++)
        {
-      this->portIdArray1[i] = old->portIdArray1[i];
-      this->portIdArray2[i] = old->portIdArray2[i];
+      this->portIdArray1[i] = src->portIdArray1[i];
+      this->portIdArray2[i] = src->portIdArray2[i];
        }
 
-   if(old->config != NULL)
-      config = _tcsdup(old->config);
+   if(src->config != NULL)
+      config = _tcsdup(src->config);
    else
       config = NULL;
-       flags = old->flags;
+       flags = src->flags;
 }
 
+/**
+ * Object link destructor
+ */
 ObjLink::~ObjLink()
 {
-   safe_free(config);
+   free(config);
 }
 
 /**
- * nxmap_ObjList class implementation
+ * Create empty object list
  */
-
-/**
- * Constructors
- */
-
-nxmap_ObjList::nxmap_ObjList()
+NetworkMapObjectList::NetworkMapObjectList()
 {
    m_objectList = new IntegerArray<UINT32>(16, 16);
    m_linkList = new ObjectArray<ObjLink>(16, 16, true);
 }
 
-nxmap_ObjList::nxmap_ObjList(NXCPMessage *msg)
+/**
+ * Create object list from NXCP message
+ */
+NetworkMapObjectList::NetworkMapObjectList(NXCPMessage *msg)
 {
    m_objectList = new IntegerArray<UINT32>(16, 16);
    m_linkList = new ObjectArray<ObjLink>(16, 16, true);
@@ -132,7 +133,7 @@ nxmap_ObjList::nxmap_ObjList(NXCPMessage *msg)
 /**
  * Copy constructor
  */
-nxmap_ObjList::nxmap_ObjList(nxmap_ObjList *src)
+NetworkMapObjectList::NetworkMapObjectList(NetworkMapObjectList *src)
 {
    int i;
 
@@ -148,16 +149,36 @@ nxmap_ObjList::nxmap_ObjList(nxmap_ObjList *src)
 /**
  * Destructor
  */
-nxmap_ObjList::~nxmap_ObjList()
+NetworkMapObjectList::~NetworkMapObjectList()
 {
    delete m_objectList;
    delete m_linkList;
 }
 
+/**
+ * Merge two lists
+ */
+void NetworkMapObjectList::merge(const NetworkMapObjectList *src)
+{
+   int i;
+
+   for(i = 0; i < src->m_objectList->size(); i++)
+   {
+      if (!isObjectExist(src->m_objectList->get(i)))
+         m_objectList->add(src->m_objectList->get(i));
+   }
+   for(i = 0; i < src->m_linkList->size(); i++)
+   {
+      ObjLink *l = src->m_linkList->get(i);
+      if (!isLinkExist(l->id1, l->id2))
+         m_linkList->add(new ObjLink(l));
+   }
+}
+
 /**
  * Clear list
  */
-void nxmap_ObjList::clear()
+void NetworkMapObjectList::clear()
 {
    m_linkList->clear();
    m_objectList->clear();
@@ -176,7 +197,7 @@ static int CompareObjectId(const void *e1, const void *e2)
 /**
  * Add object to list
  */
-void nxmap_ObjList::addObject(UINT32 id)
+void NetworkMapObjectList::addObject(UINT32 id)
 {
    if (!isObjectExist(id))
    {
@@ -188,7 +209,7 @@ void nxmap_ObjList::addObject(UINT32 id)
 /**
  * Remove object from list
  */
-void nxmap_ObjList::removeObject(UINT32 id)
+void NetworkMapObjectList::removeObject(UINT32 id)
 {
    m_objectList->remove(id);
 
@@ -205,7 +226,7 @@ void nxmap_ObjList::removeObject(UINT32 id)
 /**
  * Link two objects
  */
-void nxmap_ObjList::linkObjects(UINT32 id1, UINT32 id2, int linkType, const TCHAR *linkName)
+void NetworkMapObjectList::linkObjects(UINT32 id1, UINT32 id2, int linkType, const TCHAR *linkName)
 {
    bool linkExists = false;
    if ((m_objectList->indexOf(id1) != -1) && (m_objectList->indexOf(id2) != -1))  // if both objects exist
@@ -245,7 +266,7 @@ static void UpdatePortNames(ObjLink *link, const TCHAR *port1, const TCHAR *port
 /**
  * Link two objects with named links
  */
-void nxmap_ObjList::linkObjectsEx(UINT32 id1, UINT32 id2, const TCHAR *port1, const TCHAR *port2, UINT32 portId1, UINT32 portId2)
+void NetworkMapObjectList::linkObjectsEx(UINT32 id1, UINT32 id2, const TCHAR *port1, const TCHAR *port2, UINT32 portId1, UINT32 portId2)
 {
    bool linkExists = false;
    if ((m_objectList->indexOf(id1) != -1) && (m_objectList->indexOf(id2) != -1))  // if both objects exist
@@ -320,7 +341,7 @@ void nxmap_ObjList::linkObjectsEx(UINT32 id1, UINT32 id2, const TCHAR *port1, co
 /**
  * Create NXCP message
  */
-void nxmap_ObjList::createMessage(NXCPMessage *msg)
+void NetworkMapObjectList::createMessage(NXCPMessage *msg)
 {
        // Object list
        msg->setField(VID_NUM_OBJECTS, m_objectList->size());
@@ -346,7 +367,7 @@ void nxmap_ObjList::createMessage(NXCPMessage *msg)
 /**
  * Check if link between two given objects exist
  */
-bool nxmap_ObjList::isLinkExist(UINT32 objectId1, UINT32 objectId2)
+bool NetworkMapObjectList::isLinkExist(UINT32 objectId1, UINT32 objectId2) const
 {
    for(int i = 0; i < m_linkList->size(); i++)
    {
@@ -360,7 +381,7 @@ bool nxmap_ObjList::isLinkExist(UINT32 objectId1, UINT32 objectId2)
 /**
  * Check if given object exist
  */
-bool nxmap_ObjList::isObjectExist(UINT32 objectId)
+bool NetworkMapObjectList::isObjectExist(UINT32 objectId) const
 {
    return bsearch(&objectId, m_objectList->getBuffer(), m_objectList->size(), sizeof(UINT32), CompareObjectId) != NULL;
 }
index ab81824..a8d7f47 100644 (file)
@@ -94,7 +94,7 @@ Node::Node() : DataCollectionTarget()
    m_lastAgentConnectAttempt = 0;
    m_linkLayerNeighbors = NULL;
    m_vrrpInfo = NULL;
-   m_pTopology = NULL;
+   m_topology = NULL;
    m_topologyRebuildTimestamp = 0;
    m_iPendingStatus = -1;
    m_iPollCount = 0;
@@ -196,7 +196,7 @@ Node::Node(const InetAddress& addr, UINT32 dwFlags, UINT32 agentProxy, UINT32 sn
    m_lastAgentConnectAttempt = 0;
    m_linkLayerNeighbors = NULL;
    m_vrrpInfo = NULL;
-   m_pTopology = NULL;
+   m_topology = NULL;
    m_topologyRebuildTimestamp = 0;
    m_iPendingStatus = -1;
    m_iPollCount = 0;
@@ -253,7 +253,7 @@ Node::~Node()
    if (m_linkLayerNeighbors != NULL)
       m_linkLayerNeighbors->decRefCount();
    delete m_vrrpInfo;
-   delete m_pTopology;
+   delete m_topology;
    delete m_jobQueue;
    delete m_snmpSecurity;
    if (m_fdb != NULL)
@@ -6195,20 +6195,20 @@ BOOL Node::resolveName(BOOL useOnlyDNS)
  * Get current layer 2 topology (as dynamically created list which should be destroyed by caller)
  * Will return NULL if there are no topology information or it is expired
  */
-nxmap_ObjList *Node::getL2Topology()
+NetworkMapObjectList *Node::getL2Topology()
 {
-   nxmap_ObjList *pResult;
+   NetworkMapObjectList *pResult;
    UINT32 dwExpTime;
 
    dwExpTime = ConfigReadULong(_T("TopologyExpirationTime"), 900);
    MutexLock(m_mutexTopoAccess);
-   if ((m_pTopology == NULL) || (m_topologyRebuildTimestamp + (time_t)dwExpTime < time(NULL)))
+   if ((m_topology == NULL) || (m_topologyRebuildTimestamp + (time_t)dwExpTime < time(NULL)))
    {
       pResult = NULL;
    }
    else
    {
-      pResult = new nxmap_ObjList(m_pTopology);
+      pResult = new NetworkMapObjectList(m_topology);
    }
    MutexUnlock(m_mutexTopoAccess);
    return pResult;
@@ -6217,9 +6217,9 @@ nxmap_ObjList *Node::getL2Topology()
 /**
  * Rebuild layer 2 topology and return it as dynamically reated list which should be destroyed by caller
  */
-nxmap_ObjList *Node::buildL2Topology(UINT32 *pdwStatus, int radius, bool includeEndNodes)
+NetworkMapObjectList *Node::buildL2Topology(UINT32 *pdwStatus, int radius, bool includeEndNodes)
 {
-   nxmap_ObjList *result;
+   NetworkMapObjectList *result;
    int nDepth = (radius < 0) ? ConfigReadInt(_T("TopologyDiscoveryRadius"), 5) : radius;
 
    MutexLock(m_mutexTopoAccess);
@@ -6227,18 +6227,18 @@ nxmap_ObjList *Node::buildL2Topology(UINT32 *pdwStatus, int radius, bool include
    {
       MutexUnlock(m_mutexTopoAccess);
 
-      result = new nxmap_ObjList;
+      result = new NetworkMapObjectList();
       BuildL2Topology(*result, this, nDepth, includeEndNodes);
 
       MutexLock(m_mutexTopoAccess);
-      delete m_pTopology;
-      m_pTopology = new nxmap_ObjList(result);
+      delete m_topology;
+      m_topology = new NetworkMapObjectList(result);
       m_topologyRebuildTimestamp = time(NULL);
    }
    else
    {
       result = NULL;
-      delete_and_null(m_pTopology);
+      delete_and_null(m_topology);
       *pdwStatus = RCC_NO_L2_TOPOLOGY_SUPPORT;
    }
    MutexUnlock(m_mutexTopoAccess);
@@ -6248,10 +6248,10 @@ nxmap_ObjList *Node::buildL2Topology(UINT32 *pdwStatus, int radius, bool include
 /**
  * Build IP topology
  */
-nxmap_ObjList *Node::buildIPTopology(UINT32 *pdwStatus, int radius, bool includeEndNodes)
+NetworkMapObjectList *Node::buildIPTopology(UINT32 *pdwStatus, int radius, bool includeEndNodes)
 {
    int nDepth = (radius < 0) ? ConfigReadInt(_T("TopologyDiscoveryRadius"), 5) : radius;
-   nxmap_ObjList *pResult = new nxmap_ObjList;
+   NetworkMapObjectList *pResult = new NetworkMapObjectList();
    buildIPTopologyInternal(*pResult, nDepth, 0, false, includeEndNodes);
    return pResult;
 }
@@ -6259,7 +6259,7 @@ nxmap_ObjList *Node::buildIPTopology(UINT32 *pdwStatus, int radius, bool include
 /**
  * Build IP topology
  */
-void Node::buildIPTopologyInternal(nxmap_ObjList &topology, int nDepth, UINT32 seedSubnet, bool vpnLink, bool includeEndNodes)
+void Node::buildIPTopologyInternal(NetworkMapObjectList &topology, int nDepth, UINT32 seedSubnet, bool vpnLink, bool includeEndNodes)
 {
    if (topology.isObjectExist(m_id))
    {
index 4ab98db..ff19753 100644 (file)
@@ -10423,22 +10423,20 @@ void ClientSession::queryL2Topology(NXCPMessage *pRequest)
                {
                        if (object->getObjectClass() == OBJECT_NODE)
                        {
-                               nxmap_ObjList *pTopology;
-
-                               pTopology = ((Node *)object)->getL2Topology();
-                               if (pTopology == NULL)
+                          NetworkMapObjectList *topology = ((Node *)object)->getL2Topology();
+                               if (topology == NULL)
                                {
-                                       pTopology = ((Node *)object)->buildL2Topology(&dwResult, -1, true);
+                                  topology = ((Node *)object)->buildL2Topology(&dwResult, -1, true);
                                }
                                else
                                {
                                        dwResult = RCC_SUCCESS;
                                }
-                               if (pTopology != NULL)
+                               if (topology != NULL)
                                {
                                        msg.setField(VID_RCC, RCC_SUCCESS);
-                                       pTopology->createMessage(&msg);
-                                       delete pTopology;
+                                       topology->createMessage(&msg);
+                                       delete topology;
                                }
                                else
                                {
index 6ea84fc..408d2f3 100644 (file)
@@ -234,7 +234,7 @@ bool Subnet::findMacAddress(const InetAddress& ipAddr, BYTE *macAddr)
 /**
  * Build IP topology
  */
-void Subnet::buildIPTopologyInternal(nxmap_ObjList &topology, int nDepth, UINT32 seedNode, bool includeEndNodes)
+void Subnet::buildIPTopologyInternal(NetworkMapObjectList &topology, int nDepth, UINT32 seedNode, bool includeEndNodes)
 {
        ObjectArray<Node> nodes;
        lockChildList(false);
index ec27fd7..f8d8b1d 100644 (file)
@@ -14,6 +14,7 @@ serverinclude_HEADERS = \
        hdlink.h \
        local_admin.h \
        nddrv.h \
+       netxms_maps.h \
        netxms_mt.h \
        nms_actions.h \
        nms_alarm.h \
similarity index 86%
rename from include/netxms_maps.h
rename to src/server/include/netxms_maps.h
index eebfff2..8a10de7 100644 (file)
@@ -1,6 +1,6 @@
 /*
 ** NetXMS - Network Management System
-** Copyright (C) 2003-2013 Victor Kirhenshtein
+** Copyright (C) 2003-2017 Victor Kirhenshtein
 **
 ** This program is free software; you can redistribute it and/or modify
 ** it under the terms of the GNU Lesser General Public License as published by
 #ifndef _netxms_maps_h_
 #define _netxms_maps_h_
 
-#ifdef _WIN32
-#ifdef LIBNXMAP_EXPORTS
-#define LIBNXMAP_EXPORTABLE __declspec(dllexport)
-#else
-#define LIBNXMAP_EXPORTABLE __declspec(dllimport)
-#endif
-#else    /* _WIN32 */
-#define LIBNXMAP_EXPORTABLE
-#endif
-
 #include <nxconfig.h>
 
-
 /**
  * Constants
  */
-
 #define MAX_CONNECTOR_NAME             128
 #define MAX_PORT_COUNT                 16
 #define MAX_BEND_POINTS       16
 
-
 /**
  * User access rights
  */
-
 #define MAP_ACCESS_READ       0x0001
 #define MAP_ACCESS_WRITE      0x0002
 #define MAP_ACCESS_ACL        0x0004
 #define MAP_ACCESS_DELETE     0x0008
 
-
 /**
  * Object link types
  */
-
 #define LINK_TYPE_NORMAL      0
 #define LINK_TYPE_VPN         1
 #define LINK_TYPE_MULTILINK   2
 
-
 /**
  * Link between objects
  */
@@ -83,25 +66,26 @@ public:
 
    ObjLink();
    ObjLink(UINT32 id1, UINT32 id2, LONG type, TCHAR* port1, TCHAR* port2, int portIdCount, UINT32* portIdArray1, UINT32* portIdArray2, TCHAR* config, UINT32 flags);
-   ObjLink(ObjLink* old);
+   ObjLink(const ObjLink *src);
    ~ObjLink();
  };
 
-
 /**
- * Connected object list - used as source for nxSubmap::DoLayout
+ * Connected object list
  */
-class LIBNXMAP_EXPORTABLE nxmap_ObjList
+class NetworkMapObjectList
 {
 protected:
    IntegerArray<UINT32> *m_objectList;
    ObjectArray<ObjLink> *m_linkList;
 
 public:
-   nxmap_ObjList();
-   nxmap_ObjList(nxmap_ObjList *src);
-   nxmap_ObjList(NXCPMessage *msg);
-   ~nxmap_ObjList();
+   NetworkMapObjectList();
+   NetworkMapObjectList(NetworkMapObjectList *src);
+   NetworkMapObjectList(NXCPMessage *msg);
+   ~NetworkMapObjectList();
+
+   void merge(const NetworkMapObjectList *src);
 
    void addObject(UINT32 id);
    void linkObjects(UINT32 id1, UINT32 id2, int linkType = LINK_TYPE_NORMAL, const TCHAR *linkName = NULL);
@@ -109,15 +93,15 @@ public:
    void removeObject(UINT32 id);
    void clear();
 
-   int getNumObjects() { return m_objectList->size(); }
+   int getNumObjects() const { return m_objectList->size(); }
    IntegerArray<UINT32> *getObjects() { return m_objectList; }
-   int getNumLinks() { return m_linkList->size(); }
+   int getNumLinks() const { return m_linkList->size(); }
    ObjectArray<ObjLink> *getLinks() { return m_linkList; }
 
        void createMessage(NXCPMessage *pMsg);
 
-       bool isLinkExist(UINT32 objectId1, UINT32 objectId2);
-       bool isObjectExist(UINT32 objectId);
+       bool isLinkExist(UINT32 objectId1, UINT32 objectId2) const;
+       bool isObjectExist(UINT32 objectId) const;
 };
 
 /**
@@ -151,7 +135,7 @@ public:
 /**
  * Generic map element
  */
-class LIBNXMAP_EXPORTABLE NetworkMapElement
+class NetworkMapElement
 {
 protected:
        UINT32 m_id;
@@ -181,7 +165,7 @@ public:
 /**
  * Object map element
  */
-class LIBNXMAP_EXPORTABLE NetworkMapObject : public NetworkMapElement
+class NetworkMapObject : public NetworkMapElement
 {
 protected:
        UINT32 m_objectId;
@@ -201,7 +185,7 @@ public:
 /**
  * Decoration map element
  */
-class LIBNXMAP_EXPORTABLE NetworkMapDecoration : public NetworkMapElement
+class NetworkMapDecoration : public NetworkMapElement
 {
 protected:
        LONG m_decorationType;
@@ -230,7 +214,7 @@ public:
 /**
  * DCI map conatainer
  */
-class LIBNXMAP_EXPORTABLE NetworkMapDCIContainer : public NetworkMapElement
+class NetworkMapDCIContainer : public NetworkMapElement
 {
 protected:
        TCHAR* m_xmlDCIList;
@@ -250,7 +234,7 @@ public:
 /**
  * DCI map image
  */
-class LIBNXMAP_EXPORTABLE NetworkMapDCIImage : public NetworkMapElement
+class NetworkMapDCIImage : public NetworkMapElement
 {
 protected:
        TCHAR* m_config;
@@ -270,7 +254,7 @@ public:
 /**
  * Link on map
  */
-class LIBNXMAP_EXPORTABLE NetworkMapLink
+class NetworkMapLink
 {
 protected:
        UINT32 m_element1;
@@ -308,5 +292,4 @@ public:
        void swap();
 };
 
-
 #endif
index 733454a..92949cf 100644 (file)
@@ -1470,7 +1470,7 @@ protected:
        int m_adoptedApCount;
        int m_totalApCount;
        BYTE m_baseBridgeAddress[MAC_ADDR_LENGTH];      // Bridge base address (dot1dBaseBridgeAddress in bridge MIB)
-       nxmap_ObjList *m_pTopology;
+       NetworkMapObjectList *m_topology;
        time_t m_topologyRebuildTimestamp;
        ServerJobQueue *m_jobQueue;
        ComponentTree *m_components;            // Hardware components
@@ -1542,7 +1542,7 @@ protected:
    bool connectToAgent(UINT32 *error = NULL, UINT32 *socketError = NULL, bool *newConnection = NULL, bool forceConnect = false);
    void setLastAgentCommTime() { time_t now = time(NULL); if (m_lastAgentCommTime < now - 60) { m_lastAgentCommTime = now; setModified(); } }
 
-       void buildIPTopologyInternal(nxmap_ObjList &topology, int nDepth, UINT32 seedObject, bool vpnLink, bool includeEndNodes);
+       void buildIPTopologyInternal(NetworkMapObjectList &topology, int nDepth, UINT32 seedObject, bool vpnLink, bool includeEndNodes);
 
        virtual bool isDataCollectionDisabled();
    virtual void collectProxyInfo(ProxyInfo *info);
@@ -1760,14 +1760,14 @@ public:
    UINT32 callSnmpEnumerate(const TCHAR *pszRootOid,
       UINT32 (* pHandler)(SNMP_Variable *, SNMP_Transport *, void *), void *pArg, const TCHAR *context = NULL);
 
-       nxmap_ObjList *getL2Topology();
-       nxmap_ObjList *buildL2Topology(UINT32 *pdwStatus, int radius, bool includeEndNodes);
+   NetworkMapObjectList *getL2Topology();
+   NetworkMapObjectList *buildL2Topology(UINT32 *pdwStatus, int radius, bool includeEndNodes);
        ForwardingDatabase *getSwitchForwardingDatabase();
        NetObj *findConnectionPoint(UINT32 *localIfId, BYTE *localMacAddr, int *type);
        void addHostConnections(LinkLayerNeighbors *nbs);
        void addExistingConnections(LinkLayerNeighbors *nbs);
 
-       nxmap_ObjList *buildIPTopology(UINT32 *pdwStatus, int radius, bool includeEndNodes);
+       NetworkMapObjectList *buildIPTopology(UINT32 *pdwStatus, int radius, bool includeEndNodes);
 
        ServerJobQueue *getJobQueue() { return m_jobQueue; }
        int getJobCount(const TCHAR *type = NULL) { return m_jobQueue->getJobCount(type); }
@@ -1919,7 +1919,7 @@ inline void Node::lockForRoutePoll()
  */
 class NXCORE_EXPORTABLE Subnet : public NetObj
 {
-       friend void Node::buildIPTopologyInternal(nxmap_ObjList &topology, int nDepth, UINT32 seedSubnet, bool vpnLink, bool includeEndNodes);
+       friend void Node::buildIPTopologyInternal(NetworkMapObjectList &topology, int nDepth, UINT32 seedSubnet, bool vpnLink, bool includeEndNodes);
 
 protected:
    InetAddress m_ipAddress;
@@ -1930,7 +1930,7 @@ protected:
 
    virtual void fillMessageInternal(NXCPMessage *pMsg);
 
-   void buildIPTopologyInternal(nxmap_ObjList &topology, int nDepth, UINT32 seedNode, bool includeEndNodes);
+   void buildIPTopologyInternal(NetworkMapObjectList &topology, int nDepth, UINT32 seedNode, bool includeEndNodes);
 
 public:
    Subnet();
@@ -2383,7 +2383,7 @@ protected:
    virtual void fillMessageInternal(NXCPMessage *pMsg);
    virtual UINT32 modifyFromMessageInternal(NXCPMessage *pRequest);
 
-       void updateObjects(nxmap_ObjList *objects);
+       void updateObjects(NetworkMapObjectList *objects);
        UINT32 objectIdFromElementId(UINT32 eid);
        UINT32 elementIdFromObjectId(UINT32 eid);
 
index 1e057e6..df2dcbe 100644 (file)
@@ -267,7 +267,7 @@ public:
 //
 
 NetworkPath *TraceRoute(Node *pSrc, Node *pDest);
-void BuildL2Topology(nxmap_ObjList &topology, Node *root, int nDepth, bool includeEndNodes);
+void BuildL2Topology(NetworkMapObjectList &topology, Node *root, int nDepth, bool includeEndNodes);
 ForwardingDatabase *GetSwitchForwardingDatabase(Node *node);
 NetObj *FindInterfaceConnectionPoint(const BYTE *macAddr, int *type);