コード例 #1
0
void ThresholdInit(void) {
    threshold_id = HostStorageRegister("threshold", sizeof(void *), NULL, ThresholdListFree);
    if (threshold_id == -1) {
        SCLogError(SC_ERR_HOST_INIT, "Can't initiate host storage for thresholding");
        exit(EXIT_FAILURE);
    }
}
コード例 #2
0
ファイル: host-bit.c プロジェクト: HedgeMage/suricata
void HostBitInitCtx(void)
{
    host_bit_id = HostStorageRegister("bit", sizeof(void *), NULL, HostBitFreeAll);
    if (host_bit_id == -1) {
        SCLogError(SC_ERR_HOST_INIT, "Can't initiate host storage for bits");
        exit(EXIT_FAILURE);
    }
}
コード例 #3
0
void TagInitCtx(void)
{
    SC_ATOMIC_INIT(num_tags);

    host_tag_id = HostStorageRegister("tag", sizeof(void *), NULL, DetectTagDataListFree);
    if (host_tag_id == -1) {
        SCLogError(SC_ERR_HOST_INIT, "Can't initiate host storage for tag");
        exit(EXIT_FAILURE);
    }
    flow_tag_id = FlowStorageRegister("tag", sizeof(void *), NULL, DetectTagDataListFree);
    if (flow_tag_id == -1) {
        SCLogError(SC_ERR_FLOW_INIT, "Can't initiate flow storage for tag");
        exit(EXIT_FAILURE);
    }
}