From 46a0df518c0897678bc3ae6cddb78b602589ecd4 Mon Sep 17 00:00:00 2001 From: Jason Ish Date: Sun, 3 Dec 2023 16:47:01 -0600 Subject: [PATCH] ike: move into app-layer/ike --- src/Makefile.am | 40 +++++++++---------- src/app-layer-parser.c | 2 +- .../ike/detect-chosen-sa.c} | 2 +- .../ike/detect-chosen-sa.h} | 0 .../ike/detect-exch-type.c} | 2 +- .../ike/detect-exch-type.h} | 0 .../ike/detect-key-exchange-payload-length.c} | 2 +- .../ike/detect-key-exchange-payload-length.h} | 0 .../ike/detect-key-exchange-payload.c} | 4 +- .../ike/detect-key-exchange-payload.h} | 0 .../ike/detect-nonce-payload-length.c} | 2 +- .../ike/detect-nonce-payload-length.h} | 0 .../ike/detect-nonce-payload.c} | 4 +- .../ike/detect-nonce-payload.h} | 0 .../ike/detect-spi.c} | 4 +- .../ike/detect-spi.h} | 0 .../ike/detect-vendor.c} | 2 +- .../ike/detect-vendor.h} | 0 .../ike/logger.c} | 4 +- .../ike/logger.h} | 0 .../ike/parser.c} | 2 +- .../ike/parser.h} | 0 src/detect-engine-register.c | 16 ++++---- src/output-json-alert.c | 2 +- src/output.c | 2 +- src/rust-context.h | 2 +- 26 files changed, 46 insertions(+), 46 deletions(-) rename src/{detect-ike-chosen-sa.c => app-layer/ike/detect-chosen-sa.c} (99%) rename src/{detect-ike-chosen-sa.h => app-layer/ike/detect-chosen-sa.h} (100%) rename src/{detect-ike-exch-type.c => app-layer/ike/detect-exch-type.c} (99%) rename src/{detect-ike-exch-type.h => app-layer/ike/detect-exch-type.h} (100%) rename src/{detect-ike-key-exchange-payload-length.c => app-layer/ike/detect-key-exchange-payload-length.c} (98%) rename src/{detect-ike-key-exchange-payload-length.h => app-layer/ike/detect-key-exchange-payload-length.h} (100%) rename src/{detect-ike-key-exchange-payload.c => app-layer/ike/detect-key-exchange-payload.c} (97%) rename src/{detect-ike-key-exchange-payload.h => app-layer/ike/detect-key-exchange-payload.h} (100%) rename src/{detect-ike-nonce-payload-length.c => app-layer/ike/detect-nonce-payload-length.c} (98%) rename src/{detect-ike-nonce-payload-length.h => app-layer/ike/detect-nonce-payload-length.h} (100%) rename src/{detect-ike-nonce-payload.c => app-layer/ike/detect-nonce-payload.c} (97%) rename src/{detect-ike-nonce-payload.h => app-layer/ike/detect-nonce-payload.h} (100%) rename src/{detect-ike-spi.c => app-layer/ike/detect-spi.c} (98%) rename src/{detect-ike-spi.h => app-layer/ike/detect-spi.h} (100%) rename src/{detect-ike-vendor.c => app-layer/ike/detect-vendor.c} (99%) rename src/{detect-ike-vendor.h => app-layer/ike/detect-vendor.h} (100%) rename src/{output-json-ike.c => app-layer/ike/logger.c} (98%) rename src/{output-json-ike.h => app-layer/ike/logger.h} (100%) rename src/{app-layer-ike.c => app-layer/ike/parser.c} (99%) rename src/{app-layer-ike.h => app-layer/ike/parser.h} (100%) diff --git a/src/Makefile.am b/src/Makefile.am index a69ccebfbde3..16a067a81c74 100755 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -32,7 +32,7 @@ noinst_HEADERS = \ app-layer-htp-range.h \ app-layer-htp-xff.h \ app-layer-http2.h \ - app-layer-ike.h \ + app-layer/ike/parser.h \ app-layer-krb5.h \ app-layer-modbus.h \ app-layer-quic.h \ @@ -214,14 +214,14 @@ noinst_HEADERS = \ detect-icmpv6-mtu.h \ detect-icode.h \ detect-id.h \ - detect-ike-exch-type.h \ - detect-ike-spi.h \ - detect-ike-vendor.h \ - detect-ike-chosen-sa.h \ - detect-ike-key-exchange-payload-length.h \ - detect-ike-nonce-payload-length.h \ - detect-ike-nonce-payload.h \ - detect-ike-key-exchange-payload.h \ + app-layer/ike/detect-exch-type.h \ + app-layer/ike/detect-spi.h \ + app-layer/ike/detect-vendor.h \ + app-layer/ike/detect-chosen-sa.h \ + app-layer/ike/detect-key-exchange-payload-length.h \ + app-layer/ike/detect-nonce-payload-length.h \ + app-layer/ike/detect-nonce-payload.h \ + app-layer/ike/detect-key-exchange-payload.h \ detect-ipaddr.h \ detect-ipopts.h \ detect-ipproto.h \ @@ -412,7 +412,7 @@ noinst_HEADERS = \ output-json.h \ output-json-http2.h \ output-json-http.h \ - output-json-ike.h \ + app-layer/ike/logger.h \ output-json-krb5.h \ output-json-metadata.h \ output-json-modbus.h \ @@ -648,7 +648,7 @@ libsuricata_c_a_SOURCES = \ app-layer-htp-range.c \ app-layer-htp-xff.c \ app-layer-http2.c \ - app-layer-ike.c \ + app-layer/ike/parser.c \ app-layer-krb5.c \ app-layer-modbus.c \ app-layer-quic.c \ @@ -827,14 +827,14 @@ libsuricata_c_a_SOURCES = \ detect-icmpv6-mtu.c \ detect-icode.c \ detect-id.c \ - detect-ike-exch-type.c \ - detect-ike-spi.c \ - detect-ike-vendor.c \ - detect-ike-chosen-sa.c \ - detect-ike-key-exchange-payload-length.c \ - detect-ike-nonce-payload-length.c \ - detect-ike-nonce-payload.c \ - detect-ike-key-exchange-payload.c \ + app-layer/ike/detect-exch-type.c \ + app-layer/ike/detect-spi.c \ + app-layer/ike/detect-vendor.c \ + app-layer/ike/detect-chosen-sa.c \ + app-layer/ike/detect-key-exchange-payload-length.c \ + app-layer/ike/detect-nonce-payload-length.c \ + app-layer/ike/detect-nonce-payload.c \ + app-layer/ike/detect-key-exchange-payload.c \ detect-ipaddr.c \ detect-ipopts.c \ detect-ipproto.c \ @@ -1024,7 +1024,7 @@ libsuricata_c_a_SOURCES = \ output-json-ftp.c \ output-json-http2.c \ output-json-http.c \ - output-json-ike.c \ + app-layer/ike/logger.c \ output-json-krb5.c \ output-json-metadata.c \ output-json-modbus.c \ diff --git a/src/app-layer-parser.c b/src/app-layer-parser.c index f1a0ed73ee97..d2468f793128 100644 --- a/src/app-layer-parser.c +++ b/src/app-layer-parser.c @@ -53,7 +53,7 @@ #include "app-layer-nfs-udp.h" #include "app-layer-ntp.h" #include "app-layer-tftp.h" -#include "app-layer-ike.h" +#include "app-layer/ike/parser.h" #include "app-layer-krb5.h" #include "app-layer-sip.h" #include "app-layer-rfb.h" diff --git a/src/detect-ike-chosen-sa.c b/src/app-layer/ike/detect-chosen-sa.c similarity index 99% rename from src/detect-ike-chosen-sa.c rename to src/app-layer/ike/detect-chosen-sa.c index 0ae8d400cba6..d727d76d6085 100644 --- a/src/detect-ike-chosen-sa.c +++ b/src/app-layer/ike/detect-chosen-sa.c @@ -26,7 +26,7 @@ #include "detect-parse.h" #include "detect-engine.h" #include "detect-engine-content-inspection.h" -#include "detect-ike-chosen-sa.h" +#include "app-layer/ike/detect-chosen-sa.h" #include "app-layer-parser.h" #include "util-byte.h" #include "util-unittest.h" diff --git a/src/detect-ike-chosen-sa.h b/src/app-layer/ike/detect-chosen-sa.h similarity index 100% rename from src/detect-ike-chosen-sa.h rename to src/app-layer/ike/detect-chosen-sa.h diff --git a/src/detect-ike-exch-type.c b/src/app-layer/ike/detect-exch-type.c similarity index 99% rename from src/detect-ike-exch-type.c rename to src/app-layer/ike/detect-exch-type.c index 38d4218d7faa..1d6fad62043d 100644 --- a/src/detect-ike-exch-type.c +++ b/src/app-layer/ike/detect-exch-type.c @@ -26,7 +26,7 @@ #include "detect-parse.h" #include "detect-engine.h" #include "detect-engine-content-inspection.h" -#include "detect-ike-exch-type.h" +#include "app-layer/ike/detect-exch-type.h" #include "app-layer-parser.h" #include "util-byte.h" #include "detect-engine-uint.h" diff --git a/src/detect-ike-exch-type.h b/src/app-layer/ike/detect-exch-type.h similarity index 100% rename from src/detect-ike-exch-type.h rename to src/app-layer/ike/detect-exch-type.h diff --git a/src/detect-ike-key-exchange-payload-length.c b/src/app-layer/ike/detect-key-exchange-payload-length.c similarity index 98% rename from src/detect-ike-key-exchange-payload-length.c rename to src/app-layer/ike/detect-key-exchange-payload-length.c index 4caad8038717..24afef1d3bf1 100644 --- a/src/detect-ike-key-exchange-payload-length.c +++ b/src/app-layer/ike/detect-key-exchange-payload-length.c @@ -26,7 +26,7 @@ #include "detect-parse.h" #include "detect-engine.h" #include "detect-engine-content-inspection.h" -#include "detect-ike-key-exchange-payload-length.h" +#include "app-layer/ike/detect-key-exchange-payload-length.h" #include "app-layer-parser.h" #include "util-byte.h" #include "detect-engine-uint.h" diff --git a/src/detect-ike-key-exchange-payload-length.h b/src/app-layer/ike/detect-key-exchange-payload-length.h similarity index 100% rename from src/detect-ike-key-exchange-payload-length.h rename to src/app-layer/ike/detect-key-exchange-payload-length.h diff --git a/src/detect-ike-key-exchange-payload.c b/src/app-layer/ike/detect-key-exchange-payload.c similarity index 97% rename from src/detect-ike-key-exchange-payload.c rename to src/app-layer/ike/detect-key-exchange-payload.c index 813e5bf080cd..fe0279c37ee9 100644 --- a/src/detect-ike-key-exchange-payload.c +++ b/src/app-layer/ike/detect-key-exchange-payload.c @@ -43,11 +43,11 @@ #include "app-layer.h" #include "app-layer-parser.h" -#include "detect-ike-key-exchange-payload.h" +#include "app-layer/ike/detect-key-exchange-payload.h" #include "stream-tcp.h" #include "rust.h" -#include "app-layer-ike.h" +#include "app-layer/ike/parser.h" #include "rust-bindings.h" #define KEYWORD_NAME_KEY_EXCHANGE "ike.key_exchange_payload" diff --git a/src/detect-ike-key-exchange-payload.h b/src/app-layer/ike/detect-key-exchange-payload.h similarity index 100% rename from src/detect-ike-key-exchange-payload.h rename to src/app-layer/ike/detect-key-exchange-payload.h diff --git a/src/detect-ike-nonce-payload-length.c b/src/app-layer/ike/detect-nonce-payload-length.c similarity index 98% rename from src/detect-ike-nonce-payload-length.c rename to src/app-layer/ike/detect-nonce-payload-length.c index fbb3a903366a..b9c15df6a331 100644 --- a/src/detect-ike-nonce-payload-length.c +++ b/src/app-layer/ike/detect-nonce-payload-length.c @@ -26,7 +26,7 @@ #include "detect-parse.h" #include "detect-engine.h" #include "detect-engine-content-inspection.h" -#include "detect-ike-nonce-payload-length.h" +#include "app-layer/ike/detect-nonce-payload-length.h" #include "app-layer-parser.h" #include "util-byte.h" #include "detect-engine-uint.h" diff --git a/src/detect-ike-nonce-payload-length.h b/src/app-layer/ike/detect-nonce-payload-length.h similarity index 100% rename from src/detect-ike-nonce-payload-length.h rename to src/app-layer/ike/detect-nonce-payload-length.h diff --git a/src/detect-ike-nonce-payload.c b/src/app-layer/ike/detect-nonce-payload.c similarity index 97% rename from src/detect-ike-nonce-payload.c rename to src/app-layer/ike/detect-nonce-payload.c index a6b73cdf8487..7eb16a0814c3 100644 --- a/src/detect-ike-nonce-payload.c +++ b/src/app-layer/ike/detect-nonce-payload.c @@ -43,11 +43,11 @@ #include "app-layer.h" #include "app-layer-parser.h" -#include "detect-ike-nonce-payload.h" +#include "app-layer/ike/detect-nonce-payload.h" #include "stream-tcp.h" #include "rust.h" -#include "app-layer-ike.h" +#include "app-layer/ike/parser.h" #include "rust-bindings.h" #define KEYWORD_NAME_NONCE "ike.nonce_payload" diff --git a/src/detect-ike-nonce-payload.h b/src/app-layer/ike/detect-nonce-payload.h similarity index 100% rename from src/detect-ike-nonce-payload.h rename to src/app-layer/ike/detect-nonce-payload.h diff --git a/src/detect-ike-spi.c b/src/app-layer/ike/detect-spi.c similarity index 98% rename from src/detect-ike-spi.c rename to src/app-layer/ike/detect-spi.c index 5514d0202cb5..c3921800e122 100644 --- a/src/detect-ike-spi.c +++ b/src/app-layer/ike/detect-spi.c @@ -43,11 +43,11 @@ #include "app-layer.h" #include "app-layer-parser.h" -#include "detect-ike-spi.h" +#include "app-layer/ike/detect-spi.h" #include "stream-tcp.h" #include "rust.h" -#include "app-layer-ike.h" +#include "app-layer/ike/parser.h" #include "rust-bindings.h" #define KEYWORD_NAME_INITIATOR "ike.init_spi" diff --git a/src/detect-ike-spi.h b/src/app-layer/ike/detect-spi.h similarity index 100% rename from src/detect-ike-spi.h rename to src/app-layer/ike/detect-spi.h diff --git a/src/detect-ike-vendor.c b/src/app-layer/ike/detect-vendor.c similarity index 99% rename from src/detect-ike-vendor.c rename to src/app-layer/ike/detect-vendor.c index f5c5b94f35d5..db6bfc9a8cdd 100644 --- a/src/detect-ike-vendor.c +++ b/src/app-layer/ike/detect-vendor.c @@ -28,7 +28,7 @@ #include "detect-engine-prefilter.h" #include "detect-engine-content-inspection.h" #include "detect-engine-mpm.h" -#include "detect-ike-vendor.h" +#include "app-layer/ike/detect-vendor.h" #include "app-layer-parser.h" #include "util-byte.h" diff --git a/src/detect-ike-vendor.h b/src/app-layer/ike/detect-vendor.h similarity index 100% rename from src/detect-ike-vendor.h rename to src/app-layer/ike/detect-vendor.h diff --git a/src/output-json-ike.c b/src/app-layer/ike/logger.c similarity index 98% rename from src/output-json-ike.c rename to src/app-layer/ike/logger.c index e238a72e4f8f..d73329c29a1a 100644 --- a/src/output-json-ike.c +++ b/src/app-layer/ike/logger.c @@ -44,8 +44,8 @@ #include "app-layer.h" #include "app-layer-parser.h" -#include "app-layer-ike.h" -#include "output-json-ike.h" +#include "app-layer/ike/parser.h" +#include "app-layer/ike/logger.h" #include "rust.h" diff --git a/src/output-json-ike.h b/src/app-layer/ike/logger.h similarity index 100% rename from src/output-json-ike.h rename to src/app-layer/ike/logger.h diff --git a/src/app-layer-ike.c b/src/app-layer/ike/parser.c similarity index 99% rename from src/app-layer-ike.c rename to src/app-layer/ike/parser.c index 9a66904ab0a3..dafc1b185be2 100644 --- a/src/app-layer-ike.c +++ b/src/app-layer/ike/parser.c @@ -34,7 +34,7 @@ #include "app-layer-detect-proto.h" #include "app-layer-parser.h" -#include "app-layer-ike.h" +#include "app-layer/ike/parser.h" #include "rust.h" void RegisterIKEParsers(void) diff --git a/src/app-layer-ike.h b/src/app-layer/ike/parser.h similarity index 100% rename from src/app-layer-ike.h rename to src/app-layer/ike/parser.h diff --git a/src/detect-engine-register.c b/src/detect-engine-register.c index 78856b53edea..fbc9ede3624e 100644 --- a/src/detect-engine-register.c +++ b/src/detect-engine-register.c @@ -273,14 +273,14 @@ #include "detect-modbus.h" #include "detect-cipservice.h" #include "app-layer/dnp3/detect-dnp3.h" -#include "detect-ike-exch-type.h" -#include "detect-ike-spi.h" -#include "detect-ike-vendor.h" -#include "detect-ike-chosen-sa.h" -#include "detect-ike-key-exchange-payload-length.h" -#include "detect-ike-nonce-payload-length.h" -#include "detect-ike-nonce-payload.h" -#include "detect-ike-key-exchange-payload.h" +#include "app-layer/ike/detect-exch-type.h" +#include "app-layer/ike/detect-spi.h" +#include "app-layer/ike/detect-vendor.h" +#include "app-layer/ike/detect-chosen-sa.h" +#include "app-layer/ike/detect-key-exchange-payload-length.h" +#include "app-layer/ike/detect-nonce-payload-length.h" +#include "app-layer/ike/detect-nonce-payload.h" +#include "app-layer/ike/detect-key-exchange-payload.h" #include "action-globals.h" #include "tm-threads.h" diff --git a/src/output-json-alert.c b/src/output-json-alert.c index 1bbec935505a..75a386ee67b2 100644 --- a/src/output-json-alert.c +++ b/src/output-json-alert.c @@ -74,7 +74,7 @@ #include "output-json-sip.h" #include "output-json-rfb.h" #include "output-json-mqtt.h" -#include "output-json-ike.h" +#include "app-layer/ike/logger.h" #include "output-json-modbus.h" #include "output-json-frame.h" #include "output-json-quic.h" diff --git a/src/output.c b/src/output.c index 612a82af754f..410dea9c5d63 100644 --- a/src/output.c +++ b/src/output.c @@ -71,7 +71,7 @@ #include "app-layer-ftp.h" #include "output-json-tftp.h" #include "output-json-smb.h" -#include "output-json-ike.h" +#include "app-layer/ike/logger.h" #include "output-json-krb5.h" #include "output-json-quic.h" #include "output-json-dhcp.h" diff --git a/src/rust-context.h b/src/rust-context.h index ba99ac6b7286..6d61f1d058f6 100644 --- a/src/rust-context.h +++ b/src/rust-context.h @@ -23,7 +23,7 @@ #include "detect-engine-state.h" //DetectEngineState #include "app-layer-krb5.h" //KRB5State, KRB5Transaction -#include "app-layer-ike.h" //IKEState, IKETransaction +#include "app-layer/ike/parser.h" //IKEState, IKETransaction #include "app-layer-ntp.h" //NTPState, NTPTransaction #include "app-layer-snmp.h" //SNMPState, SNMPTransaction #include "app-layer-tftp.h" //TFTPState, TFTPTransaction