]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
SO_PUBLICations
authorrcombs <rcombs@sq18.sfeng.sourcefire.com>
Thu, 21 Aug 2014 22:41:56 +0000 (18:41 -0400)
committerrcombs <rcombs@sq18.sfeng.sourcefire.com>
Thu, 21 Aug 2014 22:41:56 +0000 (18:41 -0400)
src/Makefile.am
src/framework/inspector.cc
src/framework/ips_option.cc
src/framework/module.cc
src/service_inspectors/http_inspect/Makefile.am
src/stream/stream_splitter.cc

index 8bd6c0fe2adc88efb4412e0b16842945e6d2eb19..5b4a3241b161cd2f0555997bb1a68a1a3a01fb19 100644 (file)
@@ -40,7 +40,6 @@ network_inspectors/binder/libbinder.a \
 network_inspectors/normalize/libnormalize.a \
 network_inspectors/perf_monitor/libperf_monitor.a \
 service_inspectors/libservice_inspectors.a \
-service_inspectors/http_inspect/libhttp_inspect.a \
 $(lib_list) \
 stream/base/libstream_base.a \
 stream/ip/libstream_ip.a \
@@ -50,6 +49,7 @@ stream/udp/libstream_udp.a \
 stream/libstream.a \
 file_api/libfile_api.a \
 file_api/libs/libfile.a \
+service_inspectors/http_inspect/libhttp_inspect.a \
 ips_options/libips_options.a \
 parser/libparser.a \
 search_engines/libsearch_engines.a \
index 668a3e1562d4e9265564e18f2e3384dbfb2d1d29..036de926553c70139c5565f58cbd0c0826f30cde 100644 (file)
@@ -62,7 +62,7 @@ SO_PUBLIC bool Inspector::is_inactive()
     return true;
 }
 
-unsigned Inspector::get_buf_id(const char* key)
+SO_PUBLIC unsigned Inspector::get_buf_id(const char* key)
 {
     const char** p = api->buffers;
     unsigned id = 0;
@@ -76,7 +76,7 @@ unsigned Inspector::get_buf_id(const char* key)
     return p[id] ? id+1 : 0;
 }
 
-bool Inspector::get_buf(const char* key, Packet* p, InspectionBuffer& b)
+SO_PUBLIC bool Inspector::get_buf(const char* key, Packet* p, InspectionBuffer& b)
 {
     unsigned id = get_buf_id(key);
 
@@ -86,7 +86,7 @@ bool Inspector::get_buf(const char* key, Packet* p, InspectionBuffer& b)
     return get_buf(id, p, b);
 }
 
-StreamSplitter* Inspector::get_splitter(bool to_server)
+SO_PUBLIC StreamSplitter* Inspector::get_splitter(bool to_server)
 {
     if ( !api || api->type != IT_SERVICE )
         return nullptr;
index 75b0f8cacaab16d79da95af870dfd352665273f1..7612eaaf799c1f5dacd3168a69ad0923fcfe3934 100644 (file)
@@ -34,7 +34,7 @@
 
 //-------------------------------------------------------------------------
 
-uint32_t IpsOption::hash() const
+SO_PUBLIC uint32_t IpsOption::hash() const
 {
     uint32_t a=0, b=0, c=0;
     mix_str(a,b,c,get_name());
@@ -42,6 +42,6 @@ uint32_t IpsOption::hash() const
     return c;
 }
 
-bool IpsOption::operator==(const IpsOption& ips) const
+SO_PUBLIC bool IpsOption::operator==(const IpsOption& ips) const
 { return !strcmp(get_name(), ips.get_name()); }
 
index 802e60553e9208de1316d45012157c77aa08387a..459cc5249f8888a9849991c9438cd32d97a355de 100644 (file)
@@ -37,19 +37,19 @@ void Module::init(const char* s)
     num_counts = -1;
 }
 
-Module::Module(const char* s)
+SO_PUBLIC Module::Module(const char* s)
 {
     init(s);
 }
 
-Module::Module(const char* s, const Parameter* p, bool is_list)
+SO_PUBLIC Module::Module(const char* s, const Parameter* p, bool is_list)
 {
     init(s);
     params = p;
     list = is_list;
 }
 
-void Module::sum_stats()
+SO_PUBLIC void Module::sum_stats()
 {
     if ( num_counts < 0 )
         reset_stats();
@@ -66,13 +66,13 @@ void Module::sum_stats()
     }
 }
 
-void Module::show_stats()
+SO_PUBLIC void Module::show_stats()
 {
     if ( num_counts > 0 )
         ::show_stats(&counts[0], get_pegs(), num_counts, get_name());
 }
 
-void Module::reset_stats()
+SO_PUBLIC void Module::reset_stats()
 {
     num_counts = 0;
     const char** pegs = get_pegs();
@@ -89,7 +89,7 @@ void Module::reset_stats()
         counts[i] = 0;
 }
 
-const char* simple_pegs[] =
+SO_PUBLIC const char* simple_pegs[] =
 {
     "packets",
     nullptr
index fcde4e099caa275efc8bf6576d4c723b168a9332..c0f9ed2f6f200a2fc37c6dac7c2888bce74637ef 100644 (file)
@@ -27,16 +27,17 @@ hi_util_hbm.cc hi_util_hbm.h \
 hi_util_kmap.cc hi_util_kmap.h \
 hi_util_xmalloc.cc hi_util_xmalloc.h
 
-if STATIC_INSPECTORS
+# can't be dynamic yet
+#if STATIC_INSPECTORS
 noinst_LIBRARIES = libhttp_inspect.a
 libhttp_inspect_a_SOURCES = $(file_list)
-else
-shlibdir = $(pkglibdir)/inspectors
-shlib_LTLIBRARIES = libhttp_inspect.la
-libhttp_inspect_la_CXXFLAGS = $(AM_CXXFLAGS) -DBUILDING_SO
-libhttp_inspect_la_LDFLAGS = -export-dynamic -shared
-libhttp_inspect_la_SOURCES = $(file_list)
-endif
+#else
+#shlibdir = $(pkglibdir)/inspectors
+#shlib_LTLIBRARIES = libhttp_inspect.la
+#libhttp_inspect_la_CXXFLAGS = $(AM_CXXFLAGS) -DBUILDING_SO
+#libhttp_inspect_la_LDFLAGS = -export-dynamic -shared
+#libhttp_inspect_la_SOURCES = $(file_list)
+#endif
 
 AM_CXXFLAGS = @AM_CXXFLAGS@
 
index 1fb77440ab53bf3a75e72ff791e309a13bf17b6c..0ee55e74a26c2c07d12f644a150a87f5728915d7 100644 (file)
 static THREAD_LOCAL uint8_t pdu_buf[65536];
 static THREAD_LOCAL StreamBuffer str_buf;
 
-uint32_t StreamSplitter::max()
+SO_PUBLIC uint32_t StreamSplitter::max()
 { return 16384; }  // FIXIT-H make default configurable
 
-const StreamBuffer* StreamSplitter::reassemble(
+SO_PUBLIC const StreamBuffer* StreamSplitter::reassemble(
     Flow*, unsigned, unsigned offset, const uint8_t* p,
     unsigned n, uint32_t flags, unsigned& copied)
 {