Changeset 475
- Timestamp:
- 04/07/06 03:35:24 (2 years ago)
- Files:
-
- library/trunk/modules/dnsresolve-adns/Makefile.am (modified) (2 diffs)
- library/trunk/modules/dnsresolve-adns/dnsresolve-adns.cpp (modified) (6 diffs)
- library/trunk/modules/dnsresolve-adns/dnsresolve-adns.hpp (modified) (6 diffs)
- library/trunk/modules/geolocation-geoip/Makefile.am (modified) (2 diffs)
- library/trunk/modules/geolocation-geoip/geolocation-geoip.cpp (modified) (6 diffs)
- library/trunk/modules/geolocation-geoip/geolocation-geoip.hpp (modified) (6 diffs)
- library/trunk/modules/geolocation-ip2location/Makefile.am (modified) (2 diffs)
- library/trunk/modules/geolocation-ip2location/geolocation-ip2location.conf.dist (modified) (1 diff)
- library/trunk/modules/geolocation-ip2location/geolocation-ip2location.cpp (modified) (6 diffs)
- library/trunk/modules/geolocation-ip2location/geolocation-ip2location.hpp (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
library/trunk/modules/dnsresolve-adns/Makefile.am
r332 r475 1 # nepenthesmodule Makefile1 # library module Makefile 2 2 # Paul Baecher, Maximillian Dornseif, Markus Koetter 3 3 # $Id$ … … 5 5 AUTOMAKE_OPTIONS = foreign 6 6 7 AM_CPPFLAGS = -I$(top_srcdir)/ nepenthes-core/include -I$(top_srcdir)/nepenthes-core/src -pipe -D _GNU_SOURCE7 AM_CPPFLAGS = -I$(top_srcdir)/library-core/include -I$(top_srcdir)/library-core/src -pipe -D _GNU_SOURCE 8 8 AM_CXXFLAGS = -Wall -Werror 9 9 AM_LDFLAGS = -ladns library/trunk/modules/dnsresolve-adns/dnsresolve-adns.cpp
r408 r475 1 1 /******************************************************************************** 2 * Nepenthes2 * Library 3 3 * - finest collection - 4 4 * … … 22 22 * 23 23 * 24 * contact nepenthesdev@users.sourceforge.net24 * contact librarydev@users.sourceforge.net 25 25 * 26 26 *******************************************************************************/ … … 51 51 using namespace std; 52 52 53 using namespace nepenthes;54 55 Nepenthes *g_Nepenthes;56 57 DNSResolverADNS::DNSResolverADNS( Nepenthes *nepenthes)53 using namespace library; 54 55 Library *g_Library; 56 57 DNSResolverADNS::DNSResolverADNS(Library *library) 58 58 { 59 59 m_ModuleName = "dnsresolve-adns"; … … 68 68 m_Timeout = 0; 69 69 70 g_ Nepenthes = nepenthes;70 g_Library = library; 71 71 } 72 72 … … 86 86 } 87 87 88 g_ Nepenthes->getDNSMgr()->registerDNSHandler(this);88 g_Library->getDNSMgr()->registerDNSHandler(this); 89 89 REG_EVENT_HANDLER(this); 90 90 logDebug("%s","adns_init() Success\n"); … … 223 223 224 224 225 extern "C" int32_t module_init(int32_t version, Module **module, Nepenthes *nepenthes)225 extern "C" int32_t module_init(int32_t version, Module **module, Library *library) 226 226 { 227 227 if (version == MODULE_IFACE_VERSION) { 228 *module = new DNSResolverADNS( nepenthes);228 *module = new DNSResolverADNS(library); 229 229 return 1; 230 230 } else { library/trunk/modules/dnsresolve-adns/dnsresolve-adns.hpp
r332 r475 1 1 /******************************************************************************** 2 * Nepenthes2 * Library 3 3 * - finest collection - 4 4 * … … 22 22 * 23 23 * 24 * contact nepenthesdev@users.sourceforge.net24 * contact librarydev@users.sourceforge.net 25 25 * 26 26 *******************************************************************************/ … … 32 32 #include "Module.hpp" 33 33 #include "ModuleManager.hpp" 34 #include " Nepenthes.hpp"34 #include "Library.hpp" 35 35 #include "Socket.hpp" 36 36 … … 41 41 using namespace std; 42 42 43 namespace nepenthes43 namespace library 44 44 { 45 45 struct ADNSContext … … 52 52 { 53 53 public: 54 DNSResolverADNS( Nepenthes*);54 DNSResolverADNS(Library *); 55 55 ~DNSResolverADNS(); 56 56 … … 72 72 } 73 73 74 extern nepenthes::Nepenthes *g_Nepenthes;74 extern library::Library *g_Library; library/trunk/modules/geolocation-geoip/Makefile.am
r332 r475 1 # nepenthesmodule Makefile1 # library module Makefile 2 2 # Paul Baecher, Maximillian Dornseif, Markus Koetter 3 3 # $Id$ … … 5 5 AUTOMAKE_OPTIONS = foreign 6 6 7 AM_CPPFLAGS = -I$(top_srcdir)/ nepenthes-core/include -I$(top_srcdir)/nepenthes-core/src -I/opt/geoip/include/ -pipe -D _GNU_SOURCE7 AM_CPPFLAGS = -I$(top_srcdir)/library-core/include -I$(top_srcdir)/library-core/src -I/opt/geoip/include/ -pipe -D _GNU_SOURCE 8 8 AM_CXXFLAGS = -Wall -Werror 9 9 # AM_LDFLAGS = /opt/geoip/lib/libGeoIP.a library/trunk/modules/geolocation-geoip/geolocation-geoip.cpp
r332 r475 1 1 /******************************************************************************** 2 * Nepenthes2 * Library 3 3 * - finest collection - 4 4 * … … 22 22 * 23 23 * 24 * contact nepenthesdev@users.sourceforge.net24 * contact librarydev@users.sourceforge.net 25 25 * 26 26 *******************************************************************************/ … … 59 59 #define STDTAGS l_mod 60 60 61 using namespace nepenthes;61 using namespace library; 62 62 63 63 64 64 /** 65 * as we may need a global pointer to our Nepenthesin our modules,66 * and cant access the cores global pointer to nepenthes67 * we have to use a own global pointer to nepenthesper module65 * as we may need a global pointer to our Library in our modules, 66 * and cant access the cores global pointer to library 67 * we have to use a own global pointer to library per module 68 68 * we need this pointer for logInfo() etc 69 69 */ 70 Nepenthes *g_Nepenthes;70 Library *g_Library; 71 71 72 72 /** … … 83 83 * - m_DialogueFactoryDescription 84 84 * 85 * @param nepenthes the pointer to our Nepenthes85 * @param library the pointer to our Library 86 86 */ 87 GeoLocationGeoIp::GeoLocationGeoIp( Nepenthes *nepenthes)87 GeoLocationGeoIp::GeoLocationGeoIp(Library *library) 88 88 { 89 89 m_ModuleName = "geolocation-geoip"; 90 90 m_ModuleDescription = "resolve ips to coordinates using maxdata geoip city"; 91 91 m_ModuleRevision = "$Rev$"; 92 m_ Nepenthes = nepenthes;92 m_Library = library; 93 93 94 g_ Nepenthes = nepenthes;94 g_Library = library; 95 95 } 96 96 … … 114 114 m_GeoIP = GeoIP_open("/opt/geoip/share/GeoIP/GeoIPCity.dat", GEOIP_INDEX_CACHE); 115 115 116 if ( g_ Nepenthes->getGeoMgr()->registerGeolocationHandler(this) == false)116 if ( g_Library->getGeoMgr()->registerGeolocationHandler(this) == false) 117 117 { 118 118 logCrit("%s","Could not register as GeolocationHandler\n"); … … 151 151 } 152 152 153 extern "C" int32_t module_init(int32_t version, Module **module, Nepenthes *nepenthes)153 extern "C" int32_t module_init(int32_t version, Module **module, Library *library) 154 154 { 155 155 if (version == MODULE_IFACE_VERSION) { 156 *module = new GeoLocationGeoIp( nepenthes);156 *module = new GeoLocationGeoIp(library); 157 157 return 1; 158 158 } else { library/trunk/modules/geolocation-geoip/geolocation-geoip.hpp
r332 r475 1 1 /******************************************************************************** 2 * Nepenthes2 * Library 3 3 * - finest collection - 4 4 * … … 22 22 * 23 23 * 24 * contact nepenthesdev@users.sourceforge.net24 * contact librarydev@users.sourceforge.net 25 25 * 26 26 *******************************************************************************/ … … 40 40 #include "ModuleManager.hpp" 41 41 #include "SocketManager.hpp" 42 #include " Nepenthes.hpp"42 #include "Library.hpp" 43 43 #include "Dialogue.hpp" 44 44 #include "Socket.hpp" … … 49 49 using namespace std; 50 50 51 namespace nepenthes51 namespace library 52 52 { 53 53 … … 55 55 { 56 56 public: 57 GeoLocationGeoIp( Nepenthes*);57 GeoLocationGeoIp(Library *); 58 58 ~GeoLocationGeoIp(); 59 59 bool Init(); … … 68 68 }; 69 69 } 70 extern nepenthes::Nepenthes *g_Nepenthes;70 extern library::Library *g_Library; 71 71 72 72 #endif // HAVE_GEOLOCATION library/trunk/modules/geolocation-ip2location/Makefile.am
r339 r475 1 # nepenthesmodule Makefile1 # library module Makefile 2 2 # Paul Baecher, Maximillian Dornseif, Markus Koetter 3 3 # $Id$ … … 5 5 AUTOMAKE_OPTIONS = foreign 6 6 7 AM_CPPFLAGS = -I$(top_srcdir)/ nepenthes-core/include -I$(top_srcdir)/nepenthes-core/src -I/opt/ip2location/include/ -pipe -D _GNU_SOURCE7 AM_CPPFLAGS = -I$(top_srcdir)/library-core/include -I$(top_srcdir)/library-core/src -I/opt/ip2location/include/ -pipe -D _GNU_SOURCE 8 8 AM_CXXFLAGS = -Wall -Werror 9 9 AM_LDFLAGS = $IP2LOCATION_LIBS library/trunk/modules/geolocation-ip2location/geolocation-ip2location.conf.dist
r339 r475 1 1 geolocation-ip2location 2 2 { 3 path "/opt/ nepenthes/var/cache/nepenthes/IP-COUNTRY-REGION-CITY-LATITUDE-LONGITUDE.BIN";3 path "/opt/library/var/cache/library/IP-COUNTRY-REGION-CITY-LATITUDE-LONGITUDE.BIN"; 4 4 }; library/trunk/modules/geolocation-ip2location/geolocation-ip2location.cpp
r336 r475 1 1 /******************************************************************************** 2 * Nepenthes2 * Library 3 3 * - finest collection - 4 4 * … … 22 22 * 23 23 * 24 * contact nepenthesdev@users.sourceforge.net24 * contact librarydev@users.sourceforge.net 25 25 * 26 26 *******************************************************************************/ … … 61 61 #define STDTAGS l_mod 62 62 63 using namespace nepenthes;63 using namespace library; 64 64 65 65 66 66 /** 67 * as we may need a global pointer to our Nepenthesin our modules,68 * and cant access the cores global pointer to nepenthes69 * we have to use a own global pointer to nepenthesper module67 * as we may need a global pointer to our Library in our modules, 68 * and cant access the cores global pointer to library 69 * we have to use a own global pointer to library per module 70 70 * we need this pointer for logInfo() etc 71 71 */ 72 Nepenthes *g_Nepenthes;72 Library *g_Library; 73 73 74 74 /** … … 85 85 * - m_DialogueFactoryDescription 86 86 * 87 * @param nepenthes the pointer to our Nepenthes87 * @param library the pointer to our Library 88 88 */ 89 GeoLocationIp2Location::GeoLocationIp2Location( Nepenthes *nepenthes)89 GeoLocationIp2Location::GeoLocationIp2Location(Library *library) 90 90 { 91 91 m_ModuleName = "geolocation-ip2location"; 92 92 m_ModuleDescription = "resolve ips to coordinates using p2location DB5"; 93 93 m_ModuleRevision = "$Rev$"; 94 m_ Nepenthes = nepenthes;94 m_Library = library; 95 95 96 g_ Nepenthes = nepenthes;96 g_Library = library; 97 97 } 98 98 … … 137 137 138 138 139 if ( g_ Nepenthes->getGeoMgr()->registerGeolocationHandler(this) == false)139 if ( g_Library->getGeoMgr()->registerGeolocationHandler(this) == false) 140 140 { 141 141 logCrit("%s","Could not register as GeolocationHandler\n"); … … 178 178 } 179 179 180 extern "C" int32_t module_init(int32_t version, Module **module, Nepenthes *nepenthes)180 extern "C" int32_t module_init(int32_t version, Module **module, Library *library) 181 181 { 182 182 if (version == MODULE_IFACE_VERSION) { 183 *module = new GeoLocationIp2Location( nepenthes);183 *module = new GeoLocationIp2Location(library); 184 184 return 1; 185 185 } else { library/trunk/modules/geolocation-ip2location/geolocation-ip2location.hpp
r336 r475 1 1 /******************************************************************************** 2 * Nepenthes2 * Library 3 3 * - finest collection - 4 4 * … … 22 22 * 23 23 * 24 * contact nepenthesdev@users.sourceforge.net24 * contact librarydev@users.sourceforge.net 25 25 * 26 26 *******************************************************************************/ … … 40 40 #include "ModuleManager.hpp" 41 41 #include "SocketManager.hpp" 42 #include " Nepenthes.hpp"42 #include "Library.hpp" 43 43 #include "Dialogue.hpp" 44 44 #include "Socket.hpp" … … 49 49 using namespace std; 50 50 51 namespace nepenthes51 namespace library 52 52 { 53 53 … … 55 55 { 56 56 public: 57 GeoLocationIp2Location( Nepenthes*);57 GeoLocationIp2Location(Library *); 58 58 ~GeoLocationIp2Location(); 59 59 bool Init(); … … 69 69 }; 70 70 } 71 extern nepenthes::Nepenthes *g_Nepenthes;71 extern library::Library *g_Library; 72 72 73 73 #endif // HAVE_GEOLOCATION
