]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Merge pull request #764 in SNORT/snort3 from header_cleanup to master
authorMichael Altizer (mialtize) <mialtize@cisco.com>
Thu, 5 Jan 2017 21:24:54 +0000 (16:24 -0500)
committerMichael Altizer (mialtize) <mialtize@cisco.com>
Thu, 5 Jan 2017 21:24:54 +0000 (16:24 -0500)
Squashed commit of the following:

commit d2b780ecee5d8c14a52df5f443594ef88c2d0d2b
Author: Michael Altizer <mialtize@cisco.com>
Date:   Thu Jan 5 12:57:47 2017 -0500

    doc: Update style guide with header inclusion instructions

commit 3c1979ca35f3cd3ddae7de83beab8dfb6d0508ac
Author: Michael Altizer <mialtize@cisco.com>
Date:   Thu Dec 22 15:50:14 2016 -0500

    install: Prune the set of installed headers

commit fc995ce4218462561a9e86ae8288a458e2d95add
Author: Michael Altizer <mialtize@cisco.com>
Date:   Thu Dec 22 15:56:38 2016 -0500

    build: The big header cleanup

1067 files changed:
daqs/daq_file.c
daqs/daq_hext.c
doc/style.txt
extra/src/codecs/cd_eapol/cd_eapol.cc
extra/src/codecs/cd_linux_sll/cd_linux_sll.cc
extra/src/codecs/cd_null/cd_null.cc
extra/src/codecs/cd_pflog/cd_pflog.cc
extra/src/codecs/cd_pim/cd_pim.cc
extra/src/codecs/cd_ppp/cd_ppp.cc
extra/src/codecs/cd_raw4/cd_raw4.cc
extra/src/codecs/cd_raw6/cd_raw6.cc
extra/src/codecs/cd_slip/cd_slip.cc
extra/src/codecs/cd_token_ring/cd_token_ring.cc
extra/src/codecs/cd_wlan/cd_wlan.cc
extra/src/inspectors/data_log/data_log.cc
extra/src/inspectors/dpx/dpx.cc
extra/src/inspectors/http_server/hi_ad.cc
extra/src/inspectors/http_server/hi_ad.h
extra/src/inspectors/http_server/hi_client.cc
extra/src/inspectors/http_server/hi_client.h
extra/src/inspectors/http_server/hi_client_init.cc
extra/src/inspectors/http_server/hi_client_norm.cc
extra/src/inspectors/http_server/hi_client_norm.h
extra/src/inspectors/http_server/hi_cmd_lookup.cc
extra/src/inspectors/http_server/hi_events.cc
extra/src/inspectors/http_server/hi_events.h
extra/src/inspectors/http_server/hi_include.h
extra/src/inspectors/http_server/hi_main.cc
extra/src/inspectors/http_server/hi_main.h
extra/src/inspectors/http_server/hi_mi.cc
extra/src/inspectors/http_server/hi_mi.h
extra/src/inspectors/http_server/hi_module.cc
extra/src/inspectors/http_server/hi_module.h
extra/src/inspectors/http_server/hi_norm.cc
extra/src/inspectors/http_server/hi_norm.h
extra/src/inspectors/http_server/hi_return_codes.h
extra/src/inspectors/http_server/hi_server.cc
extra/src/inspectors/http_server/hi_server.h
extra/src/inspectors/http_server/hi_server_norm.cc
extra/src/inspectors/http_server/hi_server_norm.h
extra/src/inspectors/http_server/hi_si.cc
extra/src/inspectors/http_server/hi_si.h
extra/src/inspectors/http_server/hi_stream_splitter.cc
extra/src/inspectors/http_server/hi_stream_splitter.h
extra/src/inspectors/http_server/hi_ui_config.cc
extra/src/inspectors/http_server/hi_ui_config.h
extra/src/inspectors/http_server/hi_ui_iis_unicode_map.cc
extra/src/inspectors/http_server/hi_ui_iis_unicode_map.h
extra/src/inspectors/http_server/hi_util.h
extra/src/inspectors/http_server/http_inspect.cc
extra/src/inspectors/http_server/ips_http.cc
extra/src/inspectors/http_server/ips_http_header.cc
extra/src/ips_options/ips_pkt_num/ips_pkt_num.cc
extra/src/ips_options/ips_urg/ips_urg.cc
extra/src/loggers/alert_ex/alert_ex.cc
extra/src/loggers/alert_unixsock/alert_unixsock.cc
extra/src/loggers/log_null/log_null.cc
extra/src/search_engines/lowmem/lowmem.cc
extra/src/search_engines/lowmem/sfksearch.cc
extra/src/search_engines/lowmem/trie_api.cc
extra/src/so_rules/sid_18758/sid_18758.cc
extra/src/so_rules/sid_18758/sid_18758.h
src/actions/act_react.cc
src/actions/act_reject.cc
src/actions/act_replace.cc
src/actions/actions.cc
src/actions/actions.h
src/actions/ips_actions.cc
src/catch/unit_test.cc
src/catch/unit_test_main.h
src/codecs/codec_api.cc
src/codecs/codec_module.cc
src/codecs/ip/cd_auth.cc
src/codecs/ip/cd_dst_opts.cc
src/codecs/ip/cd_esp.cc
src/codecs/ip/cd_frag.cc
src/codecs/ip/cd_gre.cc
src/codecs/ip/cd_hop_opts.cc
src/codecs/ip/cd_icmp4.cc
src/codecs/ip/cd_icmp6.cc
src/codecs/ip/cd_igmp.cc
src/codecs/ip/cd_ipv4.cc
src/codecs/ip/cd_ipv6.cc
src/codecs/ip/cd_mobility.cc
src/codecs/ip/cd_no_next.cc
src/codecs/ip/cd_pgm.cc
src/codecs/ip/cd_routing.cc
src/codecs/ip/cd_sun_nd.cc
src/codecs/ip/cd_swipe.cc
src/codecs/ip/cd_tcp.cc
src/codecs/ip/cd_udp.cc
src/codecs/ip/checksum.h
src/codecs/link/cd_arp.cc
src/codecs/link/cd_ciscometadata.cc
src/codecs/link/cd_erspan2.cc
src/codecs/link/cd_erspan3.cc
src/codecs/link/cd_fabricpath.cc
src/codecs/link/cd_mpls.cc
src/codecs/link/cd_ppp_encap.cc
src/codecs/link/cd_pppoe.cc
src/codecs/link/cd_trans_bridge.cc
src/codecs/link/cd_vlan.cc
src/codecs/misc/cd_default.cc
src/codecs/misc/cd_gtp.cc
src/codecs/misc/cd_icmp4_ip.cc
src/codecs/misc/cd_icmp6_ip.cc
src/codecs/misc/cd_llc.cc
src/codecs/misc/cd_teredo.cc
src/codecs/misc/cd_user.cc
src/codecs/root/cd_eth.cc
src/connectors/connectors.cc
src/connectors/file_connector/file_connector.cc
src/connectors/file_connector/file_connector.h
src/connectors/file_connector/file_connector_module.cc
src/connectors/file_connector/file_connector_module.h
src/connectors/file_connector/test/file_connector_module_test.cc
src/connectors/file_connector/test/file_connector_test.cc
src/connectors/tcp_connector/tcp_connector.cc
src/connectors/tcp_connector/tcp_connector.h
src/connectors/tcp_connector/tcp_connector_module.cc
src/connectors/tcp_connector/tcp_connector_module.h
src/connectors/tcp_connector/test/tcp_connector_module_test.cc
src/connectors/tcp_connector/test/tcp_connector_test.cc
src/control/idle_processing.cc
src/decompress/file_decomp.cc
src/decompress/file_decomp.h
src/decompress/file_decomp_pdf.cc
src/decompress/file_decomp_pdf.h
src/decompress/file_decomp_swf.cc
src/decompress/file_decomp_swf.h
src/detection/CMakeLists.txt
src/detection/Makefile.am
src/detection/detect.cc
src/detection/detect.h
src/detection/detection_options.cc
src/detection/detection_options.h
src/detection/detection_util.cc
src/detection/detection_util.h
src/detection/fp_config.cc
src/detection/fp_create.cc
src/detection/fp_create.h
src/detection/fp_detect.cc
src/detection/fp_detect.h
src/detection/fp_utils.cc
src/detection/pattern_match_data.h
src/detection/pcrm.cc
src/detection/pcrm.h
src/detection/rules.h
src/detection/service_map.cc
src/detection/service_map.h
src/detection/sfrim.cc
src/detection/signature.cc
src/detection/signature.h
src/detection/tag.cc
src/detection/treenodes.cc
src/detection/treenodes.h
src/events/event.cc
src/events/event.h
src/events/event_queue.cc
src/events/event_queue.h
src/events/event_wrapper.cc
src/events/event_wrapper.h
src/events/sfeventq.cc
src/file_api/circular_buffer.cc
src/file_api/file_cache.cc
src/file_api/file_cache.h
src/file_api/file_capture.cc
src/file_api/file_capture.h
src/file_api/file_config.cc
src/file_api/file_enforcer.cc
src/file_api/file_flows.cc
src/file_api/file_identifier.cc
src/file_api/file_lib.cc
src/file_api/file_mempool.cc
src/file_api/file_module.cc
src/file_api/file_policy.cc
src/file_api/file_segment.cc
src/file_api/file_service.cc
src/file_api/file_stats.cc
src/filters/CMakeLists.txt
src/filters/Makefile.am
src/filters/detection_filter.cc
src/filters/rate_filter.cc
src/filters/sfrf.cc
src/filters/sfthd.cc
src/filters/sfthd.h
src/filters/sfthd_test.cc
src/filters/sfthreshold.cc
src/flow/CMakeLists.txt
src/flow/Makefile.am
src/flow/expect_cache.cc
src/flow/expect_cache.h
src/flow/flow.cc
src/flow/flow.h
src/flow/flow_cache.cc
src/flow/flow_control.cc
src/flow/flow_key.cc
src/flow/flow_key.h
src/flow/ha.cc
src/flow/ha.h
src/flow/ha_module.cc
src/flow/ha_module.h
src/flow/test/ha_module_test.cc
src/flow/test/ha_test.cc
src/framework/base_api.h
src/framework/codec.cc
src/framework/codec.h
src/framework/connector.h
src/framework/cursor.cc
src/framework/cursor.h
src/framework/data_bus.cc
src/framework/data_bus.h
src/framework/decode_data.h
src/framework/inspector.cc
src/framework/inspector.h
src/framework/ips_action.h
src/framework/ips_option.cc
src/framework/ips_option.h
src/framework/logger.h
src/framework/lua_api.h
src/framework/module.cc
src/framework/module.h
src/framework/mpse.cc
src/framework/mpse.h
src/framework/parameter.cc
src/framework/range.cc
src/framework/so_rule.h
src/framework/value.cc
src/framework/value.h
src/hash/CMakeLists.txt
src/hash/Makefile.am
src/hash/hashes.cc
src/hash/hashes.h
src/hash/lru_cache_shared.cc
src/hash/sfghash.cc
src/hash/sfghash.h
src/hash/sfhashfcn.cc
src/hash/sfhashfcn.h
src/hash/sfprimetable.cc
src/hash/sfxhash.cc
src/hash/sfxhash.h
src/hash/test/lru_cache_shared_test.cc
src/hash/zhash.cc
src/helpers/chunk.cc
src/helpers/directory.cc
src/helpers/markup.cc
src/helpers/process.cc
src/helpers/process.h
src/host_tracker/host_cache.cc
src/host_tracker/host_cache.h
src/host_tracker/host_cache_module.cc
src/host_tracker/host_cache_module.h
src/host_tracker/host_tracker.cc
src/host_tracker/host_tracker.h
src/host_tracker/host_tracker_module.cc
src/host_tracker/host_tracker_module.h
src/host_tracker/test/host_cache_module_test.cc
src/host_tracker/test/host_cache_test.cc
src/host_tracker/test/host_tracker_module_test.cc
src/host_tracker/test/host_tracker_test.cc
src/ips_options/asn1_detect.cc
src/ips_options/asn1_detect.h
src/ips_options/asn1_util.cc
src/ips_options/extract.cc
src/ips_options/ips_ack.cc
src/ips_options/ips_asn1.cc
src/ips_options/ips_base64.cc
src/ips_options/ips_bufferlen.cc
src/ips_options/ips_byte_extract.cc
src/ips_options/ips_byte_extract.h
src/ips_options/ips_byte_jump.cc
src/ips_options/ips_byte_test.cc
src/ips_options/ips_classtype.cc
src/ips_options/ips_content.cc
src/ips_options/ips_cvs.cc
src/ips_options/ips_dsize.cc
src/ips_options/ips_file_data.cc
src/ips_options/ips_file_type.cc
src/ips_options/ips_flags.cc
src/ips_options/ips_flow.cc
src/ips_options/ips_flowbits.cc
src/ips_options/ips_fragbits.cc
src/ips_options/ips_fragoffset.cc
src/ips_options/ips_gid.cc
src/ips_options/ips_hash.cc
src/ips_options/ips_icmp_id.cc
src/ips_options/ips_icmp_seq.cc
src/ips_options/ips_icode.cc
src/ips_options/ips_id.cc
src/ips_options/ips_ip_proto.cc
src/ips_options/ips_ipopts.cc
src/ips_options/ips_isdataat.cc
src/ips_options/ips_itype.cc
src/ips_options/ips_luajit.cc
src/ips_options/ips_msg.cc
src/ips_options/ips_options.cc
src/ips_options/ips_pcre.cc
src/ips_options/ips_pkt_data.cc
src/ips_options/ips_priority.cc
src/ips_options/ips_raw_data.cc
src/ips_options/ips_regex.cc
src/ips_options/ips_rem.cc
src/ips_options/ips_replace.cc
src/ips_options/ips_rev.cc
src/ips_options/ips_rpc.cc
src/ips_options/ips_sd_pattern.cc
src/ips_options/ips_seq.cc
src/ips_options/ips_session.cc
src/ips_options/ips_sid.cc
src/ips_options/ips_so.cc
src/ips_options/ips_soid.cc
src/ips_options/ips_tag.cc
src/ips_options/ips_tos.cc
src/ips_options/ips_ttl.cc
src/ips_options/ips_window.cc
src/ips_options/sd_credit_card.cc
src/ips_options/sd_credit_card.h
src/ips_options/test/ips_regex_test.cc
src/latency/CMakeLists.txt
src/latency/Makefile.am
src/latency/latency_module.cc
src/latency/packet_latency.cc
src/latency/packet_latency.h
src/latency/rule_latency.cc
src/latency/rule_latency_config.h
src/log/CMakeLists.txt
src/log/Makefile.am
src/log/log.cc
src/log/log.h
src/log/log_text.cc
src/log/messages.cc
src/log/messages.h
src/log/obfuscator.cc
src/log/obfuscator.h
src/log/test/obfuscator_test.cc
src/log/text_log.cc
src/log/text_log.h
src/log/unified2.h
src/loggers/alert_csv.cc
src/loggers/alert_fast.cc
src/loggers/alert_full.cc
src/loggers/alert_luajit.cc
src/loggers/alert_sf_socket.cc
src/loggers/alert_syslog.cc
src/loggers/log_codecs.cc
src/loggers/log_hext.cc
src/loggers/log_pcap.cc
src/loggers/loggers.cc
src/loggers/unified2.cc
src/lua/lua.cc
src/lua/lua.h
src/lua/lua_arg.h
src/lua/lua_iface.h
src/lua/lua_ref.cc
src/lua/lua_stack.h
src/lua/lua_stack_test.cc
src/lua/lua_table.h
src/lua/lua_test_common.h
src/lua/lua_util.cc
src/lua/lua_util.h
src/main.cc
src/main.h
src/main/analyzer.cc
src/main/analyzer.h
src/main/help.cc
src/main/modules.cc
src/main/policy.cc
src/main/policy.h
src/main/shell.cc
src/main/shell.h
src/main/snort.cc
src/main/snort.h
src/main/snort_config.cc
src/main/snort_config.h
src/main/snort_debug.cc
src/main/snort_debug.h
src/main/snort_module.cc
src/main/snort_types.h
src/main/thread.cc
src/main/thread.h
src/main/thread_config.cc
src/managers/CMakeLists.txt
src/managers/Makefile.am
src/managers/action_manager.cc
src/managers/action_manager.h
src/managers/codec_manager.cc
src/managers/codec_manager.h
src/managers/connector_manager.cc
src/managers/connector_manager.h
src/managers/event_manager.cc
src/managers/event_manager.h
src/managers/inspector_manager.cc
src/managers/inspector_manager.h
src/managers/ips_manager.cc
src/managers/ips_manager.h
src/managers/module_manager.cc
src/managers/module_manager.h
src/managers/mpse_manager.cc
src/managers/mpse_manager.h
src/managers/plugin_manager.cc
src/managers/plugin_manager.h
src/managers/script_manager.cc
src/managers/script_manager.h
src/managers/so_manager.cc
src/managers/so_manager.h
src/memory/memory_allocator.cc
src/memory/memory_cap.cc
src/memory/memory_manager.cc
src/memory/memory_module.cc
src/memory/prune_handler.cc
src/mime/CMakeLists.txt
src/mime/Makefile.am
src/mime/decode_b64.cc
src/mime/decode_b64.h
src/mime/decode_base.cc
src/mime/decode_base.h
src/mime/decode_bit.cc
src/mime/decode_bit.h
src/mime/decode_buffer.cc
src/mime/decode_buffer.h
src/mime/decode_qp.cc
src/mime/decode_qp.h
src/mime/decode_uu.cc
src/mime/file_mime_config.cc
src/mime/file_mime_decode.cc
src/mime/file_mime_decode.h
src/mime/file_mime_log.cc
src/mime/file_mime_log.h
src/mime/file_mime_paf.cc
src/mime/file_mime_paf.h
src/mime/file_mime_process.cc
src/mime/file_mime_process.h
src/network_inspectors/appid/app_forecast.cc
src/network_inspectors/appid/app_forecast.h
src/network_inspectors/appid/app_info_table.cc
src/network_inspectors/appid/app_info_table.h
src/network_inspectors/appid/appid_api.cc
src/network_inspectors/appid/appid_api.h
src/network_inspectors/appid/appid_config.cc
src/network_inspectors/appid/appid_http_event_handler.cc
src/network_inspectors/appid/appid_http_event_handler.h
src/network_inspectors/appid/appid_inspector.cc
src/network_inspectors/appid/appid_inspector.h
src/network_inspectors/appid/appid_module.cc
src/network_inspectors/appid/appid_module.h
src/network_inspectors/appid/appid_session.cc
src/network_inspectors/appid/appid_session.h
src/network_inspectors/appid/appid_stats.cc
src/network_inspectors/appid/appid_stats_counter.cc
src/network_inspectors/appid/appid_utils/appid_utils.cc
src/network_inspectors/appid/appid_utils/fw_avltree.cc
src/network_inspectors/appid/appid_utils/fw_avltree.h
src/network_inspectors/appid/appid_utils/ip_funcs.cc
src/network_inspectors/appid/appid_utils/ip_funcs.h
src/network_inspectors/appid/appid_utils/network_set.cc
src/network_inspectors/appid/appid_utils/network_set.h
src/network_inspectors/appid/appid_utils/sf_mlmp.cc
src/network_inspectors/appid/appid_utils/sf_mlmp.h
src/network_inspectors/appid/appid_utils/sf_multi_mpse.cc
src/network_inspectors/appid/appid_utils/sf_multi_mpse.h
src/network_inspectors/appid/client_plugins/client_app_aim.cc
src/network_inspectors/appid/client_plugins/client_app_api.h
src/network_inspectors/appid/client_plugins/client_app_base.cc
src/network_inspectors/appid/client_plugins/client_app_bit.cc
src/network_inspectors/appid/client_plugins/client_app_bit_tracker.cc
src/network_inspectors/appid/client_plugins/client_app_config.h
src/network_inspectors/appid/client_plugins/client_app_msn.cc
src/network_inspectors/appid/client_plugins/client_app_rtp.cc
src/network_inspectors/appid/client_plugins/client_app_ssh.cc
src/network_inspectors/appid/client_plugins/client_app_timbuktu.cc
src/network_inspectors/appid/client_plugins/client_app_tns.cc
src/network_inspectors/appid/client_plugins/client_app_vnc.cc
src/network_inspectors/appid/client_plugins/client_app_ym.cc
src/network_inspectors/appid/detector_plugins/detector_base.cc
src/network_inspectors/appid/detector_plugins/detector_dns.cc
src/network_inspectors/appid/detector_plugins/detector_http.cc
src/network_inspectors/appid/detector_plugins/detector_imap.cc
src/network_inspectors/appid/detector_plugins/detector_kerberos.cc
src/network_inspectors/appid/detector_plugins/detector_pattern.cc
src/network_inspectors/appid/detector_plugins/detector_pop3.cc
src/network_inspectors/appid/detector_plugins/detector_sip.cc
src/network_inspectors/appid/detector_plugins/detector_smtp.cc
src/network_inspectors/appid/detector_plugins/http_url_patterns.cc
src/network_inspectors/appid/detector_plugins/test/detector_smtp_test.cc
src/network_inspectors/appid/errors.sh [deleted file]
src/network_inspectors/appid/host_port_app_cache.cc
src/network_inspectors/appid/host_port_app_cache.h
src/network_inspectors/appid/http_common.h
src/network_inspectors/appid/ips_appid_option.cc
src/network_inspectors/appid/length_app_cache.cc
src/network_inspectors/appid/length_app_cache.h
src/network_inspectors/appid/lua_detector_api.cc
src/network_inspectors/appid/lua_detector_api.h
src/network_inspectors/appid/lua_detector_flow_api.cc
src/network_inspectors/appid/lua_detector_module.cc
src/network_inspectors/appid/lua_detector_module.h
src/network_inspectors/appid/lua_detector_util.h
src/network_inspectors/appid/service_plugins/dcerpc.cc
src/network_inspectors/appid/service_plugins/dcerpc.h
src/network_inspectors/appid/service_plugins/service_base.cc
src/network_inspectors/appid/service_plugins/service_base.h
src/network_inspectors/appid/service_plugins/service_battle_field.cc
src/network_inspectors/appid/service_plugins/service_bgp.cc
src/network_inspectors/appid/service_plugins/service_bit.cc
src/network_inspectors/appid/service_plugins/service_bootp.cc
src/network_inspectors/appid/service_plugins/service_config.h
src/network_inspectors/appid/service_plugins/service_dcerpc.cc
src/network_inspectors/appid/service_plugins/service_direct_connect.cc
src/network_inspectors/appid/service_plugins/service_flap.cc
src/network_inspectors/appid/service_plugins/service_ftp.cc
src/network_inspectors/appid/service_plugins/service_irc.cc
src/network_inspectors/appid/service_plugins/service_lpr.cc
src/network_inspectors/appid/service_plugins/service_mdns.cc
src/network_inspectors/appid/service_plugins/service_mysql.cc
src/network_inspectors/appid/service_plugins/service_netbios.cc
src/network_inspectors/appid/service_plugins/service_nntp.cc
src/network_inspectors/appid/service_plugins/service_ntp.cc
src/network_inspectors/appid/service_plugins/service_radius.cc
src/network_inspectors/appid/service_plugins/service_rexec.cc
src/network_inspectors/appid/service_plugins/service_rfb.cc
src/network_inspectors/appid/service_plugins/service_rlogin.cc
src/network_inspectors/appid/service_plugins/service_rpc.cc
src/network_inspectors/appid/service_plugins/service_rshell.cc
src/network_inspectors/appid/service_plugins/service_rsync.cc
src/network_inspectors/appid/service_plugins/service_rtmp.cc
src/network_inspectors/appid/service_plugins/service_snmp.cc
src/network_inspectors/appid/service_plugins/service_ssh.cc
src/network_inspectors/appid/service_plugins/service_ssl.cc
src/network_inspectors/appid/service_plugins/service_telnet.cc
src/network_inspectors/appid/service_plugins/service_tftp.cc
src/network_inspectors/appid/service_plugins/service_timbuktu.cc
src/network_inspectors/appid/service_plugins/service_tns.cc
src/network_inspectors/appid/service_plugins/service_util.h
src/network_inspectors/appid/service_plugins/test/service_rsync_test.cc
src/network_inspectors/appid/service_state.cc
src/network_inspectors/appid/test/appid_http_event_test.cc
src/network_inspectors/appid/thirdparty_appid_api.h
src/network_inspectors/appid/thirdparty_appid_types.h
src/network_inspectors/appid/thirdparty_appid_utils.cc
src/network_inspectors/arp_spoof/arp_module.cc
src/network_inspectors/arp_spoof/arp_module.h
src/network_inspectors/arp_spoof/arp_spoof.cc
src/network_inspectors/binder/bind_module.cc
src/network_inspectors/binder/bind_module.h
src/network_inspectors/binder/binder.cc
src/network_inspectors/binder/test/binder_test.cc
src/network_inspectors/network_inspectors.cc
src/network_inspectors/normalize/norm.cc
src/network_inspectors/normalize/norm.h
src/network_inspectors/normalize/norm_module.cc
src/network_inspectors/normalize/norm_module.h
src/network_inspectors/normalize/normalize.cc
src/network_inspectors/normalize/normalize.h
src/network_inspectors/packet_capture/capture_module.cc
src/network_inspectors/packet_capture/packet_capture.cc
src/network_inspectors/packet_capture/packet_capture.h
src/network_inspectors/perf_monitor/base_tracker.cc
src/network_inspectors/perf_monitor/cpu_tracker.cc
src/network_inspectors/perf_monitor/cpu_tracker.h
src/network_inspectors/perf_monitor/csv_formatter.cc
src/network_inspectors/perf_monitor/flow_ip_tracker.cc
src/network_inspectors/perf_monitor/flow_tracker.cc
src/network_inspectors/perf_monitor/perf_formatter.cc
src/network_inspectors/perf_monitor/perf_formatter.h
src/network_inspectors/perf_monitor/perf_module.cc
src/network_inspectors/perf_monitor/perf_monitor.cc
src/network_inspectors/perf_monitor/perf_monitor.h
src/network_inspectors/perf_monitor/perf_tracker.cc
src/network_inspectors/perf_monitor/text_formatter.cc
src/network_inspectors/port_scan/ipobj.cc
src/network_inspectors/port_scan/ipobj.h
src/network_inspectors/port_scan/port_scan.cc
src/network_inspectors/port_scan/ps_detect.cc
src/network_inspectors/port_scan/ps_detect.h
src/network_inspectors/port_scan/ps_inspect.h
src/network_inspectors/port_scan/ps_module.cc
src/network_inspectors/port_scan/ps_module.h
src/network_inspectors/reputation/reputation_config.h
src/network_inspectors/reputation/reputation_inspect.cc
src/network_inspectors/reputation/reputation_inspect.h
src/network_inspectors/reputation/reputation_module.cc
src/network_inspectors/reputation/reputation_module.h
src/network_inspectors/reputation/reputation_parse.cc
src/packet_io/active.cc
src/packet_io/active.h
src/packet_io/intf.cc
src/packet_io/sfdaq.cc
src/packet_io/sfdaq.h
src/packet_io/sfdaq_config.cc
src/packet_io/sfdaq_module.cc
src/packet_io/test/sfdaq_module_test.cc
src/packet_io/trough.cc
src/parser/arg_list.cc
src/parser/cmd_line.cc
src/parser/config_file.cc
src/parser/config_file.h
src/parser/mstring.cc
src/parser/parse_conf.cc
src/parser/parse_ip.cc
src/parser/parse_ip.h
src/parser/parse_ports.cc
src/parser/parse_ports.h
src/parser/parse_rule.cc
src/parser/parse_stream.cc
src/parser/parse_utils.cc
src/parser/parser.cc
src/parser/parser.h
src/parser/vars.cc
src/parser/vars.h
src/piglet/piglet.cc
src/piglet/piglet_api.h
src/piglet/piglet_manager.cc
src/piglet/piglet_output.cc
src/piglet/piglet_runner.cc
src/piglet/piglet_utils.cc
src/piglet_plugins/piglet_plugins.cc
src/piglet_plugins/pp_buffer_iface.cc
src/piglet_plugins/pp_codec.cc
src/piglet_plugins/pp_codec_data_iface.cc
src/piglet_plugins/pp_codec_iface.cc
src/piglet_plugins/pp_cursor_iface.cc
src/piglet_plugins/pp_daq_pkthdr_iface.cc
src/piglet_plugins/pp_decode_data_iface.cc
src/piglet_plugins/pp_enc_state_iface.cc
src/piglet_plugins/pp_event_iface.cc
src/piglet_plugins/pp_flow_iface.cc
src/piglet_plugins/pp_inspector.cc
src/piglet_plugins/pp_inspector_iface.cc
src/piglet_plugins/pp_ip_api_iface.cc
src/piglet_plugins/pp_ips_action.cc
src/piglet_plugins/pp_ips_action_iface.cc
src/piglet_plugins/pp_ips_option.cc
src/piglet_plugins/pp_ips_option_iface.cc
src/piglet_plugins/pp_logger.cc
src/piglet_plugins/pp_logger_iface.cc
src/piglet_plugins/pp_packet_iface.cc
src/piglet_plugins/pp_raw_buffer_iface.cc
src/piglet_plugins/pp_search_engine.cc
src/piglet_plugins/pp_search_engine_iface.cc
src/piglet_plugins/pp_so_rule.cc
src/piglet_plugins/pp_so_rule_iface.cc
src/piglet_plugins/pp_stream_splitter_iface.cc
src/piglet_plugins/pp_test.cc
src/ports/port_group.cc
src/ports/port_item.cc
src/ports/port_item.h
src/ports/port_object.cc
src/ports/port_object.h
src/ports/port_object2.cc
src/ports/port_table.cc
src/ports/port_table.h
src/ports/port_utils.cc
src/ports/port_utils.h
src/ports/port_var_table.cc
src/ports/port_var_table.h
src/ports/rule_port_tables.cc
src/profiler/Makefile.am
src/profiler/memory_context.cc
src/profiler/memory_context.h
src/profiler/memory_defs.h
src/profiler/memory_profiler.cc
src/profiler/profiler.cc
src/profiler/profiler_nodes.cc
src/profiler/profiler_printer.h
src/profiler/profiler_stats_table.cc
src/profiler/rule_profiler.cc
src/profiler/rule_profiler_defs.h
src/profiler/time_profiler.cc
src/protocols/ip.cc
src/protocols/ip.h
src/protocols/ipv4.h
src/protocols/ipv4_options.cc
src/protocols/ipv4_options.h
src/protocols/ipv6.h
src/protocols/layer.cc
src/protocols/layer.h
src/protocols/packet.cc
src/protocols/packet.h
src/protocols/packet_manager.cc
src/protocols/packet_manager.h
src/protocols/protocol_ids.h
src/protocols/ssl.cc
src/protocols/ssl.h
src/protocols/tcp.h
src/protocols/tcp_options.cc
src/protocols/tcp_options.h
src/protocols/token_ring.h
src/protocols/udp.h
src/pub_sub/http_events.cc
src/pub_sub/sip_events.cc
src/pub_sub/sip_events.h
src/search_engines/CMakeLists.txt
src/search_engines/Makefile.am
src/search_engines/ac_banded.cc
src/search_engines/ac_bnfa.cc
src/search_engines/ac_full.cc
src/search_engines/ac_sparse.cc
src/search_engines/ac_sparse_bands.cc
src/search_engines/ac_std.cc
src/search_engines/acsmx.cc
src/search_engines/acsmx.h
src/search_engines/acsmx2.cc
src/search_engines/acsmx2.h
src/search_engines/acsmx2_api.cc
src/search_engines/bnfa_search.cc
src/search_engines/bnfa_search.h
src/search_engines/hyperscan.cc
src/search_engines/intel_cpm.cc
src/search_engines/intel_soft_cpm.cc
src/search_engines/search_engines.cc
src/search_engines/search_tool.cc
src/search_engines/test/hyperscan_test.cc
src/search_engines/test/search_tool_test.cc
src/service_inspectors/back_orifice/back_orifice.cc
src/service_inspectors/dce_rpc/dce_co.cc
src/service_inspectors/dce_rpc/dce_common.cc
src/service_inspectors/dce_rpc/dce_common.h
src/service_inspectors/dce_rpc/dce_list.cc
src/service_inspectors/dce_rpc/dce_smb.cc
src/service_inspectors/dce_rpc/dce_smb2.cc
src/service_inspectors/dce_rpc/dce_smb_commands.cc
src/service_inspectors/dce_rpc/dce_smb_module.cc
src/service_inspectors/dce_rpc/dce_smb_paf.cc
src/service_inspectors/dce_rpc/dce_smb_transaction.cc
src/service_inspectors/dce_rpc/dce_smb_transaction_utils.cc
src/service_inspectors/dce_rpc/dce_smb_utils.cc
src/service_inspectors/dce_rpc/dce_tcp.cc
src/service_inspectors/dce_rpc/dce_tcp_module.cc
src/service_inspectors/dce_rpc/dce_tcp_paf.cc
src/service_inspectors/dce_rpc/dce_udp.cc
src/service_inspectors/dce_rpc/dce_udp_module.cc
src/service_inspectors/dce_rpc/dce_udp_processing.cc
src/service_inspectors/dce_rpc/dce_utils.cc
src/service_inspectors/dce_rpc/ips_dce_iface.cc
src/service_inspectors/dce_rpc/ips_dce_opnum.cc
src/service_inspectors/dce_rpc/ips_dce_stub_data.cc
src/service_inspectors/dce_rpc/smb_message.cc
src/service_inspectors/dnp3/dnp3.cc
src/service_inspectors/dnp3/dnp3.h
src/service_inspectors/dnp3/dnp3_map.cc
src/service_inspectors/dnp3/dnp3_map.h
src/service_inspectors/dnp3/dnp3_module.cc
src/service_inspectors/dnp3/dnp3_paf.cc
src/service_inspectors/dnp3/dnp3_paf.h
src/service_inspectors/dnp3/dnp3_reassembly.cc
src/service_inspectors/dnp3/ips_dnp3_data.cc
src/service_inspectors/dnp3/ips_dnp3_func.cc
src/service_inspectors/dnp3/ips_dnp3_ind.cc
src/service_inspectors/dnp3/ips_dnp3_obj.cc
src/service_inspectors/dns/dns.cc
src/service_inspectors/dns/dns.h
src/service_inspectors/dns/dns_module.cc
src/service_inspectors/dns/dns_module.h
src/service_inspectors/ftp_telnet/ft_main.cc
src/service_inspectors/ftp_telnet/ft_main.h
src/service_inspectors/ftp_telnet/ftp.cc
src/service_inspectors/ftp_telnet/ftp_bounce_lookup.cc
src/service_inspectors/ftp_telnet/ftp_cmd_lookup.cc
src/service_inspectors/ftp_telnet/ftp_data.cc
src/service_inspectors/ftp_telnet/ftp_module.cc
src/service_inspectors/ftp_telnet/ftp_module.h
src/service_inspectors/ftp_telnet/ftp_parse.cc
src/service_inspectors/ftp_telnet/ftp_parse.h
src/service_inspectors/ftp_telnet/ftp_print.cc
src/service_inspectors/ftp_telnet/ftp_splitter.cc
src/service_inspectors/ftp_telnet/ftpp_si.cc
src/service_inspectors/ftp_telnet/ftpp_si.h
src/service_inspectors/ftp_telnet/ftpp_ui_config.cc
src/service_inspectors/ftp_telnet/ftpp_ui_config.h
src/service_inspectors/ftp_telnet/pp_ftp.cc
src/service_inspectors/ftp_telnet/pp_ftp.h
src/service_inspectors/ftp_telnet/pp_telnet.cc
src/service_inspectors/ftp_telnet/pp_telnet.h
src/service_inspectors/ftp_telnet/telnet.cc
src/service_inspectors/ftp_telnet/telnet_module.cc
src/service_inspectors/ftp_telnet/telnet_module.h
src/service_inspectors/gtp/gtp.cc
src/service_inspectors/gtp/gtp.h
src/service_inspectors/gtp/gtp_inspect.cc
src/service_inspectors/gtp/gtp_inspect.h
src/service_inspectors/gtp/gtp_module.cc
src/service_inspectors/gtp/gtp_module.h
src/service_inspectors/gtp/gtp_parser.cc
src/service_inspectors/gtp/gtp_parser.h
src/service_inspectors/gtp/ips_gtp_info.cc
src/service_inspectors/gtp/ips_gtp_type.cc
src/service_inspectors/gtp/ips_gtp_version.cc
src/service_inspectors/http_inspect/http_api.cc
src/service_inspectors/http_inspect/http_api.h
src/service_inspectors/http_inspect/http_cutter.cc
src/service_inspectors/http_inspect/http_cutter.h
src/service_inspectors/http_inspect/http_enum.h
src/service_inspectors/http_inspect/http_event_gen.h
src/service_inspectors/http_inspect/http_field.cc
src/service_inspectors/http_inspect/http_flow_data.cc
src/service_inspectors/http_inspect/http_head_norm.cc
src/service_inspectors/http_inspect/http_inspect.cc
src/service_inspectors/http_inspect/http_js_norm.cc
src/service_inspectors/http_inspect/http_module.cc
src/service_inspectors/http_inspect/http_msg_body.cc
src/service_inspectors/http_inspect/http_msg_body_chunk.cc
src/service_inspectors/http_inspect/http_msg_body_cl.cc
src/service_inspectors/http_inspect/http_msg_body_old.cc
src/service_inspectors/http_inspect/http_msg_head_shared.cc
src/service_inspectors/http_inspect/http_msg_head_shared_util.cc
src/service_inspectors/http_inspect/http_msg_header.cc
src/service_inspectors/http_inspect/http_msg_request.cc
src/service_inspectors/http_inspect/http_msg_section.cc
src/service_inspectors/http_inspect/http_msg_start.cc
src/service_inspectors/http_inspect/http_msg_status.cc
src/service_inspectors/http_inspect/http_msg_trailer.cc
src/service_inspectors/http_inspect/http_normalizers.cc
src/service_inspectors/http_inspect/http_str_to_code.cc
src/service_inspectors/http_inspect/http_str_to_code.h
src/service_inspectors/http_inspect/http_stream_splitter_reassemble.cc
src/service_inspectors/http_inspect/http_stream_splitter_scan.cc
src/service_inspectors/http_inspect/http_tables.cc
src/service_inspectors/http_inspect/http_test_input.cc
src/service_inspectors/http_inspect/http_test_manager.cc
src/service_inspectors/http_inspect/http_transaction.cc
src/service_inspectors/http_inspect/http_uri.cc
src/service_inspectors/http_inspect/http_uri_norm.cc
src/service_inspectors/http_inspect/ips_http.cc
src/service_inspectors/http_inspect/ips_http.h
src/service_inspectors/http_inspect/test/http_module_test.cc
src/service_inspectors/http_inspect/test/http_msg_head_shared_util_test.cc
src/service_inspectors/http_inspect/test/http_normalizers_test.cc
src/service_inspectors/http_inspect/test/http_transaction_test.cc
src/service_inspectors/http_inspect/test/http_uri_norm_test.cc
src/service_inspectors/imap/imap.cc
src/service_inspectors/imap/imap.h
src/service_inspectors/imap/imap_module.cc
src/service_inspectors/imap/imap_module.h
src/service_inspectors/imap/imap_paf.cc
src/service_inspectors/imap/imap_paf.h
src/service_inspectors/modbus/ips_modbus_data.cc
src/service_inspectors/modbus/ips_modbus_func.cc
src/service_inspectors/modbus/ips_modbus_unit.cc
src/service_inspectors/modbus/modbus.cc
src/service_inspectors/modbus/modbus.h
src/service_inspectors/modbus/modbus_decode.cc
src/service_inspectors/modbus/modbus_module.cc
src/service_inspectors/modbus/modbus_module.h
src/service_inspectors/modbus/modbus_paf.cc
src/service_inspectors/modbus/modbus_paf.h
src/service_inspectors/pop/pop.cc
src/service_inspectors/pop/pop.h
src/service_inspectors/pop/pop_module.cc
src/service_inspectors/pop/pop_module.h
src/service_inspectors/pop/pop_paf.cc
src/service_inspectors/pop/pop_paf.h
src/service_inspectors/rpc_decode/rpc_decode.cc
src/service_inspectors/rpc_decode/rpc_module.cc
src/service_inspectors/rpc_decode/rpc_module.h
src/service_inspectors/service_inspectors.cc
src/service_inspectors/sip/ips_sip.cc
src/service_inspectors/sip/ips_sip_method.cc
src/service_inspectors/sip/ips_sip_stat_code.cc
src/service_inspectors/sip/sip.cc
src/service_inspectors/sip/sip.h
src/service_inspectors/sip/sip_common.h
src/service_inspectors/sip/sip_config.cc
src/service_inspectors/sip/sip_config.h
src/service_inspectors/sip/sip_dialog.cc
src/service_inspectors/sip/sip_dialog.h
src/service_inspectors/sip/sip_module.cc
src/service_inspectors/sip/sip_module.h
src/service_inspectors/sip/sip_parser.cc
src/service_inspectors/sip/sip_utils.cc
src/service_inspectors/sip/sip_utils.h
src/service_inspectors/smtp/smtp.cc
src/service_inspectors/smtp/smtp.h
src/service_inspectors/smtp/smtp_config.h
src/service_inspectors/smtp/smtp_module.cc
src/service_inspectors/smtp/smtp_module.h
src/service_inspectors/smtp/smtp_normalize.cc
src/service_inspectors/smtp/smtp_normalize.h
src/service_inspectors/smtp/smtp_paf.cc
src/service_inspectors/smtp/smtp_paf.h
src/service_inspectors/smtp/smtp_util.cc
src/service_inspectors/smtp/smtp_util.h
src/service_inspectors/smtp/smtp_xlink2state.cc
src/service_inspectors/smtp/smtp_xlink2state.h
src/service_inspectors/ssh/ssh.cc
src/service_inspectors/ssh/ssh.h
src/service_inspectors/ssh/ssh_module.cc
src/service_inspectors/ssh/ssh_module.h
src/service_inspectors/ssl/ips_ssl_state.cc
src/service_inspectors/ssl/ips_ssl_version.cc
src/service_inspectors/ssl/ssl_config.h
src/service_inspectors/ssl/ssl_inspector.cc
src/service_inspectors/ssl/ssl_inspector.h
src/service_inspectors/ssl/ssl_module.cc
src/service_inspectors/ssl/ssl_module.h
src/service_inspectors/wizard/curses.cc
src/service_inspectors/wizard/curses.h
src/service_inspectors/wizard/hexes.cc
src/service_inspectors/wizard/magic.cc
src/service_inspectors/wizard/magic.h
src/service_inspectors/wizard/spells.cc
src/service_inspectors/wizard/wiz_module.cc
src/service_inspectors/wizard/wiz_module.h
src/service_inspectors/wizard/wizard.cc
src/sfip/CMakeLists.txt
src/sfip/Makefile.am
src/sfip/sf_cidr.cc
src/sfip/sf_ip.cc
src/sfip/sf_ip.h
src/sfip/sf_ipvar.cc
src/sfip/sf_ipvar.h
src/sfip/sf_vartable.cc
src/sfrt/CMakeLists.txt
src/sfrt/Makefile.am
src/sfrt/sfrt.cc
src/sfrt/sfrt.h
src/sfrt/sfrt_dir.cc
src/sfrt/sfrt_dir.h
src/sfrt/sfrt_flat.cc
src/sfrt/sfrt_flat_dir.cc
src/sfrt/sfrt_test.cc
src/side_channel/side_channel.cc
src/side_channel/side_channel.h
src/side_channel/side_channel_module.cc
src/side_channel/side_channel_module.h
src/side_channel/test/side_channel_module_test.cc
src/side_channel/test/side_channel_test.cc
src/stream/base/stream_base.cc
src/stream/base/stream_ha.cc
src/stream/base/stream_ha.h
src/stream/base/stream_module.cc
src/stream/base/stream_module.h
src/stream/file/file_module.cc
src/stream/file/file_module.h
src/stream/file/file_session.cc
src/stream/file/file_session.h
src/stream/file/stream_file.cc
src/stream/flush_bucket.cc
src/stream/flush_bucket.h
src/stream/icmp/icmp_ha.cc
src/stream/icmp/icmp_ha.h
src/stream/icmp/icmp_module.cc
src/stream/icmp/icmp_module.h
src/stream/icmp/icmp_session.cc
src/stream/icmp/stream_icmp.cc
src/stream/icmp/stream_icmp.h
src/stream/ip/ip_defrag.cc
src/stream/ip/ip_defrag.h
src/stream/ip/ip_ha.cc
src/stream/ip/ip_ha.h
src/stream/ip/ip_module.cc
src/stream/ip/ip_module.h
src/stream/ip/ip_session.cc
src/stream/ip/ip_session.h
src/stream/ip/stream_ip.cc
src/stream/ip/stream_ip.h
src/stream/libtcp/stream_tcp_unit_test.cc
src/stream/libtcp/stream_tcp_unit_test.h
src/stream/libtcp/tcp_segment_descriptor.cc
src/stream/libtcp/tcp_segment_descriptor.h
src/stream/libtcp/tcp_state_handler.cc
src/stream/libtcp/tcp_state_handler.h
src/stream/libtcp/tcp_state_machine.cc
src/stream/libtcp/tcp_state_machine.h
src/stream/libtcp/tcp_stream_session.cc
src/stream/libtcp/tcp_stream_session.h
src/stream/libtcp/tcp_stream_tracker.cc
src/stream/libtcp/tcp_stream_tracker.h
src/stream/paf.cc
src/stream/paf.h
src/stream/stream.cc
src/stream/stream.h
src/stream/stream_inspectors.cc
src/stream/stream_splitter.cc
src/stream/stream_splitter.h
src/stream/tcp/ips_stream_reassemble.cc
src/stream/tcp/ips_stream_size.cc
src/stream/tcp/segment_overlap_editor.cc
src/stream/tcp/segment_overlap_editor.h
src/stream/tcp/stream_tcp.cc
src/stream/tcp/stream_tcp.h
src/stream/tcp/tcp_debug_trace.h
src/stream/tcp/tcp_defs.h
src/stream/tcp/tcp_event_logger.cc
src/stream/tcp/tcp_event_logger.h
src/stream/tcp/tcp_ha.cc
src/stream/tcp/tcp_ha.h
src/stream/tcp/tcp_module.cc
src/stream/tcp/tcp_module.h
src/stream/tcp/tcp_normalizer.cc
src/stream/tcp/tcp_normalizer.h
src/stream/tcp/tcp_normalizers.cc
src/stream/tcp/tcp_normalizers.h
src/stream/tcp/tcp_reassembler.cc
src/stream/tcp/tcp_reassembler.h
src/stream/tcp/tcp_reassemblers.cc
src/stream/tcp/tcp_reassemblers.h
src/stream/tcp/tcp_segment_node.cc
src/stream/tcp/tcp_segment_node.h
src/stream/tcp/tcp_session.cc
src/stream/tcp/tcp_session.h
src/stream/tcp/tcp_state_close_wait.cc
src/stream/tcp/tcp_state_closed.cc
src/stream/tcp/tcp_state_closing.cc
src/stream/tcp/tcp_state_established.cc
src/stream/tcp/tcp_state_fin_wait1.cc
src/stream/tcp/tcp_state_fin_wait2.cc
src/stream/tcp/tcp_state_last_ack.cc
src/stream/tcp/tcp_state_listen.cc
src/stream/tcp/tcp_state_none.cc
src/stream/tcp/tcp_state_syn_recv.cc
src/stream/tcp/tcp_state_syn_sent.cc
src/stream/tcp/tcp_state_time_wait.cc
src/stream/tcp/tcp_stream_config.cc
src/stream/tcp/tcp_stream_config.h
src/stream/tcp/tcp_stream_state_machine.cc
src/stream/tcp/tcp_tracker.cc
src/stream/tcp/tcp_tracker.h
src/stream/tcp/test/tcp_normalizer_test.cc
src/stream/udp/stream_udp.cc
src/stream/udp/stream_udp.h
src/stream/udp/udp_ha.cc
src/stream/udp/udp_ha.h
src/stream/udp/udp_module.cc
src/stream/udp/udp_module.h
src/stream/udp/udp_session.cc
src/stream/udp/udp_session.h
src/stream/user/stream_user.cc
src/stream/user/stream_user.h
src/stream/user/user_module.cc
src/stream/user/user_module.h
src/stream/user/user_session.cc
src/stream/user/user_session.h
src/target_based/sftarget_hostentry.cc
src/target_based/sftarget_hostentry.h
src/target_based/sftarget_reader.cc
src/target_based/snort_protocols.cc
src/target_based/snort_protocols.h
src/time/clock_defs.h
src/time/packet_time.cc
src/time/packet_time.h
src/time/periodic.cc
src/time/periodic.h
src/time/stopwatch_test.cc
src/time/tsc_clock.cc
src/utils/CMakeLists.txt
src/utils/Makefile.am
src/utils/bitop_test.cc
src/utils/boyer_moore.cc
src/utils/dnet_header.h
src/utils/dyn_array.cc
src/utils/kmap.cc
src/utils/safec.h
src/utils/segment_mem.cc
src/utils/segment_mem.h
src/utils/sflsq.cc
src/utils/sfmemcap.cc
src/utils/sfsnprintfappend.cc
src/utils/stats.cc
src/utils/stats.h
src/utils/util.cc
src/utils/util.h
src/utils/util_jsnorm.cc
src/utils/util_jsnorm.h
src/utils/util_net.cc
src/utils/util_net.h
src/utils/util_unfold.cc
src/utils/util_utf.cc

index 92161638aeb3a16f0a8ed4408f1983139a1d5a88..8da956f8b385f5237c54d120a3f442d9c9ed1454 100644 (file)
 */
 /* daq_file.c author Russ Combs <rucombs@cisco.com> */
 
-#include "daq_user.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
+#include "daq_user.h"
+
 #include <errno.h>
 #include <fcntl.h>
 #include <stdlib.h>
index 5e08338f3d9ccc2efb1d0ca521ec58f3a45071b6..d1da390ac6d2b6e021bd57c3cfb5012f5ef82bc1 100644 (file)
 */
 /* daq_hext.c author Russ Combs <rucombs@cisco.com> */
 
-#include "daq_user.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
+#include "daq_user.h"
+
 #include <ctype.h>
 #include <errno.h>
 #include <stdlib.h>
index 96ee6aba88757174905e53a5d8f64dd29402f053..1b087f5907ab34406a5d5741183dd0f7a8a797b0 100644 (file)
@@ -269,25 +269,39 @@ yet firm so feedback is welcome to get something we can live with.
   implementation declarations should go in a separate header from the
   interface.  And so on.
 
-* A .cc should include its own .h before any others (including
-  system headers).  This ensures that the header stands on its own and can
-  be used by clients without include prerequisites and the developer will
-  be the first to find a dependency problem.
-
-* Include required headers, all required headers, and nothing but required
-  headers.  Don't just clone a bunch of headers because it is convenient.
-
-* Try to keep includes in alpha order.  This makes it easier to maintain,
-  avoid duplicates, etc.
-
-* Any file depending on #ifdefs should include config.h as shown below.  A
-  .h should include it before any other includes, and a .cc should include
-  it immediately after the include of its own .h.
+* All .cc files should include config.h with the standard block shown below
+  immediately following the initial comment blocks and before anything else.
+  This presents a consistent view of all included header files as well as
+  access to any other configure-time definitions. No .h files should include
+  config.h unless they are guaranteed to be local header files (never
+  installed).
 
     #ifdef HAVE_CONFIG_H
     #include "config.h"
     #endif
 
+* A .cc should include its own .h before any others aside from the
+  aforementioned config.h (including system headers).  This ensures that the
+  header stands on its own and can be used by clients without include
+  prerequisites and the developer will be the first to find a dependency issue.
+
+* Split headers included from the local directory into a final block of
+  headers.  For a .cc file, the final order of sets of header includes should
+  look like this:
+
+    1. config.h
+    2. its own .h file
+    3. system headers (.h/.hpp/.hxx)
+    4. C++ standard library headers (no file extension)
+    5. Snort headers external to the local directory (path-prefixed)
+    6. Snort headers in the local directory
+
+* Include required headers, all required headers, and nothing but required
+  headers.  Don't just clone a bunch of headers because it is convenient.
+
+* Keep includes in alphabetical order.  This makes it easier to maintain, avoid
+  duplicates, etc.
+
 * Do not put using statements in headers unless they are tightly scoped.
 
 === Warnings
index b8c7886bd9780312319c4594c0507dbd292128b3..e3e65f502824c46a63fb7714216700c71247391f 100644 (file)
@@ -21,9 +21,8 @@
 #include "config.h"
 #endif
 
-#include "framework/codec.h"
 #include "codecs/codec_module.h"
-#include "protocols/protocol_ids.h"
+#include "framework/codec.h"
 #include "protocols/eapol.h"
 
 #define CD_EAPOL_NAME "eapol"
index 5b823885d1388d673dc4e6eadf5873edf45ae5c4..3d2400c8dfaf7b59723b10b1dca917c059820d44 100644 (file)
@@ -21,9 +21,7 @@
 #include "config.h"
 #endif
 
-extern "C" {
 #include <sfbpf_dlt.h>
-}
 
 #include "framework/codec.h"
 #include "protocols/linux_sll.h"
index 71d65a0f9afdcaed27f55a4a4efd5db5052dd26a..e8133015f07d071b9919a5bc9d78360724897370 100644 (file)
 #include "config.h"
 #endif
 
-extern "C" {
 #include <sfbpf_dlt.h>
-}
 
 #include "framework/codec.h"
-#include "protocols/protocol_ids.h"
 
 #define CD_NULL_NAME "null"
 #define CD_NULL_HELP_STR "support for null encapsulation"
index 9cdbc229183e84141af4fd4009ac19730d7ca283..e86fc1fd67df57981909201c0d1594445347c622 100644 (file)
@@ -21,9 +21,8 @@
 #include "config.h"
 #endif
 
-extern "C" {
+#include <net/if.h>
 #include <sfbpf_dlt.h>
-}
 
 #include "framework/codec.h"
 
index 8849f1ca209a1f1f5a9369160f58ff5210810108..a9d06b87c1afb520f7b76a87b6d1824d3ee54e20 100644 (file)
@@ -25,7 +25,6 @@
 #endif
 
 #include "framework/codec.h"
-#include "framework/decode_data.h"
 #include "codecs/codec_module.h"
 
 namespace
index 2812a0bb2867faa876bc61b9b888e1e285ab251d..746ad3edc5939e293ac7ac047b894769c839e6b9 100644 (file)
 #include "config.h"
 #endif
 
-#include <stdint.h>
-
-extern "C" {
 #include <sfbpf_dlt.h>
-}
 
 #include "framework/codec.h"
 
index b906fc551905684d277929215935af86b96ac311..3ef27e9327fd18253f3e93929833a5d90b471d56 100644 (file)
 #include "config.h"
 #endif
 
-extern "C" {
 #include <sfbpf_dlt.h>
-}
 
 #include "framework/codec.h"
-#include "protocols/protocol_ids.h"
 
 #define CD_RAW4_NAME "raw4"
 #define CD_RAW4_HELP_STR "support for unencapsulated IPv4"
index 9cbc5fe0e6e8dc3d8f773b5f9175b24889537863..73aea4490e61f812199ac81e52e1ad0902227237 100644 (file)
 #include "config.h"
 #endif
 
-extern "C" {
 #include <sfbpf_dlt.h>
-}
 
 #include "framework/codec.h"
-#include "protocols/protocol_ids.h"
 
 #define CD_RAW6_NAME "raw6"
 #define CD_RAW6_HELP_STR "support for unencapsulated IPv6"
index 4701f4ec40b479eb0cd88e9ac4becf9edb6e71db..e95e63882eb0990674c0d1f2e44f8b28807b7989 100644 (file)
 //--------------------------------------------------------------------------
 // cd_sip.cc author Josh Rosenbaum <jrosenba@cisco.com>
 
-#include <stdint.h>
-
-extern "C" {
 #include <sfbpf_dlt.h>
-}
 
 #include "framework/codec.h"
-#include "protocols/protocol_ids.h"
 
 #define CD_SLIP_NAME "slip"
 #define CD_SLIP_HELP_STR "support for slip protocol"
index 618c8184cb0bdb8fc538076ce5eb7d389b53d66b..cfac50fc02556df86222377a6fe5b4662aa666fc 100644 (file)
 #include "config.h"
 #endif
 
-extern "C" {
 #include <sfbpf_dlt.h>
-}
 
-#include "protocols/token_ring.h"
-#include "framework/codec.h"
 #include "codecs/codec_module.h"
+#include "framework/codec.h"
+#include "protocols/token_ring.h"
 
 namespace
 {
index 561778beeb9becf3135c1ae0e42e46e85288d6f5..adc3d42406ce7eae3770de4df343fc3f5c1cc1c4 100644 (file)
 #include "config.h"
 #endif
 
-extern "C" {
 #include <sfbpf_dlt.h>
-}
 
-#include "protocols/wlan.h"
-#include "framework/codec.h"
 #include "codecs/codec_module.h"
-#include "protocols/protocol_ids.h"
+#include "framework/codec.h"
 #include "log/text_log.h"
+#include "protocols/wlan.h"
 
 #define CD_WLAN_NAME "wlan"
 #define CD_WLAN_HELP_STR "support for wireless local area network protocol"
index c2c605f5a9d7ee5dc02a7aad55248efbb5ad427c..837d849c0f5e94a6b0c62eed87f48338fd92853c 100644 (file)
 #include "config.h"
 #endif
 
-#include <string.h>
-#include <time.h>
-
-#include <iostream>
-#include <string>
-
-#include "main/snort_debug.h"
-#include "main/snort_types.h"
+#include "flow/flow.h"
 #include "framework/data_bus.h"
 #include "framework/inspector.h"
 #include "framework/module.h"
 #include "log/messages.h"
 #include "log/text_log.h"
-#include "protocols/packet.h"
-#include "profiler/profiler.h"
-#include "utils/stats.h"
-#include "flow/flow.h"
-#include "sfip/sf_ip.h"
 
 static const char* s_name = "data_log";
 static const char* f_name = "data.log";
index ab0f4342e09fc63b1ebef9035879d0d02f1a3e2d..bfa863dbe8cfe4bf3016a4f231ef679a2bd57df2 100644 (file)
 #include "config.h"
 #endif
 
-#include <assert.h>
-#include <sys/types.h>
-#include <stdlib.h>
-#include <ctype.h>
-#include <string.h>
-
-#include "main/snort_debug.h"
-#include "main/snort_types.h"
 #include "events/event_queue.h"
 #include "framework/inspector.h"
 #include "framework/module.h"
 #include "log/messages.h"
-#include "protocols/packet.h"
 #include "profiler/profiler.h"
-#include "utils/stats.h"
+#include "protocols/packet.h"
 
 #define DPX_GID 256
 #define DPX_SID 1
index f6686a39c9f4c50093ef81ab2be3f96f9d8ed824..0ec9c262fff954e8cc2477601bd816929149203e 100644 (file)
 **  NOTES:
 **    - 3.2.03:  Initial development.  DJR
 */
-#include <stdlib.h>
-#include <sys/types.h>
 
-#include "hi_ui_config.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "hi_ad.h"
+
+#include "hi_events.h"
 #include "hi_return_codes.h"
 #include "hi_si.h"
+#include "hi_ui_config.h"
 
 /*
 **  NAME
index 602ef3540a5e24ef6a1434e1e96a2a828cd9d73f..37d9335e37d9266e7d87640a1dcff24db8122520 100644 (file)
 #ifndef HI_AD_H
 #define HI_AD_H
 
-#include <sys/types.h>
+#include <cstdint>
 
-#include "hi_include.h"
-
-int hi_server_anomaly_detection(void* S, const u_char* data, int dsize);
+int hi_server_anomaly_detection(void* S, const uint8_t* data, int dsize);
 
 #endif
 
index 184e933ae22737607afbc64475d4b9abe51ceb46..2e99c18bb90d79df61a5e1ecb56414bb4d1049d0 100644 (file)
 **    - 2.4.05:  Added tab_uri_delimiter config option.  AJM.
 */
 
-#include "hi_client.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <stdlib.h>
-#include <stdio.h>
-#include <ctype.h>
-#include <sys/types.h>
-#include <errno.h>
-
-#include "hi_ui_config.h"
-#include "hi_si.h"
-#include "hi_mi.h"
-#include "hi_util.h"
-#include "hi_return_codes.h"
-#include "hi_cmd_lookup.h"
+#include "hi_client.h"
 
-#include "utils/util.h"
-#include "utils/util_unfold.h"
-#include "detection/detection_util.h"
+#include "protocols/packet.h"
 #include "utils/safec.h"
+#include "utils/util_unfold.h"
+
+#include "hi_cmd_lookup.h"
+#include "hi_events.h"
+#include "hi_include.h"
+#include "hi_return_codes.h"
+#include "hi_si.h"
 
 #define HEADER_NAME__COOKIE "Cookie"
 #define HEADER_LENGTH__COOKIE 6
index 0e685b9015fefe02f6828a753dfebcfb3f40b6ed..3092ce637c5e9cb16e55e8b163fc156cca5fd743 100644 (file)
 #ifndef HI_CLIENT_H
 #define HI_CLIENT_H
 
-#include <sys/types.h>
+#include "flow/flow.h"
 
 #include "hi_main.h"
-#include "hi_include.h"
-#include "hi_events.h"
 
 #define URI_END  99
 #define POST_END 100
 
 typedef struct s_COOKIE_PTR
 {
-    const u_char* cookie;
-    const u_char* cookie_end;
+    const uint8_t* cookie;
+    const uint8_t* cookie_end;
     struct s_COOKIE_PTR* next;
 } COOKIE_PTR;
 
 typedef struct s_CONTLEN_PTR
 {
-    const u_char* cont_len_start;
-    const u_char* cont_len_end;
+    const uint8_t* cont_len_start;
+    const uint8_t* cont_len_end;
     uint32_t len;
 } CONTLEN_PTR;
 
 typedef struct s_CONT_ENCODING_PTR
 {
-    const u_char* cont_encoding_start;
-    const u_char* cont_encoding_end;
+    const uint8_t* cont_encoding_start;
+    const uint8_t* cont_encoding_end;
     uint16_t compress_fmt;
 } CONT_ENCODING_PTR;
 
@@ -92,18 +90,18 @@ typedef struct s_HEADER_FIELD_PTR
 
 typedef struct s_URI_PTR
 {
-    const u_char* uri;                /* the beginning of the URI */
-    const u_char* uri_end;            /* the end of the URI */
-    const u_char* norm;               /* ptr to first normalization occurence */
-    const u_char* ident;              /* ptr to beginning of the HTTP identifier */
-    const u_char* first_sp_start;     /* beginning of first space delimiter */
-    const u_char* first_sp_end;       /* end of first space delimiter */
-    const u_char* second_sp_start;    /* beginning of second space delimiter */
-    const u_char* second_sp_end;      /* end of second space delimiter */
-    const u_char* param;              /* '?' (beginning of parameter field) */
-    const u_char* delimiter;          /* HTTP URI delimiter (\r\n\) */
-    const u_char* last_dir;           /* ptr to last dir, so we catch long dirs */
-    const u_char* proxy;              /* ptr to the absolute URI */
+    const uint8_t* uri;                /* the beginning of the URI */
+    const uint8_t* uri_end;            /* the end of the URI */
+    const uint8_t* norm;               /* ptr to first normalization occurence */
+    const uint8_t* ident;              /* ptr to beginning of the HTTP identifier */
+    const uint8_t* first_sp_start;     /* beginning of first space delimiter */
+    const uint8_t* first_sp_end;       /* end of first space delimiter */
+    const uint8_t* second_sp_start;    /* beginning of second space delimiter */
+    const uint8_t* second_sp_end;      /* end of second space delimiter */
+    const uint8_t* param;              /* '?' (beginning of parameter field) */
+    const uint8_t* delimiter;          /* HTTP URI delimiter (\r\n\) */
+    const uint8_t* last_dir;           /* ptr to last dir, so we catch long dirs */
+    const uint8_t* proxy;              /* ptr to the absolute URI */
 }  URI_PTR;
 
 typedef struct s_HEADER_PTR
@@ -117,32 +115,32 @@ typedef struct s_HEADER_PTR
 
 typedef struct s_HI_CLIENT_REQ
 {
-    const u_char* uri;
-    const u_char* uri_norm;
-    const u_char* post_raw;
-    const u_char* post_norm;
-    const u_char* header_raw;
-    const u_char* header_norm;
+    const uint8_t* uri;
+    const uint8_t* uri_norm;
+    const uint8_t* post_raw;
+    const uint8_t* post_norm;
+    const uint8_t* header_raw;
+    const uint8_t* header_norm;
     COOKIE_PTR cookie;
-    const u_char* cookie_norm;
-    const u_char* method_raw;
-
-    u_int uri_size;
-    u_int uri_norm_size;
-    u_int post_raw_size;
-    u_int post_norm_size;
-    u_int header_raw_size;
-    u_int header_norm_size;
-    u_int cookie_norm_size;
-    u_int method_size;
-
-    const u_char* pipeline_req;
-    u_char method;
+    const uint8_t* cookie_norm;
+    const uint8_t* method_raw;
+
+    unsigned int uri_size;
+    unsigned int uri_norm_size;
+    unsigned int post_raw_size;
+    unsigned int post_norm_size;
+    unsigned int header_raw_size;
+    unsigned int header_norm_size;
+    unsigned int cookie_norm_size;
+    unsigned int method_size;
+
+    const uint8_t* pipeline_req;
+    uint8_t method;
     uint16_t uri_encode_type;
     uint16_t header_encode_type;
     uint16_t cookie_encode_type;
     uint16_t post_encode_type;
-    const u_char* content_type;
+    const uint8_t* content_type;
 }  HI_CLIENT_REQ;
 
 typedef struct s_HI_CLIENT
@@ -168,20 +166,20 @@ int hi_client_init();
 
 char** hi_client_get_field_names();
 
-extern const u_char* proxy_start;
-extern const u_char* proxy_end;
+extern const uint8_t* proxy_start;
+extern const uint8_t* proxy_end;
 
 struct HI_SESSION;
 
-int CheckLongDir(HI_SESSION* session, URI_PTR* uri_ptr, const u_char* ptr);
+int CheckLongDir(HI_SESSION* session, URI_PTR* uri_ptr, const uint8_t* ptr);
 
 /**  This makes passing function arguments much more readable and easier
 **  to follow.
 */
 typedef int (* LOOKUP_FCN)(
-    HI_SESSION*, const u_char* start, const u_char* end, const u_char**, URI_PTR*);
+    HI_SESSION*, const uint8_t* start, const uint8_t* end, const uint8_t**, URI_PTR*);
 
-int NextNonWhiteSpace(HI_SESSION*, const u_char*, const u_char*, const u_char**, URI_PTR*);
+int NextNonWhiteSpace(HI_SESSION*, const uint8_t*, const uint8_t*, const uint8_t**, URI_PTR*);
 
 /*
 **  The lookup table contains functions for different HTTP delimiters
index 53398ed6869159f139452db0f10db6c1c1cc69fa..9312d4d7900a767b45a03c900ab572f0e9f973ff 100644 (file)
 // this file was split from hi_client.cc; look there for the real
 // culprits ;)
 
-#include "hi_client.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "hi_events.h"
 #include "hi_return_codes.h"
 #include "hi_si.h"
 #include "hi_util.h"
index 80f1831af6157518dae0b6715e52f46394fd0b1a..97926fe03a7a8e61787cbc2abffea3c3cab79bd0 100644 (file)
 **      - Initial development.  DJR
 */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "hi_client_norm.h"
 
-#include <stdlib.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <ctype.h>
+#include "main/snort_debug.h"
+#include "utils/safec.h"
 
 #include "hi_norm.h"
-#include "hi_util.h"
 #include "hi_return_codes.h"
-#include "utils/safec.h"
 
 int hi_split_header_cookie(
     HI_SESSION*, u_char* header, int* i_header_len,
index b383a8acb265a1b686b81377f3f3c52cc674c37e..3b4e3c55fcd796000a1e065f6f31af30986222ea 100644 (file)
@@ -32,7 +32,6 @@
 #ifndef HI_CLIENT_NORM_H
 #define HI_CLIENT_NORM_H
 
-#include "hi_include.h"
 #include "hi_si.h"
 
 int hi_client_norm(HI_SESSION* session);
index eeb773fa58ab28423100f2414db44a569dd11c0e..950fa1c5ee1d3b196563a15e0c25d5bbccb67492 100644 (file)
 // with this program; if not, write to the Free Software Foundation, Inc.,
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
-#include "hi_cmd_lookup.h"
 
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include "utils/kmap.h"
+#include "hi_cmd_lookup.h"
 
 /*
  * Function: http_cmd_lookup_init(CMD_LOOKUP **CmdLookup)
index 5fdd536ee7dd909423e74bc048642a18618d2e01..e6f245787ed645cd6d0b43c7bb929139139604f5 100644 (file)
 //--------------------------------------------------------------------------
 // hi_events.cc author Russ Combs <rucombs@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "hi_events.h"
 
 #include <assert.h>
 #include <strings.h>
 
 #include "events/event_queue.h"
+#include "main/thread.h"
 
 static THREAD_LOCAL uint64_t gid_client = 0;
 static THREAD_LOCAL uint64_t gid_server = 0;
index ee6a3819c6f29fc8dae495b5d80315dcec6e4204..7aa691a77cea3a4143b60c3f1722e3bda9325081 100644 (file)
@@ -20,8 +20,6 @@
 #ifndef HI_EVENTS_H
 #define HI_EVENTS_H
 
-#include "hi_include.h"
-
 // changed gids from 119-120 to avoid overlap with nhi
 #define GID_HTTP_CLIENT  319
 #define GID_HTTP_SERVER  320
index ec4ed1b2f5c984fd778f92b2804c1bc3bb2fbfc4..dec8a8048275d5b8e0163848e546f0aa18f08f27 100644 (file)
@@ -21,8 +21,6 @@
 #define HI_INCLUDE_H
 
 #include "framework/counts.h"
-#include "main/snort_types.h"
-#include "main/snort_debug.h"
 #include "main/thread.h"
 
 #define HI_UNKNOWN_METHOD 1
index 5f4c17b851b9f84750683990f3b83c1f4fe63566..57c0ffe64ffb68e4d4943b1f44ec194440f4b43f 100644 (file)
 **  - 2.11.03:  Initial Development.  DJR
 **  - 2.4.05:   Added tab_uri_delimiter config option.  AJM.
 */
-#include "hi_main.h"
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <assert.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/types.h>
-#include <limits.h>
+#include "hi_main.h"
 
 #include "detection/detect.h"
-#include "detection/detection_util.h"
-#include "events/event.h"
-#include "file_api/file_api.h"
 #include "file_api/file_flows.h"
-#include "framework/data_bus.h"
 #include "log/messages.h"
 #include "log/unified2.h"
-#include "main/snort_debug.h"
-#include "mime/decode_base.h"
 #include "profiler/profiler.h"
 #include "protocols/packet.h"
 #include "protocols/tcp.h"
 #include "search_engines/search_tool.h"
 #include "stream/stream.h"
-#include "utils/util.h"
-#include "utils/util_utf.h"
 #include "utils/sfsnprintfappend.h"
 
-#include "hi_return_codes.h"
-#include "hi_ui_config.h"
-#include "hi_ui_iis_unicode_map.h"
-#include "hi_si.h"
+#include "hi_ad.h"
+#include "hi_include.h"
 #include "hi_mi.h"
 #include "hi_norm.h"
-#include "hi_cmd_lookup.h"
+#include "hi_return_codes.h"
+#include "hi_si.h"
 
 const HiSearchToken hi_patterns[] =
 {
index 60be51e8dab5874eade0bb7f39808da113eed7f6..81c40882580921629846dda17071e8fce3b7ef72 100644 (file)
 #ifndef HI_MAIN_H
 #define HI_MAIN_H
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #include <zlib.h>
 
+#include "decompress/file_decomp.h"
 #include "detection/detection_util.h"
-#include "protocols/packet.h"
+#include "flow/flow.h"
+#include "utils/util.h"
 #include "utils/util_jsnorm.h"
 #include "utils/util_utf.h"
+
 #include "hi_ui_config.h"
 
 #define MAX_METHOD_LEN  256
index 84fe1eea7fe2c1158a50afb33ab4059d5c2519c2..9027e155e113e37aee0391aeb2028bd8815c26eb 100644 (file)
 **    - 3.2.03:  Initial development.  DJR
 */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "hi_mi.h"
 
-#include "hi_si.h"
-#include "hi_client.h"
-#include "hi_server.h"
+#include "protocols/packet.h"
+
 #include "hi_return_codes.h"
 
 /*
index d7220478a75975eab5e038512ab971ed70420268..e0f48e6c87e09c33ca16fb8b64567c33a8dec7eb 100644 (file)
 #ifndef HI_MI_H
 #define HI_MI_H
 
-#include <sys/types.h>
-
 #include "hi_si.h"
-#include "hi_main.h"
 
 int hi_mi_mode_inspection(HI_SESSION* session, int iInspectMode, Packet* p, HttpSessionData*);
 
index e9a0ffc44ea82a3a8e4412542a3cdd10acf88204..69bb969abf6c0360adb259852d9c4f4820e93852 100644 (file)
 
 // hi_module.cc author Russ Combs <rucombs@cisco.com>
 
-#include "hi_module.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <string>
+#include "hi_module.h"
 
 #include "decompress/file_decomp.h"
 #include "utils/util.h"
 
-#include "hi_ui_config.h"
-#include "hi_events.h"
 #include "hi_cmd_lookup.h"
+#include "hi_include.h"
 #include "hi_ui_iis_unicode_map.h"
 
 //-------------------------------------------------------------------------
index f774ad4c273ecd46fbfc681d652c56dee90ace02..a058a9d36fddcfe1c43d5370e3adf6290ab35a30 100644 (file)
 #ifndef HI_MODULE_H
 #define HI_MODULE_H
 
-#include <string>
-
 #include "framework/module.h"
-#include "hi_ui_config.h"
+
 #include "hi_events.h"
+#include "hi_ui_config.h"
 
 #define GLOBAL_KEYWORD "http_global"
 #define SERVER_KEYWORD "http_server"
index 09fa2eda754c54f9998ac318476290ca95ccf6f7..f01d6bc9eaad317d18b4c4b7d75f0074e8c74abd 100644 (file)
 **      - Initial development.  DJR
 */
 
-#include "hi_norm.h"
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-#include <sys/types.h>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include "detection/detection_util.h"
+#include "hi_norm.h"
 
 #include "hi_client_norm.h"
-#include "hi_server_norm.h"
 #include "hi_events.h"
-#include "hi_ui_iis_unicode_map.h"
+#include "hi_include.h"
 #include "hi_return_codes.h"
-#include "hi_si.h"
-#include "hi_util.h"
+#include "hi_server_norm.h"
+#include "hi_ui_iis_unicode_map.h"
 
 #define MAX_DIRS        2048
 
index fd3376cbddbd1b769fc25dda27cf15461c7c2ab4..878fb8c3360812bc241c7e6fca4062f74c6cd314 100644 (file)
 #ifndef HI_NORM_H
 #define HI_NORM_H
 
-#include <sys/types.h>
-
-#include "hi_include.h"
-#include "hi_ui_config.h"
 #include "hi_si.h"
 
 #define MAX_URI 8192
index 01483f0e45f580cb3eccb276a8cfdb54c176c0cd..5eead23b26b7eb95c144c4e735257e2c31866adc 100644 (file)
@@ -36,8 +36,6 @@
 #ifndef HI_RETURN_CODES_H
 #define HI_RETURN_CODES_H
 
-#include "hi_include.h"
-
 #define HI_BOOL_FALSE 0
 #define HI_SUCCESS    0
 
index ecbe6a91a03a6831bfebacc6fb875ff4145a619c..6c616b099760abe4feb3abae83f3c38195272a6f 100644 (file)
 **  NOTES:
 **      - Initial development.  DJR
 */
-#include <stdio.h>
-#include <zlib.h>
 
-#include "hi_stream_splitter.h"
-#include "main/thread.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "hi_server.h"
+
+#include "protocols/packet.h"
 #include "utils/safec.h"
-#include "utils/util_utf.h"
+#include "utils/util_unfold.h"
+
+#include "hi_events.h"
+#include "hi_include.h"
+#include "hi_return_codes.h"
+#include "hi_si.h"
+#include "hi_stream_splitter.h"
 
 static THREAD_LOCAL bool headers = false;
 static THREAD_LOCAL bool simple_response = false;
 static THREAD_LOCAL uint8_t decompression_buffer[65535];
 static THREAD_LOCAL uint8_t dechunk_buffer[65535];
 
-#include "hi_server.h"
-#include "hi_ui_config.h"
-#include "hi_return_codes.h"
-#include "hi_si.h"
-
-#include "detection/detection_util.h"
-#include "utils/util_unfold.h"
-#include "protocols/tcp.h"
-
 #define STAT_END 100
 #define HTTPRESP_HEADER_NAME__COOKIE "Set-Cookie"
 #define HTTPRESP_HEADER_LENGTH__COOKIE 10
index 473c4dbca74133d38217156b2a485731de3b6418..0dabc9cc577488e78c8a28e1765a5eb88f9bc5b2 100644 (file)
 // This file declares the server structure and functions to access server
 // inspection.
 
-#include "hi_include.h"
-#include "hi_util.h"
-#include "hi_main.h"
 #include "hi_client.h"
+#include "hi_util.h"
 
 typedef struct s_HI_SERVER_RESP
 {
index ba4696f35f93f04f2f712e96395995d6cdae49a1..17ba8a1a7cea0cfb1686d707039fc97010240fc0 100644 (file)
 **      - Initial development.  DJR
 */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "hi_server_norm.h"
 
-#include <stdlib.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <ctype.h>
+#include "search_engines/search_tool.h"
+#include "utils/safec.h"
 
+#include "hi_events.h"
 #include "hi_norm.h"
-#include "hi_util.h"
 #include "hi_return_codes.h"
 
-#include "detection/detection_util.h"
-#include "search_engines/search_tool.h"
-#include "utils/safec.h"
-#include "utils/util_utf.h"
-
 int hi_server_norm(HI_SESSION* session, HttpSessionData* hsd)
 {
     static THREAD_LOCAL u_char HeaderBuf[MAX_URI];
index c7e8a558939e9df757c520e90afa00162fd0d9ea..5b1a5ab1fad104a0fcb6cd93cc6c9cd911e9282c 100644 (file)
@@ -32,7 +32,6 @@
 #ifndef HI_SERVER_NORM_H
 #define HI_SERVER_NORM_H
 
-#include "hi_include.h"
 #include "hi_si.h"
 
 int hi_server_norm(HI_SESSION* session, HttpSessionData* hsd);
index bb1d934e0918df8238c55f25541f5b8791f4a49a..11c761d2da1fbafd95ac62f4d5ed63489ab1886c 100644 (file)
 **
 **  - 2.25.03:  Initial Development.  DJR
 */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "hi_si.h"
 
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
+#include "protocols/packet.h"
 
 #include "hi_return_codes.h"
-#include "hi_ui_config.h"
-#include "hi_ad.h"
-#include "hi_main.h"
 
 /*
 **  NAME
index a958c56218e0c148bf4b3159d2cacf4868b5f416..4e3ae6db94e1b9fd1c4b361e2f6779a046704e16 100644 (file)
 #ifndef HI_SI_H
 #define HI_SI_H
 
-#include "hi_include.h"
-#include "hi_ui_config.h"
 #include "hi_client.h"
 #include "hi_server.h"
-#include "hi_ad.h"
-#include "sfip/sf_ip.h"
 
 struct Packet;
 
index e6d9f406ffbc7bd9812c37e08ae02a3180bf2856..ef9ab821f709bd8314f058cab3bdc61c3a86937a 100644 (file)
 // * Range, Content-Range, and multipart
 //--------------------------------------------------------------------
 
-#include "hi_stream_splitter.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <assert.h>
-#include <ctype.h>
-#include <stdio.h>
-#include <stdint.h>
-#include <stdlib.h>
-#include <string.h>
+#include "hi_stream_splitter.h"
 
-#include "hi_events.h"
-#include "main/snort_debug.h"
 #include "events/event_queue.h"
+#include "main/snort_debug.h"
 #include "protocols/packet.h"
 #include "stream/stream.h"
 #include "utils/util.h"
 
+#include "hi_events.h"
+
 #ifdef DEBUG_MSGS
 #define HI_TRACE     // define for state trace
 #endif
index b8199c945201c02a35898a4625207bb2248e2766..d4f929a1c46e206e6485614c9ffbe1bafaa958ba 100644 (file)
@@ -27,7 +27,6 @@
 #ifndef HI_STREAM_SPLITTER_H
 #define HI_STREAM_SPLITTER_H
 
-#include "main/snort_types.h"
 #include "stream/stream_splitter.h"
 
 bool hi_paf_init(uint32_t cap);
index 81c439438200703a977bba4493b58ea57e22994a..3404310184bfeecdc324e41834765d66896e6c10 100644 (file)
 **  - 2.10.03:  Initial Developments.  DJR
 **  - 2.4.05:   Added tab_uri_delimiter config option.  AJM.
 */
-#include "hi_ui_config.h"
 
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "hi_ui_config.h"
 
 #include "utils/util.h"
-#include "hi_return_codes.h"
+
 #include "hi_cmd_lookup.h"
+#include "hi_return_codes.h"
 
 HTTPINSPECT_GLOBAL_CONF::HTTPINSPECT_GLOBAL_CONF()
 {
index 77e005279da8d66f3072070d09a395ba3ba67ef4..3abb3b698f16c189dc12cb650295346704ea760b 100644 (file)
 #ifndef HI_UI_CONFIG_H
 #define HI_UI_CONFIG_H
 
-#include "hi_include.h"
-#include "sfrt/sfrt.h"
-#include "sfip/sf_ip.h"
-#include "mime/file_mime_process.h"
-#include "file_api/file_api.h"
-#include "decompress/file_decomp.h"
 #include "framework/bits.h"
-#include "utils/util.h"
+#include "mime/file_mime_process.h"
 #include "utils/kmap.h"
 
 #define HI_UI_CONFIG_MAX_HDR_DEFAULT 0
index 803a8aa7489251801232913811ec8653cbdbb1a6..93236822734bc29dd8e84440e7643e4b7ebc07cc 100644 (file)
 **    -  Initial development.  DJR
 */
 
-#include "hi_ui_iis_unicode_map.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/types.h>
+#include "hi_ui_iis_unicode_map.h"
 
 #include <sstream>
-#include <string>
 
 #include "utils/util.h"
-#include "hi_ui_config.h"
+
 #include "hi_return_codes.h"
 
 #define MAX_BUFFER 50000
index f0a0792c337903da2d0c71a0004ae83aef3adced..cf5cdc00fc96e5e628c1d62c14c3510660a9fd48 100644 (file)
@@ -23,8 +23,7 @@
 #ifndef HI_UI_IIS_UNICODE_MAP_H
 #define HI_UI_IIS_UNICODE_MAP_H
 
-#include "hi_include.h"
-#include "hi_ui_config.h"
+#include <cstdint>
 
 /*
 **  This is the define for the iis_unicode_map array when there is no
index e9ba0da11d807a6aa20610579308e3ff13d8c5e5..a8618dfb78138cf90c09147d3167eef13bae493c 100644 (file)
@@ -33,9 +33,6 @@
 #ifndef HI_UTIL_H
 #define HI_UTIL_H
 
-#include <strings.h>
-#include "hi_include.h"
-
 /*
 **  This function checks for in bounds condition on buffers.
 **
index 59dffd126927ba5a7f14d938f96d977458db40e2..6f5fa4ade3469639107ef6c223d88503a103045c 100644 (file)
 #include "config.h"
 #endif
 
-#include <assert.h>
-#include <string.h>
-#include <sys/types.h>
-
 // FIXIT-L all snort includes should use <form> instead of "form"
 #include "log/messages.h"
-#include "protocols/packet.h"
-#include "main/snort_debug.h"
-#include "decompress/file_decomp.h"
-#include "profiler/profiler.h"
-#include "file_api/file_api.h"
 #include "file_api/file_service.h"
-#include "mime/decode_base.h"
-#include "utils/util.h"
-#include "framework/inspector.h"
 #include "managers/inspector_manager.h"
+#include "profiler/profiler.h"
+#include "protocols/packet.h"
 
-#include "hi_client.h"
-#include "hi_ui_config.h"
-#include "hi_module.h"
-#include "hi_norm.h"
+#include "hi_events.h"
+#include "hi_include.h"
 #include "hi_main.h"
-#include "hi_cmd_lookup.h"
+#include "hi_module.h"
 #include "hi_stream_splitter.h"
+#include "hi_ui_config.h"
 
 int hex_lookup[256];
 int valid_lookup[256];
index fec0f7f535ad20bce255131ba17ff023552d5491..fae8faa479fea97d4e31556963e6e982ab36ad6a 100644 (file)
 
 #include <array>
 
-#include "main/snort_types.h"
-#include "main/snort_debug.h"
-#include "protocols/packet.h"
-#include "profiler/profiler.h"
-#include "flow/flow.h"
+#include "framework/cursor.h"
 #include "detection/detection_defines.h"
 #include "framework/ips_option.h"
-#include "framework/cursor.h"
-#include "framework/inspector.h"
 #include "framework/module.h"
+#include "profiler/profiler.h"
+#include "protocols/packet.h"
 
 enum PsIdx
 {
index 4c93d4e830177e83d12e125ab1af73b967f9dd5c..e2345c7dab88bdf39c38dabbfd664e7ea241ca00 100644 (file)
 #include "config.h"
 #endif
 
-#include <string>
-
-#include "detection/detection_defines.h"
 #include "framework/cursor.h"
+#include "detection/detection_defines.h"
 #include "framework/ips_option.h"
 #include "framework/module.h"
 #include "hash/sfhashfcn.h"
index f3a1f83d3784931043bed04c8a59b00849cfc596..34145be4b57d9e9d777afbd6d0dfb0f5cf3c8157 100644 (file)
 #include "config.h"
 #endif
 
-#include <sys/types.h>
-#include <stdlib.h>
-#include <ctype.h>
-
-#include "main/snort_types.h"
-#include "main/thread.h"
 #include "detection/detection_defines.h"
-#include "detection/treenodes.h"
+#include "framework/decode_data.h"
 #include "framework/ips_option.h"
 #include "framework/module.h"
-#include "framework/parameter.h"
 #include "framework/range.h"
 #include "hash/sfhashfcn.h"
-#include "protocols/packet.h"
-#include "protocols/tcp.h"
 #include "profiler/profiler.h"
-#include "utils/stats.h"
 
 static const char* s_name = "pkt_num";
 static const char* s_help = "alert on raw packet number";
index 2d0d66d58fc6249e8b3c43d0c569608e9a96df0d..fae90dc54b48cc28307c62a33d8741cd51a659bb 100644 (file)
 #include "config.h"
 #endif
 
-#include <sys/types.h>
-#include <stdlib.h>
-#include <ctype.h>
-
-#include "main/snort_types.h"
-#include "main/thread.h"
 #include "detection/detection_defines.h"
-#include "detection/treenodes.h"
 #include "framework/ips_option.h"
 #include "framework/module.h"
-#include "framework/parameter.h"
 #include "framework/range.h"
 #include "hash/sfhashfcn.h"
+#include "profiler/profiler.h"
 #include "protocols/packet.h"
 #include "protocols/tcp.h"
-#include "profiler/profiler.h"
 
 static const char* s_name = "urg";
 static const char* s_help = "detection for TCP urgent pointer";
index 8f6e6dfa3ed6567c146fbb461fa57417abdc73a7..b6b42c96a09b7984c9cb6f8858450eaf6e23854e 100644 (file)
 #include "config.h"
 #endif
 
-#include <ctype.h>
-#include <string.h>
-
-#include <algorithm>
 #include <iostream>
 
-#include "main/snort_types.h"
+#include "detection/signature.h"
+#include "events/event.h"
 #include "framework/logger.h"
 #include "framework/module.h"
-#include "protocols/packet.h"
-#include "detection/signature.h"
 
 using namespace std;
 
index 58517f1434af60b80e1ef4fdb1286239d568a1ec..376bd17bb40913e1732999af64d1f552c8c754ca 100644 (file)
 #include "config.h"
 #endif
 
-#include <sys/types.h>
-#include <string.h>
 #include <sys/un.h>
-#include <unistd.h>
-#include <errno.h>
 
-#include <string>
-
-#include "log/messages.h"
-#include "main/snort_types.h"
-#include "main/snort_debug.h"
-#include "framework/logger.h"
-#include "framework/module.h"
 #include "detection/signature.h"
 #include "events/event.h"
+#include "framework/logger.h"
+#include "framework/module.h"
+#include "log/messages.h"
 #include "protocols/packet.h"
 #include "utils/util.h"
 
index 8d18e54066fff9c8b59cd5023f8e3f6b9780bc82..f71f3f7eab0bcc4a53cfb309b3050893b8c7ad32 100644 (file)
@@ -27,8 +27,6 @@
 #include "config.h"
 #endif
 
-#include <sys/types.h>
-
 #include "framework/logger.h"
 #include "framework/module.h"
 
index 74527af007e25c0c3d21005b6717e31d2216e2b7..5f2b13530689db9817c6688819539e9cd858deff 100644 (file)
 #include "config.h"
 #endif
 
-#include "sfksearch.h"
-#include "main/snort_debug.h"
-#include "main/snort_types.h"
 #include "log/messages.h"
 #include "framework/mpse.h"
-#include "profiler/profiler.h"
+
+#include "sfksearch.h"
 
 //-------------------------------------------------------------------------
 // "lowmem"
index b2d7591620dec137f986259cbf405733177a7bc4..d498082eea400ead26c2cf03e38f3a86e4c43177 100644 (file)
 #include "config.h"
 #endif
 
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/types.h>
-#include <ctype.h>
-
-#include "main/snort_types.h"
-#include "main/snort_debug.h"
+#include "sfksearch.h"
+
+#include <cassert>
+
 #include "main/thread.h"
 #include "utils/util.h"
 
-#include "sfksearch.h"
-
 static void KTrieFree(KTRIENODE* n);
 
 static unsigned int mtot = 0;
index 0e2438d0708b81856515a5cf5a27df5c40dff9f2..27e04ab4004589fc3bd75e02608f424d1494fc11 100644 (file)
 //--------------------------------------------------------------------------
 // trie_api.cc author Russ Combs <rucombs@cisco.com>
 
-#include "framework/mpse.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "framework/base_api.h"
+#include "main/snort_types.h"
 
 extern const BaseApi* se_lowmem;
 
index 9cd30b0a6bdea843c4f0b3f5657ada8680dbf3b0..4ae0b35b83e562c2492f940663a8eab9a7c92eb1 100644 (file)
 #include "config.h"
 #endif
 
-#include <assert.h>
-#include <string.h>
+#include "sid_18758.h"
 
-#include "main/snort_types.h"
-#include "framework/so_rule.h"
 #include "detection/detection_defines.h"
-#include "sid_18758.h"
+#include "framework/so_rule.h"
 
 static int eval(void*, Cursor&, Packet*)
 {
index 1b3654f8fe350c53a1a7f51fc1327d9e1f7d6348..47bdcdbb123a7a717c0e489ed927a52e913a895e 100644 (file)
@@ -1,3 +1,8 @@
+#ifndef SID_18758_H
+#define SID_18758_H
+
+#include <cstdint>
+
 const uint8_t rule_18758[] =
 {
     0x61, 0x6C, 0x65, 0x72, 0x74, 0x20, 0x74, 0x63, 0x70, 0x20, 0x24, 0x48, 0x4F, 0x4D, 0x45, 0x5F,
@@ -34,3 +39,5 @@ const uint8_t rule_18758[] =
     0x20, 0x20, 0x20, 0x73, 0x6F, 0x3A, 0x65, 0x76, 0x61, 0x6C, 0x3B, 0x0A, 0x29, 0x0A, 0x00,
 };
 const unsigned rule_18758_len = 0;
+
+#endif
index ea9be0be87c96654d045f65129b54311ce59c6c2..cb2bd3e7ab5fb8ae4a7e3328a1ffc03f4eec0235 100644 (file)
 #include "config.h"
 #endif
 
-#include <sys/types.h>
 #include <sys/stat.h>
 
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-
-#include "log/messages.h"
-#include "main/snort_types.h"
-#include "main/snort_debug.h"
-#include "protocols/packet.h"
-#include "profiler/profiler.h"
-#include "packet_io/active.h"
-#include "parser/parser.h"
 #include "framework/ips_action.h"
-#include "framework/parameter.h"
 #include "framework/module.h"
+#include "log/messages.h"
+#include "packet_io/active.h"
+#include "profiler/profiler.h"
+#include "protocols/packet.h"
 #include "utils/util.h"
 
 #define s_name "react"
index 3e589d86faeed2764eb615120440cbe65dae05fc..d07912424519c72c87f38c2383cafdb4b6dd8247 100644 (file)
 #include "config.h"
 #endif
 
-#include "main/snort_types.h"
-#include "main/snort_debug.h"
-#include "protocols/packet.h"
-#include "profiler/profiler.h"
-#include "packet_io/active.h"
-#include "utils/util.h"
 #include "framework/ips_action.h"
-#include "framework/parameter.h"
 #include "framework/module.h"
+#include "packet_io/active.h"
+#include "profiler/profiler.h"
 
 #define REJ_RST_SRC  0x01
 #define REJ_RST_DST  0x02
index c250c03ed47f80ee992c38237550cd05de0630a5..01ce3517b88fa9b7aba3e9c1cfcf386e088c00d4 100644 (file)
 //--------------------------------------------------------------------------
 // act_replace.cc author Russ Combs <rucombs@cisco.com>
 
-#include "act_replace.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <string>
+#include "act_replace.h"
 
-#include "main/snort_types.h"
-#include "main/snort_debug.h"
 #include "framework/ips_action.h"
 #include "framework/module.h"
-#include "protocols/packet.h"
 #include "packet_io/active.h"
+#include "protocols/packet.h"
 
 #define s_name "rewrite"
 
index a5cb8d2d841323762bbb1a621c31dcd313792ca5..00ce92765d1556d14bc9ffd30b714228d3c0acf6 100644 (file)
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
-#include "actions.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
+#include "actions.h"
+
 #include "detection/detect.h"
 #include "detection/tag.h"
 #include "packet_io/active.h"
index 54292ba2f9c5de4661fbfc27b14ed306d083d227..a82758c548323c34823aec96f6c4ffdbc1b463d8 100644 (file)
@@ -21,7 +21,7 @@
 
 // Define action types and provide hooks to apply a given action to a packet
 
-#include <stdint.h>
+#include <cstdint>
 
 #define ACTION_LOG      "log"
 #define ACTION_PASS     "pass"
index 79d1673f27e6ae0175a0e2ec477c4188a6848421..84b22ca8e0f12f2684444d1e2963874da7bbb56c 100644 (file)
 //--------------------------------------------------------------------------
 // ips_actions.cc author Russ Combs <rucombs@cisco.com>
 
-#include "ips_actions.h"
-#include "managers/plugin_manager.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
+#include "ips_actions.h"
+
+#include "managers/plugin_manager.h"
+
 #ifdef STATIC_IPS_ACTIONS
 extern const BaseApi* act_react[];
 extern const BaseApi* act_reject[];
index 628a887732b6e45c9001ce35a29c660bfe0f6ac9..c4e2841a5fcbe547bdc068e019a5f49a63a2aa8f 100644 (file)
 //--------------------------------------------------------------------------
 // unit_test.h author Russ Combs <rucombs@cisco.com>
 
-#include "unit_test.h"
-
-#include <stdlib.h>
-#include <string.h>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <vector>
-#include <string>
+#include "unit_test.h"
 
 #define CATCH_CONFIG_RUNNER
 #include "catch.hpp"
index b1dce81222d94aae347aef0d70803d873b510d75..8d2fe63636c2308876d82c8243030053f54675a0 100644 (file)
@@ -27,6 +27,7 @@
 
 // Unresolved external symbol declarations and references.
 SNORT_CATCH_FORCED_INCLUSION_EXTERN(bitop_test);
+SNORT_CATCH_FORCED_INCLUSION_EXTERN(lua_stack_test);
 SNORT_CATCH_FORCED_INCLUSION_EXTERN(sfdaq_module_test);
 SNORT_CATCH_FORCED_INCLUSION_EXTERN(sfip_test);
 SNORT_CATCH_FORCED_INCLUSION_EXTERN(sfrf_test);
@@ -37,6 +38,7 @@ SNORT_CATCH_FORCED_INCLUSION_EXTERN(stopwatch_test);
 bool catch_extern_tests[] =
 {
     SNORT_CATCH_FORCED_INCLUSION_SYMBOL(bitop_test),
+    SNORT_CATCH_FORCED_INCLUSION_SYMBOL(lua_stack_test),
     SNORT_CATCH_FORCED_INCLUSION_SYMBOL(sfdaq_module_test),
     SNORT_CATCH_FORCED_INCLUSION_SYMBOL(sfip_test),
     SNORT_CATCH_FORCED_INCLUSION_SYMBOL(sfrf_test),
index 4838efc3f4bbc424d1a3088f79c35f928e93fe9f..c3793e2bec8549e898ce53a9e200f1a2cdf8c9b4 100644 (file)
 //--------------------------------------------------------------------------
 // codec_api.cc author Josh Rosenbaum <jrosenba@cisco.com>
 
-#include "codec_api.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
+#include "codec_api.h"
+
 #include "framework/codec.h"
 #include "managers/plugin_manager.h"
 
index 4bbd4b317f4d4fbe6cc570f9737cca72c06f402a..0e809e3021613808a793bc4d6c6ef983b724017a 100644 (file)
 //--------------------------------------------------------------------------
 // codec_module.cc author Josh Rosenbaum <jrosenba@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "codecs/codec_module.h"
 
 #define codec_module_help \
index 68b4758242774815f8e6fbfaaa707d2767ca94ee..7f795e6ae8f3717bc9f27d40e5abc1ffa3db693c 100644 (file)
 #include "config.h"
 #endif
 
-#include "framework/codec.h"
-#include "protocols/protocol_ids.h"
-#include "protocols/ipv6.h"
-#include "protocols/packet.h"
 #include "codecs/codec_module.h"
+#include "framework/codec.h"
 #include "main/snort_config.h"
 
 #define CD_AUTH_NAME "auth"
index 0787be02503822920b8d278666f2155402648a79..74c20bf5c5f4a00f7041e531e8a79e396842d491 100644 (file)
 #include "config.h"
 #endif
 
-#include "framework/codec.h"
-#include "log/messages.h"
-#include "protocols/protocol_ids.h"
-#include "protocols/packet.h"
 #include "codecs/codec_module.h"
+#include "framework/codec.h"
 #include "main/snort_config.h"
 
 #define CD_DSTOPTS_NAME "ipv6_dst_opts"
index 344008ffedbceecda8b1b531f2d93d31eb01589a..fcd86a7858168b7d8aa4a5be6d75fe11e21afd03 100644 (file)
 #include "config.h"
 #endif
 
+#include "codecs/codec_module.h"
 #include "framework/codec.h"
 #include "main/snort_config.h"
-#include "protocols/protocol_ids.h"
-#include "codecs/codec_module.h"
 
 #define CD_ESP_NAME "esp"
 #define CD_ESP_HELP "support for encapsulating security payload"
index df4e90fdc5d9b5a116dfcf2b949f147f278467ee..a85fdadcc5260644f58f6bc47633ee294ede1ac4 100644 (file)
 #include "framework/codec.h"
 #include "log/text_log.h"
 #include "main/snort_config.h"
-#include "protocols/ipv6.h"
-#include "protocols/packet.h"
-#include "protocols/packet_manager.h"
-#include "protocols/protocol_ids.h"
 
 #define CD_IPV6_FRAG_NAME "ipv6_frag"
 #define CD_IPV6_FRAG_HELP "support for IPv6 fragment decoding"
index 8c78b0172e8fa4c16bd0cbd17fdc7e619c4aec30..863fa3c24553cbe782bd685629073711c12cf514 100644 (file)
 #include "config.h"
 #endif
 
+#include "codecs/codec_module.h"
 #include "framework/codec.h"
-#include "protocols/packet.h"
-#include "protocols/protocol_ids.h"
 #include "protocols/gre.h"
 #include "log/text_log.h"
-#include "protocols/packet_manager.h"
-#include "codecs/codec_module.h"
 
 #define CD_GRE_NAME "gre"
 #define CD_GRE_HELP "support for generic routing encapsulation"
index 55698d6fedd4d297f35a88f396b3e9afa19fd79e..7ab6af87937c100563dfeab2e632bb18b9858b0b 100644 (file)
@@ -23,9 +23,7 @@
 
 #include "codecs/codec_module.h"
 #include "framework/codec.h"
-#include "protocols/ipv6.h"
 #include "main/snort_config.h"
-#include "protocols/protocol_ids.h"
 
 #define CD_HOPOPTS_NAME "ipv6_hop_opts"
 #define CD_HOPOPTS_HELP "support for IPv6 hop options"
index 989bcae7dbc2e5ead2a865371d5cfccd68120f82..8c12b9f81291ad824b3af09a4240788a415b7952 100644 (file)
 #endif
 
 #include "codecs/codec_module.h"
-#include "codecs/ip/checksum.h"
 #include "framework/codec.h"
 #include "log/text_log.h"
 #include "main/snort_config.h"
 #include "protocols/icmp4.h"
 
+#include "checksum.h"
+
 #define CD_ICMP4_NAME "icmp4"
 #define CD_ICMP4_HELP "support for Internet control message protocol v4"
 
index 749e183dea426cd63ef3998691e007001f8460bc..b48425756f2d03eebcad2eda33e50b2b7190970c 100644 (file)
 #include "config.h"
 #endif
 
-#include "main/snort_config.h"
+#include "codecs/codec_module.h"
 #include "framework/codec.h"
+#include "log/text_log.h"
+#include "main/snort_config.h"
 #include "protocols/icmp6.h"
 #include "protocols/icmp4.h"
-#include "codecs/codec_module.h"
-#include "codecs/codec_module.h"
-#include "codecs/ip/checksum.h"
-#include "packet_io/active.h"
-#include "log/text_log.h"
-#include "main/snort_debug.h"
 #include "utils/util.h"
 
+#include "checksum.h"
+
 #define CD_ICMP6_NAME "icmp6"
 #define CD_ICMP6_HELP "support for Internet control message protocol v6"
 
index 2a1f5deaa1e0aad588d3ff61ef0c1c9629747bc1..4255e0cc73566f05df75350023f836181e6bf817 100644 (file)
@@ -23,8 +23,6 @@
 
 #include "framework/codec.h"
 #include "codecs/codec_module.h"
-#include "protocols/packet.h"
-#include "protocols/ipv4_options.h"
 
 #define CD_IGMP_NAME "igmp"
 #define CD_IGMP_HELP "support for Internet group management protocol"
index 78d866804dd2f3b11b788dcbdd684d08e47adcfa..941d88c6662a33a0c82f2094528ce530fd8bbd85 100644 (file)
 #include "config.h"
 #endif
 
-#include <arpa/inet.h>
-#include <array>
-
-#include "utils/dnet_header.h"
+#include "codecs/codec_module.h"
+#include "log/log_text.h"
+#include "log/messages.h"
 #include "main/snort_config.h"
-
-#include "protocols/tcp.h"
-#include "protocols/ipv4.h"
-#include "protocols/packet_manager.h"
-
-#include "utils/stats.h"
 #include "packet_io/active.h"
-#include "codecs/ip/checksum.h"
-#include "main/thread.h"
-#include "codecs/codec_module.h"
+#include "parser/parse_ip.h"
 #include "protocols/ip.h"
+#include "protocols/ipv4.h"
 #include "protocols/ipv4_options.h"
-#include "log/messages.h"
-#include "log/text_log.h"
-#include "log/log_text.h"
+#include "protocols/tcp.h"
 #include "sfip/sf_ipvar.h"
-#include "parser/parse_ip.h"
+#include "utils/dnet_header.h"
+
+#include "checksum.h"
 
 #define CD_IPV4_NAME "ipv4"
 #define CD_IPV4_HELP "support for Internet protocol v4"
index e05f489c45692a1081705e8dae366f5750e0f3dc..07242e7354e2f94f73e5b146dbb8ff62e3678bad 100644 (file)
 #include "config.h"
 #endif
 
-#include <arpa/inet.h>
-#include <limits>
-
-#include "protocols/ipv6.h"
 #include "codecs/codec_module.h"
 #include "framework/codec.h"
+#include "log/text_log.h"
 #include "main/snort_config.h"
 #include "packet_io/active.h"
-#include "protocols/protocol_ids.h"
-#include "protocols/packet_manager.h"
-#include "log/text_log.h"
-#include "sfip/sf_ip.h"
 
 #define CD_IPV6_NAME "ipv6"
 #define CD_IPV6_HELP "support for Internet protocol v6"
index 69460d701040502252dd90b501684c6afa9d709b..9d98583574c0d4562b8961b4915140b7d4d6476d 100644 (file)
@@ -21,9 +21,9 @@
 #include "config.h"
 #endif
 
+#include "codecs/codec_module.h"
 #include "framework/codec.h"
 #include "main/snort_config.h"
-#include "codecs/codec_module.h"
 
 // yes, macros are necessary. The API and class constructor require different strings.
 #define CD_MOBILE_NAME "ipv6_mobility"
index dfe719d372d4e162123161e8e33d371f9e4aaf4f..27b9eedce3e531822fe9194cecc0218c1cfab426 100644 (file)
@@ -21,9 +21,8 @@
 #include "config.h"
 #endif
 
-#include "framework/codec.h"
 #include "codecs/codec_module.h"
-#include "protocols/protocol_ids.h"
+#include "framework/codec.h"
 #include "main/snort_config.h"
 
 namespace
index 83e2be2498c01d6027ae95f19425b4984275aec1..5794f2660a833cdf45615fac78d452c2e702a678 100644 (file)
 #include "config.h"
 #endif
 
-#include "framework/codec.h"
 #include "codecs/codec_module.h"
-#include "codecs/ip/checksum.h"
-#include "protocols/packet.h"
+#include "framework/codec.h"
+
+#include "checksum.h"
 
 namespace
 {
index 06df4e5a6744a4112360de16cf37971fa8a43b09..e44785c56536f58821c3e3b92f1ab84afacea3e4 100644 (file)
 #include "config.h"
 #endif
 
-#include "framework/codec.h"
 #include "codecs/codec_module.h"
-#include "protocols/protocol_ids.h"
+#include "framework/codec.h"
 #include "main/snort_config.h"
-#include "protocols/ipv6.h"
 
 #define CD_IPV6_ROUTING_NAME "ipv6_routing"
 #define CD_IPV6_ROUTING_HELP "support for IPv6 routing extension"
index bbaa036b14c0863a3db201795e05a5f0c8a548e1..c3af5c37dff9df56e3471f45107850404dbfa21a 100644 (file)
@@ -21,8 +21,8 @@
 #include "config.h"
 #endif
 
-#include "framework/codec.h"
 #include "codecs/codec_module.h"
+#include "framework/codec.h"
 
 namespace
 {
index 608f7e067bed3ea494f0c1d82c19b3a8cb17656e..fd71180e165b156f3cb4a3576bd55d8d9822d317 100644 (file)
@@ -21,8 +21,8 @@
 #include "config.h"
 #endif
 
-#include "framework/codec.h"
 #include "codecs/codec_module.h"
+#include "framework/codec.h"
 
 #define CD_SWIPE_NAME "swipe"
 #define CD_SWIPE_HELP "support for Swipe"
index 571a704d6a049e8cd815c38cbaf2fb7399a8a270..5a646074f4e5e394c4d2d86b1f3c87174b5003d2 100644 (file)
 #include "config.h"
 #endif
 
-#include "framework/codec.h"
 #include "codecs/codec_module.h"
-#include "codecs/ip/checksum.h"
+#include "framework/codec.h"
+#include "log/log.h"
+#include "log/log_text.h"
+#include "main/snort_config.h"
+#include "parser/parse_ip.h"
 #include "protocols/tcp.h"
 #include "protocols/tcp_options.h"
-#include "protocols/ipv6.h"
-#include "protocols/packet.h"
-#include "packet_io/active.h"
-#include "packet_io/sfdaq.h"
-#include "parser/parse_ip.h"
 #include "sfip/sf_ipvar.h"
-#include "log/text_log.h"
-#include "log/log_text.h"
-#include "log/log.h"
-#include "protocols/packet_manager.h"
 #include "utils/util.h"
 
+#include "checksum.h"
+
 #define CD_TCP_NAME "tcp"
 #define CD_TCP_HELP "support for transmission control protocol"
 
index e42521e35656be0b91c32c672173d787c2599de0..ca604c585b30c35c534d2961e596656ef6ff1e58 100644 (file)
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
-#include <string.h>
 
-#include "utils/dnet_header.h"
 #include "codecs/codec_module.h"
-#include "protocols/udp.h"
-#include "protocols/teredo.h"
-#include "protocols/protocol_ids.h"
-#include "protocols/icmp4.h"
-#include "protocols/ipv4.h"
-#include "protocols/protocol_ids.h"
-#include "codecs/ip/checksum.h"
-#include "log/text_log.h"
 #include "framework/codec.h"
-#include "packet_io/active.h"
-#include "parser/config_file.h"
+#include "log/text_log.h"
 #include "main/snort_config.h"
-#include "main/snort_debug.h"
+#include "protocols/teredo.h"
+#include "protocols/udp.h"
 #include "utils/util.h"
 
+#include "checksum.h"
+
 #define CD_UDP_NAME "udp"
 #define CD_UDP_HELP "support for user datagram protocol"
 
index 7edebcbb39822b99b3a0565ed8c4f1088d7a4ca2..a8c8ee42b33376c4f274130be26ca361f0b24130 100644 (file)
@@ -20,8 +20,6 @@
 #ifndef CODECS_CHECKSUM_H
 #define CODECS_CHECKSUM_H
 
-#include <stdint.h>
-#include <stdlib.h>
 #include <cstddef>
 
 #include <protocols/protocol_ids.h>
index 9d669f347b65a55f97ff3103e9f26f4e364da4f9..91d47701f94f512616fc63be719d8b1b01320de2 100644 (file)
 //--------------------------------------------------------------------------
 // cd_arp.cc author Josh Rosenbaum <jrosenba@cisco.com>
 
-#include "framework/codec.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "codecs/codec_module.h"
-#include "protocols/protocol_ids.h"
+#include "framework/codec.h"
 #include "protocols/arp.h"
-#include "protocols/packet.h"
-#include "log/text_log.h"
 
 #define CD_ARP_NAME "arp"
 #define CD_ARP_HELP "support for address resolution protocol"
index 17abcb5d5fcd572c14ead98feb7f8104026529c7..33ef1b0784d20f2984b4c27c5cacf007782b2074 100644 (file)
 //--------------------------------------------------------------------------
 // cd_ciscometadata.cc author Bhagya Tholpady <bbantwal@cisco.com>
 
-#include "framework/codec.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "codecs/codec_module.h"
-#include "protocols/protocol_ids.h"
-#include "protocols/packet.h"
+#include "framework/codec.h"
 
 #define CD_CISCOMETADATA_NAME "ciscometadata"
 #define CD_CISCOMETADATA_HELP "support for cisco metadata"
index 32f62ee91a8957b0f215cca0b87c1231882311a2..a7697252f1c3ffb534f7802c57dcfce39f0e9726 100644 (file)
 //--------------------------------------------------------------------------
 // cd_erspan2.cc author Josh Rosenbaum <jrosenba@cisco.com>
 
-#include "framework/codec.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "codecs/codec_module.h"
-#include "protocols/protocol_ids.h"
-#include "protocols/packet.h"
+#include "framework/codec.h"
 
 #define CD_ERSPAN2_NAME "erspan2"
 #define CD_ERSPAN2_HELP "support for encapsulated remote switched port analyzer - type 2"
index 69cf1c2304df99f752c9b471d5b54a28c451f71f..f685557cf3aaeec3965c596b6d90d2ac686c9810 100644 (file)
 //--------------------------------------------------------------------------
 // cd_erspan3.cc author Josh Rosenbaum <jrosenba@cisco.com>
 
-#include <arpa/inet.h>
-#include "framework/codec.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "codecs/codec_module.h"
-#include "protocols/protocol_ids.h"
-#include "protocols/packet.h"
+#include "framework/codec.h"
 
 #define CD_ERSPAN3_NAME "erspan3"
 #define CD_ERSPAN3_HELP "support for encapsulated remote switched port analyzer - type 3"
index 0b1aed80d6b9756668f557621e902e116c595eb2..85f5b9bce20795105d9d06ff981d13ac04ab7dcd 100644 (file)
 //--------------------------------------------------------------------------
 // cd_fabricpath.cc author Josh Rosenbaum <jrosenba@cisco.com>
 
-#include "framework/codec.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "codecs/codec_module.h"
-#include "protocols/protocol_ids.h"
-#include "protocols/packet.h"
+#include "framework/codec.h"
 
 #define CD_FABRICPATH_NAME "fabricpath"
 #define CD_FABRICPATH_HELP "support for fabricpath"
index 059fe39f5105e5ba8f3acfebeb33c3b24531400e..4a60bfed53ef028edba3e459b249aa11ccfadc96 100644 (file)
 //--------------------------------------------------------------------------
 // cd_mpls.cc author Josh Rosenbaum <jrosenba@cisco.com>
 
-#include "framework/codec.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "codecs/codec_module.h"
-#include "protocols/mpls.h"
-#include "packet_io/active.h"
-#include "protocols/protocol_ids.h"
-#include "protocols/mpls.h"
+#include "flow/flow.h"
+#include "framework/codec.h"
 #include "main/snort_config.h"
-#include "log/text_log.h"
 #include "utils/safec.h"
 
 #define CD_MPLS_NAME "mpls"
index d9ba8a6f1456d787bbb8c4f0f0b3d6b68480b0b6..dafc9be81747af21600b11caa5f0ebbcdaef0f87 100644 (file)
@@ -23,8 +23,6 @@
 #endif
 
 #include "framework/codec.h"
-#include "protocols/protocol_ids.h"
-#include "main/snort_config.h"
 #include "main/snort_debug.h"
 
 #define CD_PPPENCAP_NAME "ppp_encap"
index 1120202b11fe616dafeece6baa9c385994fc8c63..9a1cc8495cb15861a11fafc8794f18b87844b011 100644 (file)
 //--------------------------------------------------------------------------
 // cd_pppoe.cc author Josh Rosenbaum <jrosenba@cisco.com>
 
-#include "framework/codec.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "codecs/codec_module.h"
-#include "protocols/packet.h"
-#include "protocols/layer.h"
-#include "main/snort_debug.h"
+#include "framework/codec.h"
 
 namespace
 {
index 88f743e1a607020297ffa3fe851837c9fed1ba37..7ec4d87140691a6e7eea81b4e2e0ce0acadfda30 100644 (file)
 #include "config.h"
 #endif
 
-#include "framework/codec.h"
 #include "codecs/codec_module.h"
-
+#include "framework/codec.h"
 #include "protocols/eth.h"
-#include "protocols/protocol_ids.h"
-#include "protocols/packet.h"
 
 namespace
 {
index 0c5a9f71b6e56c8efa1ee5017abdaa2cf84e5b2a..31768c6a4c31d3a05b5b5d7e770022470edba7b8 100644 (file)
 #include "config.h"
 #endif
 
-#include "protocols/packet.h"
-#include "framework/codec.h"
 #include "codecs/codec_module.h"
-#include "protocols/vlan.h"
-#include "protocols/eth.h"
-#include "protocols/protocol_ids.h"
-#include "protocols/packet_manager.h"
+#include "framework/codec.h"
 #include "log/text_log.h"
+#include "protocols/vlan.h"
 
 #define CD_VLAN_NAME "vlan"
 #define CD_VLAN_HELP "support for local area network"
index 12d4f44bb0be3df037e9303e99d5abf600bf1589..fa908964fcb4cde1f047267aa5891650aef3ea6f 100644 (file)
 //--------------------------------------------------------------------------
 // cd_default.cc author Josh Rosenbaum <jrosenba@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "framework/codec.h"
-#include "protocols/protocol_ids.h"
 
 #define CD_DEFAULT_NAME "unknown"
 #define CD_DEFAULT_HELP "support for unkown protocols"
index b75f0c351c1e3414368127a0a3ab5c9806bb3601..fa522e68bd5bde2b643662774e2d5535b4870b48 100644 (file)
 #include "config.h"
 #endif
 
-#include "main/snort_debug.h"
+#include "codecs/codec_module.h"
 #include "framework/codec.h"
-#include "protocols/packet.h"
+#include "main/snort_config.h"
 #include "packet_io/active.h"
-#include "protocols/protocol_ids.h"
-#include "codecs/codec_module.h"
 
 #define CD_GTP_NAME "gtp"
 #define CD_GTP_HELP "support for general-packet-radio-service tunnelling protocol"
index d71cf62f0bc229515b34116f871d67a129cfedc3..59e7f95103ee698ef2d0788c79c37172b0a3ae58 100644 (file)
 #include "config.h"
 #endif
 
+#include "codecs/codec_module.h"
 #include "framework/codec.h"
-#include "protocols/ipv4.h"
-#include "protocols/packet.h"
-#include "protocols/tcp.h"
 #include "log/text_log.h"
 #include "main/snort_config.h"
-#include "log/messages.h"
-#include "protocols/packet_manager.h"
 #include "protocols/icmp4.h"
+#include "protocols/packet_manager.h"
+#include "protocols/tcp.h"
 #include "protocols/udp.h"
-#include "codecs/codec_module.h"
 
 namespace
 {
index b18b121e5028d7063ea256500b33a83073be3557..a252b08a778da0623ca9c93660cf8b92cac6d7cb 100644 (file)
 #include "config.h"
 #endif
 
-#include "framework/codec.h"
-#include "protocols/protocol_ids.h"
-#include "protocols/ipv6.h"
-#include "protocols/packet.h"
 #include "codecs/codec_module.h"
+#include "framework/codec.h"
 
 // yes, macros are necessary. The API and class constructor require different strings.
 //
index 22abad96dbdb3536cca02386ecbdb468b8d6d720..d1738e83735c62db3c629719cd48b5c7e63c2cca 100644 (file)
 #include "config.h"
 #endif
 
-#include "framework/codec.h"
-#include "codecs/codec_module.h"
-#include "protocols/packet.h"
-#include "framework/module.h"
 #include "codecs/codec_module.h"
+#include "framework/codec.h"
 #include "log/text_log.h"
-#include "protocols/packet_manager.h"
 
 #define LLC_NAME "llc"
 #define LLC_HELP "support for logical link control"
index c1fccc7dd5a3a509c925c5b639114055e50e8a5a..4f63390dedc5d068a5bc89573699e46adddc0b53 100644 (file)
 #endif
 
 #include "framework/codec.h"
+#include "main/snort_config.h"
 #include "packet_io/active.h"
-#include "main/snort_types.h"
-#include "protocols/packet.h"
 #include "protocols/teredo.h"
-#include "protocols/protocol_ids.h"
 
 #define CD_TEREDO_NAME "teredo"
 #define CD_TEREDO_HELP "support for teredo"
index de4b235c8bfb14aed0d68d439bd64bd1a5bc1a73..92f93bdb6fa907f270988a4db536741bf4400c57 100644 (file)
 #include "config.h"
 #endif
 
-#include "framework/codec.h"
+#include <daq_common.h>
+
 #include "daqs/daq_user.h"
-#include "protocols/packet.h"
-#include "sfip/sf_ip.h"
+#include "framework/codec.h"
 
 #define CD_NAME "user"
 #define CD_HELP_STR "support for user sessions"
index afb45c4b5f5c00e1d095642d3557219e9b0277d8..e54760f65749dd3cefd5c318fe69f073305c47d9 100644 (file)
 #include "config.h"
 #endif
 
-extern "C" {
 #include <sfbpf_dlt.h>
-}
 
 #include "codecs/codec_module.h"
 #include "framework/codec.h"
-#include "protocols/packet.h"
+#include "log/text_log.h"
 #include "protocols/eth.h"
 #include "protocols/packet_manager.h"
-#include "log/text_log.h"
 
 #define CD_ETH_NAME "eth"
 #define CD_ETH_HELP_STR "support for ethernet protocol"
index cda850530df2f8fec9d6000de8a18c48ad638742..a632c1663154460a9244a83fbaa6dc384be1744b 100644 (file)
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "connectors.h"
 
 #include "framework/connector.h"
index 5d48d66839f326044e3397293f614acf85ceba31..21ad1433936dd1c5f620174ee86a9bcb6ec30ac9 100644 (file)
 
 // file_connector.cc author Ed Borgoyn <eborgoyn@cisco.com>
 
-#include "file_connector.h"
-
-#include <assert.h>
-#include <glob.h>
-#include <stdio.h>
-#include <sys/types.h>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <fstream>
-#include <string>
-#include <vector>
+#include "file_connector.h"
 
-#include "file_connector_module.h"
-#include "main/snort_types.h"
 #include "main/snort_debug.h"
-#include "main/thread.h"
-#include "profiler/profiler.h"
-#include "parser/parser.h"
+#include "profiler/profiler_defs.h"
 #include "side_channel/side_channel.h"
-#include "framework/connector.h"
+
+#include "file_connector_module.h"
 
 /* Globals ****************************************************************/
 
index bb07b0799f2c030bdd71dfc65605f07e608ac54e..cd08df8b466b94faf264f23d2aa6aabd1b889040 100644 (file)
 
 #include <fstream>
 
-#include "file_connector_config.h"
 #include "framework/connector.h"
-#include "main/thread.h"
-#include "profiler/profiler.h"
+
+#include "file_connector_config.h"
 
 #define FILE_FORMAT_VERSION (1)
 
index 642383b31ea5c873fbe98962fcc2746388ef8739..3135be27c557297acb7e92429b8c6bbb8a397eff 100644 (file)
 
 // file_connector_module.cc author Ed Borgoyn <eborgoyn@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "file_connector_module.h"
 
 #include "main/snort_debug.h"
index d2b8974c31bd674415988aaabcdffe856e486878..232944cc87048623b524034be00626b50ee4b013 100644 (file)
@@ -21,9 +21,9 @@
 #ifndef FILE_CONNECTOR_MODULE_H
 #define FILE_CONNECTOR_MODULE_H
 
-#include "file_connector_config.h"
 #include "framework/module.h"
-#include "main/thread.h"
+
+#include "file_connector_config.h"
 
 #define FILE_CONNECTOR_NAME "file_connector"
 #define FILE_CONNECTOR_HELP "implement the file based connector"
index eb51caeee670112504498f54e2b400c02c99d788..8d1522fd239daeda00c5c67e5bc75c2a7c2c7e13 100644 (file)
 // file_connector_module_test.cc author Ed Borgoyn <eborgoyn@cisco.com>
 // unit test main
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "connectors/file_connector/file_connector_module.h"
 #include "profiler/profiler.h"
 
index d39f7232288b8cdf00fcfc054878ddf5e903df63..301d34965b720a947c272d551a8b3181230d3d4d 100644 (file)
 // file_connector_test.cc author Ed Borgoyn <eborgoyn@cisco.com>
 // unit test main
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "connectors/file_connector/file_connector.h"
 #include "connectors/file_connector/file_connector_module.h"
 
index fe567231152b2a5bcbc968385aa8549bc12bd130..37ef5e42ff08cb3416f1b016cc1955e3b4a43ff3 100644 (file)
 
 // tcp_connector.cc author Ed Borgoyn <eborgoyn@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "tcp_connector.h"
 
-#include <assert.h>
-#include <glob.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/socket.h>
 #include <netdb.h>
 #include <poll.h>
+#include <sys/socket.h>
+#include <unistd.h>
 
-#include <fstream>
-#include <string>
-#include <thread>
-#include <vector>
-
-#include "helpers/ring.h"
-#include "tcp_connector_module.h"
 #include "log/messages.h"
-#include "main/snort_types.h"
 #include "main/snort_debug.h"
 #include "main/thread.h"
-#include "profiler/profiler.h"
-#include "parser/parser.h"
-#include "side_channel/side_channel.h"
-#include "framework/connector.h"
+#include "profiler/profiler_defs.h"
+
+#include "tcp_connector_module.h"
 
 /* Globals ****************************************************************/
 
index 8b8535e88bdc9e5b21a0b10b369c56227babc630..947be7a8bb2a5694f447efdd554f57421d9eaf1e 100644 (file)
 #ifndef TCP_CONNECTOR_H
 #define TCP_CONNECTOR_H
 
-#include <fstream>
 #include <thread>
 
-#include "tcp_connector_config.h"
 #include "framework/connector.h"
 #include "helpers/ring.h"
-#include "main/thread.h"
-#include "profiler/profiler.h"
+
+#include "tcp_connector_config.h"
 
 #define TCP_FORMAT_VERSION (1)
 
index 0526ee1259022dd9b6076de3b933386483c7197b..d6684d1f601b76db3dcd467b2172601e8162671a 100644 (file)
 
 // tcp_connector_module.cc author Ed Borgoyn <eborgoyn@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "tcp_connector_module.h"
 
 #include "main/snort_debug.h"
index 1a07dc01de6afb01b790985a2a1319bdea8f1544..7d59f5c4919dabb8824b4dccb37c1ae6463fd3e5 100644 (file)
@@ -21,9 +21,9 @@
 #ifndef TCP_CONNECTOR_MODULE_H
 #define TCP_CONNECTOR_MODULE_H
 
-#include "tcp_connector_config.h"
 #include "framework/module.h"
-#include "main/thread.h"
+
+#include "tcp_connector_config.h"
 
 #define TCP_CONNECTOR_NAME "tcp_connector"
 #define TCP_CONNECTOR_HELP "implement the tcp stream connector"
index 9685e562aa322538d0912f5e55d890f57b343447..738ede4fcdda7d73edcb68a2c03fd8fbac4f621d 100644 (file)
 // tcp_connector_module_test.cc author Ed Borgoyn <eborgoyn@cisco.com>
 // unit test main
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "connectors/tcp_connector/tcp_connector_module.h"
 #include "profiler/profiler.h"
 
index cd4048aa7ae98b0507ce5de97f5c84ebde4d3b8d..64b33655f1901dbf9b91d6ef1981b07baa24f463 100644 (file)
 // tcp_connector_test.cc author Ed Borgoyn <eborgoyn@cisco.com>
 // unit test main
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "connectors/tcp_connector/tcp_connector.h"
 #include "connectors/tcp_connector/tcp_connector_module.h"
 
-#include <sys/socket.h>
-#include <sys/poll.h>
 #include <netdb.h>
+#include <sys/poll.h>
+#include <sys/socket.h>
+#include <unistd.h>
 
 #include "main/snort_debug.h"
 
index 8e3cdfe2161899affba2c4b020f217e2abe998c1..6e4b56ebe5cbd0e0e18f0266a002195fef82039c 100644 (file)
 // Allow functions to be registered to be called when packet
 // processing is idle.
 
-#include "idle_processing.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
+#include "idle_processing.h"
+
 #include <vector>
 
 #ifdef UNIT_TEST
index 9382bca620780b70b34a8c267df0f34cacfb1a6a..6c509ecfc5a51ab7758b301fb7f595d3dd6aeea0 100644 (file)
 
 // file_decomp.cc author Ed Borgoyn <eborgoyn@sourcefire.com>
 
-#include "file_decomp.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#ifdef HAVE_LZMA
-#include <lzma.h>
-#endif
+#include "file_decomp.h"
 
-#include <zlib.h>
+#include <cassert>
 
-#include "main/snort_types.h"
-#include "utils/util.h"
 #include "detection/detection_util.h"
+#include "utils/util.h"
 
 #include "file_decomp_pdf.h"
 #include "file_decomp_swf.h"
index 5af2fbb69e1e4c46ece8d0e48d3c87e773cbabdb..60ea882345b1c9034b23d3ef0cae142f27ef68de 100644 (file)
@@ -23,8 +23,7 @@
 
 // File_Decomp global typedefs (used in child objects)
 
-#include <stdint.h>
-#include <string.h>
+#include <cstring>
 
 #include "main/snort_types.h"
 
index 5891c536028bdf6066f2684ef15eadb4acc7d99c..1cc48cd9dc2f101ce43297c47a729f2897eb2389 100644 (file)
 
 // file_decomp_pdf.cc author Ed Borgoyn <eborgoyn@sourcefire.com>
 
-#include "file_decomp_pdf.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <ctype.h>
-#include <string.h>
-#include <stdlib.h>
-#include <zlib.h>
+#include "file_decomp_pdf.h"
 
 #include "main/thread.h"
 #include "utils/util.h"
index 1129661284e81980d7ddff6c144ef77b7246c26f..18594d1f793712657aee95248f8cce64213936dc 100644 (file)
@@ -22,7 +22,6 @@
 #ifndef FILE_DECOMP_PDF_H
 #define FILE_DECOMP_PDF_H
 
-#include <stdint.h>
 #include <zlib.h>
 
 #include "file_decomp.h"
index 5ff79e7f1566c86621b0d6abf9e437da6968b3d1..394e588dc4d9ebb203bbc64c63ec78461f15167a 100644 (file)
 
 // file_decomp_swf.cc author Ed Borgoyn <eborgoyn@sourcefire.com>
 
-#include "file_decomp_swf.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <zlib.h>
-#include <string.h>
-
-#ifdef HAVE_LZMA
-#include <lzma.h>
-#endif
+#include "file_decomp_swf.h"
 
 #include "utils/util.h"
 
index e29db56daf9eddb55a98385924414da0a5ae9942..8e4d4e25e81e8d143b4c8ae3d33b1dadab90ab1e 100644 (file)
 #ifndef FILE_DECOMP_SWF_H
 #define FILE_DECOMP_SWF_H
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <stdint.h>
-#include <zlib.h>
-
 #ifdef HAVE_LZMA
 #include <lzma.h>
 #endif
+#include <zlib.h>
 
 #include "file_decomp.h"
 
index 782c8816cae53f57f86c7d5860dc2f54b6b6ad40..4c96503db83a749ab174b09d41a51cafb5177d5c 100644 (file)
@@ -4,7 +4,6 @@ set (DETECTION_INCLUDES
     detection_defines.h
     detection_options.h
     detection_util.h
-    pattern_match_data.h
     rule_option_types.h
     rules.h
     signature.h
@@ -24,6 +23,7 @@ add_library (detection STATIC
     fp_detect.h
     fp_utils.cc
     fp_utils.h
+    pattern_match_data.h
     pcrm.cc
     pcrm.h
     service_map.cc
index e405d0b4c77b756b2c0a772a7227726c8b2d4279..1cb2e3c080b1e41215ad6ce1b7f0ad3087744465 100644 (file)
@@ -6,9 +6,7 @@ x_includedir = $(pkgincludedir)/detection
 x_include_HEADERS = \
 detect.h \
 detection_defines.h \
-detection_options.h \
 detection_util.h \
-pattern_match_data.h \
 rule_option_types.h \
 rules.h \
 signature.h \
@@ -17,6 +15,7 @@ treenodes.h
 libdetection_a_SOURCES = \
 detect.cc \
 detection_options.cc \
+detection_options.h \
 detection_util.cc \
 fp_config.cc \
 fp_config.h \
@@ -26,6 +25,7 @@ fp_detect.cc \
 fp_detect.h \
 fp_utils.cc \
 fp_utils.h \
+pattern_match_data.h \
 pcrm.cc \
 pcrm.h \
 service_map.cc \
index 1b0f1d3ef7c17a810b8f11e996fba1814d805701..d11b5189ebaff18de1a3ecaac7aada4496980f76 100644 (file)
 **
 */
 
-#include "detect.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#define FASTPKT
-
-#include <string.h>
-#include <stdlib.h>
-
-#include "detection_defines.h"
-#include "fp_detect.h"
-#include "tag.h"
+#include "detect.h"
 
+#include "events/event.h"
 #include "latency/packet_latency.h"
+#include "main/snort_config.h"
+#include "main/snort_debug.h"
 #include "managers/event_manager.h"
 #include "managers/inspector_manager.h"
 #include "packet_io/active.h"
 #include "stream/stream.h"
 #include "utils/stats.h"
 
+#include "detection_defines.h"
+#include "fp_detect.h"
+#include "tag.h"
+#include "treenodes.h"
+
 #define CHECK_SRC_IP         0x01
 #define CHECK_DST_IP         0x02
 #define INVERSE              0x04
index 0e055cfa9d1f0984544f2e49554a9aa520025a1a..1c1342ae21b5a5d23ad5a4af28c59c43a4a6ded5 100644 (file)
 #ifndef DETECT_H
 #define DETECT_H
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "main/snort_debug.h"
-#include "main/snort_types.h"
-#include "protocols/packet.h"
 #include "detection/rules.h"
-#include "detection/treenodes.h"
-#include "log/log.h"
-#include "events/event.h"
+#include "main/snort_types.h"
+#include "main/thread.h"
 
+struct Event;
 struct ProfileStats;
+struct RuleFpList;
+struct RuleTreeNode;
 
 extern THREAD_LOCAL bool do_detect;
 extern THREAD_LOCAL bool do_detect_content;
index e3163be5b883773f2e0e1566642a7980276575b4..627f364f4629fdf470f2d5c1d98aa18a2412fcb8 100644 (file)
 **  detection options only once per pattern match.
 */
 
-#include "detection_options.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include "detection_defines.h"
-#include "detection_util.h"
-#include "treenodes.h"
-#include "fp_create.h"
-#include "fp_detect.h"
-#include "pattern_match_data.h"
-#include "rules.h"
+#include "detection_options.h"
 
-#include "profiler/profiler.h"
-#include "utils/util.h"
-#include "hash/sfxhash.h"
+#include "filters/detection_filter.h"
+#include "framework/cursor.h"
 #include "hash/sfhashfcn.h"
-#include "parser/parser.h"
+#include "hash/sfxhash.h"
 #include "ips_options/ips_byte_extract.h"
 #include "ips_options/ips_flowbits.h"
-#include "ips_options/ips_pcre.h"
-#include "filters/detection_filter.h"
 #include "latency/packet_latency.h"
+#include "latency/rule_latency_state.h"
 #include "log/messages.h"
+#include "main/snort_config.h"
 #include "main/thread_config.h"
-#include "framework/ips_option.h"
-#include "framework/cursor.h"
 #include "managers/ips_manager.h"
+#include "parser/parser.h"
+#include "profiler/rule_profiler_defs.h"
 #include "protocols/packet_manager.h"
+#include "utils/util.h"
+
+#include "detection_defines.h"
+#include "fp_detect.h"
+#include "pattern_match_data.h"
 
 #define HASH_RULE_OPTIONS 16384
 #define HASH_RULE_TREE     8192
index ab591bcd2b78fd0da565d6e92f83a61f94ae68ff..1a6ded7dad5066e34e3e033a8d44dfbe3f5b7b6c 100644 (file)
 // Eval, profiling, and latency data are attached in an array sized per max
 // packet threads.
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #include <sys/time.h>
+
 #include "detection/rule_option_types.h"
-#include "main/snort_types.h"
-#include "latency/rule_latency_state.h"
 #include "time/clock_defs.h"
 
 struct Packet;
+struct RuleLatencyState;
 struct SFXHASH;
 
 typedef int (* eval_func_t)(void* option_data, class Cursor&, Packet*);
index 482ec572c22aefea416999e19341ef5e6d50ff4b..bfdbb5f7dd89d163f461472a180ee4ec5fdd8910 100644 (file)
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
-#include "detection_util.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <time.h>
-#include <string>
+#include "detection_util.h"
 
-#include "main/snort_config.h"
+#include "events/event.h"
 #include "log/text_log.h"
-#include "actions/actions.h"
+#include "protocols/packet.h"
 #include "utils/stats.h"
 
+#include "treenodes.h"
+
 THREAD_LOCAL DataPointer g_file_data;
 
 #define LOG_CHARS 16
index dd6c1b6bb9ce6e2fe8a51558f6dc4562c7e7aa9f..4ea132d46bfcbbb5efcdd5fa7a434c44b2e66cc7 100644 (file)
 // it provides file and alt data pointers, event trace foo, and
 // some http stuff.
 
-#include <assert.h>
-
-#include "main/snort_types.h"
 #include "main/snort_config.h"
-#include "main/snort_debug.h"
-#include "detection/detect.h"
-#include "protocols/packet.h"
 
 #define DECODE_BLEN 65535
 
index 35d2d4df29bf0231643e04919e549981fe3b5100..a343cb7f70f2965a1bab8f58e2a4270fd9d2c47a 100644 (file)
 **  Marc Norton <mnorton@sourcefire.com>
 */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "fp_config.h"
 
-#include <assert.h>
-#include <stdlib.h>
-#include <string.h>
+#include <cassert>
+#include <cstring>
 
-#include "fp_config.h"
-#include "framework/mpse.h"
-#include "managers/mpse_manager.h"
 #include "log/messages.h"
+#include "managers/mpse_manager.h"
 
 FastPatternConfig::FastPatternConfig()
 {
index d9b1bbaf608ca60f7056b150b028934bfdf9ec72..f887d6c9cfc93698f8f8e3f9f74887d45550cb81 100644 (file)
 **
 */
 
-#include "fp_create.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
+#include "fp_create.h"
 
-#include "main/snort_config.h"
+#include "framework/mpse.h"
 #include "hash/sfghash.h"
-#include "ips_options/ips_flow.h"
-#include "utils/util.h"
-#include "utils/stats.h"
-#include "utils/sflsq.h"
-#include "parser/parser.h"
+#include "log/messages.h"
+#include "main/snort_config.h"
+#include "managers/mpse_manager.h"
 #include "parser/parse_rule.h"
+#include "parser/parser.h"
 #include "ports/port_table.h"
-#include "ports/port_utils.h"
 #include "ports/rule_port_tables.h"
-#include "framework/mpse.h"
-#include "framework/ips_option.h"
-#include "log/messages.h"
-#include "managers/mpse_manager.h"
-#include "target_based/snort_protocols.h"
+#include "utils/stats.h"
+#include "utils/util.h"
 
+#include "detection_options.h"
 #include "fp_config.h"
-#include "service_map.h"
-#include "rules.h"
-#include "treenodes.h"
-#include "fp_detect.h"
 #include "fp_utils.h"
-#include "detection_options.h"
-#include "detection_defines.h"
-#include "sfrim.h"
 #include "pattern_match_data.h"
+#include "pcrm.h"
+#include "service_map.h"
+#include "treenodes.h"
 
 static unsigned mpse_count = 0;
 static const char* s_group = "";
index e96ca261aa519c007ca4965b2eb2e459ae4e5a88..561cf783ab49209d1c22d7b988234927ade3d3ec 100644 (file)
@@ -27,9 +27,7 @@
 
 // this is where rule groups are compiled and MPSE are instantiated
 
-#include "detection/pcrm.h"
 #include "ports/port_group.h"
-#include "target_based/snort_protocols.h"
 
 struct SnortConfig;
 
index 554cbfa96c028e10795f7a3c53909b8f76d3aa5f..121a529e89b2aef5b59cbebd23f1768be56f1ec9 100644 (file)
 **
 */
 
-#include "fp_detect.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <strings.h>
-
-#include "detect.h"
-#include "fp_config.h"
-#include "fp_create.h"
-#include "service_map.h"
-#include "detection_util.h"
-#include "detection_options.h"
-#include "pattern_match_data.h"
-#include "pcrm.h"
-#include "tag.h"
-#include "rules.h"
-#include "treenodes.h"
+#include "fp_detect.h"
 
+#include "events/event.h"
+#include "filters/rate_filter.h"
+#include "filters/sfthreshold.h"
+#include "framework/cursor.h"
+#include "framework/mpse.h"
 #include "latency/packet_latency.h"
 #include "latency/rule_latency.h"
 #include "log/messages.h"
 #include "main/snort_config.h"
 #include "main/snort_debug.h"
-#include "framework/cursor.h"
-#include "framework/inspector.h"
-#include "framework/ips_action.h"
-#include "framework/mpse.h"
-#include "filters/sfthreshold.h"
-#include "filters/rate_filter.h"
-#include "events/event_wrapper.h"
-#include "packet_io/active.h"
-#include "parser/parser.h"
-#include "utils/sflsq.h"
-#include "utils/util.h"
-#include "profiler/profiler.h"
-#include "actions/actions.h"
-#include "sfip/sf_ip.h"
 #include "managers/action_manager.h"
+#include "parser/parser.h"
+#include "profiler/profiler_defs.h"
+#include "protocols/icmp4.h"
 #include "protocols/packet_manager.h"
-#include "protocols/tcp.h"
 #include "protocols/udp.h"
-#include "protocols/icmp4.h"
 #include "search_engines/pat_stats.h"
 #include "stream/stream.h"
 #include "utils/stats.h"
+#include "utils/util.h"
+
+#include "detect.h"
+#include "detection_options.h"
+#include "detection_util.h"
+#include "fp_config.h"
+#include "fp_create.h"
+#include "pattern_match_data.h"
+#include "pcrm.h"
+#include "service_map.h"
 
 THREAD_LOCAL ProfileStats rulePerfStats;
 THREAD_LOCAL ProfileStats ruleRTNEvalPerfStats;
index 957b429d5961b871c32f51b58d4c590e6f69a3ee..ba18ec2b7cfbf3c136b61fda275d76fe0da15043 100644 (file)
 // rule groups are selected based on traffic and any fast pattern
 // matches trigger rule tree evaluation.
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "main/snort_debug.h"
-#include "protocols/packet.h"
-#include "utils/sflsq.h"
+#include "main/thread.h"
 
 #define REBUILD_FLAGS (PKT_REBUILT_FRAG | PKT_REBUILT_STREAM)
 
+struct Packet;
+struct PortGroup;
 struct ProfileStats;
 struct OptTreeNode;
-struct PortGroup;
 
 extern THREAD_LOCAL ProfileStats rulePerfStats;
 extern THREAD_LOCAL ProfileStats ruleRTNEvalPerfStats;
index b5841758b0cee1a02b90166d4105c9273ef6b5ae..beb7cd524d63c73379d9ba6292b1e5519e8516c7 100644 (file)
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
-#include "fp_utils.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <string.h>
+#include "fp_utils.h"
 
-#ifdef UNIT_TEST
-#include "catch/catch.hpp"
-#endif
+#include <cassert>
+#include <cstring>
 
 #include "ips_options/ips_flow.h"
 #include "log/messages.h"
+#include "main/thread_config.h"
 #include "ports/port_group.h"
 #include "target_based/snort_protocols.h"
+#include "utils/util.h"
+
+#ifdef UNIT_TEST
+#include "catch/catch.hpp"
+#endif
 
 #include "pattern_match_data.h"
 #include "treenodes.h"
index bb784b9c1c4c0ebfc7f7a68d59be431007afbdf7..707327e647aa2e18a75c7d23d73714b57559b975 100644 (file)
 #ifndef PATTERN_MATCH_DATA_H
 #define PATTERN_MATCH_DATA_H
 
-#include <assert.h>
-#include <ctype.h>
 #include <sys/time.h>
 #include <vector>
 
-#include "detection/treenodes.h"
 #include "framework/ips_option.h"  // FIXIT-L not a good dependency
-#include "main/snort_types.h"
-#include "main/thread_config.h"
-#include "utils/util.h"
 
 struct PmdLastCheck
 {
index 7378438de92ab3fc26c4dd3f0e206b7c7b6219a0..3f48775751e66428163cce52cb0ca0b2daa97838 100644 (file)
 **  --------------------------------------------------------------------------
 */
 
-#include "pcrm.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
+#include "pcrm.h"
 
-#include "fp_config.h"
-#include "fp_create.h"
-#include "log/messages.h"
 #include "main/snort_config.h"
 #include "utils/util.h"
 
+#include "fp_config.h"
+
 PORT_RULE_MAP* prmNewMap()
 {
     PORT_RULE_MAP* p = (PORT_RULE_MAP*)snort_calloc(sizeof(PORT_RULE_MAP));
index 76a579ed0178af411ad50340cb66cbfafb4d8a37..71cf19ec2c125d92bb494f07d1d6c52286437258 100644 (file)
@@ -29,8 +29,8 @@
 // runle groups by source and dest ports as well as any
 // (generic refers to any)
 
-#include "protocols/packet.h"
 #include "ports/port_group.h"
+#include "protocols/packet.h"
 
 #define ANYPORT (-1)
 
index b1469d089e7d1695b3077d66068d24df31c7b000..38da7196d2109a21eed66172daac0cb30eb2761a 100644 (file)
@@ -24,7 +24,6 @@
 // misc rule and rule list support
 // FIXIT-L refactor this header
 
-#include "main/snort_types.h"
 #include "actions/actions.h"
 
 #define EXCEPT_SRC_IP   0x0001
index f23de8428a034c22ae6635270ab90562cc72d369..be34a2b1c706f0e70eedaa10daeffacbb0e7f504 100644 (file)
 **
 */
 
-#include "service_map.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
+#include "service_map.h"
+
+#include <cassert>
 
 #include "hash/sfghash.h"
 #include "ips_options/ips_flow.h"
index d23060d13cf0277544dd3fe941ad22ab0e7d3799..1158338b810022ff4436993e641f46a106500416 100644 (file)
@@ -30,9 +30,9 @@
 
 #include <vector>
 
-#include "detection/pcrm.h"
 #include "target_based/snort_protocols.h"
 
+struct PortGroup;
 struct SFGHASH;
 struct SnortConfig;
 
index 5a1a914ec8210ea81a684a6c60119c3ebc42f141..89050844fab82544156bacc80a7629f8c34abcee 100644 (file)
 // sfrim.c author Marc Norton
 // modified to use a vector w/o a hard max
 
-#include "sfrim.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
+#include "sfrim.h"
 
+#include <cassert>
 #include <vector>
 
 #ifdef UNIT_TEST
index 71512f9415574e714ef45e27b90ba0c95e8bfc27..2427cbef6a2cd8ccfb6a81cc5253765761d668dc 100644 (file)
 //--------------------------------------------------------------------------
 // Author(s):   Andrew R. Baker <andrewb@sourcefire.com>
 
-#include "signature.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <string.h>
-#include <ctype.h>
+#include "signature.h"
 
-#include "utils/util.h"
-#include "detection/rules.h"
-#include "detection/treenodes.h"
-#include "hash/sfghash.h"
 #include "log/messages.h"
-#include "parser/parser.h"
 #include "main/snort_config.h"
+#include "parser/parser.h"
+#include "utils/util.h"
+
+#include "treenodes.h"
 
 /********************* Reference Implementation *******************************/
 
index 9940922d4c3c8a87c1987a53cfb258288f0c6990..4f2215c69ba59aaaa33b59747222566fc9b066dd 100644 (file)
 
 // basic non-detection signature info:  gid, sid, rev, class, priority, etc.
 
-#include <sys/types.h>
-#include <stdio.h>
-
-#include "main/snort_types.h"
+#include <cstdint>
+#include <cstdio>
 
 struct SnortConfig;
 struct OptTreeNode;
index 6819953ccf8a0ed1fcebc1a092583048e3fd8f91..7a9fb292471b724f2aa4a6841e39ea78717a657c 100644 (file)
 //--------------------------------------------------------------------------
 // Chris Green <cmg@sourcefire.com>
 
-#include "tag.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <sys/types.h>
-#include <stdlib.h>
-#include <rpc/types.h>
-#include <string.h>
-#include <ctype.h>
+#include "tag.h"
 
-#include "rules.h"
-#include "treenodes.h"
+#include "events/event.h"
+#include "hash/sfxhash.h"
 #include "log/messages.h"
-#include "main/snort_debug.h"
 #include "main/snort_config.h"
-#include "protocols/packet.h"
-#include "utils/util.h"
-#include "log/log.h"
+#include "main/snort_debug.h"
 #include "parser/parser.h"
-#include "events/event.h"
-#include "hash/sfxhash.h"
+#include "protocols/packet.h"
 #include "sfip/sf_ip.h"
+#include "utils/cpp_macros.h"
+#include "utils/util.h"
+
+#include "treenodes.h"
 
 /*  D E F I N E S  **************************************************/
 #define MAX_TAG_NODES   256
index d07ef62778384f5254fc6ff82a918dbc57e5d0fb..523f3c84cf8dc87a874335c3750af7ea26eb8baf 100644 (file)
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "treenodes.h"
 
 #include "framework/ips_option.h"
-#include "main/snort_types.h"
-#include "main/snort_debug.h"
 #include "utils/util.h"
 
-#include "detect.h"
-
 OptFpList* AddOptFuncToList(RuleOptEvalFunc ro_eval_func, OptTreeNode* otn)
 {
     OptFpList* ofp = (OptFpList*)snort_calloc(sizeof(OptFpList));
index a74b7bed27f460bfdcc6ad9c1e4d584ba8f1f0a5..b8f12b987105e7646151c41e4aff981f844314df 100644 (file)
 
 // rule header (RTN) and body (OTN) nodes
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "main/snort_types.h"
+#include "actions/actions.h"
 #include "detection/signature.h"
 #include "detection/rule_option_types.h"
-#include "actions/actions.h"
+#include "main/snort_types.h"
 #include "time/clock_defs.h"
 
 class IpsOption;
index 9184946210a16ebd19bb265ebe24c20038969b7e..a7e73bcb7b214afeeb30a718e93d844292a07dad 100644 (file)
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
-#include "event.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <sys/types.h>
-#include <stdlib.h>
-#include <string.h>
+#include "event.h"
 
-#include "main/snort_config.h"
 #include "detection/signature.h"
+#include "main/snort_config.h"
 
 THREAD_LOCAL uint16_t event_id; // FIXIT-M also incremented in fpLogEvent()
 THREAD_LOCAL SigInfo sig_info;  // FIXIT-M move to stack
index 98f2942410e8a407e0fd08bf5d25208781af9909..9246a4c62df25d7b94ae7b52c0cb92a3088927cd 100644 (file)
@@ -21,9 +21,6 @@
 #ifndef EVENT_H
 #define EVENT_H
 
-#include <sys/types.h>
-
-#include "main/snort_types.h"
 #include "main/thread.h"
 
 struct SigInfo;
index e85b5a2b203f35d8f87dee9f370d28f3b5361342..fe70f70745e4b78c7e130d73930cfe9784f378f7 100644 (file)
 **           SnortEventqAdd() - only adds events that have an otn
 **
 */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "event_queue.h"
 
-#include "sfeventq.h"
-#include "event_wrapper.h"
 #include "detection/fp_detect.h"
-#include "utils/util.h"
-#include "utils/stats.h"
 #include "filters/sfthreshold.h"
 #include "log/messages.h"
 #include "parser/parser.h"
+#include "utils/stats.h"
+#include "utils/util.h"
+
+#include "sfeventq.h"
 
 typedef struct s_SNORT_EVENTQ_USER
 {
index c196e9f51b3f45a8af2d529727d224775cf1811a..f8f1edd984bb1b0fa1adf4284fb21832f3c12fec 100644 (file)
@@ -20,8 +20,8 @@
 #ifndef EVENT_QUEUE_H
 #define EVENT_QUEUE_H
 
-#include "main/snort_types.h"
 #include "actions/actions.h"
+#include "main/snort_types.h"
 
 #define SNORT_EVENTQ_PRIORITY    1
 #define SNORT_EVENTQ_CONTENT_LEN 2
index 3437fe6ad45aa1af7c15c38c760df4c2418601d1..88d8e9cd05ed200227b6c14f0a80cb1efad93b1c 100644 (file)
  *   an event, but the rule controls the alert/drop functionality.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "event_wrapper.h"
 
-#include "detection/rules.h"
-#include "detection/treenodes.h"
-#include "detection/signature.h"
 #include "detection/fp_detect.h"
-#include "main/snort_types.h"
-#include "main/snort_debug.h"
 #include "parser/parser.h"
-#include "events/event.h"
-#include "detection/detect.h"
-#include "utils/util.h"
 
 /*
  * This function has been updated to find an otn and route the call to fpLogEvent
index e9a1952b979262c86d430789fea6c11b1884adde..97dc80c149ab6b7235c15de47ebf7a13bb19d2e1 100644 (file)
@@ -20,8 +20,7 @@
 #ifndef EVENT_WRAPPER_H
 #define EVENT_WRAPPER_H
 
-#include <stdint.h>
-#include "main/snort_types.h"
+#include <cstdint>
 
 uint32_t GenerateSnortEvent(struct Packet* p, uint32_t gen_id, uint32_t sig_id);
 
index 899c0a7be962f061df82f50307e7a3d3131caccf..664cad44896231298864eda7076b6a414d1ed8bb 100644 (file)
 **       number of events to log.
 */
 
-#include "sfeventq.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <stdlib.h>
+#include "sfeventq.h"
+
 #include "utils/util.h"
 
 /*
index dff9290e0154b8a6dd89bd04856ace48d14cb036..2d5b64db10b95adb96d8873cfc9c9e82b3e246d9 100644 (file)
  **  5.25.13 - Initial Source Code. Hui Cao
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "circular_buffer.h"
 
 #include "utils/util.h"
index 84ee83341cb9127e42f13d61c26fa6dfe2006f0e..8ee455203d3fb4da98272ed71e2c39f51b9943c0 100644 (file)
 //--------------------------------------------------------------------------
 //  file_cache.cc author Hui Cao <huica@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "file_cache.h"
 
+#include "hash/sfxhash.h"
 #include "log/messages.h"
 #include "main/snort_config.h"
 #include "main/snort_debug.h"
index 22146a31defd6b2478d94371fca04bb382ed0ccc..23197f82b52224c82dce50680ef6402eb3ada889 100644 (file)
 
 #include <mutex>
 
-#include "hash/sfxhash.h"
 #include "sfip/sf_ip.h"
 #include "utils/cpp_macros.h"
 
 #include "file_config.h"
 
+struct SFXHASH;
+
 class FileCache
 {
 public:
index 127e353ba6364cdfe6bb6dd54be2ac9a3d6c2273..7cb51eef0956b2eba79e15c376bbefa0cad6d5ee 100644 (file)
  **  5.05.2013 - Initial Source Code. Hui Cao
  */
 
-#include "file_capture.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
+#include "file_capture.h"
+
 #include <sys/stat.h>
-#include <unistd.h>
-#include <string.h>
-#include <fcntl.h>
-#include <sys/types.h>
-#include <sys/stat.h>
 
-#include "hash/hashes.h"
+#include <cassert>
+
 #include "log/messages.h"
-#include "main/snort_config.h"
-#include "utils/util.h"
 #include "utils/stats.h"
+#include "utils/util.h"
 
-#include "file_config.h"
 #include "file_mempool.h"
 #include "file_stats.h"
 
index c023a9325ef2bab5ef4b6202c66d57443082687a..464b3785d91c60b63d0e8161c1ac425da39471f8 100644 (file)
@@ -93,7 +93,7 @@ public:
 
     static FileCaptureState error_capture(FileCaptureState);
 
-    static int64_t get_block_size() { return capture_block_size; };
+    static int64_t get_block_size() { return capture_block_size; }
 
 private:
 
index 74b19e441c1cc67e843bc45f5123a1e6cae14b54..35d2242ffa4628015f9d0a02e67b6303f0c133d7 100644 (file)
 ** 5.25.2012 - Initial Source Code. Hui Cao
 */
 
-#include "file_config.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
+#include "file_config.h"
+
 #include "main/snort_config.h"
 #include "managers/inspector_manager.h"
 #include "parser/parse_utils.h"
index 536cf01829af22836f25e544999398ff16513efd..d043333b7807ed0528438c00144fe2449c9a4fd9 100644 (file)
  **  9.25.2012 - Initial Source Code. Hui Cao
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "file_enforcer.h"
 
 #include "log/messages.h"
index 6c1282470865382b2a540c5ca52e721426a2df2e..96af7f296d6c4b87e7d6020c3c3013ff66b00f19 100644 (file)
  ** 8.15.15 - Initial Source Code. Hui Cao
  */
 
-#include "file_flows.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
+#include "file_flows.h"
+
 #include "managers/inspector_manager.h"
 #include "protocols/packet.h"
 
index c5dc73a7cd65abfd64c5c2fc4d6362a92ddc9574..96fc55d83305df2a8f81fe4240e12991f72e9a46 100644 (file)
 ** 5.25.2012 - Initial Source Code. Hcao
 */
 
-#include "file_identifier.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <assert.h>
+#include "file_identifier.h"
 
 #include <algorithm>
+#include <cassert>
 
 #include "log/messages.h"
 #include "utils/util.h"
index 6472a42d076427460f7902003fca2f0efc6fab7d..af818d356be98d8928d23c5dc94ce90548f93229 100644 (file)
  **  5.25.12 - Initial Source Code. Hcao
  */
 
-#include "file_lib.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
+#include "file_lib.h"
+
+#include <openssl/sha.h>
+
 #include <iostream>
 #include <iomanip>
 
index d4833008058b591654d2c761a55a584d0292a911..a204f073be818eeead69e61195ef2a2dc6f4165e 100644 (file)
  **
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "file_mempool.h"
 
 #include "log/messages.h"
index 3e97c140ce6588a1a1ad01aa589e306cd5dc6f48..f632e4570b6a42dab89a6bce4a20805afa209700 100644 (file)
 ** 5.05.2012 - Initial Source Code. Hui Cao
 */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "file_module.h"
 
 #include "main/snort_config.h"
index 17eafb43c252e0ceac42ae194eacced7b214616f..df9be3df13a1460b21f6520ddfd41fc47ff4f597 100644 (file)
 //
 // author Hui Cao <huica@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "file_policy.h"
 
 #include "hash/hashes.h"
index 8e094f39d85a70ecb17cb546567c8a08cbf20913..cbc61fad5a528373e9ff4f644da4634d72a2cc1f 100644 (file)
 //--------------------------------------------------------------------------
 //  file_segment.cc author Hui Cao <huica@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "file_segment.h"
 
 #include "file_lib.h"
index ae8a02d2b7d504a1f8ea250b1b23dbc491661eb9..ac62f0b840300b7f14bfc60ee6a9177618ccf3c9 100644 (file)
  ** 5.25.12 - Initial Source Code. Hui Cao
  */
 
-#include "file_service.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
+#include "file_service.h"
+
 #include "main/snort_config.h"
 #include "mime/file_mime_process.h"
 
index 747840061e1d9dbed2530ccd7f7d18a3bc4f24ce..3b173cdc7692e83487e1a1fb394196881a4adcab 100644 (file)
  **  5.25.13 - Initial Source Code. Hui Cao
  */
 
-#include "file_stats.h"
-
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
 
+#include "file_stats.h"
+
 #include "log/messages.h"
 #include "utils/stats.h"
 #include "utils/util.h"
index fb6cf216d26109b5f48ad4b5299c2f56af93ce18..2ebe27c1f6be1d2d8b8c98b75559fffe3405eda5 100644 (file)
@@ -1,8 +1,4 @@
 
-set (FILTER_INCLUDES
-    sfrf.h 
-)
-
 if ( ENABLE_UNIT_TESTS )
     set(TEST_FILES
         sfrf_test.cc
@@ -18,13 +14,9 @@ add_library (filter STATIC
     sfthreshold.cc
     sfthreshold.h
     sfrf.cc
+    sfrf.h
     sfthd.cc
     sfthd.h
-    ${FILTER_INCLUDES}
     ${TEST_FILES}
 )
 
-install(FILES ${FILTER_INCLUDES}
-    DESTINATION "${INCLUDE_INSTALL_PATH}/filters"
-)
-
index e42ecc7dd9d3c7887bc00f27186b7a69ed7067f4..0bc84e3c4ab7511eceb1e63d169e946b150c8076 100644 (file)
@@ -1,11 +1,6 @@
 
 noinst_LIBRARIES = libfilter.a
 
-x_includedir = $(pkgincludedir)/filters
-
-x_include_HEADERS = \
-sfrf.h
-
 libfilter_a_SOURCES = \
 detection_filter.cc \
 detection_filter.h \
@@ -13,6 +8,7 @@ rate_filter.cc \
 rate_filter.h \
 sfthreshold.cc \
 sfthreshold.h \
+sfrf.h \
 sfrf.cc \
 sfthd.cc \
 sfthd.h
index 6c5e6201306c237c78be92670ac5ea62d902bc88..9c59fb137cf1639d2f20d3726f9982e0c5f2ddaf 100644 (file)
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "detection_filter.h"
 
 #include "hash/sfxhash.h"
index bfd3c7fdf9351c645bb3b135d5fb80e3dc0f112c..d665f4743a34716f5cbc226f1093ddf58bda5a8a 100644 (file)
 //--------------------------------------------------------------------------
 
 // rate_filter.cc author Dilbagh Chahal <dchahal@sourcefire.com>
-
-#include "rate_filter.h"
-
 // rate filter interface for Snort
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
+#include "rate_filter.h"
+
 #include "detection/rules.h"
 #include "detection/treenodes.h"
 #include "main/snort_config.h"
index 97173485c2c48878b927eaddc6e17868bc1987fd..97862ebd6c1b712f37b0dd8dd79260314ecc5c8b 100644 (file)
 // sfrf.cc author Dilbagh Chahal <dchahal@sourcefire.com>
 // rate filter implementation for Snort
 
-#include "sfrf.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
+#include "sfrf.h"
+
 #include "detection/rules.h"
 #include "hash/sfghash.h"
 #include "hash/sfxhash.h"
index 3ed772d73ea0eec61b5bdc46d4b748b357d6d156..d92f2122d7e178ea12139b0a2c34ac18a30ef51d 100644 (file)
  * Boris Lytochkin found it.
  */
 
-#include "sfthd.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
+#include "sfthd.h"
+
+#include <cassert>
+
 #include "hash/sfghash.h"
 #include "hash/sfxhash.h"
 #include "sfip/sf_ipvar.h"
index 2b117af5bbaa157dcb9e424671e412b630aed39e..c2ed037e2a15bdd7dab01a7fdd2ee8c01292990d 100644 (file)
 #ifndef SFTHD_H
 #define SFTHD_H
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #include "main/policy.h"
 #include "sfip/sf_ip.h"
 #include "utils/cpp_macros.h"
index 1de5d0457cc0e72aea95e97fa8294a844f84d5df..a9e4a11e5803b33f400968fd7b64e1820d2517c9 100644 (file)
 //--------------------------------------------------------------------------
 // sfthd_test.cc author Russ Combs <rcombs@sourcefire.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "catch/catch.hpp"
 #include "catch/unit_test.h"
 #include "hash/sfxhash.h"
index b3f691c777821f289892dbaf816b0961443f1a84..cc9e41c8ba04be3e65efb9bdb4ac57a1e239e090 100644 (file)
    2003-11-3:
      man: cleaned up and added more startup printout.
 */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "sfthreshold.h"
 
 #include "hash/sfxhash.h"
index a1b12a0e3eab2020f1d70417b709302c85e43bdd..ef9359595b3c86a471848667069e8c2b1eeb7c01 100644 (file)
@@ -1,6 +1,5 @@
 set (FLOW_INCLUDES
     flow.h
-    flow_config.h
     flow_key.h
     ha.h
     ha_module.h
@@ -13,6 +12,7 @@ add_library (flow STATIC
     flow.cc
     flow_cache.cc
     flow_cache.h
+    flow_config.h
     flow_control.cc
     flow_control.h
     flow_key.cc
index fac496ce5d2ae5b624b1767ab04a91dab60ba69e..4bb438c1860344e06fe8df45b0f54a8cf9a2829d 100644 (file)
@@ -4,16 +4,14 @@ x_includedir = $(pkgincludedir)/flow
 
 x_include_HEADERS = \
 flow.h \
-flow_config.h \
-flow_key.h \
-ha.h \
-ha_module.h
+flow_key.h
 
 libflow_a_SOURCES = \
 expect_cache.cc expect_cache.h \
 flow.cc \
 flow_key.cc \
 flow_cache.cc flow_cache.h \
+flow_config.h \
 flow_control.cc flow_control.h \
 ha.cc ha.h \
 ha_module.cc ha_module.h \
index 35177973bb813ecbdc4ace5232126445afbd2a09..34652441580eb331ddbd45e477971bcf77a36f47 100644 (file)
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
-#include "expect_cache.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <assert.h>
+#include "expect_cache.h"
 
 #include "hash/zhash.h"
 #include "packet_io/sfdaq.h"
index f9c2f66e4950dd2229e5b0edae2d3ac6b45f8777..bca7c411dbd0d0f3bc071ce4d9043cac4c6347e2 100644 (file)
 //    a la FlowCache)
 //-------------------------------------------------------------------------
 
-#include "flow/flow.h"
+#include "flow/flow_key.h"
 
+class Flow;
+class FlowData;
 struct Packet;
 struct ExpectFlow;
 struct ExpectNode;
index 9a300ce804c38eb29469222f84141df274ccb6a6..aa3d4b635fc4692d22526800e4dcb14ed37245b4 100644 (file)
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
-#include "flow.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
+#include "flow.h"
+
 #include "flow/ha.h"
 #include "flow/session.h"
 #include "ips_options/ips_flowbits.h"
index 911c010d440ddb309f3abb27d5887c5e810ccb19..1fe7d05d63fab13934d60346d184e7722b96b040 100644 (file)
 // state.  Inspector state is stored in FlowData, and Flow manages a list
 // of FlowData items.
 
-#include <assert.h>
-
-#include "flow/flow_key.h"
+#include "framework/decode_data.h"
 #include "framework/inspector.h"
-#include "framework/codec.h"
+#include "protocols/layer.h"
 #include "sfip/sf_ip.h"
 
 #define SSNFLAG_SEEN_CLIENT         0x00000001
@@ -96,6 +94,7 @@ enum AppProtoIdIndex
     APP_PROTOID_MAX
 };
 
+struct FlowKey;
 struct Packet;
 
 typedef void (* StreamAppDataFree)(void*);
index 4a636627ac6fc377cbb5fc7fdba330bd7d8f83a8..758e02c609a8f4f71b780b976e83dad3b7ef51f8 100644 (file)
 //--------------------------------------------------------------------------
 // flow_cache.cc author Russ Combs <rucombs@cisco.com>
 
-#include "flow/flow_cache.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
+#include "flow/flow_cache.h"
+
 #include "flow/ha.h"
 #include "hash/zhash.h"
 #include "helpers/flag_context.h"
@@ -33,6 +33,8 @@
 #include "time/packet_time.h"
 #include "utils/stats.h"
 
+#include "flow_key.h"
+
 #define SESSION_CACHE_FLAG_PURGING  0x01
 
 //-------------------------------------------------------------------------
index 4d11913dce633f291b150713a24fe28748ff3bf2..8fe73fe687cda23ccd889d2dc0b393b8903fdc3d 100644 (file)
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
-#include "flow_control.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <cassert>
+#include "flow_control.h"
 
 #include "detection/detect.h"
+#include "main/snort_config.h"
+#include "main/snort_debug.h"
 #include "managers/inspector_manager.h"
 #include "memory/memory_cap.h"
 #include "packet_io/active.h"
 #include "protocols/icmp4.h"
-#include "protocols/icmp6.h"
 #include "protocols/tcp.h"
 #include "protocols/udp.h"
 #include "protocols/vlan.h"
-#include "sfip/sf_ip.h"
 #include "stream/stream.h"
 #include "utils/util.h"
 
 #include "expect_cache.h"
 #include "flow_cache.h"
-#include "flow_config.h"
 #include "session.h"
 
 FlowControl::FlowControl()
index 266ee07b071768e35c7f7d053d2cce6026505293..14967f3177812cb94053def9980138874bb24924 100644 (file)
 //--------------------------------------------------------------------------
 // flow_key.cc author Steven Sturges <ssturges@sourcefire.com>
 
-#include "flow/flow_key.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
+#include "flow/flow_key.h"
+
 #include "hash/sfhashfcn.h"
 #include "main/snort_config.h"
 #include "protocols/icmp4.h"
index 0e30cb114f2206b715d4272119f1ecf61179edf2..b8986bbfced889e4bd736e069a0c9f9bb3c3e24a 100644 (file)
@@ -23,7 +23,7 @@
 // FlowKey is used to store Flows in the caches.  the data members are
 // sequenced to avoid void space.
 
-#include <stdint.h>
+#include <cstdint>
 
 #include "framework/decode_data.h"
 #include "utils/cpp_macros.h"
index de5d91a1499e7c1bf2c71f94406c08516040c1f1..69c6bf75103676f8312a70c1b89334a2921d19db 100644 (file)
 //--------------------------------------------------------------------------
 // ha.cc author Ed Borgoyn <eborgoyn@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "ha.h"
 
-#include <assert.h>
-#include <functional>
 #include <array>
 
-#include "flow.h"
-#include "flow_key.h"
-#include "ha_module.h"
+#include "framework/counts.h"
 #include "log/messages.h"
 #include "main/snort_debug.h"
-#include "packet_io/sfdaq.h"
-#include "profiler/profiler.h"
-#include "side_channel/side_channel.h"
+#include "profiler/profiler_defs.h"
 #include "stream/stream.h"
 #include "time/packet_time.h"
 
+#include "flow.h"
+#include "flow_key.h"
+
 static const uint8_t HA_MESSAGE_VERSION = 3;
 
 // define message size and content constants.
index 589a164c0db1042f9c8d4909354a9cf57b9bb5f3..8156a6d075a5aa2a3cb57c8ed108a5fb9c1d0aaa 100644 (file)
 #ifndef HA_H
 #define HA_H
 
-#include "flow/flow_key.h"
-#include "main/snort_types.h"
-#include "packet_io/sfdaq.h"
+#include <daq_common.h>
+
 #include "side_channel/side_channel.h"
 
 //-------------------------------------------------------------------------
 
 class Flow;
+struct FlowKey;
 
 // The FlowHAHandle is the dynamically allocated index used uniquely identify
 //   the client.  Used both in the API and HA messages.
index b3e95257b6cf8cc0cdf3a21f23bcc4d4c4b92a4c..2c7ddb1967f4f040e482577e729146df8c676c38 100644 (file)
 
 // ha_module.cc author Ed Borgoyn <eborgoyn@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "ha_module.h"
 
 #include <cmath>
 
-#include "ha.h"
 #include "log/messages.h"
-#include "main/snort_debug.h"
-#include "main/thread.h"
+
+#include "ha.h"
 
 static const PegInfo ha_pegs[] =
 {
index ed26add2f0f51e7c78c92d0f01f5964cdd06fb45..237a04438442e9e2f5411d3eef5842f76b8a9d8d 100644 (file)
 #ifndef HA_MODULE_H
 #define HA_MODULE_H
 
-#include "main/thread.h"
+#include <sys/time.h>
+
 #include "framework/module.h"
+#include "main/thread.h"
 
 #define HA_NAME "high_availability"
 #define HA_HELP "implement flow tracking high availability"
index 684f07ec9f3e40130db1d3d83b309ce9dc407105..f00ffa9972ad483fe9f7fae49afcede28c4a70db 100644 (file)
 // ha_module_test.cc author Ed Borgoyn <eborgoyn@cisco.com>
 // unit test main
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "flow/ha.h"
 #include "flow/ha_module.h"
 
index 71894ec9615bd582a43c3cb9c929b113cef4af73..163807ddaaa1608bd03ee867e82ceded53bc1e68 100644 (file)
 // ha_test.cc author Ed Borgoyn <eborgoyn@cisco.com>
 // unit test main
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "flow/ha.h"
 
 #include "flow/flow.h"
+#include "flow/flow_key.h"
 #include "main/snort_debug.h"
 #include "stream/stream.h"
 
index edf0b3ddfb24ba0db323d4b859a56b825c46f37a..0de3386af43e1d6198280f53cdbb585b04b106fc 100644 (file)
 // usage fields, it provides module instantiation and release functions, as
 // well as additional data to help detect mismatched builds etc.
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "main/snort_types.h"
+#include <cstdint>
 
 // this is the current version of the base api
 // must be prefixed to subtype version
index 5931c46464f76685137a9342cea64751e4275628..9862d46ff3344189454ab8eebc8fe6570d1783bd 100644 (file)
 //--------------------------------------------------------------------------
 // codec.h author Josh Rosenbaum <jrosenba@cisco.com>
 
-#include "framework/codec.h"
-#include "events/event_queue.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "codec.h"
+
 #include "codecs/codec_module.h"
-#include "protocols/ipv6.h"
+#include "events/event_queue.h"
 
 EncState::EncState(const ip::IpApi& api, EncodeFlags f, IpProtocol pr,
     uint8_t t, uint16_t data_size) :
index b0d2feb0408bb0024245fcddfdd83048064d1663..fd138871de03d2ffd4f61038fc1c040e78071fcc 100644 (file)
 // Codec is a type of plugin that provides protocol-specific encoding and
 // decoding.
 
-#include <vector>
 #include <cstdint>
-#include <cstddef>
-#include <type_traits> // static_assert
+#include <vector>
 
-#include "main/snort_types.h"
 #include "framework/base_api.h"
-
-// unfortunately necessary due to use of Ipapi in struct
-#include "protocols/protocol_ids.h"
-#include "protocols/ip.h"
-#include "protocols/layer.h"
 #include "framework/decode_data.h"
 
 struct TextLog;
index d72399ff0d8b7223a627469d33d9631ef0941244..a8535a31247f50079824ad12d7b63b20337d3e4e 100644 (file)
 // Connector provides out-of-band communications among packet processing
 // threads, high-availability partners, and other threads.
 
-#include <vector>
 #include <string>
+#include <vector>
 
-#include "main/snort_types.h"
 #include "framework/base_api.h"
+#include "main/snort_types.h"
 
 // this is the current version of the api
 #define CONNECTOR_API_VERSION ((BASE_API_VERSION << 16) | 0)
index f3f4269f08c05175b4b973876afb77e9d137a732..e7a839592f2b7c6c4c3fc40824ff6cbae53bdab7 100644 (file)
 //--------------------------------------------------------------------------
 // cursor.cc author Russ Combs <rucombs@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "cursor.h"
+
 #include "detection/detection_util.h"
-#include "framework/inspector.h"
-#include "flow/flow.h"
 #include "protocols/packet.h"
 
 Cursor::Cursor(Packet* p)
index 9cd9e1ad41ef385c99a2174f983e3159b8b52f37..8b5c7de59734dbe21cab89a46b691c62462f003e 100644 (file)
@@ -25,9 +25,8 @@
 // Cursor provides a formal way of using buffers when doing detection with
 // IpsOptions.
 
-#include <ctype.h>
-#include <stdint.h>
-#include <string.h>
+#include <cstdint>
+#include <cstring>
 
 struct Packet;
 
index ce3e0a97c4e03a3c4e2197bd900fa263922e1a1d..1b7c44849be00cc885106b070085b5f4943cbcf3 100644 (file)
 //--------------------------------------------------------------------------
 // data_bus.cc author Russ Combs <rucombs@cisco.com>
 
-#include "framework/data_bus.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "data_bus.h"
+
 #include "main/policy.h"
 #include "protocols/packet.h"
 
index d22680e72457d2af4cf89349db6d728ba63787e2..c06cf916f51615f67497352c68ab9c115976961b 100644 (file)
 #include <string>
 #include <vector>
 
+#include "main/snort_types.h"
+
 // FIXIT-P evaluate perf; focus is on correctness
 typedef std::vector<class DataHandler*> DataList;
 typedef std::map<std::string, DataList> DataMap;
 
-#include "main/snort_types.h"
-
 class Flow;
 struct Packet;
 
index ab8f0b332b16799559cf136afe07f97d7c679459..ac261a5ab68338019c60769abe4ac9a981ebef77 100644 (file)
 
 // Captures decode information from Codecs.
 
-#include <cstdint>
-#include <type_traits>
-
-#include "protocols/mpls.h"
 #include "protocols/ip.h"
+#include "protocols/mpls.h"
 
 namespace tcp
 {
index 647a8a58320539154924945f282a5fe9dcea2117..b3f899e9c8c857d36907e7e0907e0a6ee7447f01 100644 (file)
 //--------------------------------------------------------------------------
 // inspector.cc author Russ Combs <rucombs@cisco.com>
 
-#include "inspector.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <assert.h>
-#include <string.h>
+#include "inspector.h"
 
 #include "main/thread_config.h"
 #include "protocols/packet.h"
index 58086c61a10061d7aff7b139d612af540271f635..85fd1cf32ae627369bbb59b93dd7bbe5c571ce6b 100644 (file)
@@ -24,9 +24,8 @@
 // decoding a packet and detection.  There are several types that operate
 // in different ways.  These correspond to Snort 2X preprocessors.
 
-#include "main/snort_types.h"
-#include "main/thread.h"
 #include "framework/base_api.h"
+#include "main/thread.h"
 
 struct Packet;
 struct SnortConfig;
index 4027672a6d880752caea3d687a1b4dda34ec1c07..4b12d87d5a394581caa8d43a72787a94663176df 100644 (file)
@@ -25,9 +25,9 @@
 // These can be used to execute external controls like updating an external
 // firewall.
 
-#include "main/snort_types.h"
-#include "framework/base_api.h"
 #include "actions/actions.h"
+#include "framework/base_api.h"
+#include "main/snort_types.h"
 
 struct Packet;
 
index 599cce7d50686b3ea2641b3bdeed05176ccc40ed..15bc4e1eeca79cb8a01484cca99433ee2e72ab3d 100644 (file)
 //--------------------------------------------------------------------------
 // ips_option.cc author Russ Combs <rucombs@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "ips_option.h"
 
-#include <sys/types.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
-#include <errno.h>
+#include <cstring>
 
-#include "main/snort_types.h"
-#include "main/snort_debug.h"
 #include "hash/sfhashfcn.h"
 
 static const char* s_buffer = nullptr;
index ed51f1cba2f638b64da5a463dfed518842ad4dba..89693c722f33b1ce336d9fe943f3fd1eda79f0a6 100644 (file)
@@ -23,9 +23,9 @@
 // All IPS rule keywords are realized as IpsOptions instantiated when rules
 // are parsed.
 
-#include "main/snort_types.h"
-#include "framework/base_api.h"
 #include "detection/rule_option_types.h"
+#include "framework/base_api.h"
+#include "main/snort_types.h"
 
 struct Packet;
 
index 94a2823b1a1a71f61902cd3189568e2590aa79e5..6da9c4ad9a61c96bad52a5101b814925025dec75 100644 (file)
 // they reach the Logger.  Packets may be logged along with events or as a
 // result of tagging.
 
-#include "main/snort_types.h"
-#include "events/event.h"
 #include "framework/base_api.h"
+#include "main/snort_types.h"
 
+struct Event;
 struct Packet;
 
 // this is the current version of the api
index 541e39fe0718cc485b781e4e3aff862cb0a53554..5de8b79dbde619c411974bfd2512fc87edd2f268 100644 (file)
@@ -24,7 +24,7 @@
 
 #include <string>
 
-#include "framework/base_api.h"
+struct BaseApi;
 
 class LuaApi
 {
index ed142f4c5a027563cdc0dca280e27ec9aae51203..cf237e69c602c00b7b5e2dc59b792e3c439ecc26 100644 (file)
 //--------------------------------------------------------------------------
 // module.cc author Russ Combs <rucombs@cisco.com>
 
-#include "module.h"
-#include "parameter.h"
-#include "utils/stats.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
+#include "module.h"
 
 static const Parameter defaults[] =
 {
index 2946ec231a435f93a97b17d5b97a6511e58bad20..341cd0eeefbd30d7d692e6c78f50b1111820f743 100644 (file)
 #include <string>
 #include <vector>
 
-#include "main/snort_debug.h"
-#include "main/snort_types.h"
-#include "framework/value.h"
-#include "framework/parameter.h"
 #include "framework/counts.h"
+#include "framework/parameter.h"
+#include "framework/value.h"
 #include "main/snort_debug.h"
+#include "main/snort_types.h"
 #include "utils/stats.h"
 
 using LuaCFunction = int(*)(struct lua_State*);
index 356f1f2ed2a95463b62dd5168250135f29ac3aa7..fad37f09af5095775ff1a814f3880019c38a42a5 100644 (file)
 //--------------------------------------------------------------------------
 // mpse.cc author Russ Combs <rucombs@cisco.com>
 
-#include "mpse.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include "main/snort_debug.h"
-#include "main/snort_types.h"
-#include "profiler/profiler.h"
+#include "mpse.h"
+
+#include "profiler/profiler_defs.h"
 
 using namespace std;
 
index 9e7e14bb347c3dedecfd93f5fa56b50438d04d06..d86cfc057d9a62dbe40896dba0b9502a77df1017 100644 (file)
 
 #include <string>
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
+#include "framework/base_api.h"
 #include "main/snort_types.h"
 #include "main/thread.h"
-#include "framework/base_api.h"
 #include "search_engines/search_common.h"
 
 // this is the current version of the api
index 7122c3374852f96f54681906edfea4417e19a313..696e5fd6cf0ea4a96639a6e6d666743421c57b92 100644 (file)
 //--------------------------------------------------------------------------
 // parameter.cc author Russ Combs <rucombs@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "parameter.h"
 
-#include <assert.h>
-#include <string.h>
-#include <stdlib.h>
+#include <cassert>
 
-#include <string>
 #include <iomanip>
 #include <sstream>
 #include <vector>
 
-#include "value.h"
 #include "utils/dnet_header.h"
 
+#include "value.h"
+
 using namespace std;
 
 static bool valid_bool(Value& v, const char*)
index f29a0da01f73941291bd83b2fa1fd1dcf55d1518..fa0c39c9bfc9731447c6f43de8d662b5dcd17273 100644 (file)
 //--------------------------------------------------------------------------
 // range.cc author Russ Combs <rucombs@cisco.com>
 
-#include "framework/range.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <errno.h>
-#include <stdlib.h>
-#include <string.h>
+#include "framework/range.h"
 
+#include <cerrno>
+#include <cstdlib>
+#include <cstring>
 #include <string>
 
 #ifdef UNIT_TEST
index 79aa5ed3eb2bc5901568717399bd6da41aba238e..640d8506daf855eeb157093e69306e5df3474169 100644 (file)
@@ -25,9 +25,8 @@
 // like a text rule except that it can call function hooks. It can also
 // define its own rule options and any other plugins it may need.
 
-#include "main/snort_types.h"
 #include "framework/base_api.h"
-#include "framework/ips_option.h"
+#include "main/snort_types.h"
 
 struct Packet;
 
index aff043e21d407399c784ba646f804323424fd091..5f9276fab6500c63f3656be0bbb342ae7bf7100c 100644 (file)
 //--------------------------------------------------------------------------
 // value.cc author Russ Combs <rucombs@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "value.h"
 
-#include <assert.h>
-#include <iostream>
-#include <sstream>
-#include <string>
+#include <cassert>
 
-#include "sfip/sf_ip.h"
+#include "sfip/sf_cidr.h"
 
 #ifdef UNIT_TEST
 #include "catch/catch.hpp"
index afcc2c4608159cc81f7e4b99ba8bd0df0d996e0d..b76079662f5dfa80a9376c294488b37e4e275dee 100644 (file)
 
 // Value is used to represent Lua bool, number, and string.
 
-#include <string.h>
-
 #include <algorithm>
-#include <string>
+#include <cstring>
 
-#include "main/snort_types.h"
 #include "framework/bits.h"
 #include "framework/parameter.h"
-#include "sfip/sf_cidr.h"
+#include "main/snort_types.h"
 
+struct SfCidr;
 struct SfIp;
 
 class SO_PUBLIC Value
index 961a0d3da7ff36a478278370b58090fbb1bcd5d0..07a2b5de6a4d3e6b589ac82fde66b1c6afa62856 100644 (file)
@@ -1,7 +1,6 @@
 
 set (HASH_INCLUDES
     hashes.h
-    lru_cache_shared.h
     sfghash.h 
     sfxhash.h 
     sfhashfcn.h 
index 653dd6ec304d93a7c5e23095f61ab7453098220e..cfb5f616b274a39dc685236ecd23d1b52691bad3 100644 (file)
@@ -5,7 +5,6 @@ x_includedir = $(pkgincludedir)/hash
 
 x_include_HEADERS = \
 hashes.h \
-lru_cache_shared.h \
 sfghash.h \
 sfxhash.h \
 sfhashfcn.h
@@ -13,6 +12,7 @@ sfhashfcn.h
 libhash_a_SOURCES = \
 hashes.cc \
 lru_cache_shared.cc \
+lru_cache_shared.h \
 sfghash.cc \
 sfhashfcn.cc \
 sfprimetable.cc sfprimetable.h \
index 422c75b77b0bb0b63686b37dcb30df98202ad104..ac3358ef6c2f6b0d4412ffe383166e794976a04b 100644 (file)
 //--------------------------------------------------------------------------
 // hashes.h author Russ Combs <rucombs@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "hashes.h"
 
+#include <openssl/md5.h>
+#include <openssl/sha.h>
+
 void sha256(const unsigned char* data, size_t size, unsigned char* digest)
 {
     SHA256_CTX c;
index d2c1a17187cf64f1f4ecc6a54bb2995a91e8be9a..e45c4e2b512c289cb2c6850265e50b28eea31350 100644 (file)
 #ifndef HASHES_H
 #define HASHES_H
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <openssl/md5.h>
-#include <openssl/sha.h>
-#include <stdlib.h>
-
 #include "main/snort_types.h"
 
 #define MD5_HASH_SIZE    16
index c1031e42c9512c559ad7ebe11ee594ee574923dc..fb22fb025edadf71b2881165e1a88995c3d9a413 100644 (file)
 
 // lru_cache_shared.cc author Steve Chew <stechew@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "hash/lru_cache_shared.h"
 
 const PegInfo lru_cache_shared_peg_names[] =
index 850e434e1c23feaf1f442112090da0ec8a46bdb5..c84336d23ac78b84ad3f7c4936c29af6f0e8701a 100644 (file)
 * Author: Marc Norton
 *
 */
-#include "sfghash.h"
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
-#include <assert.h>
+#include "sfghash.h"
+
+#include <cassert>
 
 #include "utils/util.h"
+
 #include "sfhashfcn.h"
 #include "sfprimetable.h"
 
index ada6b3f70ca16c5261df97288f1f4fa4f54eb31e..0f9fa10da1239013e042bda10485e81ee4c0aed2 100644 (file)
 
 // generic hash table - stores and maps key + data pairs
 
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
-
 #include "main/snort_types.h"
 
 struct SFHASHFCN;
index a1958ad2dc237d3038fd8916e112f71798e060a5..f9042d94862d04765d7381f68102237506e661bd 100644 (file)
      8/31/2006 - man - changed to use sfprimetable.c
 */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "sfhashfcn.h"
 
-#include "main/snort_types.h"
 #include "main/snort_config.h"
 #include "utils/util.h"
 
index cd6287d66a74b81842f5603197dce80ec1933d18..dbfb7c43827e9033c25b665402c1350bee04bfdc 100644 (file)
 #ifndef SFHASHFCN_H
 #define SFHASHFCN_H
 
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
-#include <time.h>
-
 #include "main/snort_types.h"
 
 #define rot(x,k) (((x)<<(k)) | ((x)>>(32-(k))))
index 1528d84fa93f9ac15ef7b34de9b041d26f20f9b1..f6430494d9314025d250b937779ec119389a3389 100644 (file)
 * in sfghash, and sfxhash.
 *
 */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "sfprimetable.h"
 
 /* 0-8K, increments=8 */
index 14095f3c9390e1be8741e00d4466015669a8b001..c88f2a8db9d89788bc7ebe410da72d5a2cab14c7 100644 (file)
 #include "config.h"
 #endif
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
+#include "sfxhash.h"
 
-#include "main/snort_types.h"
-#include "main/snort_debug.h"
 #include "utils/util.h"
 
-#include "sfxhash.h"
-#include "sfprimetable.h"
 #include "sfhashfcn.h"
 
 /*
index 7abfe8cf08b03e31d09e168cccd63d45c99779b4..f4b683b93db10e5507683a6bc79fa4bf5e3d9228 100644 (file)
 // generic hash table - stores and maps key + data pairs
 // (supports memcap and automatic memory recovery when out of memory)
 
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
-
 #include "utils/sfmemcap.h"
 #include "main/snort_types.h"
 
index a3c08c208e132f8407367b8c059b99934d9037a5..3c73e7047b84811c140ce5a4d53b1e6a30d77f49 100644 (file)
 // lru_cache_shared_test.cc author Steve Chew <stechew@cisco.com>
 // unit tests for LruCacheShared class
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "hash/lru_cache_shared.h"
 
 #include <CppUTest/CommandLineTestRunner.h>
index 61d54a1007b275aba89b53a808c1ca0dfaf255dc..16e6784ed3daa6d79cab323cd0cd042aa6c06da0 100644 (file)
 
 // zhash is based on sfxhash - see sfxhash.cc for details
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "zhash.h"
 
-#include <assert.h>
-#include <stdlib.h>
+#include <cstring>
 
 #include "sfhashfcn.h"
-#include "utils/util.h"
 
 //-------------------------------------------------------------------------
 // private stuff
index e37b69d1934ec4608f17380c4d2a637c040838d6..7e398a8751dccf9b851c261984221772e26c5ee3 100644 (file)
 //--------------------------------------------------------------------------
 // chunk.cc author Russ Combs <rucombs@cisco.com>
 
-#include "chunk.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <lua.hpp>
+#include "chunk.h"
 
-#include "managers/ips_manager.h"
-#include "hash/sfhashfcn.h"
 #include "log/messages.h"
-#include "framework/cursor.h"
-#include "profiler/profiler.h"
 #include "lua/lua.h"
 
 #ifdef UNIT_TEST
index 17e3e0508acc425d9cb731f3cfe7fc1a1a578f67..3e2cdae1b1137641290d2031f837e6254489aefe 100644 (file)
 //--------------------------------------------------------------------------
 // directory.cc author Russ Combs <rucombs@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "directory.h"
 
-#include <dirent.h>
 #include <fnmatch.h>
 #include <limits.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
 #include <sys/stat.h>
 
-#include <iostream>
-#include <string>
-using namespace std;
+#include <cerrno>
+#include <cstring>
 
 Directory::Directory(const char* s, const char* f)
 {
index 160fec35fc25b7db09687a249b0957fbbd9f4dbf..ead186128244cd29cfeb08156273925de9be487d 100644 (file)
 //--------------------------------------------------------------------------
 // markup.cc author Russ Combs <rucombs@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "markup.h"
-#include <string.h>
+
+#include <cstring>
 
 using namespace std;
 
index 10b1153397948b4575bf06a7d9581754452c6216..6ae085c5b09a2e3ec42d3a5d0fc13142d01fae5a 100644 (file)
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
-#include "process.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <fcntl.h>
-#include <stdio.h>
-#include <sys/wait.h>
-#include <unistd.h>
+#include "process.h"
 
-#ifdef HAVE_MALLINFO
-#include <malloc.h>
-#endif
+#include <fcntl.h>
 
-#ifdef HAVE_MALLOC_TRIM
+#if defined(HAVE_MALLINFO) || defined(HAVE_MALLOC_TRIM)
 #include <malloc.h>
 #endif
 
+#include <csignal>
 #include <iostream>
 
 #include "log/messages.h"
 #include "main.h"
-#include "main/thread.h"
 #include "main/snort.h"
 #include "main/snort_config.h"
-#include "utils/util.h"
 #include "utils/stats.h"
-#include "helpers/markup.h"
-#include "helpers/ring.h"
-#include "parser/parser.h"
+#include "utils/util.h"
+
+#include "markup.h"
+#include "ring.h"
 
 using namespace std;
 
index 3aa3417d263b5eee8d6396c18c4e0454c88c4e98..3a614a168a1f2767ef4e2a73e7ab7259adbe17b5 100644 (file)
@@ -21,9 +21,6 @@
 
 // process oriented services like signal handling, heap info, etc.
 
-#include <signal.h>
-#include <stdint.h>
-
 enum PigSignal
 {
     PIG_SIG_NONE,
index ff3c7178d2c23b591dcc4bc8563e1bdb7257045f..192554fceb2991be208ad48d77736b090c484edf 100644 (file)
 
 // host_cache.cc author Steve Chew <stechew@cisco.com>
 
-#include "host_tracker/host_cache.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include "main/snort_config.h"
-#include "target_based/snort_protocols.h"
-#include <memory>
+#include "host_cache.h"
 
 #define LRU_CACHE_INITIAL_SIZE 65535
 
index b59d17298f110ca2f4fb1a0e6cd712b5b524b6e0..9ea80c8e9cd03984af346724aae7864c60c8d25d 100644 (file)
 // The host cache is used to cache information about hosts so that it can
 // be shared among threads.
 
-#include <functional>
-#include "host_tracker/host_tracker.h"
-#include "hash/lru_cache_shared.h"
-#include "main/snort_types.h"
+#include <memory>
 
+#include "hash/lru_cache_shared.h"
+#include "host_tracker/host_tracker.h"
 
 struct HostIpKey
 {
index e5b841c36090147c27118cb7eaefd2b4592741bb..0bbcf244b962748486c4b7a79a36fb4bea9d12d6 100644 (file)
 
 // host_cache_module.cc author Steve Chew <stechew@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "host_cache_module.h"
 
 #include "host_cache.h"
index ed7f5656de82f224af11c598743f6881eb6d95c2..a4969e238827d936797268b0c13d704a588c66f7 100644 (file)
@@ -24,7 +24,6 @@
 //  Loads host cache configuration data.
 
 #include "framework/module.h"
-#include <assert.h>
 
 #define host_cache_help \
     "configure hosts"
index 862fb0cd71092c24fba21593cb7758bb420bcda8..2f01e21725dfabb885008fb0ba0f10829c483e65 100644 (file)
 
 // host_tracker.cc author Steve Chew <stechew@cisco.com>
 
-#include "host_tracker/host_tracker.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "host_tracker.h"
 
 THREAD_LOCAL struct HostTrackerStats host_tracker_stats;
 
index 3316a8fdb2b41471995be905439cd0151e75f649..c4ccfbfc26379774a4b13b1e32ea1949f7bd8522 100644 (file)
 // configuration or dynamic discovery).  It provides a thread-safe API to
 // set/get the host data.
 
-#include <mutex>
-#include <memory>
+#include <algorithm>
 #include <cstring>
 #include <list>
-#include <algorithm>
+#include <mutex>
 
-#include "sfip/sf_ip.h"
 #include "framework/counts.h"
 #include "main/thread.h"
+#include "sfip/sf_ip.h"
 
 //  FIXIT-M For now this emulates the Snort++ attribute table.
 //  Need to add in sfrnaincludes/host_tracker.h data eventually.
index 61722e1b460a9b7b392b910b46e3b2769de9c205..95dc6d7752e438c70102ad7dedcb21f9671de57f 100644 (file)
 
 // host_tracker_module.cc author Steve Chew <stechew@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "host_tracker_module.h"
 
 #include "main/snort_config.h"
 #include "stream/stream.h"
 #include "target_based/snort_protocols.h"
+
 #include "host_cache.h"
 
 const PegInfo host_tracker_pegs[] =
index e498250a82f9723a8e7fdfd0899044cfcaed7e94..711fb25fb086d42a96cb1289494387922fd12e7e 100644 (file)
 // HostTracker object.  May eventually replace old Hosts module with this
 // one.
 
+#include <cassert>
+
 #include "framework/module.h"
 #include "host_tracker/host_tracker.h"
-#include <assert.h>
 
 #define host_tracker_help \
     "configure hosts"
index 389b56eec12d5a9fad096b200efefbdaee5fbac5..9f3e71f7b0efd0c5692146169d165dbb08fab29a 100644 (file)
 // host_cache_module_test.cc author Steve Chew <stechew@cisco.com>
 // unit tests for the host module APIs
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "host_tracker/host_cache_module.h"
 #include "host_tracker/host_cache.h"
 
index 44b1778bbd9c70f3541f4892ca9bd048bd50e264..78df94d16a61b7cdc501074f6197f8db6ad05315 100644 (file)
 // host_cache_test.cc author Steve Chew <stechew@cisco.com>
 // unit tests for the host cache APIs
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "host_tracker/host_cache.h"
 
 #include <CppUTest/CommandLineTestRunner.h>
index b3622448c19b7c5229f2d528a80da7893051c2b6..52f4074d960515937c2f7f2c17cd798fed75a861 100644 (file)
 // host_tracker_module_test.cc author Steve Chew <stechew@cisco.com>
 // unit tests for the host module APIs
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "target_based/snort_protocols.h"
 #include "host_tracker/host_tracker_module.h"
 #include "host_tracker/host_cache.h"
index 60474b76c97f200d8bc483518fcac1aba014068a..b3ab239f8b578babdb8138fbbd9d2d2c15e3c285 100644 (file)
 // host_tracker_test.cc author Steve Chew <stechew@cisco.com>
 // unit tests for HostTracker class
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "host_tracker/host_tracker.h"
 
 #include <CppUTest/CommandLineTestRunner.h>
index 0f0e4a9807c468830f66c73f8b1c561cd46b2f15..600ff9088165efe6591aa0245404fd71bc794e6c 100644 (file)
 **  the file doc/README.asn1.
 */
 
-#include "asn1_detect.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <sys/types.h>
-#include <stdlib.h>
-#include <ctype.h>
+#include "asn1_detect.h"
 
-#include "asn1_util.h"
-#include "main/snort_types.h"
 #include "main/snort_debug.h"
 #include "utils/snort_bounds.h"
 
+#include "asn1_util.h"
+
 /*
 **  NAME
 **    BitStringOverflow::
index e5d3be263bb3935c29d2547c83db1cb14fb0c699..8005e8c52ba4b53b3aa09cf9ff8d68daf638f371 100644 (file)
@@ -20,7 +20,7 @@
 #ifndef ASN1_DETECT_H
 #define ASN1_DETECT_H
 
-#include <stdint.h>
+#include <cstdint>
 
 #define ABS_OFFSET 1
 #define REL_OFFSET 2
index 4683d5ee14ba134874c925d6dae6f7eb028446da..802df4083c6808899919ed91c23b0b872bc27d9f 100644 (file)
 #include "config.h"
 #endif
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-#include <sys/types.h>
+#include "asn1_util.h"
 
-#include "utils/util.h"
-#include "ips_options/asn1_util.h"
 #include "main/snort_config.h"
-#include "main/thread.h"
+#include "utils/util.h"
 
 /*
 **  Macros
index 3baa63065a093bf86aa7c9e9fdfa96327ef7d2d1..976bacc1a96f78cc42a6d42d08cc5fd3ae75c4bd 100644 (file)
 
 // author Chris Green <cmg@sourcefire.com>
 
-#include <sys/types.h>
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
-#include <stdlib.h>
-#include <ctype.h>
-#include <errno.h>
 
 #include "extract.h"
-#include "main/snort_debug.h"
-#include "utils/util.h"
+
 #include "utils/snort_bounds.h"
+#include "utils/util.h"
 
 #define TEXTLEN  (PARSELEN + 1)
 
index 447ed17a9ab14508ac25d52e4ec8fdd5945c9f52..989609cd84e24533eb8584c9a9b4189086f000bd 100644 (file)
 //--------------------------------------------------------------------------
 // ips_ack.cc author Russ Combs <rucombs@cisco.com>
 
-#include <sys/types.h>
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
-#include <stdlib.h>
-#include <ctype.h>
 
-#include "main/snort_types.h"
-#include "main/snort_debug.h"
-#include "detection/treenodes.h"
-#include "protocols/packet.h"
-#include "parser/parser.h"
-#include "utils/util.h"
-#include "profiler/profiler.h"
-#include "hash/sfhashfcn.h"
 #include "detection/detection_defines.h"
 #include "framework/ips_option.h"
-#include "framework/parameter.h"
 #include "framework/module.h"
 #include "framework/range.h"
+#include "hash/sfhashfcn.h"
+#include "profiler/profiler_defs.h"
+#include "protocols/packet.h"
 #include "protocols/tcp.h"
 
 #define s_name "ack"
index 5a98b1204c4299092a1983757e553de5ea0deb93..ea17b72b954916924261d9a33c8fe26fa1201c7a 100644 (file)
 **  the file doc/README.asn1.
 */
 
-#include <sys/types.h>
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
-#include <stdlib.h>
-#include <ctype.h>
-#include <errno.h>
 
-#include "asn1_detect.h"
-#include "main/snort_types.h"
-#include "main/snort_config.h"
-#include "main/snort_debug.h"
-#include "protocols/packet.h"
-#include "parser/parser.h"
-#include "utils/util.h"
-#include "ips_options/asn1_util.h"
-#include "hash/sfhashfcn.h"
-#include "detection/treenodes.h"
-#include "detection/detection_util.h"
 #include "detection/detection_defines.h"
-#include "profiler/profiler.h"
 #include "framework/cursor.h"
 #include "framework/ips_option.h"
-#include "framework/parameter.h"
 #include "framework/module.h"
+#include "hash/sfhashfcn.h"
+#include "profiler/profiler.h"
+#include "protocols/packet.h"
+
+#include "asn1_detect.h"
+#include "asn1_util.h"
 
 #define BITSTRING_OPT  "bitstring_overflow"
 #define DOUBLE_OPT     "double_overflow"
index 0e05ed495e5cd5610213a729df42bb8c3eeabb7d..b3bd531dd777f5fc35653932292c997c2485a428 100644 (file)
 
 /* ips_base64.cc */
 
-#include <sys/types.h>
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
-#include <stdlib.h>
-#include <ctype.h>
-#include <errno.h>
 
-#include "log/messages.h"
-#include "main/snort_types.h"
-#include "main/snort_debug.h"
-#include "protocols/packet.h"
-#include "parser/parser.h"
-#include "profiler/profiler.h"
-#include "utils/util.h"
-#include "mime/decode_b64.h"
-#include "utils/util_unfold.h"
 #include "detection/detection_defines.h"
 #include "detection/detection_util.h"
+#include "detection/treenodes.h"
+#include "hash/sfhashfcn.h"
 #include "framework/cursor.h"
 #include "framework/ips_option.h"
-#include "framework/parameter.h"
 #include "framework/module.h"
-#include "hash/sfhashfcn.h"
+#include "log/messages.h"
+#include "mime/decode_b64.h"
+#include "profiler/profiler.h"
+#include "utils/util_unfold.h"
 
 static THREAD_LOCAL uint8_t base64_decode_buf[DECODE_BLEN];
 static THREAD_LOCAL uint32_t base64_decode_size;
index 33136ca17d6f47ce11dafc7b5089c5e71de5102f..21bb00e7e356cff7f595eb6ce2c5f5ab83847102 100644 (file)
 #include "config.h"
 #endif
 
-#include <ctype.h>
-#include <stdlib.h>
-
-#include "main/snort_types.h"
-#include "main/snort_debug.h"
-#include "hash/sfhashfcn.h"
-#include "profiler/profiler.h"
 #include "detection/detection_defines.h"
-#include "framework/range.h"
-#include "framework/ips_option.h"
-#include "framework/inspector.h"
 #include "framework/cursor.h"
+#include "framework/ips_option.h"
 #include "framework/module.h"
+#include "framework/range.h"
+#include "hash/sfhashfcn.h"
+#include "profiler/profiler.h"
 
 #define s_name "bufferlen"
 
index 1289e648553bc17df03ac5b98fd5f17d8d17682e..d2f8678f467827374100bcfc02a5eaad98cc17c9 100644 (file)
 //--------------------------------------------------------------------------
 // Author: Ryan Jordan <ryan.jordan@sourcefire.com>
 
-#include "ips_byte_extract.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include "extract.h"
-#include "log/messages.h"
-#include "main/snort_types.h"
-#include "parser/parser.h"
+#include "ips_byte_extract.h"
+
 #include "detection/detection_defines.h"
-#include "detection/detection_util.h"
-#include "hash/sfhashfcn.h"
-#include "profiler/profiler.h"
-#include "framework/ips_option.h"
+#include "detection/treenodes.h"
 #include "framework/cursor.h"
-#include "framework/parameter.h"
+#include "framework/endianness.h"
+#include "framework/ips_option.h"
 #include "framework/module.h"
+#include "hash/sfhashfcn.h"
+#include "log/messages.h"
+#include "protocols/packet.h"
+#include "profiler/profiler.h"
 #include "utils/util.h"
 
+#include "extract.h"
+
 static THREAD_LOCAL ProfileStats byteExtractPerfStats;
 
 #define s_name "byte_extract"
index 7c327f722e8c83c72ecc0f1b9d9bec3f1d796a91..de12673846b4485373bd1181005591bfbabd4638 100644 (file)
@@ -22,8 +22,6 @@
 #ifndef IPS_BYTE_EXTRACT_H
 #define IPS_BYTE_EXTRACT_H
 
-#include <stdint.h>
-
 #include "main/snort_types.h"
 
 #define NUM_BYTE_EXTRACT_VARS 2
index 243c4a9f16ba0716b9702e1674ba3d245ae1738a..0a6390eb6014a809abb14067739cca3bfcc04120 100644 (file)
  *
  */
 
-#include <sys/types.h>
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
-#include <stdlib.h>
-#include <ctype.h>
-#include <errno.h>
-
-#include <string>
 
-#include "extract.h"
-#include "ips_byte_extract.h"
-#include "log/messages.h"
-#include "main/snort_types.h"
-#include "main/snort_debug.h"
-#include "protocols/packet.h"
-#include "parser/parser.h"
-#include "utils/util.h"
-#include "hash/sfhashfcn.h"
-#include "profiler/profiler.h"
-#include "detection/treenodes.h"
 #include "detection/detection_defines.h"
-#include "detection/detection_util.h"
 #include "framework/cursor.h"
+#include "framework/endianness.h"
 #include "framework/ips_option.h"
-#include "framework/parameter.h"
 #include "framework/module.h"
+#include "hash/sfhashfcn.h"
+#include "log/messages.h"
+#include "profiler/profiler.h"
+#include "protocols/packet.h"
+
+#include "extract.h"
+#include "ips_byte_extract.h"
 
 using namespace std;
 
index ef18a071967bc0dbfe5c149e49a618bc9e20f22c..75751196aa945ea320267539fdbd3ca0a7b32e7e 100644 (file)
  *      0 if it is not.
  */
 
-#include <sys/types.h>
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
-#include <stdlib.h>
-#include <ctype.h>
-#include <errno.h>
-
-#include <string>
 
-#include "extract.h"
-#include "ips_byte_extract.h"
-#include "log/messages.h"
-#include "main/snort_types.h"
-#include "main/snort_debug.h"
-#include "protocols/packet.h"
-#include "parser/parser.h"
-#include "utils/util.h"
-#include "profiler/profiler.h"
-#include "hash/sfhashfcn.h"
-#include "detection/treenodes.h"
 #include "detection/detection_defines.h"
-#include "detection/detection_util.h"
 #include "framework/cursor.h"
+#include "framework/endianness.h"
 #include "framework/ips_option.h"
-#include "framework/parameter.h"
 #include "framework/module.h"
+#include "hash/sfhashfcn.h"
+#include "log/messages.h"
+#include "profiler/profiler.h"
+#include "protocols/packet.h"
+
+#include "extract.h"
+#include "ips_byte_extract.h"
 
 using namespace std;
 
index 459f76bc3689a3c57ca327fbd3750efcd560370d..d02e2f08be50b604617c8a8597389ef499d51b67 100644 (file)
 //--------------------------------------------------------------------------
 // ips_classtype.cc author Russ Combs <rucombs@cisco.com>
 
-#include <sys/types.h>
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
-#include <stdlib.h>
-#include <ctype.h>
 
-#include "main/snort_types.h"
-#include "main/snort_debug.h"
 #include "detection/treenodes.h"
-#include "utils/util.h"
-#include "detection/detection_defines.h"
+#include "framework/decode_data.h"
 #include "framework/ips_option.h"
-#include "framework/parameter.h"
 #include "framework/module.h"
-#include "protocols/packet.h"
 
 #define s_name "classtype"
 
index d0875ec310a75eae16f0e9dc1c0ef910a6c92d32..75a7567530c045c7346b858fa989659db8a41560 100644 (file)
 #include "config.h"
 #endif
 
-#include <errno.h>
-#ifdef DEBUG_MSGS
-# include <assert.h>
-#endif
-
-#include "ips_byte_extract.h"
-#include "log/messages.h"
-#include "main/snort_types.h"
-#include "main/snort_debug.h"
-#include "utils/boyer_moore.h"
-#include "utils/util.h"
-#include "parser/parser.h"
-#include "parser/parse_utils.h"
-#include "hash/sfhashfcn.h"
-#include "profiler/profiler.h"
-#include "detection/treenodes.h"
 #include "detection/detection_defines.h"
-#include "detection/detection_util.h"
 #include "detection/pattern_match_data.h"
 #include "framework/cursor.h"
 #include "framework/ips_option.h"
-#include "framework/parameter.h"
 #include "framework/module.h"
+#include "hash/sfhashfcn.h"
+#include "log/messages.h"
+#include "parser/parse_utils.h"
+#include "profiler/profiler.h"
+#include "utils/boyer_moore.h"
+#include "utils/util.h"
+
+#include "ips_byte_extract.h"
 
 #define MAX_PATTERN_SIZE 2048
 
index 26b75c3e9cd73528b1ae14bb1bbb8ebd36fb2b65..795636037f8947691d134c3c9435737993b15582 100644 (file)
 **
 */
 
-#include <stdio.h>
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
-#include <stdlib.h>
-#include <ctype.h>
-#include <sys/types.h>
-#include <errno.h>
 
-#include "main/snort_types.h"
-#include "main/snort_debug.h"
-#include "protocols/packet.h"
-#include "parser/parser.h"
-#include "utils/util.h"
-#include "profiler/profiler.h"
-#include "hash/sfhashfcn.h"
-#include "detection/treenodes.h"
 #include "detection/detection_defines.h"
 #include "framework/ips_option.h"
-#include "framework/parameter.h"
 #include "framework/module.h"
+#include "hash/sfhashfcn.h"
+#include "profiler/profiler.h"
+#include "protocols/packet.h"
 
 static THREAD_LOCAL ProfileStats cvsPerfStats;
 
index 981434819f2959ea83b0c3e8a8f39ee1895c2c8d..da7b4fdfe1d0d1d57ef84c8d0dfcd557ed74cbba 100644 (file)
 //--------------------------------------------------------------------------
 // ips_dsize.cc author Russ Combs <rucombs@cisco.com>
 
-#include <ctype.h>
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
-#include <stdlib.h>
-#include <string.h>
 
-#include "main/snort_types.h"
-#include "main/snort_debug.h"
-#include "protocols/packet.h"
-#include "parser/parser.h"
-#include "utils/util.h"
-#include "hash/sfhashfcn.h"
-#include "profiler/profiler.h"
-#include "detection/treenodes.h"
 #include "detection/detection_defines.h"
 #include "framework/ips_option.h"
-#include "framework/parameter.h"
 #include "framework/module.h"
 #include "framework/range.h"
+#include "hash/sfhashfcn.h"
+#include "profiler/profiler.h"
+#include "protocols/packet.h"
 
 #define s_name "dsize"
 
index d1f05058732bbf353dfb7f46a526186203e2f4db..ed9b99349fed45440adb3846e766867f02a4fa77 100644 (file)
 #include "config.h"
 #endif
 
-#include <sys/types.h>
-#include <stdlib.h>
-#include <ctype.h>
-#include <errno.h>
-
-#include "main/snort_types.h"
-#include "main/snort_debug.h"
-#include "profiler/profiler.h"
 #include "detection/detection_defines.h"
 #include "detection/detection_util.h"
 #include "framework/cursor.h"
 #include "framework/ips_option.h"
 #include "framework/module.h"
+#include "profiler/profiler.h"
 
 #define s_name "file_data"
 
index a55a446edbca961c958b973cda5e5aef55fc2630..707b534fddaaf547befc7a6ef317894ddb41b8c6 100644 (file)
 //--------------------------------------------------------------------------
 // ips_file_type.cc author Victor Roemer <vroemer@sourcefire.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <bitset>
 
 #include "detection/detection_defines.h"
 #include "framework/ips_option.h"
 #include "framework/module.h"
-#include "file_api/file_identifier.h"
 #include "file_api/file_flows.h"
+#include "file_api/file_identifier.h"
 #include "profiler/profiler.h"
 #include "protocols/packet.h"
 
index 874540db7dd412da9c534d609b3dd71d13e41d90..46df1f7062835f4361757aaf4fb10c5ec56adb3f 100644 (file)
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
-#include <sys/types.h>
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
 
-#include "log/messages.h"
-#include "main/snort_types.h"
-#include "main/snort_debug.h"
-#include "protocols/packet.h"
-#include "protocols/tcp.h"
-#include "parser/parser.h"
-#include "utils/util.h"
-#include "profiler/profiler.h"
-#include "hash/sfhashfcn.h"
-#include "detection/treenodes.h"
 #include "detection/detection_defines.h"
 #include "framework/ips_option.h"
-#include "framework/parameter.h"
 #include "framework/module.h"
+#include "hash/sfhashfcn.h"
+#include "log/messages.h"
+#include "profiler/profiler.h"
+#include "protocols/packet.h"
+#include "protocols/tcp.h"
 
 #define M_NORMAL  0
 #define M_ALL     1
index 144027c42164a59ed1ae1618966e4f27d54844b2..299a25251afa9b81decace1bfac794bff3fd35b8 100644 (file)
 //--------------------------------------------------------------------------
 // ips_flow.cc derived from sp_clientserver.c by Martin Roesch
 
-#include "ips_flow.h"
-
-#include <sys/types.h>
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
 
-#include "log/messages.h"
-#include "main/snort_types.h"
-#include "main/snort_debug.h"
-#include "detection/treenodes.h"
-#include "protocols/packet.h"
-#include "parser/parser.h"
-#include "utils/util.h"
-#include "hash/sfhashfcn.h"
-#include "profiler/profiler.h"
+#include "ips_flow.h"
+
 #include "detection/detection_defines.h"
+#include "detection/treenodes.h"
 #include "framework/ips_option.h"
-#include "framework/parameter.h"
 #include "framework/module.h"
+#include "hash/sfhashfcn.h"
+#include "log/messages.h"
+#include "profiler/profiler.h"
+#include "protocols/packet.h"
 #include "target_based/snort_protocols.h"
 
 #define s_name "flow"
index 31564ce1c00c0e3bf1f5a9f4d37f996b99ee1660..7d61559c9b0c39b5c1af8cad99010cf4a350bd4d 100644 (file)
  ** - Check the value of the bitmask
  */
 
-#include "ips_flowbits.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-#include <sys/types.h>
+#include "ips_flowbits.h"
 
-#include <string>
 #include <forward_list>
 
-#include "log/messages.h"
-#include "main/snort_types.h"
-#include "main/snort_debug.h"
-#include "detection/treenodes.h"
-#include "protocols/packet.h"
-#include "parser/parser.h"
-#include "utils/util.h"
-#include "utils/stats.h"
-#include "utils/sflsq.h"
-#include "utils/bitop.h"
-#include "hash/sfghash.h"
-#include "parser/mstring.h"
-#include "profiler/profiler.h"
-#include "hash/sfhashfcn.h"
 #include "detection/detection_defines.h"
 #include "framework/ips_option.h"
-#include "framework/parameter.h"
 #include "framework/module.h"
+#include "hash/sfghash.h"
+#include "hash/sfhashfcn.h"
+#include "log/messages.h"
+#include "parser/mstring.h"
+#include "protocols/packet.h"
+#include "profiler/profiler.h"
+#include "utils/bitop.h"
+#include "utils/sflsq.h"
+#include "utils/util.h"
 
 using namespace std;
 
index 7508d18d4426e5f0d4b2799ff8adc60d255ba046..18fb22a8b2cc1e1d9c3c24ba7f4d0c14c70afa9e 100644 (file)
  *
  */
 
-#include <sys/types.h>
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
-#include <stdlib.h>
-#include <ctype.h>
-#include <string.h>
 
-#include "log/messages.h"
-#include "main/snort_types.h"
-#include "main/snort_debug.h"
-#include "protocols/packet.h"
-#include "parser/parser.h"
-#include "utils/util.h"
-#include "profiler/profiler.h"
-#include "hash/sfhashfcn.h"
-#include "detection/treenodes.h"
 #include "detection/detection_defines.h"
 #include "framework/ips_option.h"
-#include "framework/parameter.h"
 #include "framework/module.h"
-
+#include "hash/sfhashfcn.h"
+#include "log/messages.h"
+#include "profiler/profiler.h"
+#include "protocols/packet.h"
 
 static THREAD_LOCAL ProfileStats fragBitsPerfStats;
 
index fe8f78452386ba03881f22e97ddb92932a8d2d00..ede8bd5a0ff00959fb90e069b50f2d2b468888af 100644 (file)
 //--------------------------------------------------------------------------
 // ips_fragoffset.cc author Russ Combs <rucombs@cisco.com>
 
-#include <sys/types.h>
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <stdlib.h>
-#include <ctype.h>
-
-#include "main/snort_types.h"
-#include "main/snort_debug.h"
-#include "protocols/packet.h"
-#include "profiler/profiler.h"
-#include "hash/sfhashfcn.h"
 #include "detection/detection_defines.h"
 #include "framework/ips_option.h"
-#include "framework/parameter.h"
 #include "framework/module.h"
 #include "framework/range.h"
+#include "hash/sfhashfcn.h"
+#include "profiler/profiler.h"
+#include "protocols/packet.h"
 
 #define s_name "fragoffset"
 
index ca620ce87e71f6195be35383363ab00becc215e3..521835ab8d88bd15c59887cd180e8130511a53c3 100644 (file)
 //--------------------------------------------------------------------------
 // ips_gid.cc author Russ Combs <rucombs@cisco.com>
 
-#include <sys/types.h>
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include "main/snort_types.h"
-#include "main/snort_debug.h"
-#include "detection/treenodes.h"
 #include "detection/detection_defines.h"
+#include "detection/treenodes.h"
+#include "framework/decode_data.h"
 #include "framework/ips_option.h"
-#include "framework/parameter.h"
 #include "framework/module.h"
-#include "protocols/packet.h"
 
 #define s_name "gid"
 
index adcc25b8a188aa784a85a3bf0568bf9e533abb83..137c79f5ee18d7738e166125c0304d54a8d6bbec 100644 (file)
 #include "config.h"
 #endif
 
-#include <errno.h>
 #include <array>
-#include <string>
+#include <cassert>
 
-#include "ips_byte_extract.h"
-#include "log/messages.h"
-#include "main/snort_types.h"
-#include "parser/parser.h"
-#include "parser/parse_utils.h"
-#include "hash/sfhashfcn.h"
-#include "hash/hashes.h"
+#include "detection/detection_defines.h"
 #include "framework/cursor.h"
 #include "framework/ips_option.h"
-#include "profiler/profiler.h"
-#include "detection/detection_defines.h"
-#include "detection/detection_util.h"
-#include "framework/parameter.h"
 #include "framework/module.h"
+#include "hash/hashes.h"
+#include "hash/sfhashfcn.h"
+#include "log/messages.h"
+#include "parser/parse_utils.h"
+#include "profiler/profiler.h"
+
+#include "ips_byte_extract.h"
 
 enum HashPsIdx
 {
index f57159fa51fff5575ae1e5ceb265cb9045946e46..bbccac909b29751e628f0458a47e5533d6889791 100644 (file)
  *
  */
 
-#include <sys/types.h>
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include "main/snort_types.h"
-#include "main/snort_debug.h"
-#include "protocols/packet.h"
-#include "profiler/profiler.h"
-#include "hash/sfhashfcn.h"
 #include "detection/detection_defines.h"
 #include "framework/ips_option.h"
-#include "framework/parameter.h"
 #include "framework/module.h"
 #include "framework/range.h"
+#include "hash/sfhashfcn.h"
+#include "profiler/profiler.h"
 #include "protocols/icmp4.h"
 #include "protocols/icmp6.h"
+#include "protocols/packet.h"
 
 #define s_name "icmp_id"
 
index afabd2bddd33c221d9753c682e27b891f52a3523..62aaea26156ca355b1ac0570d223b7fc96360810 100644 (file)
  *
  */
 
-#include <stdlib.h>
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include "main/snort_types.h"
-#include "main/snort_debug.h"
-#include "profiler/profiler.h"
-#include "hash/sfhashfcn.h"
 #include "detection/detection_defines.h"
 #include "framework/ips_option.h"
-#include "framework/parameter.h"
 #include "framework/module.h"
 #include "framework/range.h"
-#include "protocols/packet.h"
+#include "hash/sfhashfcn.h"
+#include "profiler/profiler.h"
 #include "protocols/icmp4.h"
 #include "protocols/icmp6.h"
+#include "protocols/packet.h"
 
 #define s_name "icmp_seq"
 
index 8cb61f116769902c30e3911de39f97c92a5f5616..18858589ff6cdfdb619e03377ea91af3dd9646f5 100644 (file)
 //--------------------------------------------------------------------------
 // ips_icode.cc author Russ Combs <rucombs@cisco.com>
 
-#include <stdlib.h>
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
-#include <string.h>
-#include <ctype.h>
 
-#include "main/snort_types.h"
-#include "main/snort_debug.h"
-#include "protocols/packet.h"
-#include "hash/sfhashfcn.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/range.h"
+#include "hash/sfhashfcn.h"
+#include "profiler/profiler.h"
 #include "protocols/icmp4.h"
+#include "protocols/packet.h"
 
 #define s_name "icode"
 
index afa83307b7eb4c7d1ca2710966a2f3c68836ba57..b3278e54f41fab0e6bbd107197c96a201ba41871 100644 (file)
 //--------------------------------------------------------------------------
 // ips_id.cc author Russ Combs <rucombs@cisco.com>
 
-#include <sys/types.h>
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include "main/snort_types.h"
-#include "main/snort_debug.h"
-#include "protocols/packet.h"
-#include "profiler/profiler.h"
-#include "hash/sfhashfcn.h"
 #include "detection/detection_defines.h"
 #include "framework/ips_option.h"
-#include "framework/parameter.h"
 #include "framework/module.h"
 #include "framework/range.h"
+#include "hash/sfhashfcn.h"
+#include "profiler/profiler.h"
+#include "protocols/packet.h"
 
 #define s_name "id"
 
index 7f8bd59debfcb7be7e575b75e9f130959f76413f..da8c2356b924c945c5a91574dadd05435bd53bd5 100644 (file)
 #include "config.h"
 #endif
 
-#include <sys/types.h>
-#include <stdlib.h>
-#include <ctype.h>
-#include <errno.h>
 #include <netdb.h>
 
-#include "log/messages.h"
-#include "main/snort_debug.h"
-#include "protocols/packet.h"
-#include "parser/parser.h"
-#include "utils/util.h"
-#include "profiler/profiler.h"
-#include "hash/sfhashfcn.h"
-#include "detection/treenodes.h"
 #include "detection/detection_defines.h"
 #include "framework/ips_option.h"
-#include "framework/parameter.h"
 #include "framework/module.h"
+#include "hash/sfhashfcn.h"
+#include "log/messages.h"
+#include "profiler/profiler.h"
+#include "protocols/packet.h"
+#include "utils/util.h"
 
 #define s_name "ip_proto"
 
index 9e6ea9c6b7914a5a7e9182419f066774d3edc93f..9c609f0ebceefaebe3d7b7cafbdae41720a61eec 100644 (file)
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
-#include <sys/types.h>
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
-#include <stdlib.h>
-#include <ctype.h>
-#include <string.h>
 
-#include "main/snort_types.h"
-#include "main/snort_debug.h"
-#include "protocols/packet.h"
-#include "protocols/ipv4.h"
-#include "protocols/ipv4_options.h"
-#include "parser/parser.h"
-#include "utils/util.h"
-#include "profiler/profiler.h"
-#include "hash/sfhashfcn.h"
-#include "detection/treenodes.h"
 #include "detection/detection_defines.h"
 #include "framework/ips_option.h"
-#include "framework/parameter.h"
 #include "framework/module.h"
+#include "hash/sfhashfcn.h"
+#include "profiler/profiler.h"
+#include "protocols/ipv4_options.h"
+#include "protocols/packet.h"
 
 #define s_name "ipopts"
 
index d15aaab31fc2a99eff3772577355cd828e5c807a..008dda03cd39552c35a92fd2380542115faf73e0 100644 (file)
  *      content:"USER"; isdataat:30,relative; content:!"|0a|"; within:30;)
  */
 
-#include <sys/types.h>
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
-#include <stdlib.h>
-#include <ctype.h>
-#include <errno.h>
 
-#include "ips_byte_extract.h"
-#include "log/messages.h"
-#include "protocols/packet.h"
-#include "parser/parser.h"
-#include "parser/mstring.h"
-#include "main/snort_debug.h"
-#include "main/snort_types.h"
-#include "utils/snort_bounds.h"
-#include "utils/util.h"
-#include "profiler/profiler.h"
-#include "hash/sfhashfcn.h"
-#include "detection/treenodes.h"
+#include <cstdlib>
+
 #include "detection/detection_defines.h"
-#include "detection/detection_util.h"
 #include "framework/cursor.h"
 #include "framework/ips_option.h"
-#include "framework/parameter.h"
 #include "framework/module.h"
+#include "hash/sfhashfcn.h"
+#include "log/messages.h"
+#include "parser/mstring.h"
+#include "profiler/profiler.h"
+#include "utils/snort_bounds.h"
+
+#include "ips_byte_extract.h"
 
 #define s_name "isdataat"
 
index 4ef4e6adc5a420ddc35dac1e586b14d400eb257a..2cc9030025822b4b8c5a4475faba4bc99a9604e7 100644 (file)
 #include "config.h"
 #endif
 
-#include "main/snort_types.h"
-#include "main/snort_debug.h"
-#include "protocols/packet.h"
-#include "hash/sfhashfcn.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/range.h"
+#include "hash/sfhashfcn.h"
+#include "profiler/profiler.h"
 #include "protocols/icmp4.h"
+#include "protocols/packet.h"
 
 #define s_name "itype"
 
index 8fd50e71814391b1c224e743ac7755018defd84f..5180dc8275af4aa8503bf2af2a2e197038f1ed2e 100644 (file)
 //--------------------------------------------------------------------------
 // ips_luajit.cc author Russ Combs <rucombs@cisco.com>
 
-#include <assert.h>
-#include <lua.hpp>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include "main/snort_types.h"
-#include "main/thread.h"
-#include "main/thread_config.h"
+#include "detection/detection_defines.h"
+#include "framework/cursor.h"
+#include "framework/decode_data.h"
+#include "framework/module.h"
+#include "hash/sfhashfcn.h"
 #include "helpers/chunk.h"
 #include "lua/lua.h"
+#include "log/messages.h"
+#include "main/thread_config.h"
 #include "managers/ips_manager.h"
 #include "managers/lua_plugin_defs.h"
 #include "managers/plugin_manager.h"
 #include "managers/script_manager.h"
-#include "hash/sfhashfcn.h"
-#include "parser/parser.h"
-#include "framework/cursor.h"
-#include "framework/decode_data.h"
-#include "framework/module.h"
-#include "framework/parameter.h"
-#include "log/messages.h"
 #include "profiler/profiler.h"
-#include "detection/detection_defines.h"
 #include "utils/util.h"
 
 static THREAD_LOCAL ProfileStats luaIpsPerfStats;
index de505984e92706d3d93e7ef757767165d613e3d3..c123c9a91c42b45415c90e9adc27b1d42ef0b8cf 100644 (file)
 //--------------------------------------------------------------------------
 // ips_msg.cc author Russ Combs <rucombs@cisco.com>
 
-#include <sys/types.h>
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <string>
-
-#include "main/snort_types.h"
-#include "main/snort_debug.h"
-#include "detection/treenodes.h"
 #include "detection/detection_defines.h"
+#include "detection/treenodes.h"
+#include "framework/decode_data.h"
 #include "framework/ips_option.h"
-#include "framework/parameter.h"
 #include "framework/module.h"
 #include "utils/util.h"
-#include "protocols/packet.h"
 
 #define s_name "msg"
 
index f7d7b0340f3ce47ef882cdaebb59cbcdb6f28572..13d2fbb0ee0da7169596b8506725996e298fa9bf 100644 (file)
 //--------------------------------------------------------------------------
 // ips_options.cc author Russ Combs <rucombs@cisco.com>
 
-#include "ips_options.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include "framework/ips_option.h"
+#include "ips_options.h"
+
 #include "managers/plugin_manager.h"
 
 extern const BaseApi* ips_byte_extract;
index 24848867c7df3f5ba1e5d0b1e258f0f0b1d8053a..b2f2c812519deb3bef3a27762f356f7abdbf166e 100644 (file)
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
-#include "ips_pcre.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <sys/types.h>
+#include "ips_pcre.h"
+
 #include <pcre.h>
 
-#include "log/messages.h"
-#include "main/snort_types.h"
-#include "main/snort_debug.h"
-#include "main/snort_config.h"
-#include "protocols/packet.h"
-#include "parser/parser.h"
-#include "utils/util.h"
-#include "hash/sfhashfcn.h"
-#include "profiler/profiler.h"
-#include "detection/treenodes.h"
+#include <cassert>
+
 #include "detection/detection_defines.h"
-#include "detection/detection_util.h"
 #include "framework/cursor.h"
 #include "framework/ips_option.h"
-#include "framework/parameter.h"
 #include "framework/module.h"
+#include "hash/sfhashfcn.h"
+#include "log/messages.h"
+#include "main/snort_config.h"
+#include "profiler/profiler.h"
+#include "utils/util.h"
 
 #ifndef PCRE_STUDY_JIT_COMPILE
 #define PCRE_STUDY_JIT_COMPILE 0
index 1cd078d3ef44be3440311e55f1be7c939f22d8c8..1b70daef1a049c8a7234b8bd995b9b67489ea5e8 100644 (file)
 #include "config.h"
 #endif
 
-#include "main/snort_types.h"
-#include "main/snort_debug.h"
-#include "protocols/packet.h"
-#include "profiler/profiler.h"
+#include "detection/detection_defines.h"
 #include "framework/cursor.h"
 #include "framework/ips_option.h"
 #include "framework/module.h"
-#include "detection/detection_defines.h"
+#include "profiler/profiler.h"
+#include "protocols/packet.h"
 
 #define s_name "pkt_data"
 
index 701e9f4ce9eca20a10aaf448e6e2fd58235eb619..57f8e92dd4a2d98adda64fafda5ab6cea8c26895 100644 (file)
 //--------------------------------------------------------------------------
 // ips_priority.cc author Russ Combs <rucombs@cisco.com>
 
-#include <sys/types.h>
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include "main/snort_types.h"
-#include "main/snort_debug.h"
-#include "detection/treenodes.h"
 #include "detection/detection_defines.h"
+#include "detection/treenodes.h"
+#include "framework/decode_data.h"
 #include "framework/ips_option.h"
-#include "framework/parameter.h"
 #include "framework/module.h"
-#include "protocols/packet.h"
 
 #define s_name "priority"
 
index 91da11d256cfefe4f26bced023fa8022a6a7a18b..1dcdd18d887c846b28256c90b99a722981706653 100644 (file)
 #include "config.h"
 #endif
 
-#include "main/snort_types.h"
-#include "main/snort_debug.h"
-#include "protocols/packet.h"
-#include "profiler/profiler.h"
 #include "detection/detection_defines.h"
-#include "detection/detection_util.h"
 #include "framework/cursor.h"
 #include "framework/ips_option.h"
 #include "framework/module.h"
+#include "profiler/profiler.h"
+#include "protocols/packet.h"
 
 #define s_name "raw_data"
 
index cacc7383f929ac4b8ae24e6c7ca3955df78cb865..b7a0e943538cc59bec48f03b9ec159675bc91702 100644 (file)
 // ips_regex.cc author Russ Combs <rucombs@cisco.com>
 // FIXIT-M add ! and anchor support like pcre and update retry
 
-#include "ips_regex.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <assert.h>
-#include <string.h>
-#include <string>
+#include "ips_regex.h"
 
 #include <hs_compile.h>
 #include <hs_runtime.h>
 
+#include <cassert>
+
+#include "detection/detection_defines.h"
+#include "detection/pattern_match_data.h"
 #include "framework/cursor.h"
 #include "framework/ips_option.h"
 #include "framework/module.h"
-#include "detection/detection_defines.h"
-#include "detection/pattern_match_data.h"
 #include "hash/sfhashfcn.h"
 #include "log/messages.h"
 #include "main/snort_config.h"
-#include "main/thread.h"
-#include "parser/parser.h"
 #include "profiler/profiler.h"
 
 #define s_name "regex"
index 7ad89dcdb7d734a426f0932cdc0988b91f9dbe69..ec7417d1142b1ff29950bb5f8fc7bebcae288e0b 100644 (file)
 //--------------------------------------------------------------------------
 // ips_rem.cc author Russ Combs <rucombs@cisco.com>
 
-#include <sys/types.h>
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include "main/snort_types.h"
-#include "main/snort_debug.h"
 #include "detection/detection_defines.h"
+#include "framework/decode_data.h"
 #include "framework/ips_option.h"
-#include "framework/parameter.h"
 #include "framework/module.h"
-#include "protocols/packet.h"
 
 #define s_name "rem"
 
index 209727ba0c47a67c84807f99c86d646fac73aba5..3a970d38382b8a1f8894798e7980b2764fa3fa03 100644 (file)
 #include "config.h"
 #endif
 
-#include <assert.h>
-#include <string>
-
-#include "log/messages.h"
-#include "main/snort_config.h"
-#include "main/snort_types.h"
-#include "main/snort_debug.h"
-#include "main/thread_config.h"
-#include "protocols/packet.h"
-#include "parser/parser.h"
-#include "parser/parse_utils.h"
-#include "packet_io/sfdaq.h"
+#include "actions/act_replace.h"
+#include "detection/detection_defines.h"
+#include "detection/treenodes.h"
 #include "framework/cursor.h"
 #include "framework/ips_option.h"
-#include "framework/parameter.h"
 #include "framework/module.h"
-#include "detection/detection_defines.h"
-#include "actions/act_replace.h"
 #include "hash/sfhashfcn.h"
+#include "log/messages.h"
+#include "main/snort_config.h"
+#include "main/thread_config.h"
+#include "packet_io/sfdaq.h"
+#include "parser/parse_utils.h"
 #include "profiler/profiler.h"
+#include "protocols/packet.h"
 
 using namespace std;
 
index c568e51012aab1010e780af2c60e1fe100eed96b..678db62fd9f0f3e7cac7767bc6ad802c31c01023 100644 (file)
 #include "config.h"
 #endif
 
-#include "main/snort_types.h"
-#include "main/snort_debug.h"
-#include "detection/treenodes.h"
 #include "detection/detection_defines.h"
+#include "detection/treenodes.h"
+#include "framework/decode_data.h"
 #include "framework/ips_option.h"
-#include "framework/parameter.h"
 #include "framework/module.h"
-#include "protocols/packet.h"
 
 #define s_name "rev"
 
index 2976c1e837e56bced82bef36ba27e7630abfc619..4b48a2bce03ba692a88355218265d316e8053240 100644 (file)
 #include "config.h"
 #endif
 
-#include <sys/types.h>
-#include <stdlib.h>
-#include <ctype.h>
-
-#include "protocols/packet.h"
-#include "parser/parser.h"
-#include "main/snort_debug.h"
-#include "utils/util.h"
-#include "hash/sfhashfcn.h"
-#include "profiler/profiler.h"
-#include "detection/treenodes.h"
 #include "detection/detection_defines.h"
 #include "framework/ips_option.h"
-#include "framework/parameter.h"
 #include "framework/module.h"
+#include "hash/sfhashfcn.h"
+#include "profiler/profiler.h"
+#include "protocols/packet.h"
 
 #define s_name "rpc"
 
index 390a0f28aa041ffec1cb768067aff2908a6e20a9..e7d196517592644e87f407652a575ac595372ce9 100644 (file)
 
 // ips_sd_pattern.cc author Victor Roemer <viroemer@cisco.com>
 
-#include "ips_sd_pattern.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <string.h>
-#include <assert.h>
-#include <string>
+#include "ips_sd_pattern.h"
 
 #include <hs_compile.h>
 #include <hs_runtime.h>
 
+#include "detection/detection_defines.h"
+#include "detection/pattern_match_data.h"
 #include "framework/cursor.h"
 #include "framework/ips_option.h"
 #include "framework/module.h"
-#include "detection/detection_defines.h"
-#include "detection/pattern_match_data.h"
 #include "hash/sfhashfcn.h"
 #include "log/messages.h"
 #include "log/obfuscator.h"
 #include "main/snort_config.h"
-#include "main/thread.h"
-#include "parser/parser.h"
 #include "profiler/profiler.h"
 #include "protocols/packet.h"
 
index 9fd166906e1f10dd71fb481af16f38522818fe52..6d3bd8656fe140ac7742482d1df97a5d4b04a7e0 100644 (file)
 #include "config.h"
 #endif
 
-#include "main/snort_types.h"
-#include "main/snort_debug.h"
-#include "profiler/profiler.h"
-#include "hash/sfhashfcn.h"
 #include "detection/detection_defines.h"
 #include "framework/ips_option.h"
-#include "framework/parameter.h"
 #include "framework/module.h"
 #include "framework/range.h"
+#include "hash/sfhashfcn.h"
+#include "profiler/profiler.h"
 #include "protocols/packet.h"
 #include "protocols/tcp.h"
 
index d85512ec2cd1d491584536a5071171ab58cbe450..3de1327d5d4b33c9e768672e65b6f476fab278bf 100644 (file)
 #include "config.h"
 #endif
 
-#include <sys/types.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <ctype.h>
-#include <string.h>
 #include <sys/stat.h>
 
-#include <string>
-
+#include "detection/detection_defines.h"
+#include "framework/ips_option.h"
+#include "framework/module.h"
+#include "hash/sfhashfcn.h"
 #include "log/messages.h"
 #include "main/snort_config.h"
+#include "profiler/profiler.h"
 #include "protocols/packet.h"
-#include "main/snort_debug.h"
 #include "utils/util.h"
-#include "profiler/profiler.h"
-#include "hash/sfhashfcn.h"
-#include "detection/detection_defines.h"
-#include "detection/treenodes.h"
-#include "framework/ips_option.h"
-#include "framework/parameter.h"
-#include "framework/module.h"
-#include "sfip/sf_ip.h"
 
 #define s_name "session"
 
index 9db9dd17e6d7c785eb1a9c8461e7e2ac6fe4774a..c224984be39e4dcc1169f4761c0364498d187f9d 100644 (file)
 #include "config.h"
 #endif
 
-#include "main/snort_types.h"
-#include "main/snort_debug.h"
-#include "detection/treenodes.h"
 #include "detection/detection_defines.h"
+#include "detection/treenodes.h"
+#include "framework/decode_data.h"
 #include "framework/ips_option.h"
-#include "framework/parameter.h"
 #include "framework/module.h"
-#include "protocols/packet.h"
 
 #define s_name "sid"
 
index 9cc900105b138a8013c4f402307d80a01b853c06..92eb1fe50ff09bead8476f738513929016437dcd 100644 (file)
 //--------------------------------------------------------------------------
 // ips_so.cc author Russ Combs <rucombs@cisco.com>
 
-#include "framework/so_rule.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <string>
-
-#include "framework/parameter.h"
+#include "detection/treenodes.h"
+#include "framework/ips_option.h"
 #include "framework/module.h"
-#include "main/thread.h"
-#include "managers/so_manager.h"
+#include "framework/so_rule.h"
 #include "hash/sfhashfcn.h"
 #include "log/messages.h"
-#include "detection/treenodes.h"
+#include "managers/so_manager.h"
 #include "profiler/profiler.h"
 
 using namespace std;
index ca7af2c42ed1d5ae8860109f2a53f21caef9d479..07385eb5d3d40f24e191b009ee116d1e4db83828 100644 (file)
 //--------------------------------------------------------------------------
 // ips_soid.cc author Russ Combs <rucombs@cisco.com>
 
-#include <sys/types.h>
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <string>
-
-#include "main/snort_types.h"
-#include "main/snort_debug.h"
-#include "detection/treenodes.h"
 #include "detection/detection_defines.h"
+#include "detection/treenodes.h"
+#include "framework/decode_data.h"
 #include "framework/ips_option.h"
-#include "framework/parameter.h"
 #include "framework/module.h"
-#include "protocols/packet.h"
 #include "utils/util.h"
 
 #define s_name "soid"
index d0f5166d962f39647b976c7133b1bc7d3015abed..0219f05ac188c841d4ae7634cc30575b21959fd2 100644 (file)
 // ips_tag.cc author Russ Combs <rucombs@cisco.com>
 // FIXIT-L add TagOption::eval() instead of special case
 
-#include <sys/types.h>
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include "main/snort_types.h"
-#include "main/snort_debug.h"
-#include "detection/treenodes.h"
 #include "detection/tag.h"
+#include "detection/treenodes.h"
+#include "framework/decode_data.h"
 #include "framework/ips_option.h"
-#include "framework/parameter.h"
 #include "framework/module.h"
-#include "protocols/packet.h"
 #include "utils/util.h"
 
 #define s_name "tag"
index 36d933a7b294b17ab211381f6b8e6e4065771f5c..02e5654b457fb9b6fec611730f57f3cc07524999 100644 (file)
 #include "config.h"
 #endif
 
-#include "main/snort_debug.h"
-#include "protocols/packet.h"
-#include "profiler/profiler.h"
-#include "hash/sfhashfcn.h"
 #include "detection/detection_defines.h"
 #include "framework/ips_option.h"
-#include "framework/parameter.h"
 #include "framework/module.h"
 #include "framework/range.h"
+#include "hash/sfhashfcn.h"
+#include "profiler/profiler.h"
+#include "protocols/packet.h"
 
 #define s_name "tos"
 
index 69a0e4cd21d8ea9611c81a83b9f96930eb2aba85..fbcd69e037f3f09cbdfd4ee6b8d8a2f9ca07ce21 100644 (file)
 #include "config.h"
 #endif
 
-#include "main/snort_types.h"
-#include "main/snort_debug.h"
-#include "protocols/packet.h"
-#include "hash/sfhashfcn.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/range.h"
+#include "hash/sfhashfcn.h"
+#include "profiler/profiler.h"
+#include "protocols/packet.h"
 
 #define s_name "ttl"
 
index b49f66609089e59a6ff6ce61fbd9a24f92290d81..2e7ae01b67fb8431b58e5cb58840a3ad6d5600f2 100644 (file)
 #include "config.h"
 #endif
 
-#include "main/snort_types.h"
-#include "main/snort_debug.h"
-#include "protocols/packet.h"
-#include "profiler/profiler.h"
-#include "hash/sfhashfcn.h"
 #include "detection/detection_defines.h"
 #include "framework/ips_option.h"
-#include "framework/parameter.h"
 #include "framework/module.h"
 #include "framework/range.h"
+#include "hash/sfhashfcn.h"
+#include "profiler/profiler.h"
+#include "protocols/packet.h"
 #include "protocols/tcp.h"
 
 #define s_name "window"
index 02d17494fb966144d4a23cf8269e64482e5f9225..d9a5a82b0c8c5ca2778c5b7c335e7592a5d4c7e7 100644 (file)
 
 // sd_credit_card.cc author Ryan Jordan
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "sd_credit_card.h"
 
-#include <ctype.h>
-#include <stdio.h>
+#include <cctype>
 
 #define ISSUER_SIZE     4
 #define CC_COPY_BUF_LEN 20 /* 16 digits + 3 spaces/dashes + null */
@@ -31,7 +34,7 @@
 /* Check the Issuer Identification Number of a CC#. */
 static inline int CheckIssuers(const uint8_t *cardnum, uint32_t buflen)
 {
-    if (cardnum == NULL || buflen < ISSUER_SIZE)
+    if (cardnum == nullptr || buflen < ISSUER_SIZE)
         return 0;
 
     /* Visa */
@@ -67,7 +70,7 @@ int SdLuhnAlgorithm(const uint8_t *buf, unsigned long long buflen)
     char cc_digits[CC_COPY_BUF_LEN]; /* Normalized CC# string */
     uint32_t j;
 
-    if (buf == NULL || buflen < MIN_CC_BUF_LEN)
+    if (buf == nullptr || buflen < MIN_CC_BUF_LEN)
         return 0;
 
     /* Generally, the buffer has two non-digits, one on either side. Sometimes,
index 1a0bca04de079f1e0c010db15a07ae0b8564606c..841d002df2580c0121d02fcfa108161b7f4a16fd 100644 (file)
@@ -22,7 +22,7 @@
 #ifndef SD_CREDIT_CARD_H
 #define SD_CREDIT_CARD_H
 
-#include <stdint.h>
+#include <cstdint>
 
 int SdLuhnAlgorithm(const uint8_t *buf, unsigned long long buflen);
 
index 0fc3256b74c48ad7e50997b4520b782fa38ff7d6..3d0738eb6fd5c8176b2eb0679aae84fa6cb5209c 100644 (file)
 
 // ips_regex_test.cc author Russ Combs <rucombs@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "ips_options/ips_regex.h"
 
 #include "framework/base_api.h"
index 343a5a6c6641fd8a70899b47961be269028be9f7..4f833fe084458e238b5b20f9dc7e3ceafc4cce6f 100644 (file)
@@ -1,19 +1,20 @@
-set ( LATENCY_INCLUDES
-    packet_latency.h
-    rule_latency.h
-    latency_rules.h
-    )
 
 set ( LATENCY_SOURCES
+    latency_config.h
+    latency_rules.h
+    latency_stats.h
     latency_timer.h
     latency_util.h
+    latency_module.h
+    latency_module.cc
+    packet_latency.h
     packet_latency.cc
+    packet_latency_config.h
+    rule_latency_config.h
+    rule_latency_state.h
+    rule_latency.h
     rule_latency.cc
-    latency_module.cc
     )
 
 add_library ( latency STATIC ${LATENCY_SOURCES} )
 
-install ( FILES ${LATENCY_INCLUDES}
-    DESTINATION "${INCLUDE_INSTALL_PATH}/latency"
-)
index a3f799f767c9d3f075e099b3e0c40c52dfa5f5f4..46cbd1d982e0500909dadf6737bc422b12610c25 100644 (file)
@@ -1,10 +1,5 @@
 noinst_LIBRARIES = liblatency.a
 
-x_includedir = $(pkgincludedir)/latency
-
-x_include_HEADERS = \
-latency_rules.h
-
 liblatency_a_SOURCES = \
 latency_config.h \
 latency_rules.h \
@@ -13,9 +8,9 @@ latency_timer.h \
 latency_util.h \
 latency_module.h \
 latency_module.cc \
-packet_latency_config.h \
 packet_latency.h \
 packet_latency.cc \
+packet_latency_config.h \
 rule_latency_config.h \
 rule_latency_state.h \
 rule_latency.h \
index 3bbf21bfa49feec81e4d569e46e3bd12fbe17189..cdf30661ed9a153e9c2e10109a2a396373835899 100644 (file)
 
 // latency_module.cc author Joel Cornett <jocornet@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "latency_module.h"
 
 #include <chrono>
 
 #include "main/snort_config.h"
+
 #include "latency_config.h"
-#include "latency_stats.h"
 #include "latency_rules.h"
+#include "latency_stats.h"
 
 // -----------------------------------------------------------------------------
 // latency attributes
index f8d8bfbec5880286d4701fa4946bebe4ef1013eb..b9cb496735338b1e183944a62cfb93c34245d8a0 100644 (file)
 
 // packet_latency.cc author Joel Cornett <jocornet@cisco.com>
 
-#include "packet_latency.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <cassert>
-#include <sstream>
-#include <vector>
+#include "packet_latency.h"
 
 #include "log/messages.h"
 #include "main/snort_config.h"
-#include "main/thread.h"
 #include "protocols/packet.h"
-#include "sfip/sf_ip.h"
-#include "time/clock_defs.h"
 #include "utils/stats.h"
 
 #include "latency_config.h"
+#include "latency_rules.h"
+#include "latency_stats.h"
 #include "latency_timer.h"
 #include "latency_util.h"
-#include "latency_stats.h"
-#include "latency_rules.h"
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
 
 #ifdef UNIT_TEST
 #include "catch/catch.hpp"
index 6685ebc5f068ae1f90490234ff5b481c874ae9b2..504b3bf8ff0018adf58c822b86fe27706991ea4c 100644 (file)
@@ -21,8 +21,6 @@
 #ifndef PACKET_LATENCY_H
 #define PACKET_LATENCY_H
 
-#include <cstdint>
-
 struct Packet;
 
 class PacketLatency
index 3c09177071a739b1011fa0da27345911104df8ff..d437442402c97a5d1e5bb1f9ce0c8a1c30f894d4 100644 (file)
 
 // rule_latency.cc author Joel Cornett <jocornet@cisco.com>
 
-#include "rule_latency.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <cassert>
-#include <memory>
-#include <sstream>
+#include "rule_latency.h"
 
 #include "detection/detection_options.h"
 #include "detection/treenodes.h"
-#include "events/event_queue.h"
-#include "log/messages.h"
 #include "main/snort_config.h"
+#include "log/messages.h"
 #include "protocols/packet.h"
-#include "sfip/sf_ip.h"
 #include "utils/stats.h"
 
 #include "latency_config.h"
@@ -42,6 +36,7 @@
 #include "latency_stats.h"
 #include "latency_timer.h"
 #include "latency_util.h"
+#include "rule_latency_state.h"
 
 #ifdef UNIT_TEST
 #include "catch/catch.hpp"
index ed18ffb74d5719d8580c4eaebddb7c32b627fe17..fdea53f4d746298cbcd2f019a4d591272b82b089 100644 (file)
@@ -21,7 +21,6 @@
 #ifndef RULE_LATENCY_CONFIG_H
 #define RULE_LATENCY_CONFIG_H
 
-#include <cstdint>
 #include "time/clock_defs.h"
 
 struct RuleLatencyConfig
index 7ceb5ec16709fdb76752b988c66d1c180e4ef827..066cb2ca6487fe91a164d70c0e100165c8067c13 100644 (file)
@@ -1,8 +1,6 @@
 
 set (LOG_INCLUDES
-    log.h
     messages.h
-    obfuscator.h
     text_log.h
     unified2.h
 )
@@ -10,10 +8,12 @@ set (LOG_INCLUDES
 add_library ( log STATIC
     ${LOG_INCLUDES}
     log.cc
+    log.h
     log_text.cc
     log_text.h
     messages.cc
     obfuscator.cc
+    obfuscator.h
     text_log.cc
 )
 
index d2289aa618ad50ace871a3e3141c6eb49d060cef..4f7a27a30f54980fa53a1a7a4e253ba32a7fd03e 100644 (file)
@@ -4,18 +4,18 @@ noinst_LIBRARIES = liblog.a
 x_includedir = $(pkgincludedir)/log
 
 x_include_HEADERS = \
-log.h \
 messages.h \
-obfuscator.h \
 text_log.h \
 unified2.h
 
 liblog_a_SOURCES = \
 log.cc \
+log.h \
 log_text.cc \
 log_text.h \
 messages.cc \
 obfuscator.cc \
+obfuscator.h \
 text_log.cc
 
 if ENABLE_UNIT_TESTS
index 8cc6b0d9805ba4f53a596df604add188af2e3243..05533eae79661443e3ff5b12972944001700e8df 100644 (file)
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
-#include "log.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <sys/types.h>
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-#include <signal.h>
+#include "log.h"
 
-#include <string>
 #include <mutex>
 
 #include "main/snort_debug.h"
-#include "main/snort_config.h"
+#include "protocols/packet.h"
 #include "protocols/tcp.h"
 #include "utils/util.h"
 
index 810f3adfeb5d0c6cd31a5fcb93e0686b2ace8f5d..62d8c4dcf7809dca4464bd90f7fc943d2dccf4ab 100644 (file)
 #ifndef LOG_H
 #define LOG_H
 
-#include "protocols/packet.h"
+#include <cstdio>
+
 #include "main/snort_types.h"
 
+struct Packet;
 namespace tcp { struct TCPHdr; }
 
 SO_PUBLIC void CreateTCPFlagString(const tcp::TCPHdr* const, char*);
index 12dae1bc375e7da27787884ba650a53b1e9ef517..566038235d47d9862429e840b43fb19d56a8b880 100644 (file)
 // @file    log_text.c
 // @author  Russ Combs <rcombs@sourcefire.com>
 
-#include "log_text.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-extern "C" {
+#include "log_text.h"
+
 #include <sfbpf_dlt.h>
-}
 
 #include "detection/detection_util.h"
-#include "log/messages.h"
+#include "detection/signature.h"
+#include "events/event.h"
 #include "main/snort_config.h"
 #include "packet_io/sfdaq.h"
 #include "protocols/eth.h"
@@ -46,8 +45,8 @@ extern "C" {
 #include "utils/util_net.h"
 
 #include "log.h"
+#include "messages.h"
 #include "obfuscator.h"
-#include "text_log.h"
 
 /*--------------------------------------------------------------------
  * utility functions
index 2eb74647c54c2f0ed0ca3e1f1f44b826ee8b9e82..50f59a6cd9d3d67f8b83a3af14fa86106cfce366 100644 (file)
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
-#include "log/messages.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <sys/types.h>
-#include <dirent.h>
-#include <fnmatch.h>
+#include "messages.h"
 
-#include <stdarg.h>
 #include <syslog.h>
-#include <errno.h>
-#include <sys/stat.h>
-#include <time.h>
-#include <signal.h>
-#include <unistd.h>
-#include <pcap.h>
-#include <string.h>
-#include <grp.h>
-#include <pwd.h>
-#include <netdb.h>
-#include <limits.h>
-#include <fcntl.h>
+
+#include <cassert>
+#include <cstdarg>
 
 #include "main/snort_config.h"
-#include "main/snort_debug.h"
-#include "packet_io/sfdaq.h"
 #include "parser/parser.h"
 #include "time/packet_time.h"
-#include "time/timersub.h"
-#include "sfip/sf_ip.h"
 #include "utils/util.h"
 
 #ifdef UNIT_TEST
index 3a09ff7d7cd22414c5df7c88174650290dc756d6..89aef8e775dac5c4d27fe7ec21b7b6779e7be50b 100644 (file)
 #ifndef MESSAGES_H
 #define MESSAGES_H
 
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
+#include <cstdio>
+#include <ctime>
 
 #include "main/snort_types.h"
 
-#include <cstdio>
-
 #define LOG_DIV "--------------------------------------------------"
 
 #ifndef __GNUC__
index cb9af4f2449fed6faa587e3467ce46013f47371a..4b2f11e1910ac9d53b27b46e4f5ec89c669fc8b9 100644 (file)
 
 // obfuscate.h author Victor Roemer <viroemer@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "obfuscator.h"
 
 bool Obfuscator::first(ObfuscatorBlock &b)
index f303a14cc6ff27642025afbc7712bba8ccfdb2fb..46f225c49f0175ed07a10b61d53ec43273d56f81 100644 (file)
@@ -21,8 +21,8 @@
 #ifndef OBFUSCATOR_H
 #define OBFUSCATOR_H
 
-#include <stddef.h>
-#include <stdint.h>
+#include <cstddef>
+#include <cstdint>
 #include <set>
 
 struct ObfuscatorBlock
index ee5efc7cef1882de65b3dceea081e0649d377169..ea11605097ae39947bf7655dcc655b00685a7c89 100644 (file)
 
 // obfuscator_test.cc author Victor Roemer <viroemer@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "../obfuscator.h"
 
 #include <CppUTest/CommandLineTestRunner.h>
index aa933031f2fe4cd721a7ccded06c1a0f325a267c..ee1addaf04b30130643d3086f4d4973ecbe366a6 100644 (file)
  * @brief  implements buffered text stream for logging
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "text_log.h"
 
-#include <stdarg.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
 #include <sys/stat.h>
 
-#include "log.h"
-#include "main/snort_types.h"
+#include <cstdarg>
+
 #include "utils/util.h"
 
+#include "log.h"
+
 /* some reasonable minimums */
 #define MIN_BUF  (1* K_BYTES)
 #define MIN_FILE (MIN_BUF)
index bd8c15963c20e95b01b51ed1ad6a26365b523f1f..b66bbdef79a6dea808154c16fd06bfeaba9d034d 100644 (file)
@@ -34,9 +34,7 @@
  * name plus a timestamp.
  */
 
-#include <stdio.h>
-#include <string.h>
-#include <time.h>
+#include <cstring>
 
 #include "main/snort_types.h"
 
index fac1640da3352b9390857dd6bdd0dbfd301d1a0e..5f3418ae1ae987371cdcb0858406ed5b87695cba 100644 (file)
 #ifndef UNIFIED2_H
 #define UNIFIED2_H
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <sys/types.h>
-#if defined(__linux__)
-#include <stdint.h>
-#endif
 #include <netinet/in.h>
 
 #include "protocols/protocol_ids.h"
index e7f35f6033e42376e2e7d0ea22fbec4c113190b4..ed7fa1cde4c1547f8e1702b1a0f124e880ab7da3 100644 (file)
 #include "config.h"
 #endif
 
-#include <assert.h>
-#include <sys/types.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#include <string>
-#include <vector>
-
-#include "main/snort_debug.h"
+#include "detection/signature.h"
+#include "events/event.h"
 #include "framework/logger.h"
 #include "framework/module.h"
-#include "detection/signature.h"
-#include "utils/util.h"
-#include "utils/stats.h"
 #include "log/log.h"
-#include "log/text_log.h"
 #include "log/log_text.h"
-#include "protocols/packet.h"
-#include "protocols/tcp.h"
-#include "protocols/udp.h"
-#include "protocols/icmp4.h"
-#include "protocols/icmp6.h"
-#include "protocols/eth.h"
+#include "log/text_log.h"
 #include "packet_io/active.h"
 #include "packet_io/sfdaq.h"
+#include "protocols/eth.h"
+#include "protocols/icmp4.h"
+#include "protocols/tcp.h"
+#include "protocols/udp.h"
+#include "utils/stats.h"
 
 using namespace std;
 
index e62741a53e992f1c245c5fcc2b0f8d77f1c5c273..feb2b45bad79a1d5bde8a5fb3373d88b8fcce08e 100644 (file)
 #include "config.h"
 #endif
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/types.h>
-
-#include <string>
-
-#include "main/snort_debug.h"
-#include "main/snort_config.h"
+#include "detection/signature.h"
+#include "events/event.h"
 #include "framework/logger.h"
 #include "framework/module.h"
-#include "protocols/packet.h"
-#include "parser/parser.h"
-#include "utils/util.h"
-#include "log/text_log.h"
 #include "log/log_text.h"
+#include "log/text_log.h"
+#include "main/snort_config.h"
 #include "packet_io/active.h"
-#include "packet_io/sfdaq.h"
 #include "packet_io/intf.h"
-#include "events/event.h"
+#include "packet_io/sfdaq.h"
 
 using namespace std;
 
index b5e411984516746e7522693d57bacaac10e98d2a..c2df1c4db5545bf719a6404a0519fb459f081c3a 100644 (file)
 #include "config.h"
 #endif
 
-#include <stdio.h>
-#include <stdlib.h>
-
-#include <string>
-
-#include "main/snort_types.h"
-#include "main/snort_debug.h"
-#include "main/snort_config.h"
+#include "detection/signature.h"
+#include "events/event.h"
 #include "framework/logger.h"
 #include "framework/module.h"
-#include "events/event.h"
-#include "protocols/packet.h"
-#include "parser/parser.h"
-#include "utils/util.h"
-#include "log/text_log.h"
 #include "log/log_text.h"
-#include "packet_io/sfdaq.h"
+#include "log/text_log.h"
+#include "main/snort_config.h"
 #include "packet_io/intf.h"
+#include "packet_io/sfdaq.h"
+#include "protocols/packet.h"
 
 using namespace std;
 
index 1287f1a0d73362fcdc08fd415062e3484fc7ee45..2d0593ac57cd14e0e79b8a9399c113c1c5d0b7ef 100644 (file)
 //--------------------------------------------------------------------------
 // alert_luajit.cc author Russ Combs <rucombs@cisco.com>
 
-#include <assert.h>
-#include <vector>  // FIXIT-W Returning null reference (somewhere below)
-#include <lua.hpp>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include "main/snort_types.h"
-#include "main/thread_config.h"
+#include "detection/signature.h"
 #include "events/event.h"
+#include "framework/logger.h"
+#include "framework/module.h"
 #include "helpers/chunk.h"
 #include "log/messages.h"
 #include "lua/lua.h"
-#include "managers/event_manager.h"
+#include "main/thread_config.h"
 #include "managers/lua_plugin_defs.h"
-#include "managers/module_manager.h"
 #include "managers/plugin_manager.h"
 #include "managers/script_manager.h"
-#include "hash/sfhashfcn.h"
-#include "parser/parser.h"
+#include "profiler/profiler_defs.h"
 #include "protocols/packet.h"
-#include "framework/logger.h"
-#include "framework/module.h"
-#include "framework/parameter.h"
-#include "profiler/profiler.h"
-#include "utils/stats.h"
 
 static THREAD_LOCAL ProfileStats luaLogPerfStats;
 
index 96daa14a649c4ba314843ff0a7d3afaecc8d4e58..e8a2cd3122c63a937f6894dedfc4406c34e1353a 100644 (file)
 
 /* We use some Linux only socket capabilities */
 
-#include <errno.h>
-#include <stdlib.h>
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
 #ifdef __linux__
+
 #include <sys/socket.h>
 #include <sys/un.h>
 
-#include <string>
-#include <vector>
-
-#include "main/snort_types.h"
-#include "main/snort_config.h"
-#include "main/snort_debug.h"
+#include "detection/treenodes.h"
+#include "events/event.h"
 #include "framework/logger.h"
 #include "framework/module.h"
 #include "log/messages.h"
+#include "main/snort_config.h"
 #include "managers/event_manager.h"
-#include "detection/rules.h"
-#include "detection/treenodes.h"
-#include "events/event.h"
-#include "hash/sfghash.h"
 #include "parser/parser.h"
 #include "protocols/packet.h"
 #include "target_based/snort_protocols.h"
index a64bc948aee592447edb51466a71b66dc26dc731..9f0f5b596d2814b8e772dc12df3632b19ac88fe3 100644 (file)
 #include "config.h"
 #endif
 
-#include <sys/types.h>
 #include <syslog.h>
-#include <stdlib.h>
 
-#include <string>
-
-#include "log/messages.h"
-#include "main/snort_debug.h"
-#include "main/snort_config.h"
+#include "detection/signature.h"
+#include "events/event.h"
 #include "framework/logger.h"
 #include "framework/module.h"
+#include "log/messages.h"
+#include "main/snort_config.h"
+#include "packet_io/intf.h"
+#include "packet_io/sfdaq.h"
 #include "protocols/packet.h"
-#include "detection/detect.h"
-#include "detection/rules.h"
-#include "detection/treenodes.h"
-#include "events/event.h"
-#include "parser/parser.h"
 #include "utils/util.h"
 #include "utils/util_net.h"
-#include "packet_io/sfdaq.h"
-#include "packet_io/intf.h"
 
 using namespace std;
 
index 66b9ef610153e2cd19ed29c4eecadef6824f0b04..dab0a5d8c64d465f466dff14b14d404e719914b4 100644 (file)
 #include "config.h"
 #endif
 
-#include <ctype.h>
-#include <string.h>
-
-#include <algorithm>
-#include <iostream>
-
-#include "main/snort_types.h"
-#include "main/snort_config.h"
+#include "detection/signature.h"
+#include "events/event.h"
 #include "framework/logger.h"
 #include "framework/module.h"
-#include "protocols/packet.h"
-#include "protocols/packet_manager.h"
-#include "detection/signature.h"
-#include "log/text_log.h"
 #include "log/log_text.h"
-#include "utils/stats.h"
+#include "log/text_log.h"
+#include "main/snort_config.h"
+#include "protocols/packet_manager.h"
 
 static THREAD_LOCAL TextLog* test_file = nullptr;
 
index 658c7d76588cee117f17b51a3d0c484e73e0494d..906d982e4ac1584e39d7b6e208f8ddab91db90b7 100644 (file)
 #include "config.h"
 #endif
 
-#include <ctype.h>
-#include <string.h>
-
-#include <algorithm>
-#include <iostream>
-#include <string>
-
-#include "main/snort_types.h"
 #include "framework/logger.h"
 #include "framework/module.h"
-#include "protocols/packet.h"
 #include "log/text_log.h"
-#include "sfip/sf_ip.h"
+#include "protocols/packet.h"
 
 using namespace std;
 
index 4c7c69f8d5166085867eaa8af318f9636e7c30f1..b212d01003a94fa08f843f8fbe953111fe144a94 100644 (file)
 #include "config.h"
 #endif
 
-#include <sys/types.h>
-#include <ctype.h>
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-#include <unistd.h>
-#include <time.h>
 #include <pcap.h>
 
-extern "C" {
-#include <sfbpf_dlt.h>
-}
-
-#include <string>
-
-#include "log/messages.h"
-#include "main/snort_debug.h"
-#include "main/snort_config.h"
 #include "framework/logger.h"
 #include "framework/module.h"
+#include "log/messages.h"
+#include "main/snort_config.h"
 #include "protocols/packet.h"
-#include "events/event.h"
-#include "parser/parser.h"
 #include "packet_io/sfdaq.h"
 #include "utils/util.h"
-#include "utils/stats.h"
 
 using namespace std;
 
index e3a9e7d259d80f5bc0dfb0e163f848245ce1b5df..16656bf8e7f7430c438afa0279cbeefcd56b94db 100644 (file)
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
-#include "loggers.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include "framework/logger.h"
+#include "loggers.h"
+
 #include "managers/plugin_manager.h"
 
 // to ensure PacketManager::log_protocols() is built into Snort++
index a93641a2f9567743df2191258928667d03cb82ab..97cc97418e7d731f22d82e71cb6abe45b1df9871 100644 (file)
  *
  */
 
-#include "log/unified2.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <sys/types.h>
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-#include <time.h>
-#include <netinet/in.h>
-
-#include <string>
-
-#include "main/snort_types.h"
-#include "main/snort_debug.h"
-#include "main/snort_config.h"
-#include "framework/logger.h"
-#include "framework/module.h"
-#include "protocols/packet.h"
-#include "detection/rules.h"
-#include "detection/treenodes.h"
+#include "detection/signature.h"
 #include "detection/detection_util.h"
-#include "detection/detect.h"
-#include "parser/parser.h"
 #include "events/event.h"
+#include "framework/logger.h"
+#include "framework/module.h"
 #include "log/messages.h"
 #include "log/obfuscator.h"
+#include "log/unified2.h"
+#include "main/snort_config.h"
 #include "packet_io/active.h"
 #include "packet_io/sfdaq.h"
-#include "protocols/layer.h"
-#include "protocols/vlan.h"
 #include "protocols/icmp4.h"
+#include "protocols/packet.h"
+#include "protocols/vlan.h"
 #include "stream/stream.h"
 #include "utils/safec.h"
 #include "utils/util.h"
index 780f6184121b426656b814e4fdab4a0da24e7c0b..6816fd97485b25866af345cd77cfe28250e58365 100644 (file)
 //--------------------------------------------------------------------------
 // lua.cc author Joel Cornett <jocornet@cisco.com>
 
-#include "lua.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <assert.h>
+#include "lua.h"
+
+#include <cassert>
+#include <utility>
 
 namespace Lua
 {
@@ -66,8 +67,3 @@ ManageStack::~ManageStack()
 }
 }
 
-#ifdef UNIT_TEST
-// FIXIT-L Catch issue; see sfip/sf_ip.cc
-#include "lua_stack_test.cc"
-#endif
-
index d9bb96d60579431d82d6f9687db227948022e879..b1aa6f2a2c1e7472ae57a9e9d0d7ed3a351fc8a1 100644 (file)
@@ -22,7 +22,6 @@
 
 // methods and templates for the C++ / LuaJIT interface
 
-#include <string>
 #include <lua.hpp>
 
 #include "main/snort_types.h"
index bd418fc4ec2e165718b4cc34addb3da68c9d5fa4..95ce00ffa93b1f16fba8dcc81f758d7a27be607a 100644 (file)
@@ -20,8 +20,6 @@
 #ifndef LUA_ARG_H
 #define LUA_ARG_H
 
-#include <lua.hpp>
-
 #include "lua_stack.h"
 
 namespace Lua
index 74199aa55863652f2c665880fa589c8684e95dec..9aded7a4e430c8d58bb25ab035bbc10162066df8 100644 (file)
@@ -21,7 +21,6 @@
 #define LUA_IFACE_H
 
 #include <cassert>
-#include <lua.hpp>
 
 #include "lua.h"
 #include "lua_ref.h"
index f0ae2e70c44e9e38c24daa29e3a14dd851a7c859..c0e2ba275155caa67dd6d025130e390b8691f028 100644 (file)
 //--------------------------------------------------------------------------
 // lua_ref.cc author Joel Cornett <jocornet@cisco.com>
 
-#include "lua_ref.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <lua.hpp>
+#include "lua_ref.h"
 
 #include "lua.h"
 
index f951e1d96a53031bb7896558b1e19f5649907dc5..76d2c148678b42022fe39e86b48482ad39b680f2 100644 (file)
 #ifndef LUA_STACK_H
 #define LUA_STACK_H
 
-#include <string>
-#include <type_traits>
 #include <lua.hpp>
 
+#include <string>
+
 namespace Lua
 {
 template<typename T>
index b32d6a638e263d24235d17aec77e9e22378d5c9a..473981cbf304316276854971796e231d32db318c 100644 (file)
 //--------------------------------------------------------------------------
 // lua_stack_test.cc author Joel Cornett <jocornet@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <cstring>
 #include <string>
-#include <lua.hpp>
 
 #include "catch/catch.hpp"
+#include "catch/unit_test.h"
 
 #include "lua_test_common.h"
 #include "lua/lua_stack.h"
 
+SNORT_CATCH_FORCED_INCLUSION_DEFINITION(lua_stack_test);
+
 static lua_State* L = nullptr;
 
 static void test_signed()
index 38a153591b4d3f31f17f7febf026015dcb10fd8f..9460cde34e8f2e4c2023cc43258b87c29155c840 100644 (file)
@@ -21,7 +21,6 @@
 #define LUA_TABLE_H
 
 #include <vector>
-#include <lua.hpp>
 
 #include "lua_stack.h"
 
index f3e5a863b78b5988284a4d433e06e05d8c3aff2f..1ac327b9308c292c44f4677c1c072cd53c3b1bba 100644 (file)
@@ -21,8 +21,7 @@
 #ifndef LUA_TEST_COMMON_H
 #define LUA_TEST_COMMON_H
 
-#include <utility>
-#include <string.h>
+//#include <utility>
 #include <lua.hpp>
 
 inline void l_end_lua_state(lua_State*& L_ptr)
index bf67fb31c669887b1a3befc451598e6d18c9d26d..26799335e51f4ba942487be5af921017e4df7be7 100644 (file)
 //--------------------------------------------------------------------------
 // lua_util.cc author Joel Cornett <jocornet@cisco.com>
 
-#include "lua_util.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <stdio.h>
+#include "lua_util.h"
 
 #define LUA_MSG_BUFSIZE     128
 
index 0bbfbc6bdc3a5a7ee34ab91a3bb6d490062dddd1..7f95173863f110fa5069fd409dedd23b7bbb5ba4 100644 (file)
@@ -20,7 +20,6 @@
 #ifndef LUA_UTIL_H
 #define LUA_UTIL_H
 
-#include <limits>
 #include <string>
 
 #include <lua.hpp>
index b10489b56cd6e70f1a6ad34ad44388420f38a457..42d6d94fd8026d516ad1c8e9655c6e765d4e90a7 100644 (file)
 //--------------------------------------------------------------------------
 // main.cc author Russ Combs <rucombs@cisco.com>
 
-#include "main.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <assert.h>
-#include <sys/types.h>
-#include <sys/select.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <string.h>
-#include <time.h>
-
-#ifdef SHELL
-#include <sys/socket.h>
-#include <netinet/in.h>
-#endif
+#include "main.h"
 
-#include <mutex>
-#include <string>
 #include <thread>
 
+#include "control/idle_processing.h"
+#include "framework/module.h"
+#include "helpers/process.h"
 #include "helpers/ring.h"
+#include "helpers/swapper.h"
 #include "log/messages.h"
+#include "lua/lua.h"
 #include "main/analyzer.h"
 #include "main/shell.h"
 #include "main/snort.h"
 #include "main/snort_debug.h"
 #include "main/snort_module.h"
 #include "main/thread_config.h"
-#include "framework/module.h"
+#include "managers/inspector_manager.h"
 #include "managers/module_manager.h"
 #include "managers/plugin_manager.h"
-#include "managers/inspector_manager.h"
 #include "memory/memory_cap.h"
-#include "utils/util.h"
-#include "parser/parser.h"
-#include "packet_io/trough.h"
-#include "packet_io/intf.h"
 #include "packet_io/sfdaq.h"
-#include "control/idle_processing.h"
+#include "packet_io/trough.h"
 #include "target_based/sftarget_reader.h"
-#include "flow/flow_control.h"
-#include "lua/lua.h"
-#include "helpers/process.h"
-#include "helpers/swapper.h"
 #include "time/periodic.h"
+#include "utils/util.h"
 #include "utils/safec.h"
 
 #ifdef UNIT_TEST
index 3e48b8dd0409f5b4a43d92a0cd65970442380e3e..500a1b44efc6be0cd195ed86493639e71595ca3e 100644 (file)
 #ifndef MAIN_H
 #define MAIN_H
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 struct lua_State;
 
 const char* get_prompt();
index f4e5b2e85dfb08e2b20ea3bcc8e500f23363e2a2..f05947b71d8ec84111f07816ace6994e95a913b1 100644 (file)
 //--------------------------------------------------------------------------
 // analyzer.cc author Russ Combs <rucombs@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "analyzer.h"
 
-#include <chrono>
 #include <thread>
 
+#include "helpers/swapper.h"
+#include "log/messages.h"
 #include "main.h"
+#include "packet_io/sfdaq.h"
+
 #include "snort.h"
 #include "snort_debug.h"
 #include "thread.h"
-#include "helpers/swapper.h"
-#include "log/messages.h"
-#include "memory/memory_cap.h"
-#include "packet_io/sfdaq.h"
 
 using namespace std;
 
index 57c5d5b77ba4e89ccfa230c53d043d0daeab393e..62f600b2aa6d210e8185bf39543b1eae89e6d845 100644 (file)
@@ -25,7 +25,6 @@
 // to control the thread and swap configuration.
 
 #include <atomic>
-#include "main/snort_types.h"
 
 enum AnalyzerCommand
 {
index 17a2db05ec625b2bcd8619ddf51f9ce3a25d15a1..e4f23aee91adacd602e190971671ad96c8ae72a5 100644 (file)
 //--------------------------------------------------------------------------
 // help.cc author Russ Combs <rucombs@cisco.com>
 
-#include "help.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <syslog.h>
+#include "help.h"
+
 #include <iostream>
-#include <string>
 
-#include "main.h"
-#include "main/snort_config.h"
-#include "main/snort_module.h"
 #include "framework/module.h"
-#include "framework/parameter.h"
+#include "helpers/markup.h"
+#include "helpers/process.h"
 #include "managers/event_manager.h"
-#include "managers/so_manager.h"
 #include "managers/inspector_manager.h"
 #include "managers/module_manager.h"
 #include "managers/plugin_manager.h"
 #include "managers/script_manager.h"
-#include "packet_io/sfdaq.h"
+#include "managers/so_manager.h"
 #include "packet_io/intf.h"
-#include "parser/config_file.h"
-#include "helpers/process.h"
+#include "packet_io/sfdaq.h"
 #include "utils/util.h"
-#include "helpers/markup.h"
+
+#include "snort_config.h"
+#include "snort_module.h"
 
 using namespace std;
 
index 0ffa2a8e8874b89f53b1235bb899a25bd5a6865a..98e4fc8a977e988f6b5b58a83f20030d004701d7 100644 (file)
 
 // modules.cc author Russ Combs <rucombs@cisco.com>
 
-#include "modules.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include "snort_config.h"
-#include "snort_module.h"
-#include "thread_config.h"
+#include "modules.h"
 
 #include "codecs/codec_module.h"
 #include "detection/fp_config.h"
-#include "file_api/file_module.h"
 #include "filters/detection_filter.h"
 #include "filters/rate_filter.h"
 #include "filters/sfrf.h"
 #include "filters/sfthd.h"
-#include "flow/ha_module.h"
 #include "filters/sfthreshold.h"
+#include "flow/ha_module.h"
 #include "framework/module.h"
 #include "host_tracker/host_tracker_module.h"
 #include "host_tracker/host_cache_module.h"
 #include "parser/parse_conf.h"
 #include "parser/parse_ip.h"
 #include "parser/parser.h"
-#include "profiler/profiler.h"
+#include "profiler/profiler_defs.h"
 #include "search_engines/pat_stats.h"
 #include "side_channel/side_channel_module.h"
-#include "sfip/sf_ip.h"
 #include "sfip/sf_ipvar.h"
 #include "stream/stream.h"
 #include "target_based/sftarget_data.h"
 #include "target_based/snort_protocols.h"
 
+#include "snort_config.h"
+#include "snort_module.h"
+#include "thread_config.h"
+
 using namespace std;
 
 //-------------------------------------------------------------------------
index 2e3e3595cbb49762d47333dced247f32df5ba9fa..cd336a9dcd04dcb2140903185cede0e74b0ee8e5 100644 (file)
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
-#include "policy.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
+#include "policy.h"
 
+#include "detection/detect.h"
 #include "managers/inspector_manager.h"
 #include "parser/vars.h"
-#include "main/shell.h"
-#include "main/snort_config.h"
-#include "detection/detect.h"
-#include "ports/port_table.h"
-#include "ports/port_utils.h"
 #include "ports/port_var_table.h"
 
+#include "shell.h"
+#include "snort_config.h"
+
 //-------------------------------------------------------------------------
 // traffic policy
 //-------------------------------------------------------------------------
index 5ed904659178cc253e5b6f428514e3255d281800..867168e5fe4c35c9932d1cb89930513898cc86cb 100644 (file)
 // -- inspection - for flow handling
 // -- ips - for rule handling
 
-#include <string>
-#include <vector>
-
-#include "main/snort_types.h"
 #include "framework/data_bus.h"
 
 struct PortTable;
index 3c603f7cf2ffc95f835b1e0d185e47c296b5149d..8f667342513e34d49a5803fb3e986a3c74b57a5b 100644 (file)
 //--------------------------------------------------------------------------
 // shell.cc author Russ Combs <rucombs@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "shell.h"
 
-#include <assert.h>
-#include <string.h>
-#include <string>
-#include <lua.hpp>
+#include <cassert>
+#include <cstring>
 #include <stdexcept>
 
-#include "framework/module.h"
+#include "log/messages.h"
 #include "lua/lua.h"
 #include "managers/module_manager.h"
-#include "parser/parser.h"
-#include "log/messages.h"
 
 using namespace std;
 
index ccf9b4987b91cf8a940326857fb44a44ca8a09fa..1ff80b21f0d6ad35e637d3c2baa53cf5ca3cd82e 100644 (file)
@@ -23,6 +23,7 @@
 // Shell encapsulates a Lua state.  There is one for each policy file.
 
 #include <string>
+
 struct lua_State;
 
 class Shell
index ab7b8b0059161fc0c572e6367988fec1d44c45d0..4db936b4da3b0a2f6d536dda7633ca8137d95a9a 100644 (file)
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
-#include "snort.h"
-
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
-#include <assert.h>
-#include <ctype.h>
-#include <fcntl.h>
-#include <netdb.h>
-#include <string.h>
-#include <syslog.h>
-#include <time.h>
-#include <unistd.h>
+#include "snort.h"
 
-#include <netinet/in.h>
 #include <sys/stat.h>
+#include <syslog.h>
 
 #include "actions/ips_actions.h"
 #include "codecs/codec_api.h"
 #include "ips_options/ips_options.h"
 #include "latency/packet_latency.h"
 #include "latency/rule_latency.h"
+#include "log/log.h"
 #include "log/messages.h"
 #include "loggers/loggers.h"
+#include "main.h"
 #include "managers/action_manager.h"
 #include "managers/codec_manager.h"
 #include "managers/inspector_manager.h"
 #include "managers/plugin_manager.h"
 #include "managers/script_manager.h"
 #include "network_inspectors/network_inspectors.h"
-#include "packet_io/sfdaq.h"
 #include "packet_io/active.h"
+#include "packet_io/sfdaq.h"
 #include "packet_io/trough.h"
 #include "parser/cmd_line.h"
 #include "parser/parser.h"
 #include "perf_monitor/perf_monitor.h"
 #include "profiler/profiler.h"
-#include "protocols/packet.h"
-#include "protocols/packet_manager.h"
 #include "search_engines/search_engines.h"
 #include "service_inspectors/service_inspectors.h"
 #include "side_channel/side_channel.h"
@@ -97,9 +88,7 @@
 #endif
 
 #include "build.h"
-#include "main.h"
 #include "snort_config.h"
-#include "snort_debug.h"
 #include "thread_config.h"
 
 using namespace std;
index d3ce2658c59303d84ece9043a3708567fd2a7c61..59080c9bcc61fc0fc1dcd991d74dd24196e9c423 100644 (file)
 
 // Snort is the top-level application class.
 
-#include <assert.h>
-#include <sys/types.h>
-#include <stdio.h>
-#include "main/snort_types.h"
-
-extern "C" {
 #include <daq_common.h>
-}
+
+#include "main/snort_types.h"
 
 class Flow;
 struct Packet;
index bc9e43642a85e60b8c5457dd5433e25e1ea4e74c..b7cadb71947f0206f364803a891dcf4ba562324a 100644 (file)
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
-#include "snort_config.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
+#include "snort_config.h"
+
 #include "detection/fp_config.h"
 #include "detection/fp_create.h"
 #include "filters/detection_filter.h"
 #include "parser/parser.h"
 #include "parser/vars.h"
 #include "profiler/profiler.h"
+#include "protocols/packet.h"
 #include "sfip/sf_ip.h"
-#include "thread_config.h"
 #include "target_based/sftarget_reader.h"
+#include "target_based/snort_protocols.h"
 #include "utils/util.h"
 
 #ifdef HAVE_HYPERSCAN
@@ -53,6 +54,8 @@
 #include "search_engines/hyperscan.h"
 #endif
 
+#include "thread_config.h"
+
 THREAD_LOCAL SnortConfig* snort_conf = nullptr;
 uint32_t SnortConfig::warning_flags = 0;
 
index 62a262c2fa3bea6183e5a99dbe69422ee73c9dfc..e01df2cd9a47e4f90255e48d25b7459e613f8e52 100644 (file)
 // SnortConfig encapsulates all data loaded from the config files.
 // FIXIT-L privatize most of this stuff.
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #include "events/event_queue.h"
 #include "file_api/file_config.h"
 #include "framework/bits.h"
index a1d44622a81b994e1189d26c372267cecbc3e8a0..4b4cff12cb1a364582e81cf64d8fd391cdb6a08c 100644 (file)
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "snort_debug.h"
 
-#include <stdio.h>
-#include <stdarg.h>
 #include <syslog.h>
-#include <stdlib.h>
+
+#include <cstring>
 
 #include "log/messages.h"
+#include "utils/safec.h"
 
-#include "snort_types.h"
 #include "snort_config.h"
-#include "utils/safec.h"
 
 bool Debug::init = false;
 uint64_t Debug::mask = 0;
index f52471afe70a9e2f2f5170f3d8349a0b7d473b84..353f8d141d4b9928f2c293fe580a0d14e5a8497e 100644 (file)
 //
 // FIXIT-M debug flags needs to be replaced with a module facility.
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #include <cstdarg>
-#include <cstdio>
-#include <stdint.h>
-#include <ctype.h>
 
 #include "main/snort_types.h"
 
index c649501cacc213ccf450957bbe9d448029e6b570..498e4d9b4095cbc30948f63bc7e746a5358e8a8a 100644 (file)
 
 // snort_module.cc author Russ Combs <rucombs@cisco.com>
 
-#include "snort_module.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <assert.h>
-#include <string.h>
-
-#include <string>
+#include "snort_module.h"
 
-#include "main.h"
-#include "snort_config.h"
-#include "help.h"
-#include "shell.h"
-#include "thread_config.h"
-#include "detection/detect.h"
-#include "framework/base_api.h"
 #include "framework/module.h"
 #include "framework/parameter.h"
 #include "log/messages.h"
-#include "managers/module_manager.h"
-#include "managers/plugin_manager.h"
+#include "main.h"
 #include "packet_io/sfdaq_config.h"
+#include "packet_io/trough.h"
 #include "parser/config_file.h"
 #include "parser/parser.h"
 #include "parser/parse_utils.h"
 #include "parser/vars.h"
-#include "packet_io/trough.h"
-#include "utils/stats.h"
 
 #ifdef UNIT_TEST
 #include "catch/unit_test.h"
 #endif
 
+#include "help.h"
+#include "shell.h"
+#include "snort_config.h"
+#include "thread_config.h"
+
 using namespace std;
 
 //-------------------------------------------------------------------------
index f1aeee6b3f7d6df1a65617c46d7ecdac6623b6bd..3b87b0c9f60c82762aef78573332e93b4281f795 100644 (file)
 
 // defines common types if not already defined
 
-#define __STDC_FORMAT_MACROS
-#include <inttypes.h>
-
-#include <stdint.h>
-#include <sys/types.h>
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
+#include <cinttypes>
+#include <cstddef>
+#include <cstdint>
 
 typedef uint16_t Port;
 
-/* use these macros (and those in <inttypes.h>)
- * for 64 bit format portability
- */
+/* use these macros for 64 bit format portability */
 #define STDu64 "%" PRIu64
-#define CSVu64 STDu64 ","
 #define FMTu64(fmt) "%" fmt PRIu64
 
 #define STDi64 "%" PRIi64
-#define CSVi64 STDi64 ","
 #define FMTi64(fmt) "%" fmt PRIi64
 
 #define STDx64 "%" PRIx64
-#define CSVx64 STDx64 ","
 #define FMTx64(fmt) "%" fmt PRIx64
 
-#ifndef UINT8_MAX
-#  define UINT8_MAX 0xff
-#endif
-
-#ifndef USHRT_MAX
-#  define USHRT_MAX  0xffff
-#endif
-
-#ifndef UINT16_MAX
-#  define UINT16_MAX 0xffff
-#endif
-
-#ifndef UINT32_MAX
-#  define UINT32_MAX (4294967295U)
-#endif
-
-#ifndef UINT64_MAX
-#  if SIZEOF_UNSIGNED_LONG_INT == 8
-#    define UINT64_MAX (18446744073709551615UL)
-#  else
-#    define UINT64_MAX (18446744073709551615ULL)
-#  endif
-#endif
-
-/* Somewhat arbitrary, but should be enough for this application
- * since files shouldn't be buried too deep.  This provides about
- * 15 levels of 255 character path components */
-#ifndef PATH_MAX
-#  define PATH_MAX 4096
-#endif
-
-/* utilities */
-
-#ifndef SIZE_MAX
-#define SIZE_MAX 0xFFFFFFFF  // FIXIT-L use c++ define
-#endif
-
-#ifndef INT32_MAX
-#define INT32_MAX 0x7FFFFFFF  // FIXIT-L use c++ define
-#endif
-
 #define UNUSED(x) (void)(x)
 
 #ifndef SO_PUBLIC
index cb441500f490e2559498ffa17df2b4760d0fc4c2..3611aec2dcd7c2b3177cc4becac8f860328abdb6 100644 (file)
 //--------------------------------------------------------------------------
 // thread.cc author Russ Combs <rucombs@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "thread.h"
 
 #include <sys/stat.h>
index ba4fe9fb09d5533d21f44ab77756dcc97a053222..025a80b42c2b6c102898669bfd652b869e0d19ac 100644 (file)
@@ -23,6 +23,7 @@
 // basic thread management utilities
 
 #include <string>
+
 #include "main/snort_types.h"
 
 #define THREAD_LOCAL_TBD
index 6cb9d492eaca4b4f831eec8c2af6274da995bc5b..5f7b864a66608f7800ca27cedfd2ca43c961c91d 100644 (file)
 //--------------------------------------------------------------------------
 // thread_config.cc author Michael Altizer <mialtize@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "thread_config.h"
 
 #include <hwloc.h>
index 31a475d8b4944d3e24957d00fa11063246f0718c..84a5a41fcfa73008ed2caa8c662a3f294b2ef5a1 100644 (file)
@@ -5,6 +5,7 @@ set (LUA_INCLUDES
 )
 
 set( MANAGERS_INCLUDES
+    codec_manager.h
     inspector_manager.h
 )
 
@@ -12,7 +13,6 @@ add_library( managers STATIC
     ${MANAGERS_INCLUDES}
     action_manager.h
     action_manager.cc
-    codec_manager.h
     codec_manager.cc
     event_manager.cc
     event_manager.h
index 745c687fb32a772e05af76fd2cacd5bf944a1a2d..f585253adccfbf139593d23b41dfae95e0162e26 100644 (file)
@@ -8,6 +8,7 @@ snort_plugin.lua
 x_mgrdir = $(pkgincludedir)/managers
 
 x_mgr_HEADERS = \
+codec_manager.h \
 inspector_manager.h
 
 noinst_LIBRARIES = libmanagers.a
index 954fc319e073e8d272a6a0f7cebc879538444c37..a0aced5eede3038dc749012cf940eb9e7771d683 100644 (file)
 //--------------------------------------------------------------------------
 // action_manager.cc author Russ Combs <rucombs@cisco.com>
 
-#include "action_manager.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <assert.h>
+#include "action_manager.h"
 
 #include <list>
 
 #include "actions/act_replace.h"
-#include "actions/ips_actions.h"
-#include "framework/ips_action.h"
 #include "log/messages.h"
-#include "main/snort_types.h"
-#include "main/snort_config.h"
-#include "main/snort_debug.h"
-#include "managers/module_manager.h"
-#include "parser/parser.h"
 #include "packet_io/active.h"
-#include "utils/util.h"
+#include "parser/parser.h"
 
 using namespace std;
 
index 78a6d48ce61df86bb26c217f2ceb00feb87ce98c..fcad8537e64f39f7e1e0ab65fc10299eb33900c7 100644 (file)
 // which is just a single response deferred until end of current packet
 // processing.
 
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include "main/snort_types.h"
 #include "actions/actions.h"
-#include "framework/base_api.h"
+#include "framework/ips_action.h"
+#include "framework/module.h"
 
 #ifdef PIGLET
 #include "framework/ips_action.h"
-#include "piglet/piglet_api.h"
 #endif
 
 struct ActionApi;
index 0bc4215b7cd91be2f22c7ef77d7e356d0950a4c7..8e0213af26863ed92d6bc48681012988a977f16b 100644 (file)
 // codec_manager.cc author Josh Rosenbaum <jrosenba@cisco.com>
 
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+#include "config.h"
 #endif
 
-#include <algorithm>
-#include <string.h>
+#include "codec_manager.h"
 
-#include "main/snort_config.h"
-#include "framework/codec.h"
-#include "managers/codec_manager.h"
-#include "protocols/packet_manager.h"
 #include "log/messages.h"
-#include "parser/parser.h"
+#include "main/snort_config.h"
 #include "packet_io/sfdaq.h"
+#include "protocols/packet_manager.h"
 #include "utils/dnet_header.h"
 
 struct CodecManager::CodecApiWrapper
index c5d764b90c4e35fb0b0794ea2296e14ac1a5789c..b6e0c9e39dfe552f305aa7a1485a7be5e6a40aa3 100644 (file)
 
 // Factory for Codecs.  Runtime support is provided by PacketManager.
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #include <array>
-#include <string>
 #include <vector>
-#include <cstdint>
 
 #include "main/thread.h"
 #include "protocols/protocol_ids.h"
 
 #ifdef PIGLET
 #include "framework/codec.h"
-#include "piglet/piglet_api.h"
 #endif
 
 struct SnortConfig;
index ffa1ece32f8b97fd93e3ae4409b1c891da5dc1e8..e5f03705f05f9d10fa8d88d4c1fb4a90285f37e2 100644 (file)
 //--------------------------------------------------------------------------
 // connector_manager.cc author Ed Borgoyn <eborgoyn@cisco.com>
 
-#include "connector_manager.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <assert.h>
+#include "connector_manager.h"
 
+#include <cassert>
 #include <list>
+#include <map>
 #include <unordered_map>
-#include <utility>
 
 #include "framework/connector.h"
 #include "log/messages.h"
-#include "main/snort_config.h"
 #include "main/snort_debug.h"
 #include "utils/util.h"
 
-#include "module_manager.h"
-
 //  ConnectorManager Private Data
 
 // One ConnectorElem for each Connector within the ConnectorCommon configuration
index 12920eed36b337938d143e2afd8bc1e083bc09fc..d0317507624d09a71045e588850cf2647236ef0c 100644 (file)
@@ -22,7 +22,7 @@
 
 // Factory for Connectors.
 
-#include "framework/connector.h"
+#include <string>
 
 struct SnortConfig;
 struct ConnectorApi;
index 42d5221a07d948f5a927617dd15cfea174de2281..212bf6961fdfbc1af3576cef8a498f81f0aa3d8a 100644 (file)
 //--------------------------------------------------------------------------
 // event_manager.cc author Russ Combs <rucombs@cisco.com>
 
-#include "event_manager.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <assert.h>
-#include <sys/types.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
-#include <errno.h>
+#include "event_manager.h"
 
+#include <cassert>
 #include <list>
 
-#include "plugin_manager.h"
-#include "module_manager.h"
-
-#include "main/snort_types.h"
-#include "main/snort_config.h"
-#include "main/snort_debug.h"
-#include "utils/util.h"
 #include "framework/logger.h"
-#include "framework/module.h"
-#include "loggers/loggers.h"
-#include "parser/parser.h"
 #include "log/messages.h"
+#include "main/snort_config.h"
+
+#include "module_manager.h"
 
 using namespace std;
 
index 7414c43d82a94ad66ebfb2d76b81765ad2cd569b..fe245435027def5432979b7d9330ca10c8157bfb 100644 (file)
 // OutputSet is a group of Loggers that can be attached to external data.
 // Also provides runtime logging.
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "main/snort_types.h"
-#include "framework/base_api.h"
+#include "framework/module.h"
 
 #ifdef PIGLET
 #include "framework/logger.h"
-#include "piglet/piglet_api.h"
 #endif
 
 #define OUTPUT_TYPE_FLAG__NONE  0x0
index 64ec58348ee3e89ce099f077bf7093f830fee177..29ff6745e3e3fd736e965ac86de14de2f6553aff 100644 (file)
 //--------------------------------------------------------------------------
 // inspector_manager.cc author Russ Combs <rucombs@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "inspector_manager.h"
 
-#include <assert.h>
-#include <algorithm>
 #include <list>
 #include <vector>
 
-#include "module_manager.h"
-#include "main/snort_config.h"
-#include "main/thread_config.h"
+#include "binder/bind_module.h"
+#include "binder/binder.h"
+#include "detection/detect.h"
 #include "flow/flow.h"
 #include "flow/session.h"
-#include "framework/inspector.h"
-#include "detection/detection_util.h"
 #include "log/messages.h"
-#include "packet_io/active.h"
+#include "main/snort_config.h"
+#include "main/thread_config.h"
+#include "protocols/packet.h"
 #include "target_based/snort_protocols.h"
-#include "binder/bind_module.h"
-#include "binder/binder.h"
+
+#include "module_manager.h"
 
 using namespace std;
 
index bf535a12bc57035362a07973f6a4bb0437652ae1..0eb9381de4eab7d179954d6fccf56954ac60a984 100644 (file)
 // Factory for Inspectors.
 // Also provides packet evaluation.
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "main/snort_types.h"
-#include "framework/base_api.h"
 #include "framework/inspector.h"
 
 #ifdef PIGLET
 #include "framework/inspector.h"
-#include "piglet/piglet_api.h"
 #endif
 
 struct Packet;
index f564aa1dfe3a32b289d235d862f203415c6e8678..72822be956fd9fb8bd0684f29de48d8042d0cd97 100644 (file)
 //--------------------------------------------------------------------------
 // ips_manager.cc author Russ Combs <rucombs@cisco.com>
 
-#include "ips_manager.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <assert.h>
-#include <errno.h>
-#include <sys/types.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
-#include <unistd.h>
-#include <zlib.h>
+#include "ips_manager.h"
 
+#include <cassert>
 #include <list>
-#include <fstream>
 
-#include "plugin_manager.h"
-#include "main/snort_types.h"
-#include "main/snort_config.h"
-#include "main/snort_debug.h"
-#include "framework/ips_option.h"
-#include "framework/so_rule.h"
-#include "framework/module.h"
-#include "framework/parameter.h"
-#include "managers/module_manager.h"
-#include "ips_options/ips_options.h"
-#include "utils/util.h"
-#include "parser/parser.h"
+#include "detection/treenodes.h"
 #include "log/messages.h"
+#include "main/snort_config.h"
+
+#include "module_manager.h"
+#include "plugin_manager.h"
 
 using namespace std;
 
index 94290e0406961a759e2049363b45fc1833241b4c..11b1619c719973e7e5e1f3ff8f48b349aed9c4a9 100644 (file)
 // Factory for IpsOptions.
 // Runtime use of IpsOptions is via detection option tree.
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <string>
-
-#include "main/snort_types.h"
 #include "detection/detection_options.h"
-#include "framework/base_api.h"
 #include "framework/ips_option.h"
 #include "framework/module.h"
-#include "detection/treenodes.h"
-
-#ifdef PIGLET
-#include "piglet/piglet_api.h"
-#endif
 
 struct SnortConfig;
 struct IpsApi;
index 05909815fc11c349defa8139b3dba20ceeea74f1..7b604e36aa3a28e157d7bc8887ec6d06cede1f92 100644 (file)
 //--------------------------------------------------------------------------
 // module_manager.cc author Russ Combs <rucombs@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "module_manager.h"
 
-#include <assert.h>
+#include <lua.hpp>
 
+#include <cassert>
 #include <iostream>
-#include <list>
 #include <mutex>
 #include <string>
-#include <sstream>
-#include <lua.hpp>
 
-#include "plugin_manager.h"
+#include "framework/base_api.h"
+#include "framework/module.h"
+#include "helpers/markup.h"
 #include "log/messages.h"
-#include "main/snort_config.h"
 #include "main/modules.h"
 #include "main/shell.h"
-#include "main/snort_types.h"
 #include "main/snort.h"
-#include "framework/base_api.h"
-#include "framework/module.h"
-#include "parser/parser.h"
+#include "main/snort_config.h"
 #include "parser/parse_conf.h"
+#include "parser/parser.h"
 #include "parser/vars.h"
 #include "profiler/profiler.h"
-#include "helpers/markup.h"
-#include "utils/stats.h"
+
+#include "plugin_manager.h"
 
 using namespace std;
 
index 2b5c2142fd6b2afe54460fe6c83786d1201f3ac8..bd91df93816767efd107c05384a708c588cb54be 100644 (file)
@@ -24,7 +24,6 @@
 // Modules are strictly used during parse time.
 
 #include <list>
-#include <string>
 
 //-------------------------------------------------------------------------
 
index 398d28813005515315e81c8ff821c8f102590d74..5fb42fec5ab15cc18959bf0c1c43ff7fd4f564ae 100644 (file)
 //--------------------------------------------------------------------------
 // mpse_manager.cc author Russ Combs <rucombs@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "mpse_manager.h"
 
 #include <list>
 
-#include "module_manager.h"
-#include "main/snort_types.h"
-#include "main/snort_config.h"
-#include "main/snort_debug.h"
-#include "utils/util.h"
 #include "framework/mpse.h"
-#include "parser/parser.h"
 #include "log/messages.h"
-#include "search_engines/search_common.h"
+
+#include "module_manager.h"
 
 using namespace std;
 
index d11247f3a873d933072daf2063164b368cf3d6ab..bb2de47e5403e76ed74a91b01f9ede1917b9f07f 100644 (file)
 // as searching by inspectors with a SearchTool.  Runtime use of the Mpse
 // is by the fast pattern detection module.
 
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include "main/snort_types.h"
-#include "framework/base_api.h"
+#include "framework/module.h"
 
 #ifdef PIGLET
 #include "framework/mpse.h"
-#include "piglet/piglet_api.h"
 #endif
 
 struct MpseApi;
index 521fe8eab71f28b1a72686c489ac96dda013265f..102abf558de2215b3f960f7c3cd56260c65a75c1 100644 (file)
 //--------------------------------------------------------------------------
 // plugin_manager.cc author Russ Combs <rucombs@cisco.com>
 
-#include "plugin_manager.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <assert.h>
-#include <sys/stat.h>
+#include "plugin_manager.h"
+
 #include <dlfcn.h>
+#include <sys/stat.h>
 
-#include <map>
-#include <vector>
 #include <iostream>
-
-#ifdef PIGLET
-#include "piglet/piglet_api.h"
-#include "piglet/piglet_manager.h"
-#endif
+#include <map>
 
 #include "framework/codec.h"
+#include "framework/connector.h"
 #include "framework/logger.h"
-#include "framework/ips_action.h"
-#include "framework/ips_option.h"
-#include "framework/inspector.h"
 #include "framework/mpse.h"
-#include "framework/so_rule.h"
-
-#include "log/messages.h"
 #include "helpers/directory.h"
 #include "helpers/markup.h"
-#include "parser/parser.h"
+#include "log/messages.h"
+
+#ifdef PIGLET
+#include "piglet/piglet_api.h"
+#include "piglet/piglet_manager.h"
+#endif
 
 #include "action_manager.h"
+#include "codec_manager.h"
 #include "connector_manager.h"
 #include "event_manager.h"
 #include "inspector_manager.h"
 #include "ips_manager.h"
 #include "module_manager.h"
 #include "mpse_manager.h"
-#include "codec_manager.h"
 #include "script_manager.h"
 #include "so_manager.h"
 
index 1c97cd0c9134e243df10ebfef1d2ad55c260dd7a..e94e13985e345d07a1a3cf0b9c089bf30a226995 100644 (file)
@@ -32,9 +32,7 @@
 //-------------------------------------------------------------------------
 
 #include <string>
-#include <vector>
 
-#include "main/snort_types.h"
 #include "framework/base_api.h"
 
 class Module;
index 9446c903548f5046ee382ba9a1b8c1772b29303e..30a2fb3e515f109dd2ebeefe7e1b8c5d0fb97f8c 100644 (file)
 //--------------------------------------------------------------------------
 // script_manager.cc author Russ Combs <rucombs@cisco.com>
 
-#include "script_manager.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <string.h>
+#include "script_manager.h"
 
-#include <string>
-#include <vector>
 #include <sys/stat.h>
-#include <lua.hpp>
 
-#include "ips_manager.h"
-#include "plugin_manager.h"
-#include "lua/lua.h"
-#include "lua/lua_util.h"
 #include "framework/ips_option.h"
 #include "framework/logger.h"
 #include "framework/lua_api.h"
-#include "log/messages.h"
 #include "helpers/directory.h"
+#include "log/messages.h"
+#include "lua/lua.h"
+#include "lua/lua_util.h"
 
 #ifdef PIGLET
 #include "piglet/piglet_manager.h"
index 3dcfef1f0c382c1eb41b3106b5fae0b873df1c22..e5d8929340bf9dcf752cbeb2e95eb8551c361ed7 100644 (file)
@@ -26,7 +26,6 @@
 #include <string>
 #include <vector>
 
-#include "main/snort_types.h"
 #include "framework/base_api.h"
 
 //-------------------------------------------------------------------------
index 3c298856232cc7aa44a06c91eb15ab41ea16e096..f98e2a3f93e93d0b75d72d7b5d6c8090a559178f 100644 (file)
 //--------------------------------------------------------------------------
 // so_manager.cc author Russ Combs <rucombs@cisco.com>
 
-#include "so_manager.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <assert.h>
-#include <errno.h>
-#include <sys/types.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
-#include <unistd.h>
+#include "so_manager.h"
+
 #include <zlib.h>
 
-#include <list>
+#include <cassert>
+#include <cstdlib>
+#include <cstring>
 #include <iomanip>
 #include <iostream>
+#include <list>
 #include <sstream>
 
-#include "plugin_manager.h"
-#include "main/snort_types.h"
-#include "main/snort_config.h"
-#include "main/snort_debug.h"
-#include "framework/so_rule.h"
-#include "framework/module.h"
-#include "utils/util.h"
-#include "parser/parser.h"
 #include "log/messages.h"
 
 using namespace std;
index 771b5665bb7839bf118c8d4d490c43595178521f..056142382923a239e73c7b40f35f50b90ea03751 100644 (file)
@@ -23,8 +23,6 @@
 // Factory for shared object rules.
 // Runtime is same as for text rules.
 
-#include "main/snort_types.h"
-#include "framework/base_api.h"
 #include "framework/so_rule.h"
 
 struct SnortConfig;
index 88fdf8707ed83adb8adbeb9ef42b9fbda66d7c8a..b37f55fbf3b3e647d56fd4d49c790ab223948b7a 100644 (file)
 
 // memory_allocator.cc author Joel Cornett <jocornet@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "memory_allocator.h"
 
 #include <cstdlib>
index b4bc9aadf782e3e68241da0489c045c321af386c..e2d6df0fde3935968d0b6bfe281e4d4f50886aa1 100644 (file)
 
 // memory_cap.cc author Joel Cornett <jocornet@cisco.com>
 
-#include "memory_cap.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
 #include <cassert>
 
+#include "memory_cap.h"
+
 #include "log/messages.h"
 #include "main/snort_config.h"
-#include "main/snort_debug.h"
-#include "main/thread.h"
 #include "profiler/memory_profiler_active_context.h"
 
 #include "memory_config.h"
index 99584b40f87565c797e4bd72be8807a9cb147b6f..15153c2e82e417cea9cad80e18177399c8a6c369 100644 (file)
@@ -22,9 +22,8 @@
 #include "config.h"
 #endif
 
-#include <new>
-#include <cstdio>
 #include <cassert>
+#include <new>
 
 #include "main/thread.h"
 
index 696423af21df575a4d398eac4d3be50b8473c528..ab6af99d746b0fda72338c5db13de5fe4606f7d1 100644 (file)
 
 // memory_module.cc author Joel Cornett <jocornet@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "memory_module.h"
 
 #include "main/snort_config.h"
+
 #include "memory_config.h"
 
 // -----------------------------------------------------------------------------
index e19b4bb1d8beb123e1706d0e39de287c4311f2b5..8b1bc6693a409a020478684a604f7ce8663fbbd5 100644 (file)
 
 // prune_handler.cc author Joel Cornett <jocornet@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "prune_handler.h"
+
 #include "stream/stream.h"
 
 namespace memory
index c71405dd184f742264d5bc809545106119f695f5..6498c4eb25c43b977a10160edd48bb3e3028133b 100644 (file)
@@ -2,10 +2,6 @@
 set( MIME_INCLUDES
     decode_b64.h
     decode_base.h
-    decode_bit.h
-    decode_buffer.h
-    decode_qp.h
-    decode_uu.h
     file_mime_config.h
     file_mime_decode.h 
     file_mime_log.h 
@@ -23,10 +19,13 @@ add_library ( mime STATIC
     decode_base.cc 
     decode_b64.cc
     decode_bit.cc
+    decode_bit.h
     decode_buffer.cc
+    decode_buffer.h
     decode_qp.cc
+    decode_qp.h
     decode_uu.cc
-    
+    decode_uu.h
 )
 
 target_link_libraries(mime file_api)
index 49ab51464dd6af094bf7eb569adce8721aa0da2c..f197c620e8f9ac38ff2ff5effc824ebcfa3bda32 100644 (file)
@@ -6,10 +6,6 @@ x_includedir = $(pkgincludedir)/mime
 x_include_HEADERS = \
 decode_b64.h \
 decode_base.h \
-decode_bit.h \
-decode_buffer.h \
-decode_qp.h \
-decode_uu.h \
 file_mime_config.h \
 file_mime_decode.h \
 file_mime_log.h \
@@ -20,9 +16,13 @@ libmime_a_SOURCES = \
 decode_b64.cc \
 decode_base.cc \
 decode_bit.cc \
+decode_bit.h \
 decode_buffer.cc \
+decode_buffer.h \
 decode_qp.cc \
+decode_qp.h \
 decode_uu.cc \
+decode_uu.h \
 file_mime_config.cc \
 file_mime_decode.cc \
 file_mime_log.cc \
index 75d6eda8ae20b09fd5e36111e151e0b1fb5ad9e3..f91bf9f523db4885bdfffb985aaf7f95ef0595d8 100644 (file)
 //--------------------------------------------------------------------------
 // decode_b64.cc author Bhagyashree Bantwal <bbantwal@sourcefire.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "decode_b64.h"
 
-#include "utils/util.h"
 #include "utils/util_unfold.h"
 
-#include "decode_base.h"
 #include "decode_buffer.h"
 
 void B64Decode::reset_decode_state()
index 93a59933c02e0186d515bf150558173cb20a93d3..f9431bf2d3797f14e1969d4787bb96a17814ef6a 100644 (file)
@@ -22,8 +22,6 @@
 
 // Email attachment decoder
 
-#include <stdlib.h>
-
 #include "main/snort_types.h"
 #include "mime/decode_base.h"
 
index 7c6425e357a9fea740d6faa8028763fa0628ebf9..b67b8e413bebeefc710be7138fbde02ebcb7044e 100644 (file)
 //--------------------------------------------------------------------------
 // decode_base.cc author Bhagyashree Bantwal <bbantwal@sourcefire.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "decode_base.h"
-#include "utils/util.h"
 
 void DataDecode::reset_decoded_bytes()
 {
index d49652c826d28adfe83b5803d031fa3fc78149b5..3926f9123bfe5ae16836a4647403cd975d92373a 100644 (file)
@@ -22,8 +22,7 @@
 
 // Email attachment decoder
 
-#include <stdlib.h>
-#include "main/snort_types.h"
+#include <cstdint>
 
 enum DecodeResult
 {
index 23d9a9a72f13fd8ef1ee6ae6c64a99f86686b0d9..adbf81bb09c824edd6e30490618e278726b0b0f8 100644 (file)
 //--------------------------------------------------------------------------
 // decode_bit.cc author Bhagyashree Bantwal <bbantwal@sourcefire.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "decode_bit.h"
-#include "utils/util.h"
 
 void BitDecode::reset_decode_state()
 {
index 5ea46f2b05f2e15d4d8431e72bc379e8d8d7f9d2..fa3bb547a2ab6985237eec39125460c3a18d5c7b 100644 (file)
@@ -22,7 +22,6 @@
 
 // Email attachment decoder
 
-#include <stdlib.h>
 #include "mime/decode_base.h"
 
 class BitDecode : public DataDecode
index 98047265f07a34914ecb0799c0287186dc4856fe..cd962173e1d6b9fe7263527e6ece065d1eec1ff5 100644 (file)
 //--------------------------------------------------------------------------
 // decode_buffer.cc author Bhagyashree Bantwal <bbantwal@sourcefire.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "decode_buffer.h"
+
 #include "utils/util.h"
 
 void DecodeBuffer::reset_saved()
index 818f671a7c6d7adf868a5af3454b29df28cfa00a..b880a4992d9f64c96838bb172308953eae8ecb02 100644 (file)
@@ -22,7 +22,6 @@
 
 // Manage decode/encode buffers
 
-#include <stdlib.h>
 #include "main/snort_types.h"
 
 class DecodeBuffer
index bf602cc1993f1be2a48b09c60e0e16ad45959b72..f8191e894c1e0a7d68f453f07cb94306a8cea9cc 100644 (file)
 //--------------------------------------------------------------------------
 // decode_qp.cc author Bhagyashree Bantwal <bbantwal@sourcefire.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "decode_qp.h"
 
-#include "utils/util.h"
+#include <cctype>
+#include <cstdlib>
+
 #include "utils/util_unfold.h"
 
 #include "decode_buffer.h"
index f778d40394a8cffdfff8f1ab150f60a3e02c39e1..a3547ed05a19715039dc4af9ef81334abf4646a9 100644 (file)
@@ -22,7 +22,6 @@
 
 // Email attachment decoder
 
-#include <stdlib.h>
 #include "mime/decode_base.h"
 
 class QPDecode : public DataDecode
index 2a8b503eaa41d671f974bd92d8f0515e2ec5bb83..9885c0801403e9fe87a699d9a5eecef8992555fa 100644 (file)
 //--------------------------------------------------------------------------
 // decode_uu.cc author Bhagyashree Bantwal <bbantwal@sourcefire.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "decode_uu.h"
 
 #include "utils/safec.h"
 #include "utils/util.h"
-#include "utils/util_unfold.h"
 
 #include "decode_buffer.h"
 
index a2864203c1a5b0b879770ccdf859105d3090a974..81159a15846df6b7bb79a9d1f35b622560827d74 100644 (file)
 // file_mime_config.cc author Hui Cao <huica@cisco.com>
 // 9.25.2012 - Initial Source Code. Hui Cao
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "file_mime_config.h"
 
 #include "log/messages.h"
-#include "main/snort_types.h"
 #include "file_api/file_service.h"
 
-#include "file_mime_process.h"
-
 void DecodeConfig::set_ignore_data(bool ignored)
 {
     ignore_data = ignored;
index 08b96753c86a630986edbbd33962f65dd5dc61cb..fa7e6642d2bade1c3d8be5a1d49d45e603a10d97 100644 (file)
 //--------------------------------------------------------------------------
 // file_mime_decode.cc author Bhagyashree Bantwal <bbantwal@sourcefire.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "file_mime_decode.h"
 
-#include "utils/util_unfold.h"
 #include "utils/util.h"
 
 #include "decode_b64.h"
index 82cdcb9a7b0d42aefd451a5fc77cc18ef0818195..fa9798a0712047f7cd19f709021f3e8f03237b70 100644 (file)
 
 // Email attachment decoder, supports Base64, QP, UU, and Bit7/8
 
-#include <stdlib.h>
-
 #include "framework/counts.h"
-#include "main/snort_types.h"
 #include "mime/decode_base.h"
 #include "mime/file_mime_config.h"
 
index f458a456731785fb1c40fd6c07ca28f39f8a6464..c90430dd5c283bcdb35cd8f2de6cf53449c15453 100644 (file)
 // file_mime_log.cc author Hui Cao <huica@cisco.com>
 // 9.25.2012 - Initial Source Code. Hui Cao
 
-#include "file_mime_log.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include "utils/util.h"
-#include "file_api/file_api.h"
+#include "file_mime_log.h"
+
 #include "file_api/file_flows.h"
 #include "utils/safec.h"
+#include "utils/util.h"
 
 #define MAX_FILE                             1024
 #define MAX_EMAIL                            1024
index a450ff67be4e4a067e89c4ebd1c3b5a91417effc..8d69ccb7a5b7e165f18ab27924743895c5ece6f4 100644 (file)
@@ -24,8 +24,7 @@
 // File name will be extracted from MIME header
 // Email headers and emails are also stored in the log buffer
 
-#include "mime/file_mime_config.h"
-#include "file_api/file_api.h"
+#include <cstdint>
 
 enum EmailUserType
 {
index 0d3c2c29518e2c19f3964fa8515e6b0bf9ac9ca4..ed0b9b51e12adf8514dd95b665c4cda91dee9fa0 100644 (file)
 // file_mime_paf.cc author Hui Cao <huica@cisco.com>
 // 9.25.2012 - Initial Source Code. Hui Cao
 
-#include "file_mime_paf.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include "main/snort_types.h"
-#include "main/snort_debug.h"
-#include "file_api/file_api.h"
+#include "file_mime_paf.h"
+
+#include <cctype>
 
-#include "file_mime_config.h"
+#include "main/snort_debug.h"
 
 static const char* boundary_str = "boundary=";
 
index ab0c0365ff9c8cea51a2392ea965d7066037e6a5..386f1f0ecf9749824570de4ca54ff25bde2058f4 100644 (file)
@@ -24,9 +24,7 @@
 // Provides list of MIME processing functions. Encoded file data will be decoded
 // and file name will be extracted from MIME header
 
-#include "mime/decode_base.h"
-#include "mime/file_mime_config.h"
-#include "file_api/file_api.h"
+#include "main/snort_types.h"
 
 /* State tracker for data */
 enum MimeDataState
index 80fed9a430fe96120371f6b75f951aefbef36726..bfba6398f9071ab7b9f7060aae51e7c1cebced4d 100644 (file)
 // file_mime_process.cc author Hui Cao <huica@cisco.com>
 // 9.25.2012 - Initial Source Code. Hui Cao
 
-#include "file_mime_process.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include "main/snort_types.h"
+#include "file_mime_process.h"
+
 #include "detection/detection_util.h"
-#include "file_api/file_api.h"
 #include "file_api/file_flows.h"
-#include "framework/data_bus.h"
 #include "log/messages.h"
-#include "protocols/packet.h"
 #include "search_engines/search_tool.h"
-#include "utils/util.h"
-
-#include "file_mime_config.h"
-#include "file_mime_decode.h"
 
 struct MimeToken
 {
index f60ea68a56ea67f2e66d1045093c4e00e482717e..4991c1980228cf77aa8d81b3013497d3acb588f3 100644 (file)
 // 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 "mime/file_mime_config.h"
-#include "mime/file_mime_paf.h"
-#include "mime/file_mime_log.h"
 #include "mime/file_mime_decode.h"
+#include "mime/file_mime_log.h"
+#include "mime/file_mime_paf.h"
 
 /* state flags */
 #define MIME_FLAG_FOLDING                    0x00000001
index 542cfc94cac524f534101aee2e37378696f669e2..f31f0a63e42e4164147f7ccbbe8f05d8929115d8 100644 (file)
 
 // app_forecast.cc author Sourcefire Inc.
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "app_forecast.h"
 
 #include "hash/sfxhash.h"
-#include "time/packet_time.h"
 #include "log/messages.h"
-#include "application_ids.h"
+#include "protocols/packet.h"
+#include "time/packet_time.h"
+
+#include "appid_session.h"
 
 static AFActKey master_key;
 static THREAD_LOCAL SFXHASH* AF_indicators = nullptr;     // App Forecasting list of "indicator apps"
index 37eefca0d7e2b0c438f98a6a77ce4291b9e9772d..e06d1ea68c23f5693d99186392ddc911945364c1 100644 (file)
 #define APP_FORECAST_H
 
 //  AppId flow forcasting data structures and methods
-//
 
-#include <time.h>
-#include "appid_api.h"
-#include "protocols/packet.h"
+#include "flow/flow.h"
 
-#include "appid_session.h"
+class AppIdSession;
+struct Packet;
 
 // indicator - the appId that indicates there may be subsequent flows to look for, from the same host
 // forecast - the appId in the subsequent flow that we are looking for
@@ -38,7 +36,6 @@
 // for now, indicator and target are WEB APPLICATIONS. The forecast is APP PROTOCOL. We can change this
 // later by adding app type info for each, if we find a use case.
 
-class AppIdConfig;
 enum ApplicationId : int32_t;
 
 struct AFElement
index 1e6a65c77e0a8b19cf9b3345ea5a6d35007cdd37..f5cf264f7be6641fe3ff24280c0728ddbe60cca7 100644 (file)
 
 // app_info_table.cc author Sourcefire Inc.
 
-#include "app_info_table.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include "application_ids.h"
+#include "app_info_table.h"
+
+#include <limits.h>
+
 #include "log/messages.h"
 #include "main/snort_debug.h"
-#include "utils/util.h"
+
+#include "appid_config.h"
 #include "service_plugins/service_util.h"
 
 #define MAX_TABLE_LINE_LEN      1024
index 9e9210c02bd4541c59ec542d9775482c4ecd93c8..aa426464500621e0c7c26200547adf11de31c190 100644 (file)
 #ifndef APP_INFO_TABLE_H
 #define APP_INFO_TABLE_H
 
-#include <cstdint>
-#include <unordered_map>
 #include <mutex>
+#include <unordered_map>
 
-#include "application_ids.h"
-#include "appid_api.h"
-#include "appid_config.h"
+#include "flow/flow.h"
 #include "utils/util.h"
 
+#include "application_ids.h"
+
 #define APP_PRIORITY_DEFAULT 2
 #define SF_APPID_MAX            40000
 #define SF_APPID_BUILDIN_MAX    30000
index b0aa6f7d7291e8165fbc7efd983625190e74c4be..c3ced84771be43fef39065fdbda2858836c2d0a5 100644 (file)
 
 // appid_api.cc author Sourcefire Inc.
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "appid_api.h"
 
 #include "app_info_table.h"
 #include "service_plugins/service_base.h"
-#include "app_info_table.h"
-
-#include "utils/util.h"
 
 #define SSL_WHITELIST_PKT_LIMIT 20
 
index 4694fc11f6a45698e59b02bb8bfcf5e6e34d7b34..75b270e1f1e4c49e24b9bbcb3428c49a4a696082 100644 (file)
@@ -22,8 +22,6 @@
 #ifndef APPID_API_H
 #define APPID_API_H
 
-#include <cstdint>
-
 #include "flow/flow.h"
 
 enum class IpProtocol : uint8_t;
index beacbff83d1a62121bce72b94b35c1390b413ff5..d9b56b0b374f44c821e2417152778b24909fcee5 100644 (file)
 //--------------------------------------------------------------------------
 
 // appid_config.cc author Sourcefire Inc.
-#include <cstring>
-#include <glob.h>
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
 #include "appid_config.h"
+
+#include <glob.h>
+#include <limits.h>
+
+#include "log/messages.h"
+#include "main/snort_debug.h"
+
 #include "app_info_table.h"
-#include "appid_utils/network_set.h"
-#include "appid_utils/ip_funcs.h"
 #include "appid_utils/appid_utils.h"
-#include "main/snort_debug.h"
-#include "log/messages.h"
-#include "utils/util.h"
-#include "thirdparty_appid_utils.h"
+#include "appid_utils/network_set.h"
 #include "service_plugins/service_base.h"
 
 #define ODP_PORT_DETECTORS "odp/port/*"
index 944557339acfb416d824f72c18954830c70938a3..ac4aeccdb3abed1ca67cac539b1b8ac4ebef6908 100644 (file)
 // Receive events from the HTTP inspector containing header information
 // to be used to detect AppIds.
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "appid_http_event_handler.h"
-#include "appid_config.h"
-#include "appid_session.h"
+
 #include "appid_module.h"
-#include "thirdparty_appid_utils.h"
-#include "utils/util.h"
 
 static void replace_header_data(char **data, uint16_t &datalen, const uint8_t *header_start,
     int32_t header_length)
index c8750970289ba07f14d782707d0cafab3bafd75b..1381bc10fa2a12ad168491f8e7699e65958b43c6 100644 (file)
@@ -24,8 +24,6 @@
 #ifndef APPID_HTTP_EVENT_HANDLER_H
 #define APPID_HTTP_EVENT_HANDLER_H
 
-#include "framework/data_bus.h"
-
 #include "pub_sub/http_events.h"
 
 class HttpEventHandler : public DataHandler
index 75bfda4d111d9b2c618fac3263c4799b3fa1c737..6204c6712cc464194a34bf39af7d49b1d3f65e6b 100644 (file)
 // appid_inspector.cc author davis mcpherson <davmcphe@cisco.com>
 // Created on: May 10, 2016
 
-#include "appid_inspector.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
+#include "appid_inspector.h"
+
 #include <openssl/crypto.h>
 
 #include "log/messages.h"
-#include "main/thread.h"
 #include "profiler/profiler.h"
-#include "appid_stats.h"
-#include "appid_session.h"
-#include "lua_detector_module.h"
-#include "lua_detector_api.h"
-#include "host_port_app_cache.h"
+#include "pub_sub/sip_events.h"
+
 #include "app_forecast.h"
-#include "service_plugins/service_base.h"
-#include "service_plugins/service_ssl.h"
+#include "appid_http_event_handler.h"
+#include "appid_module.h"
+#include "appid_stats.h"
 #include "client_plugins/client_app_base.h"
 #include "detector_plugins/detector_base.h"
 #include "detector_plugins/detector_dns.h"
 #include "detector_plugins/detector_http.h"
-#include "detector_plugins/detector_sip.h"
 #include "detector_plugins/detector_pattern.h"
-#include "appid_http_event_handler.h"
-#include "pub_sub/sip_events.h"
+#include "host_port_app_cache.h"
+#include "lua_detector_api.h"
+#include "lua_detector_module.h"
+#include "service_plugins/service_base.h"
+#include "service_plugins/service_ssl.h"
 
 static void dump_appid_stats()
 {
index ff2d27936fb40381095c259900679725ad7e27ec..9e083bb183fcd6a3dca00b0edc53d3b7b091215a 100644 (file)
 #ifndef APPID_INSPECTOR_H
 #define APPID_INSPECTOR_H
 
-#include "main/snort_config.h"
-#include "protocols/packet.h"
+#include "appid_config.h"
 
-#include "appid_module.h"
+struct Packet;
+struct SnortConfig;
 
 class AppIdInspector : public Inspector
 {
index e3ceb64a005e93e4a1cc50372beb215d49b31df6..daa4814704491b7293cf5a9caaf0fdc5407c19ac 100644 (file)
 // appid_module.cc author davis mcpherson <davmcphe@cisco.com>
 // Created on: May 10, 2016
 
-#include "appid_module.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <string>
+#include "appid_module.h"
 
 #include "log/messages.h"
 #include "profiler/profiler.h"
-#include "sfip/sf_ip.h"
-#include "utils/util.h"
 
 using namespace std;
 
index 55516f69d80b9f575dee6398a9c41d0ff28bea07..34204d00e511854c1a0bcc65c43d485d8b12c380 100644 (file)
@@ -22,7 +22,6 @@
 #ifndef APPID_MODULE_H
 #define APPID_MODULE_H
 
-#include "main/snort_types.h"
 #include "framework/module.h"
 #include "appid_config.h"
 
index f6baaa62553aba047e1ccc6e101880c87c27dc03..621f3616b7e31bc142e24b6fb1acde177744ce81 100644 (file)
 //--------------------------------------------------------------------------
 
 // appid_session.cc author Sourcefire Inc.
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "appid_session.h"
 
 #include "log/messages.h"
 #include "main/snort_config.h"
-#include "protocols/tcp.h"
 #include "profiler/profiler.h"
-#include "target_based/snort_protocols.h"
-#include "sfip/sf_ip.h"
+#include "protocols/packet.h"
+#include "protocols/tcp.h"
 #include "stream/stream.h"
+#include "target_based/snort_protocols.h"
 #include "time/packet_time.h"
-#include "utils/util.h"
 
+#include "app_forecast.h"
 #include "app_info_table.h"
 #include "appid_module.h"
 #include "appid_stats.h"
-#include "app_forecast.h"
-#include "host_port_app_cache.h"
-#include "lua_detector_module.h"
 #include "appid_utils/ip_funcs.h"
 #include "client_plugins/client_app_base.h"
-#include "detector_plugins/detector_http.h"
 #include "detector_plugins/detector_dns.h"
+#include "detector_plugins/detector_http.h"
+#include "host_port_app_cache.h"
 #include "service_plugins/service_base.h"
 #include "service_plugins/service_ssl.h"
-#include "service_plugins/service_util.h"
-
 
 ProfileStats tpPerfStats;
 ProfileStats tpLibPerfStats;
index 4dd2d18a1cfe90c7b7a3f7f199292ecb6bbcfa36..6ea5da46542538a3b4d530fed4611dac3fa75d19 100644 (file)
 
 //  AppId configuration data structures and access methods
 
-#include <cstdint>
-#include <ctime>
-
-#include "protocols/packet.h"
 #include "utils/sflsq.h"
 
 #include "appid_api.h"
 #include "application_ids.h"
+#include "http_common.h"
 #include "length_app_cache.h"
 #include "service_state.h"
-#include "http_common.h"
 #include "thirdparty_appid_api.h"
 #include "thirdparty_appid_types.h"
 #include "thirdparty_appid_utils.h"
index bce02e282cc08c5f033965c246c9073261cf0d01..7e6cb3261f31323972372df33f181f2580b75200 100644 (file)
 
 // appid_stats.cc author Sourcefire Inc.
 
-#include "appid_stats.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <cerrno>
-#include <cstdio>
-#include <ctime>
-#include <cstdint>
+#include "appid_stats.h"
 
 #include "log/messages.h"
 #include "log/unified2.h"
-#include "utils/sflsq.h"
-#include "utils/util.h"
 
-#include "appid_module.h"
-#include "appid_api.h"
-#include "appid_session.h"
 #include "app_info_table.h"
+#include "appid_config.h"
 #include "appid_utils/fw_avltree.h"
 
 #define URLCATBUCKETS   100
index 098ab842403b5c271639e54c69bc54c4ecab706a..6b35d48097988e309dbf1aa07b02bd1f26323ae2 100644 (file)
 // appid_module.cc author Steve Chew <stechew@cisco.com>
 // Created on: Auguest 18, 2016
 
-#include "main/thread.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "appid_module.h"
 
 THREAD_LOCAL AppIdStats appid_stats;
index 295d5a6a6dddd710b5506cbab24a012775a68326..d8ee993e8b672b7e3e7afd7e5f740b9cfd0c0a42 100644 (file)
 
 // sfutil.cc author Sourcefire Inc.
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "appid_utils.h"
 
 #include <cctype>
-#include <string.h>
-
-#include "utils/util.h"
+#include <cstring>
 
 int AppIdUtils::split(char* data, char** toklist, int max_toks, const char* separator)
 {
index ee73bccadba09ba7f35ac067efcf2e29169b7000..0a0fada33fb06b330e01e490fec92ead63a7ba92 100644 (file)
 
 // fw_avltree.cc author Sourcefire Inc.
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "fw_avltree.h"
-#include <string.h>
-#include <stdlib.h>
 
 #include "utils/util.h"
 
index ac7853b1f603779368af19b9c2f7c6bc7896c6a4..f51027c2a5bd6e3e393d9233b3570e6ca3f150b5 100644 (file)
@@ -22,8 +22,8 @@
 #ifndef FW_AVL_TREE_H
 #define FW_AVL_TREE_H
 
-#include <stdint.h>
-#include <stdlib.h>
+#include <cstddef>
+#include <cstdint>
 
 struct FwAvlNode
 {
index d484513f6920eb823abdf8f771db913363d6a6b1..f086f3b870386a7cc91f9bf886f2f8ee96684e35 100644 (file)
 
 // ip_funcs.cc author Sourcefire Inc.
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "ip_funcs.h"
 
-#include "appid_utils.h"
+#include <netinet/in.h>
+
 #include "log/messages.h"
 #include "utils/util.h"
 
+#include "appid_utils.h"
+
 RNAIpAddrSet* ParseIpCidr(char* ipstring, uint32_t* netmasks)
 {
     char* toks[2];
index 75c95b9d0fd6eccce893dafd7924a6dcd1d0d049..e593e95661b1ef2f6156bb7764044e923af1a046 100644 (file)
 #ifndef IP_FUNCS_H
 #define IP_FUNCS_H
 
-#include <stdint.h>
-#include "protocols/ipv6.h"
+#include <cstdint>
+#include <cstring>
+
 #include "sfip/sf_ip.h"
+
 #include "network_set.h"
 
 #define IPFUNCS_EXCEPT_IP                0x01
index c93893544df46844749a37664c89aec3c847032f..9ceeff5ba7aaf8ed0448292cd8cebf733406c292 100644 (file)
 
 // network_set.cc author Sourcefire Inc.
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "network_set.h"
 
+#include <sys/socket.h>
+
 #include "log/messages.h"
 #include "utils/util.h"
 
index 6439ffbd0c68878b6f37a391b3edc35d2a1af970..e970700a39bde16ae43f24762c4ab1f525ab61a3 100644 (file)
 #ifndef NETWORK_SET_H
 #define NETWORK_SET_H
 
-/* System includes */
-#include <stdio.h>
-#include <sys/types.h>
-#include <stdint.h>
-#include <string.h>
-#include <limits.h>
+#include <cstdio>
 
-#include "utils/sflsq.h"
 #include "hash/sfxhash.h"
 #include "protocols/ipv6.h"
+#include "utils/sflsq.h"
 
 // network_set.h author Sourcefire Inc.
 
index bab73b70e3c1d1f40cfe78efb10e8b45d1003f24..048012a659061fbdf24b1365e7558d1463813dd2 100644 (file)
 
 // sf_mlmp.cc author Sourcefire Inc.
 
-#include "sf_mlmp.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <string.h>
+#include "sf_mlmp.h"
 
 #include "main/snort_debug.h"
 #include "search_engines/search_tool.h"
index 2cadc18ac5b07304fb5248e5382e002cb1f20a36..442af809052c78ee46e90fc838ba81a96a068136 100644 (file)
@@ -22,8 +22,8 @@
 #ifndef SF_MULTI_PART_MPSE_H
 #define SF_MULTI_PART_MPSE_H
 
-#include <stdlib.h>
-#include <stdint.h>
+#include <cstddef>
+#include <cstdint>
 
 struct tMlmpPattern
 {
index db6b75c45599389b82c31c9d9fe23acad6967be8..02c749112799a7ab469f0e5de2b0491e9da3c053 100644 (file)
 
 // sf_multi_mpse.cc author Sourcefire Inc.
 
-#include "sf_multi_mpse.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <stdio.h>
-#include <stdint.h>
-#include <string.h>
+#include "sf_multi_mpse.h"
 
 #include "search_engines/search_tool.h"
 #include "utils/util.h"
index d67459b252491aa845cf7f2def7fd9e39208714c..b8853de7daf6e3ab4628842bbfc3ef41e0bb87e6 100644 (file)
@@ -22,8 +22,8 @@
 #ifndef SF_MULTI_MPSE_H
 #define SF_MULTI_MPSE_H
 
-#include <stdlib.h>
-#include <stdint.h>
+#include <cstddef>
+#include <cstdint>
 
 struct tMlpPattern
 {
index dac48fe8002a379d8f6440a60ee156b71a27a3a7..37ef356b455ec47b4c9f93a0cefe8e7bf9902075 100644 (file)
 
 // client_app_aim.cc author Sourcefire Inc.
 
-#include "client_app_api.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <cstdint>
+#include "client_app_api.h"
 
 #include "main/snort_debug.h"
-#include "utils/sflsq.h"
 
 #include "app_info_table.h"
-#include "application_ids.h"
 #include "appid_module.h"
 
 #pragma pack(1)
index 7bdbf9764c23840e9d31df7fa5e6c555825dd765..f854984395347680c058dccbcf2b74be75a94d47 100644 (file)
@@ -26,7 +26,6 @@
 
 #include "appid_api.h"
 #include "appid_session.h"
-#include "utils/util.h"
 
 struct Packet;
 class Detector;
index c16b4a97d0e1777836ef2f756235ef16adff5256..2e77c588c99c500c23c7446660ac1c05aa41313f 100644 (file)
 
 // client_app_base.cc author Ron Dempster <Ron.Dempster@sourcefire.com>
 
-#include "client_app_base.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <time.h>
-#include <string.h>
-#include <stdlib.h>
-#include <limits.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
+#include "client_app_base.h"
 
 #include "main/snort_debug.h"
 #include "log/messages.h"
 #include "protocols/packet.h"
-#include "utils/sflsq.h"
-#include "utils/util.h"
-#include "profiler/profiler.h"
 
-#include "appid_api.h"
-#include "appid_config.h"
 #include "app_info_table.h"
+#include "appid_config.h"
+#include "detector_plugins/detector_dns.h"
+#include "detector_plugins/detector_pattern.h"
+#include "detector_plugins/detector_sip.h"
+
+#include "client_app_aim.h"
 #include "client_app_api.h"
-#include "client_app_base.h"
 #include "client_app_msn.h"
-#include "client_app_aim.h"
 #include "client_app_ym.h"
-#include "detector_plugins/detector_sip.h"
-#include "lua_detector_module.h"
-#include "lua_detector_api.h"
-#include "http_common.h"
-#include "service_plugins/service_ssl.h"
-#include "detector_plugins/detector_dns.h"
-#include "detector_plugins/detector_pattern.h"
 
 /*#define CLIENT_APP_DEBUG    1 */
 
index 8ddd508a3861499885baf99f73738ff0308249cb..2240efb3d490933eca87d76a27085b28aaa02c3b 100644 (file)
 
 // client_app_bit.cc author Sourcefire Inc.
 
-#include "client_app_api.h"
-#include "application_ids.h"
-#include "appid_module.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
 #include "main/snort_debug.h"
-#include "utils/util.h"
+
+#include "appid_module.h"
+
+#include "client_app_api.h"
 
 static const char BIT_BANNER[] = "\023BitTorrent protocol";
 
index ce178600d74d4c1885ee1d91d35223cfea8c8697..c05c29bf669ccaf47ac89908325e62ff5dcf0425 100644 (file)
 
 // client_app_bit_tracker.cc author Sourcefire Inc.
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "main/snort_debug.h"
-#include "protocols/packet.h"
-#include "utils/sflsq.h"
-#include "utils/util.h"
 
-#include "app_info_table.h"
-#include "application_ids.h"
-#include "client_app_api.h"
 #include "appid_module.h"
 
+#include "client_app_api.h"
+
 static const char UDP_BIT_QUERY[] = "d1:a";
 static const char UDP_BIT_RESPONSE[] = "d1:r";
 static const char UDP_BIT_ERROR[] = "d1:e";
index 999b054d01b7fe404aa9ecd5a45ba7b7959c5bcf..568b88038be2a2824b46b5f619af6b20e587d0b9 100644 (file)
@@ -22,8 +22,8 @@
 #ifndef CLIENT_APP_CONFIG_H
 #define CLIENT_APP_CONFIG_H
 
-#include "utils/sflsq.h"
 #include "search_engines/search_tool.h"
+#include "utils/sflsq.h"
 
 struct RNAClientAppModule;
 struct RNAClientAppRecord;
index 63e99f8499542477a65fdb968f695fde7c5d9332..3068132dd1a8af254e3f024aeb8542333767cf9d 100644 (file)
 
 // client_app_msn.cc author Sourcefire Inc.
 
-#include "client_app_msn.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "main/snort_debug.h"
+
+#include "client_app_msn.h"
+
 #include "app_info_table.h"
-#include "application_ids.h"
 #include "appid_module.h"
 
 #define MAX_VERSION_SIZE 64
index f831733c31bd08a1238b95ce82ec263bcb430e6a..4067210114a58c22cb7aef975b39d5cb000371f8 100644 (file)
 
 // client_app_rtp.cc author Sourcefire Inc.
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "main/snort_debug.h"
-#include "protocols/packet.h"
-#include "utils/sflsq.h"
-#include "utils/util.h"
 
-#include "application_ids.h"
-#include "client_app_api.h"
 #include "appid_module.h"
 
+#include "client_app_api.h"
+
 enum RTPState
 {
     RTP_STATE_CONNECTION,
index a2cd2ca1c9641260351ccb3c4d50117905e67e4a..acb907a7f853e10ca5fa1fae16d622cfe4927983 100644 (file)
 
 // client_app_ssh.cc author Sourcefire Inc.
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "main/snort_debug.h"
-#include "protocols/packet.h"
-#include "utils/sflsq.h"
-#include "utils/util.h"
 
 #include "app_info_table.h"
-#include "application_ids.h"
-#include "client_app_api.h"
 #include "appid_module.h"
 
+#include "client_app_api.h"
+
 static const char SSH_CLIENT_BANNER[] = "SSH-";
 #define SSH_CLIENT_BANNER_LEN (sizeof(SSH_CLIENT_BANNER)-1)
 #define SSH_CLIENT_BANNER_MAXPOS (sizeof(SSH_CLIENT_BANNER)-2)
index 1ab22f7d0dce7c7275f41c045c0a1db72cf1b4a1..220e46f2f9e3c134bb607501f9de0c90cddf047d 100644 (file)
 
 // client_app_timbuktu.cc author Sourcefire Inc.
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "main/snort_debug.h"
-#include "protocols/packet.h"
-#include "utils/sflsq.h"
-#include "utils/util.h"
 
-#include "app_info_table.h"
-#include "application_ids.h"
 #include "client_app_api.h"
 
 static const char TIMBUKTU_BANNER[] = "\000\001";
index 17a4092d7fe3727a0a8d0cb0a2bafa0ba76de1b8..dca51db14e9bf821e48afe50394bf7d4605e786f 100644 (file)
 
 // client_app_tns.cc author Sourcefire Inc.
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "main/snort_debug.h"
-#include "protocols/packet.h"
-#include "utils/sflsq.h"
-#include "utils/util.h"
 
 #include "app_info_table.h"
-#include "application_ids.h"
-#include "client_app_api.h"
 #include "appid_module.h"
 
+#include "client_app_api.h"
+
 static const char TNS_BANNER[] = "\000\000";
 #define TNS_BANNER_LEN (sizeof(TNS_BANNER)-1)
 
index 2abe2d78b0b59d6912c8d2778a7d617c0efb7197..4cf4861f53c4f76092dc04db3df7c7c4090aabcf 100644 (file)
 
 // client_app_vnc.cc author Sourcefire Inc.
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "main/snort_debug.h"
+
+#include "app_info_table.h"
+#include "appid_module.h"
+
+#include "client_app_api.h"
+
+#if 0
 #include "protocols/packet.h"
 #include "utils/sflsq.h"
 #include "utils/util.h"
 
-#include "app_info_table.h"
-#include "application_ids.h"
-#include "client_app_api.h"
-#include "appid_module.h"
+#endif
 
 static const char VNC_BANNER[] = "RFB ";
 static const char VNC_BANNER2[] = ".";
index 1bf34eb7324d7ae303059cc4686fd3248d4ec682..a4d1fbc45f08503cfda2aa4c7ddf6bcfa8c041c5 100644 (file)
 
 // client_app_ym.cc author Sourcefire Inc.
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "client_app_ym.h"
 
 #include "main/snort_debug.h"
-#include "protocols/packet.h"
-#include "utils/sflsq.h"
 
 #include "app_info_table.h"
-#include "application_ids.h"
-#include "client_app_api.h"
 #include "appid_module.h"
 
 struct YM_CLIENT_APP_CONFIG
index 42f1899853887480baca01115fe9c919d44277f1..c70cc7d66af5f37f76e4fff11f4a1b7a1890ba72 100644 (file)
 
 // detector_base.cc author Sourcefire Inc.
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "detector_base.h"
 
-#include "client_plugins/client_app_base.h"
-#include "detector_api.h"
 #include "log/messages.h"
+
+#include "client_plugins/client_app_base.h"
 #include "service_plugins/service_base.h"
-#include "detector_plugins/detector_smtp.h"
+
+#include "detector_smtp.h"
 
 static void* detector_flowdata_get(AppIdSession* asd, unsigned detector_id);
 static int detector_flowdata_add(AppIdSession* asd, void* data, unsigned detector_id,
index c083df75cd44daa61702e088bb153fc78c11b604..e3c31d3e316c2b01ce37dfe6446fb7f9a54ca8e9 100644 (file)
 
 // detector_dns.cc author Sourcefire Inc.
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "detector_dns.h"
 
 #include "main/snort_debug.h"
-#include "utils/util.h"
 
-#include "appid_module.h"
 #include "app_info_table.h"
-#include "application_ids.h"
+#include "appid_module.h"
 #include "client_plugins/client_app_api.h"
-#include "service_plugins/service_api.h"
-#include "service_plugins/service_config.h"
 
 #define MAX_OPCODE     5
 #define INVALID_OPCODE 3
index bb3e768d9e425686ad2a408958f19afc1c9bde5a..32873bc2d536365e1c771a15a1025b949ffe7b71 100644 (file)
 
 // detector_http.cc author Sourcefire Inc.
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "detector_http.h"
 
-#include "search_engines/search_tool.h"
 #include "main/snort_debug.h"
-#include "sfip/sf_ip.h"
-
-#include "service_plugins/service_api.h"
-#include "service_plugins/service_util.h"
-#include "appid_utils/sf_mlmp.h"
-#include "utils/util.h"
+#include "protocols/packet.h"
+#include "search_engines/search_tool.h"
 
 #include "app_info_table.h"
-#include "application_ids.h"
+#include "appid_config.h"
+#include "appid_utils/sf_mlmp.h"
 #include "client_plugins/client_app_base.h"
+#include "service_plugins/service_util.h"
+
 #include "http_url_patterns.h"
 
 /* URL line patterns for identifying client */
index 27c76e88ddb7a22b061f2b1540ec4c7203e63e01..5375a22bb6b8ec3f9b2d53554c52f0e4746c7bf2 100644 (file)
 
 // detector_imap.cc author Sourcefire Inc.
 
-#include <ctype.h>
-#include <string.h>
-#include <stdlib.h>
-#include <stddef.h>
-#include <sys/types.h>
-#include <netinet/in.h>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
 #include "detector_api.h"
+
+#include "main/snort_debug.h"
+#include "search_engines/search_tool.h"
+
 #include "app_info_table.h"
-#include "application_ids.h"
-#include "appid_api.h"
-#include "appid_config.h"
 #include "appid_module.h"
 #include "client_plugins/client_app_api.h"
 #include "service_plugins/service_api.h"
 
-#include "main/snort_debug.h"
-#include "search_engines/search_tool.h"
-#include "utils/util.h"
-
 static const unsigned IMAP_USER_NAME_MAX_LEN = 32;
 static const unsigned IMAP_TAG_MAX_LEN = 6;
 static const unsigned MIN_CMDS = 3;
index 74ebe92f1d8356b52ae0914f18ed190edf272eee..08e846b74eb7d90c89f8db6ca023f7b0cbf06f6d 100644 (file)
 
 // detector_kerberos.cc author Sourcefire Inc.
 
-#include "appid_module.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "main/snort_debug.h"
+#include "protocols/packet.h"
+
 #include "app_info_table.h"
-#include "application_ids.h"
+#include "appid_module.h"
 #include "client_plugins/client_app_api.h"
 #include "service_plugins/service_api.h"
 
-#include "main/snort_debug.h"
-#include "utils/util.h"
-
 enum KerberosState
 {
     KRB_STATE_TCP_LENGTH,
index 2b621dacbeeaacee9b0fa271296f2e26fb4045fb..58c7c674ecb0c88479bd64241f06e91468a4486f 100644 (file)
 
 // detector_pattern.cc author Sourcefire Inc.
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "detector_pattern.h"
-#include "app_info_table.h"
-#include "client_plugins/client_app_base.h"
-#include "service_plugins/service_api.h"
 
 #include "log/messages.h"
 #include "main/snort_debug.h"
-#include "utils/util.h"
+#include "protocols/packet.h"
+#include "search_engines/search_tool.h"
+
+#include "app_info_table.h"
+#include "client_plugins/client_app_base.h"
+#include "service_plugins/service_api.h"
 
 static THREAD_LOCAL ServicePortPattern service_port_patterns;
 static THREAD_LOCAL ClientPortPattern clientPortPattern;
index cd80b55fbe6a35a59784885043c8f72121fb9416..a226cdf645c362ffc8ccd42dc57df03f68786756 100644 (file)
 
 // detector_pop3.cc author Sourcefire Inc.
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "detector_api.h"
+
+#include "main/snort_debug.h"
+#include "search_engines/search_tool.h"
+
 #include "app_info_table.h"
-#include "application_ids.h"
 #include "appid_module.h"
 #include "client_plugins/client_app_api.h"
-#include "detector_plugins/detector_api.h"
-#include "service_plugins/service_api.h"
 #include "service_plugins/service_util.h"
 
-#include "log/messages.h"
-#include "main/snort_debug.h"
-#include "search_engines/search_tool.h"
-#include "utils/util.h"
-
 /*#define DEBUG_POP3  1 */
 
 struct POP3_CLIENT_APP_CONFIG
index 940ff432d4f444dfc69502f28b1afd601f4e75e0..659a5150d9396cd0dea8717f7f2727c45094d66f 100644 (file)
 
 // detector_sip.cc author Sourcefire Inc.
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "detector_sip.h"
 
-#include "log/messages.h"
 #include "main/snort_debug.h"
-#include "utils/util.h"
+#include "protocols/packet.h"
 #include "pub_sub/sip_events.h"
 
-#include "service_inspectors/sip/sip_common.h"
-#include "appid_module.h"
 #include "app_info_table.h"
+#include "appid_module.h"
+#include "appid_utils/sf_mlmp.h"
 #include "client_plugins/client_app_api.h"
 #include "service_plugins/service_base.h"
+
 #include "http_url_patterns.h"
-#include "appid_utils/sf_mlmp.h"
 
 using namespace std;
 
-#include "app_info_table.h"
-#include "client_plugins/client_app_api.h"
-#include "service_plugins/service_base.h"
-#include "http_url_patterns.h"
-#include "appid_utils/sf_mlmp.h"
-
 static const char SIP_REGISTER_BANNER[] = "REGISTER ";
 static const char SIP_INVITE_BANNER[] = "INVITE ";
 static const char SIP_CANCEL_BANNER[] = "CANCEL ";
index c01d8525f3714a5978afc20decc3a28f6148dba3..85cd9f5bbf5f92a8d6b1769468ec75c0eb655bfc 100644 (file)
 ** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
 #include "detector_smtp.h"
 
-#include "main/snort_debug.h"
-#include "utils/util.h"
-#include "utils/sflsq.h"
+#include "protocols/packet.h"
 
-#include "application_ids.h"
-#include "detector_api.h"
-#include "client_plugins/client_app_api.h"
-#include "service_plugins/service_util.h"
 #include "app_info_table.h"
-#include "appid_api.h"
 #include "appid_module.h"
+#include "client_plugins/client_app_api.h"
+#include "service_plugins/service_util.h"
 
 enum SMTPClientState
 {
index cc4ae897caa0475f02ea8ea9275c534eab2ad597..67e2545edd78ccabcbb5c1759c4ac0c569a508b2 100644 (file)
 
 // http_url_patterns.cc author Sourcefire Inc.
 
-#include "http_url_patterns.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <string.h>
+#include "http_url_patterns.h"
 
 #include "log/messages.h"
+#include "utils/util.h"
 
-#include "application_ids.h"
-#include "http_common.h"
-#include "appid_utils/sf_multi_mpse.h"
 #include "appid_utils/sf_mlmp.h"
-#include "utils/util.h"
+#include "application_ids.h"
 
 static const char* const FP_OPERATION_AND = "%&%";
 static const unsigned PATTERN_PART_MAX = 10;
index 2679f50260806c730d4246560336cfc62a97a7ab..1528f257ba31d3cde7a3caeb61c5517c203a101e 100644 (file)
 // client_app_smtp_test.cc author Steve Chew <stechew@cisco.com>
 // unit test for client_app_smtp
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "network_inspectors/appid/detector_plugins/detector_smtp.cc"
 
 #include <CppUTest/CommandLineTestRunner.h>
diff --git a/src/network_inspectors/appid/errors.sh b/src/network_inspectors/appid/errors.sh
deleted file mode 100755 (executable)
index f340def..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/bash
-
-# run make on selected files from MANIFEST.txt
-
-USAGE="$0 [-h] [<status>] [<cisco_username>]"
-
-if [[ $1 == -h ]]; then
-  echo $USAGE >&2
-  exit
-fi
-
-file_status=$1
-cisco_username=$2
-filter=
-
-if [[ -n "$file_status" ]]; then
-  filter="$filter *$file_status"
-fi
-
-if [[ -n "$cisco_username" ]]; then
-  filter="$filter *$USER"
-fi
-
-grep -v ^# MANIFEST.txt | while IFS='' read -r line || [[ -n "$line" ]]; do
-  echo $line | grep "$filter" >/dev/null && {
-    filename=$(echo $line | awk '{print $1}')
-    make "${filename%.*}_${filename##*.}" >/dev/null || echo $filename
-  }
-done
index 69671de9d1744438d5c23bfb3a332b8feae7e171..5775a5cede6b0a1d282b24528e37d89850667e99 100644 (file)
 
 // host_port_app_cache.cc author Sourcefire Inc.
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "host_port_app_cache.h"
 
 #include <map>
 
-#include "appid_config.h"
 #include "log/messages.h"
-#include "sfip/sf_ip.h"
+#include "utils/cpp_macros.h"
 
 PADDING_GUARD_BEGIN
 struct HostPortKey
index f5a3d1c2bb6d9e0e22c94100156b7f6aff711f35..fee1e98def73b8f04b99f234d85e14f492abd867 100644 (file)
@@ -22,7 +22,6 @@
 #ifndef HOST_PORT_APP_CACHE_H
 #define HOST_PORT_APP_CACHE_H
 
-#include "sfip/sf_ip.h"
 #include "appid_api.h"
 
 struct HostPortVal
index 5afe8df122316fc604a61e6c1ffb8926c0518182..f7d94d46c75c1a1f9e1e7dc5a55ea5301d0b547a 100644 (file)
 #ifndef HTTP_COMMON_H
 #define HTTP_COMMON_H
 
-#include "appid_api.h"
-#include "appid_utils/sf_multi_mpse.h"
+#include <vector>
+
+#include "flow/flow.h"
 
-#include "utils/sflsq.h"
+#include "appid_utils/sf_multi_mpse.h"
 
 #define MAX_USERNAME_SIZE   64
 #define MAX_URL_SIZE        65535
index c9cc81eb739d17c439559229d87e796971177063..4381e3f8dd4d7acaf716797509af4541808843c2 100644 (file)
 
 // ips_appid_option.cc  author: davis mcpherson <davmcphe@cisco.com>
 
-#include <algorithm>    // std::mismatch
-#include <vector>       // std::vector
-#include <utility>      // std::pair
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include "app_info_table.h"
-
-#include "main/snort_debug.h"
+#include "detection/detection_defines.h"
 #include "framework/ips_option.h"
 #include "framework/module.h"
-#include "framework/parameter.h"
-#include "detection/detect.h"
-#include "detection/detection_defines.h"
 #include "hash/sfhashfcn.h"
-#include "log/messages.h"
 #include "profiler/profiler.h"
-#include "stream/stream.h"
+#include "protocols/packet.h"
 #include "utils/util.h"
 
+#include "app_info_table.h"
+
 //-------------------------------------------------------------------------
 // appid option
 //-------------------------------------------------------------------------
index 2e87d42d8a69039d7e00b4cc610dbefa15ee01a7..3eb4564d0ab57246d041efa52ad2d6be63a5cd26 100644 (file)
 
 // length_app_cache.cc author Sourcefire Inc.
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "length_app_cache.h"
 
 #include "hash/sfxhash.h"
 #include "log/messages.h"
 
-#include "appid_config.h"
 #include "application_ids.h"
 
 #define HASH_NUM_ROWS (1024)
index 5f415575ec8abd1d8b2afc4c75cd2544852c9633..c31669923868bfafb459076f8bf5b205da511664 100644 (file)
@@ -22,7 +22,7 @@
 #ifndef LENGTH_APP_CACHE_H
 #define LENGTH_APP_CACHE_H
 
-#include "appid_api.h"
+#include "flow/flow.h"
 
 #define LENGTH_SEQUENCE_CNT_MAX (5)
 
index 9ce654007d845506af72b4d3d86afd869f96b66f..f3a6bd252a420782f94c3609a8569dd43e50e920 100644 (file)
 
 // lua_detector_api.cc author Sourcefire Inc.
 
-#include "lua_detector_api.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <cstring>
+#include "lua_detector_api.h"
 
-#include <pcre.h>
 #include <lua.hpp>
+#include <pcre.h>
 
 #include "hash/sfxhash.h"
 #include "log/messages.h"
 #include "main/snort_debug.h"
 #include "profiler/profiler.h"
-#include "protocols/protocol_ids.h"
-#include "sfip/sf_ip.h"
-#include "utils/util.h"
+#include "protocols/packet.h"
 
-#include "appid_module.h"
 #include "app_forecast.h"
 #include "app_info_table.h"
+#include "appid_module.h"
+#include "client_plugins/client_app_base.h"
+#include "detector_plugins/detector_dns.h"
+#include "detector_plugins/detector_http.h"
+#include "detector_plugins/detector_pattern.h"
 #include "host_port_app_cache.h"
-#include "http_common.h"
 #include "lua_detector_flow_api.h"
 #include "lua_detector_module.h"
 #include "lua_detector_util.h"
 #include "service_plugins/service_base.h"
-#include "service_plugins/service_ssl.h"
-#include "client_plugins/client_app_base.h"
-#include "detector_plugins/detector_dns.h"
-#include "detector_plugins/detector_http.h"
-#include "detector_plugins/detector_pattern.h"
 
 #define DETECTOR "Detector"
 #define OVECCOUNT 30    /* should be a multiple of 3 */
index bc00e0c73276b9fae5cec6a432f093b9434484b0..ec6f2bd9e4d09e9eb3d46d84ffbea1ce621971a6 100644 (file)
@@ -24,9 +24,6 @@
 
 // This module supports basic API towards Lua detectors.
 
-#include <cstdint>
-#include <string>
-
 #include "client_plugins/client_app_api.h"
 #include "service_plugins/service_api.h"
 
index 3ce5837f827b31c98a6ab5954030f51359a8cc8b..fea82b26ea9d04ab3aaf1ccb0cf155e387958d50 100644 (file)
 
 // lua_detector_flow_api.cc author Sourcefire Inc.
 
-#include "lua_detector_flow_api.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <lua.hpp>
+#include "lua_detector_flow_api.h"
 
 #include "appid_api.h"
-#include "log/messages.h"
 #include "lua_detector_api.h"
-#include "lua_detector_util.h"
 #include "lua_detector_module.h"
-#include "main/snort_debug.h"
-#include "sfip/sf_ip.h"
+#include "lua_detector_util.h"
 
 /* Lua flag bit/index to C flag value (0 for invalid). */
 static const uint64_t FLAGS_TABLE_LUA_TO_C[32]
index d3e7fb6ebf784b5fde811ad34e583e23e676c5bc..5a748edacb9c20e3ef8f6444e7a36542db0708fd 100644 (file)
 
 // supporting Lua detectors in core engine.
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "lua_detector_module.h"
 
-#include <algorithm>
 #include <glob.h>
 #include <libgen.h>
-#include <lua.hpp>
-#include <libgen.h>
 
-#include "appid_config.h"
-#include "client_plugins/client_app_base.h"
-#include "service_plugins/service_base.h"
 #include "log/messages.h"
 #include "lua/lua.h"
-#include "lua_detector_util.h"
+#include "main/snort_debug.h"
+
+#include "appid_config.h"
+#include "client_plugins/client_app_base.h"
 #include "lua_detector_api.h"
 #include "lua_detector_flow_api.h"
-#include "main/snort_debug.h"
-#include "utils/util.h"
+#include "lua_detector_util.h"
+#include "service_plugins/service_base.h"
 
 #define MAX_LUA_DETECTOR_FILENAME_LEN 1024
 #define MAX_DEFAULT_NUM_LUA_TRACKERS  10000
index 02c1c4f07b21e637bbcb9b51d42ab1a755d8727e..eaa964e44ff2853022b9112c0e4f894dd9672290 100644 (file)
 #ifndef LUA_DETECTOR_MODULE_H
 #define LUA_DETECTOR_MODULE_H
 
+#include <cstdint>
 #include <list>
 
-#include "main/thread.h"
-#include "utils/sflsq.h"
-
 class AppIdConfig;
 class Detector;
 struct DetectorFlow;
index f857a65e480248f92bc7868d215cf39328b79945..d98e4dfe85786b2296770c5f0a2cab59a79c47c9 100644 (file)
 
 // encapsulate Lua interface boilerplate to get sane, identical behavior across users
 
-#include <cassert>
-
 #include <lua.hpp>
 
+#include <cassert>
+
 template<typename T>
 struct UserData
 {
index 1f6f373ae06266e0940c2b3acb82a77a8fdd06be..c66e223553ace3bd1500657979c733a0adf853a1 100644 (file)
 
 // dcerpc.cc author Sourcefire Inc.
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "dcerpc.h"
 
-#include <netinet/in.h>
+#include <arpa/inet.h>
 
 #define min(x,y) ((x)<(y) ? (x) : (y))
 
index 89c77632bf7d862e065424875b362f929934555c..66ca3adb523d271f5f05cf6018a1f019477565c1 100644 (file)
@@ -22,7 +22,7 @@
 #ifndef DCERPC_H
 #define DCERPC_H
 
-#include <stdint.h>
+#include <cstdint>
 
 int dcerpc_validate(const uint8_t* data, int size);
 
index ea48c9c05176d7dd7bf38d072fe0a0ac9f25ccaf..21f69fc432caa89ce2b15b45451f9f8df9abd884 100644 (file)
 
 // service_base.cc author Ron Dempster <Ron.Dempster@sourcefire.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "service_base.h"
 
-#include <vector>
 #include <algorithm>
-#include <limits.h>
+
+#include "log/messages.h"
+#include "main/snort_debug.h"
+#include "protocols/packet.h"
+#include "search_engines/search_tool.h"
 
 #include "app_info_table.h"
+#include "appid_config.h"
+#include "appid_utils/ip_funcs.h"
+#include "detector_plugins/detector_dns.h"
+#include "detector_plugins/detector_pattern.h"
+#include "detector_plugins/detector_sip.h"
+#include "lua_detector_api.h"
+
 #include "service_api.h"
 #include "service_battle_field.h"
 #include "service_bgp.h"
 #include "service_ssl.h"
 #include "service_telnet.h"
 #include "service_tftp.h"
-#include "appid_session.h"
-#include "appid_config.h"
-#include "lua_detector_api.h"
-#include "lua_detector_module.h"
-#include "appid_utils/ip_funcs.h"
-#include "detector_plugins/detector_dns.h"
-#include "detector_plugins/detector_pattern.h"
-#include "detector_plugins/detector_sip.h"
-
-#include "log/messages.h"
-#include "main/snort_debug.h"
-#include "search_engines/search_tool.h"
-#include "utils/util.h"
-#include "sfip/sf_ip.h"
 
 //#define SERVICE_DEBUG 1
 //#define SERVICE_DEBUG_PORT  80
index ec0af5fc90c63616da13566fbd58013000e83eca..917c18aba39275a16100346e43fd148e51d162ee 100644 (file)
 #ifndef SERVICE_BASE_H
 #define SERVICE_BASE_H
 
-#include <cstdint>
-
 #include "appid_api.h"
 #include "appid_session.h"
 #include "service_api.h"
-#include "sfip/sf_ip.h"
 
 class AppIdConfig;
 class AppIdSession;
index 83f42a2fa0b0171cb5ccc7b89fcf4d2cb54c3803..31939bf893d7193563f5c8addc10f2a4e7f4f0e6 100644 (file)
 
 // service_battle_field.cc author Sourcefire Inc.
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "service_battle_field.h"
-#include "appid_module.h"
-#include "application_ids.h"
 
-#include "main/snort_debug.h"
-#include "utils/util.h"
+#include "protocols/packet.h"
+
+#include "appid_module.h"
 
 enum CONNECTION_STATES
 {
index 34d070f2917feb1481faaeacb3ed7438451af52e..b9ff4a97058bfa180c8a77335c5865cee6b21c11 100644 (file)
 
 // service_bgp.cc author Sourcefire Inc.
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "service_bgp.h"
-#include "appid_module.h"
-#include "application_ids.h"
 
 #include "main/snort_debug.h"
-#include "utils/util.h"
+
+#include "appid_module.h"
 
 static const unsigned BGP_PORT = 179;
 
index 7dd2e3fbc9094a8b0d8381e4b05770b6798b9e77..c4ef09c2bbc22942731b94e84db37a3aa1b97570 100644 (file)
 
 // service_bit.cc author Sourcefire Inc.
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "main/snort_debug.h"
 
-#include "application_ids.h"
-#include "service_api.h"
 #include "appid_module.h"
 
-#include "main/snort_debug.h"
-#include "utils/util.h"
+#include "service_api.h"
 
 static const char svc_name[] = "bt";
 static const uint8_t BIT_BANNER[]  = "\023BitTorrent protocol";
index c70abcac4c3ee91cf631326b810dc57fbedda2a1..57971c40239bef19474980b7e58a5acb3ced4a4b 100644 (file)
 
 // service_bootp.cc author Sourcefire Inc.
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "service_bootp.h"
+
 #include "main/snort_debug.h"
 #include "protocols/eth.h"
+#include "protocols/packet.h"
+
 #include "app_info_table.h"
-#include "application_ids.h"
 #include "appid_module.h"
 
 #define DHCP_MAGIC_COOKIE 0x63825363
index dae68fbfa44c04bc388e65b5a824da2bb9531b75..75dc1ec13e1de5706e4c5793ecacccafd9191e6e 100644 (file)
@@ -24,8 +24,6 @@
 
 // Service detector configuration
 
-#include <cstdint>
-
 #include "service_api.h"
 
 #define RNA_SERVICE_MAX_PORT 65536
index d8ce28865ceb85546ec6b8e2dd69d5c96c7fc491..70b40db7d1dc232902616a7de627dd981eba187a 100644 (file)
 
 // service_dcerpc.cc author Sourcefire Inc.
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "service_dcerpc.h"
-#include "appid_module.h"
-#include "application_ids.h"
-#include "dcerpc.h"
 
 #include "main/snort_debug.h"
-#include "utils/util.h"
+
+#include "appid_module.h"
+
+#include "dcerpc.h"
 
 #define DCERPC_THRESHOLD    3
 
index d799b713ea7b6445611b40839fdc063c983f55c6..ce1153bee8d6d636ab10c2ac56283a1e36dc1832 100644 (file)
 
 // service_direct_connect.cc author Sourcefire Inc.
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "service_direct_connect.h"
-#include "application_ids.h"
 
 #include "main/snort_debug.h"
-#include "utils/util.h"
 
 #include "appid_module.h"
 
index 91f502a918e22e86c3c1d09de78500e41710b85c..04eceea7b4dd684a4cbb76341b63843584213400 100644 (file)
 
 // service_flap.cc author Sourcefire Inc.
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "service_flap.h"
-#include "application_ids.h"
 
 #include "main/snort_debug.h"
-#include "utils/util.h"
 
 #define FLAP_PORT   5190
 
index fb9a566c7221fa9d00dc8035979b033158d6fe57..cbcb94f651388eb50ee1c634445f414940eceea2 100644 (file)
 
 // service_ftp.cc author Sourcefire Inc.
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "service_ftp.h"
 
 #include "main/snort_debug.h"
-#include "sfip/sf_ip.h"
-#include "utils/util.h"
+#include "protocols/packet.h"
 
 #include "app_info_table.h"
-#include "appid_api.h"
-#include "appid_session.h"
-#include "application_ids.h"
+#include "appid_module.h"
+
 #include "service_base.h"
 #include "service_util.h"
-#include "appid_module.h"
 
 #define FTP_PORT    21
 
index 67bf441783417c4291e9b9322a5f7d9829ed0c1b..3e6028e41f19588d85de8434753e281c775ef9b4 100644 (file)
 
 // service_irc.cc author Sourcefire Inc.
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "service_irc.h"
 
 #include "main/snort_debug.h"
-#include "utils/util.h"
 
-#include "appid_session.h"
-#include "application_ids.h"
 #include "appid_module.h"
 
 #define IRC_COUNT_THRESHOLD 10
index 6acb90e4651a1057a818bc48fc65b6855a52f68f..099bcb01345ba75fc9ad63a36f9a765583f92636 100644 (file)
 
 // service_lpr.cc author Sourcefire Inc.
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "main/snort_debug.h"
-#include "utils/util.h"
 
 #include "appid_module.h"
-#include "application_ids.h"
-#include "appid_session.h"
-#include "app_info_table.h"
+
 #include "service_api.h"
 
 #define LPR_COUNT_THRESHOLD 2
index 28144785d3197ae8e06126b8961e17a29eb23ec9..0e1918cbaa138587240c603c4e504471419326f2 100644 (file)
 
 // service_mdns.cc author Sourcefire Inc.
 
-#include "service_mdns.h"
-
-#include "appid_module.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include "appid_config.h"
-#include "app_info_table.h"
-#include "appid_session.h"
-#include "http_common.h"
-#include "lua_detector_api.h"
-#include "service_api.h"
-#include "service_base.h"
-#include "service_ssl.h"
-#include "client_plugins/client_app_base.h"
-#include "detector_plugins/http_url_patterns.h"
-#include "detector_plugins/detector_http.h"
+#include "service_mdns.h"
 
 #include "main/snort_debug.h"
-#include "utils/util.h"
+#include "protocols/packet.h"
 #include "search_engines/search_tool.h"
 
+#include "app_info_table.h"
+#include "appid_module.h"
+
 #define MDNS_PORT   5353
 #define PATTERN_REFERENCE_PTR   3
 #define PATTERN_STR_LOCAL_1           "\005local"
index 2bacb599a25732d33b2ee301bee5f8ab6daf49e5..60da22a4c5d0266702016b500c3e1b5db9aad3e8 100644 (file)
 
 // service_mysql.cc author Sourcefire Inc.
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "service_mysql.h"
 
 #include "main/snort_debug.h"
 
-#include "application_ids.h"
 #include "app_info_table.h"
-#include "appid_session.h"
-
-#include "service_api.h"
 #include "appid_module.h"
 
 #pragma pack(1)
index 609e19636f48ea0a57121fe0cfa1a6393e3661ac..594760b37701052c38750d2f80bad5fe5d7a0add 100644 (file)
 
 // service_netbios.cc author Sourcefire Inc.
 
-#include "service_netbios.h"
-
 #ifdef HAVE_CONFIG_H
-#include "config.h"     /* for WORDS_BIGENDIAN */
+#include "config.h"
 #endif
 
-#include "log/messages.h"
+#include "service_netbios.h"
+
 #include "main/snort_debug.h"
-#include "utils/util.h"
+#include "protocols/packet.h"
 
-#include "appid_module.h"
 #include "app_info_table.h"
-#include "appid_api.h"
-#include "appid_session.h"
-#include "application_ids.h"
+#include "appid_module.h"
+
 #include "dcerpc.h"
-#include "service_api.h"
 
 /*#define RNA_DEBUG_NETBIOS   1 */
 
index c796acfecf524740cf9c9a4eb904904d1bf5b64e..ab656fb8618618c99d5cebd64f57536d19fde059 100644 (file)
 
 // service_nntp.cc author Sourcefire Inc.
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "service_nntp.h"
 
 #include "main/snort_debug.h"
-#include "utils/util.h"
 
-#include "appid_session.h"
 #include "appid_module.h"
-#include "application_ids.h"
-#include "service_api.h"
 
 #define NNTP_PORT   119
 
index 2735cf9f3749529f2a44257e8cf1b656f01f7f0f..49172f563c5087aa6a86dbf503dca24a7f899d53 100644 (file)
 
 // service_ntp.cc author Sourcefire Inc.
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "service_ntp.h"
 
 #include "main/snort_debug.h"
 
-#include "appid_session.h"
 #include "appid_module.h"
-#include "application_ids.h"
-#include "service_api.h"
 
 #pragma pack(1)
 
index 806f6ae6317b9f163455897bc7778c300b5b6714..5ae424f92eaf5560b192e2184d3d1a43c21c56e8 100644 (file)
 
 // service_radius.cc author Sourcefire Inc.
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "service_radius.h"
 
 #include "main/snort_debug.h"
-#include "utils/util.h"
 
 #include "app_info_table.h"
-#include "appid_session.h"
-#include "application_ids.h"
-#include "service_api.h"
 #include "appid_module.h"
 
 #define RADIUS_CODE_ACCESS_REQUEST       1
index ad1bd868d179db013ce0fb99c5323cc73f2da1b3..db02527dd42e6eaf3d841aa0fd16ddcb2ed19c33 100644 (file)
 
 // service_rexec.cc author Sourcefire Inc.
 
-#include "service_rexec.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <ctype.h>
-#include <string.h>
-#include <stdlib.h>
-#include <stddef.h>
-#include <sys/types.h>
-#include <netinet/in.h>
+#include "service_rexec.h"
 
-#include "protocols/packet.h"
 #include "main/snort_debug.h"
-#include "utils/util.h"
+#include "protocols/packet.h"
 
-#include "appid_api.h"
 #include "app_info_table.h"
-#include "appid_session.h"
 #include "appid_module.h"
-#include "application_ids.h"
-#include "service_api.h"
+
 #include "service_base.h"
 #include "service_util.h"
 
index 37461a1fec48609a557fa2b0e1440c8083a8f464..786140099819213878ba7f637896f6a7211cac79 100644 (file)
 
 // service_rfb.cc author Sourcefire Inc.
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "service_rfb.h"
 
-#include "service_api.h"
+#include "main/snort_debug.h"
+
 #include "app_info_table.h"
-#include "application_ids.h"
 #include "appid_module.h"
 
-#include "main/snort_debug.h"
+#include "service_api.h"
 
 #define RFB_BANNER_SIZE 12
 
index 9f40866f9083083ab690b6923e54522aecd43849..ac9b4eda0441c59252ca338232e474a54e42025a 100644 (file)
 
 // service_rlogin.cc author Sourcefire Inc.
 
-#include "service_rlogin.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include "service_api.h"
-#include "application_ids.h"
-#include "appid_module.h"
+#include "service_rlogin.h"
 
 #include "main/snort_debug.h"
+#include "protocols/packet.h"
 #include "protocols/tcp.h"
-#include "utils/util.h"
+
+#include "appid_module.h"
+
+#include "service_api.h"
 
 #define RLOGIN_PASSWORD "Password: "
 enum RLOGINState
index 76483a44bd89f10dc9f6f1b0127be50860be2124..cbb518a9968b05d49b81e366535e053764d3bff7 100644 (file)
 
 // service_rpc.cc author Sourcefire Inc.
 
-#include "service_rpc.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
+#include "service_rpc.h"
+
 #include <netdb.h>
 
 #if defined(__FreeBSD__) || defined(__OpenBSD__)
 #include <rpc/rpcent.h>
 #endif
 
-#include "application_ids.h"
-#include "service_api.h"
-#include "app_info_table.h"
-#include "service_util.h"
-
-#include "log/messages.h"
 #include "main/snort_debug.h"
-#include "utils/util.h"
+#include "protocols/packet.h"
+
+#include "app_info_table.h"
 #include "appid_module.h"
 
+#include "service_api.h"
+#include "service_util.h"
+
 /*#define RNA_DEBUG_RPC   1 */
 
 enum RPCState
index faf280b46f72aa4f265c4cbfe85394e60168d9d2..c06db1b1547894841c64a0062e84efefa7eff7a4 100644 (file)
 
 // service_rshell.cc author Sourcefire Inc.
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "service_rshell.h"
 
-#include "application_ids.h"
-#include "service_api.h"
-#include "service_base.h"
-#include "service_util.h"
+#include "log/messages.h"
+#include "main/snort_debug.h"
+#include "protocols/packet.h"
+
 #include "app_info_table.h"
 #include "appid_module.h"
 
-#include "log/messages.h"
-#include "main/snort_debug.h"
-#include "utils/util.h"
+#include "service_base.h"
+#include "service_util.h"
 
 #define RSHELL_PORT  514
 #define RSHELL_MAX_PORT_PACKET 6
index f44c4c12e154024bd22e91ce0dee881f1fc75da3..74f0a44d7237dcc6ec49efefa670df1824370b58 100644 (file)
 
 // service_rsync.cc author Sourcefire Inc.
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "service_rsync.h"
 
-#include "application_ids.h"
-#include "service_api.h"
+#include "main/snort_debug.h"
+
 #include "app_info_table.h"
 #include "appid_module.h"
 
-#include "main/snort_debug.h"
-#include "utils/util.h"
-
 #define RSYNC_PORT  873
 
 #define RSYNC_BANNER "@RSYNCD: "
index db849da146003ad7eb2bb2efcbcbf0be335eec27..1f8ff32bd541e879945a317ac0f9276e1a1a550a 100644 (file)
 
 // service_rtmp.cc author Sourcefire Inc.
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "service_rtmp.h"
 
-#include "application_ids.h"
-#include "service_api.h"
+#include "main/snort_debug.h"
+
 #include "app_info_table.h"
 #include "appid_module.h"
 
-#include "log/messages.h"
-#include "main/snort_debug.h"
-#include "utils/util.h"
+#include "service_api.h"
 
 #define RTMP_PORT 1935
 
index 06490bce781c420064d191d4cf37b4803c09d8f0..1733ea3ba022218b7bc6b96146c1503b95762cd3 100644 (file)
 
 // service_snmp.cc author Sourcefire Inc.
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "service_snmp.h"
 
 #include "log/messages.h"
-#include "utils/util.h"
+#include "main/snort_debug.h"
+#include "protocols/packet.h"
 
-#include "appid_api.h"
-#include "appid_module.h"
 #include "app_info_table.h"
+#include "appid_module.h"
+
 #include "service_base.h"
 #include "service_util.h"
-#include "application_ids.h"
 
 #define SNMP_PORT   161
 
index f6dc58a08ea437ce04476232dc9248a38395156f..6dbc554ea51b3bc577a3d95baf4db6a8c70179a9 100644 (file)
 
 // service_ssh.cc author Sourcefire Inc.
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "service_ssh.h"
-#include "app_info_table.h"
-#include "service_base.h"
-#include "application_ids.h"
 
-#include "utils/util.h"
+#include "main/snort_debug.h"
+
+#include "app_info_table.h"
 #include "appid_module.h"
 
+#include "service_base.h"
+
 #define SSH_PORT    22
 
 #define SSH_BANNER "SSH-"
index acb7bcd4e780fdeaefde7fe177db39ebbc5a2ab2..3d829121a011d9f5ff706e0064d332bf085957b7 100644 (file)
 
 // service_ssl.cc author Sourcefire Inc.
 
-#include <ctype.h>
-#include <string.h>
-#include <stdlib.h>
-#include <stddef.h>
-#include <mutex>
-#include <sys/types.h>
-#include <netinet/in.h>
-#include <openssl/x509.h>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include "appid_module.h"
-#include "app_info_table.h"
-#include "appid_session.h"
-#include "service_config.h"
-#include "service_base.h"
 #include "service_ssl.h"
 
+#include <openssl/x509.h>
+
+#include <mutex>
+
 #include "main/snort_debug.h"
-#include "utils/util.h"
+#include "protocols/packet.h"
+
+#include "app_info_table.h"
+#include "appid_module.h"
 
 #define SSL_PORT    443
 
index 9cf8ef67038540e49ccdf8581ef82bf49d7f0a7e..08110bb85cffe047b866f41eae662b8444563152 100644 (file)
 
 // service_telnet.cc author Sourcefire Inc.
 
-#include <ctype.h>
-#include <string.h>
-#include <stdlib.h>
-#include <stddef.h>
-#include <sys/types.h>
-#include <netinet/in.h>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
 #include "main/snort_debug.h"
-#include "utils/util.h"
 
-#include "appid_session.h"
-#include "application_ids.h"
-#include "service_api.h"
 #include "appid_module.h"
 
+#include "service_api.h"
+
 #define TELNET_COUNT_THRESHOLD 3
 
 #define TELNET_IAC 255
index 20578b24f228ce313b0c6f5673b22f7683024a3e..cab134ace3a07900469850b6479e2bc0127e1a68 100644 (file)
 
 // service_tftp.cc author Sourcefire Inc.
 
-#include <ctype.h>
-#include <string.h>
-#include <stdlib.h>
-#include <stddef.h>
-#include <sys/types.h>
-#include <netinet/in.h>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include "main/snort_debug.h"
 #include "log/messages.h"
-#include "target_based/snort_protocols.h"
-#include "utils/util.h"
+#include "main/snort_debug.h"
+#include "protocols/packet.h"
 
 #include "app_info_table.h"
-#include "appid_api.h"
-#include "appid_session.h"
 #include "appid_module.h"
-#include "application_ids.h"
-#include "service_api.h"
+
 #include "service_base.h"
 #include "service_util.h"
 
index 13d3b1fc9cd7b772fe927da816b8fd18e395e617..0832f4d20685221ddf64cf5e55b05aaef11ec4ac 100644 (file)
 
 // service_timbuktu.cc author Sourcefire Inc.
 
-#include "appid_module.h"
-#include "appid_session.h"
-#include "application_ids.h"
-#include "service_api.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
 #include "main/snort_debug.h"
-#include "utils/util.h"
+
+#include "appid_module.h"
+
+#include "service_api.h"
 
 static const char svc_name[] = "timbuktu";
 static char TIMBUKTU_BANNER[]  = "\001\001";
index 7da715d4e9cb89f7d39edff252723b40a9dca627..660635d091f837b748b12765b0ab212f3247602c 100644 (file)
 
 // service_tns.cc author Sourcefire Inc.
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "main/snort_debug.h"
+
 #include "app_info_table.h"
-#include "appid_session.h"
 #include "appid_module.h"
-#include "application_ids.h"
-#include "service_api.h"
 
-#include "main/snort_debug.h"
-#include "utils/util.h"
+#include "service_api.h"
 
 static const char svc_name[] = "oracle";
 static const uint8_t TNS_BANNER[]  = "\000\000";
index de8a0c4d192b54d73eb976c5d3088e4bff00faa9..6dcff2a3e1d5e5e0df3ee2da1f43069f2ec1df99 100644 (file)
@@ -22,8 +22,6 @@
 #ifndef SERVICE_UTIL_H
 #define SERVICE_UTIL_H
 
-#include <stdint.h>
-#include <string.h>
 #include <mutex>
 
 #include "main/snort_config.h"
index 235f69305fc9038176a038c0286597a7608f58a6..8b1e13e1a73e1d397d2737c9164d6fa3f226a799 100644 (file)
 // service_rsync_test.cc author Steve Chew <stechew@cisco.com>
 // unit test for service_rsync
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "network_inspectors/appid/service_plugins/service_rsync.cc"
 
 #include <CppUTest/CommandLineTestRunner.h>
index b4b136be6ab6f299267416641595c396f8723ca1..6df1de74e3d80e1f9451ef377b508ec020ea7aa1 100644 (file)
 
 // service_state.cc author Sourcefire Inc.
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "service_state.h"
 
 #include <map>
 
 #include "log/messages.h"
-#include "service_plugins/service_base.h"
-#include "sfip/sf_ip.h"
-#include "utils/util.h"
+#include "utils/cpp_macros.h"
+
+#include "service_plugins/service_api.h"
 
 //#define DEBUG_SERVICE_STATE 1
 
index 2e7ec084d294899cb6f5ccdd9f2cf57fb840d039..5038661d6e2eff0ac4ae5307be8920c79448ba6c 100644 (file)
 // appid_http_event_test.cc author Steve Chew <stechew@cisco.com>
 // unit test for the http inspection event handler.
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 //  Must be included before CppUTest files to avoid compiler error.
 #include "network_inspectors/appid/appid_http_event_handler.cc"
 
index 9414f9154df81792f8e4565584d849a7a23188e1..e00a22afa1c781b7fcded74db5959777956540b3 100644 (file)
 #ifndef THIRDPARTY_APPID_API_H
 #define THIRDPARTY_APPID_API_H
 
-#include "protocols/packet.h"
-
-#include "appid_api.h"
 #include "thirdparty_appid_types.h"
 
+struct Packet;
+
 #define THIRD_PARTY_APP_ID_API_VERSION 1
 
 #define TP_PATH_MAX 4096
index 437b4111bedbf7656a2dac642e5793e27a9f6f1d..3bf01be48da746ddf7dc6ab996554446870199f5 100644 (file)
@@ -22,7 +22,6 @@
 #ifndef THIRDPARTY_APPID_TYPES_H
 #define THIRDPARTY_APPID_TYPES_H
 
-#include <stdint.h>
 #include "http_common.h"
 
 #define TP_SESSION_FLAG_DPI        0x00000001
index 8d92de14ebae2f1605eafe8ac95b592ed1742132..3de963a6158b3330d9f7e68b0b631aa8056b727d 100644 (file)
 
 // thirdparty_appid_utils.cc author Sourcefire Inc.
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "thirdparty_appid_utils.h"
 
 #include <dlfcn.h>
 
-#include "main/snort_debug.h"
 #include "log/messages.h"
+#include "main/snort_debug.h"
+
 #include "appid_config.h"
 #include "thirdparty_appid_api.h"
 
index d32da07ff7c84c468987eb9cf14c66cabbcfa878..5191d812ea2d8b44cd16660e2ce7b3057f6b5549 100644 (file)
 
 // arp_module.cc author Russ Combs <rucombs@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "arp_module.h"
 
 #define ARPSPOOF_UNICAST_ARP_REQUEST_STR \
index 0ea2841d6b9a5ff90e0e27e1b7f588c3f2e179cf..971ca80aadd2bbf63fb951558f4934f9269d25d4 100644 (file)
 #ifndef ARP_SPOOF_MODULE_H
 #define ARP_SPOOF_MODULE_H
 
-#include <vector>
-
 #include "framework/module.h"
-#include "main/thread.h"
 
 #define MOD_NAME "arp_spoof"
 #define MOD_HELP "detect ARP attacks and anomalies"
index 579c7965dbe121a78140ca9a1ede7c183bdc9b2c..986592694aee88dfee99ba110b5e79d39763ff3a 100644 (file)
  */
 
 /*  I N C L U D E S  ************************************************/
-#include "arp_module.h"
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <assert.h>
-#include <sys/types.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
-
-#include "log/messages.h"
-#include "main/snort_types.h"
-#include "main/snort_debug.h"
-#include "detection/detect.h"
-#include "events/event.h"
 #include "events/event_queue.h"
-#include "parser/parser.h"
-#include "utils/util.h"
+#include "log/messages.h"
 #include "profiler/profiler.h"
-#include "framework/inspector.h"
-#include "protocols/packet.h"
-#include "protocols/layer.h"
 #include "protocols/arp.h"
 #include "protocols/eth.h"
+#include "protocols/packet.h"
 #include "sfip/sf_ip.h"
 
+#include "arp_module.h"
+
 static const uint8_t bcast[6] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
 
 THREAD_LOCAL ProfileStats arpPerfStats;
index 8da71ddc5c31885fe2fd29b49c883de938996f6a..0983d4b78429256b802dd3531078dffc05d8515d 100644 (file)
 
 // bind_module.cc author Russ Combs <rucombs@cisco.com>
 
-#include "bind_module.h"
-
-#include <assert.h>
-#include <string.h>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <string>
+#include "bind_module.h"
 
-#include "binding.h"
-#include "protocols/packet.h"
-#include "parser/parse_ip.h"
 #include "log/messages.h"
-#include "main/policy.h"
-#include "main/snort_config.h"
 #include "main/shell.h"
-#include "managers/module_manager.h"
-#include "parser/parser.h"
+#include "main/snort_config.h"
+#include "parser/parse_ip.h"
+#include "protocols/packet.h"
 
 using namespace std;
 
index 7d8cc5110af55242bd14154b5ca5734439481db9..7df6c4589e09fc44793d1423ac05c0f30e5dde7a 100644 (file)
 
 // binder management interface
 
-#include <vector>
-
 #include "framework/module.h"
-#include "main/thread.h"
 #include "binding.h"
 
 #define BIND_NAME "binder"
@@ -40,7 +37,6 @@ struct BindStats
 
 extern THREAD_LOCAL BindStats bstats;
 extern THREAD_LOCAL ProfileStats bindPerfStats;
-struct Binding;
 
 class BinderModule : public Module
 {
index 33044da0c1f74d468d9fa827694a4b9558523965..6bf4ac128e863be4ed081c22dcca2cd939881be7 100644 (file)
 //--------------------------------------------------------------------------
 // binder.cc author Russ Combs <rucombs@cisco.com>
 
-#include "binder.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <vector>
+#include "binder.h"
 
-#include "binding.h"
-#include "bind_module.h"
 #include "flow/flow.h"
-#include "flow/session.h"
-#include "framework/inspector.h"
+#include "flow/flow_key.h"
+#include "log/messages.h"
+#include "main/snort_config.h"
 #include "managers/inspector_manager.h"
-#include "managers/plugin_manager.h"
+#include "profiler/profiler.h"
 #include "protocols/packet.h"
-#include "protocols/vlan.h"
-#include "protocols/layer.h"
+#include "stream/stream.h"
 #include "stream/stream_splitter.h"
-#include "profiler/profiler.h"
-#include "utils/stats.h"
-#include "log/messages.h"
-#include "main/snort_config.h"
-#include "main/policy.h"
-#include "parser/parser.h"
-#include "target_based/sftarget_data.h"
-#include "target_based/snort_protocols.h"
 #include "target_based/sftarget_reader.h"
-#include "packet_io/active.h"
+#include "target_based/snort_protocols.h"
+
+#include "bind_module.h"
+#include "binding.h"
 
 using namespace std;
 
index 1d5499c83f7f3c607909dbaea89443f3cc8f8bc0..33f56e3c09f5a785b2c9dfab8b2d478444a0cbf0 100644 (file)
 // binder_test.cc author Ed Borgoyn <eborgoyn@cisco.com>
 // unit test main
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "network_inspectors/binder/binder.cc"
 #include "network_inspectors/binder/bind_module.h"
 
index 3c02009ed0284ef7a482332eeeeecc1815b56a42..805a7e42af0fedd0cfb8fc7f4254a56db2c07c74 100644 (file)
@@ -22,7 +22,6 @@
 #include "config.h"
 #endif
 
-#include "framework/inspector.h"
 #include "managers/plugin_manager.h"
 
 extern const BaseApi* nin_binder;
index 7e268045795cc96fdf53ce9e9814607bd6254945..3a7cf047c9d259b17ec359e08c1f4f0d88da5959 100644 (file)
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
-#include "norm.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <string.h>
+#include "norm.h"
 
 #include "main/snort_config.h"
 #include "packet_io/sfdaq.h"
-#include "protocols/ipv4.h"
+#include "protocols/icmp4.h"
+#include "protocols/icmp6.h"
 #include "protocols/ipv4_options.h"
 #include "protocols/tcp.h"
 #include "protocols/tcp_options.h"
-#include "protocols/icmp4.h"
-#include "protocols/icmp6.h"
 #include "stream/tcp/tcp_normalizer.h"
-#include "utils/stats.h"
 
 enum PegCounts
 {
index 3f5fb9310b10257610efb0b7e8af0ee9ee2c9575..8c86667db9945e7cfd3196e0588680f10f4cb809 100644 (file)
@@ -20,8 +20,8 @@
 #ifndef NORM_H
 #define NORM_H
 
-#include "normalize.h"
 #include "protocols/packet_manager.h"
+#include "normalize.h"
 
 struct NormalizerConfig;
 struct Packet;
index 273ac05a8e3153e7dd3c45351dba278f3961a8cd..ac3510224288eff7a554b7a978e890e58a5e16da 100644 (file)
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
-#include "norm_module.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <string.h>
-#include <string>
-#include <sstream>
-#include <vector>
+#include "norm_module.h"
 
+#include "main/policy.h"
 #include "stream/tcp/tcp_normalizer.h"
 
 using namespace std;
index ecae99c557d8abc9939bdecdacd154db38beed0b..a907bed4a3e19d485e77ae810b142f436f562152 100644 (file)
@@ -21,9 +21,6 @@
 #ifndef NORM_MODULE_H
 #define NORM_MODULE_H
 
-#include <string>
-#include <vector>
-
 #include "framework/module.h"
 #include "norm.h"
 
index 097f8563906ac1f955e345434e7a67627ff4ef56..9edf89462923fbe3f0912e989ebd499333611f9c 100644 (file)
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "normalize.h"
 
-#include "norm.h"
-#include "norm_module.h"
+#include "log/messages.h"
+#include "main/policy.h"
 #include "packet_io/active.h"
 #include "packet_io/sfdaq.h"
-#include "parser/parser.h"
 #include "profiler/profiler.h"
-#include "log/messages.h"
-#include "main/snort_types.h"
-#include "main/snort_config.h"
-#include "framework/inspector.h"
-#include "flow/flow.h"
+
+#include "norm_module.h"
 
 THREAD_LOCAL ProfileStats norm_perf_stats;
 static THREAD_LOCAL uint32_t t_flags = 0;
index a461351ef87117fc8c82409326bf6be63f800e16..c2ed2d47f70ac16117094b0994b3c93e8f8adbc2 100644 (file)
 #ifndef NORMALIZE_H
 #define NORMALIZE_H
 
-#include <cstdint>
-#include <stdint.h>
-
-#include "main/policy.h"
 #include "framework/counts.h"
 
 // these control protocol specific normalizations
index f694c363e213d0d226c616715461d411350ced65..a73bc7fc89ad9db89774a93b2213d56e5a05347e 100644 (file)
 
 // capture_module.cc author Carter Waxman <cwaxman@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "capture_module.h"
 
 #include <lua.hpp>
 
-#include "packet_capture.h"
 #include "profiler/profiler.h"
-#include "utils/util.h"
+
+#include "packet_capture.h"
 
 using namespace std;
 
index 4ffeb8a6815bce9c6e56548a358ab39e63d02326..e01886e86e43ff0f5a82e8716e0c67faf48ae2a9 100644 (file)
 
 #include <pcap.h>
 #include <sfbpf.h>
-#include <string>
 
 #include "framework/inspector.h"
 #include "log/messages.h"
-#include "main/snort_config.h"
-#include "main/thread.h"
 #include "protocols/packet.h"
-#include "utils/util.h"
 
 #ifdef UNIT_TEST
 #include "catch/catch.hpp"
 #endif
 
+#include "capture_module.h"
+
 using namespace std;
 
 #define FILE_NAME "packet_capture.pcap"
index 53230740530b6ede31687761a05f9e2efe3654a3..fe7559c1935ccddec4ab511d920bce5477af4248 100644 (file)
@@ -20,7 +20,7 @@
 #ifndef PACKET_CAPTURE_H
 #define PACKET_CAPTURE_H
 
-#include "capture_module.h"
+#include <string>
 
 void packet_capture_enable(std::string);
 void packet_capture_disable();
index 502f2cf7f6dedb8790b2817dd07b60932c36677f..947be95d61cc21347920bef591ca4278fdbba0e3 100644 (file)
 
 // base_tracker.cc author Carter Waxman <cwaxman@cisco.com>
 
-#include "base_tracker.h"  // FIXIT-W Returning null reference (from <vector>)
-#include "perf_module.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include "framework/module.h"
+#include "base_tracker.h"  // FIXIT-W Returning null reference (from <vector>)
 
 #ifdef UNIT_TEST
 #include "catch/catch.hpp"
index beb870dd19816b3f2e56958704863f7a2be6310c..e876fd62cd1dd0112f8e1ebbdc6f3616b252be37 100644 (file)
 
 // cpu_tracker.cc author Carter Waxman <cwaxman@cisco.com>
 
-#include "cpu_tracker.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include "utils/stats.h"
-#include "utils/util.h"
+#include "cpu_tracker.h"
 
 #include <sys/resource.h>
+#include <sys/time.h>
 
 #ifdef __APPLE__
 #include <mach/mach_host.h>
 #include <mach/thread_act.h>
 #endif
 
-#define CPU_FILE (PERF_NAME "_cpu.csv")
-
 #ifdef UNIT_TEST
 #include "catch/catch.hpp"
 #endif
 
+#define CPU_FILE (PERF_NAME "_cpu.csv")
+
 static inline uint64_t get_microseconds(struct timeval t)
 {
     return (uint64_t)t.tv_sec * 1000000 + t.tv_usec;
index 95b2473c7119cdf05475c4b78516a1b6171f3b4e..145745d4b238a4a26263d6168883bb94d99537b4 100644 (file)
 #ifndef CPU_TRACKER_H
 #define CPU_TRACKER_H
 
-#include "perf_module.h"
 #include "perf_tracker.h"
 
-#include <sys/time.h>
-
 class CPUTracker : public PerfTracker
 {
 public:
index 1d47e4262163b860e540a58e965e8500af6befbe..c650321450cb759e249735424c598d40cc7b2172 100644 (file)
 
 // csv_formatter.cc author Carter Waxman <cwaxman@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "csv_formatter.h"
 
 #include <sstream>
index 6a47b2032ecfc38dd365ae2e0949f68103118e5e..d68e31d86d420b8226b8a4c9b2705c6802a57c3d 100644 (file)
 
 // flow_ip_tracker.cc author Carter Waxman <cwaxman@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "flow_ip_tracker.h"
 
 #include "log/messages.h"
-#include "sfip/sf_ip.h"
-#include "utils/util.h"
-#include "utils/util_net.h"
-
-#include "perf_module.h"
+#include "protocols/packet.h"
 
 #define FLIP_FILE (PERF_NAME "_flow_ip.csv")
 
index 09c487f1d4bb316b322adf4dadf50ba5e25c1c7c..ca73a99c3244b55b6d2d9349e27befa083097a44 100644 (file)
 
 // flow_tracker.cc author Carter Waxman <cwaxman@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "flow_tracker.h"
-#include "perf_module.h"
 
 #include "protocols/icmp4.h"
+#include "protocols/packet.h"
 #include "protocols/tcp.h"
 #include "protocols/udp.h"
-#include "utils/util.h"
 
 #ifdef UNIT_TEST
 #include "catch/catch.hpp"
index dd02de49eaaac9aba60dc794fc0ecd6eed3f31de..70b2b5c7772796898fead740037e5a19a55e5d51 100644 (file)
 
 // perf_formatter.cc author Carter Waxman <cwaxman@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "perf_formatter.h"
 
 using namespace std;
index 16bc375775083dd8461cedea2dc70f98500ec71c..524c990a6af1808d8ab29cde8a1b4b7af7ea5081 100644 (file)
 // ouput open.
 //
 
-#include <framework/counts.h>
-
 #include <string>
 #include <vector>
 
+#include "framework/counts.h"
+
 union FormatterValue
 {
     PegCount* pc;
index ed93ef8691b5db5fb519c9bc2fcb7cf18361734f..1550209141648440c63deeda6e7e920f2fb4b5f2 100644 (file)
 
 // perf_module.cc author Russ Combs <rucombs@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "perf_module.h"
 
 #include "managers/module_manager.h"
-#include "managers/plugin_manager.h"
-#include "utils/util.h"
 
 //-------------------------------------------------------------------------
 // perf attributes
index 6d1bcda23a0df36a35893c74a79744f9e7062931..548943f46a878ff1167cd80d0f413813627098f2 100644 (file)
 #include "config.h"
 #endif
 
-#include <stdlib.h>
-#include <ctype.h>
-#include <errno.h>
-#include <unistd.h>
-
-#include <string>
-
 #include "perf_monitor.h"
-#include "perf_module.h"
 
 #include "log/messages.h"
-#include "main/snort_config.h"
-#include "main/snort_types.h"
-#include "main/snort_debug.h"
-#include "parser/parser.h"
-#include "packet_io/sfdaq.h"
 #include "profiler/profiler.h"
-#include "framework/inspector.h"
-#include "utils/stats.h"
-#include "utils/util.h"
+#include "protocols/packet.h"
 
 #include "base_tracker.h"
 #include "cpu_tracker.h"
-#include "flow_tracker.h"
 #include "flow_ip_tracker.h"
+#include "flow_tracker.h"
 
 #ifdef UNIT_TEST
 #include "catch/catch.hpp"
index 8c59a827d809c24a07732ed02e70606a1b77c1f5..4a498603354cc30c5f044f7fcbe2415af07c5772 100644 (file)
 // These are the basic functions and structures that are needed to call
 // performance functions.
 
-#include <vector>
 #include "perf_module.h"
-#include "main/snort_types.h"
-#include "main/snort_debug.h"
-#include "main/thread.h"
-#include "protocols/packet.h"
+
+struct Packet;
 
 extern PerfConfig* perfmon_config;  // FIXIT-M shouldn't be needed externally
 extern THREAD_LOCAL bool perfmon_rotate_perf_file;
index e157b86c7fa396f139f81435b925a32ac9ec5bad..057149e64d055d081f7a567d915bc50fb3d2675b 100644 (file)
 
 // perf_tracker.cc author Carter Waxman <cwaxman@cisco.com>
 
-#include <sys/stat.h>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
 #include "perf_tracker.h"
 
-#include "csv_formatter.h"
-#include "perf_module.h"
-#include "text_formatter.h"
+#include <limits.h>
+#include <sys/stat.h>
 
 #include "log/messages.h"
 #include "main/snort_config.h"
-#include "main/thread.h"
-#include "parser/parser.h"
 #include "utils/util.h"
 
+#include "csv_formatter.h"
+#include "text_formatter.h"
+
 static inline bool check_file_size(FILE* fh, uint64_t max_file_size)
 {
     int fd;
index 92429aacd460e096e63a913e1f53836349481c58..9c0f818ac6c156bfe31ba3fa8c8529e750825cda 100644 (file)
 
 // text_formatter.cc author Carter Waxman <cwaxman@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "text_formatter.h"
 
 #include <sstream>
index 4cc40fa2b54fb8456d3541169590082a49afd7e3..83d695f1a0eb46ee05537a8c480cf928d45cd912 100644 (file)
    objects, and collections of IP ADDRESSes as objects
 */
 
-#include "ipobj.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
+#include "ipobj.h"
 
 #include "protocols/packet.h"
 #include "utils/util.h"
-#include "utils/snort_bounds.h"
-#include "sfip/sf_ip.h"
 
 /*
    IP COLLECTION INTERFACE
index 2e4d943569c6bd08d5d51cb2b278e0145fd0b50d..a3d230076f169983a86e4a93d7a41f56f61b1bd3 100644 (file)
 #ifndef IPOBJ_H
 #define IPOBJ_H
 
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-
-#include "utils/sflsq.h"
 #include "sfip/sf_cidr.h"
+#include "utils/sflsq.h"
 
 struct PORTRANGE
 {
index c00c842c2478666b039fc489a66527c31a44889b..0a113c188a32e6576fa590e106eb7d5fe1ab2d1e 100644 (file)
 #include "config.h"
 #endif
 
-#include <assert.h>
-#include <sys/types.h>
-#include <errno.h>
-
-#include <string>
-
-#include "ps_detect.h"
-#include "ps_inspect.h"
-#include "ps_module.h"
-
-#include "ipobj.h"
-#include "log/messages.h"
-#include "main/snort_config.h"
-#include "managers/inspector_manager.h"
-#include "protocols/packet_manager.h"
-#include "protocols/packet.h"
+#include "detection/detect.h"
 #include "events/event.h"
 #include "events/event_wrapper.h"
 #include "filters/sfthreshold.h"
-#include "utils/util.h"
-#include "utils/sfsnprintfappend.h"
-#include "framework/inspector.h"
+#include "log/messages.h"
+#include "managers/inspector_manager.h"
 #include "profiler/profiler.h"
-#include "time/packet_time.h"
-#include "detection/detect.h"
+#include "protocols/packet_manager.h"
+#include "utils/sfsnprintfappend.h"
+#include "utils/util.h"
+
+#include "ps_inspect.h"
+#include "ps_module.h"
 
 #define PROTO_BUFFER_SIZE 256
 
index b17265bb5382b9231981ba78128766854d954b38..e56c8098f1666e456a65a0e0449c785d76537b6a 100644 (file)
 **      on hosts that are portscanned.  This idea makes portscan a lot more
 **      useful for analysts.
 */
-#include "ps_detect.h"
-#include "ps_inspect.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <stdlib.h>
-#include <string.h>
-#include <sys/types.h>
+#include "ps_detect.h"
 
-#include "ipobj.h"
+#include "hash/sfxhash.h"
 #include "log/messages.h"
-#include "main/snort_config.h"
+#include "protocols/icmp4.h"
 #include "protocols/packet.h"
-#include "time/packet_time.h"
-#include "hash/sfxhash.h"
 #include "protocols/tcp.h"
-#include "protocols/udp.h"
-#include "protocols/icmp4.h"
-#include "protocols/icmp6.h"
-#include "protocols/eth.h"
-#include "sfip/sf_ip.h"
 #include "stream/stream.h"
+#include "time/packet_time.h"
+#include "utils/cpp_macros.h"
+
+#include "ps_inspect.h"
 
 PADDING_GUARD_BEGIN
 typedef struct s_PS_HASH_KEY
index bf8c357686a5779d456457b12d04888668a35450..b7b85290a7a8283b56137e771b930d4805b3c0ad 100644 (file)
 #ifndef PS_DETECT_H
 #define PS_DETECT_H
 
-#include <time.h>
 #include <sys/time.h>
+#include <time.h>
 
-#include "ipobj.h"
 #include "sfip/sf_ip.h"
+#include "ipobj.h"
 
 #define PS_OPEN_PORTS 8
 
index a406f993221b8a947f1c755ee3e81bcdc9fdf238..be73364c97df80ca54addce3ad31a0262dc660df 100644 (file)
@@ -21,9 +21,6 @@
 #ifndef PS_INSPECT_H
 #define PS_INSPECT_H
 
-#include <time.h>
-#include <sys/time.h>
-
 #include "framework/inspector.h"
 #include "ps_detect.h"
 
index b71179ba5604320794e61ea22788d4243825a8a0..074fbd6fc62042a79fb5297faf18b50c5c21c385 100644 (file)
 
 // ps_module.cc author Russ Combs <rucombs@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "ps_module.h"
 
+#include <cassert>
+
 //-------------------------------------------------------------------------
 // port_scan tables
 //-------------------------------------------------------------------------
index 8b0b7f5da76d2a2ae33a7e405796e2a26598c0a7..562579f802f34a7d33efb073a62c13eafdc3729e 100644 (file)
@@ -23,7 +23,6 @@
 
 #include "framework/module.h"
 #include "ps_detect.h"
-#include "main/thread.h"
 
 #define PS_NAME "port_scan"
 #define PS_HELP "port scan inspector; also configure port_scan_global"
index 7ec05fb3d1948254687ec8030f55666e3527d792..5f76b7e667f501220f330110b33a1d92cc1674a9 100644 (file)
 #ifndef REPUTATION_CONFIG_H
 #define REPUTATION_CONFIG_H
 
-#include "main/snort_types.h"
-#include "sfrt/sfrt_flat.h"
-#include "main/snort_debug.h"
 #include "framework/counts.h"
-#include "main/thread.h"
+#include "main/snort_debug.h"
+#include "sfrt/sfrt_flat.h"
 
 #define NUM_INDEX_PER_ENTRY 4
 
index e0c41b12d23cac78473583ec69c110d47dd5d37c..930323be77d19f10bdc8026de479912f791717c9 100644 (file)
 
 // reputation_inspect.cc author Hui Cao <huica@cisco.com>
 
-#include "reputation_inspect.h"
-
-#include "reputation_module.h"
-#include "reputation_parse.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <assert.h>
-#include <string.h>
-#include <stdio.h>
-#include <sys/types.h>
+#include "reputation_inspect.h"
 
-#include "protocols/packet.h"
-#include "sfip/sf_ip.h"
+#include "detection/detect.h"
 #include "events/event_queue.h"
 #include "log/messages.h"
-#include "main/snort_types.h"
-#include "main/snort_debug.h"
-#include "profiler/profiler.h"
-#include "file_api/file_api.h"
-#include "parser/parser.h"
-#include "framework/inspector.h"
-#include "utils/sfsnprintfappend.h"
-#include "target_based/snort_protocols.h"
-#include "detection/detect.h"
 #include "packet_io/active.h"
+#include "profiler/profiler.h"
+
+#include "reputation_module.h"
 
 THREAD_LOCAL ProfileStats reputationPerfStats;
 ReputationStats reputationstats;
index ecadd3e58f4aa2240091a14925a14f2e18da393c..282ef3ad0df4e7b4fd3547a0bd02c78e2c4bec9c 100644 (file)
@@ -19,7 +19,7 @@
 #ifndef REPUTATION_INSPECT_H
 #define REPUTATION_INSPECT_H
 
-#include "protocols/packet.h"
+#include "flow/flow.h"
 
 // Per-session data block containing current state
 // of the Reputation preprocessor for the session.
index 4673265d57c190c370ec2adda173fe65012522d1..dbdd26a01738708f1943f473b00e327193d5d8ae 100644 (file)
 
 // reputation_module.cc author Bhagya Tholpady <bbantwal@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "reputation_module.h"
 
-#include <assert.h>
-#include <sstream>
+#include <cassert>
 
 #include "log/messages.h"
 #include "utils/util.h"
index a9e589faccabc575e7e0a70d1f3644303e0c1dbb..77eb8c30ac26a7de6bd8ef904528de53e25d44cc 100644 (file)
@@ -24,8 +24,6 @@
 // Interface to the REPUTATION network inspector
 
 #include "framework/module.h"
-#include "framework/bits.h"
-#include "main/thread.h"
 #include "reputation_config.h"
 
 #define GID_REPUTATION 136
index 8094662a6f5f9c2cbab1453c092516cd29302161..9fab13205213b8ba8b38718c1fb3c3c186214f24 100644 (file)
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 // reputation_parse.cc author Hui Cao <huica@cisco.com>
-//
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
 #include "reputation_parse.h"
 
-#include <assert.h>
+#include <limits.h>
 #include <netinet/in.h>
 
+#include <cassert>
 #include <limits>
 
 #include "log/messages.h"
-#include "main/snort_debug.h"
 #include "parser/config_file.h"
 #include "sfip/sf_cidr.h"
 #include "utils/util.h"
index 9109bde5910269204586bce2529c3ff8537f6412..41fa8f30b11047722e7a30c3cacd0035cec449cc 100644 (file)
 #include "active.h"
 
 #include "log/messages.h"
+#include "main/snort_config.h"
 #include "managers/action_manager.h"
-#include "packet_io/sfdaq.h"
 #include "protocols/tcp.h"
 #include "stream/stream.h"
 #include "utils/dnet_header.h"
 
+#include "sfdaq.h"
+
 #define MAX_ATTEMPTS 20
 
 // these can't be pkt flags because we do the handling
index ded861162a1426ee3bed0893847ccfc279ec8bca..4cd675a66ae5fc33873c73ae81e7666a3659ae4e 100644 (file)
 // manages packet processing verdicts returned to the DAQ.  action (what to
 // do) is separate from status (whether we can actually do it or not).
 
-#include "main/snort_config.h"
 #include "protocols/packet_manager.h"
 
 struct Packet;
+struct SnortConfig;
 
 class SO_PUBLIC Active
 {
index 9b200448da3a1e7b156a9d499133cade06cc9534..86638884c436113b6fe9f287b942422c2fd252ab 100644 (file)
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "intf.h"
 
 #include <netinet/in.h>
 #include <pcap.h>
-#include <stdio.h>
 
 #include "log/messages.h"
-#include "main/snort_types.h"
-#include "main/snort_debug.h"
-#include "utils/util.h"
 #include "sfip/sf_ip.h"
 
 //------------------------------------------------------------------------------
index 189a5f831b4a4af7d5001a980f39e1357014ade3..a182c15b6bd2e052b6a19763e78fa71e52d54450 100644 (file)
 
 // sfdaq.cc author Michael Altizer <mialtize@cisco.com>
 
-#include "sfdaq.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <string.h>
-
-#include <mutex>
-#include <ostream>
+#include "sfdaq.h"
 
 extern "C" {
 #include <daq.h>
 #include <sfbpf_dlt.h>
 }
 
+#include <mutex>
+
 #include "log/messages.h"
 #include "main/snort_config.h"
-#include "parser/parser.h"
 #include "protocols/packet.h"
 #include "protocols/vlan.h"
-#include "utils/util.h"
 
 #include "sfdaq_config.h"
 
index 5c3ef2835ad6f6c82bdd6db61e04f4c3fc58a841..06f53f95e66cf1784a12f548d4e50ae506377062 100644 (file)
@@ -22,9 +22,7 @@
 #ifndef SFDAQ_H
 #define SFDAQ_H
 
-extern "C" {
 #include <daq_common.h>
-}
 
 #include <string>
 
index 7ed3df023e40d8a4f70c20352c783f5b5036c369..71426edeca990725b9bbdeb16d6969d4dc3caaf2 100644 (file)
 
 // sfdaq_config.cc author Michael Altizer <mialtize@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "sfdaq_config.h"
 
 using namespace std;
index 7a0dc5279dacefb31939d93643878fa28d989b6d..c2a2b8e1704bd23d0922a5470903c692fb78ce40 100644 (file)
@@ -24,7 +24,7 @@
 
 #include "sfdaq_module.h"
 
-#include <assert.h>
+#include <cassert>
 
 #include "log/messages.h"
 #include "main/snort_config.h"
index 44a0aff9a5c7af5a68ec6194a8d2746bb24f6508..bfbefec418ccd611460d0425d890fed671412dc5 100644 (file)
 // unit tests
 // -----------------------------------------------------------------------------
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "catch/catch.hpp"
 #include "catch/unit_test.h"
 #include "main/snort_config.h"
index ba5fbef6f1e72f93c1e5d7fb5f466d4f452eff2b..7d2a8489a0bb54e3d1c43c3ca937391297813570 100644 (file)
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "trough.h"
 
 #include <dirent.h>
index ae19ae6afe03621c979b6b650905b427d8dfaf91..59434d658cde4e0dc56801f2d1507574b85ddd4c 100644 (file)
 //--------------------------------------------------------------------------
 // arg_list.cc author Russ Combs <rucombs@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "arg_list.h"
 
-#include <string.h>
+#include <cstring>
 
 void ArgList::dump()
 {
index d480f4fbd0b321ae7169b0a9ab8fd27e1fc56550..642bf7f21774e4f3341b20d8dda21c55e58dd976 100644 (file)
 //--------------------------------------------------------------------------
 // cmd_line.cc author Russ Combs <rucombs@cisco.com>
 
-#include "cmd_line.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <string>
+#include "cmd_line.h"
 
+#include "framework/module.h"
 #include "log/messages.h"
 #include "main/help.h"
-#include "main/snort_module.h"
 #include "main/snort_config.h"
-#include "framework/module.h"
-#include "framework/parameter.h"
+#include "main/snort_module.h"
 #include "packet_io/trough.h"
-#include "parser/arg_list.h"
-#include "parser/parser.h"
-#include "utils/util.h"
+
+#include "arg_list.h"
 
 using namespace std;
 
index 05beda7e13ef066eb56ef0e89b53a9d939a87dd4..03d0605650b3812e0352de7654414270b39afa93 100644 (file)
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
-#include "config_file.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-#include <errno.h>
-#include <ctype.h>
-#include <unistd.h>
-#include <stdarg.h>
-#include <pcap.h>
+#include "config_file.h"
+
 #include <grp.h>
 #include <pwd.h>
 #include <syslog.h>
 
-#include "parser.h"
-#include "cmd_line.h"
-#include "mstring.h"
-
 #include "detection/detect.h"
 #include "log/messages.h"
 #include "main/snort.h"
 #include "main/snort_config.h"
-#include "main/snort_types.h"
 #include "main/snort_debug.h"
-#include "ips_options/ips_flowbits.h"
 #include "managers/event_manager.h"
-#include "packet_io/sfdaq.h"
-#include "packet_io/sfdaq_config.h"
-#include "sfip/sf_ip.h"
 #include "utils/dnet_header.h"
 #include "utils/util.h"
 
+#include "mstring.h"
+
 #define LOG_NONE    "none"
 #define LOG_DUMP    "dump"
 #define LOG_CODECS  "codecs"
index bd82ff29988d5557346b247fb525846e05935297..dc64781e9c838fa8c3e33ed427ed53f07770c749 100644 (file)
@@ -19,9 +19,6 @@
 #ifndef CONFIG_FILE_H
 #define CONFIG_FILE_H
 
-#include "main/snort_types.h"
-#include "main/policy.h"
-
 struct SnortConfig;
 
 const char* get_snort_conf();
index 967b385c45ac05269d591950df72bd4e78c66020..76d0585bf8ccdfc6701c31b32d6cab31bd180542 100644 (file)
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
-#include "mstring.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-#include <sys/types.h>
+#include "mstring.h"
 
-#include "main/snort_types.h"
-#include "main/snort_debug.h"
-#include "detection/detection_util.h"
 #include "utils/util.h"
 
 static char* mSplitAddTok(const char*, const int, const char*, const char);
index 19e80e492f6c750ac8c180c3f9d1432621ec4190..7f3d4cde28ad07ab3efb8e114d41b1e42ab7c3b0 100644 (file)
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
-#include "parse_conf.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <sys/types.h>
+#include "parse_conf.h"
+
 #include <sys/stat.h>
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-#include <errno.h>
-#include <ctype.h>
-#include <unistd.h>
-#include <stdarg.h>
-#include <pcap.h>
-#include <grp.h>
-#include <pwd.h>
-#include <fnmatch.h>
 
-#include <stack>
-#include <string>
 #include <fstream>
-#include <sstream>
-
-#include "parser.h"
-#include "parse_stream.h"
-#include "cmd_line.h"
-#include "parse_rule.h"
-#include "config_file.h"
-#include "vars.h"
+#include <stack>
 
-#include "actions/actions.h"
-#include "detection/rules.h"
-#include "detection/treenodes.h"
-#include "detection/signature.h"
-#include "main/snort_debug.h"
-#include "main/snort_config.h"
-#include "utils/util.h"
-#include "hash/sfghash.h"
-#include "sfip/sf_ip.h"
-#include "sfip/sf_vartable.h"
-#include "packet_io/active.h"
-#include "file_api/file_config.h"
-#include "framework/ips_option.h"
 #include "log/messages.h"
+#include "main/snort_config.h"
 #include "managers/action_manager.h"
-#include "actions/actions.h"
+#include "sfip/sf_vartable.h"
 #include "target_based/snort_protocols.h"
+#include "utils/util.h"
+
+#include "config_file.h"
+#include "parser.h"
+#include "parse_stream.h"
+#include "vars.h"
 
 struct Location
 {
index cdf31a027614f2230c7c392bf70b71889d56b3ae..e3731be4da88f3da667afbf873e86f78000ccc2a 100644 (file)
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
-#include "parse_ip.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <errno.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <netdb.h>
-#include <ctype.h>
-#include <sys/types.h>
+#include "parse_ip.h"
 
-#include "parser.h"
 #include "log/messages.h"
+#include "main/policy.h"
 #include "main/snort_debug.h"
-#include "sfip/sf_vartable.h"
 #include "sfip/sf_ipvar.h"
+#include "sfip/sf_vartable.h"
 #include "utils/util.h"
 
 sfip_var_t* sfip_var_from_string(const char* addr)
index b0ae466a0543739b2bdf4edc6f5fd76785c00355..26a8f4eebce21ab00b61ba4888d9e7e8a88e8bb3 100644 (file)
@@ -20,9 +20,6 @@
 #ifndef PARSE_IP_H
 #define PARSE_IP_H
 
-#include <sys/types.h>
-#include "main/snort_types.h"
-
 struct sfip_var_t;
 
 sfip_var_t* sfip_var_from_string(const char*);
index a3e4f5ed8609ebf4bb62399bbd121d2f09e63e59..6d170129cde0efcb295a1d45b695e2b91997e7f4 100644 (file)
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "parse_ports.h"
-#include "protocols/packet.h"
-#include "ports/port_table.h"
+
 #include "main/snort_debug.h"
-#include "utils/snort_bounds.h"
+#include "protocols/packet.h"
 #include "utils/util.h"
 
 static int POParserInit(POParser* pop, const char* s, PortVarTable* pvTable)
index 761856ade2905546ad33bcace6de874a78c996f4..fbf521248d1efd18d30f15ce505a1f018e86511d 100644 (file)
@@ -23,7 +23,6 @@
 #define PARSE_PORTS_H
 
 #include "ports/port_var_table.h"
-#include "utils/sflsq.h"
 
 //-------------------------------------------------------------------------
 // parser
index d2fbf91926b5854ef214c6a1242c58b06e1c88db..ea4ed0449d4add2658bb7a540633ea35c17a035d 100644 (file)
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
-#include "parse_rule.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-#include <errno.h>
-#include <ctype.h>
-#include <unistd.h>
-#include <stdarg.h>
-#include <pcap.h>
-#include <grp.h>
-#include <pwd.h>
-#include <fnmatch.h>
-
-#include "parser.h"
-#include "cmd_line.h"
-#include "config_file.h"
-#include "parse_conf.h"
-#include "parse_ports.h"
+#include "parse_rule.h"
 
-#include "detection/rules.h"
-#include "detection/treenodes.h"
 #include "detection/detect.h"
-#include "detection/tag.h"
-#include "detection/signature.h"
 #include "detection/fp_config.h"
-#include "detection/fp_create.h"
 #include "detection/fp_utils.h"
-#include "detection/pattern_match_data.h"
-#include "detection/sfrim.h"
-#include "main/snort_debug.h"
+#include "detection/treenodes.h"
+#include "framework/decode_data.h"
+#include "log/messages.h"
 #include "main/snort_config.h"
+#include "main/snort_debug.h"
 #include "main/thread_config.h"
-#include "ports/port_object.h"
-#include "ports/rule_port_tables.h"
-#include "protocols/packet.h"
-#include "filters/sfthreshold.h"
-#include "filters/sfthd.h"
-#include "hash/sfghash.h"
-#include "sfip/sf_vartable.h"
-#include "sfip/sf_ip.h"
-#include "sfip/sf_ipvar.h"
-#include "utils/sflsq.h"
-#include "utils/util.h"
-#include "filters/rate_filter.h"
-#include "filters/detection_filter.h"
-#include "packet_io/active.h"
-#include "file_api/file_config.h"
-#include "framework/ips_option.h"
-#include "log/messages.h"
 #include "managers/ips_manager.h"
 #include "managers/so_manager.h"
+#include "ports/rule_port_tables.h"
+#include "sfip/sf_ipvar.h"
+#include "sfip/sf_vartable.h"
 #include "target_based/snort_protocols.h"
+#include "utils/util.h"
+
+#include "parser.h"
+#include "parse_conf.h"
+#include "parse_ports.h"
 
 #define SRC  0
 #define DST  1
index 1e1d0497ce600de4179255847fdaa6c5aeebd578..47674019875f0a748abec6c24703c837229d7b8e 100644 (file)
 //--------------------------------------------------------------------------
 // parse_stream.cc author Russ Combs <rucombs@cisco.com>
 
-#include "parse_stream.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <ctype.h>
-#include <stdio.h>
-#include <string.h>
+#include "parse_stream.h"
 
-#include <istream>
 #include <sstream>
-#include <string>
+
+#include "log/messages.h"
+#include "managers/ips_manager.h"
 
 #include "parser.h"
 #include "parse_conf.h"
 #include "parse_rule.h"
-#include "detection/treenodes.h"
-#include "log/messages.h"
-#include "managers/ips_manager.h"
 
 using namespace std;
 
index dc171c682832e37343ebbbc53c2bad072ccd294e..4cd74698e29f768785af72b9dd6d8b504ea149a5 100644 (file)
 //--------------------------------------------------------------------------
 // parse_uitls.cc author Russ Combs <rucombs@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "parse_utils.h"
 
-#include <assert.h>
-#include <ctype.h>
-#include <stdio.h>
-#include <string.h>
+#include <cassert>
 
-#include "parser.h"
 #include "log/messages.h"
 #include "utils/util.h"
 
index ac8cd6cdf00d240c6c4cd790caaa9b2a0ec12083..f248847715ec88b70996881a40b28208a72bc329 100644 (file)
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
-#include "parser.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-#include <errno.h>
-#include <ctype.h>
-#include <unistd.h>
-#include <stdarg.h>
+#include "parser.h"
+
 #include <pcap.h>
-#include <grp.h>
-#include <pwd.h>
-#include <fnmatch.h>
 
+#include <cassert>
 #include <iostream>
-#include <string>
-
-#include "cmd_line.h"
-#include "mstring.h"
-#include "config_file.h"
-#include "parse_conf.h"
-#include "parse_rule.h"
-#include "parse_stream.h"
-#include "vars.h"
 
-#include "utils/util.h"
-#include "utils/sflsq.h"
-#include "ports/port_object.h"
-#include "ports/port_table.h"
-#include "ports/port_utils.h"
-#include "ports/rule_port_tables.h"
-#include "main/snort_config.h"
-#include "main/shell.h"
-#include "main/snort_debug.h"
-#include "detection/signature.h"
-#include "detection/treenodes.h"
-#include "detection/rules.h"
-#include "detection/detect.h"
 #include "detection/fp_config.h"
-#include "detection/tag.h"
 #include "detection/sfrim.h"
-#include "protocols/packet.h"
-#include "filters/sfthreshold.h"
-#include "filters/sfthd.h"
-#include "filters/rate_filter.h"
 #include "filters/detection_filter.h"
-#include "hash/sfghash.h"
-#include "sfip/sf_vartable.h"
-#include "sfip/sf_ip.h"
-#include "sfip/sf_ipvar.h"
-#include "packet_io/active.h"
-#include "file_api/file_config.h"
-#include "actions/actions.h"
+#include "filters/rate_filter.h"
+#include "filters/sfthreshold.h"
 #include "log/messages.h"
+#include "main/shell.h"
+#include "main/snort_config.h"
 #include "managers/event_manager.h"
 #include "managers/module_manager.h"
+#include "ports/port_object.h"
+#include "ports/port_table.h"
+#include "ports/rule_port_tables.h"
+#include "sfip/sf_ipvar.h"
 #include "target_based/snort_protocols.h"
+#include "utils/util.h"
+
+#include "config_file.h"
+#include "mstring.h"
+#include "parse_conf.h"
+#include "parse_rule.h"
+#include "parse_stream.h"
+#include "vars.h"
 
 static struct rule_index_map_t* ruleIndexMap = nullptr;
 
index 9a2fde712326ef094c7062b5c99966a04bf551c2..7435b3cb88e80ebaf2c7b9e83e0f0c5734ed2003 100644 (file)
 #ifndef PARSER_H
 #define PARSER_H
 
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <stdio.h>
-
 #include "detection/rules.h"
-#include "detection/sfrim.h"
 #include "detection/treenodes.h"
 #include "main/policy.h"
 
index 850c6c4b03beb459307f5f82eaca6f999845228d..9ce386f7b4daf383dbf37c89f254698055d2a653 100644 (file)
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
-#include "vars.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-#include <errno.h>
-#include <ctype.h>
-#include <unistd.h>
-#include <stdarg.h>
-#include <pcap.h>
-#include <grp.h>
-#include <pwd.h>
-#include <fnmatch.h>
-
-#include "config_file.h"
-#include "parser/parser.h"
-#include "cmd_line.h"
-#include "parse_ports.h"
+#include "vars.h"
 
 #include "log/messages.h"
-#include "main/snort_debug.h"
 #include "main/snort_config.h"
-#include "detection/rules.h"
-#include "detection/treenodes.h"
-#include "detection/detect.h"
-#include "detection/tag.h"
-#include "detection/signature.h"
-#include "detection/sfrim.h"
-#include "utils/util.h"
-#include "utils/sflsq.h"
-#include "ports/port_object.h"
-#include "protocols/packet.h"
-#include "filters/sfthreshold.h"
-#include "filters/sfthd.h"
-#include "filters/rate_filter.h"
-#include "filters/detection_filter.h"
-#include "hash/sfghash.h"
-#include "sfip/sf_vartable.h"
-#include "sfip/sf_ip.h"
+#include "main/snort_debug.h"
 #include "sfip/sf_ipvar.h"
-#include "packet_io/active.h"
-#include "file_api/file_config.h"
-#include "framework/ips_option.h"
+#include "utils/util.h"
+
+#include "parse_ports.h"
 
 #ifdef UNIT_TEST
 #include "catch/catch.hpp"
index e9f613fabe3b212c60544dc77eaaa94f6dc03353..0971c7303086d21058a6ed8af37d2a46652edd32 100644 (file)
@@ -20,7 +20,8 @@
 #ifndef VARS_H
 #define VARS_H
 
-#include "main/snort_types.h"
+#include <cstdint>
+
 #include "sfip/sf_vartable.h"
 
 struct SnortConfig;
index 02efcb0988cbac6130c65544dd9e20ce0393ba40..d0e7d9a3e664d06a61c8e7d7e9a823f238c31a94 100644 (file)
 //--------------------------------------------------------------------------
 // piglet.cc author Joel Cornett <jocornet@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "piglet.h"
 
 #include <iostream>
 #include <chrono>
 
 #include "main/snort_config.h"
-#include "piglet_manager.h"
+
 #include "piglet_output.h"
 #include "piglet_runner.h"
-#include "piglet_utils.h"
 
 namespace Piglet
 {
index efe9e5d33327082507b286249408779343a5456f..dd9acd54ea834844503ae265d116547bf6ce8a81 100644 (file)
@@ -23,7 +23,6 @@
 // Piglet plugin API
 
 #include <string>
-#include <utility>
 
 #include "framework/base_api.h"
 #include "log/messages.h"
index 1a1532e46d7566051ee3f49e7c7f02bb388cdd23..b66bd7e28de1cf42d2d4211ab51cf0b012af4aab 100644 (file)
 //--------------------------------------------------------------------------
 // piglet_manager.cc author Joel Cornett <jocornet@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "piglet_manager.h"
 
-#include <map>
-#include <string>
-#include <vector>
-#include <assert.h>
+#include <cassert>
 
 #include "log/messages.h"
 #include "main/snort_config.h"
 #include "managers/module_manager.h"
 #include "managers/plugin_manager.h"
-#include "piglet_utils.h"
+
 #include "piglet_api.h"
+#include "piglet_utils.h"
 
 #define PLUGIN_KEY_SEP "::"
 
index 0c3b5d4844303f36d61f08f7141a1f62b1cadab2..1ad75235ff90d7d4d4916ef936746ac33d8604eb 100644 (file)
 //--------------------------------------------------------------------------
 // piglet_output.cc author Joel Cornett <jocornet@cisco.com>
 
-#include "piglet_output.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <iostream>
-#include <string>
-#include <sstream>
-#include <vector>
-#include <stdio.h>
+#include "piglet_output.h"
 
 #include "piglet_runner.h"
 #include "piglet_utils.h"
index f759d355d553d408ab6096d6f32d99e7cc1e94ef..ca1276332c1d027bf9ac158d4cc09ba45d5e9b0a 100644 (file)
 //--------------------------------------------------------------------------
 // piglet_runner.cc author Joel Cornett <jocornet@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "piglet_runner.h"
 
-#include <string>
-#include <assert.h>
-#include <lua.hpp>
+#include <cassert>
 
+#include "lua/lua.h"
 #include "lua/lua_table.h"
 #include "lua/lua_util.h"
+
 #include "piglet_api.h"
 #include "piglet_manager.h"
 #include "piglet_output.h"
index 496b1be2212a902e9cf3bbdbac845447b975330f..a4a105ca231c77528240104b0a1dea5b33935d0b 100644 (file)
 //--------------------------------------------------------------------------
 // piglet_utils.cc author Joel Cornett <jocornet@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "piglet_utils.h"
 
 namespace Piglet
index d1c520267355dfceabd3ea7f6b61df1e53b1c94b..339b810d60efea5064c6a8958e32caa6b3ca1cfa 100644 (file)
 //--------------------------------------------------------------------------
 // piglet_plugins.cc author Joel Cornett <jocornet@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "piglet_plugins.h"
 
 #include "managers/plugin_manager.h"
index b2a89dd85f86a64ef811c10ffc3d2fcf07f5bf01..8ed095643dbf76bb8467c67ab301b8b2cb7cd2a3 100644 (file)
 //--------------------------------------------------------------------------
 // pp_buffer_iface.cc author Joel Cornett <jocornet@cisco.com>
 
-#include "pp_buffer_iface.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <lua.hpp>
+#include "pp_buffer_iface.h"
 
 #include "framework/codec.h"
 #include "lua/lua_arg.h"
-#include "lua/lua_ref.h"
+
 #include "pp_raw_buffer_iface.h"
 
 static const luaL_Reg methods[] =
index f701d869d20dea7296416a791a279d95958c37c1..7bd38210063636d70769c53b38843ff04cd3d84e 100644 (file)
 //--------------------------------------------------------------------------
 // pp_codec.cc author Joel Cornett <jocornet@cisco.com>
 
-#include "piglet_plugins.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <string>
-
-#include "lua/lua_iface.h"
 #include "managers/codec_manager.h"
 #include "piglet/piglet_api.h"
 
 #include "pp_buffer_iface.h"
-#include "pp_daq_pkthdr_iface.h"
 #include "pp_codec_data_iface.h"
+#include "pp_codec_iface.h"
+#include "pp_daq_pkthdr_iface.h"
 #include "pp_decode_data_iface.h"
 #include "pp_enc_state_iface.h"
 #include "pp_raw_buffer_iface.h"
 
-#include "pp_codec_iface.h"
-
 class CodecPiglet : public Piglet::BasePlugin
 {
 public:
index 534a0ab6725a1565a9783aa3f35c58a1905b787f..d10b7cbe32708ba1ec7d5c566f4a8a1c62f20b06 100644 (file)
 //--------------------------------------------------------------------------
 // pp_codec_data_iface.cc author Joel Cornett <jocornet@cisco.com>
 
-#include "pp_codec_data_iface.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <string.h>
-#include <lua.hpp>
+#include "pp_codec_data_iface.h"
 
 #include "framework/codec.h"
-#include "lua/lua_table.h"
 #include "lua/lua_arg.h"
 
 static void set_fields(lua_State* L, int tindex, CodecData& self)
index c21294b8d9aefce50c877cb470341a6aa3193696..22be7f6c6b665283aeca67fd96388e5bdcd731fa 100644 (file)
 //--------------------------------------------------------------------------
 // pp_codec_iface.cc author Joel Cornett <jocornet@cisco.com>
 
-#include "pp_codec_iface.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <limits>
-#include <vector>
-#include <assert.h>
-#include <lua.hpp>
+#include "pp_codec_iface.h"
 
 #include "framework/codec.h"
 #include "lua/lua_arg.h"
-#include "lua/lua_table.h"
-#include "protocols/ip.h"
 #include "log/text_log.h"
 
 #include "pp_buffer_iface.h"
@@ -35,9 +32,9 @@
 #include "pp_daq_pkthdr_iface.h"
 #include "pp_decode_data_iface.h"
 #include "pp_enc_state_iface.h"
+#include "pp_flow_iface.h"
 #include "pp_ip_api_iface.h"
 #include "pp_raw_buffer_iface.h"
-#include "pp_flow_iface.h"
 
 // FIXIT-M delete this, and make the IpApi arg in codec.update required
 static const ip::IpApi default_ip_api {};
index 9309ff17f9b6bf88eef32dbbac562b0bcc5556e6..77baccfbe96fc3d4c5e109d93f4552c3cebaaeb7 100644 (file)
 //--------------------------------------------------------------------------
 // pp_cursor_iface.cc author Joel Cornett <jocornet@cisco.com>
 
-#include "pp_cursor_iface.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <lua.hpp>
+#include "pp_cursor_iface.h"
 
 #include "framework/cursor.h"
 #include "lua/lua_arg.h"
-#include "lua/lua_ref.h"
 #include "protocols/packet.h"
+
 #include "pp_packet_iface.h"
 #include "pp_raw_buffer_iface.h"
 
index 94993f96034d4d68ca2faa9171e07abb2c8b4eed..ee6f5afda00be3e1cc583f99befbed4ac58ce8f8 100644 (file)
 //--------------------------------------------------------------------------
 // pp_codec_data_iface.cc author Joel Cornett <jocornet@cisco.com>
 
-#include "pp_daq_pkthdr_iface.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <string.h>
-#include <lua.hpp>
+#include "pp_daq_pkthdr_iface.h"
 
-extern "C" {
 #include <daq_common.h>
-}
 
-#include "lua/lua_arg.h"
-#include "lua/lua_table.h"
+#include <cstring>
 
+#include "lua/lua_arg.h"
 
 static void set_fields(lua_State* L, int tindex, struct _daq_pkthdr& self)
 {
index b26c3ad866c1e243569634467bf22e4bb752176a..b41e3eea30a3154407d319f7273fd02a7a2d3830 100644 (file)
 //--------------------------------------------------------------------------
 // pp_decode_data_iface.cc author Joel Cornett <jocornet@cisco.com>
 
-#include "pp_decode_data_iface.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <assert.h>
-#include <lua.hpp>
+#include "pp_decode_data_iface.h"
 
 #include "framework/decode_data.h"
 #include "lua/lua_arg.h"
-#include "lua/lua_table.h"
-#include "protocols/ipv4.h"
 
 #include "pp_ip_api_iface.h"
 #include "pp_raw_buffer_iface.h"
index acccf90adc930cb04336f5689274d3d6d10b15f0..5ed94c056af9a328afc9756cdb75bd159e4035d2 100644 (file)
 //--------------------------------------------------------------------------
 // pp_enc_state_iface.cc author Joel Cornett <jocornet@cisco.com>
 
-#include "pp_enc_state_iface.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <lua.hpp>
+#include "pp_enc_state_iface.h"
 
 #include "framework/codec.h"
 #include "lua/lua_arg.h"
-#include "protocols/ip.h"
 
 // FIXIT-M ip_api should also be its own object (copyable)
 static const class ip::IpApi ip_api {};
index b8883d47d108d2a122697b198d2a6cf12c59958f..7b9c7ff9f9c2834d70ecde6658459ec5faef09aa 100644 (file)
 //--------------------------------------------------------------------------
 // pp_event_iface.cc author Joel Cornett <jocornet@cisco.com>
 
-#include "pp_event_iface.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <string.h>
+#include "pp_event_iface.h"
 
-#include <lua.hpp>
+#include <cstring>
 
 #include "detection/signature.h"
 #include "events/event.h"
 #include "lua/lua_arg.h"
-#include "lua/lua_table.h"
+
 #include "pp_raw_buffer_iface.h"
 
 static struct SigInfo* create_sig_info()
index b8d5ef8a3401afad0e265fe03205ed01186d0b2f..d1d7a6350624a731f1fd294dfbe61a0ebe3e898e 100644 (file)
 //--------------------------------------------------------------------------
 // pp_flow_iface.cc author Joel Cornett <jocornet@cisco.com>
 
-#include "pp_flow_iface.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <limits>
-#include <lua.hpp>
+#include "pp_flow_iface.h"
 
 #include "flow/flow.h"
 #include "lua/lua_arg.h"
index 00f898adaaebdf390dcde1282bf9614d20059772..e5b682ae65a1bd0a24132a1160de875f13e4337e 100644 (file)
 //--------------------------------------------------------------------------
 // pp_inspector.cc author Joel Cornett <jocornet@cisco.com>
 
-#include "piglet_plugins.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <string>
-#include <assert.h>
-
-#include "log/messages.h"
-#include "lua/lua_iface.h"
 #include "managers/inspector_manager.h"
 #include "piglet/piglet_api.h"
 #include "stream/flush_bucket.h"
 
 #include "pp_decode_data_iface.h"
 #include "pp_flow_iface.h"
+#include "pp_inspector_iface.h"
 #include "pp_ip_api_iface.h"
 #include "pp_packet_iface.h"
 #include "pp_raw_buffer_iface.h"
 #include "pp_stream_splitter_iface.h"
 
-#include "pp_inspector_iface.h"
-
 class InspectorPiglet : public Piglet::BasePlugin
 {
 public:
index 21d1a44678e9581922b3e2f9af0e54f28ae7f336..ce0f5641cac2b72a720c68e3c9866644c1b074a0 100644 (file)
 //--------------------------------------------------------------------------
 // pp_inspector_iface.cc author Joel Cornett <jocornet@cisco.com>
 
-#include "pp_inspector_iface.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <limits>
-#include <string>
-#include <assert.h>
-#include <lua.hpp>
+#include "pp_inspector_iface.h"
 
 #include "framework/inspector.h"
 #include "lua/lua_arg.h"
 #include "main/snort_config.h"
+
 #include "pp_packet_iface.h"
 #include "pp_raw_buffer_iface.h"
 #include "pp_stream_splitter_iface.h"
index f8c42e9bebadc55d2b61208ab76d9927fdbaffb7..07f2f1f1fc104e96aec0f01daa1f437e62af2c09 100644 (file)
 //--------------------------------------------------------------------------
 // pp_ip_api_iface.cc author Joel Cornett <jocornet@cisco.com>
 
-#include "pp_ip_api_iface.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <assert.h>
-#include <lua.hpp>
+#include "pp_ip_api_iface.h"
 
 #include "lua/lua_arg.h"
 #include "protocols/ip.h"
-#include "protocols/ipv4.h"
-#include "protocols/ipv6.h"
 
 #include "pp_raw_buffer_iface.h"
 
index f9c3457a0bf6d8dcd07d23b4522b383383e8407f..ba7327799b723c6f8524e9cdbeff05e9a7f9299e 100644 (file)
 //--------------------------------------------------------------------------
 // pp_ips_action.cc author Joel Cornett <jocornet@cisco.com>
 
-#include "piglet_plugins.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include "lua/lua_iface.h"
 #include "managers/action_manager.h"
 #include "piglet/piglet_api.h"
 
+#include "pp_ips_action_iface.h"
 #include "pp_packet_iface.h"
 #include "pp_raw_buffer_iface.h"
 
-#include "pp_ips_action_iface.h"
-
 class IpsActionPiglet : public Piglet::BasePlugin
 {
 public:
index 823d473817627a54b435f173fcb030f5a221071f..58b5204dbaad8e96fe432b79ae8339268c42f851 100644 (file)
 //--------------------------------------------------------------------------
 // pp_ips_action_iface.cc author Joel Cornett <jocornet@cisco.com>
 
-#include "pp_ips_action_iface.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <lua.hpp>
+#include "pp_ips_action_iface.h"
 
 #include "framework/ips_action.h"
+
 #include "pp_packet_iface.h"
 
 static const luaL_Reg methods[] =
index d470f4c81695080b19bade8f48c8e812cf62df19..394d10d0f7d804360727d36e3cccb3443f060089 100644 (file)
 //--------------------------------------------------------------------------
 // pp_ips_option.cc author Joel Cornett <jocornet@cisco.com>
 
-#include "piglet_plugins.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <string>
-
 #include "detection/treenodes.h"
-#include "lua/lua_iface.h"
 #include "managers/ips_manager.h"
 #include "piglet/piglet_api.h"
 
 #include "pp_cursor_iface.h"
+#include "pp_ips_option_iface.h"
 #include "pp_packet_iface.h"
 #include "pp_raw_buffer_iface.h"
 
-#include "pp_ips_option_iface.h"
-
 class IpsOptionPiglet : public Piglet::BasePlugin
 {
 public:
index 25784859da00831dc56ab82611be0cf8cf715f34..bf2482ff7513224a751cd88f912a569a64b96775 100644 (file)
 //--------------------------------------------------------------------------
 // pp_ips_option_iface.cc author Joel Cornett <jocornet@cisco.com>
 
-#include "pp_ips_option_iface.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <lua.hpp>
+#include "pp_ips_option_iface.h"
 
 #include "framework/ips_option.h"
 #include "lua/lua_stack.h"
+
 #include "pp_packet_iface.h"
 #include "pp_cursor_iface.h"
 
index e4bee256fe47bd1b593a4755d0d20a4ce1fd91bf..3b834633855bb95e0d96396d6a7f4d7c4be1957e 100644 (file)
 //--------------------------------------------------------------------------
 // pp_logger.cc author Joel Cornett <jocornet@cisco.com>
 
-#include "piglet_plugins.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include "lua/lua_iface.h"
 #include "managers/event_manager.h"
 #include "piglet/piglet_api.h"
 
 #include "pp_decode_data_iface.h"
 #include "pp_event_iface.h"
 #include "pp_ip_api_iface.h"
+#include "pp_logger_iface.h"
 #include "pp_packet_iface.h"
 #include "pp_raw_buffer_iface.h"
 
-#include "pp_logger_iface.h"
-
 class LoggerPiglet : public Piglet::BasePlugin
 {
 public:
index 2823d99f5a603aa2e9d4a21bcb37c24bcdf41c07..9f1969c39f21528718f619fd1d4c257b9e38ba44 100644 (file)
 //--------------------------------------------------------------------------
 // pp_logger_iface.cc author Joel Cornett <jocornet@cisco.com>
 
-#include "pp_logger_iface.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <lua.hpp>
+#include "pp_logger_iface.h"
 
 #include "framework/logger.h"
 #include "lua/lua_arg.h"
-#include "lua/lua_stack.h"
+
 #include "pp_event_iface.h"
 #include "pp_packet_iface.h"
 
index 6de26306cf0a3582650724453e6032f0e46f885d..dfd92193f6bf03b1eaf8c221476b505993fa5dca 100644 (file)
 //--------------------------------------------------------------------------
 // pp_packet_iface.cc author Joel Cornett <jocornet@cisco.com>
 
-#include "pp_packet_iface.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <string.h>
-#include <lua.hpp>
+#include "pp_packet_iface.h"
 
 #include "lua/lua_arg.h"
-#include "lua/lua_table.h"
 #include "protocols/packet.h"
+
+#include "pp_daq_pkthdr_iface.h"
 #include "pp_decode_data_iface.h"
 #include "pp_flow_iface.h"
 #include "pp_raw_buffer_iface.h"
-#include "pp_daq_pkthdr_iface.h"
 
 static void set_fields(lua_State* L, int tindex, Packet& self)
 {
index 57834aefb6dc3dfaeec5804e15a8a8d1d6357877..30bc721c8e59f68f4495f744c15a7a7c9c593e02 100644 (file)
 //--------------------------------------------------------------------------
 // pp_raw_buffer_iface.cc author Joel Cornett <jocornet@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "pp_raw_buffer_iface.h"
 
 #include "lua/lua_arg.h"
-#include "lua/lua_stack.h"
 
 // FIXIT-H a lot of users keep references to this data.  Need to prevent
 // Lua's garbage collection from destroying RawBuffer while other C++ types
index 0ef946675ca47311f43849bb292da59f3d1f65ba..c7f58cd13e3f6f61418bd79131b4666cf6974b71 100644 (file)
 //--------------------------------------------------------------------------
 // pp_search_engine.cc author Joel Cornett <jocornet@cisco.com>
 
-#include "piglet_plugins.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <string>
-
-#include "lua/lua_iface.h"
 #include "managers/mpse_manager.h"
 #include "piglet/piglet_api.h"
 
index a8ed8ad07ea2b71a99f933231305750acb575c47..f636ecf06973bd17a0c1a025ac6bfe241b4b5a35 100644 (file)
 //--------------------------------------------------------------------------
 // pp_search_engine_iface.cc author Joel Cornett <jocornet@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "pp_search_engine_iface.h"
 
 #include "framework/mpse.h"
index 9279d1f099ade7a22450dfc723ff965260d2561f..0b8a6acdd490ef404267175338063dfbe1572b80 100644 (file)
 //--------------------------------------------------------------------------
 // pp_so_rule.cc author Joel Cornett <jocornet@cisco.com>
 
-#include "piglet_plugins.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <string>
+#include "piglet_plugins.h"
 
-#include "lua/lua_iface.h"
 #include "managers/so_manager.h"
 #include "piglet/piglet_api.h"
 
index cfb8ca9ae8e4717b9d54e7707a422d8eff48ad53..84e72213b7cd4edd1ddb43f3ae18400126b6f0e8 100644 (file)
 //--------------------------------------------------------------------------
 // pp_so_rule_iface.cc author Joel Cornett <jocornet@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "pp_so_rule_iface.h"
 
 #include "framework/so_rule.h"
index a488c6359f0c07a0fccd9569d0d5efd295e87b61..6e4794adbbf395a3c9e6ada080ad58f8eb0d09cd 100644 (file)
 //--------------------------------------------------------------------------
 // pp_stream_splitter_iface.cc author Joel Cornett <jocornet@cisco.com>
 
-#include "pp_stream_splitter_iface.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <limits>
-#include <lua.hpp>
+#include "pp_stream_splitter_iface.h"
 
 #include "lua/lua_arg.h"
-#include "lua/lua_stack.h"
 #include "stream/stream_splitter.h"
+
 #include "pp_flow_iface.h"
 #include "pp_raw_buffer_iface.h"
 
index 8b795cda99a59868fade3d887fe4b6c69e4bf652..ffdfa2031080c635b9b5962dcdde5b43c1647a82 100644 (file)
 //--------------------------------------------------------------------------
 // pp_test.cc author Joel Cornett <jocornet@cisco.com>
 
-#include "piglet_plugins.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <string>
-
-#include "lua/lua_iface.h"
 #include "piglet/piglet_api.h"
 
 #include "pp_buffer_iface.h"
index f64e9f2533609b16a0a60353c2d6dda9e440bf30..0c3baa8e310a26701b1ec8d2a4b587a8fc907a21 100644 (file)
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "port_group.h"
 
-#include <stdlib.h>
 #include "utils/util.h"
 
 void PortGroup::add_rule()
index 1a61fe5d7b0a57809e7dfcb785ae3430268bb339..3666347b8a7408af2b3c2e4e95efb15156b80b26 100644 (file)
 
 // port_item.cc derived from sfportobject.h by Marc Noron
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "port_item.h"
 
-#include <string.h>
 #include "utils/util.h"
 
 /*
index e92d12159491bfb80e55160ec86da3369ec17f81..b890329820d44d0bc6dfec9b7a85dec87b821f92 100644 (file)
@@ -22,8 +22,7 @@
 #ifndef PORT_ITEM_H
 #define PORT_ITEM_H
 
-#include "framework/bits.h"
-#include "utils/sflsq.h"
+#include <cstdint>
 
 #define SFPO_MAX_LPORTS 500
 #define SFPO_MAX_PORTS 65536
index 43876734eef66739e5f7751c9b12a128206a571b..9c753047c272540a2ecd86341a3c6a340dfc0111 100644 (file)
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
-#include "port_object.h"
-
-#include <stdlib.h>
-#include <string.h>
-#include <sys/types.h>
-#include <ctype.h>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <memory>
+#include "port_object.h"
 
-#include "port_item.h"
-#include "port_utils.h"
 #include "log/messages.h"
-#include "main/snort_types.h"
-#include "main/snort_config.h"
 #include "main/snort_debug.h"
-#include "detection/sfrim.h"
 #include "parser/parser.h"
 #include "utils/util.h"
-#include "utils/snort_bounds.h"
-#include "hash/sfhashfcn.h"
+
+#include "port_item.h"
+#include "port_utils.h"
 
 //-------------------------------------------------------------------------
 // PortObject - public
index 525e3239db46a273b78fc2f6bb0fdae0d644ccf2..3f1f569b44fd17d8e6c9c14e93fed27fb0ccb6ad 100644 (file)
@@ -22,7 +22,6 @@
 #ifndef PORT_OBJECT_H
 #define PORT_OBJECT_H
 
-#include "framework/bits.h"
 #include "utils/sflsq.h"
 
 //-------------------------------------------------------------------------
index 511383051d6fa2a0684114db42bf354d536d2bff..e10b3417e7c758f1c48c5d5cd143e24cedadb8ca 100644 (file)
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
-#include "port_object2.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <stdlib.h>
-#include <string.h>
-#include <sys/types.h>
-#include <ctype.h>
-
-#include <memory>
-
-#include "port_object.h"
-#include "port_item.h"
-#include "port_table.h"
-#include "port_utils.h"
+#include "port_object2.h"
 
+#include "hash/sfhashfcn.h"
 #include "log/messages.h"
-#include "main/snort_types.h"
-#include "main/snort_config.h"
 #include "main/snort_debug.h"
-#include "detection/sfrim.h"
 #include "parser/parser.h"
 #include "utils/util.h"
-#include "hash/sfhashfcn.h"
+
+#include "port_item.h"
+#include "port_object.h"
+#include "port_utils.h"
 
 #define PO_EXTRA_RULE_CNT 25
 
index ef9b3c7e55a37632ec9520919171133d0a723ca7..72058973d6ace78121a2192263a7bbaa649f6117 100644 (file)
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
-#include "port_table.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <stdlib.h>
-#include <string.h>
-#include <sys/types.h>
-#include <ctype.h>
+#include "port_table.h"
 
 #include <memory>
 
-#include "port_item.h"
-#include "port_object.h"
-#include "port_object2.h"
-#include "port_utils.h"
-
+#include "hash/sfhashfcn.h"
 #include "log/messages.h"
-#include "main/snort_types.h"
-#include "main/snort_config.h"
 #include "main/snort_debug.h"
-#include "detection/sfrim.h"
-#include "parser/parser.h"
 #include "utils/util.h"
-#include "hash/sfhashfcn.h"
+
+#include "port_utils.h"
 
 #define PTBL_LRC_DEFAULT 10
 #define PO_INIT_ID 1000000
index ad662eea1281221e93c9bee8662009dd51f53ef0..615e58b62e1d61af7cd26827887ff5b5c361b1a6 100644 (file)
 #define PORT_TABLE_H
 
 #include "hash/sfghash.h"
-#include "utils/sflsq.h"
 #include "ports/port_item.h"
 #include "ports/port_object.h"
 #include "ports/port_object2.h"
+#include "utils/sflsq.h"
 
 //-------------------------------------------------------------------------
 // PortTable - provides support to analyze the Port List objects defined by
index 73ea2879f67da094a6eadcfb691489849099a4f3..23abda321678d064ade585f81e3f1be23f12f346 100644 (file)
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
-#include "port_utils.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <stdlib.h>
-#include <string.h>
-#include <sys/types.h>
-#include <ctype.h>
+#include "port_utils.h"
 
-#include <memory>
+#include "utils/util.h"
 
 #include "port_item.h"
 #include "port_object.h"
-#include "port_table.h"
-
-#include "main/snort_types.h"
-#include "main/snort_config.h"
-#include "main/snort_debug.h"
-#include "detection/sfrim.h"
-#include "parser/parser.h"
-#include "utils/snort_bounds.h"
-#include "utils/util.h"
 
 //-------------------------------------------------------------------------
 // bitset conversions
index d74771aed87da5809bcae53295c92e0193ba3208..55f48cd3e677e313be43fcb2ea32b457270fc5e0 100644 (file)
@@ -25,7 +25,6 @@
 #include "framework/bits.h"
 #include "protocols/packet.h"
 #include "utils/sflsq.h"
-#include "utils/snort_bounds.h"
 
 struct PortObject;
 struct PortObjectItem;
index 9b67f8f224645e981f0423c573408d95e821ffd9..e3ee9b42ba0e98154af92ed81c9b832bba9b2a38 100644 (file)
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "port_var_table.h"
 
 //-------------------------------------------------------------------------
index d69db6734bda35d987a2a5b3b7638efe09270173..336a53bbab30228df5bcd7c2d3d3c1de848b8444 100644 (file)
@@ -25,7 +25,6 @@
 #include "hash/sfghash.h"
 #include "ports/port_object.h"
 #include "ports/port_table.h"
-#include "utils/sflsq.h"
 
 //-------------------------------------------------------------------------
 // PortVarTable
index 9eda7a30f747146e644831e69b04573d5d80baa8..d40218d9b7900b3aa9e898c762bce27efb6cfc61 100644 (file)
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "rule_port_tables.h"
 
+#include "log/messages.h"
+
 #include "port_object.h"
 #include "port_table.h"
-#include "log/messages.h"
-#include "parser/parser.h"
-#include "utils/util.h"
 
 #define DEFAULT_LARGE_RULE_GROUP 9
 
index 3b82f0154d961a4e1237ca68f9da90fb0559bb82..7ff717a5f8ce2b9ff8d806f2a5670abb8f0646d7 100644 (file)
@@ -6,7 +6,6 @@ x_include_HEADERS = \
 memory_defs.h \
 memory_context.h \
 memory_profiler_defs.h \
-memory_profiler_active_context.h \
 profiler.h \
 profiler_defs.h \
 rule_profiler_defs.h \
@@ -17,6 +16,7 @@ active_context.h \
 memory_context.cc \
 memory_profiler.cc \
 memory_profiler.h \
+memory_profiler_active_context.h \
 profiler.cc \
 profiler_printer.h \
 profiler_stats_table.cc \
index 57b8fea98cbf76998eed40807bfb1f279597e746..cfc0a600b13f83025f24faa218f948d0db9d1342 100644 (file)
 
 // memory_context.cc author Joel Cornett <jocornet@cisco.com>
 
-#include "memory_context.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <cassert>
-#include <cstdlib>
+#include "memory_context.h"
+
 #include <mutex>
 #include <new>
 
index ce70b6a916677459d6a65aa7de4267e58183cf07..6f6c5be55cff339b1f2ecb28390a39dd4d15081a 100644 (file)
@@ -21,8 +21,6 @@
 #ifndef MEMORY_CONTEXT_H
 #define MEMORY_CONTEXT_H
 
-#include "main/thread.h"
-
 struct CombinedMemoryStats;
 
 class MemoryProfiler
index ebfbb2e387ae6b870461a83d1914242ca953ec2c..25d9b09ea0ee2af60dae48c3f7263bcd27db0e9b 100644 (file)
@@ -21,8 +21,7 @@
 #ifndef MEMORY_DEFS_H
 #define MEMORY_DEFS_H
 
-#include "main/snort_types.h"
-#include "memory_context.h"
+#include "main/thread.h"
 
 struct MemoryStats
 {
index d75f05f8175670ccbb21a2021a7c02974a30d1d7..fbdc55540eb0b154b5ea6bdddef6f5d9a9f68dfb 100644 (file)
 
 // memory_profiler.cc author Joel Cornett <jocornet@cisco.com>
 
-#include "memory_profiler.h"
-
 #if HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <memory>
+#include "memory_profiler.h"
 
-#include "profiler_tree_builder.h"
 #include "profiler_nodes.h"
 #include "profiler_printer.h"
-#include "profiler_stats_table.h"
 #include "memory_defs.h"
 
 #ifdef UNIT_TEST
index 4c9563a18d1e0b8354d43d00531ceec19be34fb8..49b1de0503402a32059f9b14273afa7bf890c453 100644 (file)
 
 // profiler.cc author Joel Cornett <jocornet@cisco.com>
 
-#include "profiler.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
+#include "profiler.h"
+
 #include <cassert>
-#include <mutex>
 
 #include "framework/module.h"
 #include "main/snort_config.h"
 
-#include "profiler_nodes.h"
 #include "memory_context.h"
 #include "memory_profiler.h"
-#include "time_profiler.h"
+#include "profiler_nodes.h"
 #include "rule_profiler.h"
+#include "time_profiler.h"
 
 #ifdef UNIT_TEST
 #include "catch/catch.hpp"
index 2349a59f7bbe978cd910b1a727c124e0da753e72..a2fd5ac728ababe964ad07f293f79f4720ac3784 100644 (file)
 
 // profiler_nodes.cc author Joel Cornett <jocornet@cisco.com>
 
-#include "profiler_nodes.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
+#include "profiler_nodes.h"
+
 #include <cassert>
 #include <mutex>
 
 #include "framework/module.h"
+
 #include "profiler_defs.h"
 
 #ifdef UNIT_TEST
index e2388496a7936421bbf69206ef4f80dc0a57dc1b..962c03f1d8d4d3df219fb6ce4b4502231a325023 100644 (file)
@@ -21,8 +21,8 @@
 #ifndef PROFILER_PRINTER_H
 #define PROFILER_PRINTER_H
 
-#include <cassert>
 #include <algorithm>
+#include <cassert>
 #include <functional>
 #include <sstream>
 #include <string>
index f1dff874f960f100113c794513ba5baf386b8e01..ab46a371fd0228ebaae0c9a0ce89b0c6ddcfaaf1 100644 (file)
 
 // profiler_stats_table.cc author Joel Cornett <jocornet@cisco.com>
 
-#include "profiler_stats_table.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
+#include "profiler_stats_table.h"
+
 #include <cassert>
 #include <cstring>
 #include <iomanip>
index acd3f0de0f0c89f94953888e25ddaff3fb0b1c63..f97e6c83b75569c4a19289697c854f09e7e268fb 100644 (file)
 
 // rule_profiler.cc author Joel Cornett <jocornet@cisco.com>
 
-#include "rule_profiler.h"
-
 #if HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <algorithm>
-#include <functional>
-#include <iostream>
-#include <sstream>
-#include <vector>
+#include "rule_profiler.h"
+
+//#include <algorithm>
+//#include <functional>
+//#include <iostream>
+//#include <sstream>
+//#include <vector>
 
 // this include eventually leads to possible issues with std::chrono:
 // 1.  Undefined or garbage value returned to caller (rep count())
@@ -37,7 +37,6 @@
 #include "detection/detection_options.h"  // ... FIXIT-W
 
 #include "detection/treenodes.h"
-#include "hash/sfghash.h"
 #include "main/snort_config.h"
 #include "main/thread_config.h"
 #include "parser/parser.h"
index 515dca8334ebda70461ca2bfdc86ad504410244d..295cb0cb20671f6bae423aa3329238d4b081ed0b 100644 (file)
@@ -21,8 +21,8 @@
 #ifndef RULE_PROFILER_DEFS_H
 #define RULE_PROFILER_DEFS_H
 
-#include "detection/treenodes.h"
-#include "time_profiler_defs.h"
+#include "time/clock_defs.h"
+#include "time/stopwatch.h"
 
 struct dot_node_state_t;
 
index 292967180528bdbc6f5848641dcb07d6697ad835..d86567bc4d48d850a096453ae0cd2394f28fd0fb 100644 (file)
 
 // time_profiler.cc author Joel Cornett <jocornet@cisco.com>
 
-#include "time_profiler.h"
-
 #if HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <chrono>
-#include <iostream>
-#include <string>
+#include "time_profiler.h"
 
 #include "profiler_nodes.h"
 #include "profiler_tree_builder.h"
index 19483cb288a20703de9490af28394189428f5d9f..46c08a5efbb8fd72cffd1f2a1c143bd01e249824 100644 (file)
 //--------------------------------------------------------------------------
 // ip.cc author Josh Rosenbaum <jrosenba@cisco.com>
 
-#include <arpa/inet.h>
-#include "protocols/ip.h"
-#include "protocols/packet.h"
-#include "sfip/sf_ip.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "ip.h"
+
+#include "layer.h"
 
 namespace ip
 {
index e651da3af77e7d234e73603846d4c712128db3fe..2826a2cc4fa337b62ba1803a1d808ec0a87d3b5c 100644 (file)
 #ifndef PROTOCOLS_IP_H
 #define PROTOCOLS_IP_H
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <net/if.h>
 #include <cstring>
 
 #include "main/snort_types.h"
index 9db8977580807aa9643aba88634df84f17255c4a..dbe6d6c7ea500859f30f5a67f13d084359c5a578 100644 (file)
 #ifndef PROTOCOLS_IPV4_H
 #define PROTOCOLS_IPV4_H
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <cstdint>
 #include <arpa/inet.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <net/if.h>
 
 #include "protocols/protocol_ids.h" // include ipv4 protocol numbers
 
index 32d7f1aa28839e03598e85348280e5d107a67786..9ae3407d2c4bfe3b827667f45b62e79f1386af58 100644 (file)
 //--------------------------------------------------------------------------
 // ipv4_options.cc author Josh Rosenbaum <jrosenba@cisco.com>
 
-#include "protocols/ipv4_options.h"
-#include "protocols/ipv4.h"
-#include "protocols/layer.h"
-#include "protocols/packet.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "ipv4_options.h"
+
+#include "packet.h"
 
 namespace ip
 {
index 5437eb5e75933eb155e573c0421acc390b49d769..355c047810045c4d5214b3d395a752e732ad84aa 100644 (file)
@@ -20,7 +20,6 @@
 #ifndef PROTOCOLS_IP_OPTIONS_H
 #define PROTOCOLS_IP_OPTIONS_H
 
-#include <cstdint>
 #include "main/snort_types.h"
 
 struct Packet;
index e6f7e7596243312480b1baac81c1c17e49df4913..6bf6483420a9df0c20acd7406a14404cabe06d56 100644 (file)
 #ifndef PROTOCOLS_IPV6_H
 #define PROTOCOLS_IPV6_H
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <cstdint>
 #include <arpa/inet.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <net/if.h>
 
 #include "protocols/protocol_ids.h"
 
index f56d34de28d93c87b97859f12057e807b0a75068..51b52a1e55b751c678cf221a829f2e5ce72b1139 100644 (file)
 //--------------------------------------------------------------------------
 // layer.cc author Josh Rosenbaum <jrosenba@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "layer.h"
 
-#include <netinet/in.h>
-#include "protocols/layer.h"
-#include "protocols/protocol_ids.h"
-#include "protocols/packet.h"
-#include "protocols/ipv4.h"
-#include "protocols/ipv6.h"
-#include "protocols/ip.h"
-#include "main/thread.h"
+#include "packet.h"
 
 namespace layer
 {
index d117f4eb88a3f1a5dac4d76810c546f7c6da27ec..b2293077682e3b31b3aaaf01a2cc8642121a779f 100644 (file)
@@ -20,9 +20,8 @@
 #ifndef PROTOCOLS_LAYER_H
 #define PROTOCOLS_LAYER_H
 
-#include <cstdint>
 #include "main/snort_types.h"
-#include "protocol_ids.h"
+#include "protocols/protocol_ids.h"
 
 struct Layer
 {
index 7a127f5684abadd12e5b0e1c2923d270e5eee143..6aad39d31d5e9d577e3d9f99e2bcc7b1e84efebe 100644 (file)
 //--------------------------------------------------------------------------
 // packet.cc author Josh Rosenbaum <jrosenba@cisco.com>
 
-#include <assert.h>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "packet.h"
 
-#include "protocols/packet.h"
-#include "protocols/packet_manager.h"
-#include "protocols/protocol_ids.h"
 #include "log/obfuscator.h"
-#include "log/messages.h"
 #include "managers/codec_manager.h"
-#include "utils/util.h"
+
+#include "packet_manager.h"
 
 Packet::Packet(bool packet_data)
 {
index d0bebea445dd1894f394069c7f2d47ae7cb5a755..b02d6a795d1a0fda1dfc2c0888aeafe8442c3515 100644 (file)
 #ifndef PROTOCOLS_PACKET_H
 #define PROTOCOLS_PACKET_H
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <stddef.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <net/if.h>
-
-extern "C" {
 #include <daq_common.h>
-}
 
-#include "main/snort_types.h"
-#include "framework/decode_data.h"
 #include "flow/flow.h"
-#include "protocols/layer.h"
-#include "framework/endianness.h"
+#include "framework/decode_data.h"
+#include "main/snort_types.h"
 
 /* packet status flags */
 #define PKT_REBUILT_FRAG     0x00000001  /* is a rebuilt fragment */
index 5a6e26d94c6fc3091564061afa6e7b55dbe33497..2d6704893a4550840c1708201dc2d4bd3b5ba5f7 100644 (file)
 //--------------------------------------------------------------------------
 // packet_manager.cc author Josh Rosenbaum <jrosenba@cisco.com>
 
-#include "protocols/packet_manager.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <vector>
-#include <cstring>
-#include <mutex>
-#include <algorithm>
-#include <limits>
-#include <type_traits> // static_assert
+#include "packet_manager.h"
 
-#include "framework/codec.h"
-#include "managers/codec_manager.h"
-#include "main/snort_config.h"
-#include "main/thread.h"
-#include "log/messages.h"
-#include "detection/fp_detect.h"
-
-#include "protocols/packet.h"
-#include "protocols/protocol_ids.h"
-#include "protocols/eth.h"
-#include "protocols/icmp4.h"
-#include "protocols/icmp6.h"
-#include "profiler/profiler.h"
-#include "parser/parser.h"
+#include <mutex>
 
 #include "codecs/codec_module.h"
 #include "codecs/ip/checksum.h"
-#include "utils/stats.h"
 #include "log/text_log.h"
+#include "main/snort_config.h"
 #include "main/snort_debug.h"
-#include "packet_io/sfdaq.h"
 #include "packet_io/active.h"
+#include "packet_io/sfdaq.h"
+#include "profiler/profiler_defs.h"
 #include "stream/stream.h"
 
+#include "eth.h"
+#include "icmp4.h"
+#include "icmp6.h"
+
 THREAD_LOCAL ProfileStats decodePerfStats;
 
 // Decoding statistics
index 8870f36f604722fc3a8b54c5bb2e7cdcd9df935b..b1fca5b989581bb5a500ad77b70120d5f4a0ce69 100644 (file)
 // PacketManager provides decode and encode services by leveraging Codecs.
 
 #include <array>
-#include <list>
 
-#include "main/snort_types.h"
-#include "protocols/packet.h"
-#include "framework/counts.h"
 #include "framework/codec.h"
+#include "framework/counts.h"
+#include "main/snort_types.h"
 #include "managers/codec_manager.h"
+#include "protocols/packet.h"
 
-struct _daq_pkthdr;
+struct Packet;
 struct TextLog;
 
 enum class TcpResponse
index dd06d21662feeb23ecab25aed965cd603300ab06..cdf4cc9c88233f7909a0e14e6715e8bfc8c7f8f7 100644 (file)
 #ifndef PROTOCOLS_PROTOCOL_IDS_H
 #define PROTOCOLS_PROTOCOL_IDS_H
 
-#include <assert.h>
+#include <cassert>
 #include <cstdint>
-#include <type_traits>
 #include <limits>
+#include <type_traits>
 
 /*****************************************************************
  *****  NOTE:   Protocols are only included in this file when ****
index 12ee4486ef8da1feb929d66e820799411489568d..f28c1569e118775a1af0c80d8a1f3aad6e3f6e99 100644 (file)
 
 // ssl.h author Adam Keeton
 
-#include "ssl.h"
-
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
 
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
+#include "ssl.h"
 
-#include "protocols/packet.h"
+#include "packet.h"
 
 #define THREE_BYTE_LEN(x) (x[2] | x[1] << 8 | x[0] << 16)
 
index 2f040263ee049db7cb74e4f49ab0e78c91292b84..aa6f92ee5dcf1efb057c57839cca02f938b02a91 100644 (file)
 #ifndef SSL_H
 #define SSL_H
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <ctype.h>
-#include <stdint.h>
-#include <stdlib.h>
-
 #include "main/snort_types.h"
 
 #define SSL_NO_FLAG             0x00000000
index 01408cbed2da388c798c80b7c81e0d043e5714e9..10526ec45cbd670c88a547870129ef261595bfe1 100644 (file)
 #ifndef PROTOCOLS_TCP_H
 #define PROTOCOLS_TCP_H
 
-#include <cstdint>
 #include <arpa/inet.h>
 
+#include <cstdint>
+
 // these are bits in th_flags:
 #define TH_FIN  0x01
 #define TH_SYN  0x02
index 4f87394de5b1e771375956d46ce248cdf0e84db5..b0f5b82a36dc8ed4944ea8af95798c79bfc1e0c3 100644 (file)
 //--------------------------------------------------------------------------
 // tcp_options.cc author Josh Rosenbaum <jrosenba@cisco.com>
 
-#include "protocols/tcp_options.h"
-#include "protocols/tcp.h"
-#include "protocols/layer.h"
-#include "protocols/packet.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tcp_options.h"
+
+#include "packet.h"
+#include "tcp.h"
 
 namespace tcp
 {
index 17d63295fd2afbf71b097ddf01024e1de383e9da..3a39e1ae660e6865a7e47a4b28128e56b41c772e 100644 (file)
@@ -20,7 +20,6 @@
 #ifndef PROTOCOLS_TCP_OPTIONS_H
 #define PROTOCOLS_TCP_OPTIONS_H
 
-#include <cstdint>
 #include "main/snort_types.h"
 
 struct Packet;
index 2a5908db8d88003f42ef04d428a28007ec9161ed..f727429e0e5e9aad6a931199a634b2feb3c0c1fd 100644 (file)
@@ -20,8 +20,8 @@
 #ifndef PROTOCOLS_TOKEN_RING_H
 #define PROTOCOLS_TOKEN_RING_H
 
-#include <cstdint>
 #include <arpa/inet.h>
+
 #include "protocols/protocol_ids.h"
 
 namespace token_ring
index 4c79534d614df56a22433465d3cc7cc902bc974b..d4e11b5091ffd191f294800613a6dffb69200d4b 100644 (file)
@@ -20,7 +20,6 @@
 #ifndef PROTOCOLS_UDP_H
 #define PROTOCOLS_UDP_H
 
-#include <cstdint>
 #include <arpa/inet.h>
 
 namespace udp
index 0cff64975a054a42d13cb3be82831b4c0d652d72..f1cace0a252382965f9de224670c147f6aca4e3f 100644 (file)
 // Inspection events published by the Http Inspector. Modules can subscribe
 // to receive the events.
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "http_events.h"
+
 #include "service_inspectors/http_inspect/http_msg_header.h"
 
 const uint8_t* HttpEvent::get_header(unsigned id, uint64_t sub_id, int32_t& length)
index 7c8d48e18d343e2ea8fc5975c9cebaf7aec3b149..4e84eb12ca52aa01dea8bae870a42458efef19b3 100644 (file)
 //--------------------------------------------------------------------------
 // sip_events.cc author Carter Waxman <cwaxman@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "sip_events.h"
 
-#include "service_inspectors/sip/sip_common.h"
 #include "service_inspectors/sip/sip_dialog.h"
 
 using namespace std;
index 7cd2bcc203809a17ceff1f788ec590048d98bde6..7da27952f81297172da6c1b53634cf7581ae50ca 100644 (file)
@@ -26,7 +26,6 @@
 #include <list>
 
 #include "framework/data_bus.h"
-#include "protocols/packet.h"
 
 #define SIP_EVENT_TYPE_SIP_DIALOG_KEY "sip_event_type_sip_dialog"
 
@@ -35,6 +34,8 @@ enum SipEventType
     SIP_EVENT_TYPE_SIP_DIALOG
 };
 
+struct Packet;
+struct SfIp;
 struct SIPMsg;
 struct SIP_DialogData;
 struct SIP_MediaSession;
index 06ed9d00987cb30363a5cabc57d83d6bd404ef71..fe3648a310c2fc282bbeace9091c7c663f5e5b72 100644 (file)
@@ -1,6 +1,5 @@
 
 set (SEARCH_ENGINE_INCLUDES
-    pat_stats.h
     search_common.h
     search_tool.h
 )
@@ -44,6 +43,7 @@ if ( HAVE_HYPERSCAN )
 endif ()
 
 set (SEARCH_ENGINE_SOURCES
+    pat_stats.h
     search_engines.cc
     search_engines.h
     search_tool.cc
index 2ca19c1282e57276fa3f6a883aec827d9cc6116e..3710788311cd2555fadb33b80b1d29a82d7af8ab 100644 (file)
@@ -4,7 +4,6 @@ noinst_LIBRARIES = libsearch_engines.a
 x_includedir = $(pkgincludedir)/search_engines
 
 x_include_HEADERS = \
-pat_stats.h \
 search_common.h \
 search_tool.h
 
@@ -46,6 +45,7 @@ $(acsmx2_sources) \
 $(intel_sources)
 
 libsearch_engines_a_SOURCES = \
+pat_stats.h \
 search_engines.cc \
 search_engines.h \
 search_tool.cc \
index 2e4ddddbf95539c21df33f8ba84b35a820baa90d..855db53694598f50c9443851a4e96817552b9ec7 100644 (file)
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "framework/mpse.h"
-#include "main/snort_debug.h"
-#include "main/snort_types.h"
-#include "main/snort_config.h"
-#include "profiler/profiler.h"
-#include "utils/util.h"
 
-#include "acsmx.h"
 #include "acsmx2.h"
 
 //-------------------------------------------------------------------------
index f0c56f3cbed481b9b3edc1bfe81fda057be37d5d..1fa53ad4cc1605d4dd37a7fd91dc0e821b90d539 100644 (file)
 *   3/06 - Added AC_BNFA search
 */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "framework/mpse.h"
-#include "main/snort_debug.h"
-#include "main/snort_types.h"
-#include "main/snort_config.h"
-#include "profiler/profiler.h"
-#include "utils/util.h"
 
 #include "bnfa_search.h"
 
index 3264ce4edd20944ad6450595d02f95d7fd6e951e..7f9f452ee5ddab779eb3304e98ec0f469add85fb 100644 (file)
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "framework/mpse.h"
-#include "main/snort_debug.h"
-#include "main/snort_types.h"
-#include "main/snort_config.h"
-#include "profiler/profiler.h"
-#include "utils/util.h"
 
-#include "acsmx.h"
 #include "acsmx2.h"
 
 //-------------------------------------------------------------------------
index ab104a051ebb7140ff8a151138b98e665c639413..56f7ab8824383e3e8fc8071b5adba80036b2f593 100644 (file)
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "framework/mpse.h"
-#include "main/snort_debug.h"
-#include "main/snort_types.h"
-#include "main/snort_config.h"
-#include "profiler/profiler.h"
-#include "utils/util.h"
 
-#include "acsmx.h"
 #include "acsmx2.h"
 
 //-------------------------------------------------------------------------
index 97ebebcb6787f80ac498d4dc301ec8f5c78ef598..65d39c832229d006e9dda8204c1c6c9d4fc2e44b 100644 (file)
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "framework/mpse.h"
-#include "main/snort_debug.h"
-#include "main/snort_types.h"
-#include "main/snort_config.h"
-#include "profiler/profiler.h"
-#include "utils/util.h"
 
-#include "acsmx.h"
 #include "acsmx2.h"
 
 //-------------------------------------------------------------------------
index c8384f1e14e7e63d527921d7999353019686b39e..c63715b938e5640d262fa21de785819188286fe7 100644 (file)
 #endif
 
 #include "framework/mpse.h"
-#include "main/snort_debug.h"
-#include "main/snort_types.h"
-#include "main/snort_config.h"
-#include "profiler/profiler.h"
-#include "utils/util.h"
 
 #include "acsmx.h"
-#include "acsmx2.h"
 
 //-------------------------------------------------------------------------
 // "ac_std"
index c53c8b0a3ef88618c661cc8765a6276097952e37..5665947794099bb155b42cccd287c03f2907f6ea 100644 (file)
 **  Nov 2,2002: Fixed queue_init() , added count=0
 */
 
-#include "acsmx.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
+#include "acsmx.h"
 
 #include <list>
 
-#include "main/snort_debug.h"
 #include "main/thread.h"
 #include "utils/util.h"
 
index f7c2e55fc3277525fa9f36ae0dd31be867c2bca2..b088c95a738e9ad7de505e4951260df6e08561ea 100644 (file)
 
 // version 1
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
+#include <cstdint>
 
-#include "main/snort_types.h"
 #include "search_common.h"
 
 #define ALPHABET_SIZE    256
index 577329011a822cca2ae0fd6c0cae06747bd70f69..3394415fec7d145093b60758dfad3aeaa97f1d0a 100644 (file)
 **       SparseBands changed ps increment to 2+n to increment between bands.
 */
 
-#include "acsmx2.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
+#include "acsmx2.h"
 
 #include <list>
 
-#define ACSMX2_TRACK_Q
-
-#ifdef  ACSMX2_TRACK_Q
-#include "main/snort_config.h"
-#endif
-
 #include "log/messages.h"
-#include "main/snort_debug.h"
-#include "main/snort_types.h"
 #include "utils/stats.h"
 #include "utils/util.h"
 
index c525107bf5e85ebad0ef552dd5144a7a736b45fd..866da3533578589bfd9088d2c43de71d3d8e2362 100644 (file)
 
 // Version 2.0
 
-#include <stdio.h>
-#include <stdint.h>
-#include <stdlib.h>
-#include <string.h>
+#include <cstdint>
 
 #include "search_common.h"
 
index 6b65cf911d187b1cddf962c9eec89bf8bc446a5e..9d31590395dc84bd1a59cac19b13f0e1f39883e8 100644 (file)
@@ -21,7 +21,8 @@
 #include "config.h"
 #endif
 
-#include "framework/mpse.h"
+#include "main/snort_types.h"
+
 #include "search_engines.h"
 
 extern const BaseApi* se_ac_banded;
index 0ea284925adca28ed5a8efbaa16340462625445b..18595bff63ce6d94458ecff976b3d5c2e97a2f29 100644 (file)
 **                 queue ops is optional, as this can impose a modest
 **                 performance hit of a few percent.
 */
-#include "bnfa_search.h"
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <signal.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
+#include "bnfa_search.h"
 
 #include <list>
 
-#include "search_common.h"
 #include "log/messages.h"
-#include "main/snort_types.h"
-#include "main/snort_debug.h"
 #include "utils/stats.h"
 #include "utils/util.h"
 
index f0167032e166f03283b4886906c9276d3342beac..862ccce1a2cb6dc1777ed3ce86695ba934675193 100644 (file)
 ** date:   12/21/05
 */
 
-#include <stdio.h>
-#include <stdint.h>
-#include <stdlib.h>
-#include <string.h>
+#include <cstdint>
 
 #include "search_common.h"
 
index 7349ff9bb4fb413b1e8fb5203fe98dbd94cf5f22..cd522e07a8388b5ada0495528d8c3cb1163941f0 100644 (file)
 
 // hyperscan.cc author Russ Combs <rucombs@cisco.com>
 
-#include "hyperscan.h"
-
-#include <assert.h>
-#include <ctype.h>
-#include <string.h>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <string>
-#include <vector>
+#include "hyperscan.h"
 
 #include <hs_compile.h>
 #include <hs_runtime.h>
 
+#include <cassert>
+#include <cstring>
+
 #include "framework/mpse.h"
 #include "log/messages.h"
 #include "main/snort_config.h"
index 13179bdb7de2e1f90a3b48d29d96cbe79669a30a..f301db053d82fec88c2ea89ed2dec3fdedcd2a68 100644 (file)
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
-#ifdef INTEL_SOFT_CPM
-#include "intel_soft_cpm.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
+#include "intel_soft_cpm.h"
+
 #include "framework/mpse.h"
 #include "main/snort_debug.h"
 #include "main/snort_types.h"
@@ -157,5 +156,3 @@ const BaseApi* se_intel_cpm[] =
     nullptr
 };
 
-#endif
-
index 365eb9321a015bb6769ed5c76b832bd6599c247d..88983d77de2e727f06d7f9c6e713c53120fcf2cb 100644 (file)
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "intel_soft_cpm.h"
 
 #include <stdio.h>
index a758a7d42a20bb366f0015ea164fa8e0c4a59531..4bc70738502d331e038053ba14738aa70079c1a4 100644 (file)
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
-#include "search_engines.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
+#include "search_engines.h"
+
 #include "managers/plugin_manager.h"
 
 struct BaseApi;
index 9594edec117a52b01e53f37542a27b3f0318a010..93a4214bce4a037e97a9a766d6e314cf136e31bc 100644 (file)
 //--------------------------------------------------------------------------
 // search_tool.cc author Russ Combs <rucombs@cisco.com>
 
-#include "search_tool.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <sys/types.h>
-#include <stdlib.h>
-#include <ctype.h>
+#include "search_tool.h"
 
-#include "main/thread.h"
-#include "framework/mpse.h"
 #include "managers/mpse_manager.h"
 
 SearchTool::SearchTool() : SearchTool("ac_bnfa")
index 30365279ac492a96158a41bb229f8e9f65b00505..a162e7baa97f2c963f36668e76e3808b1ccc201b 100644 (file)
 
 // hyperscan_test.cc author Russ Combs <rucombs@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "search_engines/hyperscan.h"
 
 #include <string.h>
index a82c5db71b49a8474189b1503b59f5fac3aaf117..1d5ec449feaccac756a4485cb4cc22c36d2775ff 100644 (file)
 
 // search_tool_test.cc author Steve Chew <stechew@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 //  Change private to public to give access to private members.
 #define private public
 #include "search_engines/search_tool.h"
@@ -70,7 +74,7 @@ FileVerdict FilePolicy::signature_lookup(Flow*, FileContext*)
 FileVerdict FilePolicy::signature_lookup(Flow*, FileInfo*)
 { return FILE_VERDICT_UNKNOWN; }
 
-void LogValue(const char*, const char*, FILE* = stdout)
+void LogValue(const char*, const char*, FILE*)
 {
 }
 
@@ -86,7 +90,7 @@ void FatalError(const char*,...)
 void LogCount(char const*, uint64_t, FILE*)
 { }
 
-void LogStat(const char*, double, FILE* = stdout)
+void LogStat(const char*, double, FILE*)
 {}
 
 static void* s_tree = (void*)"tree";
index 4b25f7a9fe3117e0545c3168ad932a142ff48967..ffd10416779a7e328617f8822f8c96e065d3e46d 100644 (file)
 #include "config.h"
 #endif
 
-#include <assert.h>
-#include <sys/types.h>
-#include <stdlib.h>
-#include <ctype.h>
-#include <string.h>
-
-#include "log/messages.h"
-#include "main/snort_types.h"
-#include "main/snort_types.h"
-#include "main/snort_debug.h"
-#include "detection/detect.h"
-#include "events/event.h"
 #include "events/event_queue.h"
-#include "parser/parser.h"
-#include "utils/util.h"
-#include "profiler/profiler.h"
 #include "framework/inspector.h"
 #include "framework/module.h"
-#include "protocols/udp.h"
+#include "log/messages.h"
+#include "profiler/profiler.h"
 #include "protocols/packet.h"
 
 #define BO_DEFAULT_KEY     31337
index 45ed502e0dc430d1ebdfd6634ae01d5743742c8b..855a2b922da677359223772a73c364fb363f697f 100644 (file)
 // dce_co.cc author Rashmi Pitre <rrp@cisco.com>
 // based on work by Todd Wease
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "dce_co.h"
 
 #include "main/snort_debug.h"
@@ -26,9 +30,9 @@
 
 #include "dce_smb.h"
 #include "dce_smb_module.h"
+#include "dce_smb_utils.h"
 #include "dce_tcp.h"
 #include "dce_tcp_module.h"
-#include "dce_smb_utils.h"
 
 THREAD_LOCAL int co_reassembled = 0;
 
index c51a31b04fb3004d4ee8557d07a9e93eb138c9fb..4ef5fa2bc51a4e19fc5e26f16697b7250e291225 100644 (file)
 
 // dce_common.cc author Rashmi Pitre <rrp@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "dce_common.h"
 
 #include "detection/detect.h"
index f868a3d98951105d05c080cff77953ebaca85c68..32143b6e3e5c243798644a43c06d9c2ce444335e 100644 (file)
@@ -23,6 +23,7 @@
 
 #include "events/event_queue.h"
 #include "framework/counts.h"
+#include "framework/endianness.h"
 #include "framework/value.h"
 #include "protocols/packet.h"
 #include <assert.h>
index b7adaaee136ffca7834a66d684ec72e471a375f7..0f74bc81d57e95f70f5473f9162984bf7bea1aac 100644 (file)
  *
  ****************************************************************************/
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "dce_list.h"
 
 #include "main/snort_debug.h"
index 43ad89b6e4255ffd30e3a638aabf1985c8bffc2b..619d0808b102c6462d435e4f5f30d5899f811dcc 100644 (file)
 
 // dce_smb.cc author Rashmi Pitre <rrp@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "dce_smb.h"
 
 #include "detection/detect.h"
 #include "utils/util.h"
 #include "packet_io/active.h"
 
+#include "dce_smb_commands.h"
 #include "dce_smb_module.h"
-#include "dce_smb_utils.h"
 #include "dce_smb_paf.h"
-#include "dce_smb_commands.h"
 #include "dce_smb_transaction.h"
+#include "dce_smb_utils.h"
 #include "dce_smb2.h"
 
 THREAD_LOCAL int dce2_smb_inspector_instances = 0;
index 4d79d44cb070327c6f658bfbbe68efef91bcc325..a2171fde19e623b9651f36b3926aa85f5b8fa848 100644 (file)
 // SMB2 file processing
 // Author(s):  Hui Cao <huica@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "dce_smb2.h"
 
 #include "detection/detection_util.h"
index 526929dd35d2c038741672ef84055bb7f40d21a2..7471f6fe24235100f9536ac2ec7eb863a80d8b46 100644 (file)
 
 // Smb commands processing
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "dce_smb_commands.h"
 
 #include "main/snort_debug.h"
index 9c68fca06d61f6292f9b22d7d8ff1eaee42b397a..57a782687d1d31df79cdad8ddfe8b03eff147b47 100644 (file)
 
 // dce_smb_module.cc author Rashmi Pitre <rrp@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "dce_smb_module.h"
 
 #include "log/messages.h"
index c604ce06f14039be9cd64770d174f2ffc87a92d2..0f5daf17b61e827831580f3c1284b1d3184f9727 100644 (file)
 // dce_smb_paf.cc author Rashmi Pitre <rrp@cisco.com>
 // based on work by Todd Wease
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "dce_smb_paf.h"
 
 #include "main/snort_debug.h"
index bb76165b24b3b0e09b45fa03789d207febe5cf17..9b8c46926166128b7f93fa0c83b6ed82201951f8 100644 (file)
 
 // Smb transaction commands processing
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "dce_smb_transaction.h"
 
 #include "main/snort_debug.h"
index cd4dcf5b96a734b44b3e702fda8753dc8a2a7541..c20144f899fdcdcd93ccb09ba0a09097d7de347d 100644 (file)
 
 // Smb transaction commands utils
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "dce_smb_transaction_utils.h"
 
 #include "main/snort_debug.h"
index 02d0ef24cba5fb8fb22307305f3bb98345f6c314..ffd6d1773cb082646da39cef9a8ffcf8b9b716a4 100644 (file)
 // dce_smb_utils.cc author Maya Dagon <mdagon@cisco.com>
 // based on work by Todd Wease
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "dce_smb_utils.h"
 
+#include "detection/detect.h"
 #include "detection/detection_util.h"
-#include "utils/util.h"
-#include "packet_io/active.h"
 #include "main/snort.h"
+#include "packet_io/active.h"
+#include "utils/util.h"
 
 #include "dce_smb_module.h"
 
@@ -1478,7 +1483,7 @@ void DCE2_SmbAbortFileAPI(DCE2_SmbSsnData* ssd)
     ssd->fapi_ftracker = nullptr;
 }
 
-FileContext* DCE2_get_main_file_context(DCE2_SmbSsnData* ssd)
+static FileContext* DCE2_get_main_file_context(DCE2_SmbSsnData* ssd)
 {
     assert(ssd->sd.wire_pkt);
     FileFlows* file_flows = FileFlows::get_file_flows((ssd->sd.wire_pkt)->flow);
index 6c68db0986521e8d29b98cffb6644e08880ca6a6..fc4d33ca06f7449638567f5b131a02b4beedb818 100644 (file)
 // dce_tcp.cc author Rashmi Pitre <rrp@cisco.com>
 // based on work by Todd Wease
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "dce_tcp.h"
 
 #include "detection/detect.h"
index c34a2ff2377ad4b059f035e1570bc873355858f5..928d2470c1620106de218f910db011c7a263aec1 100644 (file)
 
 // dce_tcp_module.cc author Rashmi Pitre <rrp@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "dce_tcp_module.h"
 
 #include "log/messages.h"
index e2c045406bbaa5ca5128b790679320388b2e94c7..d120b683f7c3b5c4fc31f978b8fa037f1c644244 100644 (file)
 // dce_tcp_paf.cc author Rashmi Pitre <rrp@cisco.com>
 // based on work by Todd Wease
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "dce_tcp_paf.h"
 
 #include "main/snort_debug.h"
index 4097e0f0e8bdc3915c2d45a98a6610bc69ae655a..04ba694b7adaeac451eb38292182261746cd15ea 100644 (file)
 // dce_udp.cc author Maya Dagon <mdagon@cisco.com>
 // based on work by Todd Wease
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "dce_udp.h"
 
 #include "detection/detect.h"
index 14057b2a8fee0b08f349747ec669e984ee921432..222bb1257ddcd012a04a8a1e2f3d7ff19a8d3e4b 100644 (file)
 
 // dce_udp_module.cc author Maya Dagon <mdagon@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "dce_udp_module.h"
 
 #include "log/messages.h"
index 87acb142035433077d67a0bb073a795ac3a2fcb3..9c8c4458cf72e7da5bcaada6917c3f4abd1b9075 100644 (file)
 // within each activity.  Also sets appropriate data for use with
 // preprocessor rule options.
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "dce_udp.h"
 
 #include "flow/session.h"
index e971dd65cabab7432c5ef379cfc820bec9f77f57..d3a0fc4f2cd1096ba2afa453edc7ec3d57134343 100644 (file)
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "dce_utils.h"
 
 #include "main/snort_debug.h"
-#include "utils/util.h"
 #include "utils/safec.h"
+#include "utils/util.h"
 
 /********************************************************************
  * Function: DCE2_GetValue()
index a6a0cef926586478df81689333c82f967a017b7e..d6771ce47d9e60fe5bc5a3029eb143960b61abb7 100644 (file)
 // ips_dce_iface.cc author Maya Dagon <mdagon@cisco.com>
 // based on work by Todd Wease
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <cerrno>
 
 #include "detection/detection_defines.h"
index a64c247a7dd928c8b7fcef2fe0caf1f19bffcff9..f25e02883dbc91a8a08c8d9777b8742f26ddce61 100644 (file)
 // ips_dce_opnum.cc author Maya Dagon <mdagon@cisco.com>
 // based on work by Todd Wease
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "detection/detection_defines.h"
 #include "framework/ips_option.h"
 #include "framework/module.h"
index c21ed1d4488d5774718f55a9fff1e5fed82677e2..7f687b0541d318d69e5865ac604c0518dffe0cd5 100644 (file)
 // ips_dce_stub_data.cc author Maya Dagon <mdagon@cisco.com>
 // based on work by Todd Wease
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "detection/detection_defines.h"
 #include "framework/cursor.h"
 #include "framework/ips_option.h"
index ae27b4482d097be155d2328b6d218a42e9915512..7c8fe5d7afefd4384022725524e4360f7f7c002c 100644 (file)
 
 // smb_message.cc author Rashmi Pitre <rrp@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "dce_smb.h"
 
 #include "detection/detect.h"
 #include "utils/util.h"
 #include "packet_io/active.h"
 
+#include "dce_smb.h"
+#include "dce_smb_commands.h"
 #include "dce_smb_module.h"
-#include "dce_smb_utils.h"
 #include "dce_smb_paf.h"
-#include "dce_smb_commands.h"
 #include "dce_smb_transaction.h"
+#include "dce_smb_utils.h"
 #include "dce_smb2.h"
-#include "dce_smb.h"
 
 /********************************************************************
  * Global variables
index e145bc27d35a6fcf0ff7f115c3670b5db56d0a72..9ef66fae1f0d841a70f9d72a07ba808b5dc9ce0f 100644 (file)
 // dnp3.cc author Rashmi Pitre <rrp@cisco.com>
 // based on work by Ryan Jordan
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "dnp3.h"
-#include "dnp3_paf.h"
-#include "dnp3_reassembly.h"
 
 #include "events/event_queue.h"
+#include "protocols/packet.h"
+
+#include "dnp3_paf.h"
+#include "dnp3_reassembly.h"
 
 THREAD_LOCAL Dnp3Stats dnp3_stats;
 THREAD_LOCAL ProfileStats dnp3_perf_stats;
index 1a9d2e4839c69ba8fcad7f8d35f02bc515488f76..e9f281cb14c5995afb74a65ae2d587c8c04753a7 100644 (file)
@@ -22,9 +22,9 @@
 #ifndef DNP3_H
 #define DNP3_H
 
-#include "protocols/packet.h"
-#include "profiler/profiler.h"
+#include "flow/flow.h"
 #include "framework/counts.h"
+#include "profiler/profiler_defs.h"
 
 #define DNP3_NAME "dnp3"
 #define DNP3_HELP "dnp3 inspection"
index 41e7d51f88c3b2e7643527f7d9241afc285c2bd2..0e78e14b97c7dd7fea73a6c5ebb0fa60f1455761 100644 (file)
 
 // dnp3_map.cc author Ryan Jordan
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "dnp3_map.h"
-#include <stdlib.h>
-#include <string.h>
+
+#include <cstddef>
+#include <cstring>
 
 /* Name/value pair struct */
 struct dnp3_map_t
index 8a70c1cf8287d49b2e5d8bfc52233ebddf965a02..b7366a90bc0ef1a85b918ba65ed8a147f5558251 100644 (file)
@@ -22,7 +22,7 @@
 #ifndef DNP3_MAP__H
 #define DNP3_MAP__H
 
-#include <stdint.h>
+#include <cstdint>
 
 /* Check if "code" is in the function map.
  *
index b49643b87c9469a3cfb8a120e3d97501ab41f21c..a24153402ece7892c65a42bf95d9a996d7a3c216 100644 (file)
 
 // dnp3_module.cc author Rashmi Pitre <rrp@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "dnp3_module.h"
-#include "dnp3.h"
+
 #include "log/messages.h"
-#include "main/snort_config.h"
+
+#include "dnp3.h"
 
 using namespace std;
 
index a224a667bce58ca240fdddc5775739ac9152685d..1e2ab3ace985081a77e6e5e8f088e940178b601d 100644 (file)
 // dnp3_paf.cc author Rashmi Pitre <rrp@cisco.com>
 // based on work by Ryan Jordan
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "dnp3_paf.h"
+
 #include "dnp3.h"
 
 /* Function: dnp3_paf()
index 6ef0533c1dcd5d2145d8debc5614bdd421b89b6b..efe04418e2207d0add6120676d49e21f73cc1574 100644 (file)
@@ -24,7 +24,6 @@
 
 // Protocol aware flushing for DNP3.
 
-#include "main/snort_types.h"
 #include "stream/stream_splitter.h"
 
 enum dnp3_paf_state
index ad4074e3a82e289f6cb74bcd83989f53a16b6f38..917a9968db0b3f64d0b748647a2778d8a6178bef 100644 (file)
 // dnp3_reassembly.cc author Ryan Jordan
 // modifications for snort3 by Rashmi Pitre <rrp@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "dnp3_reassembly.h"
-#include "events/event_queue.h"
+
 #include "detection/detect.h"
+#include "events/event_queue.h"
+#include "protocols/packet.h"
+
 #include "dnp3_map.h"
-#include "dnp3.h"
-#include "dnp3_module.h"
 
 /* CRC look-up table, for computeCRC() below */
 static uint16_t crcLookUpTable[256] =
index 277181deaad566fe2018ae184dbc7d9980f2a982..c30957b5c5767ae87c75607d93de17529f2fc9ff 100644 (file)
 // ips_dnp3_data.cc author Maya Dagon <mdagon@cisco.com>
 // based on work by Ryan Jordan
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "detection/detection_defines.h"
 #include "framework/cursor.h"
 #include "framework/ips_option.h"
index 00fa7e247a64d295ba5ee6d909fa747a6ee08d13..cb104d56d749daf60acd0b67e3fa361c5fee0511 100644 (file)
 // ips_dnp3_func.cc author Maya Dagon <mdagon@cisco.com>
 // based on work by Ryan Jordan
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "detection/detection_defines.h"
 #include "framework/ips_option.h"
 #include "framework/module.h"
-#include "framework/parameter.h"
-#include "detection/detection_defines.h"
 #include "hash/sfhashfcn.h"
 #include "profiler/profiler.h"
+#include "protocols/packet.h"
 
 #include "dnp3.h"
 #include "dnp3_map.h"
index 276944f77cdd2fe5652fd561c0594a69438c7b6b..f51d20092e652aab590a77be1ffc522da8d8ac3b 100644 (file)
 // ips_dnp3_ind.cc author Maya Dagon <mdagon@cisco.com>
 // based on work by Ryan Jordan
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "detection/detection_defines.h"
 #include "framework/ips_option.h"
 #include "framework/module.h"
-#include "framework/parameter.h"
-#include "detection/detection_defines.h"
 #include "hash/sfhashfcn.h"
 #include "profiler/profiler.h"
+#include "protocols/packet.h"
 
 #include "dnp3.h"
 #include "dnp3_map.h"
index 3ed919c02a0388fb6990096ccb7dee597bc3eebe..75eede6490d050d0dd6cad7ab3430390b6164666 100644 (file)
 // ips_dnp3_obj.cc author Maya Dagon <mdagon@cisco.com>
 // based on work by Ryan Jordan
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "detection/detection_defines.h"
 #include "framework/ips_option.h"
 #include "framework/module.h"
-#include "framework/parameter.h"
-#include "detection/detect.h"
-#include "detection/detection_defines.h"
 #include "hash/sfhashfcn.h"
 #include "profiler/profiler.h"
+#include "protocols/packet.h"
 
 #include "dnp3.h"
 
index 14dc1cd88d1e00182ac76312bac8ef9053940b7d..7868b2588a73057287544673ec44291d448bb610 100644 (file)
 // Alert for DNS client rdata buffer overflow.
 // Alert for Obsolete or Experimental RData types (per RFC 1035)
 
-#include "dns.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <assert.h>
-#include <string.h>
-#include <stdio.h>
-#include <sys/types.h>
+#include "dns.h"
 
 #include "events/event_queue.h"
 #include "log/messages.h"
-#include "main/snort_types.h"
-#include "main/snort_debug.h"
 #include "profiler/profiler.h"
-#include "parser/parser.h"
-#include "framework/inspector.h"
+#include "protocols/packet.h"
 #include "stream/stream.h"
-#include "utils/sfsnprintfappend.h"
 
 #include "dns_module.h"
 
index 0eae5dcf6c7d96c980a4c18df2ebe4dbab369d94..7e56eddc616e6d1a2c830ba3a47b6903e0231324 100644 (file)
@@ -22,7 +22,7 @@
 #ifndef DNS_H
 #define DNS_H
 
-#include "protocols/packet.h"
+#include "flow/flow.h"
 
 // Implementation header with definitions, datatypes and flowdata class for
 // DNS service inspector.
index 7817a6bece9ac2fe9421c622335ac0b40bb8c215..3c5961f677ae9ee4169868ddb6ab03bc14e90e34 100644 (file)
 
 // dns_module.cc author Bhagyashree Bantwal <bbantwal@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "dns_module.h"
-#include <assert.h>
-#include <sstream>
 
 using namespace std;
 
index d17f3081a4af75fbb8f6b200cc8a9f9b6e431713..49a100837c3a089967f6085e616e4617d3797f55 100644 (file)
@@ -22,8 +22,8 @@
 #define DNS_MODULE_H
 //Interface to the DNS service inspector
 
-#include "framework/module.h"
 #include "framework/bits.h"
+#include "framework/module.h"
 #include "main/thread.h"
 
 #define GID_DNS 131
index 4632a7c9203f85bcfe40967af1e94af58e3eee0d..732ae7d991339a32e83bec92c1e36b055204771d 100644 (file)
  * of the external network.
  */
 
-#include "ft_main.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include "ftpp_return_codes.h"
-#include "ftp_cmd_lookup.h"
-#include "ftp_bounce_lookup.h"
+#include "ft_main.h"
 
 #include "detection/detect.h"
 #include "framework/data_bus.h"
 #include "log/messages.h"
 #include "utils/util.h"
 
+#include "ftp_cmd_lookup.h"
+#include "ftp_bounce_lookup.h"
+#include "ftpp_return_codes.h"
+
 void CleanupFTPCMDConf(void* ftpCmd)
 {
     FTP_CMD_CONF* FTPCmd = (FTP_CMD_CONF*)ftpCmd;
index 61ee0f8fa5002b57beb84898bb584227832648de..691c775d97affefc07bdb000e58f9224ff5c050a 100644 (file)
 #ifndef FT_MAIN_H
 #define FT_MAIN_H
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #include "ftpp_ui_config.h"
-#include "protocols/packet.h"
 
 #define BUF_SIZE 1024
 
+struct Packet;
 struct ProfileStats;
+struct SnortConfig;
 
 extern int16_t ftp_data_app_id;
 
index 6cd1e7975a066b49f919b1a08f3d4565d0bab146..816ee13e1f56e0bd9a471374123381d02990cd6f 100644 (file)
 #include "config.h"
 #endif
 
-#include "ftp_module.h"
-#include "ftpp_si.h"
-#include "ftpp_return_codes.h"
-#include "ftp_cmd_lookup.h"
+#include "main/snort_config.h"
+#include "managers/inspector_manager.h"
+#include "profiler/profiler.h"
+#include "protocols/packet.h"
+#include "stream/stream.h"
+#include "target_based/snort_protocols.h"
+#include "utils/util.h"
+
 #include "ft_main.h"
+#include "ftp_cmd_lookup.h"
+#include "ftp_data.h"
+#include "ftp_module.h"
 #include "ftp_parse.h"
 #include "ftp_print.h"
 #include "ftp_splitter.h"
+#include "ftpp_return_codes.h"
+#include "ftpp_si.h"
 #include "pp_ftp.h"
-#include "ftp_data.h"
 #include "telnet.h"
 
-#include "main/snort_config.h"
-#include "main/snort_types.h"
-#include "managers/inspector_manager.h"
-#include "profiler/profiler.h"
-#include "target_based/snort_protocols.h"
-#include "utils/util.h"
-
 int16_t ftp_data_app_id = SFTARGET_UNKNOWN_PROTOCOL;
 
 #define client_key "ftp_client"
index eb43d2793916c18e1ebb25e96b233c6e9239a074..17fffea546fb53fa2aef5ec64e8e01b13064e9b7 100644 (file)
  * Kevin Liu <kliu@sourcefire.com>
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "ftp_bounce_lookup.h"
 
-#include "ftpp_return_codes.h"
 #include "ft_main.h"
+#include "ftpp_return_codes.h"
 
 /*
  * Function: ftp_bounce_lookup_init(BOUNCE_LOOKUP **BounceLookup)
index 9279413a6d638e0cee2421cc2841beb664830e68..d7d76edd828112443cb1505190e0847fd6d90ed6 100644 (file)
  * Kevin Liu <kliu@sourcefire.com>
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "ftp_cmd_lookup.h"
 
-#include "ftpp_return_codes.h"
 #include "ft_main.h"
+#include "ftpp_return_codes.h"
 
 /*
  * Function: ftp_cmd_lookup_init(CMD_LOOKUP **CmdLookup)
index f9adb2c9d7295335400fcda7492ab0c187c4a20d..9eaa1f81ea5329d2e843fceba872567c20d932b5 100644 (file)
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
-#include "ftp_data.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include "ftp_module.h"
-#include "ftpp_si.h"
+#include "ftp_data.h"
 
 #include "detection/detection_util.h"
-#include "file_api/file_service.h"
 #include "file_api/file_flows.h"
+#include "file_api/file_service.h"
+#include "packet_io/active.h"
 #include "profiler/profiler.h"
+#include "stream/stream.h"
 #include "utils/util.h"
-#include "packet_io/active.h"
+
+#include "ftp_module.h"
+#include "ftpp_si.h"
 
 #define s_name "ftp_data"
 
index 7bbd43a160ab1082042fd4cc295722e83c97f1ef..6acdb01e08907191ad4623bff4ccc43b1e047ba1 100644 (file)
 
 // ftp_module.cc author Russ Combs <rucombs@cisco.com>
 
-#include "ftp_module.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <sstream>
+#include "ftp_module.h"
 
 #include "log/messages.h"
 
index 73cda43f77cd81f1082d901791fec8fae91d25be..a7f535efdf10ce1f235af1fb4d27091c2d419044 100644 (file)
 #ifndef FTP_MODULE_H
 #define FTP_MODULE_H
 
-#include <string>
-#include <vector>
-
-#include "ftpp_ui_config.h"
 #include "framework/module.h"
-#include "main/thread.h"
+#include "ftpp_ui_config.h"
 
 #define GID_FTP 125
 
index 7f91d3290764fc9c05feb9e5b96d0d33b43d497c..c42a7c98163525d26d765d83ebfaa4d0c40a6ecd 100644 (file)
  * Marc A. Norton <mnorton@sourcefire.com>
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "ftp_parse.h"
 
-#include <assert.h>
+#include <cassert>
+
+#include "log/messages.h"
+#include "utils/util.h"
 
 #include "ftp_bounce_lookup.h"
 #include "ftp_cmd_lookup.h"
 #include "ftpp_return_codes.h"
 
-#include "log/messages.h"
-#include "sfip/sf_ip.h"
-#include "utils/util.h"
-
 #define CONF_SEPARATORS " \n"
 
 #define ALLOW_BOUNCE      "bounce_to"
index 053c63ab46cab88edc086798ef1553f86b3cf2b1..9edfc074056a100eefea02b3001e5638d19e427d 100644 (file)
@@ -26,8 +26,6 @@
 #define FTP_PARSE_H
 
 #include "ftpp_ui_config.h"
-#include "protocols/packet.h"
-#include "framework/bits.h"
 
 /*
  * These are the definitions of the parser section delimiting
index a74bfcc4267e6252569e5055c7d577d29ed04d14..5d0e16bda01aad2d85e806048e69f38287f562cc 100644 (file)
  * Marc A. Norton <mnorton@sourcefire.com>
  */
 
-#include "ftp_print.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
+#include "ftp_print.h"
+
+#include <cstring>
+
+#include "log/messages.h"
+#include "utils/sfsnprintfappend.h"
+
 #include "ft_main.h"
-#include "ftp_cmd_lookup.h"
 #include "ftp_bounce_lookup.h"
+#include "ftp_cmd_lookup.h"
 #include "ftp_parse.h"
 #include "ftpp_return_codes.h"
 
-#include "log/messages.h"
-#include "utils/sfsnprintfappend.h"
-
 int PrintConfOpt(bool on, const char* Option)
 {
     LogMessage("    %s: %s\n", Option, on ? "ON" : "OFF");
index 020de9cc8bec80f759b691a02c97a0bb8731f70b..fd2eac1f85ae677cf7cf009f5d309449675aa008 100644 (file)
 //--------------------------------------------------------------------------
 // ftp_splitter.cc author Russ Combs <rucombs@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "ftp_splitter.h"
 
-#include <string.h>
+#include <cstring>
 
 FtpSplitter::FtpSplitter(bool c2s) : StreamSplitter(c2s) { }
 FtpSplitter::~FtpSplitter() { }
index 53a40a7481fd1220faf9214fab51554dbf78ae5a..197421ceff684be1073ab7a2261ca10d14502bf7 100644 (file)
  * Marc A. Norton <mnorton@sourcefire.com>
  * Kevin Liu <kliu@sourcefire.com>
  */
-#include "ftpp_si.h"
 
-#include "ft_main.h"
-#include "ftpp_return_codes.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "ftpp_si.h"
 
-#include "sfip/sf_ip.h"
+#include "protocols/packet.h"
 #include "stream/stream.h"
 #include "utils/util.h"
 
+#include "ft_main.h"
+#include "ftpp_return_codes.h"
+
 unsigned FtpFlowData::flow_id = 0;
 unsigned TelnetFlowData::flow_id = 0;
 
index 8b832b12887cccf6aa9bd9a0f29065426d685476..4bf3447264d0402b1476b47d100fbec2a5e5140f 100644 (file)
 #ifndef FTPP_SI_H
 #define FTPP_SI_H
 
-#include <stdint.h>
+#include "file_api/file_api.h"
+#include "flow/flow.h"
+#include "flow/flow_key.h"
 
-#include "ftpp_ui_config.h"
 #include "ftp_client.h"
 #include "ftp_server.h"
-#include "protocols/packet.h"
-#include "file_api/file_api.h"
-#include "flow/flow.h"
-#include "stream/stream.h"
+#include "ftpp_ui_config.h"
 
 /*
  * These are the defines for the different types of
index 3d030eaf1e431434eba9a85063a8733c8aa142fe..cfe0c6115d38c58406afd4e66e32a1440720fb66 100644 (file)
  * Daniel J. Roelker <droelker@sourcefire.com>
  * Marc A. Norton <mnorton@sourcefire.com>
  */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "ftpp_ui_config.h"
 
+#include "utils/util.h"
+
 #include "ftp_bounce_lookup.h"
 #include "ftp_cmd_lookup.h"
 #include "ftpp_return_codes.h"
 
-#include "utils/util.h"
-
 FTP_CLIENT_PROTO_CONF::FTP_CLIENT_PROTO_CONF()
 {
     memset(this, 0, sizeof(*this));
index f40cccd63484748a15eb2c03736786279a8fa667..7e0e40b50bb4b3d49821edadfe83e61cc53370da 100644 (file)
@@ -38,9 +38,7 @@
 #ifndef FTPP_UI_CONFIG_H
 #define FTPP_UI_CONFIG_H
 
-#include "framework/bits.h"
 #include "sfip/sf_ip.h"
-#include "sfrt/sfrt.h"
 #include "utils/kmap.h"
 
 /*
index 3a8f0667a6054485ca585371ea8e6247c6543a5a..b310a13e5231e981a52ce512032576ec5c50f1e5 100644 (file)
 
 /* your preprocessor header file goes here */
 
-#include "pp_ftp.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
+#include "pp_ftp.h"
+
 #include "detection/detection_util.h"
 #include "file_api/file_service.h"
-#include "sfip/sf_ip.h"
+#include "protocols/packet.h"
+#include "stream/stream.h"
 #include "utils/util.h"
 
 #include "ft_main.h"
index e30021456f7b95712cd27cd42aa73335dd4aae9e..3e7be91376579c61c6a77ea543907c1bd560235a 100644 (file)
@@ -24,9 +24,6 @@
 
 // declares the ftp checking functions
 
-#include <sys/types.h>
-
-#include "ftpp_ui_config.h"
 #include "ftpp_si.h"
 
 /* list of function prototypes for this preprocessor */
index fa7aec791fd24f9704fc3da6cf3bea37783a2b35..8158fc7f31aefe0151cb1b682b21d84b9ecb8a98 100644 (file)
 
 /* your preprocessor header file goes here */
 
-#include "pp_telnet.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include "ftpp_return_codes.h"
-#include "telnet_module.h"
+#include "pp_telnet.h"
 
 #include "detection/detection_util.h"
+#include "protocols/packet.h"
+#include "stream/stream.h"
+
+#include "ftpp_return_codes.h"
+#include "telnet_module.h"
 
 #define NUL 0x00
 #define CR 0x0d
index e3e2498c5724267cb7ff38335b7d419b34b9af01..195c1295049cbeb468a7ded2da8de89dae82eb74 100644 (file)
 
 // declares the telnet checking functions
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <sys/types.h>
-
 /* RFC 885 defines an End of Record telnet option */
 #define RFC885
 /* RFC 1184 defines Abort, Suspend, and End of File telnet optinos */
 #define RFC1184
 
-#include "ftpp_ui_config.h"
 #include "ftpp_si.h"
 
 /* define the telnet negotiation codes (TNC) that we're interested in */
index b3f6816e028402ae2e657638361e5e7b5b87af6b..0be5463c14a5bdaea862dbd2db16e7072fcd3da8 100644 (file)
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
-#include "telnet.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
+#include "telnet.h"
+
+#include "log/messages.h"
+#include "profiler/profiler.h"
+#include "protocols/packet.h"
+
 #include "ft_main.h"
 #include "ftp_print.h"
 #include "ftpp_return_codes.h"
@@ -31,9 +35,6 @@
 #include "pp_telnet.h"
 #include "telnet_module.h"
 
-#include "log/messages.h"
-#include "profiler/profiler.h"
-
 THREAD_LOCAL ProfileStats telnetPerfStats;
 THREAD_LOCAL SimpleStats tnstats;
 
index 68f6440cdb42837c624f11c1a22e001bd763d0c4..5e8bace6f6663a13c8b4eb987b6758275b08578f 100644 (file)
 
 // telnet_module.cc author Russ Combs <rucombs@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "telnet_module.h"
 
+#include <cassert>
+
 using namespace std;
 
 //-------------------------------------------------------------------------
index ff9b2360842d728cbd13c3dd7b4aa8f45315f230..35f714a210e2f23f354f4e06cf9138ff6191e12b 100644 (file)
@@ -21,9 +21,8 @@
 #ifndef TELNET_MODULE_H
 #define TELNET_MODULE_H
 
-#include "ftpp_ui_config.h"
 #include "framework/module.h"
-#include "main/thread.h"
+#include "ftpp_ui_config.h"
 
 #define GID_TELNET 126
 
index 10fe59ca8a2eec0942a219180029d155cfdb5e2e..efa89a135a0ae788c70559f141ff095b156301b2 100644 (file)
 
 #include "gtp.h"
 
-#include <assert.h>
-#include <ctype.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <syslog.h>
-#include <string.h>
-#include <strings.h>
-#include <sys/time.h>
-
 #include "main/snort_debug.h"
-#include "main/snort_types.h"
 #include "protocols/packet.h"
-#include "profiler/profiler.h"
 
-#include "gtp.h"
 #include "gtp_inspect.h"
-#include "gtp_parser.h"
 
 #define GTPMSG_ZERO_LEN offsetof(GTPMsg, msg_id)
 
index 68e94003138562d756c4bc1c2d34f5a2b3310c7a..cd45069f8143d4c14517a171e29b4172525e3f75 100644 (file)
@@ -25,8 +25,9 @@
 // Provides convenience functions for parsing and querying configuration.
 
 #include <string>
-#include "main/thread.h"
+
 #include "framework/counts.h"
+#include "main/thread.h"
 
 #define MIN_GTP_VERSION_CODE   (0)
 #define MAX_GTP_VERSION_CODE   (2)
index 6d4115e2858b78f73c7f37dd95d888a0750386b2..5afb1ec02dc58c8db094ef9f3475103c13be58b4 100644 (file)
 // gtp_inspect.cc author Russ Combs <rucombs@cisco.com>
 // adapt 2x preprocessor code to 3x inspector
 
-#include "gtp_inspect.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
+#include "gtp_inspect.h"
+
 #include "managers/inspector_manager.h"
-#include "protocols/packet.h"
 #include "profiler/profiler.h"
+#include "protocols/packet.h"
 
 #include "gtp.h"
 #include "gtp_module.h"
index 31c56e3c5c5f88621086f275361f27e37a060f8d..366f7bf0e4d48aee00150aa849d94d565d6f1220 100644 (file)
@@ -22,6 +22,7 @@
 #define GTP_INSPECT_H
 
 #include "flow/flow.h"
+
 #include "gtp_parser.h"
 
 // FIXIT-M why store per packet on flow?
index 25edc8329ebb9dc2806dba416fc5c03d5e4d0118..0a9201e99b482599e414edf3a3936bf6177e365f 100644 (file)
 
 // gtp_module.cc author Russ Combs <rucombs@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "gtp_module.h"
 
 #include <cassert>
 
-#include "gtp.h"
 #include "profiler/profiler.h"
 
+#include "gtp.h"
+
 THREAD_LOCAL ProfileStats gtp_inspect_prof;
 
 #define GTP_EVENT_BAD_MSG_LEN_STR        "message length is invalid"
index 424659788b44756f685eb5e0f54d998b8b53ba85..3b07dfb860b696c3d4529acf714de83baf676cf8 100644 (file)
 #ifndef GTP_MODULE_H
 #define GTP_MODULE_H
 
-#include <vector>
-#include <string>
-
 #include "framework/module.h"
-#include "main/thread.h"
 
 #define GID_GTP 143
 
index c4d8a802148c610124564422a7a78f1728a215bf..08f2ea911455ae8de0f3fed9365c7ca9f3de9613 100644 (file)
 
 #include "gtp_parser.h"
 
-#include <ctype.h>
+#include <arpa/inet.h>
 
-#include "log/messages.h"
-#include "main/snort_types.h"
-#include "main/snort_debug.h"
 #include "events/event_queue.h"
-#include "protocols/packet.h"
+#include "log/messages.h"
 
 #include "gtp.h"
 #include "gtp_module.h"
index 2431a8e918de24393b6831a9a46640fe6771bdea..90823bd74ed87563ab90a97317c521f819dd8a1c 100644 (file)
@@ -22,7 +22,7 @@
 #ifndef GTP_PARSER_H
 #define GTP_PARSER_H
 
-#include "main/snort_types.h"
+#include <cstdint>
 
 struct GTP_IEData
 {
index fe78c5831281d0a78620cabb8f56794e72eef1b6..de1cd3fcba6c65e46c7ac53f9bdd7561984c79e5 100644 (file)
 
 // gtp_info rule option implementation
 
-#include "main/snort_types.h"
-#include "main/snort_debug.h"
 #include "detection/detection_defines.h"
+#include "hash/sfhashfcn.h"
 #include "framework/cursor.h"
 #include "framework/ips_option.h"
 #include "framework/module.h"
-#include "hash/sfhashfcn.h"
-#include "protocols/packet.h"
 #include "profiler/profiler.h"
+#include "protocols/packet.h"
 
 #include "gtp.h"
 #include "gtp_inspect.h"
index b02c9228efe7fec748ea37828c2b8b4eba9c58a7..4be3d81ef4902a489612fd6664e7618fac444c22 100644 (file)
 
 // gtp_type rule option implementation
 
-#include "main/snort_types.h"
-#include "main/snort_debug.h"
 #include "detection/detection_defines.h"
-#include "framework/bits.h"
 #include "framework/ips_option.h"
 #include "framework/module.h"
 #include "hash/sfhashfcn.h"
index b4388cf7684a69947611dbee7730f76b1316d239..61deb56373acbd33aaa12268335f079f801ff351 100644 (file)
@@ -24,8 +24,6 @@
 
 // gtp_version rule option implementation
 
-#include "main/snort_types.h"
-#include "main/snort_debug.h"
 #include "detection/detection_defines.h"
 #include "framework/ips_option.h"
 #include "framework/module.h"
index fcfb0c8a1495c3f2e11e701992b671e8ebe41a28..66548c977b8fb44ad83f55649f05d83fe62fbb40 100644 (file)
 //--------------------------------------------------------------------------
 // http_api.cc author Tom Peters <thopeter@cisco.com>
 
-#include <string.h>
-#include <sys/types.h>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include "http_enum.h"
-#include "http_inspect.h"
 #include "http_api.h"
 
+#include "http_inspect.h"
+
 const char* HttpApi::http_my_name = HTTP_NAME;
 const char* HttpApi::http_help = "the new HTTP inspector!";
 
index 8dd821f92a3a5414b9cb66f5008fdf3446291df2..e5836973d3299d37bf931cdade22bf17546855d1 100644 (file)
 #ifndef HTTP_API_H
 #define HTTP_API_H
 
-#include "framework/parameter.h"
-#include "framework/module.h"
 #include "framework/inspector.h"
+#include "framework/module.h"
 
-#include "http_module.h"
 #include "http_flow_data.h"
+#include "http_module.h"
 
 class HttpApi
 {
index 3ecb951a5e26c11962dd2afb5b3fd235f3be142f..e53202cb42b47364846e3c34e0c2ef06a002a789 100644 (file)
 //--------------------------------------------------------------------------
 // http_cutter.cc author Tom Peters <thopeter@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "http_cutter.h"
 
 using namespace HttpEnums;
index 15fd30f9eba54f60849008b81207019f5f881587..c5175b6cecad7dbfc4d272ff0d230f8bf8d2393e 100644 (file)
@@ -23,8 +23,8 @@
 #include <assert.h>
 
 #include "http_enum.h"
-#include "http_infractions.h"
 #include "http_event_gen.h"
+#include "http_infractions.h"
 
 //-------------------------------------------------------------------------
 // HttpCutter class and subclasses
index ca21a6280bc9aa0578c4bc281e335a618c46ddf4..2c1dc5b9b0f296b106f13fdb8d3e5542bbadd72f 100644 (file)
@@ -20,7 +20,7 @@
 #ifndef HTTP_ENUM_H
 #define HTTP_ENUM_H
 
-#include <stdint.h>
+#include <cstdint>
 
 namespace HttpEnums
 {
index 7943377fd8287e0f5d5e01f941f0bccd4193c6ab..454516539ca58d7d38a5f8d2bfa59910e450f4c7 100644 (file)
 #ifndef HTTP_EVENT_GEN_H
 #define HTTP_EVENT_GEN_H
 
-#include <assert.h>
 #include <bitset>
+#include <cassert>
 
 #include "events/event_queue.h"
+#include "utils/util.h"
 
 #include "http_enum.h"
-#include "utils/util.h"
 
 //-------------------------------------------------------------------------
 // Event generator class
index e3dfcf642f28422b020c99bffdcd4f61d07a1380..580e37c29dda83f2777944d65f5f8f72e60da8fb 100644 (file)
 //--------------------------------------------------------------------------
 // http_field.cc author Tom Peters <thopeter@cisco.com>
 
-#include <sys/types.h>
-#include <stdio.h>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include "main/snort_types.h"
+#include "http_field.h"
 
-#include "http_enum.h"
 #include "http_test_manager.h"
-#include "http_field.h"
 
 using namespace HttpEnums;
 
index fdbfc5785dbacae2c96094aea5cc00f40706e1f5..b0118931008b64c75a4eb2017e7204e8c427804c 100644 (file)
 //--------------------------------------------------------------------------
 // http_flow_data.cc author Tom Peters <thopeter@cisco.com>
 
-#include "http_enum.h"
-#include "http_test_manager.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "http_flow_data.h"
+
+#include "http_test_manager.h"
 #include "http_transaction.h"
-#include "http_js_norm.h"
 
 using namespace HttpEnums;
 
index ff5925edc022bead92183efda523e11ea599d0cc..dd99ad286f2eabe7b6450c9cce7279f9ca4c2072 100644 (file)
 //--------------------------------------------------------------------------
 // http_head_norm.cc author Tom Peters <thopeter@cisco.com>
 
-#include <assert.h>
-#include <string.h>
-#include <sys/types.h>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include "main/snort_types.h"
-
-#include "http_enum.h"
-#include "http_str_to_code.h"
 #include "http_head_norm.h"
 
 using namespace HttpEnums;
index 18d83ab59ba074abe386e6c5c6a80619cd1b6b9e..3156e94327320ba93ee960c21239c4550be31d98 100644 (file)
 //--------------------------------------------------------------------------
 // http_inspect.cc author Tom Peters <thopeter@cisco.com>
 
-#include "http_inspect.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <assert.h>
-#include <stdio.h>
+#include "http_inspect.h"
 
-#include "main/snort_types.h"
+#include "protocols/packet.h"
 
-#include "http_enum.h"
-#include "http_msg_request.h"
-#include "http_msg_status.h"
-#include "http_msg_header.h"
 #include "http_msg_body.h"
 #include "http_msg_body_chunk.h"
 #include "http_msg_body_cl.h"
 #include "http_msg_body_old.h"
+#include "http_msg_header.h"
+#include "http_msg_request.h"
+#include "http_msg_status.h"
 #include "http_msg_trailer.h"
-#include "http_test_manager.h"
-#include "http_field.h"
 
 using namespace HttpEnums;
 
index f65525a5c775a7fa4f17005301bc0b34c6a583b8..761a751f44f754b3b6cad56d2ed10e920b896d0e 100644 (file)
 //--------------------------------------------------------------------------
 // http_js_norm.cc author Tom Peters <thopeter@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "http_js_norm.h"
+
 #include "utils/util_jsnorm.h"
-#include "utils/util.h"
 #include "utils/safec.h"
-#include "http_enum.h"
 
 using namespace HttpEnums;
 
index cb3d4da805e84c635b9afa58eff9cc735a0d5a0c..a7ab1219c925ef72713601100788dc2d5f50b265 100644 (file)
 //--------------------------------------------------------------------------
 // http_module.cc author Tom Peters <thopeter@cisco.com>
 
-#include <string.h>
-#include <sys/types.h>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "http_module.h"
 
 #include "log/messages.h"
 
-#include "http_uri_norm.h"
 #include "http_js_norm.h"
-#include "http_module.h"
+#include "http_uri_norm.h"
 
 using namespace HttpEnums;
 
index d0353c9653f0498783dc231a1c58ff962b70d99b..61ee1466a34d83fed9edf1c47adb4a0bd11d29ea 100644 (file)
 //--------------------------------------------------------------------------
 // http_msg_body.cc author Tom Peters <thopeter@cisco.com>
 
-#include <string.h>
-#include <sys/types.h>
-#include <stdio.h>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "http_msg_body.h"
 
-#include "detection/detection_util.h"
-#include "file_api/file_api.h"
 #include "file_api/file_flows.h"
-#include "mime/file_mime_process.h"
 
-#include "http_enum.h"
 #include "http_api.h"
-#include "http_msg_request.h"
-#include "http_msg_body.h"
 #include "http_js_norm.h"
+#include "http_msg_request.h"
 
 using namespace HttpEnums;
 
index 7e2a4a5cbd9d565d223bb62a831c38e6d99801c4..7ba04c5368219e10dbd2552f11f42c578a45d25f 100644 (file)
 //--------------------------------------------------------------------------
 // http_msg_body_chunk.cc author Tom Peters <thopeter@cisco.com>
 
-#include <string.h>
-#include <sys/types.h>
-#include <stdio.h>
-
-#include "mime/file_mime_process.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include "http_enum.h"
 #include "http_msg_body_chunk.h"
 
 using namespace HttpEnums;
index 1e98b3e179e4b2b0fcfd59e55ad4d9673ae95150..74718683fad1aa30481a8deed39d4fbf7a98c3b9 100644 (file)
 //--------------------------------------------------------------------------
 // http_msg_body_cl.cc author Tom Peters <thopeter@cisco.com>
 
-#include <string.h>
-#include <sys/types.h>
-#include <stdio.h>
-
-#include "detection/detection_util.h"
-#include "file_api/file_api.h"
-#include "file_api/file_flows.h"
-#include "mime/file_mime_process.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include "http_enum.h"
-#include "http_msg_request.h"
 #include "http_msg_body_cl.h"
 
 using namespace HttpEnums;
index 2846da782f2f73407f355a73e1c66a8157c4e494..ac4132fba6564fb87c37c4136c45f02edc44b9d9 100644 (file)
 //--------------------------------------------------------------------------
 // http_msg_body_old.cc author Tom Peters <thopeter@cisco.com>
 
-#include <string.h>
-#include <sys/types.h>
-#include <stdio.h>
-
-#include "detection/detection_util.h"
-#include "file_api/file_api.h"
-#include "file_api/file_flows.h"
-#include "mime/file_mime_process.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include "http_enum.h"
-#include "http_msg_request.h"
 #include "http_msg_body_old.h"
 
 using namespace HttpEnums;
index 89287a5f5ce40fe83c836ddc7e399e8ead575bb8..d1e653129e82489507aba560ec7afa30708ddb75 100644 (file)
 //--------------------------------------------------------------------------
 // http_msg_head_shared.cc author Tom Peters <thopeter@cisco.com>
 
-#include <string.h>
-#include <sys/types.h>
-#include <stdio.h>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include "http_enum.h"
-#include "http_normalizers.h"
-#include "http_uri_norm.h"
 #include "http_msg_head_shared.h"
 
 using namespace HttpEnums;
index f48f83d162228a2e41676f7e447e25b6eaca1b29..bc1fb36670973db97e2b49134e0fe86285b50f29 100644 (file)
 //--------------------------------------------------------------------------
 // http_msg_head_shared_util.cc author Tom Peters <thopeter@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "http_msg_head_shared.h"
-#include <string>
 
 int32_t HttpMsgHeadShared::get_next_code(const Field& field, int32_t& offset,
     const StrCode table[])
index 5adeda03378ef6edf17816d06775d0d65ae3da67..23a8f97b84e4223e10b78e30c54a5f12fb46ea91 100644 (file)
 //--------------------------------------------------------------------------
 // http_msg_header.cc author Tom Peters <thopeter@cisco.com>
 
-#include <cstring>
-#include <cstdio>
-#include <sys/types.h>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "http_msg_header.h"
 
-#include "utils/util.h"
-#include "detection/detection_util.h"
-#include "file_api/file_service.h"
 #include "file_api/file_flows.h"
+#include "file_api/file_service.h"
+#include "pub_sub/http_events.h"
 
-#include "http_module.h"
 #include "http_api.h"
-#include "http_normalizers.h"
 #include "http_msg_request.h"
-#include "http_msg_header.h"
-#include "pub_sub/http_events.h"
 
 using namespace HttpEnums;
 
index 75b0b260402f60836b0d42124f1dc99b2582efff..9d58087a1dbac26c69ee4d0c84a4bca0b1374ef0 100644 (file)
 //--------------------------------------------------------------------------
 // http_msg_request.cc author Tom Peters <thopeter@cisco.com>
 
-#include <string.h>
-#include <sys/types.h>
-#include <stdio.h>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include "detection/detection_util.h"
+#include "http_msg_request.h"
 
-#include "http_enum.h"
 #include "http_api.h"
-#include "http_msg_request.h"
-#include "http_msg_header.h"
 
 using namespace HttpEnums;
 
index 5ab442d1cbc726acb37c63b721e07d27945e6a39..3cbc7e02e1728c5375d73d05a5382e25a48884d6 100644 (file)
 //--------------------------------------------------------------------------
 // http_msg_section.cc author Tom Peters <thopeter@cisco.com>
 
-#include <string.h>
-#include <sys/types.h>
-#include <stdio.h>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include "http_enum.h"
-#include "http_transaction.h"
-#include "http_test_manager.h"
 #include "http_msg_section.h"
-#include "http_msg_request.h"
-#include "http_msg_status.h"
+
+#include "http_msg_body.h"
 #include "http_msg_head_shared.h"
 #include "http_msg_header.h"
+#include "http_msg_request.h"
+#include "http_msg_status.h"
 #include "http_msg_trailer.h"
-#include "http_msg_body.h"
+#include "http_test_manager.h"
 
 using namespace HttpEnums;
 
index 2742cb5aa620ae7638b043472c960221a19dffbb..45003a9b44b864dd7b6d14fb53b61578a3aa30f7 100644 (file)
 //--------------------------------------------------------------------------
 // http_msg_start.cc author Tom Peters <thopeter@cisco.com>
 
-#include <string.h>
-#include <sys/types.h>
-#include <stdio.h>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include "http_enum.h"
 #include "http_msg_start.h"
 
 using namespace HttpEnums;
index 28cbe86f4e06aeeeb168a90867ed45ab1d0858e4..08429dfe5d779dbc5ed52915c6081026f8b56a16 100644 (file)
 //--------------------------------------------------------------------------
 // http_msg_status.cc author Tom Peters <thopeter@cisco.com>
 
-#include <string.h>
-#include <sys/types.h>
-#include <stdio.h>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include "detection/detection_util.h"
+#include "http_msg_status.h"
 
-#include "http_enum.h"
 #include "http_api.h"
-#include "http_msg_status.h"
-#include "http_msg_header.h"
 
 using namespace HttpEnums;
 
index e72ca3056bdb591f44c714d9039a4a7122df627d..d423fb4fb3ad6d99c984f6dc5b0222c6dc153a1b 100644 (file)
 //--------------------------------------------------------------------------
 // http_msg_trailer.cc author Tom Peters <thopeter@cisco.com>
 
-#include <string.h>
-#include <sys/types.h>
-#include <stdio.h>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include "detection/detection_util.h"
+#include "http_msg_trailer.h"
 
-#include "http_enum.h"
 #include "http_api.h"
-#include "http_msg_trailer.h"
 
 using namespace HttpEnums;
 
index 1750e311224048d5c5bede61994badca15ef99c6..93d4e1e2dc96d42cbe1b35eb26d54434d8cb4422 100644 (file)
 //--------------------------------------------------------------------------
 // http_normalizers.cc author Tom Peters <thopeter@cisco.com>
 
-#include <string.h>
-#include <sys/types.h>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include "http_enum.h"
-#include "http_str_to_code.h"
 #include "http_normalizers.h"
 
 using namespace HttpEnums;
index b77379fd8f53d43bfd3748c88caab93adad72de1..cf829ebcea2362fdda036edb777cd14a132e554d 100644 (file)
 //--------------------------------------------------------------------------
 // http_str_to_code.cc author Tom Peters <thopeter@cisco.com>
 
-#include <string.h>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include "main/snort_types.h"
+#include "http_str_to_code.h"
+
+#include <cstring>
 
 #include "http_enum.h"
-#include "http_str_to_code.h"
 
 // Need to replace this simple algorithm for better performance FIXIT-P
 int32_t str_to_code(const uint8_t* text, const int32_t text_len, const StrCode table[])
index 66a23e925b95dd005c3ed790c16da1c066026893..f504c5b812d64fef40b2772c778ea1ab2d49bb97 100644 (file)
@@ -20,6 +20,8 @@
 #ifndef HTTP_STR_TO_CODE_H
 #define HTTP_STR_TO_CODE_H
 
+#include <cstdint>
+
 struct StrCode
 {
     int32_t code;
index 2b8a8782b2bdead778f82f23187bcc14ae760a75..15846116e51f487c41b1dce8e2c093a2295385be 100644 (file)
 //--------------------------------------------------------------------------
 // http_stream_splitter_reassemble.cc author Tom Peters <thopeter@cisco.com>
 
-#include <assert.h>
-#include <sys/types.h>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "protocols/packet.h"
 
-#include "file_api/file_flows.h"
-#include "http_enum.h"
-#include "http_field.h"
-#include "http_test_manager.h"
-#include "http_test_input.h"
 #include "http_inspect.h"
 #include "http_stream_splitter.h"
+#include "http_test_input.h"
 
 using namespace HttpEnums;
 
index d861fb8d363de3a3bd4cb6dd99a6568db26b853a..ca17a7c621672f1c37528cbc6c627a1edd5c8a3e 100644 (file)
 //--------------------------------------------------------------------------
 // http_stream_splitter_scan.cc author Tom Peters <thopeter@cisco.com>
 
-#include <assert.h>
-#include <sys/types.h>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
 #include "file_api/file_flows.h"
-#include "http_enum.h"
-#include "http_field.h"
-#include "http_msg_request.h"
-#include "http_test_manager.h"
-#include "http_test_input.h"
-#include "http_cutter.h"
+
 #include "http_inspect.h"
+#include "http_msg_request.h"
 #include "http_stream_splitter.h"
+#include "http_test_input.h"
 
 using namespace HttpEnums;
 
index 3c6c1c082eeaae214b61f8f51519e0705d78714d..7a720dd5a2c11f409e748f411938cd399af1fde0 100644 (file)
 #include "config.h"
 #endif
 
-#include <string.h>
-#include <sys/types.h>
-
-#include "framework/module.h"
-#include "framework/counts.h"
-
-#include "utils/util_utf.h"
-
-#include "http_enum.h"
-#include "http_str_to_code.h"
-#include "http_normalizers.h"
-#include "http_head_norm.h"
-#include "http_msg_request.h"
 #include "http_msg_header.h"
-#include "http_module.h"
-#include "http_uri_norm.h"
-#include "http_cutter.h"
+#include "http_msg_request.h"
 
 using namespace HttpEnums;
 
index 7fdabf6b3897ae1b74c253a591c999fb9b24e818..5234c6795dd7385c2d156eb97a1eee23ff72dee8 100644 (file)
 //--------------------------------------------------------------------------
 // http_test_input.cc author Tom Peters <thopeter@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #ifdef REG_TEST
 
-#include <assert.h>
-#include <stdexcept>
+#include "http_test_input.h"
 
 #include "http_module.h"
 #include "http_test_manager.h"
-#include "http_test_input.h"
 
 using namespace HttpEnums;
 
index c0f93715e40fb2513b7a9475567a65d2327ca20b..f9745cbc0b55c49c90356146c81719f8a7db915d 100644 (file)
 //--------------------------------------------------------------------------
 // http_test_manager.cc author Tom Peters <thopeter@cisco.com>
 
-#ifdef REG_TEST
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <stdexcept>
+#ifdef REG_TEST
 
 #include "http_test_manager.h"
+
 #include "http_test_input.h"
 
 bool HttpTestManager::test_input = false;
index 9baafede505b5fa66f3ae90226366ea56f4dbc6a..df864411ea24ada4d33159f107e2da43f93efc9f 100644 (file)
 //--------------------------------------------------------------------------
 // http_transaction.cc author Tom Peters <thopeter@cisco.com>
 
-#include <sys/types.h>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include "http_enum.h"
 #include "http_transaction.h"
+
+#include "http_msg_body.h"
+#include "http_msg_header.h"
 #include "http_msg_request.h"
 #include "http_msg_status.h"
-#include "http_msg_header.h"
 #include "http_msg_trailer.h"
-#include "http_msg_body.h"
 
 using namespace HttpEnums;
 
index 48a939f04b6db66b0c72eff89bbc7000ab2062a2..15e2eb31c8edcb202269adec6ab2919f1ebb7393 100644 (file)
 //--------------------------------------------------------------------------
 // http_uri.cc author Tom Peters <thopeter@cisco.com>
 
-#include <assert.h>
-#include <string.h>
-#include <sys/types.h>
-#include <stdio.h>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include "http_enum.h"
-#include "http_module.h"
 #include "http_uri.h"
 
 #include "hash/sfhashfcn.h"
index 93f05b0eb9e31861107403fe9869d4fa6701bdff..a740b69b832557c9aeb84a24c5899c22d430a144 100644 (file)
 //--------------------------------------------------------------------------
 // http_uri_norm.cc author Tom Peters <thopeter@cisco.com>
 
-#include <assert.h>
-#include <sys/types.h>
-#include <cstring>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "http_uri_norm.h"
+
 #include <sstream>
-#include <string>
 
 #include "log/messages.h"
 
-#include "http_enum.h"
-#include "http_uri_norm.h"
-
 using namespace HttpEnums;
 
 void UriNormalizer::normalize(const Field& input, Field& result, bool do_path, uint8_t* buffer,
index 9f3a3be7998288645b1008aed85ca3d6397c0bf7..181c6ab2b5e75a73785c43c043332a8b340f913d 100644 (file)
 //--------------------------------------------------------------------------
 // ips_http.cc author Tom Peters <thopeter@cisco.com>
 
-#include <array>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "ips_http.h"
 
-#include "protocols/packet.h"
-#include "flow/flow.h"
 #include "detection/detection_defines.h"
 #include "framework/cursor.h"
 #include "hash/sfhashfcn.h"
 #include "log/messages.h"
+#include "protocols/packet.h"
 
 #include "http_inspect.h"
 #include "http_msg_head_shared.h"
-#include "ips_http.h"
 
 using namespace HttpEnums;
 
index 7d79c80a8c93030d84cf6e156c4a7a17b0b40a1b..2193480d85fd7723e7d79994272d4de1e2037c6c 100644 (file)
 #ifndef IPS_HTTP_H
 #define IPS_HTTP_H
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <string>
 #include <array>
 
-#include "main/snort_types.h"
 #include "profiler/profiler.h"
 #include "framework/ips_option.h"
 #include "framework/module.h"
index cc46d4d6883729169af846d7f9ace4645de83b04..38c4343110f8dd8827a54672e7472b85af30f351 100644 (file)
 // http_module_test.cc author Tom Peters <thopeter@cisco.com>
 // unit test main
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "log/messages.h"
 #include "events/event_queue.h"
 
index f4f64052f8d5209925409f2fae4bd6fee0fa97b8..fe72cc1af8bb639852b662e0587bc738e69cb737 100644 (file)
 // http_msg_head_shared_util_test.cc author Tom Peters <thopeter@cisco.com>
 // unit test main
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "service_inspectors/http_inspect/http_msg_head_shared.h"
 #include "service_inspectors/http_inspect/http_field.h"
 #include "service_inspectors/http_inspect/http_str_to_code.h"
index 11783b9024f14c88d19db76d5c6227b0c077b706..a346a9466ce3eca95ab11ddb6f4af3148bdf4248 100644 (file)
 // http_normalizers_test.cc author Tom Peters <thopeter@cisco.com>
 // unit test main
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "service_inspectors/http_inspect/http_msg_header.h"
 #include "service_inspectors/http_inspect/http_test_manager.h"
 
index 50af330a315ccb85acbe1adb4fe24a51f1a3703f..92c5bb0a30c2b0c7c0453a19a38655ea4e0a918b 100644 (file)
 // http_transaction_test.cc author Tom Peters <thopeter@cisco.com>
 // unit test main
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "service_inspectors/http_inspect/http_transaction.h"
 #include "service_inspectors/http_inspect/http_module.h"
 #include "service_inspectors/http_inspect/http_flow_data.h"
index 29f247b289e4d00fe06c31d2dc9706edcffff78e..2a7ebf985bb657678529e96552021b73026d42d8 100644 (file)
 // http_uri_norm_test.cc author Tom Peters <thopeter@cisco.com>
 // unit test main
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "log/messages.h"
 #include "service_inspectors/http_inspect/http_uri_norm.h"
 #include "service_inspectors/http_inspect/http_js_norm.h"
index a9957f8b746b8ff71bbbd41fe93ec578221ddb3b..8a107624f00a8ad510d37b3857aa5c39890f79d3 100644 (file)
 
 // imap.cc author Bhagyashree Bantwal <bbantwal@cisco.com>
 
-#include "imap.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <assert.h>
-#include <string.h>
-#include <stdio.h>
-#include <sys/types.h>
+#include "imap.h"
 
 #include "events/event_queue.h"
 #include "log/messages.h"
-#include "main/snort_types.h"
 #include "main/snort_debug.h"
 #include "profiler/profiler.h"
-#include "file_api/file_api.h"
-#include "parser/parser.h"
-#include "framework/inspector.h"
-#include "target_based/snort_protocols.h"
-#include "search_engines/search_tool.h"
-#include "utils/sfsnprintfappend.h"
-#include "utils/util.h"
+#include "protocols/packet.h"
 #include "protocols/ssl.h"
-#include "mime/file_mime_process.h"
+#include "search_engines/search_tool.h"
 #include "stream/stream.h"
+#include "utils/util.h"
 
-#include "imap_paf.h"
 #include "imap_module.h"
+#include "imap_paf.h"
 
 THREAD_LOCAL ProfileStats imapPerfStats;
 THREAD_LOCAL ImapStats imapstats;
index 0fddd3bead89e77808936b3404e880869a9d0499..78514fb61f9c0612d000b63822c5c63282a25caf 100644 (file)
@@ -24,9 +24,8 @@
 // Implementation header with definitions, datatypes and flowdata class for
 // IMAP service inspector.
 
-#include "protocols/packet.h"
-#include "stream/stream.h"
-#include "imap_config.h"
+#include "flow/flow.h"
+#include "mime/file_mime_process.h"
 
 // Direction packet is coming from, if we can figure it out
 #define IMAP_PKT_FROM_UNKNOWN  0
index 99188bf933eaa34bbca760642760dd41f236aec4..273ac6c200931aa30f88724fefe9c11f6ccf6e27 100644 (file)
 
 // imap_module.cc author Bhagyashree Bantwal <bbantwal@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "imap_module.h"
 
-#include <assert.h>
-#include <sstream>
+#include <cassert>
 
 #include "log/messages.h"
-#include "main/snort_config.h"
 
 using namespace std;
 
index 34295eed2bbd5c14ae7c1afa082479cc0c2d5625..cc4d607b82bcf86b8f8ebd934a5672f805d942e3 100644 (file)
@@ -24,8 +24,6 @@
 // Interface to the IMAP service inspector
 
 #include "framework/module.h"
-#include "framework/bits.h"
-#include "main/thread.h"
 #include "imap_config.h"
 
 #define GID_IMAP 141
index 69cfa76790516d74a1095e6b634bf11590c95238..a424573e9cde01b075cb52dabbf7888f63529bc8 100644 (file)
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
-#include <sys/types.h>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "imap_paf.h"
 
-#include "main/snort_types.h"
 #include "main/snort_debug.h"
+#include "protocols/packet.h"
+#include "stream/stream.h"
 
-#include "imap_paf.h"
 #include "imap.h"
 
 extern IMAPToken imap_resps[];
index 6f34e73bd62ad249ef545deb0a4d93f6dfc658bb..f615936470cc5e48da45b8f0016e5fc1eba85424 100644 (file)
@@ -24,9 +24,8 @@
 
 // Protocol aware flushing for IMAP
 
-#include "main/snort_types.h"
-#include "stream/stream_splitter.h"
 #include "mime/file_mime_paf.h"
+#include "stream/stream_splitter.h"
 
 struct ImapDataInfo
 {
index b398aac355e80d2ee4781d8ec3f11023e0f0ca5f..f49d0cf0c68ef255050cb27b6d6e2250d58cd04c 100644 (file)
 
 // ips_modbus_data.cc author Russ Combs <rucombs@cisco.com>
 
-#include "main/snort_types.h"
-#include "main/snort_debug.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "detection/detection_defines.h"
 #include "framework/cursor.h"
 #include "framework/ips_option.h"
 #include "framework/module.h"
 #include "hash/sfhashfcn.h"
-#include "protocols/packet.h"
 #include "profiler/profiler.h"
+#include "protocols/packet.h"
 
-#include "modbus.h"
 #include "modbus_decode.h"
 
 static const char* s_name = "modbus_data";
index 0d9c9272454fda45f9f6d49d53483640669605ab..20d5e7833b4c33a224c207f45866bb98f7e25da6 100644 (file)
 
 // ips_modbus_func.cc author Russ Combs <rucombs@cisco.com>
 
-#include "main/snort_types.h"
-#include "main/snort_debug.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "detection/detection_defines.h"
 #include "framework/ips_option.h"
 #include "framework/module.h"
index a521015a3f2044eb17b5ec8ecbc2dac2a3e6008b..271283951706c1059cd7f9f37664e8800ab4e0f5 100644 (file)
 
 // ips_modbus_unit.cc author Russ Combs <rucombs@cisco.com>
 
-#include "main/snort_types.h"
-#include "main/snort_debug.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "detection/detection_defines.h"
 #include "framework/ips_option.h"
 #include "framework/module.h"
index 8e745deecc072dea9e2d3c0742cd96cec5a1010b..e431c7053f7ebe94fe4c3b98f61e32e83a7c1029 100644 (file)
 
 // modbus.cc author Russ Combs <rucombs@cisco.com>
 
-#include "modbus.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
+#include "modbus.h"
+
 #include "events/event_queue.h"
-#include "managers/inspector_manager.h"
 #include "profiler/profiler.h"
+#include "protocols/packet.h"
 
 #include "modbus_decode.h"
 #include "modbus_module.h"
index 7c637266048fd0504d61f18b5ec6b2ccbabd3657..56abe798dcd2856cafc6824440ad64f9eab28966 100644 (file)
@@ -24,7 +24,6 @@
 
 #include "flow/flow.h"
 #include "framework/counts.h"
-#include "main/thread.h"
 
 struct ModbusStats
 {
index 444d58ad98d4be337eb60bd9c523fe0e2b8bcd63..9b5e4586658e02c9673f993f00aa17f40f94e22f 100644 (file)
 
 // modbus_decode.cc author Ryan Jordan
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "modbus_decode.h"
 
+#include "events/event_queue.h"
+#include "protocols/packet.h"
+
 #include "modbus.h"
 #include "modbus_module.h"
-#include "protocols/packet.h"
-#include "events/event_queue.h"
 
 // FIXIT-L convert this stuff to a table and make configurable
 
index 3bac15999577308c4a46fa42f65ad0bc4c732a9b..df5ac0ea34cc7cfe83df689e0a93fedb0f9457af 100644 (file)
 
 // modbus_module.cc author Russ Combs <rucombs@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "modbus_module.h"
 
-#include "modbus.h"
 #include "profiler/profiler.h"
 
+#include "modbus.h"
+
 THREAD_LOCAL ProfileStats modbus_prof;
 
 //-------------------------------------------------------------------------
index 1d74a5052ca69a2052c64bcab22b8d574e5e29bf..51c4fa1949c5b9fa19cd1ccf14eee6f548188d32 100644 (file)
@@ -22,7 +22,6 @@
 #define MODUBS_MODULE_H
 
 #include "framework/module.h"
-#include "main/thread.h"
 
 #define GID_MODBUS 144
 
index b2c9779b352739fbd99c4f6b97a2d8db8cbf9b36..d91da760194c8ee77cdfa8438834dabc91a17d4b 100644 (file)
 // modbus_paf.cc author Ryan Jordan
 // Protocol-Aware Flushing (PAF) code for the Modbus preprocessor.
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "modbus_paf.h"
 
-#include "modbus_decode.h"
-#include "modbus_module.h"
 #include "events/event_queue.h"
 
+#include "modbus.h"
+#include "modbus_module.h"
+
 #define MODBUS_MIN_HDR_LEN 2        // Enough for Unit ID + Function
 #define MODBUS_MAX_HDR_LEN 254      // Max PDU size is 260, 6 bytes already seen
 
index 7fa98c94e6b09130589f13a37813226fe6948d45..3d720a2ad22ed4d929e61e68c410636a980b38ad 100644 (file)
@@ -24,8 +24,6 @@
 
 // Protocol-Aware Flushing (PAF) code for the Modbus preprocessor.
 
-#include "modbus.h"
-#include "protocols/packet.h"
 #include "stream/stream_splitter.h"
 
 enum modbus_paf_state_t
index 231a88485b032b3949c02b41df024a7eb36f6ed0..5750e7f5ee910e6cf7d8a90a112ee0becb7d9a15 100644 (file)
 
 // pop.cc author Bhagyashree Bantwal < bbantwal@cisco.com>
 
-#include "pop.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <assert.h>
-#include <string.h>
-#include <stdio.h>
-#include <sys/types.h>
+#include "pop.h"
 
 #include "events/event_queue.h"
 #include "log/messages.h"
-#include "main/snort_types.h"
 #include "main/snort_debug.h"
 #include "profiler/profiler.h"
-#include "parser/parser.h"
-#include "framework/inspector.h"
-#include "target_based/snort_protocols.h"
+#include "protocols/packet.h"
+#include "protocols/ssl.h"
 #include "search_engines/search_tool.h"
-#include "utils/sfsnprintfappend.h"
+#include "stream/stream.h"
 #include "utils/util.h"
-#include "protocols/ssl.h"
-#include "file_api/file_api.h"
-#include "mime/file_mime_process.h"
 
 #include "pop_module.h"
 #include "pop_paf.h"
index ee91f18fad37d50223b67edc7ed789ee06192961..fb12c28dcf908b2a2e4d499c703e9fd6924030c2 100644 (file)
@@ -24,9 +24,8 @@
 // Implementation header with definitions, datatypes and flowdata class for
 // POP service inspector.
 
-#include "protocols/packet.h"
-#include "stream/stream.h"
-#include "pop_config.h"
+#include "flow/flow.h"
+#include "mime/file_mime_process.h"
 
 // Direction packet is coming from, if we can figure it out
 #define POP_PKT_FROM_UNKNOWN  0
index ee1d039f78f0eb781852bfbb98f4ecb5fa20fa47..8c5148a323bb47bfdaf6dc2ab74ddbe4684fc66e 100644 (file)
 
 // pop_module.cc author Bhagyashree Bantwal <bbantwal@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "pop_module.h"
 
-#include <assert.h>
-#include <sstream>
+#include <cassert>
 
 #include "log/messages.h"
-#include "main/snort_config.h"
 
 using namespace std;
 
index 676daae6faa563712f9b220fa7420e896f2eb29a..324ede424351afec42657d4aa2a92bd235a197a3 100644 (file)
 #ifndef POP_MODULE_H
 #define POP_MODULE_H
 
+// Interface to the IMAP service inspector
+
 #include "framework/module.h"
-#include "framework/bits.h"
-#include "main/thread.h"
 #include "pop_config.h"
-// Interface to the IMAP service inspector
 
 #define GID_POP 142
 
index 650f35e3bb96fd5898ae971c2b250942d269140d..c3562b3e1e9737c2bbdd54f1542381623f24e1e9 100644 (file)
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
-#include "pop_paf.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <sys/types.h>
+#include "pop_paf.h"
 
-#include "main/snort_types.h"
 #include "main/snort_debug.h"
+#include "protocols/packet.h"
+#include "stream/stream.h"
 
 #include "pop.h"
 
index b611e6d24b073dd6d086d42b3a8086f59159fa06..5c8715daba279af791ca743941d55804f7ae6c39 100644 (file)
@@ -24,9 +24,8 @@
 
 // Protocol aware flushing for POP.
 
-#include "main/snort_types.h"
-#include "stream/stream_splitter.h"
 #include "mime/file_mime_paf.h"
+#include "stream/stream_splitter.h"
 
 // Structure used to record expected server termination sequence
 enum PopExpectedResp
index bb65d15c43da38f75c5ddeb8a70d1af7c55a6b54..9b998059f5c49ddebad8133d46cc7db3348ab345 100644 (file)
 #include "config.h"
 #endif
 
-#include <assert.h>
-#include <sys/types.h>
-#include <stdlib.h>
-#include <ctype.h>
-
-#include "parser/parser.h"
+#include "detection/detection_util.h"
+#include "framework/data_bus.h"
 #include "log/messages.h"
-#include "main/snort_debug.h"
-#include "detection/detect.h"
-#include "log/log.h"
 #include "profiler/profiler.h"
-#include "utils/util.h"
-#include "detection/detection_util.h"
-#include "stream/stream_splitter.h"
-#include "target_based/snort_protocols.h"
-#include "protocols/tcp.h"
 #include "protocols/packet.h"
-#include "framework/data_bus.h"
-#include "framework/inspector.h"
 #include "stream/stream.h"
+#include "stream/stream_splitter.h"
 #include "utils/safec.h"
+#include "utils/util.h"
 
 #include "rpc_module.h"
 
index 6d3dcdb30f14f69f7259c1fc188bffe63a0fefaf..48fb99a3bdd0344e50e72e7653287c4477dd9a1b 100644 (file)
 
 // rpc_module.cc author Russ Combs <rucombs@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "rpc_module.h"
-#include <assert.h>
 
 #define RPC_FRAG_TRAFFIC_STR \
     "fragmented RPC records"
index 8dd1f32fdad51af29eeab49a7f7ab0876b2ee00f..18533986fefc66425b072a39daca810665136f52 100644 (file)
@@ -23,8 +23,6 @@
 // Interface to the RPC decode service inspector
 
 #include "framework/module.h"
-#include "framework/bits.h"
-#include "main/thread.h"
 
 #define GID_RPC_DECODE 106
 
index 7a377818d01b9284ebd36bce53d8234167f349f6..edcfa395240755cd44982e77b5fd34db576c6ea2 100644 (file)
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
-#include "service_inspectors.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include "framework/inspector.h"
+#include "service_inspectors.h"
+
 #include "managers/plugin_manager.h"
 
 extern const BaseApi* sin_imap;
index 541c94962b5e80954df6862bf668f777c905534d..b084efe1fd2a1fc490998c3fe8e44e4c17886eba 100644 (file)
 
 #include <array>
 
-#include "main/snort_types.h"
-#include "main/snort_debug.h"
-#include "protocols/packet.h"
-#include "profiler/profiler.h"
-#include "flow/flow.h"
 #include "detection/detection_defines.h"
-#include "framework/ips_option.h"
 #include "framework/cursor.h"
-#include "framework/inspector.h"
+#include "framework/ips_option.h"
 #include "framework/module.h"
+#include "profiler/profiler.h"
+#include "protocols/packet.h"
 
 #include "sip.h"
 
index 05a7d8547d36453617341510439747ef3760a0d2..9df0bc99cadc307332f61d3188762f255410721a 100644 (file)
 #include "config.h"
 #endif
 
-#include "sip.h"
+#include "detection/detection_defines.h"
 #include "framework/ips_option.h"
 #include "framework/module.h"
-#include "framework/parameter.h"
-#include "detection/detect.h"
-#include "detection/detection_defines.h"
 #include "hash/sfhashfcn.h"
 #include "log/messages.h"
 #include "profiler/profiler.h"
+#include "protocols/packet.h"
+
+#include "sip.h"
 
 //-------------------------------------------------------------------------
 // sip_method
index e370c192d369ef6cee13ad7a5b27e51d530ce778..4591e4c3b3bb6c5294ccd30a6975c053ce54edde 100644 (file)
 #include "config.h"
 #endif
 
-#include "sip.h"
-
-#include "detection/detect.h"
 #include "detection/detection_defines.h"
 #include "framework/ips_option.h"
 #include "framework/module.h"
-#include "framework/parameter.h"
 #include "hash/sfhashfcn.h"
 #include "log/messages.h"
 #include "profiler/profiler.h"
+#include "protocols/packet.h"
+
+#include "sip.h"
 
 //-------------------------------------------------------------------------
 // sip_stat_code
index 87e641493c1e5b1029164e4ff712fd95bb3dd377..7743d1721cb7d0349d0964101e4fea9a942bd9b5 100644 (file)
 //--------------------------------------------------------------------------
 // sip.cc author Hui Cao <huica@cisco.com>
 
-#include "sip.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <assert.h>
-#include <string.h>
-#include <stdio.h>
-#include <sys/types.h>
+#include "sip.h"
 
+#include "events/event_queue.h"
 #include "log/messages.h"
-#include "main/snort_types.h"
-#include "main/snort_debug.h"
-#include "main/snort_config.h"
-#include "profiler/profiler.h"
-#include "file_api/file_api.h"
-#include "parser/parser.h"
-#include "framework/inspector.h"
-#include "utils/sfsnprintfappend.h"
-#include "target_based/snort_protocols.h"
 #include "managers/inspector_manager.h"
+#include "profiler/profiler.h"
+#include "protocols/packet.h"
 
-#include "sip_utils.h"
 #include "sip_module.h"
+#include "sip_utils.h"
 
 THREAD_LOCAL ProfileStats sipPerfStats;
 
index 91374e3a5f3617656de6199aae7feedd8a829629..6828b909a677c607855b5dc01a066f14b4b473f4 100644 (file)
@@ -21,8 +21,7 @@
 #define SIP_H
 // Implementation header with definitions, datatypes and flowdata class for SIP service inspector.
 
-#include "protocols/packet.h"
-#include "sip_config.h"
+#include "flow/flow.h"
 #include "sip_dialog.h"
 #include "sip_parser.h"
 #include "sip_roptions.h"
index 34d4ce4cd90384d7795c110fb993795333752714..1515cdeff3635cfbbbd93d90bc8fa04acdb9c898 100644 (file)
@@ -22,7 +22,7 @@
 #ifndef SIP_COMMON_H
 #define SIP_COMMON_H
 
-#include "framework/data_bus.h"
+#include "sfip/sf_ip.h"
 
 // Header containing datatypes/definitions shared by SSL inspector files.
 
index f42be8e3dea44fa4657c98adf5a60549b66a2a63..60f2494253f7faedfa8573b5101e840566d22e98 100644 (file)
 
 // sip_config.cc author Hui Cao <huica@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "sip_config.h"
 
 #include "log/messages.h"
 #include "main/snort_debug.h"
-#include "parser/parser.h"
 #include "utils/util.h"
 
 #define SIP_SEPERATORS       "()<>@,;:\\/[]?={}\" "
index 52f45da5cfbdab7aacb0ae86222a67d6ae2d53b6..b6bafddc5251d39e2d478ae7c220b2c25ae3993c 100644 (file)
@@ -24,7 +24,6 @@
 
 // Configuration for SIP service inspector
 
-#include "protocols/packet.h"
 #include "framework/counts.h"
 #include "main/thread.h"
 #include "sip_common.h"
index 7e4a7079b6202eb40c0d05de39a2e9fa0ba36922..a8232f9e216cb89c377935ec465b90a5be601d6d 100644 (file)
 
 // sip_dialog.cc author Hui Cao <huica@cisco.com>
 
-#include "sip_dialog.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <assert.h>
+#include "sip_dialog.h"
 
+#include "events/event_queue.h"
 #include "framework/data_bus.h"
-#include "main/snort_config.h"
 #include "main/snort_debug.h"
-#include "main/snort_types.h"
-#include "pub_sub/sip_events.h"
+#include "protocols/packet.h"
 #include "protocols/vlan.h"
-#include "sfip/sf_ip.h"
+#include "pub_sub/sip_events.h"
 #include "stream/stream.h"
 #include "utils/util.h"
 
-#include "sip_module.h"
 #include "sip.h"
+#include "sip_module.h"
 
 static void SIP_updateMedias(SIP_MediaSession*, SIP_MediaList*);
 static int SIP_compareMedias(SIP_MediaDataList, SIP_MediaDataList);
index cf1e76b0ddd4be762bd8367fba935aceb3e9fa56..4db1e610b4429070190e4fbc0b3b6caaa38b967b 100644 (file)
 
 // Dialog management for SIP call flow analysis
 
-#include "sip_config.h"
 #include "sip_parser.h"
 
+struct Packet;
+
 #define TOTAL_RESPONSES 0
 #define RESPONSE1XX     1
 #define RESPONSE2XX     2
index 7cb313ddd103542ddca68dc1c22409f6e09d4aaa..086f5206f0811d2b6a26b64a99d55ac085ab4f77 100644 (file)
 
 // sip_module.cc author Bhagyashree Bantwal <bbantwal@cisco.com>
 
-#include "sip_module.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <assert.h>
-#include <sstream>
+#include "sip_module.h"
 
-#include "utils/util.h"
+#include <cassert>
 
 using namespace std;
 
index 415aa1b6faa7dc622ecd0e03ab378d0d5ee6ddbb..dde696611811ea7ca34f229ee6d4bbe2d8c881b0 100644 (file)
@@ -24,8 +24,6 @@
 // Interface to the SIP service inspector
 
 #include "framework/module.h"
-#include "framework/bits.h"
-#include "main/thread.h"
 #include "sip_config.h"
 
 #define GID_SIP 140
index b4575f0ff5f591b4b994828c259f01f65347cc0c..cc1551844398a35144d69aeee6b5fb7513feb4da 100644 (file)
 #include "config.h"
 #endif
 
-#include <ctype.h>
+#include "sip_parser.h"
 
-#include "main/snort_types.h"
+#include "events/event_queue.h"
 #include "main/snort_debug.h"
-#include "main/snort_config.h"
-#include "sfip/sf_ip.h"
 #include "utils/util.h"
 
-#include "sip_parser.h"
-#include "sip_config.h"
-#include "sip_utils.h"
 #include "sip_module.h"
+#include "sip_utils.h"
 
 #define MAX_NUM_32BIT  2147483647
 
index a96d469ad5b62e8f23ece382548578242e5731b6..04472a29090f204a440f9fa3c1cd9047d65dad54 100644 (file)
 
 // sip_utils.cc author: Hui Cao <huica@cisco.com>
 
-#include "sip_utils.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
-#include <ctype.h>
-#include "main/snort_types.h"
+
+#include "sip_utils.h"
+
+#include <cstring>
+
+#include "hash/sfhashfcn.h"
 
 /********************************************************************
  * Function: SIP_IsEmptyStr()
index 3bec3b8dc72abff4b8990646f2ae42167979073f..a9ce03acf29825f8b70cdf67811d98e935b4dfb1 100644 (file)
@@ -24,7 +24,6 @@
 
 // Utility functions for SIP inspector
 
-#include "hash/sfhashfcn.h"
 #include "sip_config.h"
 
 int SIP_IsEmptyStr(char*);
index 452349137e221c404d5d6e16e440e1e9b028171a..1e5b098342613dd79eadd11c5db146a932251f83 100644 (file)
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
-#include "smtp.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <assert.h>
-#include <stdio.h>
-#include <sys/types.h>
+#include "smtp.h"
 
+#include "detection/detection_util.h"
 #include "log/messages.h"
-#include "main/snort_types.h"
+#include "log/unified2.h"
 #include "main/snort_debug.h"
 #include "profiler/profiler.h"
-#include "file_api/file_api.h"
-#include "mime/file_mime_process.h"
-#include "parser/parser.h"
-#include "framework/inspector.h"
-#include "utils/sfsnprintfappend.h"
-#include "target_based/snort_protocols.h"
+#include "protocols/packet.h"
 #include "protocols/ssl.h"
-#include "log/unified2.h"
-#include "detection/detection_util.h"
+#include "stream/stream.h"
 #include "utils/safec.h"
+#include "utils/sfsnprintfappend.h"
 #include "utils/util.h"
 
 #include "smtp_module.h"
+#include "smtp_normalize.h"
 #include "smtp_paf.h"
 #include "smtp_util.h"
-#include "smtp_normalize.h"
 #include "smtp_xlink2state.h"
 
 THREAD_LOCAL ProfileStats smtpPerfStats;
index 5cb6c0cf132afcb316db6df65105d2f607107c18..f7863a18e1488003857a6e27353141e7242707d9 100644 (file)
@@ -24,9 +24,7 @@
 // Implementation header with definitions, datatypes and flowdata class for
 // SMTP service inspector.
 
-#include "main/thread.h"
-#include "protocols/packet.h"
-#include "stream/stream.h"
+#include "flow/flow.h"
 #include "smtp_config.h"
 
 // Direction packet is coming from, if we can figure it out
index 4596e18d9c05026bd69bba7d51dfa39a5f313e58..5589b51451a0116132c4d4c5a2837522305c58c9 100644 (file)
@@ -20,6 +20,7 @@
 #define SMTP_CONFIG_H
 
 // Configuration for SMTP inspector
+
 #include "mime/file_mime_process.h"
 #include "search_engines/search_tool.h"
 
index e1e2edf10d190665de36be615ec037bb1d3e4f72..c15833e2e6058a1add932ca6e8842f97eb3d0067 100644 (file)
 
 // smtp_module.cc author Bhagyashree Bantwal <bbantwal@cisco.com>
 
-#include "smtp_module.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <assert.h>
-#include <sstream>
+#include "smtp_module.h"
 
 #include "log/messages.h"
-#include "main/snort_config.h"
 #include "utils/util.h"
 
 using namespace std;
index ebe998cb0f6dec5b860ffdf4ea443b2d3f69fb8d..6712e1e6b5cdedb8a25de486d6e35d91f5780eba 100644 (file)
@@ -24,8 +24,6 @@
 // Interface to the SMTP service inspector
 
 #include "framework/module.h"
-#include "framework/bits.h"
-#include "main/thread.h"
 #include "smtp_config.h"
 
 #define GID_SMTP 124
index c71907d52ee4a7388ef0cbf0bf1317c936f5cada..11779ed319e857af8b916aee6574060b2e443f65 100644 (file)
  *
  */
 
-#include "smtp_normalize.h"
-#include <string.h>
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
+#include "smtp_normalize.h"
+
+#include "protocols/packet.h"
+
 #include "smtp.h"
 #include "smtp_util.h"
 
index 1e49150a375f2d47f351b7bb83ec164b5bd1afa7..9502a1f355fa9c2e50794aa2a496f062d79f5a75 100644 (file)
@@ -22,7 +22,9 @@
 
 // Implementation of normalizing SMTP traffic into the alternate buffer
 
-#include "protocols/packet.h"
+#include <cstdint>
+
+struct Packet;
 
 int SMTP_NormalizeCmd(Packet*, const uint8_t*, const uint8_t*, const uint8_t*);
 
index 49a0464c0e5a2cfb4af0497e5e49e8e53eca6ca0..1f99b1fa5743435efe437b5e16a3d9b320be5b63 100644 (file)
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
-#include "smtp_paf.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <sys/types.h>
+#include "smtp_paf.h"
 
-#include "main/snort_types.h"
-#include "main/snort_debug.h"
 #include "events/event_queue.h"
+#include "main/snort_debug.h"
+#include "protocols/packet.h"
+#include "stream/stream.h"
 
-#include "smtp.h"
 #include "smtp_module.h"
 
 /* State tracker for MIME PAF */
index 53aad5abda3e377b9b5753ec9c9b185d11b77b97..2c86bc085a13e0a2ea27b61b9e2611c66f26d1d5 100644 (file)
@@ -23,9 +23,8 @@
 
 // Protocol aware flushing for SMTP
 
-#include "main/snort_types.h"
-#include "stream/stream_splitter.h"
 #include "mime/file_mime_paf.h"
+#include "stream/stream_splitter.h"
 
 // State tracker for SMTP PAF
 enum SmtpPafState
index 9bb4536c7b6b28182a0c10c51974c7e7c2fc79a7..835883e41b0021d478b6983d59aab732d99c0dc0 100644 (file)
 // smtp_util.cc author Andy  Mullican
 // This file contains SMTP helper functions.
 
-#include "smtp_util.h"
-
-#include <sys/types.h>
-#include <stdlib.h>
-#include <ctype.h>
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include "smtp.h"
-#include "smtp_config.h"
+#include "smtp_util.h"
+
 #include "detection/detection_util.h"
+#include "protocols/packet.h"
+#include "stream/stream.h"
 #include "utils/safec.h"
 
+#include "smtp.h"
+
 static THREAD_LOCAL DataBuffer DecodeBuf;
 
 void SMTP_GetEOL(const uint8_t* ptr, const uint8_t* end,
index 13c905a58dd6fec721fb0bc3bc30526ed4d1f378..051536b0a90439123e4146ffa4d98634e1dd14a9 100644 (file)
 #ifndef SMTP_UTIL_H
 #define SMTP_UTIL_H
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 // SMTP helper functions
 
 #include "smtp_config.h"
-#include "protocols/packet.h"
+
+struct Packet;
 
 void SMTP_GetEOL(const uint8_t*, const uint8_t*, const uint8_t**, const uint8_t**);
 void SMTP_LogFuncs(SMTP_PROTO_CONF* config, Packet* p, MimeSession* mime_ssn);
index dc3d2f6ee36d8db5d66f8f01ececeaf480464aae..3269f99c57f6f4cbfa9873a4cb65caeaffafdd0e 100644 (file)
 // smtp_xlink2state.c author Andy  Mullican
 // This file handles the X-Link2State vulnerability.
 
-#include "smtp_xlink2state.h"
-
-#include <strings.h>
-#include <ctype.h>
-#include <string.h>
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include "smtp_util.h"
-#include "smtp_module.h"
+#include "smtp_xlink2state.h"
 
+#include "events/event_queue.h"
 #include "packet_io/active.h"
 
+#include "smtp_module.h"
+
 #define XLINK_OTHER  1
 #define XLINK_FIRST  2
 #define XLINK_CHUNK  3
index ccde32c8ac6b23f5f6cd73b2afe07a6d62528745..b420dee3450ddddef8c586a5080f167319bf893f 100644 (file)
@@ -24,9 +24,7 @@
 
 // declares the API to handle the X-Link2State vulnerability
 
-#include "protocols/packet.h"
 #include "smtp.h"
-#include "smtp_config.h"
 
 int ParseXLink2State(SMTP_PROTO_CONF*, Packet*, SMTPData*, const uint8_t*);
 
index d6eacd297e06f124bf562bf83bb8aca77a074fe3..cb11d285512bc6cc407eb0afd87974359520a428 100644 (file)
  * Contributors: Adam Keeton, Ryan Jordan
  */
 
-#include "ssh.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <assert.h>
-#include <string.h>
-#include <stdio.h>
-#include <sys/types.h>
+#include "ssh.h"
 
 #include "events/event_queue.h"
-#include "file_api/file_api.h"
-#include "framework/inspector.h"
 #include "log/messages.h"
-#include "main/snort_types.h"
-#include "main/snort_debug.h"
-#include "parser/parser.h"
 #include "profiler/profiler.h"
-#include "utils/sfsnprintfappend.h"
-#include "target_based/snort_protocols.h"
+#include "protocols/packet.h"
+#include "stream/stream.h"
 
 #include "ssh_module.h"
 
index c6e41433aafa1e226d12d8f720f211d3800c1646..b4065a2c4e0e988708fc16b7355fcd7aad991e31 100644 (file)
@@ -30,9 +30,7 @@
 // client or server traffic appears to flow the wrong direction, or if
 // packets appear malformed/spoofed.
 
-#include "protocols/packet.h"
-#include "stream/stream.h"
-#include "ssh_config.h"
+#include "flow/flow.h"
 
 // Per-session data block containing current state
 // of the SSH preprocessor for the session.
index d73746eb523597934a77ee5b06049661e29f6c94..74fa54ab30a2c12790d9f2a846e314fa65194b02 100644 (file)
 
 // ssh_module.cc author Bhagyashree Bantwal <bbantwal@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "ssh_module.h"
-#include <assert.h>
-#include <sstream>
+
+#include <cassert>
 
 using namespace std;
 
index a7b7394da5bff7638d90da1d1069bc57d5ac8279..d16fc049af62f76e8309d359a834872f7c51844e 100644 (file)
@@ -24,8 +24,6 @@
 // Interface to the SSH service inspector
 
 #include "framework/module.h"
-#include "framework/bits.h"
-#include "main/thread.h"
 #include "ssh_config.h"
 
 #define GID_SSH 128
index 3a788ea3432f671fe9646bcb06ce44bcfffe1159..08a547b4d268707bbc6e12464d90f599d5bd7358 100644 (file)
 #include "config.h"
 #endif
 
-#include "protocols/ssl.h"
+#include "detection/detection_defines.h"
 #include "framework/ips_option.h"
 #include "framework/module.h"
-#include "framework/parameter.h"
-#include "detection/detect.h"
-#include "detection/detection_defines.h"
 #include "hash/sfhashfcn.h"
 #include "profiler/profiler.h"
+#include "protocols/packet.h"
+#include "protocols/ssl.h"
 
 #include "ssl_inspector.h"
 
index 00340c1784bcdd3f4bdea14711faed6bc22edf93..25915d5e03830a12889986cff58e2bf2009cc972 100644 (file)
 #include "config.h"
 #endif
 
-#include "protocols/ssl.h"
+#include "detection/detection_defines.h"
 #include "framework/ips_option.h"
 #include "framework/module.h"
-#include "framework/parameter.h"
-#include "detection/detect.h"
-#include "detection/detection_defines.h"
 #include "hash/sfhashfcn.h"
 #include "profiler/profiler.h"
+#include "protocols/packet.h"
+#include "protocols/ssl.h"
 
 #include "ssl_inspector.h"
 
index 7a795c844fe3dd7a4a72fd71ed83f31e6af9f8e1..c3ea514790d3bcb97a1588b645601cd8cd42dba6 100644 (file)
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
-#include "framework/counts.h"
-
 #ifndef SSL_CONFIG_H
 #define SSL_CONFIG_H
 
 // Configuration for SSL service inspector
 
+#include "framework/counts.h"
+
 struct SSL_PROTO_CONF
 {
     bool trustservers;
index 17532d0dc51e217add6ffbc80c65c97749559af3..d728424018f09efb19a8ff020b55cb48115d6686 100644 (file)
 //--------------------------------------------------------------------------
 //
 
-/*
- * SSL inspector
- *
- */
-
-#include "ssl_inspector.h"
+// SSL inspector
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <assert.h>
-#include <string.h>
-#include <stdio.h>
-#include <sys/types.h>
+#include "ssl_inspector.h"
 
+#include "detection/detect.h"
 #include "events/event_queue.h"
 #include "log/messages.h"
-#include "main/snort_types.h"
 #include "main/snort_debug.h"
 #include "profiler/profiler.h"
-#include "parser/parser.h"
-#include "framework/inspector.h"
-#include "utils/sfsnprintfappend.h"
-#include "target_based/snort_protocols.h"
-#include "detection/detect.h"
+#include "protocols/packet.h"
 #include "protocols/ssl.h"
 #include "stream/stream.h"
 
index eabbe4bb87e72407415099f94ee91319faa28a24..642b6afdd6e0186af84002707d7858142869ce31 100644 (file)
@@ -21,8 +21,7 @@
 
 // Implementation header with definitions, datatypes and flowdata class for SSL service inspector.
 
-#include "protocols/packet.h"
-#include "ssl_config.h"
+#include "flow/flow.h"
 
 #define SSLPP_ENCRYPTED_FLAGS \
     (SSL_HS_SDONE_FLAG | SSL_CLIENT_KEYX_FLAG | \
index af564e55f5d03262895b539c3682a27b3425726e..b3b5bf3a94a5570999b9e1f56f8252bf0e7913eb 100644 (file)
 
 // ssl_module.cc author Bhagyashree Bantwal <bbantwal@cisco.com>
 
-#include "ssl_module.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <assert.h>
-#include <sstream>
+#include "ssl_module.h"
 
-#include "parser/parser.h"
-#include "ssl_inspector.h"
+#include <cassert>
 
 using namespace std;
 
index a99991dc5c78f412a37cee8f3c2d7c44bb73fcf5..2506dc9bfb1e100bc065135260104a15eeaf4a63 100644 (file)
@@ -24,8 +24,6 @@
 // Interface to the SSL service inspector
 
 #include "framework/module.h"
-#include "framework/bits.h"
-#include "main/thread.h"
 #include "ssl_config.h"
 
 #define GID_SSL 137
index 1ed924d2454a098525230cac8c73b743e0a49485..df3afa95b90923073d0751222d9bbde978f41789 100644 (file)
 //--------------------------------------------------------------------------
 // curses.cc author Maya Dagon <mdagon@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "curses.h"
 
 using namespace std;
index a7a6046df0f25f8311c098d1fb17f084ac1df9ac..c4ca51bfc7f8613a7e8944b53069a473f2c87986 100644 (file)
@@ -20,8 +20,7 @@
 #ifndef CURSES_H
 #define CURSES_H
 
-#include <ctype.h>
-
+#include <cstdint>
 #include <string>
 #include <vector>
 
index 075b8697a593e0864e166ce7134d80aa7081884a..0ee1d64518bac1229fcd38ed7aa71675a2aff199 100644 (file)
 //--------------------------------------------------------------------------
 // magic.cc author Russ Combs <rucombs@cisco.com>
 
-#include <ctype.h>
-#include <stdlib.h>
-#include <strings.h>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <cstdlib>
 
 #include "magic.h"
 
index 18d1bab697b0ef6181682f667e6a4a0b883e6f61..b8839d6baf7318bd860dd08fe26a03d814ce27ce 100644 (file)
 //--------------------------------------------------------------------------
 // magic.cc author Russ Combs <rucombs@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "magic.h"
 
 MagicPage::MagicPage(const MagicBook& b) : book(b)
index f4abdf65efaa923d1eb3879264c66d4eeb8bad6f..cd46e13ecf3aa18c1a0db5ef45d874291ba866ef 100644 (file)
 //--------------------------------------------------------------------------
 // magic.h author Russ Combs <rucombs@cisco.com>
 
-#include <string>
-#include <vector>
-
 #ifndef MAGIC_H
 #define MAGIC_H
 
+#include <string>
+#include <vector>
+
 class MagicBook;
 
 struct MagicPage
index 17a11c0b4e48b561980c56b8ffc33a2ac9757c1f..71db57a4d99c5a5d0fd09382e56d46d38708003a 100644 (file)
@@ -17,8 +17,9 @@
 //--------------------------------------------------------------------------
 // spells.cc author Russ Combs <rucombs@cisco.com>
 
-#include <ctype.h>
-#include <strings.h>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
 #include "magic.h"
 
index 7b2037a4d1f843707e3f27a4693f1b30dabf508c..00571ba47982c1cf3af15cd04ef198eb34f114b6 100644 (file)
 
 // wiz_module.cc author Russ Combs <rucombs@cisco.com>
 
-#include "wiz_module.h"
-
-#include <assert.h>
-#include <string.h>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <string>
+#include "wiz_module.h"
 
 #include "curses.h"
 #include "magic.h"
index b2515249de721f86842a6407f0ae3ee83ee673a1..56973ecc10aac4ff8f2b1174fc807c71677a88f9 100644 (file)
 
 // wizard management interface
 
-#include <string>
-#include <vector>
-
 #include "framework/module.h"
-#include "main/thread.h"
 
 #define WIZ_NAME "wizard"
 #define WIZ_HELP "inspector that implements port-independent protocol identification"
index 171db2e2a6bd2d7566e593c0a899fbc4dacd334a..26e80a757b6b8243e5d328a40f78e4dbcce44742 100644 (file)
 //--------------------------------------------------------------------------
 // wizard.cc author Russ Combs <rucombs@cisco.com>
 
-#include <vector>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
+#include "host_tracker/host_cache.h"
 #include "flow/flow.h"
-#include "framework/inspector.h"
-#include "managers/inspector_manager.h"
+#include "log/messages.h"
+#include "profiler/profiler.h"
 #include "protocols/packet.h"
 #include "stream/stream_splitter.h"
-#include "profiler/profiler.h"
-#include "utils/stats.h"
-#include "log/messages.h"
-#include "host_tracker/host_cache.h"
 
 #include "curses.h"
 #include "magic.h"
index 873435e41f36048226fe4ecea07858e0c37f2305..eb57b24330ccd5f988df155bfee84dc4a994b539 100644 (file)
@@ -2,7 +2,6 @@
 set(SFIP_INCLUDES
     sf_cidr.h
     sf_ip.h
-    sf_ipvar.h
     sf_returns.h
 )
 
@@ -16,6 +15,7 @@ add_library ( sfip STATIC
     sf_cidr.cc
     sf_ip.cc
     sf_ipvar.cc
+    sf_ipvar.h
     sf_vartable.cc
     sf_vartable.h 
 )
index be0c98be5ce7617ebe4f62374380ae15275aa4c1..517d1eecb628a10c96e44178f913a7c6a6b54e5b 100644 (file)
@@ -6,13 +6,13 @@ x_includedir = $(pkgincludedir)/sfip
 x_include_HEADERS = \
 sf_returns.h \
 sf_cidr.h \
-sf_ip.h \
-sf_ipvar.h
+sf_ip.h
 
 libsfip_a_SOURCES = \
 sf_cidr.cc \
 sf_ip.cc \
 sf_ipvar.cc \
+sf_ipvar.h \
 sf_vartable.cc \
 sf_vartable.h
 
index 0aa73fdb92561d1170f13a1447295d4927cc45d5..03bec8b9495966391f17ab0adcff0ce08e5a6d59 100644 (file)
 //--------------------------------------------------------------------------
 // sf_cidr.cc author Michael Altizer <mialtize@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "sf_cidr.h"
 
 SfIpRet SfCidr::set(const char* src)
index 6a27b11fc7d837211ec0ec51cddcfccaaffd2893..e8051c449e4c7d24f3efb73ac6d0999bb6b74e01 100644 (file)
 
 /* Library for managing IP addresses of either v6 or v4 families. */
 
-#include "sf_ip.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <math.h> // For ceil
+#include "sf_ip.h"
+
+#include <cassert>
+#include <cmath> // For ceil
 
 #include "main/thread.h"
 #include "utils/util.h"
index f037f866ffecff004dcac618c26303892066b9dd..d98f0e69959288db80b0e92cfdcabe7824db2d00 100644 (file)
@@ -23,9 +23,7 @@
 #define SF_IP_H
 
 #include <arpa/inet.h>
-#include <assert.h>
 #include <sys/socket.h>
-#include <stddef.h>
 
 #include <sstream>
 
index 441bcf1eadea82af187ebc2c5bf7f23d9b856a25..dc413ae597c441e7cbfd067446e1c8a6b1cadd7b 100644 (file)
  *
  * Library for IP variables.
 */
-#include "sf_ipvar.h"
 
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-#include <stdio.h>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "sf_ipvar.h"
 
 #include "utils/util.h"
 
index ed462e0120090e0e764d1ee3c5eefd85e1632c07..5d4a32d5266bfbff564b04b80ff048489766d629 100644 (file)
@@ -33,8 +33,7 @@
 #define SFIP_NEGATED  1
 #define SFIP_ANY      2
 
-#include <stdio.h>
-#include <stdint.h>
+#include <cstdint>
 
 #include "sfip/sf_returns.h"
 
index a94b722e264472c6444d02db97eeeed31ad48e3f..c9ecfbed7aba864c6e8b4fedc286a239cd333c68 100644 (file)
  *
  * Library for managing IP variables.
 */
-#include "sf_vartable.h"
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
+#include "sf_vartable.h"
 
-#include "main/snort_types.h"
-#include "sfip/sf_vartable.h"
 #include "sfip/sf_ipvar.h"
 #include "utils/util.h"
 
index 61c8aa39570a3e05a832ec3a6923bbd036a8c743..12a9afe5797d78e36c4c3fa5741c2b7d6e683642 100644 (file)
@@ -1,26 +1,18 @@
 
-
-set ( SFRT_INCLUDES
-    sfrt.h
-    sfrt_trie.h
-    sfrt_dir.h
-    sfrt_flat.h
-    sfrt_flat_dir.h
-)
-
 if ( ENABLE_UNIT_TESTS )
     set(TEST_FILES sfrt_test.cc)
 endif()
 
 add_library ( sfrt STATIC
     sfrt.cc
+    sfrt.h
     sfrt_dir.cc
+    sfrt_dir.h
     sfrt_flat.cc
+    sfrt_flat.h
     sfrt_flat_dir.cc
-    ${SFRT_INCLUDES}
+    sfrt_flat_dir.h
+    sfrt_trie.h
     ${TEST_FILES}
 )
 
-install (FILES ${SFRT_INCLUDES}
-    DESTINATION "${INCLUDE_INSTALL_PATH}/sfrt"
-)
index d3e069f6354339a2c898a4f838518e088f8eb726..a923936a0e02daf827afe43667256aefbd995e0a 100644 (file)
@@ -1,20 +1,15 @@
 
 noinst_LIBRARIES = libsfrt.a
 
-x_includedir = $(pkgincludedir)/sfrt
-
-x_include_HEADERS = \
-sfrt.h \
-sfrt_trie.h \
-sfrt_dir.h \
-sfrt_flat.h \
-sfrt_flat_dir.h
-
 libsfrt_a_SOURCES = \
 sfrt.cc \
+sfrt.h \
 sfrt_dir.cc \
+sfrt_dir.h \
 sfrt_flat.cc \
-sfrt_flat_dir.cc
+sfrt_flat.h \
+sfrt_flat_dir.cc \
+sfrt_flat_dir.h
 
 if ENABLE_UNIT_TESTS
 libsfrt_a_SOURCES += sfrt_test.cc
index 70981fcbebcbaba79332cd9ff6dfcbc5d7a0cba5..e8df6890fd33d6aa4656850de238c9a478e4143e 100644 (file)
  *  sfrt_free   - free table
 */
 
-#include "sfrt.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
+#include "sfrt.h"
+
 #include "sfip/sf_cidr.h"
 #include "utils/util.h"
 
index 011c510855935187696394a0258d2a146b1fdc54..ffdc4fadc188050ce003747e08a35d174daffbdf 100644 (file)
@@ -23,7 +23,7 @@
 #ifndef SFRT_H
 #define SFRT_H
 
-#include <stdint.h>
+#include <cstdint>
 
 #include "sfip/sf_ip.h"
 #include "sfrt/sfrt_trie.h"
index 6bbfd536099aa4f4671c4989040d39e820e55369..fc89039b6c9edbefc9dc4682d0486c51bb1e0c64 100644 (file)
  * DIR-n-m.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "sfrt.h"  // FIXIT-L these includes are circular
 #include "sfrt_dir.h"
 
 #include <stdarg.h>
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #include "utils/util.h"
 
 typedef struct
index 38eb3363f0ff01ab531aae227044ea804fc45728..460a6128034859a61d709612eea294ba3e3ef884 100644 (file)
@@ -30,7 +30,7 @@
  // The implementation uses an multibit-trie that is similar to Gupta et-al's
  // DIR-n-m.
 
-#include <stdint.h>
+#include <cstdint>
 
 /*******************************************************************/
 /* DIR-n-m data structures
index 98442da149369acef6450f85fccfbea20bffc4f3..87203b5149836baeeccc627433eb353b5f1866c5 100644 (file)
 //--------------------------------------------------------------------------
 // 9/7/2011 - Initial implementation ... Hui Cao <hcao@sourcefire.com>
 
-#include "sfrt_flat.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
+#include "sfrt_flat.h"
+
 #include "sfip/sf_cidr.h"
 
 
index 8de888fed60857b204bf5e7005667ce3486bebc4..b2f487d0015cd18c649072d5024e9dbd6f0cd056 100644 (file)
 //--------------------------------------------------------------------------
 // 9/7/2011 - Initial implementation ... Hui Cao <hcao@sourcefire.com>
 
-#include "sfrt_flat.h" // FIXIT-L these includes are circular
-#include "sfrt_flat_dir.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
+#include "sfrt_flat.h" // FIXIT-L these includes are circular
+#include "sfrt_flat_dir.h"
+
 #include <stdarg.h>
 
 #if SIZEOF_UNSIGNED_LONG_INT == 8
index dd2e7e6182f92b741210b0271b2f53cf19c3aad7..2c90bd06d4b2b84d3b0ac965a3e0aa5ebae4fba1 100644 (file)
 //--------------------------------------------------------------------------
 // sfrt_test.cc author Hui Cao <hcao@sourcefire.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "catch/catch.hpp"
 #include "catch/unit_test.h"
 #include "sfip/sf_cidr.h"
index e2941788d65b9e258413f7ce09b03470052c4d26..d34c735eb9fcd08820d4fd52e146f2a108e5a3fb 100644 (file)
 
 // side_channel.cc author Ed Borgoyn <eborgoyn@cisco.com>
 
-#include "side_channel.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <assert.h>
-#include <string.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <time.h>
-#include <thread>
-#include <vector>
-#include <utility>
+#include "side_channel.h"
+
+#include <sys/time.h>
+
+#include <cassert>
 
+#include "framework/counts.h"
 #include "main/snort_debug.h"
 #include "managers/connector_manager.h"
-#include "profiler/profiler.h"
-#include "utils/stats.h"
+#include "profiler/profiler_defs.h"
 
 /* Globals ****************************************************************/
 
index d0e3cc1309ed1d94e3ef838fbb142a2a354c6bdf..976951f05e83b00809f836655ec7ae77687de7fb 100644 (file)
@@ -19,8 +19,6 @@
 #ifndef SIDE_CHANNEL_H
 #define SIDE_CHANNEL_H
 
-#include <vector>
-#include <string>
 #include <functional>
 
 #include "framework/bits.h"
@@ -44,9 +42,6 @@ struct __attribute__((__packed__)) SCMsgHdr
     uint64_t time_seconds;
 };
 
-class ConnectorMsgHandle;
-class Connector;
-
 struct SCMessage
 {
     SideChannel* sc;
index ac7ced5bf3d420717b0ff9d2c33c5c756743c46f..8fca8bd450350371e05a40ff2fd86a4cc3cc8fe9 100644 (file)
 
 // side_channel_module.cc author Ed Borgoyn <eborgoyn@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "side_channel_module.h"
 
-#include <assert.h>
-#include <utility>
+#include <cassert>
 
-#include "main/snort_debug.h"
 #include "log/messages.h"
+
 #include "side_channel.h"
 
 static const PegInfo sc_pegs[] =
index c796a5f18e64aefc65ec127bb52da6d9e5d09c61..4f918e572a64ba99c02c9f9bd01482fe163afdd5 100644 (file)
 #ifndef SIDE_CHANNEL_MODULE_H
 #define SIDE_CHANNEL_MODULE_H
 
-#include <vector>
-
-#include "framework/connector.h"
 #include "framework/module.h"
-#include "main/thread.h"
-#include "side_channel.h"
+#include "side_channel/side_channel.h"
 
 #define SIDECHANNEL_NAME "side_channel"
 #define SIDECHANNEL_HELP "implement the side-channel asynchronous messaging subsystem"
index 600ebdb2db5b78b861787c1eb527a8c81b12350a..998a5eefa6fe00324bae8c027851d55628e135a4 100644 (file)
 // side_channel_module_test.cc author Ed Borgoyn <eborgoyn@cisco.com>
 // unit test main
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "side_channel/side_channel.h"
 #include "side_channel/side_channel_module.h"
 
index 381f3edf9abaa4370496f71fe38d62ad34c2529d..03f5f87fa1a3a807f349b7dcd32f5d7b58be61f7 100644 (file)
 // side_channel_test.cc author Ed Borgoyn <eborgoyn@cisco.com>
 // unit test main
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "side_channel/side_channel.h"
 
 #include "log/messages.h"
index 8b7f96dd7f703c31c4c775640668d385b606ea62..41b38a53c1f01aacde93d2efb79f016953cd9ee0 100644 (file)
 #include "config.h"
 #endif
 
-#include <assert.h>
-
 #include "flow/flow_control.h"
 #include "flow/prune_stats.h"
-#include "main/snort_debug.h"
+#include "protocols/packet.h"
 #include "managers/inspector_manager.h"
-#include "profiler/profiler.h"
+#include "profiler/profiler_defs.h"
 
-#include "stream/tcp/tcp_session.h"
-#include "stream_module.h"
 #include "stream_ha.h"
+#include "stream_module.h"
 
 //-------------------------------------------------------------------------
 // stats
index cf2bb869ea9c12d5359b9a8fcfd330aa40d4479c..7fa597d29e003b76cf6110aa6acf27b74f0ddfb6 100644 (file)
 //--------------------------------------------------------------------------
 // stream_ha.cc author Ed Borgoyn <eborgoyn@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "stream_ha.h"
 
-#include <thread>
 #include <unordered_map>
 
 #include "binder/binder.h"
+#include "flow/flow_key.h"
 #include "main/snort_debug.h"
 #include "managers/inspector_manager.h"
 #include "stream/stream.h"
-#include "sfip/sf_ip.h"
 
 // HA Session flags helper macros
 #define HA_IGNORED_SESSION_FLAGS \
index 8696a5865824d3e398fa9c941c353a58e748caf9..ef1e8d5901ed30b6ccfe9ae017f052141fab678b 100644 (file)
@@ -22,7 +22,6 @@
 
 #include "flow/flow.h"
 #include "flow/ha.h"
-#include "main/snort_types.h"
 
 //-------------------------------------------------------------------------
 
index 16613cae31702e7874b0e971dda11bd6b571bdbc..3eb0f0bd62c548914395665a6ee8e4a4301095e9 100644 (file)
 
 // stream_module.cc author Russ Combs <rucombs@cisco.com>
 
-#include "stream_module.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <string>
+#include "stream_module.h"
 
 using namespace std;
 
index b2c70cb1043445c45671ceb7206ce183bd952ada..7d03a729d668d15bd283718cad25c7007a54b86f 100644 (file)
@@ -21,9 +21,8 @@
 #ifndef STREAM_MODULE_H
 #define STREAM_MODULE_H
 
-#include "main/snort_types.h"
-#include "framework/module.h"
 #include "flow/flow_config.h"
+#include "framework/module.h"
 
 extern THREAD_LOCAL ProfileStats s5PerfStats;
 struct SnortConfig;
index 9d0a8ddfe7c228bd1d61d7496ab483dd722c649c..3be2ceb40b51a05ec7e9c6db01bc43511f88b9e5 100644 (file)
 //--------------------------------------------------------------------------
 // file_module.cc author Russ Combs <rucombs@cisco.com>
 
-#include "file_module.h"
-
-#include <string>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include "stream_file.h"
-#include "main/snort_config.h"
+#include "file_module.h"
 
 using namespace std;
 
index 0301128bcd0ee420ecec72f24a5be3cca6b8728a..45c1e295d15f0917ff5e246c17234a0bf591caec 100644 (file)
@@ -20,8 +20,6 @@
 #ifndef FILE_MODULE_H
 #define FILE_MODULE_H
 
-#include "main/snort_types.h"
-#include "main/thread.h"
 #include "framework/module.h"
 
 struct SnortConfig;
index afa2ad2c7fb42c4dc531a47a40cad9ac4bfb88ab..0a812e7eda5d7f772ed71956ba66e73d694e4fb7 100644 (file)
 //--------------------------------------------------------------------------
 // file_session.cc author Russ Combs <rucombs@cisco.com>
 
-#include "file_session.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include "file_api/file_api.h"
-#include "perf_monitor/perf_monitor.h"
+#include "file_session.h"
+
+#include "detection/detection_util.h"
 #include "file_api/file_flows.h"
-#include "profiler/profiler.h"
 #include "packet_io/sfdaq.h"
-#include "detection/detection_util.h"
+#include "profiler/profiler_defs.h"
+#include "protocols/packet.h"
 #include "target_based/snort_protocols.h"
 
 #include "stream_file.h"
-#include "file_module.h"
 
 #define DECODE_PDU (DECODE_SOF | DECODE_EOF)
 
index 12ccb26540b4e8a115c7aeb45229954d6eb61835..55fc366ba9a205da11179d98f2aad25d87d8df7f 100644 (file)
 //--------------------------------------------------------------------------
 // file_session.h author Russ Combs <rucombs@cisco.com>
 
-#ifndef USER_SESSION_H
-#define USER_SESSION_H
-
-#include <assert.h>
-#include <list>
+#ifndef FILE_SESSION_H
+#define FILE_SESSION_H
 
 #include "flow/session.h"
-#include "stream/paf.h"
 
 class FileSession : public Session
 {
index e9b6a5df5d5271a49a705c365d8e7fff0b54c262..539a4035ecb31663c91a0b5b8a7da8774a8ebc1a 100644 (file)
 //--------------------------------------------------------------------------
 // stream_file.cc author Russ Combs <rucombs@cisco.com>
 
-#include "stream_file.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <assert.h>
-
-#include "log/messages.h"
-#include "protocols/packet.h"
+#include "stream_file.h"
 
 #include "file_module.h"
 #include "file_session.h"
index a7171a6df5ff469b25f62d0c51cbce7b49590358..c7add9f294221e3d2d36aae62527ac1c6a7fc771 100644 (file)
 //--------------------------------------------------------------------------
 // flush_bucket.cc author Russ Combs <rucombs@cisco.com>
 
-#include "flush_bucket.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <assert.h>
-#include <string.h>
+#include "flush_bucket.h"
 
+#include <cassert>
 #include <random>
 
 #include "main/snort_config.h"
-#include "protocols/packet.h"
 
 //-------------------------------------------------------------------------
 // static base members
index 9921998ea86133d1b55bec3a81a6bb4c15bc6ff5..b24c55e1a613ea4aef64a7dcae4b3167980a9705 100644 (file)
@@ -20,8 +20,7 @@
 #ifndef FLUSH_BUCKET_H
 #define FLUSH_BUCKET_H
 
-#include "main/snort_types.h"
-#include "main/thread.h"
+#include <cstdint>
 
 class FlushBucket
 {
index 61271c06d7e3321a03ee1c3be0367ee7670032da..844b23c9c3ff8c5cb590518b8d6d914cd9993e8b 100644 (file)
 //--------------------------------------------------------------------------
 // icmp_ha.cc author Ed Borgoyn <eborgoyn@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "icmp_ha.h"
 
-#include "flow/flow_control.h"
-#include "main/snort_debug.h"
 #include "stream/icmp/icmp_session.h"
 #include "stream/stream.h"
 
index 844a4ded83fcefda38c03c5e756885d22cdf9648..10f326b265fddbd52c6a44a623d8427ab9d9ec52 100644 (file)
@@ -20,7 +20,6 @@
 #ifndef ICMP_HA_H
 #define ICMP_HA_H
 
-#include "main/snort_types.h"
 #include "stream/base/stream_ha.h"
 
 //-------------------------------------------------------------------------
index cd79707a9f3304f8d73e0629150c65c0ed08bda4..725e6cd6d214f708678d71efefe771edbb86d2a9 100644 (file)
 
 // icmp_module.cc author Russ Combs <rucombs@cisco.com>
 
-#include "icmp_module.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <string>
+#include "icmp_module.h"
 
 #include "stream_icmp.h"
 
index fae11a0cfad3125c41f9d8de81c7d4dee0b08d3e..70424ca9830fc2f3bc00e932bfb720b313a0a684 100644 (file)
@@ -21,8 +21,6 @@
 #ifndef ICMP_MODULE_H
 #define ICMP_MODULE_H
 
-#include "main/snort_types.h"
-#include "main/thread.h"
 #include "flow/session.h"
 #include "framework/module.h"
 
index 5211ad2ef1ce769e662955d5b6a058d546b6cafc..2248c92a38a666357872916e9ba983dcde44edce 100644 (file)
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
-#include "stream_icmp.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include "main/snort_types.h"
-#include "main/snort_debug.h"
-#include "hash/sfxhash.h"
-#include "utils/util.h"
-#include "stream/stream.h"
-#include "flow/flow.h"
-#include "flow/flow_control.h"
-#include "flow/session.h"
-#include "profiler/profiler.h"
-#include "protocols/packet.h"
-#include "protocols/layer.h"
-#include "protocols/vlan.h"
-#include "protocols/ip.h"
+#include "icmp_session.h"
+
+#include "flow/flow_key.h"
+#include "profiler/profiler_defs.h"
 #include "protocols/icmp4.h"
-#include "protocols/udp.h"
+#include "protocols/packet.h"
 #include "protocols/tcp.h"
-#include "sfip/sf_ip.h"
+#include "protocols/udp.h"
+#include "protocols/vlan.h"
+#include "utils/util.h"
 
 #include "icmp_ha.h"
 #include "icmp_module.h"
-#include "icmp_session.h"
+#include "stream_icmp.h"
 
 const PegInfo icmp_pegs[] =
 {
index db812214253e3d4cfbdfa086bc3e2d188f723577..a83619a89db5bf24ba4fe079d8c62886f2c62212 100644 (file)
 #include "config.h"
 #endif
 
-#include <assert.h>
-
 #include "stream_icmp.h"
+
+#include "log/messages.h"
+
 #include "icmp_ha.h"
 #include "icmp_module.h"
 #include "icmp_session.h"
 
-#include "log/messages.h"
-#include "framework/inspector.h"
-#include "protocols/packet.h"
-
 //-------------------------------------------------------------------------
 // helpers
 //-------------------------------------------------------------------------
index 2046b36ae319827a33b81de54e588136a31963a8..693ba2230586003e4328f67362ecc83913dac831 100644 (file)
@@ -20,7 +20,7 @@
 #ifndef STREAM_ICMP_H
 #define STREAM_ICMP_H
 
-#include "main/snort_types.h"
+#include <cstdint>
 
 struct StreamIcmpConfig
 {
index 29f89df45d36b19834c6b9f4146bfd10e73b005e..319134719eb7fcbecf371a4ed6753abe244f079a 100644 (file)
 #include "config.h"
 #endif
 
-#include <assert.h>
-#include <sys/types.h>
-#include <stdlib.h>
-#include <ctype.h>
-#include <rpc/types.h>
-#include <errno.h>
-#include <array>
-
-#include "framework/codec.h"
-#include "flow/flow_control.h"
 #include "ip_defrag.h"
-#include "stream/ip/ip_session.h"
-#include "stream/ip/ip_module.h"
-#include "stream/ip/stream_ip.h"
+
+#include "detection/detect.h"
+#include "log/messages.h"
+#include "main/snort.h"
+#include "main/snort_config.h"
 #include "packet_io/active.h"
 #include "packet_io/sfdaq.h"
-#include "protocols/layer.h"
+#include "profiler/profiler_defs.h"
 #include "protocols/ipv4_options.h"
-#include "protocols/packet_manager.h"
-#include "log/messages.h"
-#include "main/snort.h"
-#include "main/snort_debug.h"
-#include "profiler/profiler.h"
 #include "time/timersub.h"
-#include "utils/stats.h"
-#include "detection/detect.h"
 #include "utils/safec.h"
 #include "utils/util.h"
 
+#include "ip_session.h"
+#include "stream_ip.h"
+
 /*  D E F I N E S  **************************************************/
 
 /* flags for the FragTracker->frag_flags field */
index 4198ae9ec55d6aaa0d8084699afa4589ee5f2b7c..3ffdaf8ebf1baa06a12b9de5ca3fb3b55c9e5c35 100644 (file)
 
 // ip datagram reassembly
 
-int drop_all_fragments(Packet* p);
-int fragGetApplicationProtocolId(Packet* p);
+#include <cstdint>
 
 struct FragEngine;
 struct FragTracker;
 struct Fragment;
+struct Packet;
+struct SnortConfig;
+
+int drop_all_fragments(Packet* p);
+int fragGetApplicationProtocolId(Packet* p);
 
 class Defrag
 {
index d2d3cbe3351b7a04ce154080a52b951aac5108e3..ed03a4aef3e4f919aa474140a51a7a86d80b95a9 100644 (file)
 //--------------------------------------------------------------------------
 // ip_ha.cc author Ed Borgoyn <eborgoyn@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "ip_ha.h"
 
-#include "main/snort_debug.h"
 #include "stream/stream.h"
+
 #include "ip_session.h"
 
 Flow* IpHA::create_session(FlowKey* key)
index 0987b9db8176832312e0aabd3783b878ae9e94d6..9788ff54a7a0c699672a60355d82ad8171855192 100644 (file)
@@ -20,7 +20,6 @@
 #ifndef IP_HA_H
 #define IP_HA_H
 
-#include "main/snort_types.h"
 #include "stream/base/stream_ha.h"
 
 //-------------------------------------------------------------------------
index a335468e969e25258dcc02aa573d47e35b70486c..2ebfbe2c33199c0f7347f20ba4dc281ae4157cf6 100644 (file)
 
 // ip_module.cc author Russ Combs <rucombs@cisco.com>
 
-#include "ip_module.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <string>
+#include "ip_module.h"
 
 #include "stream_ip.h"
-#include "ip_defrag.h"
-#include "stream/stream.h"
 
 using namespace std;
 
index f71daa904089b9241b2dd32b49f9b03b3a2852bf..ae31d519e8b4516fc354b51146f1432fe552b6a1 100644 (file)
 #ifndef IP_MODULE_H
 #define IP_MODULE_H
 
-#include "main/snort_debug.h"
-#include "main/snort_types.h"
-#include "main/thread.h"
 #include "flow/session.h"
 #include "framework/module.h"
+#include "main/snort_debug.h"
 
 struct SnortConfig;
 
index 79bbb07259da734509080710bca458bf69efcac1..7faf39946be060dc1fd98a0bd970853085934fdd 100644 (file)
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
-#include "ip_session.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include "stream_ip.h"
-#include "ip_module.h"
+#include "ip_session.h"
+
+#include "profiler/profiler_defs.h"
+#include "protocols/packet.h"
+
 #include "ip_defrag.h"
 #include "ip_ha.h"
-#include "stream/stream.h"
-#include "sfip/sf_ip.h"
-#include "profiler/profiler.h"
+#include "stream_ip.h"
 
 const PegInfo ip_pegs[] =
 {
index 21babd0ea15bad699551d6525ffdee737586f7a6..dd42a18dd2044030671504ac8a5d2deaf885853d 100644 (file)
 #ifndef IP_SESSION_H
 #define IP_SESSION_H
 
-#include "ip_module.h"
-
-#include <sys/time.h>
-#include "flow/session.h"
-#include "framework/counts.h"
+#include "stream/ip/ip_module.h"
 
 struct Fragment;
 struct FragEngine;
index e62da7e94552a874cff8e3fc9eb253666a930e77..6ede62ab3cb55ac721f6039b395d2eb77aebc658 100644 (file)
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
-#include "stream_ip.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <assert.h>
+#include "stream_ip.h"
+
+#include "log/messages.h"
 
-#include "ip_module.h"
 #include "ip_defrag.h"
 #include "ip_ha.h"
+#include "ip_module.h"
 #include "ip_session.h"
-#include "log/messages.h"
-#include "protocols/packet.h"
 
 /* max frags in a single frag tracker */
 #define DEFAULT_MAX_FRAGS 8192
index 80ed54548be7d0b8ee1faa81815f711afe78a7fa..8c350a07f3dd0239e0875854ff0b2987ac5638de 100644 (file)
@@ -22,7 +22,7 @@
 #ifndef STREAM_IP_H
 #define STREAM_IP_H
 
-#include "flow/flow.h"
+#include "framework/inspector.h"
 
 /* engine-based defragmentation policy enums */
 // must update stream.h::IP_POLICIES if this changes
index aafa00fff2d7900b81c306ff3b56d0f7aa7c9741..fcd0a2f8a19d178082b484f05b20f2e33ab1217f 100644 (file)
 #ifndef STREAM_LIBTCP_UNIT_TEST
 #define STREAM_LIBTCP_UNIT_TEST
 
-#include <stdint.h>
-#include <sys/time.h>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include "protocols/packet.h"
-#include "protocols/tcp.h"
 #include "stream_tcp_unit_test.h"
 
+#include "protocols/packet.h"
+
 // SYN PACKET
 // IP 192.168.0.89.9012 > p3nlh044.shr.prod.phx3.secureserver.net.http: Flags [S], seq 9050, win
 // 8192, length 0
index 29c8ba5275755553adb8cb909046627ab3afc8c0..f9234eab74328c473de25ed08cfa456f8c86115d 100644 (file)
@@ -22,9 +22,8 @@
 #ifndef STREAM_LIBTCP_UNIT_TEST_H
 #define STREAM_LIBTCP_UNIT_TEST_H
 
-#include <stdint.h>
-
-#include "protocols/packet.h"
+class Flow;
+struct Packet;
 
 Packet* get_syn_packet(Flow*);
 Packet* get_syn_ack_packet(Flow*);
index 0f75d821fbdb5c7f95b6260d01c8d2971ca249c9..271e64dece95fbb32d89ec29838477093f50cddd 100644 (file)
 // tcp_segment_descriptor.cc author davis mcpherson <davmcphe@cisco.com>
 // Created on: Jul 30, 2015
 
-#include "log/messages.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tcp_segment_descriptor.h"
+
+#include "detection/rules.h"
 #include "main/snort_debug.h"
 #include "protocols/tcp_options.h"
-#include "detection/rules.h"
-
 #include "stream/tcp/tcp_defs.h"
-#include "stream/tcp/tcp_event_logger.h"
-#include "tcp_segment_descriptor.h"
 
 using namespace tcp;
 
index d74139932ab150b56b489d22ccf55b5fecc82aa5..a6f1efe45065a0bdf965df3813c20c70b8025a74 100644 (file)
@@ -23,9 +23,8 @@
 #define TCP_SEGMENT_DESCRIPTOR_H
 
 #include "flow/flow.h"
-#include "protocols/tcp.h"
 #include "protocols/packet.h"
-
+#include "protocols/tcp.h"
 #include "stream/tcp/tcp_event_logger.h"
 
 class TcpSegmentDescriptor
index 63be0961aed07be384ff27091f93f93233116c62..c95640ae6f96a9d0ea4946405cf7fa8ce6eb96fc 100644 (file)
 // tcp_state_handler.cc author davis mcpherson <davmcphe@@cisco.com>
 // Created on: Jun 24, 2015
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tcp_state_handler.h"
+
 #include <iostream>
 
 #include "main/snort_debug.h"
 
 #include "tcp_state_machine.h"
-#include "tcp_state_handler.h"
 
 #ifdef UNIT_TEST
 #include "catch/catch.hpp"
-#include "stream_tcp_unit_test.h"
 #endif
 
 using namespace std;
index 230f9e68695bd2e7a4d94f81aa488b6d4409f2e6..ff95c1a251860156934d7950877de7f312bab71d 100644 (file)
@@ -23,8 +23,8 @@
 #define TCP_STATE_HANDLER_H
 
 #include "protocols/tcp.h"
-#include "tcp_segment_descriptor.h"
-#include "tcp_stream_tracker.h"
+#include "stream/libtcp/tcp_segment_descriptor.h"
+#include "stream/libtcp/tcp_stream_tracker.h"
 
 class TcpStateMachine;
 
index 952b6828c4c2e91327ed58d51a87d658accc2c12..f90f870cc40d1b7e61f028da32605b20be81e1d3 100644 (file)
 // tcp_state_machine.cc author davis mcpherson <davmcphe@cisco.com>
 // Created on: Jul 29, 2015
 
-#include "tcp_stream_tracker.h"
-#include "tcp_stream_session.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "tcp_state_machine.h"
 
 TcpStateMachine::TcpStateMachine()
index 6eb305e3c536b1a6347175777648f08982b0b298..77583c5f5e60189ea14902e4bb27c8343ec13061 100644 (file)
 #ifndef TCP_STATE_MACHINE_H
 #define TCP_STATE_MACHINE_H
 
-#include <memory>
-
-#include "tcp_state_handler.h"
-#include "tcp_stream_tracker.h"
-#include "tcp_segment_descriptor.h"
+#include "stream/libtcp/tcp_state_handler.h"
+#include "stream/libtcp/tcp_stream_tracker.h"
+#include "stream/libtcp/tcp_segment_descriptor.h"
 
 class TcpStateMachine
 {
index b60a46c893a24a293762e8d25ed9bef899e7991f..1f4079ff1619d9040b61d68530b9237b0625149a 100644 (file)
 // tcp_stream_session.cc author davis mcpherson <davmcphe@cisco.com>
 // Created on: Feb 18, 2016
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tcp_stream_session.h"
+
 #include "log/messages.h"
 #include "main/snort_debug.h"
-#include "sfip/sf_ip.h"
 #include "stream/tcp/tcp_ha.h"
 
-#include "tcp_stream_session.h"
-
 #ifdef DEBUG_MSGS
 const char* const flush_policy_names[] =
 {
index 99c18047e4c04a66b9da1e9c92de4ab1990a4afa..dd8d810a32ed976065c38c54c6bb8fd209ce0e1a 100644 (file)
 #ifndef TCP_STREAM_SESSION_H_
 #define TCP_STREAM_SESSION_H_
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #include "detection/detect.h"
 #include "flow/session.h"
+#include "stream/libtcp/tcp_stream_tracker.h"
 #include "stream/tcp/tcp_stream_config.h"
-#include "stream/tcp/tcp_event_logger.h"
-#include "tcp_stream_tracker.h"
 
 #ifdef DEBUG_MSGS
 extern const char* const flush_policy_names[];
index 88ccbbf8b2bf84d35d8190c2e63aa92aec1c518d..46bff4d49bab2cbff2bc0c07728dc83298fdbfea 100644 (file)
 // tcp_stream_tracker.cpp author davis mcpherson <davmcphe@@cisco.com>
 // Created on: Jun 24, 2015
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "tcp_stream_tracker.h"
 
-#include "profiler/profiler.h"
 #include "protocols/eth.h"
-#include "protocols/tcp.h"
-#include "protocols/tcp_options.h"
 #include "stream/stream.h"
 
 const char* tcp_state_names[] =
index 7640562364e16f4f31504d8ed5419570a01cc10b..7282ba538e8054841dbd8fef1ae0dc58573ad987 100644 (file)
 #ifndef TCP_STREAM_TRACKER_H
 #define TCP_STREAM_TRACKER_H
 
-#include "stdint.h"
-
+#include "stream/libtcp/tcp_segment_descriptor.h"
 #include "stream/paf.h"
 #include "stream/tcp/tcp_defs.h"
-#include "tcp_segment_descriptor.h"
 
 /* Only track a maximum number of alerts per session */
 #define MAX_SESSION_ALERTS 8
index 1d9e4b1d67cf8afd13a92d78e0cf68c002361913..d2a119aecf6d94d11a93c69002425babae8e0121 100644 (file)
 
 // paf.cc author Russ Combs <rcombs@sourcefire.com>
 
-#include "paf.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <assert.h>
-#include <ctype.h>
-#include <stdio.h>
-#include <stdint.h>
-#include <stdlib.h>
-#include <string.h>
+#include "paf.h"
 
-#include "main/snort_types.h"
 #include "main/snort_debug.h"
 #include "protocols/packet.h"
 
index 799638bd9cbdca87020c972ddde289d0f719d0c8..43749af3d20014b8c87aa9ed951c4fc762e21496 100644 (file)
@@ -25,9 +25,6 @@
 #ifndef PAF_H
 #define PAF_H
 
-#include <stdint.h>
-
-#include "main/snort_types.h"
 #include "stream/stream_splitter.h"
 
 struct SnortConfig;
index b38941ea62b905323a89e52022b7720c81854237..bc25cbbf5cb87c3bd34028a325a4227b7f7fdf94 100644 (file)
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
-#include "stream.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <assert.h>
-#include <stdio.h>
-#include <sys/time.h>
-#include <sys/types.h>
+#include "stream.h"
 
-#include "main/snort_config.h"
-#include "main/snort_debug.h"
-#include "main/snort_debug.h"
 #include "flow/flow_control.h"
-#include "flow/flow_cache.h"
+#include "flow/flow_key.h"
 #include "flow/ha.h"
 #include "flow/prune_stats.h"
-#include "flow/session.h"
-#include "stream/stream.h"
-#include "stream/paf.h"
-#include "tcp/tcp_session.h"
-#include "tcp/stream_tcp.h"
-#include "udp/stream_udp.h"
-#include "icmp/stream_icmp.h"
-#include "ip/stream_ip.h"
-#include "detection/detect.h"
+#include "main/snort_config.h"
+#include "main/snort_debug.h"
 #include "packet_io/active.h"
-#include "packet_io/sfdaq.h"
-#include "ips_options/ips_flowbits.h"
-#include "protocols/packet.h"
-#include "protocols/layer.h"
 #include "protocols/vlan.h"
-#include "target_based/snort_protocols.h"
 #include "target_based/sftarget_hostentry.h"
-#include "utils/bitop.h"
+#include "target_based/snort_protocols.h"
 #include "utils/util.h"
 
+#include "tcp/tcp_session.h"
+
 #ifdef UNIT_TEST
 #include "catch/catch.hpp"
-#include "stream/libtcp/stream_tcp_unit_test.h"
+#include "libtcp/stream_tcp_unit_test.h"
 #endif
 
 // this should not be publicly accessible
index 7863a86d8c12ad6692551e68621105d8fb86b18d..aefc61ef2848a0c311c5f3d1747b7f324eb38a7c 100644 (file)
 
 // provides a common flow management interface
 
-#include <sys/types.h>
-
-#include "protocols/packet.h"
 #include "flow/flow.h"
-#include "main/snort_types.h"
 
 /* traffic direction identification */
 #define FROM_SERVER     0
index 14a030eef8313f35a1b7a84473743899ad0f791b..1fd3ca69b1e840427e8ab38b6d870d9469decde4 100644 (file)
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "stream_inspectors.h"
 
-#include "framework/inspector.h"
 #include "managers/plugin_manager.h"
 
 extern const BaseApi* nin_stream_base;
index d21a4e781d42f5c0248728d5f4cab8c2c21385f1..0a3450a5ac44a49189bb6ecef9a276256760b7e3 100644 (file)
 //--------------------------------------------------------------------------
 // stream_splitter.cc author Russ Combs <rucombs@cisco.com>
 
-#include "stream_splitter.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <assert.h>
-#include <string.h>
+#include "stream_splitter.h"
 
 #include "main/snort_config.h"
 #include "protocols/packet.h"
index 0386b5702b7bda806476cb5af790f4a39506de7f..1c5a7bb6fc86b86daaacb33643538602c2840375 100644 (file)
@@ -21,7 +21,6 @@
 #define TCP_SPLITTER_H
 
 #include "main/snort_types.h"
-#include "main/thread.h"
 
 class Flow;
 
index b9fa496be9f46aa43f23b6b2a79b672b0ee50dbe..03ebe3cc771c329015eea37f9a02ea6455b12347 100644 (file)
 #include "config.h"
 #endif
 
-#include "tcp_session.h"
-
-#include "main/snort_config.h"
-#include "stream/stream_splitter.h"
+#include "detection/detection_defines.h"
 #include "framework/ips_option.h"
 #include "framework/module.h"
-#include "framework/parameter.h"
-#include "detection/detect.h"
-#include "detection/detection_defines.h"
 #include "hash/sfhashfcn.h"
+#include "main/snort_config.h"
 #include "profiler/profiler.h"
 
+#include "tcp_session.h"
+
 #ifdef UNIT_TEST
 #include "catch/catch.hpp"
 #include "stream/libtcp/stream_tcp_unit_test.h"
index aa0f58b417fe2d456f62232bf18b23c89ed69d66..a1c5109ccf721e344935a3542ca43c8ed2ab39dd 100644 (file)
 #include "config.h"
 #endif
 
-#include "tcp_session.h"
+#include "detection/detection_defines.h"
 #include "framework/ips_option.h"
 #include "framework/module.h"
-#include "framework/parameter.h"
 #include "framework/range.h"
-#include "detection/detect.h"
-#include "detection/detection_defines.h"
 #include "hash/sfhashfcn.h"
-#include "profiler/profiler.h"
-#include "sfip/sf_ip.h"
+#include "profiler/profiler_defs.h"
+
+#include "tcp_session.h"
 
 //-------------------------------------------------------------------------
 // stream_size
index de3178e3a005c8aa0f50662ff2a3a77835681ce3..8c6e949f312264b0bebc245949aecd9584704f29 100644 (file)
 // segment_overlap_editor.cc author davis mcpherson <davmcphe@@cisco.com>
 // Created on: Oct 11, 2015
 
-#include "segment_overlap_editor.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <assert.h>
+#include "segment_overlap_editor.h"
 
 #include "log/messages.h"
-#include "main/snort_debug.h"
-#include "protocols/packet.h"
 
 #include "tcp_module.h"
-#include "tcp_event_logger.h"
 #include "tcp_normalizer.h"
-#include "tcp_reassembler.h"
 
 bool SegmentOverlapEditor::is_segment_retransmit(bool* full_retransmit)
 {
index 91a26b7071848f8a1fca4ea43a6be666f975b95b..ac7fcdca4864bce4124860c09b4e5a3c70259585 100644 (file)
@@ -23,9 +23,9 @@
 #define SEGMENT_OVERLAP_EDITOR_H
 
 #include "normalize/normalize.h"
-#include "tcp_defs.h"
-#include "tcp_segment_node.h"
-#include "tcp_session.h"
+#include "stream/tcp/tcp_segment_node.h"
+
+class TcpSession;
 
 #define STREAM_INSERT_OK  0  // FIXIT-L replace with bool
 
index d4dd9502e1ab3c5604f33d4fc28a2323deebd821..705c61d737dff4f9a8dcb55d8c3f43a3fd2fe531 100644 (file)
 #include "config.h"
 #endif
 
-#include <assert.h>
+#include "stream_tcp.h"
 
 #include "main/snort_config.h"
 #include "stream/flush_bucket.h"
-#include "stream/stream_splitter.h"
 
-#include "stream_tcp.h"
 #include "tcp_ha.h"
 #include "tcp_module.h"
 #include "tcp_session.h"
index 25ad3c8e7f084e92d953587aa54945a1d170b883..d25aa74629189d3488e74853c0d8bfddfe451c43 100644 (file)
 #ifndef STREAM_TCP_H
 #define STREAM_TCP_H
 
-#include "flow/flow.h"
-#include "protocols/packet.h"
-
-#include "tcp_defs.h"
-#include "tcp_stream_config.h"
+class Flow;
+class Inspector;
+class TcpStreamConfig;
+class Session;
 
 // misc stuff
 Session* get_tcp_session(Flow*);
index 4ee2aaa70167169b5ddd2341062100c7e50b7a9f..e61786a1d57c786af14b95493e6945af36275112 100644 (file)
@@ -22,8 +22,7 @@
 #ifndef TCP_DEBUG_TRACE_H
 #define TCP_DEBUG_TRACE_H
 
-#include "protocols/tcp.h"
-#include "tcp_reassembler.h"
+#include "stream/tcp/tcp_reassembler.h"
 
 #ifndef REG_TEST
 #define S5TraceTCP(pkt, flow, tsd, evt)
index 4fd22114ca2d6d6a1304c7b4b4e48e99a169bdd6..20fe0e288fac5b957a5129689ec801d7823666f2 100644 (file)
@@ -22,8 +22,9 @@
 #ifndef TCP_DEFS_H
 #define TCP_DEFS_H
 
-#include "main/snort_debug.h"
-#include "protocols/packet.h"
+#include "main/thread.h"
+
+struct Packet;
 
 /* actions */
 #define ACTION_NOTHING                  0x00000000
index 75891ba0ec622e833b2b35482658482d5c2a9e72..31666ed9f10f05889a3ae01d0edd47e832ece001 100644 (file)
 // tcp_event_logger.cc author davis mcpherson <davmcphe@@cisco.com>
 // Created on: Jul 30, 2015
 
-#include "strings.h"
-#include "main/snort_config.h"
-#include "events/event_queue.h"
-#include "filters/sfrf.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tcp_event_logger.h"
+
 #include "detection/rules.h"
+#include "filters/sfrf.h"
+#include "main/snort_config.h"
 
-#include "tcp_defs.h"
 #include "tcp_module.h"
-#include "tcp_event_logger.h"
 
 #define EVENT_SYN_ON_EST                0x00000001
 #define EVENT_DATA_ON_SYN               0x00000002
index 8abafbb4d6d47249c25193cb04a932d8b33a15cf..49caf7417d0d8af8e33d840df6f06dac98bd6fcd 100644 (file)
@@ -22,6 +22,8 @@
 #ifndef TCP_EVENT_LOGGER_H
 #define TCP_EVENT_LOGGER_H
 
+#include <cstdint>
+
 /* events */
 #define EVENT_SYN_ON_EST                0x00000001
 #define EVENT_DATA_ON_SYN               0x00000002
index 6952c16990dd988eaf113472b5dd372ee0469579..b8d5fae66e46a17e97eb800df1b6cf04da62baa1 100644 (file)
 //--------------------------------------------------------------------------
 // tcp_ha.cc author Ed Borgoyn <eborgoyn@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "tcp_ha.h"
 
 #include "main/snort_debug.h"
 #include "stream/stream.h"
+
 #include "tcp_session.h"
 
 Flow* TcpHA::create_session(FlowKey* key)
index b470957a2bb96aaf2531d4adeab86b8cedfdc183..47193a9a5a6db3f8ac4c5599d54281ee21d121f7 100644 (file)
@@ -20,7 +20,6 @@
 #ifndef TCP_HA_H
 #define TCP_HA_H
 
-#include "main/snort_types.h"
 #include "stream/base/stream_ha.h"
 
 //-------------------------------------------------------------------------
index 3c516a1e339ed85288cbf8d612c49de8249664f2..8efed6742c1fe8debe612946ad17425f8c7c7b19 100644 (file)
 
 // tcp_module.cc author Russ Combs <rucombs@cisco.com>
 
-#include "tcp_module.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <string>
+#include "tcp_module.h"
 
-#include "profiler/profiler.h"
-#include "stream/stream.h"
-#include "stream_tcp.h"
+#include "profiler/profiler_defs.h"
 
 using namespace std;
 
index a55dde178bc783ae8eb8321f738b244f186df9f3..06b28e00c9d1bac5c786ef37c88cb550c900f4bb 100644 (file)
 #ifndef TCP_MODULE_H
 #define TCP_MODULE_H
 
-#include <string>
-#include <vector>
-
-#include "main/snort_types.h"
-#include "main/thread.h"
 #include "flow/session.h"
 #include "framework/module.h"
-#include "tcp_stream_config.h"
+#include "stream/tcp/tcp_stream_config.h"
 
 #define GID_STREAM_TCP  129
 
index 54bbcf542f55057a2d8135932f953c6dcb31e810..1391af265f9d6ec3bb49d0ab82606093c44b49db 100644 (file)
 // tcp_normalization.cc author davis mcpherson <davmcphe@@cisco.com>
 // Created on: Jul 31, 2015
 
-#include "packet_io/active.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
 #include "tcp_normalizer.h"
-#include "tcp_event_logger.h"
+
+#include "main/snort_debug.h"
+#include "packet_io/active.h"
 
 THREAD_LOCAL PegCount tcp_norm_stats[PC_TCP_MAX][NORM_MODE_MAX];
 
index 9d9b294f61dd017bdbaffb89e76295e31179900d..bf4683b5fb5369a10faa6dfd653779959ac39dd9 100644 (file)
 #ifndef TCP_NORMALIZER_H
 #define TCP_NORMALIZER_H
 
-#include "main/snort_types.h"
-#include "framework/counts.h"
-#include "protocols/tcp_options.h"
-#include "protocols/tcp.h"
 #include "normalize/normalize.h"
-#include "tcp_session.h"
-#include "tcp_defs.h"
+#include "protocols/tcp_options.h"
+#include "stream/tcp/tcp_session.h"
 
 enum TcpPegCounts
 {
index 9c10c728c9720a2898f6211bd972ad96f20e06a5..c8c260bdab236e55e4e92c8f6e3c5ff2d7a89d32 100644 (file)
 // tcp_normalizers.cc author davis mcpherson <davmcphe@@cisco.com>
 // Created on: Sep 22, 2015
 
-#include "tcp_defs.h"
-#include "tcp_module.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "tcp_normalizers.h"
 
+#include "tcp_module.h"
+
 class TcpNormalizerFirst : public TcpNormalizer
 {
 public:
index dad5e9ba3918aee7ffe3c692ab5e587bc342147c..1fcf085f964905c545f72a3ba3a82103631f621e 100644 (file)
@@ -22,8 +22,7 @@
 #ifndef TCP_NORMALIZERS_H
 #define TCP_NORMALIZERS_H
 
-#include "tcp_defs.h"
-#include "tcp_normalizer.h"
+#include "stream/tcp/tcp_normalizer.h"
 
 class TcpNormalizerFactory
 {
index 4bd0acb16b42462b22324e0b359cc68ce711368f..93471bfb82c8810534745f3966568ddb923664ca 100644 (file)
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
-// tcp_reassembly.cc author davis mcpherson <davmcphe@@cisco.com>
+// tcp_reassember.cc author davis mcpherson <davmcphe@@cisco.com>
 // Created on: Jul 31, 2015
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <errno.h>
-#include <assert.h>
+#include "tcp_reassembler.h"
 
+#include "log/log.h"
 #include "main/snort.h"
-#include "protocols/packet.h"
-#include "protocols/packet_manager.h"
 #include "profiler/profiler.h"
-#include "flow/flow_control.h"
+#include "protocols/packet_manager.h"
 
 #include "tcp_module.h"
-#include "tcp_session.h"
-#include "tcp_event_logger.h"
 #include "tcp_normalizer.h"
-#include "tcp_reassembler.h"
 
 THREAD_LOCAL Packet* s5_pkt = nullptr;
 
index 24c49857028e260b1f90c24260ad124058311658..837fd1f4262f34e378616e573d494c053f88833e 100644 (file)
 #ifndef TCP_REASSEMBLER_H
 #define TCP_REASSEMBLER_H
 
-#include "framework/counts.h"
-#include "detection/detect.h"
-#include "normalize/normalize.h"
-
-#include "segment_overlap_editor.h"
-#include "tcp_defs.h"
-#include "tcp_segment_node.h"
+#include "stream/stream.h"
+#include "stream/tcp/segment_overlap_editor.h"
 
 class TcpSession;
 class TcpStreamTracker;
index 11166c3c78a78f7769ad734b40e294e2081d39a0..e6037e85290159567ba4e5baf9a247c948686aad 100644 (file)
 // tcp_reassemblers.cc author davis mcpherson <davmcphe@@cisco.com>
 // Created on: Oct 9, 2015
 
-#include "tcp_module.h"
-#include "tcp_event_logger.h"
-#include "tcp_session.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "tcp_reassemblers.h"
 
 class TcpReassemblerFirst : public TcpReassembler
index 95c5e7764a8aff2fd3af006c549b9b6a8e6e65f1..8c2882276410e1449f7211b9f4fcb190f40c87d6 100644 (file)
@@ -22,8 +22,7 @@
 #ifndef TCP_REASSEMBLERS_H
 #define TCP_REASSEMBLERS_H
 
-#include "tcp_defs.h"
-#include "tcp_reassembler.h"
+#include "stream/tcp/tcp_reassembler.h"
 
 class TcpReassemblerFactory
 {
index c1706a6fdef1065ca031e1473bc105f6a868ff75..000d5915b393c85c2e4a2c1ff3e2c1ab3acae09f 100644 (file)
 // tcp_segment.cc author davis mcpherson <davmcphe@@cisco.com>
 // Created on: Sep 21, 2015
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "tcp_segment_node.h"
 
-#include "flow/flow_control.h"
-#include "protocols/packet.h"
 #include "utils/util.h"
+
 #include "tcp_module.h"
 
 // FIXIT-P this is going to set each member 2X; once here and once in init
index d48fc68a5f1772c533291b40436e3dc433f4911c..ef673cd371316b9b7cfadb5ecbb9c7c7640a5b56 100644 (file)
 #define TCP_SEGMENT_H
 
 #include "main/snort_debug.h"
-#include "protocols/packet.h"
-
-#include "tcp_defs.h"
 #include "stream/libtcp/tcp_segment_descriptor.h"
+#include "stream/tcp/tcp_defs.h"
 
 //-----------------------------------------------------------------
 // we make a lot of TcpSegments so it is organized by member
index cde50483db934d41ae270806de5ff7b2fe36a86d..6541e3ae60d49f2a05215243f65d5814d546826f 100644 (file)
 #include "config.h"
 #endif
 
-#include <errno.h>
-#include <assert.h>
-
-#include "main/snort_types.h"
-#include "main/snort_debug.h"
-#include "main/snort_config.h"
-#include "detection/detect.h"
-#include "detection/detection_util.h"
-#include "hash/sfxhash.h"
-#include "utils/util.h"
-#include "utils/util_net.h"
-#include "utils/sflsq.h"
-#include "time/packet_time.h"
+#include "tcp_session.h"
+
+#include "log/log.h"
 #include "perf_monitor/flow_ip_tracker.h"
-#include "sfip/sf_ip.h"
-#include "protocols/packet.h"
-#include "protocols/packet_manager.h"
-#include "protocols/tcp_options.h"
-#include "protocols/tcp.h"
-#include "protocols/eth.h"
-#include "log/log_text.h"
-#include "stream/stream.h"
-#include "stream/stream_splitter.h"
-#include "flow/session.h"
 #include "profiler/profiler.h"
-#include "file_api/file_api.h"
-#include "perf_monitor/flow_tracker.h"
-#include "filters/sfrf.h"
+#include "protocols/eth.h"
 
-#include "stream/paf.h"
 #include "stream_tcp.h"
+#include "tcp_debug_trace.h"
 #include "tcp_ha.h"
 #include "tcp_module.h"
-#include "tcp_event_logger.h"
-#include "tcp_debug_trace.h"
 #include "tcp_normalizers.h"
 #include "tcp_reassemblers.h"
 #include "tcp_stream_state_machine.h"
-#include "tcp_session.h"
 
 DEBUG_WRAP(const char* t_name = NULL; const char* l_name = NULL; )
 
index fe758f6f628cf2c7dc04174939aaf0cc7db6b207..319b7732ae4c6d4094af7a9a26465d9a3c8c9d6d 100644 (file)
 #ifndef TCP_SESSION_H
 #define TCP_SESSION_H
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "detection/detect.h"
-
 #include "stream/libtcp/tcp_stream_session.h"
 #include "stream/libtcp/tcp_state_machine.h"
-#include "stream_tcp.h"
-#include "tcp_defs.h"
-#include "tcp_stream_config.h"
-#include "tcp_tracker.h"
+#include "stream/tcp/tcp_tracker.h"
 
 class TcpEventLogger;
 
index e7115330375318f17b145e44e1716c5f1597bffd..e104750c54db8ee25961d7ffb5f599502094c6a0 100644 (file)
 // tcp_state_close_wait.cc author davis mcpherson <davmcphe@cisco.com>
 // Created on: Aug 5, 2015
 
-#include <iostream>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include "tcp_module.h"
-#include "tcp_tracker.h"
-#include "tcp_session.h"
-#include "tcp_normalizer.h"
 #include "tcp_state_close_wait.h"
 
+#include "main/snort_debug.h"
+
+#include "tcp_normalizer.h"
+#include "tcp_session.h"
+
 #ifdef UNIT_TEST
 #include "catch/catch.hpp"
 #endif
index 69dc5b648b6e55cfc9dfff20bf82b99b91d0895a..0b0a8d292375bc5cdd591a8b528835f4c5ec4086 100644 (file)
 // tcp_state_closed.cc author davis mcpherson <davmcphe@@cisco.com>
 // Created on: Jul 30, 2015
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "tcp_state_closed.h"
 
-#include "tcp_module.h"
-#include "tcp_tracker.h"
 #include "tcp_session.h"
-#include "tcp_normalizer.h"
 
 #ifdef UNIT_TEST
 #include "catch/catch.hpp"
-#include "stream/libtcp/stream_tcp_unit_test.h"
 #endif
 
 TcpStateClosed::TcpStateClosed(TcpStateMachine& tsm) :
index e5ecf2233cd1dc2d2822951c7eb11bbe30bef452..066b43403c5163411ec59993876b7072f5037bea 100644 (file)
 // tcp_state_closing.cc author davis mcpherson <davmcphe@cisco.com>
 // Created on: Aug 5, 2015
 
-#include <iostream>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include "tcp_module.h"
-#include "tcp_tracker.h"
-#include "tcp_session.h"
-#include "tcp_normalizer.h"
 #include "tcp_state_closing.h"
 
+#include "main/snort_debug.h"
+
+#include "tcp_normalizer.h"
+#include "tcp_session.h"
+
 #ifdef UNIT_TEST
 #include "catch/catch.hpp"
 #endif
index 4737cf9784bd036e2cf24e5d05da281ef41fd179..2f1748474a2f8d2970b6bfc24405bc497d7435eb 100644 (file)
 // tcp_state_established.cc author davis mcpherson <davmcphe@@cisco.com>
 // Created on: Jul 30, 2015
 
-#include "tcp_module.h"
-#include "tcp_tracker.h"
-#include "tcp_session.h"
-#include "tcp_normalizer.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "tcp_state_established.h"
 
+#include "tcp_normalizer.h"
+#include "tcp_session.h"
+
 TcpStateEstablished::TcpStateEstablished(TcpStateMachine& tsm) :
     TcpStateHandler(TcpStreamTracker::TCP_ESTABLISHED, tsm)
 {
index 36eb424f25f25a6952c7624724e9de25febc5e9b..51b33abbf8ecead49466761a5677892dc0fce52e 100644 (file)
 // tcp_state_fin_wait1.cc author davis mcpherson <davmcphe@cisco.com>
 // Created on: Aug 5, 2015
 
-#include <iostream>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include "tcp_module.h"
-#include "tcp_tracker.h"
-#include "tcp_session.h"
-#include "tcp_normalizer.h"
 #include "tcp_state_fin_wait1.h"
 
-#ifdef UNIT_TEST
-#include "catch/catch.hpp"
-#endif
+#include "main/snort_debug.h"
+
+#include "tcp_normalizer.h"
+#include "tcp_module.h"
+#include "tcp_session.h"
 
 using namespace std;
 
index 30edca40b29e098685f50bfe307d2459dc23eef1..e0013251b6e4531d53567daaeeca6caa81ba8d92 100644 (file)
 // tcp_state_fin_wait2.cc author davis mcpherson <davmcphe@cisco.com>
 // Created on: Aug 5, 2015
 
-#include <iostream>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include "tcp_module.h"
-#include "tcp_tracker.h"
-#include "tcp_session.h"
-#include "tcp_normalizer.h"
 #include "tcp_state_fin_wait2.h"
 
-#ifdef UNIT_TEST
-#include "catch/catch.hpp"
-#endif
+#include "tcp_normalizer.h"
+#include "tcp_session.h"
 
 using namespace std;
 
index 59559ed20429e6b358c56f38b3cdbb814d22d003..b3c205a907d45cc63e48a03cedbb1c589f120234 100644 (file)
 // tcp_state_last_ack.cc author davis mcpherson <davmcphe@cisco.com>
 // Created on: Aug 5, 2015
 
-#include <iostream>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include "tcp_module.h"
-#include "tcp_tracker.h"
-#include "tcp_session.h"
-#include "tcp_normalizer.h"
 #include "tcp_state_last_ack.h"
 
-#ifdef UNIT_TEST
-#include "catch/catch.hpp"
-#endif
+#include "tcp_normalizer.h"
+#include "tcp_session.h"
 
 using namespace std;
 
index c52e6ce4c20d57ab89d00d6bac66ab4388af0377..db37c4c7c1e76b5b0e9ea5f36ce6ac20fa6d4638 100644 (file)
 // tcp_state_listen.cc author davis mcpherson <davmcphe@@cisco.com>
 // Created on: Jul 30, 2015
 
-#include "tcp_module.h"
-#include "tcp_tracker.h"
-#include "tcp_session.h"
-#include "tcp_normalizer.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "tcp_state_listen.h"
 
+#include "tcp_normalizer.h"
+#include "tcp_session.h"
+
 TcpStateListen::TcpStateListen(TcpStateMachine& tsm) :
     TcpStateHandler(TcpStreamTracker::TCP_LISTEN, tsm)
 {
index b35acb546d13e82f1b5947b572c37eb7059df4cf..5bdf72edc338999553cae32e0f6ea854ec36a7bd 100644 (file)
 // tcp_state_none.cc author davis mcpherson <davmcphe@@cisco.com>
 // Created on: Jul 30, 2015
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "tcp_state_none.h"
 
-#include "tcp_module.h"
-#include "tcp_tracker.h"
-#include "tcp_session.h"
 #include "tcp_normalizer.h"
-
-#ifdef UNIT_TEST
-#include "catch/catch.hpp"
-#include "stream/libtcp/stream_tcp_unit_test.h"
-#endif
+#include "tcp_session.h"
 
 TcpStateNone::TcpStateNone(TcpStateMachine& tsm) :
     TcpStateHandler(TcpStreamTracker::TCP_STATE_NONE, tsm)
index f71e90819eac1580137185589f868b559ba19cbd..e3646db27020a4e1368b40eb9cd141e0b20c25db 100644 (file)
 // tcp_state_syn_recv.cc author davis mcpherson <davmcphe@@cisco.com>
 // Created on: Aug 5, 2015
 
-#include <iostream>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tcp_state_syn_recv.h"
 
 #include "tcp_module.h"
-#include "tcp_tracker.h"
-#include "tcp_session.h"
 #include "tcp_normalizer.h"
-#include "tcp_state_syn_recv.h"
+#include "tcp_session.h"
 
 using namespace std;
 
index 4a1e04064679c2457a76c72746327c7d9caccc40..a0e475fd285aabcb391e9f83a477fa9a6b7c32ba 100644 (file)
 // tcp_state_syn_sent.cc author davis mcpherson <davmcphe@cisco.com>
 // Created on: Aug 5, 2015
 
-#include <iostream>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include "tcp_module.h"
-#include "tcp_tracker.h"
-#include "tcp_session.h"
-#include "tcp_normalizer.h"
 #include "tcp_state_syn_sent.h"
 
-#ifdef UNIT_TEST
-#include "catch/catch.hpp"
-#endif
+#include "tcp_session.h"
 
 using namespace std;
 
index 241489db538922e35c17b6811b81062888316e9f..9a95369282f747003115bfce933382764a2b4870 100644 (file)
 // tcp_state_time_wait.cc author davis mcpherson <davmcphe@cisco.com>
 // Created on: Aug 5, 2015
 
-#include <iostream>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include "tcp_module.h"
-#include "tcp_tracker.h"
-#include "tcp_session.h"
-#include "tcp_normalizer.h"
 #include "tcp_state_time_wait.h"
 
-#ifdef UNIT_TEST
-#include "catch/catch.hpp"
-#endif
+#include "main/snort_debug.h"
+
+#include "tcp_normalizer.h"
+#include "tcp_session.h"
 
 using namespace std;
 
index 7c77b854a6d1cef332cc2124d71e11c57bc088c1..822e2dde51ee886956d9fe0394c678eeb78600f3 100644 (file)
 // tcp_stream_config.cc author davis mcpherson <davmcphe@@cisco.com>
 // Created on: Oct 22, 2015
 
-#include "log/messages.h"
-#include "main/snort_config.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "tcp_stream_config.h"
 
+#include "log/messages.h"
+
 static const char* const reassembly_policy_names[] =
 { "no policy", "first", "last", "linux", "old_linux", "bsd", "macos", "solaris", "irix",
   "hpux11", "hpux10", "windows", "win_2003", "vista", "proxy" };
index 3727251ea1cddcea6249e1bc1e3a7e9a05cdb5ab..d146b5ac63431900e0d3cfb5e6a9ac1a825ad819 100644 (file)
@@ -22,8 +22,9 @@
 #ifndef TCP_STREAM_CONFIG_H
 #define TCP_STREAM_CONFIG_H
 
+#include "protocols/packet.h"
+#include "stream/tcp/tcp_defs.h"
 #include "time/packet_time.h"
-#include "tcp_defs.h"
 
 #define STREAM_CONFIG_STATEFUL_INSPECTION      0x00000001
 #define STREAM_CONFIG_LOG_STREAMS              0x00000004
index 7a7f89ebdccf2cc713c901c5d604ddedfa8d9f80..341fc11addcdb6e0a86b0703192a5369e0f5d5b1 100644 (file)
 // tcp_stream_state_machine.cc author davis mcpherson <davmcphe@@cisco.com>
 // Created on: Apr 1, 2016
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tcp_stream_state_machine.h"
+
 #include "tcp_state_none.h"
 #include "tcp_state_closed.h"
 #include "tcp_state_listen.h"
@@ -32,8 +38,6 @@
 #include "tcp_state_last_ack.h"
 #include "tcp_state_time_wait.h"
 
-#include "tcp_stream_state_machine.h"
-
 TcpStreamStateMachine::TcpStreamStateMachine()
 {
     // initialize stream tracker state machine with handler for each state...
index 107f40eafd4a44d9b6cc970e9daef4f1e9f32d30..de99449dc39e23e4ecec0302c3b063157cbce9e7 100644 (file)
 // tcp_tracker.cc author davis mcpherson <davmcphe@@cisco.com>
 // Created on: Dec 1, 2015
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "tcp_tracker.h"
 
 #include "log/messages.h"
 #include "profiler/profiler_defs.h"
+
 #include "tcp_module.h"
-#include "tcp_normalizers.h"
-#include "tcp_reassemblers.h"
-#include "tcp_session.h"
+#include "tcp_normalizer.h"
+#include "tcp_reassembler.h"
 
 TcpTracker::TcpTracker(bool client, TcpSession* ssn) :
     TcpStreamTracker(client)
index 81b4ba790e135475b5e5a7a099b50cc7abf5866a..6d571e27ccef5ff0e20022c260113666f277b961 100644 (file)
@@ -23,7 +23,6 @@
 #define TCP_TRACKER_H_
 
 #include "stream/libtcp/tcp_stream_tracker.h"
-#include "tcp_defs.h"
 
 //-------------------------------------------------------------------------
 // extra, extra - read all about it!
index 2259c8114a80fd283eb5e4fa67375e38d4ba05ed..d3ed70b9860e2f2eb7ee51954474b095e15fc66c 100644 (file)
 // tcp_normalizer_test.cc author Davis McPherson <davmcphe@cisco.com>
 // unit test main
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "stream/tcp/tcp_module.h"
 #include "stream/tcp/tcp_normalizers.h"
 #include "protocols/tcp_options.h"
index 0020bef19474d7a657a666d32406637399f4e765..a5d1f85e5eba5616558284dfaf73d5884880fd0e 100644 (file)
 #include "config.h"
 #endif
 
-#include <assert.h>
-
 #include "stream_udp.h"
-#include "udp_module.h"
-#include "udp_ha.h"
-#include "stream/udp/udp_session.h"
+
 #include "log/messages.h"
-#include "protocols/packet.h"
+
+#include "udp_ha.h"
+#include "udp_module.h"
+#include "udp_session.h"
 
 //-------------------------------------------------------------------------
 // helpers
index 25971675158b0826164ddf54e2f83bbce59bb2d3..2fc82bf51af6828272bfbe691a4efcd1869fd48f 100644 (file)
@@ -19,7 +19,9 @@
 #ifndef STREAM_UDP_H
 #define STREAM_UDP_H
 
-#include "flow/flow.h"
+#include <cstdint>
+
+class Inspector;
 
 struct StreamUdpConfig
 {
index 815278a38fdd9a140bb8112e885ca6ba24647ee1..3bf7f2b0dc7b3e070b4576ac5df360e800e80aef 100644 (file)
 //--------------------------------------------------------------------------
 // udp_ha.cc author Ed Borgoyn <eborgoyn@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "udp_ha.h"
 
-#include "main/snort_debug.h"
 #include "stream/stream.h"
+
 #include "udp_session.h"
 
 Flow* UdpHA::create_session(FlowKey* key)
index d7578871e5f5d9b33f8b18ab1925258e209c7b7a..07a8aa5593793b66c624b4ca86eaa2859017827c 100644 (file)
@@ -20,7 +20,6 @@
 #ifndef UDP_HA_H
 #define UDP_HA_H
 
-#include "main/snort_types.h"
 #include "stream/base/stream_ha.h"
 
 //-------------------------------------------------------------------------
index 0d0247c6b085f1dfe815cec4adf6a63da163a5e3..0fef17bdf7e5b7aa557d8b02fff78a7a9f44a97c 100644 (file)
 
 // udp_module.cc author Russ Combs <rucombs@cisco.com>
 
-#include "udp_module.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <string>
+#include "udp_module.h"
 
 #include "stream_udp.h"
 
index d3dce14fbfccca9dfe17cbd55bb3d71ac32dbcea..910edfe9cd679d8b66b96e328a976526483d329d 100644 (file)
 #ifndef UDP_MODULE_H
 #define UDP_MODULE_H
 
-#include <string>
-#include <vector>
-
-#include "main/snort_types.h"
-#include "main/thread.h"
 #include "flow/session.h"
 #include "framework/module.h"
 
index ead6527157852731f4501d72b33a945397e49cf8..6493004eef49a87174cb7f22f45b5bba9206df73 100644 (file)
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
-#include "udp_session.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include "stream/stream.h"
-#include "main/snort_types.h"
-#include "main/snort_debug.h"
-#include "detection/detect.h"
-#include "detection/rules.h"
-#include "detection/treenodes.h"
-#include "hash/sfxhash.h"
-#include "utils/util.h"
-#include "protocols/packet.h"
+#include "udp_session.h"
+
 #include "flow/session.h"
-#include "packet_io/active.h"
 #include "perf_monitor/flow_ip_tracker.h"
-#include "profiler/profiler.h"
-#include "sfip/sf_ip.h"
-#include "stream/stream.h"
+#include "profiler/profiler_defs.h"
+#include "protocols/packet.h"
 
-#include "stream_udp.h"
-#include "udp_module.h"
 #include "udp_ha.h"
+#include "udp_module.h"
+#include "stream_udp.h"
 
 // NOTE:  sender is assumed to be client
 //        responder is assumed to be server
index eeb670e169586f5b9c804f6adf128e9078b738d4..025370c8ec8921d0ebbd6357cd1ea944edf983af 100644 (file)
@@ -20,7 +20,6 @@
 #ifndef UDP_SESSION_H
 #define UDP_SESSION_H
 
-#include <sys/time.h>
 #include "flow/session.h"
 
 class UdpSession : public Session
index 1d4592b8a972a264927c68e5e5ecdddfef3c0123..813af2fd239916b3f24d901a646be84f775b8b52 100644 (file)
 //--------------------------------------------------------------------------
 // stream_user.cc author Russ Combs <rucombs@cisco.com>
 
-#include "stream_user.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <assert.h>
+#include "stream_user.h"
+
+#include "log/messages.h"
 
 #include "user_module.h"
 #include "user_session.h"
-#include "log/messages.h"
-#include "protocols/packet.h"
 
 //-------------------------------------------------------------------------
 // helpers
index bb12eb25b0f70a075e5a4a1f0573d1fb9bd2c618..6c6ad0726e85b9ee944acaf5b797668bb26a09aa 100644 (file)
@@ -20,7 +20,9 @@
 #ifndef STREAM_USER_H
 #define STREAM_USER_H
 
-#include "flow/flow.h"
+#include <cstdint>
+
+class Inspector;
 
 struct StreamUserConfig
 {
index 673531f6cbfdc4cfaf49ff0111a12c4f0f8bece5..ec0f5ed7070d8fafc34cfadd9fb1c651f77c17ec 100644 (file)
 //--------------------------------------------------------------------------
 // user_module.cc author Russ Combs <rucombs@cisco.com>
 
-#include "user_module.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <string>
+#include "user_module.h"
 
 #include "stream_user.h"
-#include "main/snort_config.h"
 
 using namespace std;
 
index 8c0cfa7f093a2bd659e01a1f66ee45850b074022..6c8cdc09ea86a1e37d6afa7f983d96b06eccc6a5 100644 (file)
 #ifndef USER_MODULE_H
 #define USER_MODULE_H
 
-#include "main/snort_debug.h"
-#include "main/snort_types.h"
-#include "main/thread.h"
 #include "framework/module.h"
-#include "stream/stream.h"
 
 struct SnortConfig;
 
index d4b3792f2dfb5f79a9c6d6fb6b2991f61f6519b0..362ad1c3b20316686003250bda0358105a536b47 100644 (file)
 //--------------------------------------------------------------------------
 // user_session.cc author Russ Combs <rucombs@cisco.com>
 
-#include "user_session.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
+#include "user_session.h"
+
 #include "main/snort.h"
-#include "perf_monitor/perf_monitor.h"
-#include "profiler/profiler.h"
-#include "sfip/sf_ip.h"
+#include "profiler/profiler_defs.h"
+#include "protocols/packet.h"
 #include "utils/util.h"
 
-#include "stream/stream.h"
-#include "stream/stream_splitter.h"
-#include "stream/paf.h"
-
 #include "stream_user.h"
 #include "user_module.h"
 
index c6300dca23ce0b8712401f99cbd41a6db31abb0c..1047da108da406a719ab3c7907f12f6266e4e889 100644 (file)
@@ -20,7 +20,6 @@
 #ifndef USER_SESSION_H
 #define USER_SESSION_H
 
-#include <assert.h>
 #include <list>
 
 #include "flow/session.h"
index 1f5f71309a7d95d5e3b7960edb556570d1214f0d..1b61240a7e7a5bedb882c9d9ada3a8f670f848c6 100644 (file)
 
 // sftarget_hostentry.c author Steven Sturges
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "sftarget_hostentry.h"
 
 #if 0
index 614b2ec77c485962493bd8fcff631e06d0532786..385ea9555a8ba1a72402b2f13a04e1b3e430a016 100644 (file)
@@ -23,7 +23,6 @@
 #define SFTARGET_HOSTENTRY_H
 
 #include "target_based/sftarget_reader.h"
-#include "target_based/sftarget_data.h"
 
 /* API for HostAttributeEntry 'class' */
 
index 4fbc7a2a1038f2162ba4c84e09a3b325f9bf1ed9..7297853ae78e77e5ba43ccdb90e3d498d426a7b0 100644 (file)
  * sftarget_reader.c
  */
 
-#include "sftarget_reader.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <assert.h>
-#include <stdio.h>
-#include <signal.h>
-#include <sys/types.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <unistd.h>
-#include <time.h>
-
-#include "snort_protocols.h"
-#include "sftarget_hostentry.h"
-#include "sftarget_data.h"
+#include "sftarget_reader.h"
 
-#include "hash/sfxhash.h"
 #include "log/messages.h"
 #include "main/snort_config.h"
 #include "main/snort_debug.h"
-#include "parser/parser.h"
 #include "protocols/packet.h"
+#include "sfrt/sfrt.h"
 #include "utils/stats.h"
 #include "utils/util.h"
-#include "utils/util_net.h"
-#include "sfip/sf_ip.h"
-#include "sfrt/sfrt.h"
 
 #define ATTRIBUTE_MAP_MAX_ROWS 1024
 
index f4991ece29fc367a5d0d50ab80e6b83b0e216487..a945227bb4f1308e0bd7de9b9999f855b45dcef8 100644 (file)
 
 // snort_protocols.cc derived from sftarget_protocol_reference.c by Steven Sturges
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "snort_protocols.h"
 
 #include <algorithm>
-#include <string>
-#include <vector>
 
 #include "hash/sfghash.h"
 #include "log/messages.h"
-#include "main/snort_config.h"
 #include "main/snort_debug.h"
-#include "stream/stream.h"
+#include "protocols/packet.h"
 #include "utils/util.h"
 
-#include "sftarget_reader.h"
-#include "sftarget_hostentry.h"
 #include "sftarget_data.h"
 
 using namespace std;
index 36ba3adb76eda56d0cd4c330cf4a72d8612f1cca..9a7fc4db10d99a58af2daed045835e2fa3e956d7 100644 (file)
@@ -25,7 +25,6 @@
 #include <string>
 #include <vector>
 
-#include "main/snort_config.h"
 #include "main/snort_types.h"
 
 // FIXIT-L use logical type instead of int16_t
index 01881f6e874f78dadfd9b55269344a3d529eeb4f..a217e352b7bf509d9c70d441bee6ba4f22f9f511 100644 (file)
 #ifndef CLOCK_DEFS_H
 #define CLOCK_DEFS_H
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 #ifdef USE_TSC_CLOCK
 #include "time/tsc_clock.h"
 using SnortClock = TscClock;
index bf89dde2e0a9b9bfe40386243fba4f4fc0033fa8..69d7d22af86a13c98d29537da3e284f8920025d0 100644 (file)
  * or use the packet time.  I choose the latter.
  */
 
-#include "time/packet_time.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "main/thread.h"
 
+#include "packet_time.h"
+
 static THREAD_LOCAL struct timeval s_recent_packet = { 0, 0 };
 static THREAD_LOCAL uint32_t s_first_packet = 0;
 
index 03df40d8a58580fdf849a6e3117ae7e2e111efc7..0d98939218254e5533f8111cdd1d0e6ffc8c22fc 100644 (file)
@@ -21,7 +21,6 @@
 #define PACKET_TIME_H
 
 #include <sys/time.h>
-#include <stdint.h>
 
 #include "main/snort_types.h"
 
index b2f9950ffde44ee9e4d892f8cb52d9a290b40616..dcc8dd8c884502a1f275031ae22a28e1340b564e 100644 (file)
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "periodic.h"
 
 #include <list>
index 2129aceb4a25bb96cc1d59e69ffb30029b3c530d..6e81d32392c05ba0bb4d54287aab33129b4b871f 100644 (file)
@@ -20,7 +20,7 @@
 #ifndef PERIODIC_H
 #define PERIODIC_H
 
-#include "main/snort_types.h"
+#include <cstdint>
 
 using PeriodicHook = void (*)(void*);
 
index a183d44734ca3c316624d5d52106e7b8b72bf467..eb50bffdd608f5cb86d1d5875f66a5079822c410 100644 (file)
 
 // stopwatch_test.cc author Joel Cornett <jocornet@cisco.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "catch/catch.hpp"
 #include "catch/unit_test.h"
 
index 150d0158e90fbe2be1d0c67cb9abc47a04a18a2d..f2d3cd0f9ccd5ea5b15176fffe071ba28195a234 100644 (file)
 //--------------------------------------------------------------------------
 // tsc_clock.cc author Russ Combs <rucombs@cisco.com>
 
-#include "tsc_clock.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <time.h>
+#include "tsc_clock.h"
+
+#include <ctime>
 
 long clock_scale()
 {
index e668423d70dc9dbf49c2bb13af828a46ab7c52ff..f7ca40c2fee29ba058705a8e8bf02c544c2c947f 100644 (file)
@@ -10,14 +10,12 @@ endif ( BUILD_SNPRINTF )
 set( UTIL_INCLUDES
     bitop.h
     cpp_macros.h
-    dnet_header.h
     kmap.h
     safec.h
     segment_mem.h
     sflsq.h
     sfmemcap.h
     sfsnprintfappend.h
-    snort_bounds.h
     stats.h
     util.h
     util_jsnorm.h
@@ -34,6 +32,7 @@ ADD_LIBRARY( utils STATIC
     ${SNPRINTF_SOURCES}
     boyer_moore.cc 
     boyer_moore.h
+    dnet_header.h
     dyn_array.cc
     dyn_array.h
     kmap.cc
@@ -41,6 +40,7 @@ ADD_LIBRARY( utils STATIC
     sflsq.cc 
     sfmemcap.cc 
     sfsnprintfappend.cc 
+    snort_bounds.h
     stats.cc
     util.cc
     util_jsnorm.cc 
index 91310aae3196106d691333e25a779701432a88ab..2ba151f62b2f90d515acf7e13c5996979c1a3a53 100644 (file)
@@ -6,14 +6,12 @@ x_includedir = $(pkgincludedir)/utils
 x_include_HEADERS = \
 bitop.h \
 cpp_macros.h \
-dnet_header.h \
 kmap.h  \
 safec.h \
 segment_mem.h \
 sflsq.h \
 sfmemcap.h \
 sfsnprintfappend.h \
-snort_bounds.h \
 stats.h \
 util.h \
 util_jsnorm.h \
@@ -22,6 +20,7 @@ util_utf.h
 
 libutils_a_SOURCES = \
 boyer_moore.cc boyer_moore.h \
+dnet_header.h \
 dyn_array.cc dyn_array.h \
 kmap.cc \
 segment_mem.cc \
index 2359f162f2051c8f3969b83b327bd1f461183db9..7dc0c9959cd977e683b64898148c93f9011cfaa1 100644 (file)
@@ -1,3 +1,7 @@
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "catch/catch.hpp"
 #include "catch/unit_test.h"
 
index ea44850815e58a98165efecb847300f45844287b..47d54efdf2f792936a3c45ccf4e2b97c2cc99e17 100644 (file)
  *  07/24/01    MFR    Fixed Regex pattern matcher introduced by Fyodor
  *
  **************************************************************************/
-#include "boyer_moore.h"
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-#include <sys/types.h>
+#include "boyer_moore.h"
 
-#include "main/snort_types.h"
 #include "main/snort_debug.h"
-#include "utils/util.h"
+
+#include "util.h"
 
 /****************************************************************
  *
index f2766ffdfe3264f799ad4987d1818d84dfc1a3e1..987d05136608df48c69ea74b8f734312b1095f31 100644 (file)
 
 // Provide the correct dnet interface
 
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
 #if defined(__clang__)
 #pragma clang diagnostic push
 #pragma clang diagnostic ignored "-Wc99-extensions"
index ebf1d83ebf0400b27247cb5e262e1838db5957df..9c1398de376d5cee5edf5f93802e128b3496f668 100644 (file)
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
-#include "dyn_array.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
+#include "dyn_array.h"
 
-#include "main/snort_debug.h"
-#include "sfrt/sfrt.h"
-#include "utils/util.h"
+#include "util.h"
 
 // number of additional policies allocated with each re-alloc operation
 #define POLICY_ALLOCATION_CHUNK 10
index 1e3ea539d6ed868fd9d2fd2763767145c2360938..50a7a3c16bc9a2c084acae4ab9b6750d46e5ce45 100644 (file)
 // kmap.cc author Marc Norton
 // a generic map library - maps key + data pairs
 
-#include "kmap.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <string>
+#include "kmap.h"
+
 #include <limits>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
+#include <string>
 
-#include "utils/util.h"
+#include "util.h"
 
 void keep_kmap_lib() { }
 
index 16c6729a90d90efa32f31c32881711b18d74831e..4b605ff23d17a868e93d1db3aa89550a96792740 100644 (file)
 #ifndef UTILS_SAFEC_H
 #define UTILS_SAFEC_H
 
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
 //FIXIT-M combine these macros in the build foo 
 #if defined(HAVE_SAFEC) && defined(ENABLE_SAFEC)
 
index 62374da63e76d4f0456f630151c696a1dda2d8f4..e4d49b10bbaacfdcb058be8ec54954ad0d2490a8 100644 (file)
 //--------------------------------------------------------------------------
 // 8/7/2011 - Initial implementation ... Hui Cao <hcao@sourcefire.com>
 
-#include "segment_mem.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
-#include <string.h>
-#include "main/snort_types.h"
 
-#ifndef SIZE_MAX
-#define SIZE_MAX 0xFFFFFFFF  // FIXIT-L use c++ value
-#endif
+#include "segment_mem.h"
+
+#include <cstring>
 
 /*point to the start of the unused memory*/
 static MEM_OFFSET unused_ptr = 0;
index cd7949f47875f89d2da9f83981b1a1123751941d..2389a6a2f64ee6726e8954e1de9c140d6d544020 100644 (file)
@@ -23,7 +23,8 @@
 
 // Segment memory allocation used by sfrt
 
-#include "main/snort_types.h"
+#include <cstddef>
+#include <cstdint>
 
 using MEM_OFFSET = uint32_t;
 
@@ -33,5 +34,6 @@ void segment_free(MEM_OFFSET ptr);
 MEM_OFFSET segment_snort_calloc(size_t num, size_t size);
 size_t segment_unusedmem();
 void* segment_basePtr();
+
 #endif
 
index e64c51630bd9f981527254fb27520eadfe700622..22908a0014c35156992a1934c18979b97fb5688e 100644 (file)
 *   multiple readers to traverse a list.
 */
 
-#include "sflsq.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
+#include "sflsq.h"
 
-#include "main/snort_types.h"
-#include "utils/util.h"
+#include "util.h"
 
 /*
 *  private alloc
index c5cfd7618e0b105eb3e544a09c7947b33ba3b1da..add7c4a4c49a41e5eeeb0db94545b9626e5322c9 100644 (file)
 
   Marc Norton
 */
-#include "sfmemcap.h"
 
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "sfmemcap.h"
 
 #include "util.h"
-#include "main/snort_types.h"
-#include "main/snort_debug.h"
 
 /*
 *   Set max # bytes & init other variables.
index e0c9f544647f90d6121f8bcc5b1225ca8b4ff019..b509d56899f34f151029a9b6b2b70af03fe6c20d 100644 (file)
 *
 *  Author: Steven Sturges
 */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "sfsnprintfappend.h"
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <unistd.h>
-#include <string.h>
+#include <cstdarg>
 
 #include "util.h"
 
index ab6da0c55187ef53dcd40026c0b64c93f0af5ed2..5422819e4caacff16ccc8c445f96eca6deeac7eb 100644 (file)
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
-#include "stats.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include "util.h"
+#include "stats.h"
+
+#include "file_api/file_stats.h"
+#include "filters/sfthreshold.h"
+#include "helpers/process.h"
 #include "log/messages.h"
 #include "main/snort_config.h"
-#include "helpers/process.h"
-#include "packet_io/sfdaq.h"
+#include "managers/module_manager.h"
 #include "packet_io/active.h"
+#include "packet_io/sfdaq.h"
 #include "packet_io/trough.h"
-#include "target_based/sftarget_reader.h"
-#include "managers/module_manager.h"
-#include "managers/codec_manager.h"
-#include "protocols/packet_manager.h"
-#include "detection/fp_create.h"
-#include "filters/sfthreshold.h"
 #include "profiler/profiler.h"
+#include "protocols/packet_manager.h"
 #include "time/timersub.h"
-#include "file_api/file_stats.h"
+
+#include "util.h"
 
 #define STATS_SEPARATOR \
     "--------------------------------------------------"
index 799c7a229667e02011a8af17ae7cc51f2bc1ce96..f9e16fe5efab4907e31c44502d87d88253e73a85 100644 (file)
 
 // Provides facilities for displaying Snort exit stats
 
-#include <sys/time.h>
-#include <sys/types.h>
-
-#include <stdlib.h>
-#include <errno.h>
-#include <unistd.h>
-#include <string.h>
 #include <vector>
 
-#include "main/thread.h"
-#include "main/snort_types.h"
 #include "framework/counts.h"
+#include "main/snort_types.h"
+#include "main/thread.h"
 
 using IndexVec = std::vector<unsigned>;
 
index f95770860137cb01f421d93e44b1dae2cc9c0c7f..a40898a97cfc67df2ebfa14df03ed56eb4c272ff 100644 (file)
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
-#include "util.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <fcntl.h>
+#include "util.h"
+
 #include <grp.h>
 #include <luajit.h>
 #include <netdb.h>
@@ -49,7 +48,6 @@ extern "C" {
 }
 
 #include <fstream>
-#include <sstream>
 
 #include "log/messages.h"
 #include "main/build.h"
index 52bb09b6e3cbfdbf43c100e389eac979143ada4f..07d029d8d0022720a8d51e0f77d60f778668a937 100644 (file)
 
 #define TIMEBUF_SIZE 26
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <errno.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
 #if defined(__linux__)
 #include <sys/syscall.h>
 #endif
+#include <unistd.h>
 
+#include <cerrno>
+#include <cstdlib>
+#include <cstring>
 #include <string>
 
 #include "main/snort_types.h"
index 11d32b8a9a841df9a9e66dfb7954f698eaa78cf4..2577f849478424f2afdc7e9cecf77251b6a9a67b 100644 (file)
 //--------------------------------------------------------------------------
 // Writen by Bhagyashree Bantwal <bbantwal@sourcefire.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "util_jsnorm.h"
 
-#include <stdlib.h>
-#include <string.h>
+#include <cstdlib>
+#include <cstring>
+
 #include "main/thread.h"
 
 #define INVALID_HEX_VAL -1
index de8885aa49dc3ffa1854c6da9cd2474b4ae0a72f..59ae943c7816c4f3ec2932cb81574e822e5620ec 100644 (file)
@@ -23,7 +23,6 @@
 
 // Javascript Normalization
 
-#include <stdint.h>
 #include "main/snort_types.h"
 
 #define ALERT_SPACES_EXCEEDED   0x1
index 815eabb111e7b35bdaa20954fe14974bec5be4e0..0298e6ea13e3f509311afaf515a73443581690ae 100644 (file)
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //--------------------------------------------------------------------------
 
-#include "util_net.h"
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <netinet/in.h>
-#include <stdio.h>
-#include <string.h>
+#include "util_net.h"
 
 #include "main/thread.h"
+#include "sfip/sf_ip.h"
+
 #include "util.h"
 
 /**
index 4556fcda242d497f0634cfe35b5a2e7847733a1a..d6a76818fec2e19d14ecb6638e8dd7c9b5579379 100644 (file)
@@ -26,7 +26,8 @@
 // Be aware that subsequent calls will overwrite the memory that is pointed to
 
 #include "main/snort_types.h"
-#include "sfip/sf_ip.h"
+
+struct SfIp;
 
 SO_PUBLIC char* inet_ntoax(const SfIp*);
 
index d8c1f5230c60cd36cb5df1350784b1222a7bfcd3..ad2d195151c4c652dd76bb91f6adfe41abbd1ffe 100644 (file)
 //--------------------------------------------------------------------------
 // Writen by Bhagyashree Bantwal <bbantwal@sourcefire.com>
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "util_unfold.h"
 
 /* Given a string, removes header folding (\r\n followed by linear whitespace)
index 0689924395e79b1c053aed6d468def3d230fda62..efd9e2dc1d062cc0654ce1b46505ffbbf6abd75c 100644 (file)
 
 /* Some UTF-{16,32}{le,be} normalization functions */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "util_utf.h"
 
-#include <stdlib.h>
-#include <string.h>
+#include <cstring>
 
 #define DSTATE_FIRST 0
 #define DSTATE_SECOND 1