tableFile = fopen(filepath, "r");
if (tableFile == nullptr)
{
- ErrorMessage("Could not open RnaAppMapping Table file: %s\n", filepath);
+ ParseError("Could not open AppMapping Table file: %s, no AppId rule support", filepath);
return;
}
token = strtok_r(buf, CONF_SEPARATORS, &context);
if (!token)
{
- ErrorMessage("Could not read id for Rna Id\n");
+ ErrorMessage("Could not read id for AppId\n");
continue;
}
token = strtok_r(nullptr, CONF_SEPARATORS, &context);
if (!token)
{
- ErrorMessage("Could not read service id for Rna Id\n");
+ ErrorMessage("Could not read service id for AppId\n");
snort_free(app_name);
continue;
}
token = strtok_r(nullptr, CONF_SEPARATORS, &context);
if (!token)
{
- ErrorMessage("Could not read client id for Rna Id\n");
+ ErrorMessage("Could not read client id for AppId\n");
snort_free(app_name);
continue;
}
token = strtok_r(nullptr, CONF_SEPARATORS, &context);
if (!token)
{
- ErrorMessage("Could not read payload id for Rna Id\n");
+ ErrorMessage("Could not read payload id for AppId\n");
snort_free(app_name);
continue;
}
// appid_module.cc author davis mcpherson <davmcphe@cisco.com>
// Created on: May 10, 2016
+#include "appid_module.h"
+
#include <string>
-#include "sfip/sf_ip.h"
-#include "appid_module.h"
+#include "log/messages.h"
#include "profiler/profiler.h"
+#include "sfip/sf_ip.h"
#include "utils/util.h"
using namespace std;
bool AppIdModule::end(const char*, int, SnortConfig*)
{
+ if ( (config == nullptr) || (config->app_detector_dir == nullptr) )
+ {
+ ParseWarning(WARN_CONF,"no app_detector_dir present. No support for AppId in rules.\n");
+ }
+
return true;
}
AppInfoTableEntry* pEntry = AppInfoManager::get_instance().get_app_info_entry(appId);
if (!pEntry)
{
- ErrorMessage("AppId: invalid direct client application AppId: %d\n", appId);
+ ParseError(
+ "AppId: ID to Name mapping entry missing for AppId: %d. No rule support for this ID.",
+ appId);
return;
}
extractsInfo &= (APPINFO_FLAG_CLIENT_ADDITIONAL | APPINFO_FLAG_CLIENT_USER);
AppInfoTableEntry* pEntry = AppInfoManager::get_instance().get_app_info_entry(appId);
if (!pEntry)
{
- ErrorMessage("AppId: invalid direct service AppId, %d", appId);
+ ParseError(
+ "AppId: ID to Name mapping entry missing for AppId: %d. No rule support for this ID.",
+ appId);
return;
}
extractsInfo &= (APPINFO_FLAG_SERVICE_ADDITIONAL | APPINFO_FLAG_SERVICE_UDP_REVERSED);