示例#1
0
文件: geoip.c 项目: poona/ironbee
                             "Unknown error opening GeoIP database file \"%s\"",
                             p1_unescaped);
            rc = IB_EUNKNOWN;
        }
    }

    free(p1_unescaped);
    return rc;
}

static ib_dirmap_init_t geoip_directive_map[] = {

    /* Give the config parser a callback for the directive GeoIPDatabaseFile */
    IB_DIRMAP_INIT_PARAM1(
        "GeoIPDatabaseFile",
        geoip_database_file_dir_param1,
        NULL                            /* Filled in by the init function */
    ),

    /* signal the end of the list */
    IB_DIRMAP_INIT_LAST
};

/* Called when module is loaded. */
static ib_status_t geoip_init(ib_engine_t *ib, ib_module_t *m, void *cbdata)
{
    ib_status_t    rc;
    GeoIP         *geoip_db = NULL;
    module_data_t *mod_data;

    mod_data = ib_mpool_calloc(ib_engine_pool_main_get(ib),
示例#2
0
文件: pcre.c 项目: niubl/ironbee
}

static IB_DIRMAP_INIT_STRUCTURE(directive_map) = {
    IB_DIRMAP_INIT_ONOFF(
        "PcreStudy",
        handle_directive_onoff,
        NULL
    ),
    IB_DIRMAP_INIT_ONOFF(
        "PcreUseJit",
        handle_directive_onoff,
        NULL
    ),
    IB_DIRMAP_INIT_PARAM1(
        "PcreMatchLimit",
        handle_directive_param,
        NULL
    ),
    IB_DIRMAP_INIT_PARAM1(
        "PcreMatchLimitRecursion",
        handle_directive_param,
        NULL
    ),
    IB_DIRMAP_INIT_PARAM1(
        "PcreJitStackStart",
        handle_directive_param,
        NULL
    ),
    IB_DIRMAP_INIT_PARAM1(
        "PcreJitStackMax",
        handle_directive_param,
示例#3
0
文件: poc_sig.c 项目: niq/ironbee
        IB_FTYPE_NUM,
        &pocsig_global_cfg,
        trace,
        0
    ),

    /* End */
    IB_CFGMAP_INIT_LAST
};

/* Directive initialization structure. */
static IB_DIRMAP_INIT_STRUCTURE(pocsig_directive_map) = {
    /* PocSigTrace - Enable/Disable tracing */
    IB_DIRMAP_INIT_PARAM1(
        "PocSigTrace",
        pocsig_dir_trace,
        NULL
    ),

    /* PocSig* - Define a signature in various phases */
    IB_DIRMAP_INIT_LIST(
        "PocSigPreTx",
        pocsig_dir_signature,
        NULL
    ),
    IB_DIRMAP_INIT_LIST(
        "PocSigReqHead",
        pocsig_dir_signature,
        NULL
    ),
    IB_DIRMAP_INIT_LIST(
示例#4
0
文件: ident.c 项目: B0SB05/ironbee
    if (rc != IB_OK) {
        return rc;
    }
    rc = ib_hook_tx_register(ib, request_finished_state,
                             ident_handler, NULL);
    if (rc != IB_OK) {
        return rc;
    }
    return rc;
}


static IB_DIRMAP_INIT_STRUCTURE(ident_config) = {
    IB_DIRMAP_INIT_PARAM1(
        "IdentMode",
        ident_mode,
        NULL
    ),
    IB_DIRMAP_INIT_PARAM2(
        "IdentType",
        ident_type,
        NULL
    ),

    /* End */
    IB_DIRMAP_INIT_LAST
};

static ident_cfg_t ident_cfg_ini = {
    ident_off,
    NULL,
示例#5
0
文件: geoip.c 项目: chiehwen/ironbee
    free(p1_unescaped);

    if (geoip_db == NULL)
    {
                return IB_EUNKNOWN;
    }

    return IB_OK;
}

static IB_DIRMAP_INIT_STRUCTURE(geoip_directive_map) = {

    /* Give the config parser a callback for the directive GeoIPDatabaseFile */
    IB_DIRMAP_INIT_PARAM1(
        "GeoIPDatabaseFile",
        geoip_database_file_dir_param1,
        NULL
    ),

    /* signal the end of the list */
    IB_DIRMAP_INIT_LAST
};

/* Called when module is loaded. */
static ib_status_t geoip_init(ib_engine_t *ib, ib_module_t *m, void *cbdata)
{
    ib_status_t rc;

    if (geoip_db == NULL)
    {
        ib_log_debug(ib, "Initializing default GeoIP database...");