]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Merge pull request #96 in SNORT/snort3 from crc/dynamic to master
authorRuss Combs (rucombs) <rucombs@cisco.com>
Fri, 23 Oct 2015 13:03:29 +0000 (09:03 -0400)
committerRuss Combs (rucombs) <rucombs@cisco.com>
Fri, 23 Oct 2015 13:03:29 +0000 (09:03 -0400)
Squashed commit of the following:

commit 8c5b03c1f1111e0470087d05a91ea1302f56999a
Author: Russ Combs <rucombs@cisco.com>
Date:   Fri Oct 23 08:31:05 2015 -0400

    fixup dynamic builds

42 files changed:
doc/bugs.txt
extra/src/ips_options/ips_pkt_num.cc
extra/src/ips_options/ips_urg.cc
src/CMakeLists.txt
src/Makefile.am
src/actions/CMakeLists.txt
src/file_api/file_api.h
src/file_api/file_flows.h
src/file_api/file_service.h
src/flow/flow.h
src/ips_options/CMakeLists.txt
src/ips_options/Makefile.am
src/ips_options/ips_hash.cc
src/log/log_text.h
src/log/obfuscation.h
src/main/snort_config.cc
src/main/snort_config.h
src/mime/file_mime_paf.h
src/mime/file_mime_process.h
src/network_inspectors/arp_spoof/CMakeLists.txt
src/parser/parser.cc
src/search_engines/pat_stats.h
src/service_inspectors/CMakeLists.txt
src/service_inspectors/gtp/CMakeLists.txt
src/service_inspectors/http_inspect/CMakeLists.txt
src/service_inspectors/http_inspect/Makefile.am
src/service_inspectors/http_inspect/http_inspect.cc
src/service_inspectors/imap/CMakeLists.txt
src/service_inspectors/imap/Makefile.am
src/service_inspectors/imap/imap.cc
src/service_inspectors/modbus/modbus.cc
src/service_inspectors/pop/CMakeLists.txt
src/service_inspectors/pop/Makefile.am
src/service_inspectors/pop/pop.cc
src/service_inspectors/service_inspectors.cc
src/service_inspectors/smtp/CMakeLists.txt
src/service_inspectors/smtp/Makefile.am
src/service_inspectors/smtp/smtp.cc
src/service_inspectors/ssl/CMakeLists.txt
src/service_inspectors/ssl/Makefile.am
src/service_inspectors/ssl/ssl_inspector.cc
src/sfip/sf_ip.h

index dc2990dbe6bfbdbbf08ef14318c10dc74af86c8b..3220e9a63a12dcb7ad473d5b2c225e6b468cb5b9 100644 (file)
 * With cmake, make install will rebuild the docs even though when already
   built.
 
-* IPS option hash and inspectors pop, imap, smtp, and ssl fail to build
-  dynamically due to missing symbols in hash/ and protocols/ despite them
-  being declared SO_PUBLIC.
-
 * Enabling large pcap may erroneously affect the number of packets processed
   from pcaps
 
index d3d5fafe03f6a9c3a8cbb8536efe2b2e35e7e057..af9d64695d45a43a7c4d50afef95c6006cf16d7e 100644 (file)
@@ -89,8 +89,7 @@ bool PktNumOption::operator==(const IpsOption& ips) const
 
 int PktNumOption::eval(Cursor&, Packet*)
 {
-    PROFILE_VARS;
-    MODULE_PROFILE_START(pkt_num_perf_stats);
+    PERF_PROFILE(pkt_num_perf_stats);
 
     int rval;
 
@@ -100,7 +99,6 @@ int PktNumOption::eval(Cursor&, Packet*)
     else
         rval = DETECTION_OPTION_NO_MATCH;
 
-    MODULE_PROFILE_END(pkt_num_perf_stats);
     return rval;
 }
 
index f5fdb6c6ceba35cb480a1a5eb0d8685e263d3dc3..485c0b65b2955ac58a77cb4cb69a76281eebc4b7 100644 (file)
@@ -88,8 +88,7 @@ bool TcpUrgOption::operator==(const IpsOption& ips) const
 
 int TcpUrgOption::eval(Cursor&, Packet* p)
 {
-    PROFILE_VARS;
-    MODULE_PROFILE_START(tcpUrgPerfStats);
+    PERF_PROFILE(tcpUrgPerfStats);
 
     int rval = DETECTION_OPTION_NO_MATCH;
 
@@ -99,7 +98,6 @@ int TcpUrgOption::eval(Cursor&, Packet* p)
         rval = DETECTION_OPTION_MATCH;
     }
 
-    MODULE_PROFILE_END(tcpUrgPerfStats);
     return rval;
 }
 
