AC_HELP_STRING([--enable-ppm],[enable packet/rule performance monitor]),
enable_ppm="$enableval", enable_ppm="no")
+AM_CONDITIONAL(PPM_MGR, test "x$enable_ppm" = "xyes")
+
if test "x$enable_ppm" = "xyes"; then
+ CPPFLAGS="$CPPFLAGS -DPPM_MGR"
AC_DEFINE(PPM_MGR, [1], [build ppm manager])
fi
src/target_based/Makefile \
src/catch/Makefile \
src/time/Makefile \
+src/ppm/Makefile \
+src/profiler/Makefile \
src/utils/Makefile \
src/utils/test/Makefile \
lua/Makefile \
add_subdirectory(piglet_plugins)
endif (BUILD_PIGLET)
+if (ENABLE_PPM)
+ set(PPM_LIBRARIES ppm)
+ add_subdirectory(ppm)
+endif (ENABLE_PPM)
+
+if (ENABLE_PERFPROFILING)
+ set(PERFPROFILING_LIBRARIES profiler)
+endif (ENABLE_PERFPROFILING)
# The main Snort executableRA
add_executable( snort
detection
framework
time
+ ${PPM_LIBRARIES}
+ ${PERFPROFILING_LIBRARIES}
ips_actions
events
hash
add_subdirectory(stream)
add_subdirectory(target_based)
add_subdirectory(time)
+add_subdirectory(profiler)
add_subdirectory(utils)
add_subdirectory(helpers)
add_subdirectory(lua)
piglet_plugins/libpiglet_plugins.a
endif
+if PPM_MGR
+ppm_list = ppm/libppm.a
+endif
+
+if PERF_PROFILING
+profiler_list = profiler/libprofiler.a
+endif
+
snort_LDFLAGS = -export-dynamic
# order libs to avoid undefined symbols
detection/libdetection.a \
framework/libframework.a \
time/libtime.a \
+$(ppm_list) \
+$(profiler_list) \
actions/libips_actions.a \
events/libevents.a \
hash/libhash.a \
stream \
target_based \
time \
+profiler \
utils
if BUILD_UNIT_TESTS
SUBDIRS += piglet piglet_plugins
endif
+if PPM_MGR
+SUBDIRS += ppm
+endif
#include "main/snort_types.h"
#include "main/snort_debug.h"
#include "protocols/packet.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "packet_io/active.h"
#include "parser/parser.h"
#include "framework/ips_action.h"
#include "main/snort_types.h"
#include "main/snort_debug.h"
#include "protocols/packet.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "packet_io/active.h"
#include "utils/util.h"
#include "framework/ips_action.h"
#include "events/event_wrapper.h"
#include "events/event_queue.h"
#include "log/obfuscation.h"
-#include "time/profiler.h"
-#include "time/ppm.h"
+#include "profiler/profiler.h"
+#include "ppm/ppm.h"
#include "stream/stream_api.h"
#include "packet_io/active.h"
#include "managers/inspector_manager.h"
#include "detection/rules.h"
#include "detection/treenodes.h"
#include "parser/parser.h"
-#include "time/profiler.h"
#include "log/log.h"
#include "events/event.h"
extern SO_PUBLIC THREAD_LOCAL int do_detect_content;
#ifdef PERF_PROFILING
+struct ProfileStats;
extern THREAD_LOCAL ProfileStats eventqPerfStats;
extern THREAD_LOCAL ProfileStats detectPerfStats;
extern THREAD_LOCAL ProfileStats rebuiltPacketPerfStats;
#include "fp_detect.h"
#include "rules.h"
-#include "time/ppm.h"
-#include "time/profiler.h"
+#include "ppm/ppm.h"
+#include "profiler/profiler.h"
#include "utils/util.h"
#include "hash/sfxhash.h"
#include "hash/sfhashfcn.h"
#include "stream/stream_api.h"
#include "utils/sflsq.h"
#include "utils/util.h"
-#include "time/ppm.h"
+#include "ppm/ppm.h"
+#include "profiler/profiler.h"
#include "actions/actions.h"
#include "sfip/sf_ip.h"
#include "managers/action_manager.h"
#include "detection/fp_create.h"
#include "main/snort_debug.h"
#include "protocols/packet.h"
-#include "time/profiler.h"
#include "utils/sflsq.h"
#define REBUILD_FLAGS (PKT_REBUILT_FRAG | PKT_REBUILT_STREAM)
#ifdef PERF_PROFILING
+struct ProfileStats;
extern THREAD_LOCAL ProfileStats rulePerfStats;
extern THREAD_LOCAL ProfileStats ruleRTNEvalPerfStats;
extern THREAD_LOCAL ProfileStats ruleOTNEvalPerfStats;
#include "main/snort_debug.h"
#include "main/snort_types.h"
+#include "profiler/profiler.h"
// this is accumulated only for fast pattern
// searches for the detection engine
#include "main/snort_types.h"
#include "main/thread.h"
#include "framework/base_api.h"
-#include "time/profiler.h"
/*
* Move these defines to a generic Win32/Unix compatability file,
};
#ifdef PERF_PROFILING
+struct ProfileStats;
extern THREAD_LOCAL ProfileStats mpsePerfStats;
#endif
#include "hash/sfhashfcn.h"
#include "parser/parser.h"
#include "framework/cursor.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "lua/lua.h"
#ifdef UNIT_TEST
#include "protocols/packet.h"
#include "parser/parser.h"
#include "utils/util.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "hash/sfhashfcn.h"
#include "detection/detection_defines.h"
#include "framework/ips_option.h"
#include "detection/treenodes.h"
#include "detection/detection_util.h"
#include "detection/detection_defines.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "framework/cursor.h"
#include "framework/ips_option.h"
#include "framework/parameter.h"
#include "main/snort_debug.h"
#include "protocols/packet.h"
#include "parser/parser.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "utils/util.h"
#include "mime/decode_b64.h"
#include "utils/util_unfold.h"
#include "main/snort_types.h"
#include "main/snort_debug.h"
#include "hash/sfhashfcn.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "detection/detection_defines.h"
#include "framework/range.h"
#include "framework/ips_option.h"
#include "detection/detection_defines.h"
#include "detection/detection_util.h"
#include "hash/sfhashfcn.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "framework/ips_option.h"
#include "framework/cursor.h"
#include "framework/parameter.h"
#include "utils/util.h"
#include "utils/snort_bounds.h"
#include "hash/sfhashfcn.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "detection/treenodes.h"
#include "detection/detection_defines.h"
#include "detection/detection_util.h"
#include "parser/parser.h"
#include "utils/util.h"
#include "utils/snort_bounds.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "hash/sfhashfcn.h"
#include "detection/treenodes.h"
#include "detection/detection_defines.h"
#include "parser/parser.h"
#include "parser/parse_utils.h"
#include "hash/sfhashfcn.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "detection/treenodes.h"
#include "detection/detection_defines.h"
#include "detection/detection_util.h"
#include "parser/parser.h"
#include "utils/util.h"
#include "utils/snort_bounds.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "hash/sfhashfcn.h"
#include "detection/treenodes.h"
#include "detection/detection_defines.h"
#include "parser/parser.h"
#include "utils/util.h"
#include "hash/sfhashfcn.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "detection/treenodes.h"
#include "detection/detection_defines.h"
#include "framework/ips_option.h"
#include "main/snort_types.h"
#include "main/snort_debug.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "detection/detection_defines.h"
#include "detection/detection_util.h"
#include "framework/cursor.h"
#include "protocols/tcp.h"
#include "parser/parser.h"
#include "utils/util.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "hash/sfhashfcn.h"
#include "detection/treenodes.h"
#include "detection/detection_defines.h"
#include "utils/util.h"
#include "hash/sfhashfcn.h"
#include "stream/stream_api.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "detection/detection_defines.h"
#include "framework/ips_option.h"
#include "framework/parameter.h"
#include "hash/sfghash.h"
#include "parser/mstring.h"
#include "stream/stream_api.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "hash/sfhashfcn.h"
#include "detection/detection_defines.h"
#include "framework/ips_option.h"
#include "protocols/packet.h"
#include "parser/parser.h"
#include "utils/util.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "hash/sfhashfcn.h"
#include "detection/treenodes.h"
#include "detection/detection_defines.h"
#include "main/snort_types.h"
#include "main/snort_debug.h"
#include "protocols/packet.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "hash/sfhashfcn.h"
#include "detection/detection_defines.h"
#include "framework/ips_option.h"
#include "hash/hashes.h"
#include "framework/cursor.h"
#include "framework/ips_option.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "detection/detection_defines.h"
#include "detection/detection_util.h"
#include "framework/parameter.h"
#include "main/snort_types.h"
#include "main/snort_debug.h"
#include "protocols/packet.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "flow/flow.h"
#include "detection/detection_defines.h"
#include "framework/ips_option.h"
#include "main/snort_types.h"
#include "main/snort_debug.h"
#include "parser/parser.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "flow/flow.h"
#include "detection/detection_defines.h"
#include "framework/ips_option.h"
#include "main/snort_types.h"
#include "main/snort_debug.h"
#include "protocols/packet.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "hash/sfhashfcn.h"
#include "detection/detection_defines.h"
#include "framework/ips_option.h"
#include "main/snort_types.h"
#include "main/snort_debug.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "hash/sfhashfcn.h"
#include "detection/detection_defines.h"
#include "framework/ips_option.h"
#include "main/snort_debug.h"
#include "protocols/packet.h"
#include "hash/sfhashfcn.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "detection/detection_defines.h"
#include "framework/ips_option.h"
#include "framework/parameter.h"
#include "main/snort_types.h"
#include "main/snort_debug.h"
#include "protocols/packet.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "hash/sfhashfcn.h"
#include "detection/detection_defines.h"
#include "framework/ips_option.h"
#include "protocols/packet.h"
#include "parser/parser.h"
#include "utils/util.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "hash/sfhashfcn.h"
#include "detection/treenodes.h"
#include "detection/detection_defines.h"
#include "protocols/ipv4_options.h"
#include "parser/parser.h"
#include "utils/util.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "hash/sfhashfcn.h"
#include "detection/treenodes.h"
#include "detection/detection_defines.h"
#include "main/snort_types.h"
#include "utils/snort_bounds.h"
#include "utils/util.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "hash/sfhashfcn.h"
#include "detection/treenodes.h"
#include "detection/detection_defines.h"
#include "main/snort_debug.h"
#include "protocols/packet.h"
#include "hash/sfhashfcn.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "detection/detection_defines.h"
#include "framework/ips_option.h"
#include "framework/parameter.h"
#include "framework/module.h"
#include "framework/parameter.h"
#include "log/messages.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "detection/detection_defines.h"
static THREAD_LOCAL ProfileStats luaIpsPerfStats;
#include "utils/util.h"
#include "utils/snort_bounds.h"
#include "hash/sfhashfcn.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "detection/treenodes.h"
#include "detection/detection_defines.h"
#include "detection/detection_util.h"
#include "main/snort_debug.h"
#include "utils/snort_bounds.h"
#include "protocols/packet.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "framework/cursor.h"
#include "framework/ips_option.h"
#include "framework/module.h"
#include "main/snort_types.h"
#include "main/snort_debug.h"
#include "protocols/packet.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "detection/detection_defines.h"
#include "detection/detection_util.h"
#include "framework/cursor.h"
#include "main/snort_config.h"
#include "main/thread.h"
#include "parser/parser.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#define s_name "regex"
#include "detection/detection_defines.h"
#include "actions/act_replace.h"
#include "hash/sfhashfcn.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
static void replace_parse(const char* args, string& s)
{
#include "main/snort_debug.h"
#include "utils/util.h"
#include "hash/sfhashfcn.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "detection/treenodes.h"
#include "detection/detection_defines.h"
#include "framework/ips_option.h"
#include "main/snort_types.h"
#include "main/snort_debug.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "hash/sfhashfcn.h"
#include "detection/detection_defines.h"
#include "framework/ips_option.h"
#include "protocols/packet.h"
#include "main/snort_debug.h"
#include "utils/util.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "hash/sfhashfcn.h"
#include "detection/detection_defines.h"
#include "detection/treenodes.h"
#include "managers/so_manager.h"
#include "hash/sfhashfcn.h"
#include "parser/parser.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#define s_name "so"
#include "main/snort_debug.h"
#include "protocols/packet.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "hash/sfhashfcn.h"
#include "detection/detection_defines.h"
#include "framework/ips_option.h"
#include "main/snort_debug.h"
#include "protocols/packet.h"
#include "hash/sfhashfcn.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "detection/detection_defines.h"
#include "framework/ips_option.h"
#include "framework/parameter.h"
#include "main/snort_types.h"
#include "main/snort_debug.h"
#include "protocols/packet.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "hash/sfhashfcn.h"
#include "detection/detection_defines.h"
#include "framework/ips_option.h"
#include "framework/logger.h"
#include "framework/module.h"
#include "framework/parameter.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "utils/stats.h"
static THREAD_LOCAL ProfileStats luaLogPerfStats;
#include "lua/lua.h"
#include "helpers/process.h"
#include "helpers/swapper.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "time/periodic.h"
#ifdef UNIT_TEST
#include "filters/sfrf.h"
#include "filters/rate_filter.h"
#include "codecs/codec_module.h"
-#include "time/ppm_module.h"
-#include "time/profiler.h"
+#include "ppm/ppm_module.h"
+#include "profiler/profiler.h"
#include "target_based/sftarget_data.h"
#include "detection/fp_config.h"
#include "detection/signature.h"
#include "filters/rate_filter.h"
#include "filters/detection_filter.h"
#include "time/packet_time.h"
-#include "time/ppm.h"
-#include "time/profiler.h"
+#include "ppm/ppm.h"
+#include "profiler/profiler.h"
#include "time/periodic.h"
#include "perf_monitor/perf.h"
#include "ips_options/ips_flowbits.h"
#include "ips_options/ips_pcre.h"
#include "ips_options/ips_regex.h"
#include "protocols/udp.h"
-#include "time/ppm.h"
-#include "time/profiler.h"
+#include "ppm/ppm.h"
+#include "profiler/profiler.h"
#include "sfip/sf_ip.h"
THREAD_LOCAL SnortConfig* snort_conf = nullptr;
#include "log/obfuscation.h"
#include "log/messages.h"
#include "packet_io/active.h"
-#include "time/ppm.h"
+#include "ppm/ppm.h"
#include "target_based/snort_protocols.h"
#include "binder/bind_module.h"
#include "parser/parser.h"
#include "parser/parse_conf.h"
#include "parser/vars.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "helpers/markup.h"
#include "utils/stats.h"
#include "events/event_queue.h"
#include "parser/parser.h"
#include "utils/util.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "framework/inspector.h"
#include "protocols/packet.h"
#include "protocols/layer.h"
#include "protocols/layer.h"
#include "stream/stream_api.h"
#include "stream/stream_splitter.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "utils/stats.h"
#include "log/messages.h"
#include "main/snort_config.h"
#include "packet_io/active.h"
#include "packet_io/sfdaq.h"
#include "parser/parser.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "main/snort_types.h"
#include "main/snort_config.h"
#include "framework/inspector.h"
#include "main/snort_debug.h"
#include "parser/parser.h"
#include "packet_io/sfdaq.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "framework/inspector.h"
#include "utils/stats.h"
#include "utils/util.h"
#include "utils/util.h"
#include "utils/sfsnprintfappend.h"
#include "framework/inspector.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "time/packet_time.h"
#include "detection/detect.h"
#include "utils/sflsq.h"
#include "utils/util.h"
#include "utils/snort_bounds.h"
-#include "time/ppm.h"
+#include "ppm/ppm.h"
#include "filters/rate_filter.h"
#include "filters/detection_filter.h"
#include "packet_io/active.h"
#include "sfip/sf_vartable.h"
#include "sfip/sf_ip.h"
#include "sfip/sf_ipvar.h"
-#include "time/ppm.h"
+#include "ppm/ppm.h"
#include "packet_io/active.h"
#include "file_api/libs/file_config.h"
#include "actions/actions.h"
#include "sfip/sf_vartable.h"
#include "sfip/sf_ip.h"
#include "sfip/sf_ipvar.h"
-#include "time/ppm.h"
+#include "ppm/ppm.h"
#include "packet_io/active.h"
#include "file_api/libs/file_config.h"
#include "framework/ips_option.h"
--- /dev/null
+set ( PPM_SOURCES ppm.cc ppm_module.cc )
+set ( PPM_INCLUDES ppm.h )
+
+add_library ( ppm STATIC
+ ${PPM_SOURCES}
+ ${PPM_INCLUDES}
+)
+
+install (FILES ${PPM_INCLUDES}
+ DESTINATION "${INCLUDE_INSTALL_PATH}/ppm"
+)
--- /dev/null
+noinst_LIBRARIES = libppm.a
+
+x_includedir = $(pkgincludedir)/ppm
+
+x_include_HEADERS = ppm.h
+
+libppm_a_SOURCES = \
+ppm.cc \
+ppm.h \
+ppm_module.cc \
+ppm_module.h
#include "config.h"
#endif
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <syslog.h>
-#include <time.h>
-
#include "ppm_module.h"
-#include "main/snort_types.h"
-#include "detection/rules.h"
-#include "detection/treenodes.h"
-#include "detection/rules.h"
#include "detection/fp_create.h"
-#include "detection/detect.h"
#include "parser/parser.h"
#include "events/event_queue.h"
-#include "events/event_wrapper.h"
-#include "actions/actions.h"
-#include "protocols/packet.h"
#include "utils/stats.h"
-#include "utils/util.h"
#include "sfip/sf_ip.h"
-
-#ifdef PPM_MGR
+#include "time/cpuclock.h"
#define PPM_BASE_SUSPEND_RULE_GID 1000
#define PPM_BASE_CLEAR_RULE_GID 2000
{
ppm_cfg->rule_threshold = cnt;
}
-
-#endif
-
#include "config.h"
#endif
-// FIXIT-M: Instead of an empty source file, use CMake/Make to enable/disable
-// this compilation unit
-#ifdef PPM_MGR
-#include "main/snort_types.h"
#include "main/thread.h"
-#include "time/cpuclock.h"
#include "detection/detection_options.h"
typedef uint64_t PPM_TICKS;
#define PPM_GET_TIME()
#define PPM_SET_TIME()
-#endif // PPM_MGR
-
#endif
// ppm attributes
//-------------------------------------------------------------------------
-#ifdef PPM_MGR
-
#define s_name "ppm"
#define s_help \
"packet and rule latency monitoring and control (requires --enable-ppm)"
return true;
}
-
-#endif
-
#include "config.h"
#endif
-// FIXIT-M: Instead of an empty source file, use CMake/Make to enable/disable
-// this compilation unit
-#ifdef PPM_MGR
#include "framework/module.h"
#define GID_PPM 134
{ return GID_PPM; }
};
-#endif // PPM_MGR
#endif
--- /dev/null
+set ( PROFILER_SOURCES profiler.cc )
+set ( PROFILER_INCLUDES profiler.h )
+
+if ( ENABLE_PERFPROFILING )
+
+ add_library ( profiler STATIC
+ ${PROFILER_SOURCES}
+ ${PROFILER_INCLUDES}
+ )
+
+endif ( ENABLE_PERFPROFILING )
+
+install (FILES ${PROFILER_INCLUDES}
+ DESTINATION "${INCLUDE_INSTALL_PATH}/profiler"
+)
--- /dev/null
+if PERF_PROFILING
+noinst_LIBRARIES = libprofiler.a
+endif
+
+x_includedir = $(pkgincludedir)/profiler
+
+x_include_HEADERS = profiler.h
+
+if PERF_PROFILING
+libprofiler_a_SOURCES = \
+profiler.cc \
+profiler.h
+endif
#include "protocols/eth.h"
#include "protocols/icmp4.h"
#include "protocols/icmp6.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "parser/parser.h"
#include "codecs/codec_module.h"
#include "main/snort_types.h"
#include "main/snort_config.h"
#include "utils/util.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "framework/mpse.h"
//-------------------------------------------------------------------------
#include "main/snort_types.h"
#include "main/snort_config.h"
#include "utils/util.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "framework/mpse.h"
//-------------------------------------------------------------------------
#include "main/snort_types.h"
#include "main/snort_config.h"
#include "utils/util.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "framework/mpse.h"
//-------------------------------------------------------------------------
#include "main/snort_types.h"
#include "main/snort_config.h"
#include "utils/util.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "framework/mpse.h"
//-------------------------------------------------------------------------
#include "main/snort_types.h"
#include "main/snort_config.h"
#include "utils/util.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "framework/mpse.h"
//-------------------------------------------------------------------------
#include "main/snort_types.h"
#include "main/snort_config.h"
#include "utils/util.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "framework/mpse.h"
//-------------------------------------------------------------------------
#include "main/snort_types.h"
#include "main/snort_config.h"
#include "utils/util.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "framework/mpse.h"
//-------------------------------------------------------------------------
#include "main/snort_types.h"
#include "main/snort_config.h"
#include "utils/util.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "framework/mpse.h"
//-------------------------------------------------------------------------
#include "main/snort_types.h"
#include "main/snort_config.h"
#include "utils/util.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "framework/mpse.h"
//-------------------------------------------------------------------------
#include "events/event_queue.h"
#include "parser/parser.h"
#include "utils/util.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "framework/inspector.h"
#include "framework/module.h"
#include "protocols/udp.h"
#include "events/event_queue.h"
#include "main/snort_types.h"
#include "main/snort_debug.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "stream/stream_api.h"
#include "parser/parser.h"
#include "framework/inspector.h"
#include "protocols/packet.h"
#include "stream/stream_api.h"
-#include "time/profiler.h"
// Implementation header with definitions, datatypes and flowdata class for
// DNS service inspector.
#include "main/snort_types.h"
#include "main/snort_debug.h"
#include "stream/stream_api.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "detection/detection_util.h"
#include "parser/parser.h"
#include "utils/sfsnprintfappend.h"
#include "ftpp_ui_config.h"
#include "protocols/packet.h"
#include "framework/bits.h"
-#include "time/profiler.h"
#define BUF_SIZE 1024
FTP_SERVER_PROTO_CONF* get_ftp_server(Packet*);
#ifdef PERF_PROFILING
+struct ProfileStats;
void ft_update_perf(ProfileStats&);
#endif
#include "managers/inspector_manager.h"
#include "detection/detection_util.h"
#include "target_based/snort_protocols.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
int16_t ftp_data_app_id = SFTARGET_UNKNOWN_PROTOCOL;
#include "framework/inspector.h"
#include "detection/detection_util.h"
#include "protocols/tcp.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#define s_name "ftp_data"
#include "main/snort_types.h"
#include "main/snort_debug.h"
#include "stream/stream_api.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "detection/detection_util.h"
#include "parser/parser.h"
#include "parser/mstring.h"
#include "main/snort_types.h"
#include "main/snort_debug.h"
#include "stream/stream_api.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "detection/detection_util.h"
#include "parser/parser.h"
#include "utils/sfsnprintfappend.h"
#include "main/snort_types.h"
#include "main/snort_debug.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "stream/stream_api.h"
#include "file_api/file_api.h"
#include "parser/parser.h"
#include "main/snort_debug.h"
#include "main/snort_types.h"
#include "protocols/packet.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "gtp.h"
#include "gtp_inspect.h"
#include "managers/inspector_manager.h"
#include "protocols/packet.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "gtp.h"
#include "gtp_module.h"
#include <cassert>
#include "gtp.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
THREAD_LOCAL ProfileStats gtp_inspect_prof;
#include "framework/module.h"
#include "hash/sfhashfcn.h"
#include "protocols/packet.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "gtp.h"
#include "gtp_inspect.h"
#include "framework/module.h"
#include "hash/sfhashfcn.h"
#include "protocols/packet.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "gtp.h"
#include "gtp_inspect.h"
#include "framework/module.h"
#include "hash/sfhashfcn.h"
#include "protocols/packet.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "gtp_inspect.h"
#include "utils/sfsnprintfappend.h"
#include <mime/decode_base.h>
#include "stream/stream_api.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "loggers/unified2_common.h"
#include "file_api/file_api.h"
#include "file_api/file_flows.h"
#include "stream/stream_api.h"
#include "detection/detection_util.h"
#include "search_engines/search_tool.h"
-#include "time/profiler.h"
#include "utils/util_jsnorm.h"
#include "utils/util_utf.h"
extern THREAD_LOCAL DataBuffer HttpDecodeBuf;
#ifdef PERF_PROFILING
+struct ProfileStats;
extern THREAD_LOCAL ProfileStats hiDetectPerfStats;
extern THREAD_LOCAL int hiDetectCalled;
#endif
#include "main/snort_debug.h"
#include "parser/parser.h"
#include "decompress/file_decomp.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "detection/detection_util.h"
#include "stream/stream_api.h"
#include "target_based/snort_protocols.h"
#include "events/event_queue.h"
#include "main/snort_types.h"
#include "main/snort_debug.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "stream/stream_api.h"
#include "file_api/file_api.h"
#include "parser/parser.h"
#include "protocols/packet.h"
#include "stream/stream_api.h"
-#include "time/profiler.h"
#include "imap_config.h"
// Direction packet is coming from, if we can figure it out
#include "framework/module.h"
#include "hash/sfhashfcn.h"
#include "protocols/packet.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "modbus.h"
#include "modbus_decode.h"
#include "framework/module.h"
#include "hash/sfhashfcn.h"
#include "protocols/packet.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "modbus.h"
#include "framework/module.h"
#include "hash/sfhashfcn.h"
#include "protocols/packet.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "modbus.h"
#include "events/event_queue.h"
#include "managers/inspector_manager.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "modbus_decode.h"
#include "modbus_module.h"
#include "modbus_module.h"
#include "modbus.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
THREAD_LOCAL ProfileStats modbus_prof;
#include "events/event_queue.h"
#include "main/snort_types.h"
#include "main/snort_debug.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "stream/stream_api.h"
#include "parser/parser.h"
#include "framework/inspector.h"
#include "protocols/packet.h"
#include "stream/stream_api.h"
-#include "time/profiler.h"
#include "pop_config.h"
// Direction packet is coming from, if we can figure it out
#include "main/snort_debug.h"
#include "detection/detect.h"
#include "log/log.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "utils/snort_bounds.h"
#include "utils/util.h"
#include "detection/detection_util.h"
#include "main/snort_types.h"
#include "main/snort_debug.h"
#include "protocols/packet.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "flow/flow.h"
#include "detection/detection_defines.h"
#include "framework/ips_option.h"
#include "detection/detect.h"
#include "detection/detection_defines.h"
#include "hash/sfhashfcn.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
//-------------------------------------------------------------------------
// sip_method
#include "detection/detect.h"
#include "detection/detection_defines.h"
#include "hash/sfhashfcn.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
//-------------------------------------------------------------------------
// sip_stat_code
#include "main/snort_types.h"
#include "main/snort_debug.h"
#include "main/snort_config.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "stream/stream_api.h"
#include "file_api/file_api.h"
#include "parser/parser.h"
#include "protocols/packet.h"
#include "stream/stream_api.h"
-#include "time/profiler.h"
#include "sip_config.h"
#include "sip_dialog.h"
#include "sip_parser.h"
#include "main/snort_types.h"
#include "main/snort_debug.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "stream/stream_api.h"
#include "file_api/file_api.h"
#include "mime/file_mime_process.h"
#include "protocols/packet.h"
#include "stream/stream_api.h"
#include "main/thread.h"
-#include "time/profiler.h"
#include "smtp_config.h"
// Direction packet is coming from, if we can figure it out
#include "events/event_queue.h"
#include "main/snort_types.h"
#include "main/snort_debug.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "stream/stream_api.h"
#include "file_api/file_api.h"
#include "parser/parser.h"
#include "protocols/packet.h"
#include "stream/stream_api.h"
-#include "time/profiler.h"
#include "ssh_config.h"
// Per-session data block containing current state
#include "detection/detect.h"
#include "detection/detection_defines.h"
#include "hash/sfhashfcn.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "ssl_inspector.h"
#include "detection/detect.h"
#include "detection/detection_defines.h"
#include "hash/sfhashfcn.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "ssl_inspector.h"
#include "events/event_queue.h"
#include "main/snort_types.h"
#include "main/snort_debug.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "stream/stream_api.h"
#include "parser/parser.h"
#include "framework/inspector.h"
#include "protocols/packet.h"
#include "stream/stream_api.h"
-#include "time/profiler.h"
#include "ssl_config.h"
#define SSLPP_ENCRYPTED_FLAGS \
#include "managers/inspector_manager.h"
#include "protocols/packet.h"
#include "stream/stream_splitter.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "utils/stats.h"
#include "log/messages.h"
#include "managers/inspector_manager.h"
#include "flow/flow_control.h"
#include "stream/stream_api.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "stream/tcp/tcp_session.h"
//-------------------------------------------------------------------------
#include "file_api/file_api.h"
#include "file_api/file_flows.h"
#include "perf_monitor/perf.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "packet_io/sfdaq.h"
#include "detection/detection_util.h"
#include "target_based/snort_protocols.h"
#include "flow/flow_control.h"
#include "flow/session.h"
#include "perf_monitor/perf.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "protocols/packet.h"
#include "protocols/layer.h"
#include "protocols/vlan.h"
#include "protocols/ipv4_options.h"
#include "protocols/packet_manager.h"
#include "main/snort_debug.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "time/timersub.h"
#include "perf_monitor/perf.h"
#include "utils/stats.h"
#include "perf_monitor/perf.h"
#include "flow/flow_control.h"
#include "sfip/sf_ip.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
THREAD_LOCAL ProfileStats ip_perf_stats;
#include "detection/detect.h"
#include "detection/detection_defines.h"
#include "hash/sfhashfcn.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#ifdef UNIT_TEST
#include "catch/catch.hpp"
#include "detection/detect.h"
#include "detection/detection_defines.h"
#include "hash/sfhashfcn.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "sfip/sf_ip.h"
//-------------------------------------------------------------------------
#include "tcp_module.h"
#include <string>
-using namespace std;
+#include "profiler/profiler.h"
#include "stream_tcp.h"
#include "stream/stream.h"
+using namespace std;
+
//-------------------------------------------------------------------------
// stream_tcp module
//-------------------------------------------------------------------------
#include "main/snort_types.h"
#include "main/thread.h"
#include "framework/module.h"
-#include "time/profiler.h"
#include "stream/stream.h"
#define GID_STREAM_TCP 129
#include "main/snort.h"
#include "protocols/packet.h"
#include "stream/stream.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "flow/flow_control.h"
#include "tcp_module.h"
#include "flow/flow_control.h"
#include "flow/session.h"
#include "flow/memcap.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "file_api/file_api.h"
#include "sfip/sf_ip.h"
#include "filters/sfrf.h"
#include "flow/session.h"
#include "packet_io/active.h"
#include "perf_monitor/perf.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "sfip/sf_ip.h"
// NOTE: sender is assumed to be client
#include "perf_monitor/perf.h"
#include "flow/flow_control.h"
#include "sfip/sf_ip.h"
-#include "time/profiler.h"
+#include "profiler/profiler.h"
#include "main/snort.h"
THREAD_LOCAL ProfileStats user_perf_stats;
-if ( ENABLE_PERFPROFILING )
- set ( PROFILER_SOURCES profiler.cc )
-endif ( ENABLE_PERFPROFILING )
-set ( PROFILER_INCLUDES profiler.h )
-
-# FIXIT-L Should this be conditionally compiled as well?
-set ( PPM_SOURCES ppm.cc ppm_module.cc ppm_module.h )
-set ( PPM_INCLUDES ppm.h )
-
set ( TIME_INTERNAL_SOURCES
packet_time.cc
packet_time.h
)
set ( TIME_INCLUDES
- ${PROFILER_INCLUDES}
- ${PPM_INCLUDES}
cpuclock.h
)
add_library ( time STATIC
- ${PROFILER_SOURCES}
- ${PPM_SOURCES}
${TIME_INTERNAL_SOURCES}
${TIME_INCLUDES}
)
-
noinst_LIBRARIES = libtime.a
x_includedir = $(pkgincludedir)/time
x_include_HEADERS = \
-cpuclock.h \
-profiler.h \
-ppm.h
+cpuclock.h
libtime_a_SOURCES = \
packet_time.cc \
packet_time.h \
-ppm.cc \
-ppm_module.cc \
-ppm_module.h \
periodic.cc \
periodic.h \
timersub.h
-
-if PERF_PROFILING
-libtime_a_SOURCES += profiler.cc
-endif
#include "protocols/packet_manager.h"
#include "detection/fp_create.h"
#include "filters/sfthreshold.h"
-#include "time/ppm.h"
-#include "time/profiler.h"
+#include "ppm/ppm.h"
+#include "profiler/profiler.h"
#include "time/timersub.h"
#include "file_api/file_stats.h"
#include "packet_io/sfdaq.h"
#include "packet_io/active.h"
#include "ips_options/ips_pcre.h"
-#include "time/ppm.h"
+#include "ppm/ppm.h"
#include "time/packet_time.h"
#include "time/timersub.h"
#include "stream/stream.h"