From ada34d336999d840e76db74bdb9a7ac60d9f9e9e Mon Sep 17 00:00:00 2001 From: "Akhilesh MY (amuttuva)" Date: Mon, 16 Sep 2024 13:10:39 +0000 Subject: [PATCH] Pull request #4387: appid: fixes for one definiton rule violation Merge in SNORT/snort3 from ~AMUTTUVA/snort3:lto_enable to master Squashed commit of the following: commit 480bc87f6d76b4ec66ee85cb19438e12eb9e707e Author: Akhilesh MY Date: Tue Jul 16 05:03:46 2024 -0400 appid: fixes for one definiton rule violation --- .../appid/client_plugins/client_app_timbuktu.cc | 3 +++ src/network_inspectors/appid/client_plugins/client_app_tns.cc | 3 +++ .../appid/service_plugins/service_timbuktu.cc | 3 +++ src/network_inspectors/appid/service_plugins/service_tns.cc | 3 +++ 4 files changed, 12 insertions(+) diff --git a/src/network_inspectors/appid/client_plugins/client_app_timbuktu.cc b/src/network_inspectors/appid/client_plugins/client_app_timbuktu.cc index 58db31e1d..f53d09916 100644 --- a/src/network_inspectors/appid/client_plugins/client_app_timbuktu.cc +++ b/src/network_inspectors/appid/client_plugins/client_app_timbuktu.cc @@ -37,6 +37,8 @@ static const char TIMBUKTU_BANNER[] = "\000\001"; #define TIMBUKTU_BANNER_LEN (sizeof(TIMBUKTU_BANNER)-1) #define MAX_ANY_SIZE 2 +namespace +{ enum TIMBUKTUState { TIMBUKTU_STATE_BANNER = 0, @@ -44,6 +46,7 @@ enum TIMBUKTUState TIMBUKTU_STATE_MESSAGE_LEN, TIMBUKTU_STATE_MESSAGE_DATA }; +} struct ClientTIMBUKTUData { diff --git a/src/network_inspectors/appid/client_plugins/client_app_tns.cc b/src/network_inspectors/appid/client_plugins/client_app_tns.cc index 5241b405f..7da6432d2 100644 --- a/src/network_inspectors/appid/client_plugins/client_app_tns.cc +++ b/src/network_inspectors/appid/client_plugins/client_app_tns.cc @@ -51,6 +51,8 @@ static const char TNS_BANNER[] = "\000\000"; #define USER_STRING "user=" #define MAX_USER_POS ((int)sizeof(USER_STRING) - 2) +namespace +{ enum TNSState { TNS_STATE_MESSAGE_LEN = 0, @@ -66,6 +68,7 @@ enum TNSState TNS_STATE_MESSAGE_CONNECT_DATA, TNS_STATE_COLLECT_USER }; +} struct ClientTNSData { diff --git a/src/network_inspectors/appid/service_plugins/service_timbuktu.cc b/src/network_inspectors/appid/service_plugins/service_timbuktu.cc index 3eee7a107..296f9deb8 100644 --- a/src/network_inspectors/appid/service_plugins/service_timbuktu.cc +++ b/src/network_inspectors/appid/service_plugins/service_timbuktu.cc @@ -33,12 +33,15 @@ static char TIMBUKTU_BANNER[] = "\001\001"; #define TIMBUKTU_BANNER_LEN (sizeof(TIMBUKTU_BANNER)-1) +namespace +{ enum TIMBUKTUState { TIMBUKTU_STATE_BANNER, TIMBUKTU_STATE_MESSAGE_LEN, TIMBUKTU_STATE_MESSAGE_DATA }; +} struct ServiceTIMBUKTUData { diff --git a/src/network_inspectors/appid/service_plugins/service_tns.cc b/src/network_inspectors/appid/service_plugins/service_tns.cc index 9be9337cb..09a0309f6 100644 --- a/src/network_inspectors/appid/service_plugins/service_tns.cc +++ b/src/network_inspectors/appid/service_plugins/service_tns.cc @@ -48,6 +48,8 @@ static const uint8_t TNS_BANNER[] = "\000\000"; #define TNS_TYPE_CONTROL 14 #define TNS_TYPE_MAX 19 +namespace +{ enum TNSState { TNS_STATE_MESSAGE_LEN, @@ -58,6 +60,7 @@ enum TNSState TNS_STATE_MESSAGE_ACCEPT, TNS_STATE_MESSAGE_DATA }; +} #define ACCEPT_VERSION_OFFSET 8 struct ServiceTNSData -- 2.47.3