예제 #1
0
파일: plugbase.c 프로젝트: sdnnfv/snort
/****************************************************************************
 *
 * Function: RegisterRuleOption(char *, void (*func)(), enum OptionType)
 *
 * Purpose:  Associates a rule option keyword with an option setup/linking
 *           function.
 *
 * Arguments: keyword => The option keyword to associate with the option
 *                       handler
 *            *func => function pointer to the handler
 *            type => used to determine where keyword is allowed
 *
 * Returns: void function
 *
 ***************************************************************************/
void RegisterRuleOption(char *opt_name, RuleOptConfigFunc ro_config_func,
                        RuleOptOverrideInitFunc override_init_func,
                        RuleOptType opt_type,
                        RuleOptOtnHandler otn_handler)
{
    RuleOptConfigFuncNode *node;

    DEBUG_WRAP(DebugMessage(DEBUG_PLUGIN, "Registering keyword:func => %s/%s:%p\n",
                            ENUM2STR(opt_type, optTypeMap), opt_name, ro_config_func););
예제 #2
0
const char *packet_proto_name(Protocol *proto)
{
    return ENUM2STR(proto->protocol, proto_map);
}