index f279dffe1d675a18ee78396cf77b2060f1c6fb66..0d2f4c1368596f68788d448e071ae1f553d5f6bb 100644 (file)
@@ -41,14 +41,10 @@ if (STATIC_INSPECTORS)
         back_orifice
         dns
         ftp_telnet
-       imap
         nhttp_inspect
-       pop
         rpc_decode
         sip
-        smtp
         ssh
-        ssl
         wizard
     )
 endif()
@@ -106,6 +102,10 @@ target_link_libraries( snort
     file_api
     mime
     http_inspect
+    imap
+    pop
+    smtp
+    ssl
     ${PIGLET_LIBRARIES}
     ips_options
     search_engines
index ef62c41c3ea161dfd1644c29dfd047d5fb7bbd4c..91bc097c416ecec1c8f3642594393f825da09a5b 100644 (file)
@@ -12,15 +12,11 @@ service_inspectors/back_orifice/libback_orifice.a \
 service_inspectors/dns/libdns.a \
 service_inspectors/ftp_telnet/libftp_telnet.a \
 service_inspectors/gtp/libgtp_inspect.a \
-service_inspectors/imap/libimap.a \
 service_inspectors/modbus/libmodbus.a \
 service_inspectors/nhttp_inspect/libnhttp_inspect.a \
-service_inspectors/pop/libpop.a \
 service_inspectors/rpc_decode/librpc_decode.a \
 service_inspectors/sip/libsip.a \
-service_inspectors/smtp/libsmtp.a \
 service_inspectors/ssh/libssh.a \
-service_inspectors/ssl/libssl.a \
 service_inspectors/wizard/libwizard.a
 endif
 
@@ -59,6 +55,10 @@ network_inspectors/normalize/libnormalize.a \
 network_inspectors/perf_monitor/libperf_monitor.a \
 service_inspectors/libservice_inspectors.a \
 $(lib_list) \
+service_inspectors/imap/libimap.a \
+service_inspectors/pop/libpop.a \
+service_inspectors/smtp/libsmtp.a \
+service_inspectors/ssl/libssl.a \
 network_inspectors/port_scan/libport_scan.a \
 stream/libstream.a \
 stream/base/libstream_base.a \
index 02acf837543e845dc9910f8232e767de20213bfd..fdb347570537cefbfa7aef7acc217b1708b838c2 100644 (file)
@@ -28,8 +28,8 @@ else (STATIC_IPS_ACTIONS)
         ${IPS_ACTION_SOURCES}
     )
 
-    add_shared_library(act_react actions act_react.cc)
-    add_shared_library(act_reject actions act_reject.cc)
+    add_shared_library(act_react ips_actions act_react.cc)
+    add_shared_library(act_reject ips_actions act_reject.cc)
 
 endif (STATIC_IPS_ACTIONS)
 
index 92e53ad73069608d649035f28b82fea6199bf130..6846e3885262c6cd88be0fdb6fd6905f57b4c0f2 100644 (file)
@@ -154,8 +154,8 @@ static inline bool isFileEnd(FilePosition position)
     return ((position == SNORT_FILE_END) || (position == SNORT_FILE_FULL));
 }
 
-uint64_t get_file_processed_size(Flow* flow);
+SO_PUBLIC uint64_t get_file_processed_size(Flow* flow);
 FilePosition get_file_position(Packet* pkt);
 
-#endif /* FILE_API_H */
+#endif
 
index 5c49e4a7245ba3534cb21379fd59540248716b84..c0352b1d7147c8a5455f91bc1fcbb0030804cbd3 100644 (file)
@@ -29,7 +29,7 @@
 
 class FileContext;
 
