From: rcombs Date: Thu, 21 Aug 2014 22:41:56 +0000 (-0400) Subject: SO_PUBLICations X-Git-Tag: 3.0.0-233~1419^2~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=846b8e1364dfefcc2eb875960f268be25f0c0c74;p=thirdparty%2Fsnort3.git SO_PUBLICations --- diff --git a/src/Makefile.am b/src/Makefile.am index 8bd6c0fe2..5b4a3241b 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -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 \ diff --git a/src/framework/inspector.cc b/src/framework/inspector.cc index 668a3e156..036de9265 100644 --- a/src/framework/inspector.cc +++ b/src/framework/inspector.cc @@ -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; diff --git a/src/framework/ips_option.cc b/src/framework/ips_option.cc index 75b0f8cac..7612eaaf7 100644 --- a/src/framework/ips_option.cc +++ b/src/framework/ips_option.cc @@ -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()); } diff --git a/src/framework/module.cc b/src/framework/module.cc index 802e60553..459cc5249 100644 --- a/src/framework/module.cc +++ b/src/framework/module.cc @@ -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 diff --git a/src/service_inspectors/http_inspect/Makefile.am b/src/service_inspectors/http_inspect/Makefile.am index fcde4e099..c0f9ed2f6 100644 --- a/src/service_inspectors/http_inspect/Makefile.am +++ b/src/service_inspectors/http_inspect/Makefile.am @@ -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@ diff --git a/src/stream/stream_splitter.cc b/src/stream/stream_splitter.cc index 1fb77440a..0ee55e74a 100644 --- a/src/stream/stream_splitter.cc +++ b/src/stream/stream_splitter.cc @@ -29,10 +29,10 @@ 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) {