From: Philippe Antoine Date: Sun, 19 Jan 2025 20:20:45 +0000 (+0100) Subject: http: include htp-libhtp.h from header X-Git-Tag: suricata-8.0.0-beta1~533 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9a8e377a7aee8d66ffb127aae9429c4845936a7e;p=thirdparty%2Fsuricata.git http: include htp-libhtp.h from header Instead of C files requiring it. In preparation of libhtp rust, to minimize the final commit. --- diff --git a/src/app-layer-htp-file.c b/src/app-layer-htp-file.c index d191ff0443..03f9a40581 100644 --- a/src/app-layer-htp-file.c +++ b/src/app-layer-htp-file.c @@ -26,7 +26,6 @@ #include "suricata-common.h" #include "app-layer-htp-file.h" -#include "app-layer-htp-libhtp.h" #include "app-layer-htp-range.h" #include "app-layer-events.h" #include "util-validate.h" diff --git a/src/app-layer-htp-xff.c b/src/app-layer-htp-xff.c index b823f89905..4c0265212a 100644 --- a/src/app-layer-htp-xff.c +++ b/src/app-layer-htp-xff.c @@ -27,7 +27,6 @@ #include "app-layer-parser.h" #include "app-layer-htp.h" -#include "app-layer-htp-libhtp.h" #include "app-layer-htp-xff.h" #ifndef HAVE_MEMRCHR diff --git a/src/app-layer-htp.h b/src/app-layer-htp.h index 55ff9c9b9f..0400818149 100644 --- a/src/app-layer-htp.h +++ b/src/app-layer-htp.h @@ -37,6 +37,10 @@ #include "app-layer-frames.h" #include +// Temporary include directly app-layer-htp-libhtp.h +// This helps libhtp.rs transition by making small steps +// app-layer-htp-libhtp.h will be removed with libhtp.rs final merge +#include "app-layer-htp-libhtp.h" /* default request body limit */ #define HTP_CONFIG_DEFAULT_REQUEST_BODY_LIMIT 4096U diff --git a/src/app-layer-http2.c b/src/app-layer-http2.c index f5e148008e..1a12fd1582 100644 --- a/src/app-layer-http2.c +++ b/src/app-layer-http2.c @@ -33,7 +33,6 @@ #include "app-layer-parser.h" #include "app-layer-htp.h" -#include "app-layer-htp-libhtp.h" #include "app-layer-http2.h" #include "rust.h" diff --git a/src/detect-file-data.c b/src/detect-file-data.c index 2281dafb6c..17df5d83e6 100644 --- a/src/detect-file-data.c +++ b/src/detect-file-data.c @@ -40,7 +40,6 @@ #include "app-layer.h" #include "app-layer-parser.h" #include "app-layer-htp.h" -#include "app-layer-htp-libhtp.h" #include "app-layer-smtp.h" #include "flow.h" diff --git a/src/detect-http-client-body.c b/src/detect-http-client-body.c index 798a29ab66..2c75a33552 100644 --- a/src/detect-http-client-body.c +++ b/src/detect-http-client-body.c @@ -58,7 +58,6 @@ #include "app-layer.h" #include "app-layer-parser.h" #include "app-layer-htp.h" -#include "app-layer-htp-libhtp.h" #include "detect-http-client-body.h" #include "stream-tcp.h" #include "util-profiling.h" diff --git a/src/detect-http-cookie.c b/src/detect-http-cookie.c index a3c0db88fa..f390ce8284 100644 --- a/src/detect-http-cookie.c +++ b/src/detect-http-cookie.c @@ -57,7 +57,6 @@ #include "app-layer-parser.h" #include "app-layer-htp.h" -#include "app-layer-htp-libhtp.h" #include "detect-http-cookie.h" #include "stream-tcp.h" diff --git a/src/detect-http-header-names.c b/src/detect-http-header-names.c index 4e7bccf3c0..96678d8635 100644 --- a/src/detect-http-header-names.c +++ b/src/detect-http-header-names.c @@ -60,7 +60,6 @@ #include "app-layer-parser.h" #include "app-layer-htp.h" -#include "app-layer-htp-libhtp.h" #include "detect-http-header.h" #include "stream-tcp.h" diff --git a/src/detect-http-header.c b/src/detect-http-header.c index f0b4d59f70..c6104bd38f 100644 --- a/src/detect-http-header.c +++ b/src/detect-http-header.c @@ -54,7 +54,6 @@ #include "app-layer-parser.h" #include "app-layer-htp.h" -#include "app-layer-htp-libhtp.h" #include "detect-http-header.h" #include "detect-http-header-common.h" diff --git a/src/detect-http-host.c b/src/detect-http-host.c index 9f6fe9d962..ed061b3921 100644 --- a/src/detect-http-host.c +++ b/src/detect-http-host.c @@ -55,7 +55,6 @@ #include "app-layer-parser.h" #include "app-layer-htp.h" -#include "app-layer-htp-libhtp.h" #include "stream-tcp.h" #include "detect-http-host.h" diff --git a/src/detect-http-method.c b/src/detect-http-method.c index 2d2e1809a4..9fb7af37e6 100644 --- a/src/detect-http-method.c +++ b/src/detect-http-method.c @@ -55,7 +55,6 @@ #include "app-layer-parser.h" #include "app-layer-htp.h" -#include "app-layer-htp-libhtp.h" #include "detect-http-method.h" #include "stream-tcp.h" diff --git a/src/detect-http-protocol.c b/src/detect-http-protocol.c index 6ef48b9b01..8f50693be0 100644 --- a/src/detect-http-protocol.c +++ b/src/detect-http-protocol.c @@ -60,7 +60,6 @@ #include "app-layer-parser.h" #include "app-layer-htp.h" -#include "app-layer-htp-libhtp.h" #include "detect-http-header.h" #include "stream-tcp.h" diff --git a/src/detect-http-raw-header.c b/src/detect-http-raw-header.c index 95f2a282d2..ee5e3c957e 100644 --- a/src/detect-http-raw-header.c +++ b/src/detect-http-raw-header.c @@ -51,7 +51,6 @@ #include "app-layer.h" #include "app-layer-parser.h" #include "app-layer-htp.h" -#include "app-layer-htp-libhtp.h" #include "detect-http-raw-header.h" static int DetectHttpRawHeaderSetup(DetectEngineCtx *, Signature *, const char *); diff --git a/src/detect-http-request-line.c b/src/detect-http-request-line.c index ffa665752a..60ebd5a3d1 100644 --- a/src/detect-http-request-line.c +++ b/src/detect-http-request-line.c @@ -57,7 +57,6 @@ #include "app-layer-parser.h" #include "app-layer-htp.h" -#include "app-layer-htp-libhtp.h" #include "stream-tcp.h" #include "detect-http-request-line.h" diff --git a/src/detect-http-response-line.c b/src/detect-http-response-line.c index ffa02368de..93114822d1 100644 --- a/src/detect-http-response-line.c +++ b/src/detect-http-response-line.c @@ -57,7 +57,6 @@ #include "app-layer-parser.h" #include "app-layer-htp.h" -#include "app-layer-htp-libhtp.h" #include "stream-tcp.h" #include "detect-http-response-line.h" diff --git a/src/detect-http-start.c b/src/detect-http-start.c index d650f77f81..fce6f63d94 100644 --- a/src/detect-http-start.c +++ b/src/detect-http-start.c @@ -59,7 +59,6 @@ #include "app-layer-parser.h" #include "app-layer-htp.h" -#include "app-layer-htp-libhtp.h" #include "detect-http-header.h" #include "stream-tcp.h" diff --git a/src/detect-http-stat-code.c b/src/detect-http-stat-code.c index 0b403f9960..82cdde855a 100644 --- a/src/detect-http-stat-code.c +++ b/src/detect-http-stat-code.c @@ -58,7 +58,6 @@ #include "app-layer-parser.h" #include "app-layer-htp.h" -#include "app-layer-htp-libhtp.h" #include "detect-http-stat-code.h" #include "stream-tcp-private.h" #include "stream-tcp.h" diff --git a/src/detect-http-stat-msg.c b/src/detect-http-stat-msg.c index 2e08b8acb8..d2a494d42f 100644 --- a/src/detect-http-stat-msg.c +++ b/src/detect-http-stat-msg.c @@ -58,7 +58,6 @@ #include "app-layer-parser.h" #include "app-layer-htp.h" -#include "app-layer-htp-libhtp.h" #include "detect-http-stat-msg.h" #include "stream-tcp-private.h" #include "stream-tcp.h" diff --git a/src/detect-http-ua.c b/src/detect-http-ua.c index 2972b249db..9fe6236271 100644 --- a/src/detect-http-ua.c +++ b/src/detect-http-ua.c @@ -56,7 +56,6 @@ #include "app-layer-parser.h" #include "app-layer-htp.h" -#include "app-layer-htp-libhtp.h" #include "stream-tcp.h" #include "detect-http-ua.h" diff --git a/src/detect-http-uri.c b/src/detect-http-uri.c index 04b6179fa9..7a23777562 100644 --- a/src/detect-http-uri.c +++ b/src/detect-http-uri.c @@ -53,7 +53,6 @@ #include "app-layer.h" #include "app-layer-htp.h" -#include "app-layer-htp-libhtp.h" #include "detect-http-uri.h" #include "stream-tcp.h" diff --git a/src/detect-lua.c b/src/detect-lua.c index 60018060de..418e423d6e 100644 --- a/src/detect-lua.c +++ b/src/detect-lua.c @@ -48,7 +48,6 @@ #include "app-layer.h" #include "app-layer-parser.h" #include "app-layer-htp.h" -#include "app-layer-htp-libhtp.h" #include "stream-tcp.h" diff --git a/src/detect-parse.c b/src/detect-parse.c index dda086044b..65719286bb 100644 --- a/src/detect-parse.c +++ b/src/detect-parse.c @@ -61,7 +61,6 @@ #include "app-layer-protos.h" #include "app-layer-parser.h" #include "app-layer-htp.h" -#include "app-layer-htp-libhtp.h" #include "util-classification-config.h" #include "util-unittest.h" diff --git a/src/log-httplog.c b/src/log-httplog.c index 7a36834f19..6622fb4009 100644 --- a/src/log-httplog.c +++ b/src/log-httplog.c @@ -41,7 +41,6 @@ #include "output.h" #include "log-httplog.h" #include "app-layer-htp.h" -#include "app-layer-htp-libhtp.h" #include "app-layer.h" #include "app-layer-parser.h" #include "util-privs.h" diff --git a/src/output-json-http.c b/src/output-json-http.c index 24cdfa3cc1..9c6630460f 100644 --- a/src/output-json-http.c +++ b/src/output-json-http.c @@ -39,7 +39,6 @@ #include "output.h" #include "app-layer-htp.h" -#include "app-layer-htp-libhtp.h" #include "app-layer-htp-file.h" #include "app-layer-htp-xff.h" #include "app-layer.h" diff --git a/src/util-lua-http.c b/src/util-lua-http.c index 2c9ec8bb38..2eff47861d 100644 --- a/src/util-lua-http.c +++ b/src/util-lua-http.c @@ -38,7 +38,6 @@ #include "output.h" #include "app-layer-htp.h" -#include "app-layer-htp-libhtp.h" #include "app-layer.h" #include "app-layer-parser.h" #include "util-privs.h"