-class FileFlows:public FlowData
+class SO_PUBLIC FileFlows : public FlowData
 {
 public:
 
index 8810cf1b06ef4a3179b3b8c20fce2e4f41de988c..dc81f4ad2ad1a9f452586b2db8ade91e8f0680ae 100644 (file)
@@ -25,8 +25,9 @@
 // This provides a wrapper to start/stop file service
 
 #include <sys/types.h>
+#include "main/snort_types.h"
 
-class FileService
+class SO_PUBLIC FileService
 {
 public:
     // This must be called when snort restarts
index 9ef6b1d1c0404d8f8974f9da756d1cef634c8a86..4497cd24953e90982642fc79a62271ba4cf52c5f 100644 (file)
@@ -126,7 +126,7 @@ struct LwState
 };
 
 // this struct is organized by member size for compactness
-class Flow
+class SO_PUBLIC Flow
 {
 public:
     enum FlowState
index ffc8d1815f16ad63327d0b6791d44948f651471e..b31e4bf7e317a78375ec3b3c2724111eb29b4d30 100644 (file)
@@ -15,7 +15,6 @@ SET( PLUGIN_LIST
     ips_fragbits.cc
     ips_fragoffset.cc
     ips_gid.cc
-    ips_hash.cc
     ips_http.cc
     ips_http_header.cc
     ips_icmp_id.cc
@@ -58,6 +57,7 @@ set (IPS_SOURCES
     ips_flow.h
     ips_flowbits.cc
     ips_flowbits.h
+    ips_hash.cc
     ips_luajit.cc
     ips_metadata.cc
     ips_options.cc
@@ -95,7 +95,6 @@ else (STATIC_IPS_OPTIONS)
     add_shared_library(ips_fragbits ips_options ips_fragbits.cc)
     add_shared_library(ips_fragoffset ips_options ips_fragoffset.cc)
     add_shared_library(ips_gid ips_options ips_gid.cc)
-    add_shared_library(ips_hash ips_options ips_hash.cc)
     add_shared_library(ips_http ips_options ips_http.cc)
     add_shared_library(ips_http_header ips_options ips_http_header.cc)
     add_shared_library(ips_icode ips_options ips_icode.cc)
index 1ca5d04fe7a180995bdd38eb485806150b73d640..2665a3dd3f518f21ded14fdfa43caad2b715bc04 100644 (file)
@@ -14,7 +14,6 @@ ips_flags.cc \
 ips_fragbits.cc \
 ips_fragoffset.cc \
 ips_gid.cc \
-ips_hash.cc \
 ips_http.cc \
 ips_http_header.cc \
 ips_icmp_id.cc \
@@ -51,6 +50,7 @@ ips_dsize.cc \
 ips_file_data.cc \
 ips_flow.cc ips_flow.h \
 ips_flowbits.cc ips_flowbits.h \
+ips_hash.cc \
 ips_luajit.cc \
 ips_metadata.cc \
 ips_options.cc ips_options.h \
@@ -125,10 +125,11 @@ libips_gid_la_CXXFLAGS = $(AM_CXXFLAGS) -DBUILDING_SO
 libips_gid_la_LDFLAGS = -export-dynamic -shared
 libips_gid_la_SOURCES = ips_gid.cc
 
-optlib_LTLIBRARIES += libips_hash.la
-libips_hash_la_CXXFLAGS = $(AM_CXXFLAGS) -DBUILDING_SO
-libips_hash_la_LDFLAGS = -export-dynamic -shared
-libips_hash_la_SOURCES = ips_hash.cc
+# can't be linked dynamically yet
+#optlib_LTLIBRARIES += libips_hash.la
+#libips_hash_la_CXXFLAGS = $(AM_CXXFLAGS) -DBUILDING_SO
+#libips_hash_la_LDFLAGS = -export-dynamic -shared
+#libips_hash_la_SOURCES = ips_hash.cc
 
 optlib_LTLIBRARIES += libips_http.la
 libips_http_la_CXXFLAGS = $(AM_CXXFLAGS) -DBUILDING_SO
index 1f11229e1c5098f0cbf83848375062e9ed61b5b0..53052938d87d2445ff72edc3b7949b376b270ea0 100644 (file)
@@ -493,17 +493,18 @@ static const IpsApi sha512_api =
 // plugins
 //-------------------------------------------------------------------------
 
-#ifdef BUILDING_SO
-SO_PUBLIC const BaseApi* snort_plugins[] =
-{
-    &md5_api.base,
-    &sha256_api.base,
-    &sha512_api.base,
-    nullptr
-};
-#else
+// can't be linked dynamically yet
+//#ifdef BUILDING_SO
+//SO_PUBLIC const BaseApi* snort_plugins[] =
+//{
+//    &md5_api.base,
+//    &sha256_api.base,
+//    &sha512_api.base,
+//    nullptr
+//};
+//#else
 const BaseApi* ips_md5 = &md5_api.base;
 const BaseApi* ips_sha256 = &sha256_api.base;
 const BaseApi* ips_sha512 = &sha512_api.base;
-#endif
+//#endif
 
index 8dc5e21ba93893100a99c74ac210e0b445818d3d..5a17b5110e2dccb5e143b49b68b8ce466c003366 100644 (file)
@@ -36,24 +36,25 @@ namespace tcp { struct TCPHdr; }
 
 typedef ip::IP4Hdr IP4Hdr;
 
-void LogPriorityData(TextLog*, const Event*, bool doNewLine);
-void LogXrefs(TextLog*, const Event*, bool doNewLine);
+SO_PUBLIC void LogPriorityData(TextLog*, const Event*, bool doNewLine);
+SO_PUBLIC void LogXrefs(TextLog*, const Event*, bool doNewLine);
 
-void LogIPPkt(TextLog*, Packet*);
-void LogPayload(TextLog*, Packet*);
-void LogNetData(TextLog*, const uint8_t* data, const int len, Packet*);
+SO_PUBLIC void LogIPPkt(TextLog*, Packet*);
+SO_PUBLIC void LogPayload(TextLog*, Packet*);
+SO_PUBLIC void LogNetData(TextLog*, const uint8_t* data, const int len, Packet*);
 
-void LogDiv(TextLog*);
-void LogTimeStamp(TextLog*, Packet*);
+SO_PUBLIC void LogDiv(TextLog*);
+SO_PUBLIC void LogTimeStamp(TextLog*, Packet*);
 
-void LogTrHeader(TextLog*, Packet*);
-void Log2ndHeader(TextLog*, Packet*);
-void LogIpAddrs(TextLog*, Packet*);
+SO_PUBLIC void LogTrHeader(TextLog*, Packet*);
+SO_PUBLIC void Log2ndHeader(TextLog*, Packet*);
 
-void LogIPHeader(TextLog*, Packet*);
-void LogTCPHeader(TextLog*, Packet*);
-void LogUDPHeader(TextLog*, Packet*);
-void LogICMPHeader(TextLog*, Packet*);
+SO_PUBLIC void LogTCPHeader(TextLog*, Packet*);
+SO_PUBLIC void LogUDPHeader(TextLog*, Packet*);
+SO_PUBLIC void LogICMPHeader(TextLog*, Packet*);
+
+SO_PUBLIC void LogIpAddrs(TextLog*, Packet*);
+SO_PUBLIC void LogIPHeader(TextLog*, Packet*);
 
 SO_PUBLIC void LogIpOptions(TextLog*, const IP4Hdr*, uint16_t valid_ip4_len);
 SO_PUBLIC void LogTcpOptions(TextLog*, const tcp::TCPHdr*, uint16_t valid_tcp_len);
index d9d99f8427675e902516705a6bc2215553d430fc..bd8873dd24bb41a040e633cbcecf2a4866c81944 100644 (file)
@@ -23,6 +23,7 @@
 extern "C" {
 #include <daq.h>
 }
+#include "main/snort_types.h"
 #include "protocols/packet.h"
 
 /*******************************************************************************
@@ -256,7 +257,7 @@ typedef struct _ObfuscationApi
 } ObfuscationApi;
 
 /* For access when including header */
-extern ObfuscationApi* obApi;
+SO_PUBLIC extern ObfuscationApi* obApi;
 
 #endif
 
index 5b46f2d727dcf5f3d69b9eb8409cbc9b895175c1..952d2e179a8017acd5601707c60f04b093f41168 100644 (file)
@@ -58,6 +58,7 @@
 #include "sfip/sf_ip.h"
 
 THREAD_LOCAL SnortConfig* snort_conf = nullptr;
+uint32_t SnortConfig::warning_flags = 0;
 
 //-------------------------------------------------------------------------
 // private implementation
index e004084235fcf08483763dbf40d6088f3d7bba5a..e0e53957c281fa09dc36e38d7a969e066ad853b9 100644 (file)
@@ -143,6 +143,11 @@ public:
     void merge(SnortConfig*);
 
 public:
+    //------------------------------------------------------
+    // non-reloadable stuff (single instance)
+    // FIXIT-L non-reloadable stuff should be made static
+    static uint32_t warning_flags;
+
     //------------------------------------------------------
     // alert module stuff
     bool default_rule_state = true;
@@ -153,7 +158,6 @@ public:
     // output module stuff
     uint32_t output_flags = 0;
     uint32_t logging_flags = 0;
-    uint32_t warning_flags = 0;
 
     uint8_t log_ipv6_extra = 0;
     uint16_t event_trace_max = 0;
index 8a065f2bde2bb3e9722223d24c318fb2970f1b5d..b4721f9a0041f2cf74b8bda58f4a4c7577f0ccb0 100644 (file)
@@ -83,10 +83,10 @@ static inline bool scanning_boundary(MimeDataPafInfo* mime_info, uint32_t bounda
     return false;
 }
 
-void reset_mime_paf_state(MimeDataPafInfo *data_info);
+SO_PUBLIC void reset_mime_paf_state(MimeDataPafInfo *data_info);
 /*  Process data boundary and flush each file based on boundary*/
-bool process_mime_paf_data(MimeDataPafInfo *data_info,  uint8_t val);
-bool check_data_end(void *end_state,  uint8_t val);
+SO_PUBLIC bool process_mime_paf_data(MimeDataPafInfo *data_info,  uint8_t val);
+SO_PUBLIC bool check_data_end(void *end_state,  uint8_t val);
 
 #endif
 
index 1c2ea056ec5230027550b6546c7a140c8ebf3a47..3282bb026e92ffa79addee4c357b6a91f64aa514 100644 (file)
@@ -25,6 +25,7 @@
 // Provides list of MIME processing functions. Encoded file data will be decoded
 // and file name will be extracted from MIME header
 
+#include "main/snort_types.h"
 #include "file_api/file_api.h"
 #include "file_mime_config.h"
 #include "file_mime_paf.h"
@@ -51,7 +52,7 @@
 /* Maximum length of header chars before colon, based on Exim 4.32 exploit */
 #define MAX_HEADER_NAME_LEN 64
 
-class MimeSession
+class SO_PUBLIC MimeSession
 {
 public:
     MimeSession(DecodeConfig*, MailLogConfig*);
index 8ccb338b5de970236497cd0ccf6084b478ef1e10..2f101a27c80ae9a0c3ec87a41e2f7b564672dec7 100644 (file)
@@ -11,6 +11,6 @@ if (STATIC_INSPECTORS)
     )
 
 else (STATIC_INSPECTORS)
-    add_shared_library(arpspoof inspectors ${FILE_LIST})
+    add_shared_library(arp_spoof inspectors ${FILE_LIST})
     
 endif (STATIC_INSPECTORS)
index d64929b62652fab7618eef9db075dde34637be4d..53a765846e9ec97306185057e77672d0362f4f64 100644 (file)
@@ -518,7 +518,6 @@ SnortConfig* ParseSnortConf(const SnortConfig* boot_conf, const char* fname)
     SnortConfig* sc = new SnortConfig;
 
     sc->logging_flags = boot_conf->logging_flags;
-    sc->warning_flags = boot_conf->warning_flags;
     VarNode* tmp = boot_conf->var_list;
 
     if ( !fname )
index 5e41e3866950ecb739e7142213f48afad35784e9..24cf448ae757c2e99ef343dd0cf430e1eb8ba607 100644 (file)
@@ -34,7 +34,7 @@ struct PatMatQStat
     PegCount tot_inq_uinserts;
 };
 
-extern THREAD_LOCAL PatMatQStat pmqs;
+SO_PUBLIC extern THREAD_LOCAL PatMatQStat pmqs;
 
 SO_PUBLIC void print_pat_stats(const char*, unsigned max);
 
index 8111545e3d13d649eb8bacc4fc18a64780cb98b0..bafbb44707750940e5ac157100125b80d787c474 100644 (file)
@@ -20,7 +20,7 @@ if (STATIC_INSPECTORS)
         back_orifice
         dns
         ftp_telnet
-        gtp
+        gtp_inspect
         imap
         modbus
         nhttp_inspect
index 9e4d71746856bb979f684a73ab3dd884ebf27850..c383a7519f7aaf751a958d681b80193df4f5e129 100644 (file)
@@ -14,10 +14,10 @@ set( FILE_LIST
 )
 
 if (STATIC_INSPECTORS)
-    add_library(gtp STATIC ${FILE_LIST})
+    add_library(gtp_inspect STATIC ${FILE_LIST})
 
 else (STATIC_INSPECTORS)
-    add_shared_library(gtp inspectors ${FILE_LIST})
+    add_shared_library(gtp_inspect inspectors ${FILE_LIST})
 
 endif (STATIC_INSPECTORS)
 
index e33a6cc51fb832c197208922fa4cdbed990855fb..9858072895ec64296f91d7f2b4ddb88c9c6dd166 100644 (file)
@@ -37,7 +37,7 @@ set (FILE_LIST
     hi_util.h
 )
 
-# Can'be be dynamic yet
+# can't be be linked dynamically yet
 #if (STATIC_INSPECTORS)
     add_library(http_inspect STATIC ${FILE_LIST})
 
index 1825a9d7f75431f1477d0746d0d93126f8b495e2..bac2a55ead19da9adfc96aeabe4e4a1e815d9e6e 100644 (file)
@@ -21,7 +21,7 @@ hi_ui_config.cc hi_ui_config.h \
 hi_ui_iis_unicode_map.cc hi_ui_iis_unicode_map.h \
 hi_util.h
 
-# can't be built dynamically yet
+# can't be linked dynamically yet
 #if STATIC_INSPECTORS
 noinst_LIBRARIES = libhttp_inspect.a
 libhttp_inspect_a_SOURCES = $(file_list)
index 08baaa9e53a36425f5df6f9bd0776c4ff82472a7..88c655acdca16a6ddc4c9286d6632c0b7ef18846 100644 (file)
@@ -478,7 +478,7 @@ static const InspectApi hi_api =
     nullptr  // reset
 };
 
-// can't be built dynamically yet
+// can't be linked dynamically yet
 //#ifdef BUILDING_SO
 //SO_PUBLIC const BaseApi* snort_plugins[] =
 //{
index 2aaf1cc1978d7f4e9b573b7cf3cdb30291ddcda4..ad196edc43cc397b508360cf61b2d9e7764790cf 100644 (file)
@@ -9,10 +9,12 @@ set( FILE_LIST
     imap_module.h
 )
 
-if (STATIC_INSPECTORS)
+# can't be be linked dynamically yet
+#if (STATIC_INSPECTORS)
     add_library( imap STATIC ${FILE_LIST})
 
-else (STATIC_INSPECTORS)
-    add_shared_library(imap inspectors ${FILE_LIST})
+#else (STATIC_INSPECTORS)
+    #add_shared_library(imap inspectors ${FILE_LIST})
+
+#endif (STATIC_INSPECTORS)
 
-endif (STATIC_INSPECTORS)
index 572db1f73b6b19586090f6757966758480e467e8..fcb3aea89b0f9005c8516fb4f6196c8ca156386a 100644 (file)
@@ -8,16 +8,17 @@ imap_paf.h \
 imap_module.cc \
 imap_module.h
 
-if STATIC_INSPECTORS
+# can't be linked dynamically yet
+#if STATIC_INSPECTORS
 noinst_LIBRARIES = libimap.a
 libimap_a_SOURCES = $(file_list)
-else
-shlibdir = $(pkglibdir)/inspectors
-shlib_LTLIBRARIES = libimap.la
-libimap_la_CXXFLAGS = $(AM_CXXFLAGS) -DBUILDING_SO
-libimap_la_LDFLAGS = -export-dynamic -shared
-libimap_la_SOURCES = $(file_list)
-endif
+#else
+#shlibdir = $(pkglibdir)/inspectors
+#shlib_LTLIBRARIES = libimap.la
+#libimap_la_CXXFLAGS = $(AM_CXXFLAGS) -DBUILDING_SO
+#libimap_la_LDFLAGS = -export-dynamic -shared
+#libimap_la_SOURCES = $(file_list)
+#endif
 
 AM_CXXFLAGS = @AM_CXXFLAGS@
 
index c5de238b88fc1f17ad8350856fae65e66b768bba..de59b311e38ba5916a79d326c17f9712b5baa019 100644 (file)
@@ -832,13 +832,14 @@ const InspectApi imap_api =
     nullptr  // reset
 };
 
-#ifdef BUILDING_SO
-SO_PUBLIC const BaseApi* snort_plugins[] =
-{
-    &imap_api.base,
-    nullptr
-};
-#else
+// can't be linked dynamically yet
+//#ifdef BUILDING_SO
+//SO_PUBLIC const BaseApi* snort_plugins[] =
+//{
+//    &imap_api.base,
+//    nullptr
+//};
+//#else
 const BaseApi* sin_imap = &imap_api.base;
-#endif
+//#endif
 
index 75266a33f1f7d54dd2486652681db7c5c6a215f4..1896bd85cc95d524696ebf2eba34bbded8d7299c 100644 (file)
@@ -163,7 +163,7 @@ static const InspectApi modbus_api =
 #ifdef BUILDING_SO
 extern const BaseApi* ips_modbus_data;
 extern const BaseApi* ips_modbus_func;
-extern const BaseApi* ips_modbus_func;
+extern const BaseApi* ips_modbus_unit;
 
 SO_PUBLIC const BaseApi* snort_plugins[] =
 {
index c1e2ba3f65dc025d912829f9fa0ef56a861fb1e6..16016903e73b13311d3139b3c0e7646b93372ce1 100644 (file)
@@ -9,10 +9,12 @@ set( FILE_LIST
     pop_module.h
 )
 
-if (STATIC_INSPECTORS)
+# can't be be linked dynamically yet
+#if (STATIC_INSPECTORS)
     add_library( pop STATIC ${FILE_LIST})
 
-else (STATIC_INSPECTORS)
-    add_shared_library(pop inspectors ${FILE_LIST})
+#else (STATIC_INSPECTORS)
+    #add_shared_library(pop inspectors ${FILE_LIST})
+
+#endif (STATIC_INSPECTORS)
 
-endif (STATIC_INSPECTORS)
index 3b15b209017e2df6235235157216a6424fc207e7..1f6d4b16abfac3b860899457940bd66da4748913 100644 (file)
@@ -8,16 +8,17 @@ pop_paf.h \
 pop_module.cc \
 pop_module.h
 
-if STATIC_INSPECTORS
+# can't be linked dynamically yet
+#if STATIC_INSPECTORS
 noinst_LIBRARIES = libpop.a
 libpop_a_SOURCES = $(file_list)
-else
-shlibdir = $(pkglibdir)/inspectors
-shlib_LTLIBRARIES = libpop.la
-libpop_la_CXXFLAGS = $(AM_CXXFLAGS) -DBUILDING_SO
-libpop_la_LDFLAGS = -export-dynamic -shared
-libpop_la_SOURCES = $(file_list)
-endif
+#else
+#shlibdir = $(pkglibdir)/inspectors
+#shlib_LTLIBRARIES = libpop.la
+#libpop_la_CXXFLAGS = $(AM_CXXFLAGS) -DBUILDING_SO
+#libpop_la_LDFLAGS = -export-dynamic -shared
+#libpop_la_SOURCES = $(file_list)
+#endif
 
 AM_CXXFLAGS = @AM_CXXFLAGS@
 
index 514d8f6f8f8dd0d5ccdfeb2c0732147c777c4d18..29d0eda19ea3d306a1936e4f2274ee00cdcedec3 100644 (file)
@@ -767,13 +767,14 @@ const InspectApi pop_api =
     nullptr  // reset
 };
 
-#ifdef BUILDING_SO
-SO_PUBLIC const BaseApi* snort_plugins[] =
-{
-    &pop_api.base,
-    nullptr
-};
-#else
+// can't be linked dynamically yet
+//#ifdef BUILDING_SO
+//SO_PUBLIC const BaseApi* snort_plugins[] =
+//{
+//    &pop_api.base,
+//    nullptr
+//};
+//#else
 const BaseApi* sin_pop = &pop_api.base;
-#endif
+//#endif
 
index 59071f832541426d1ca8b832b2b02054458dfad3..026c3357d8b0a112cb16b3578b52426000799bb1 100644 (file)
 
 extern const BaseApi* sin_http_global;
 extern const BaseApi* sin_http_inspect;
+extern const BaseApi* sin_imap;
+extern const BaseApi* sin_pop;
+extern const BaseApi* sin_smtp;
+extern const BaseApi* sin_ssl;
 
 #ifdef STATIC_INSPECTORS
 extern const BaseApi* ips_gtp_info;
@@ -47,15 +51,11 @@ extern const BaseApi* sin_ftp_client;
 extern const BaseApi* sin_ftp_server;
 extern const BaseApi* sin_ftp_data;
 extern const BaseApi* sin_gtp;
-extern const BaseApi* sin_imap;
 extern const BaseApi* sin_modbus;
 extern const BaseApi* sin_nhttp;
-extern const BaseApi* sin_pop;
 extern const BaseApi* sin_rpc_decode;
 extern const BaseApi* sin_sip;
-extern const BaseApi* sin_smtp;
 extern const BaseApi* sin_ssh;
-extern const BaseApi* sin_ssl;
 extern const BaseApi* sin_telnet;
 extern const BaseApi* sin_wizard;
 #endif
@@ -64,6 +64,10 @@ const BaseApi* service_inspectors[] =
 {
     sin_http_global,
     sin_http_inspect,
+    sin_imap,
+    sin_pop,
+    sin_smtp,
+    sin_ssl,
 
 #ifdef STATIC_INSPECTORS
     ips_gtp_info,
@@ -85,15 +89,11 @@ const BaseApi* service_inspectors[] =
     sin_ftp_server,
     sin_ftp_data,
     sin_gtp,
-    sin_imap,
     sin_modbus,
     sin_nhttp,
-    sin_pop,
     sin_rpc_decode,
     sin_sip,
-    sin_smtp,
     sin_ssh,
-    sin_ssl,
     sin_telnet,
     sin_wizard,
 #endif
index c7b22f719002d38edd304407482a4abf2f3f543d..5ce346d5256d033d4d9167cbd9f731c80002b378 100644 (file)
@@ -15,10 +15,12 @@ set( FILE_LIST
     smtp_normalize.h
 )
 
-if (STATIC_INSPECTORS)
+# can't be be linked dynamically yet
+#if (STATIC_INSPECTORS)
     add_library( smtp STATIC ${FILE_LIST})
 
-else (STATIC_INSPECTORS)
-    add_shared_library(smtp inspectors ${FILE_LIST})
+#else (STATIC_INSPECTORS)
+    #add_shared_library(smtp inspectors ${FILE_LIST})
+
+#endif (STATIC_INSPECTORS)
 
-endif (STATIC_INSPECTORS)
index 4d5012fc71d5b027238ac21e33798af56c77e44e..297dd12d37d09509b5b22b3581aa26d1a2ab18cb 100644 (file)
@@ -14,16 +14,17 @@ smtp_paf.h \
 smtp_module.cc \
 smtp_module.h
 
-if STATIC_INSPECTORS
+# can't be linked dynamically yet
+#if STATIC_INSPECTORS
 noinst_LIBRARIES = libsmtp.a
 libsmtp_a_SOURCES = $(file_list)
-else
-shlibdir = $(pkglibdir)/inspectors
-shlib_LTLIBRARIES = libsmtp.la
-libsmtp_la_CXXFLAGS = $(AM_CXXFLAGS) -DBUILDING_SO
-libsmtp_la_LDFLAGS = -export-dynamic -shared
-libsmtp_la_SOURCES = $(file_list)
-endif
+#else
+#shlibdir = $(pkglibdir)/inspectors
+#shlib_LTLIBRARIES = libsmtp.la
+#libsmtp_la_CXXFLAGS = $(AM_CXXFLAGS) -DBUILDING_SO
+#libsmtp_la_LDFLAGS = -export-dynamic -shared
+#libsmtp_la_SOURCES = $(file_list)
+#endif
 
 AM_CXXFLAGS = @AM_CXXFLAGS@
 
index 81364a61547c74c009c53067ea31d5e83d218b14..decd144958c1b041be77f3f4011b245c9a92f959 100644 (file)
@@ -1654,13 +1654,14 @@ const InspectApi smtp_api =
     nullptr                 // reset
 };
 
-#ifdef BUILDING_SO
-SO_PUBLIC const BaseApi* snort_plugins[] =
-{
-    &smtp_api.base,
-    nullptr
-};
-#else
+// can't be linked dynamically yet
+//#ifdef BUILDING_SO
+//SO_PUBLIC const BaseApi* snort_plugins[] =
+//{
+//    &smtp_api.base,
+//    nullptr
+//};
+//#else
 const BaseApi* sin_smtp = &smtp_api.base;
-#endif
+//#endif
 
index c93406d243289bdfec90a5185d02e64bba5d9a51..2314f31ea78a96fd487160f987ab3fda73c35bef 100644 (file)
@@ -9,10 +9,12 @@ set( FILE_LIST
     ips_ssl_version.cc
 )
 
-if (STATIC_INSPECTORS)
+# can't be be linked dynamically yet
+#if (STATIC_INSPECTORS)
     add_library( ssl STATIC ${FILE_LIST})
 
-else (STATIC_INSPECTORS)
-    add_shared_library(ssl inspectors ${FILE_LIST})
+#else (STATIC_INSPECTORS)
+    #add_shared_library(ssl inspectors ${FILE_LIST})
+
+#endif (STATIC_INSPECTORS)
 
-endif (STATIC_INSPECTORS)
index 21ecb40cfcfd908ed24eae0022334e825edeb789..d80d4d285034408ffd3ee708b37ad7447785a7ee 100644 (file)
@@ -8,16 +8,17 @@ ssl_module.h \
 ips_ssl_state.cc \
 ips_ssl_version.cc
 
-if STATIC_INSPECTORS
+# can't be linked dynamically yet
+#if STATIC_INSPECTORS
 noinst_LIBRARIES = libssl.a
 libssl_a_SOURCES = $(file_list)
-else
-shlibdir = $(pkglibdir)/inspectors
-shlib_LTLIBRARIES = libssl.la
-libssl_la_CXXFLAGS = $(AM_CXXFLAGS) -DBUILDING_SO
-libssl_la_LDFLAGS = -export-dynamic -shared
-libssl_la_SOURCES = $(file_list)
-endif
+#else
+#shlibdir = $(pkglibdir)/inspectors
+#shlib_LTLIBRARIES = libssl.la
+#libssl_la_CXXFLAGS = $(AM_CXXFLAGS) -DBUILDING_SO
+#libssl_la_LDFLAGS = -export-dynamic -shared
+#libssl_la_SOURCES = $(file_list)
+#endif
 
 AM_CXXFLAGS = @AM_CXXFLAGS@
 
index fb2a398b3e41a38f3e23f0a3fce952cfc047c4d2..a66a1b8c4f17240de19894135e230fead7654f43 100644 (file)
@@ -511,13 +511,14 @@ const InspectApi ssl_api =
     nullptr  // reset
 };
 
-#ifdef BUILDING_SO
-SO_PUBLIC const BaseApi* snort_plugins[] =
-{
-    &ssl_api.base,
-    nullptr
-};
-#else
+// can't be linked dynamically yet
+//#ifdef BUILDING_SO
+//SO_PUBLIC const BaseApi* snort_plugins[] =
+//{
+//    &ssl_api.base,
+//    nullptr
+//};
+//#else
 const BaseApi* sin_ssl = &ssl_api.base;
-#endif
+//#endif
 
index 1208ba6222be9fa98767f5b9ab26fa0a122a2b20..bf145ea39252e3a17d2df216272e45b08b803a34 100644 (file)
@@ -698,7 +698,7 @@ static inline void sfip_copy(sfip_t& lhs, const sfip_t* const rhs)
 
 /* Uses a static buffer to return a string representation of the IP */
 SO_PUBLIC void sfip_raw_ntop(int family, const void* ip_raw, char* buf, int bufsize);
-void sfip_ntop(const sfip_t* ip, char* buf, int bufsize);
+SO_PUBLIC void sfip_ntop(const sfip_t* ip, char* buf, int bufsize);
 
-#endif // SF_IP_H
+#endif