From: Russ Combs (rucombs) Date: Thu, 29 Oct 2015 16:33:57 +0000 (-0400) Subject: Merge pull request #105 in SNORT/snort3 from nhttp24 to master X-Git-Tag: 3.0.0-233~761 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ac09a3a70239f4d07537c13adfdf6e1faf176f70;p=thirdparty%2Fsnort3.git Merge pull request #105 in SNORT/snort3 from nhttp24 to master Squashed commit of the following: commit 8540ae11d8ed7b88c5a01d4fe9a2604232475160 Author: Tom Peters Date: Thu Oct 29 12:27:46 2015 -0400 remaining test code inside REG_TEST --- diff --git a/src/service_inspectors/nhttp_inspect/nhttp_enum.h b/src/service_inspectors/nhttp_inspect/nhttp_enum.h index e05337b88..4496f90e2 100644 --- a/src/service_inspectors/nhttp_inspect/nhttp_enum.h +++ b/src/service_inspectors/nhttp_inspect/nhttp_enum.h @@ -28,7 +28,8 @@ static const int MAX_OCTETS = 65535; static const int DATA_BLOCK_SIZE = 16384; static const int FINAL_BLOCK_SIZE = 24576; static const int GZIP_BLOCK_SIZE = 2048; -static const int FINAL_GZIP_BLOCK_SIZE = 2304; +static const int FINAL_GZIP_BLOCK_SIZE = 2304; // compromise value, too big causes gzip overruns + // too small leaves too many little end sections static const uint32_t NHTTP_GID = 219; static const int GZIP_WINDOWBITS = 31; static const int DEFLATE_WINDOWBITS = 15; diff --git a/src/service_inspectors/nhttp_inspect/nhttp_field.cc b/src/service_inspectors/nhttp_inspect/nhttp_field.cc index d9cd5bd02..cdc9bab50 100644 --- a/src/service_inspectors/nhttp_inspect/nhttp_field.cc +++ b/src/service_inspectors/nhttp_inspect/nhttp_field.cc @@ -30,6 +30,7 @@ using namespace NHttpEnums; const Field Field::FIELD_NULL { STAT_NOSOURCE }; +#ifdef REG_TEST void Field::print(FILE* output, const char* name) const { if ((length == STAT_NOTPRESENT) || (length == STAT_NOTCOMPUTE) || (length == STAT_NOSOURCE)) @@ -62,4 +63,5 @@ void Field::print(FILE* output, const char* name) const } fprintf(output, "\n"); } +#endif diff --git a/src/service_inspectors/nhttp_inspect/nhttp_field.h b/src/service_inspectors/nhttp_inspect/nhttp_field.h index c18d24dc5..86650c6ef 100644 --- a/src/service_inspectors/nhttp_inspect/nhttp_field.h +++ b/src/service_inspectors/nhttp_inspect/nhttp_field.h @@ -40,7 +40,10 @@ public: Field(int32_t length_, const uint8_t* start_) : length(length_), start(start_) { } explicit Field(int32_t length_) : length(length_) { assert(length<=0); } Field() = default; + +#ifdef REG_TEST void print(FILE* output, const char* name) const; +#endif }; #endif diff --git a/src/service_inspectors/nhttp_inspect/nhttp_msg_body_chunk.cc b/src/service_inspectors/nhttp_inspect/nhttp_msg_body_chunk.cc index 6cd7ad7fe..c3e5293f4 100644 --- a/src/service_inspectors/nhttp_inspect/nhttp_msg_body_chunk.cc +++ b/src/service_inspectors/nhttp_inspect/nhttp_msg_body_chunk.cc @@ -28,14 +28,6 @@ using namespace NHttpEnums; -void NHttpMsgBodyChunk::print_section(FILE* output) -{ - NHttpMsgSection::print_message_title(output, "chunked body"); - fprintf(output, "Cumulative octets %" PRIi64 "\n", body_octets); - detect_data.print(output, "Detect data"); - NHttpMsgSection::print_message_wrapup(output); -} - void NHttpMsgBodyChunk::update_flow() { // Cutter deleted when zero-length chunk received @@ -59,3 +51,13 @@ void NHttpMsgBodyChunk::update_flow() session_data->section_type[source_id] = SEC__NOTCOMPUTE; } +#ifdef REG_TEST +void NHttpMsgBodyChunk::print_section(FILE* output) +{ + NHttpMsgSection::print_message_title(output, "chunked body"); + fprintf(output, "Cumulative octets %" PRIi64 "\n", body_octets); + detect_data.print(output, "Detect data"); + NHttpMsgSection::print_message_wrapup(output); +} +#endif + diff --git a/src/service_inspectors/nhttp_inspect/nhttp_msg_body_chunk.h b/src/service_inspectors/nhttp_inspect/nhttp_msg_body_chunk.h index 6acfd157e..d72098e15 100644 --- a/src/service_inspectors/nhttp_inspect/nhttp_msg_body_chunk.h +++ b/src/service_inspectors/nhttp_inspect/nhttp_msg_body_chunk.h @@ -32,8 +32,11 @@ public: NHttpMsgBodyChunk(const uint8_t* buffer, const uint16_t buf_size, NHttpFlowData* session_data_, NHttpEnums::SourceId source_id_, bool buf_owner, Flow* flow_, const NHttpParaList* params_) : NHttpMsgBody(buffer, buf_size, session_data_, source_id_, buf_owner, flow_, params_) {} - void print_section(FILE* output) override; void update_flow() override; + +#ifdef REG_TEST + void print_section(FILE* output) override; +#endif }; #endif diff --git a/src/service_inspectors/nhttp_inspect/nhttp_msg_body_cl.cc b/src/service_inspectors/nhttp_inspect/nhttp_msg_body_cl.cc index 9a46be1f2..434aaf177 100644 --- a/src/service_inspectors/nhttp_inspect/nhttp_msg_body_cl.cc +++ b/src/service_inspectors/nhttp_inspect/nhttp_msg_body_cl.cc @@ -32,15 +32,6 @@ using namespace NHttpEnums; -void NHttpMsgBodyCl::print_section(FILE* output) -{ - NHttpMsgSection::print_message_title(output, "Content-Length body"); - fprintf(output, "Content-Length %" PRIi64 ", octets seen %" PRIi64 "\n", data_length, - body_octets); - detect_data.print(output, "Detect data"); - NHttpMsgSection::print_message_wrapup(output); -} - void NHttpMsgBodyCl::update_flow() { if (session_data->cutter[source_id] != nullptr) @@ -61,3 +52,14 @@ void NHttpMsgBodyCl::update_flow() session_data->section_type[source_id] = SEC__NOTCOMPUTE; } +#ifdef REG_TEST +void NHttpMsgBodyCl::print_section(FILE* output) +{ + NHttpMsgSection::print_message_title(output, "Content-Length body"); + fprintf(output, "Content-Length %" PRIi64 ", octets seen %" PRIi64 "\n", data_length, + body_octets); + detect_data.print(output, "Detect data"); + NHttpMsgSection::print_message_wrapup(output); +} +#endif + diff --git a/src/service_inspectors/nhttp_inspect/nhttp_msg_body_cl.h b/src/service_inspectors/nhttp_inspect/nhttp_msg_body_cl.h index 1731cf973..25f7d9b13 100644 --- a/src/service_inspectors/nhttp_inspect/nhttp_msg_body_cl.h +++ b/src/service_inspectors/nhttp_inspect/nhttp_msg_body_cl.h @@ -35,9 +35,12 @@ public: NHttpEnums::SourceId source_id_, bool buf_owner, Flow* flow_, const NHttpParaList* params_) : NHttpMsgBody(buffer, buf_size, session_data_, source_id_, buf_owner, flow_, params_), data_length(session_data->data_length[source_id]) {} - void print_section(FILE* output) override; void update_flow() override; +#ifdef REG_TEST + void print_section(FILE* output) override; +#endif + protected: int64_t data_length; }; diff --git a/src/service_inspectors/nhttp_inspect/nhttp_msg_head_shared.cc b/src/service_inspectors/nhttp_inspect/nhttp_msg_head_shared.cc index c433f1779..cf8c7463b 100644 --- a/src/service_inspectors/nhttp_inspect/nhttp_msg_head_shared.cc +++ b/src/service_inspectors/nhttp_inspect/nhttp_msg_head_shared.cc @@ -227,6 +227,7 @@ const Field& NHttpMsgHeadShared::get_header_value_norm(HeaderId header_id) return node->norm; } +#ifdef REG_TEST void NHttpMsgHeadShared::print_headers(FILE* output) { char title_buf[100]; @@ -246,4 +247,5 @@ void NHttpMsgHeadShared::print_headers(FILE* output) } } } +#endif diff --git a/src/service_inspectors/nhttp_inspect/nhttp_msg_head_shared.h b/src/service_inspectors/nhttp_inspect/nhttp_msg_head_shared.h index 3f6e96ff8..5a74afaf5 100644 --- a/src/service_inspectors/nhttp_inspect/nhttp_msg_head_shared.h +++ b/src/service_inspectors/nhttp_inspect/nhttp_msg_head_shared.h @@ -74,8 +74,6 @@ protected: void parse_header_lines(); void derive_header_name_id(int index); - void print_headers(FILE* output); - // All of these are indexed by the relative position of the header field in the message static const int MAX_HEADERS = 200; // I'm an arbitrary number. FIXIT-L static const int MAX_HEADER_LENGTH = 4096; // Based on max cookie size of some browsers @@ -85,6 +83,10 @@ protected: NHttpEnums::HeaderId* header_name_id = nullptr; Field* header_value = nullptr; +#ifdef REG_TEST + void print_headers(FILE* output); +#endif + private: static const int MAX = NHttpEnums::HEAD__MAX_VALUE; std::bitset headers_present = 0; diff --git a/src/service_inspectors/nhttp_inspect/nhttp_msg_header.cc b/src/service_inspectors/nhttp_inspect/nhttp_msg_header.cc index f5ede1f7f..f1e575378 100644 --- a/src/service_inspectors/nhttp_inspect/nhttp_msg_header.cc +++ b/src/service_inspectors/nhttp_inspect/nhttp_msg_header.cc @@ -39,13 +39,6 @@ NHttpMsgHeader::NHttpMsgHeader(const uint8_t* buffer, const uint16_t buf_size, transaction->set_header(this, source_id); } -void NHttpMsgHeader::print_section(FILE* output) -{ - NHttpMsgSection::print_message_title(output, "header"); - NHttpMsgHeadShared::print_headers(output); - NHttpMsgSection::print_message_wrapup(output); -} - void NHttpMsgHeader::update_flow() { session_data->section_type[source_id] = SEC__NOTCOMPUTE; @@ -198,3 +191,12 @@ void NHttpMsgHeader::setup_decompression() } } +#ifdef REG_TEST +void NHttpMsgHeader::print_section(FILE* output) +{ + NHttpMsgSection::print_message_title(output, "header"); + NHttpMsgHeadShared::print_headers(output); + NHttpMsgSection::print_message_wrapup(output); +} +#endif + diff --git a/src/service_inspectors/nhttp_inspect/nhttp_msg_header.h b/src/service_inspectors/nhttp_inspect/nhttp_msg_header.h index f7ac295b7..c559d0446 100644 --- a/src/service_inspectors/nhttp_inspect/nhttp_msg_header.h +++ b/src/service_inspectors/nhttp_inspect/nhttp_msg_header.h @@ -35,7 +35,6 @@ public: NHttpMsgHeader(const uint8_t* buffer, const uint16_t buf_size, NHttpFlowData* session_data_, NHttpEnums::SourceId source_id_, bool buf_owner, Flow* flow_, const NHttpParaList* params_); - void print_section(FILE* output) override; void update_flow() override; private: // Dummy configurations to support MIME processing @@ -45,6 +44,10 @@ private: void prepare_body(); void setup_file_processing(); void setup_decompression(); + +#ifdef REG_TEST + void print_section(FILE* output) override; +#endif }; #endif diff --git a/src/service_inspectors/nhttp_inspect/nhttp_msg_request.cc b/src/service_inspectors/nhttp_inspect/nhttp_msg_request.cc index 2f58975c9..769939ed2 100644 --- a/src/service_inspectors/nhttp_inspect/nhttp_msg_request.cc +++ b/src/service_inspectors/nhttp_inspect/nhttp_msg_request.cc @@ -145,6 +145,27 @@ void NHttpMsgRequest::gen_events() events.create_event(EVENT_UNKNOWN_METHOD); } +void NHttpMsgRequest::update_flow() +{ + // The following logic to determine body type is by no means the last word on this topic. + if (infractions & INF_BAD_REQ_LINE) + { + session_data->type_expected[source_id] = SEC_ABORT; + session_data->half_reset(source_id); + } + else + { + session_data->type_expected[source_id] = SEC_HEADER; + session_data->version_id[source_id] = version_id; + session_data->method_id = method_id; + session_data->infractions[source_id].reset(); + session_data->events[source_id].reset(); + } + session_data->section_type[source_id] = SEC__NOTCOMPUTE; +} + +#ifdef REG_TEST + void NHttpMsgRequest::print_section(FILE* output) { NHttpMsgSection::print_message_title(output, "request line"); @@ -174,22 +195,5 @@ void NHttpMsgRequest::print_section(FILE* output) NHttpMsgSection::print_message_wrapup(output); } -void NHttpMsgRequest::update_flow() -{ - // The following logic to determine body type is by no means the last word on this topic. - if (infractions & INF_BAD_REQ_LINE) - { - session_data->type_expected[source_id] = SEC_ABORT; - session_data->half_reset(source_id); - } - else - { - session_data->type_expected[source_id] = SEC_HEADER; - session_data->version_id[source_id] = version_id; - session_data->method_id = method_id; - session_data->infractions[source_id].reset(); - session_data->events[source_id].reset(); - } - session_data->section_type[source_id] = SEC__NOTCOMPUTE; -} +#endif diff --git a/src/service_inspectors/nhttp_inspect/nhttp_msg_request.h b/src/service_inspectors/nhttp_inspect/nhttp_msg_request.h index 34244c0a0..ccc310285 100644 --- a/src/service_inspectors/nhttp_inspect/nhttp_msg_request.h +++ b/src/service_inspectors/nhttp_inspect/nhttp_msg_request.h @@ -37,13 +37,16 @@ public: NHttpEnums::SourceId source_id_, bool buf_owner, Flow* flow_, const NHttpParaList* params_); ~NHttpMsgRequest() { delete uri; } - void print_section(FILE* output) override; void gen_events() override; void update_flow() override; const Field& get_method() { return method; } const Field& get_uri(); const Field& get_uri_norm_legacy(); +#ifdef REG_TEST + void print_section(FILE* output) override; +#endif + private: static const StrCode method_list[]; diff --git a/src/service_inspectors/nhttp_inspect/nhttp_msg_section.cc b/src/service_inspectors/nhttp_inspect/nhttp_msg_section.cc index 972a87168..e71d4c26c 100644 --- a/src/service_inspectors/nhttp_inspect/nhttp_msg_section.cc +++ b/src/service_inspectors/nhttp_inspect/nhttp_msg_section.cc @@ -52,29 +52,6 @@ NHttpMsgSection::NHttpMsgSection(const uint8_t* buffer, const uint16_t buf_size, delete_msg_on_destruct(buf_owner) { } -void NHttpMsgSection::print_message_title(FILE* output, const char* title) const -{ - fprintf(output, "HTTP message %s:\n", title); - msg_text.print(output, "Input"); -} - -void NHttpMsgSection::print_message_wrapup(FILE* output) -{ - fprintf(output, "Infractions: %016" PRIx64 " %016" PRIx64 ", Events: %016" PRIx64 " %016" PRIx64 ", TCP Close: %s\n", - infractions.get_raw2(), infractions.get_raw(), events.get_raw2(), events.get_raw(), tcp_close ? "True" : "False"); - for (unsigned k=1; k < HTTP_BUFFER_MAX; k++) - { - get_legacy(k).print(output, http_buffer_name[k]); - } - if (g_file_data.len > 0) - { - Field(g_file_data.len, g_file_data.data).print(output, "file_data"); - } - fprintf(output, "\n"); - session_data->show(output); - fprintf(output, "\n"); -} - void NHttpMsgSection::update_depth() const { const int64_t& depth = (session_data->file_depth_remaining[source_id] >= @@ -165,3 +142,30 @@ const Field& NHttpMsgSection::get_legacy(unsigned buffer_id) } } +#ifdef REG_TEST + +void NHttpMsgSection::print_message_title(FILE* output, const char* title) const +{ + fprintf(output, "HTTP message %s:\n", title); + msg_text.print(output, "Input"); +} + +void NHttpMsgSection::print_message_wrapup(FILE* output) +{ + fprintf(output, "Infractions: %016" PRIx64 " %016" PRIx64 ", Events: %016" PRIx64 " %016" PRIx64 ", TCP Close: %s\n", + infractions.get_raw2(), infractions.get_raw(), events.get_raw2(), events.get_raw(), tcp_close ? "True" : "False"); + for (unsigned k=1; k < HTTP_BUFFER_MAX; k++) + { + get_legacy(k).print(output, http_buffer_name[k]); + } + if (g_file_data.len > 0) + { + Field(g_file_data.len, g_file_data.data).print(output, "file_data"); + } + fprintf(output, "\n"); + session_data->show(output); + fprintf(output, "\n"); +} + +#endif + diff --git a/src/service_inspectors/nhttp_inspect/nhttp_msg_section.h b/src/service_inspectors/nhttp_inspect/nhttp_msg_section.h index 8672e0dd3..61ee79281 100644 --- a/src/service_inspectors/nhttp_inspect/nhttp_msg_section.h +++ b/src/service_inspectors/nhttp_inspect/nhttp_msg_section.h @@ -52,19 +52,16 @@ public: NHttpEnums::MethodId get_method_id() const { return method_id; } +#ifdef REG_TEST // Test tool prints all derived message parts virtual void print_section(FILE* output) = 0; +#endif protected: NHttpMsgSection(const uint8_t* buffer, const uint16_t buf_size, NHttpFlowData* session_data_, NHttpEnums::SourceId source_id_, bool buf_owner, Flow* flow_, const NHttpParaList* params_); - // Convenience methods - void print_message_title(FILE* output, const char* title) const; - void print_message_wrapup(FILE* output); - void update_depth() const; - const Field msg_text; NHttpFlowData* const session_data; @@ -81,6 +78,13 @@ protected: NHttpEnums::MethodId method_id; int32_t status_code_num; + // Convenience methods + void update_depth() const; +#ifdef REG_TEST + void print_message_title(FILE* output, const char* title) const; + void print_message_wrapup(FILE* output); +#endif + private: const bool delete_msg_on_destruct; }; diff --git a/src/service_inspectors/nhttp_inspect/nhttp_msg_status.cc b/src/service_inspectors/nhttp_inspect/nhttp_msg_status.cc index b1b95d365..d147ec06f 100644 --- a/src/service_inspectors/nhttp_inspect/nhttp_msg_status.cc +++ b/src/service_inspectors/nhttp_inspect/nhttp_msg_status.cc @@ -144,15 +144,6 @@ void NHttpMsgStatus::gen_events() } } -void NHttpMsgStatus::print_section(FILE* output) -{ - NHttpMsgSection::print_message_title(output, "status line"); - fprintf(output, "Version Id: %d\n", version_id); - fprintf(output, "Status Code Num: %d\n", status_code_num); - reason_phrase.print(output, "Reason Phrase"); - NHttpMsgSection::print_message_wrapup(output); -} - void NHttpMsgStatus::update_flow() { // The following logic to determine body type is by no means the last word on this topic. @@ -172,3 +163,14 @@ void NHttpMsgStatus::update_flow() session_data->section_type[source_id] = SEC__NOTCOMPUTE; } +#ifdef REG_TEST +void NHttpMsgStatus::print_section(FILE* output) +{ + NHttpMsgSection::print_message_title(output, "status line"); + fprintf(output, "Version Id: %d\n", version_id); + fprintf(output, "Status Code Num: %d\n", status_code_num); + reason_phrase.print(output, "Reason Phrase"); + NHttpMsgSection::print_message_wrapup(output); +} +#endif + diff --git a/src/service_inspectors/nhttp_inspect/nhttp_msg_status.h b/src/service_inspectors/nhttp_inspect/nhttp_msg_status.h index 71c8ef42c..b1c24b342 100644 --- a/src/service_inspectors/nhttp_inspect/nhttp_msg_status.h +++ b/src/service_inspectors/nhttp_inspect/nhttp_msg_status.h @@ -33,13 +33,16 @@ public: NHttpMsgStatus(const uint8_t* buffer, const uint16_t buf_size, NHttpFlowData* session_data_, NHttpEnums::SourceId source_id_, bool buf_owner, Flow* flow_, const NHttpParaList* params_); - void print_section(FILE* output) override; void gen_events() override; void update_flow() override; const Field& get_status_code() { return status_code; } const Field& get_reason_phrase() { return reason_phrase; } +#ifdef REG_TEST + void print_section(FILE* output) override; +#endif + private: void parse_start_line() override; void derive_status_code_num(); diff --git a/src/service_inspectors/nhttp_inspect/nhttp_msg_trailer.cc b/src/service_inspectors/nhttp_inspect/nhttp_msg_trailer.cc index 8ba4ed5c2..9f8517970 100644 --- a/src/service_inspectors/nhttp_inspect/nhttp_msg_trailer.cc +++ b/src/service_inspectors/nhttp_inspect/nhttp_msg_trailer.cc @@ -36,13 +36,6 @@ NHttpMsgTrailer::NHttpMsgTrailer(const uint8_t* buffer, const uint16_t buf_size, transaction->set_trailer(this, source_id); } -void NHttpMsgTrailer::print_section(FILE* output) -{ - NHttpMsgSection::print_message_title(output, "trailer"); - NHttpMsgHeadShared::print_headers(output); - NHttpMsgSection::print_message_wrapup(output); -} - void NHttpMsgTrailer::update_flow() { session_data->type_expected[source_id] = @@ -51,3 +44,12 @@ void NHttpMsgTrailer::update_flow() session_data->section_type[source_id] = SEC__NOTCOMPUTE; } +#ifdef REG_TEST +void NHttpMsgTrailer::print_section(FILE* output) +{ + NHttpMsgSection::print_message_title(output, "trailer"); + NHttpMsgHeadShared::print_headers(output); + NHttpMsgSection::print_message_wrapup(output); +} +#endif + diff --git a/src/service_inspectors/nhttp_inspect/nhttp_msg_trailer.h b/src/service_inspectors/nhttp_inspect/nhttp_msg_trailer.h index ce9137da5..71d26f4e7 100644 --- a/src/service_inspectors/nhttp_inspect/nhttp_msg_trailer.h +++ b/src/service_inspectors/nhttp_inspect/nhttp_msg_trailer.h @@ -32,8 +32,11 @@ public: NHttpMsgTrailer(const uint8_t* buffer, const uint16_t buf_size, NHttpFlowData* session_data_, NHttpEnums::SourceId source_id_, bool buf_owner, Flow* flow_, const NHttpParaList* params_); - void print_section(FILE* output) override; void update_flow() override; + +#ifdef REG_TEST + void print_section(FILE* output) override; +#endif }; #endif diff --git a/src/service_inspectors/nhttp_inspect/nhttp_test_input.cc b/src/service_inspectors/nhttp_inspect/nhttp_test_input.cc index 160fb661a..376c162fe 100644 --- a/src/service_inspectors/nhttp_inspect/nhttp_test_input.cc +++ b/src/service_inspectors/nhttp_inspect/nhttp_test_input.cc @@ -17,6 +17,8 @@ //-------------------------------------------------------------------------- // nhttp_test_input.cc author Tom Peters +#ifdef REG_TEST + #include #include @@ -403,4 +405,5 @@ void NHttpTestInput::reassemble(uint8_t** buffer, unsigned& length, SourceId sou just_flushed = true; flushed = false; } +#endif diff --git a/src/service_inspectors/nhttp_inspect/nhttp_test_input.h b/src/service_inspectors/nhttp_inspect/nhttp_test_input.h index ce9ff4d1a..d8405e83d 100644 --- a/src/service_inspectors/nhttp_inspect/nhttp_test_input.h +++ b/src/service_inspectors/nhttp_inspect/nhttp_test_input.h @@ -20,6 +20,8 @@ #ifndef NHTTP_TEST_INPUT_H #define NHTTP_TEST_INPUT_H +#ifdef REG_TEST + #include #include "nhttp_enum.h" @@ -76,4 +78,5 @@ private: }; #endif +#endif diff --git a/src/service_inspectors/nhttp_inspect/nhttp_test_manager.cc b/src/service_inspectors/nhttp_inspect/nhttp_test_manager.cc index 50b4624ce..8884cca11 100644 --- a/src/service_inspectors/nhttp_inspect/nhttp_test_manager.cc +++ b/src/service_inspectors/nhttp_inspect/nhttp_test_manager.cc @@ -17,6 +17,8 @@ //-------------------------------------------------------------------------- // nhttp_test_manager.cc author Tom Peters +#ifdef REG_TEST + #include #include "nhttp_test_manager.h" @@ -54,3 +56,5 @@ void NHttpTestManager::activate_test_input() } } +#endif + diff --git a/src/service_inspectors/nhttp_inspect/nhttp_test_manager.h b/src/service_inspectors/nhttp_inspect/nhttp_test_manager.h index 3019f974b..862adb005 100644 --- a/src/service_inspectors/nhttp_inspect/nhttp_test_manager.h +++ b/src/service_inspectors/nhttp_inspect/nhttp_test_manager.h @@ -20,6 +20,8 @@ #ifndef NHTTP_TEST_MANAGER_H #define NHTTP_TEST_MANAGER_H +#ifdef REG_TEST + #include #include @@ -58,4 +60,5 @@ private: }; #endif +#endif