struct FrameConfig {
SC_ATOMIC_DECLARE(uint64_t, types);
};
-static struct FrameConfig frame_config[ALPROTO_MAX];
+/* This array should be allocated to contain ALPROTO_MAX protocols. */
+static struct FrameConfig *frame_config;
void FrameConfigInit(void)
{
+ frame_config = SCCalloc(ALPROTO_MAX, sizeof(struct FrameConfig));
+ if (unlikely(frame_config == NULL)) {
+ FatalError("Unable to alloc frame_config.");
+ }
for (AppProto p = 0; p < ALPROTO_MAX; p++) {
SC_ATOMIC_INIT(frame_config[p].types);
}
}
+void FrameConfigDeInit(void)
+{
+ SCFree(frame_config);
+}
+
void FrameConfigEnableAll(void)
{
const uint64_t bits = UINT64_MAX;
FramesContainer *AppLayerFramesSetupContainer(Flow *f);
void FrameConfigInit(void);
+void FrameConfigDeInit(void);
void FrameConfigEnableAll(void);
void FrameConfigEnable(const AppProto p, const uint8_t type);
SupportFastPatternForSigMatchTypes();
SCThresholdConfGlobalInit();
SCProtoNameInit();
- FrameConfigInit();
}
void GlobalsDestroy(void)