资源简介
用于安装snort的工具。
代码片段和文件信息
#include “sf_snort_plugin_api.h“
#include “sf_dynamic_meta.h“
#include “stdio.h“
#include “string.h“
#include “bad-traffic.h“
/* Externs for Rule */
extern Rule rulePGMNAK;
extern Rule *rules[];
Rule *rules[] = {
&rulePGMNAK
NULL
};
DETECTION_linkAGE int InitializeDetection()
{
return RegisterRules(rules);
}
DETECTION_linkAGE int DumpSkeletonRules()
{
return DumpRules(DETECTION_LIB_NAME rules);
}
DETECTION_linkAGE int LibVersion(DynamicPluginmeta *dpm)
{
dpm->type = TYPE_DETECTION;
dpm->major = DETECTION_LIB_MAJOR;
dpm->minor = DETECTION_LIB_MINOR;
dpm->build = DETECTION_LIB_BUILD;
strncpy(dpm->uniqueName DETECTION_LIB_NAME MAX_NAME_LEN);
return 0;
}
DETECTION_linkAGE int EngineVersion(DynamicPluginmeta *dpm)
{
dpm->type = TYPE_ENGINE;
dpm->major = REQ_ENGINE_LIB_MAJOR;
dpm->minor = REQ_ENGINE_LIB_MINOR;
dpm->build = 0;
strncpy(dpm->uniqueName REQ_ENGINE_LIB_NAME MAX_NAME_LEN);
return 0;
}
评论
共有 条评论