{
char *proto_name = "dns";
- StatsRegisterGlobalCounter("dns.memuse", DNSMemcapGetMemuseCounter);
- StatsRegisterGlobalCounter("dns.memcap_state", DNSMemcapGetMemcapStateCounter);
- StatsRegisterGlobalCounter("dns.memcap_global", DNSMemcapGetMemcapGlobalCounter);
-
/** DNS */
if (AppLayerProtoDetectConfProtoDetectionEnabled("udp", proto_name)) {
AppLayerProtoDetectRegisterProtocol(ALPROTO_DNS, proto_name);
HTPConfigSetDefaultsPhase2(s->name, htprec);
}
- StatsRegisterGlobalCounter("http.memuse", HTPMemuseGlobalCounter);
- StatsRegisterGlobalCounter("http.memcap", HTPMemcapGlobalCounter);
-
SCReturn;
}
PACKET_PROFILING_APP_STORE(app_tctx, p);
}
+/** \brief HACK to work around our broken unix manager (re)init loop
+ */
+void AppLayerRegisterGlobalCounters(void)
+{
+ StatsRegisterGlobalCounter("dns.memuse", DNSMemcapGetMemuseCounter);
+ StatsRegisterGlobalCounter("dns.memcap_state", DNSMemcapGetMemcapStateCounter);
+ StatsRegisterGlobalCounter("dns.memcap_global", DNSMemcapGetMemcapGlobalCounter);
+ StatsRegisterGlobalCounter("http.memuse", HTPMemuseGlobalCounter);
+ StatsRegisterGlobalCounter("http.memcap", HTPMemcapGlobalCounter);
+}
+
/***** Unittests *****/
#ifdef UNITTESTS
#endif
}
+void AppLayerRegisterGlobalCounters(void);
/***** Unittests *****/
#include "host.h"
#include "defrag.h"
#include "ippair.h"
+#include "app-layer.h"
#include "util-profiling.h"
FlowInitConfig(FLOW_QUIET);
IPPairInitConfig(FLOW_QUIET);
StreamTcpInitConfig(STREAM_VERBOSE);
+ AppLayerRegisterGlobalCounters();
RunModeInitializeOutputs();
StatsSetupPostConfig();
RunModeDispatch(RUNMODE_PCAP_FILE, NULL);
GlobalInits();
TimeInit();
SupportFastPatternForSigMatchTypes();
- StatsInit();
+ if (suri.run_mode != RUNMODE_UNIX_SOCKET) {
+ StatsInit();
+ }
if (conf_filename == NULL)
conf_filename = DEFAULT_CONF_FILE;
FlowInitConfig(FLOW_VERBOSE);
StreamTcpInitConfig(STREAM_VERBOSE);
IPPairInitConfig(IPPAIR_VERBOSE);
+ AppLayerRegisterGlobalCounters();
}
if (MagicInit() != 0)