From: Russ Combs Date: Tue, 10 Jun 2014 19:19:24 +0000 (-0400) Subject: fix includes to work with dynamic examples X-Git-Tag: 3.0.0-233~1498 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e6a0e765f6ecf06b40199a8eb4c6751d63fe3bcd;p=thirdparty%2Fsnort3.git fix includes to work with dynamic examples --- diff --git a/src/codecs/Makefile.am b/src/codecs/Makefile.am index d2f0d0704..22b9252b0 100644 --- a/src/codecs/Makefile.am +++ b/src/codecs/Makefile.am @@ -1,15 +1,19 @@ AUTOMAKE_OPTIONS=foreign no-dependencies +x_includedir = $(pkgincludedir)/codecs + noinst_LIBRARIES = libcodecs.a noinst_LIBRARIES += libcodec_utils.a +x_include_HEADERS = \ +layer.h \ +sf_protocols.h + libcodecs_a_SOURCES = \ codec_api.cc \ codec_api.h \ decode.h \ -decode_module.h \ -layer.h \ -sf_protocols.h +decode_module.h libcodec_utils_a_SOURCES = \ codec_events.cc \ @@ -19,7 +23,6 @@ ipv6_util.cc \ checksum.h \ checksum.cc - SUBDIRS = \ ip \ link \ diff --git a/src/codecs/layer.h b/src/codecs/layer.h index 0b86f4228..2520647bb 100644 --- a/src/codecs/layer.h +++ b/src/codecs/layer.h @@ -23,13 +23,13 @@ #include "codecs/sf_protocols.h" - -struct Layer { +struct Layer +{ uint16_t prot_id; PROTO_ID proto; uint16_t length; uint8_t* start; }; - #endif + diff --git a/src/detection/rules.h b/src/detection/rules.h index aafa2e90c..52d37b9fc 100644 --- a/src/detection/rules.h +++ b/src/detection/rules.h @@ -26,7 +26,7 @@ #include "config.h" #endif -#include "snort_types.h" +#include "main/snort_types.h" #include "actions/actions.h" #define EXCEPT_SRC_IP 0x0001 diff --git a/src/detection/signature.h b/src/detection/signature.h index 3bb0f8ae0..2170b1758 100644 --- a/src/detection/signature.h +++ b/src/detection/signature.h @@ -29,7 +29,7 @@ #include #include "hash/sfghash.h" -#include "snort_types.h" +#include "main/snort_types.h" struct SnortConfig; struct OptTreeNode; diff --git a/src/detection/treenodes.h b/src/detection/treenodes.h index 2c02ecc56..21de6849d 100644 --- a/src/detection/treenodes.h +++ b/src/detection/treenodes.h @@ -22,7 +22,7 @@ #ifndef TREENODES_H #define TREENODES_H -#include "snort_types.h" +#include "main/snort_types.h" #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/src/events/event.h b/src/events/event.h index 5e13608c4..52dcc3a53 100644 --- a/src/events/event.h +++ b/src/events/event.h @@ -29,7 +29,7 @@ #include "config.h" #endif -#include "snort_types.h" +#include "main/snort_types.h" #include "main/thread.h" extern THREAD_LOCAL uint16_t event_id; diff --git a/src/events/event_queue.h b/src/events/event_queue.h index 9a21d2704..a97a23878 100644 --- a/src/events/event_queue.h +++ b/src/events/event_queue.h @@ -23,7 +23,7 @@ #ifndef EVENT_QUEUE_H #define EVENT_QUEUE_H -#include "snort_types.h" +#include "main/snort_types.h" #include "actions/actions.h" #define SNORT_EVENTQ_PRIORITY 1 diff --git a/src/flow/flow_key.h b/src/flow/flow_key.h index 9864ade88..2ec43ffb7 100644 --- a/src/flow/flow_key.h +++ b/src/flow/flow_key.h @@ -23,7 +23,7 @@ #ifndef FLOW_KEY_H #define FLOW_KEY_H -#include "snort_types.h" +#include "main/snort_types.h" #include "hash/sfhashfcn.h" #include "sfip/ipv6_port.h" diff --git a/src/framework/codec.h b/src/framework/codec.h index 80aa55a66..aa852348e 100644 --- a/src/framework/codec.h +++ b/src/framework/codec.h @@ -22,9 +22,9 @@ #include -#include "snort_types.h" +#include "main/snort_types.h" #include "framework/base_api.h" -#include "packet.h" +#include "protocols/packet.h" // REMOVE WHEN POSSIBLE!!! diff --git a/src/framework/inspector.h b/src/framework/inspector.h index 3e494309d..823e2aa58 100644 --- a/src/framework/inspector.h +++ b/src/framework/inspector.h @@ -21,7 +21,7 @@ #ifndef INSPECTOR_H #define INSPECTOR_H -#include "snort_types.h" +#include "main/snort_types.h" #include "main/thread.h" #include "framework/base_api.h" diff --git a/src/framework/ips_option.h b/src/framework/ips_option.h index 699d4ad34..d02ec2be3 100644 --- a/src/framework/ips_option.h +++ b/src/framework/ips_option.h @@ -21,7 +21,7 @@ #ifndef IPS_OPTION_H #define IPS_OPTION_H -#include "snort_types.h" +#include "main/snort_types.h" #include "framework/base_api.h" #include "detection/rule_option_types.h" diff --git a/src/framework/logger.h b/src/framework/logger.h index e188d6b97..cfab01462 100644 --- a/src/framework/logger.h +++ b/src/framework/logger.h @@ -25,7 +25,7 @@ # include "config.h" #endif -#include "snort_types.h" +#include "main/snort_types.h" #include "events/event.h" #include "framework/base_api.h" diff --git a/src/framework/mpse.h b/src/framework/mpse.h index 3ab7b6755..e30c80dd2 100644 --- a/src/framework/mpse.h +++ b/src/framework/mpse.h @@ -27,7 +27,7 @@ #include "config.h" #endif -#include "snort_types.h" +#include "main/snort_types.h" #include "main/thread.h" #include "framework/base_api.h" #include "time/profiler.h" diff --git a/src/framework/so_rule.h b/src/framework/so_rule.h index d169ce6d1..ee7b8eb6d 100644 --- a/src/framework/so_rule.h +++ b/src/framework/so_rule.h @@ -21,7 +21,7 @@ #ifndef SO_RULE_H #define SO_RULE_H -#include "snort_types.h" +#include "main/snort_types.h" #include "framework/base_api.h" #include "framework/ips_option.h" diff --git a/src/framework/value.h b/src/framework/value.h index 0fa9c5ae9..ddc27e80a 100644 --- a/src/framework/value.h +++ b/src/framework/value.h @@ -26,8 +26,8 @@ #include #include -#include "bits.h" -#include "parameter.h" +#include "framework/bits.h" +#include "framework/parameter.h" #include "sfip/sfip_t.h" class Value diff --git a/src/hash/sfhashfcn.h b/src/hash/sfhashfcn.h index 1425d18fd..449dd2a57 100644 --- a/src/hash/sfhashfcn.h +++ b/src/hash/sfhashfcn.h @@ -28,7 +28,7 @@ #include #include -#include "snort_types.h" +#include "main/snort_types.h" #define rot(x,k) (((x)<<(k)) | ((x)>>(32-(k)))) diff --git a/src/log/messages.h b/src/log/messages.h index 3280fb769..90b7d0b1c 100644 --- a/src/log/messages.h +++ b/src/log/messages.h @@ -26,7 +26,7 @@ # include "config.h" #endif -#include "snort_types.h" +#include "main/snort_types.h" #include "sfip/sf_ipvar.h" #include "sfip/ipv6_port.h" diff --git a/src/protocols/Makefile.am b/src/protocols/Makefile.am index 08c8f72de..fafca5d7e 100644 --- a/src/protocols/Makefile.am +++ b/src/protocols/Makefile.am @@ -3,12 +3,8 @@ AUTOMAKE_OPTIONS=foreign no-dependencies x_includedir = $(pkgincludedir)/protocols x_include_HEADERS = \ -packet.h - -EXTRA_DIST = \ arp.h \ decode.h \ -encode.h \ eth.h \ gre.h \ icmp4.h \ @@ -16,6 +12,7 @@ icmp6.h \ ipv4.h \ ipv6.h \ mpls.h \ +packet.h \ protocol_ids.h \ tcp.h \ teredo.h \ diff --git a/src/protocols/icmp4.h b/src/protocols/icmp4.h index 017ec3771..171afcb90 100644 --- a/src/protocols/icmp4.h +++ b/src/protocols/icmp4.h @@ -23,7 +23,7 @@ #define ICMP4_H #include -#include "snort_types.h" +#include "main/snort_types.h" #include "protocols/ipv4.h" namespace icmp4 diff --git a/src/protocols/packet.h b/src/protocols/packet.h index 0d45603b9..b18fe1b8e 100644 --- a/src/protocols/packet.h +++ b/src/protocols/packet.h @@ -46,7 +46,7 @@ extern "C" { #include } -#include "snort_types.h" +#include "main/snort_types.h" #include "sfip/ipv6_port.h" #include "sfip/sf_ip.h" #include "sfip/sf_iph.h" diff --git a/src/search_engines/pat_stats.h b/src/search_engines/pat_stats.h index d5ce2d277..4a3a9ace8 100644 --- a/src/search_engines/pat_stats.h +++ b/src/search_engines/pat_stats.h @@ -21,7 +21,7 @@ #ifndef PAT_STATS_H #define PAT_STATS_H -#include "snort_types.h" +#include "main/snort_types.h" #include "main/thread.h" #include "utils/stats.h" diff --git a/src/sfip/sf_ip.h b/src/sfip/sf_ip.h index 500e20a6d..887556bb2 100644 --- a/src/sfip/sf_ip.h +++ b/src/sfip/sf_ip.h @@ -40,7 +40,7 @@ #include #include "sfip/sfip_t.h" -#include "snort_debug.h" +#include "main/snort_debug.h" /* define SFIP_ROBUST to check pointers passed into the sfip libs. * Robustification should not be enabled if the client code is trustworthy. diff --git a/src/sfrt/sfrt.h b/src/sfrt/sfrt.h index a269d8240..3bc4ba1b8 100644 --- a/src/sfrt/sfrt.h +++ b/src/sfrt/sfrt.h @@ -103,7 +103,7 @@ #include #include -#include "snort_debug.h" +#include "main/snort_debug.h" #include "sfrt/sfrt_trie.h" #include "sfip/ipv6_port.h" diff --git a/src/stream/stream_splitter.h b/src/stream/stream_splitter.h index 44ebaf083..ec58c2b9e 100644 --- a/src/stream/stream_splitter.h +++ b/src/stream/stream_splitter.h @@ -22,7 +22,7 @@ #ifndef TCP_SPLITTER_H #define TCP_SPLITTER_H -#include "snort_types.h" +#include "main/snort_types.h" #include "main/thread.h" class Flow; diff --git a/src/utils/bitop_funcs.h b/src/utils/bitop_funcs.h index 19677e21c..a8a993c43 100644 --- a/src/utils/bitop_funcs.h +++ b/src/utils/bitop_funcs.h @@ -41,7 +41,7 @@ #include "config.h" #endif -#include "snort_debug.h" +#include "main/snort_debug.h" #include "utils/bitop.h" /* diff --git a/src/utils/segment_mem.h b/src/utils/segment_mem.h index bf0166f6e..0c4ee8b2f 100644 --- a/src/utils/segment_mem.h +++ b/src/utils/segment_mem.h @@ -25,7 +25,7 @@ #define SEGMENT_MEM_H #include -#include "snort_types.h" +#include "main/snort_types.h" typedef uint32_t MEM_OFFSET; diff --git a/src/utils/stats.h b/src/utils/stats.h index 1ac41ef02..69aa6f6c8 100644 --- a/src/utils/stats.h +++ b/src/utils/stats.h @@ -33,7 +33,7 @@ #include #include -#include "snort_types.h" +#include "main/snort_types.h" #include "main/thread.h" #include "sfip/sf_ipvar.h" #include "sfip/ipv6_port.h"