本文整理汇总了C++中FlowGetProtoMapping函数的典型用法代码示例。如果您正苦于以下问题:C++ FlowGetProtoMapping函数的具体用法?C++ FlowGetProtoMapping怎么用?C++ FlowGetProtoMapping使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了FlowGetProtoMapping函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: AppLayerParserProtocolHasLogger
int AppLayerParserProtocolHasLogger(uint8_t ipproto, AppProto alproto)
{
SCEnter();
int ipproto_map = FlowGetProtoMapping(ipproto);
int r = (alp_ctx.ctxs[ipproto_map][alproto].logger == 0) ? 0 : 1;
SCReturnInt(r);
}
开发者ID:decanio,项目名称:suricata-np,代码行数:7,代码来源:app-layer-parser.c
示例2: SCEnter
FileContainer *AppLayerParserGetFiles(uint8_t ipproto, AppProto alproto,
void *alstate, uint8_t direction)
{
SCEnter();
FileContainer *ptr = NULL;
if (alp_ctx.ctxs[FlowGetProtoMapping(ipproto)][alproto].
StateGetFiles != NULL)
{
ptr = alp_ctx.ctxs[FlowGetProtoMapping(ipproto)][alproto].
StateGetFiles(alstate, direction);
}
SCReturnPtr(ptr, "FileContainer *");
}
开发者ID:denji,项目名称:suricata,代码行数:16,代码来源:app-layer-parser.c
示例3: AppLayerParserProtocolSupportsTxs
int AppLayerParserProtocolSupportsTxs(uint8_t ipproto, AppProto alproto)
{
SCEnter();
int ipproto_map = FlowGetProtoMapping(ipproto);
int r = (alp_ctx.ctxs[ipproto_map][alproto].StateTransactionFree == NULL) ? 0 : 1;
SCReturnInt(r);
}
开发者ID:decanio,项目名称:suricata-np,代码行数:7,代码来源:app-layer-parser.c
示例4: AppLayerParserProtocolIsTxEventAware
int AppLayerParserProtocolIsTxEventAware(uint8_t ipproto, AppProto alproto)
{
SCEnter();
int ipproto_map = FlowGetProtoMapping(ipproto);
int r = (alp_ctx.ctxs[ipproto_map][alproto].StateGetEvents == NULL) ? 0 : 1;
SCReturnInt(r);
}
开发者ID:decanio,项目名称:suricata-np,代码行数:7,代码来源:app-layer-parser.c
示例5: AppLayerParserGetStateProgressCompletionStatus
int AppLayerParserGetStateProgressCompletionStatus(uint8_t ipproto, AppProto alproto,
uint8_t direction)
{
SCEnter();
SCReturnInt(alp_ctx.ctxs[FlowGetProtoMapping(ipproto)][alproto].
StateGetProgressCompletionStatus(direction));
}
开发者ID:denji,项目名称:suricata,代码行数:7,代码来源:app-layer-parser.c
示例6: AppLayerParserSetStreamDepth
void AppLayerParserSetStreamDepth(uint8_t ipproto, AppProto alproto, uint32_t stream_depth)
{
SCEnter();
alp_ctx.ctxs[FlowGetProtoMapping(ipproto)][alproto].stream_depth = stream_depth;
SCReturn;
}
开发者ID:jviiret,项目名称:suricata,代码行数:8,代码来源:app-layer-parser.c
示例7: AppLayerParserGetTxCnt
uint64_t AppLayerParserGetTxCnt(uint8_t ipproto, AppProto alproto, void *alstate)
{
SCEnter();
uint64_t r = 0;
r = alp_ctx.ctxs[FlowGetProtoMapping(ipproto)][alproto].
StateGetTxCnt(alstate);
SCReturnCT(r, "uint64_t");
}
开发者ID:jviiret,项目名称:suricata,代码行数:8,代码来源:app-layer-parser.c
示例8: AppLayerParserRegisterProtocolUnittests
void AppLayerParserRegisterProtocolUnittests(uint8_t ipproto, AppProto alproto,
void (*RegisterUnittests)(void))
{
SCEnter();
alp_ctx.ctxs[FlowGetProtoMapping(ipproto)][alproto].
RegisterUnittests = RegisterUnittests;
SCReturn;
}
开发者ID:jack-flemming,项目名称:suricata,代码行数:8,代码来源:app-layer-parser.c
示例9: AppLayerParserGetFirstDataDir
uint8_t AppLayerParserGetFirstDataDir(uint8_t ipproto, AppProto alproto)
{
SCEnter();
uint8_t r = 0;
r = alp_ctx.ctxs[FlowGetProtoMapping(ipproto)][alproto].
first_data_dir;
SCReturnCT(r, "uint8_t");
}
开发者ID:jviiret,项目名称:suricata,代码行数:8,代码来源:app-layer-parser.c
示例10: SCEnter
void *AppLayerParserGetTx(uint8_t ipproto, AppProto alproto, void *alstate, uint64_t tx_id)
{
SCEnter();
void * r = NULL;
r = alp_ctx.ctxs[FlowGetProtoMapping(ipproto)][alproto].
StateGetTx(alstate, tx_id);
SCReturnPtr(r, "void *");
}
开发者ID:jviiret,项目名称:suricata,代码行数:8,代码来源:app-layer-parser.c
示例11: AppLayerParserRegisterLogger
void AppLayerParserRegisterLogger(uint8_t ipproto, AppProto alproto)
{
SCEnter();
alp_ctx.ctxs[FlowGetProtoMapping(ipproto)][alproto].logger = TRUE;
SCReturn;
}
开发者ID:jack-flemming,项目名称:suricata,代码行数:8,代码来源:app-layer-parser.c
示例12: AppLayerParserGetStateProgress
int AppLayerParserGetStateProgress(uint8_t ipproto, AppProto alproto,
void *alstate, uint8_t direction)
{
SCEnter();
int r = 0;
r = alp_ctx.ctxs[FlowGetProtoMapping(ipproto)][alproto].
StateGetProgress(alstate, direction);
SCReturnInt(r);
}
开发者ID:ken-tilera,项目名称:suricata,代码行数:9,代码来源:app-layer-parser.c
示例13: AppLayerParserRegisterTruncateFunc
void AppLayerParserRegisterTruncateFunc(uint8_t ipproto, AppProto alproto,
void (*Truncate)(void *, uint8_t))
{
SCEnter();
alp_ctx.ctxs[FlowGetProtoMapping(ipproto)][alproto].Truncate = Truncate;
SCReturn;
}
开发者ID:jack-flemming,项目名称:suricata,代码行数:9,代码来源:app-layer-parser.c
示例14: AppLayerParserGetEventInfo
int AppLayerParserGetEventInfo(uint8_t ipproto, AppProto alproto, const char *event_name,
int *event_id, AppLayerEventType *event_type)
{
SCEnter();
int ipproto_map = FlowGetProtoMapping(ipproto);
int r = (alp_ctx.ctxs[ipproto_map][alproto].StateGetEventInfo == NULL) ?
-1 : alp_ctx.ctxs[ipproto_map][alproto].StateGetEventInfo(event_name, event_id, event_type);
SCReturnInt(r);
}
开发者ID:jack-flemming,项目名称:suricata,代码行数:9,代码来源:app-layer-parser.c
示例15: AppLayerParserRegisterHasEventsFunc
void AppLayerParserRegisterHasEventsFunc(uint8_t ipproto, AppProto alproto,
int (*StateHasEvents)(void *))
{
SCEnter();
alp_ctx.ctxs[FlowGetProtoMapping(ipproto)][alproto].StateHasEvents =
StateHasEvents;
SCReturn;
}
开发者ID:jack-flemming,项目名称:suricata,代码行数:10,代码来源:app-layer-parser.c
示例16: AppLayerParserRegisterGetEventsFunc
void AppLayerParserRegisterGetEventsFunc(uint8_t ipproto, AppProto alproto,
AppLayerDecoderEvents *(*StateGetEvents)(void *, uint64_t))
{
SCEnter();
alp_ctx.ctxs[FlowGetProtoMapping(ipproto)][alproto].StateGetEvents =
StateGetEvents;
SCReturn;
}
开发者ID:jack-flemming,项目名称:suricata,代码行数:10,代码来源:app-layer-parser.c
示例17: AppLayerParserRegisterParserAcceptableDataDirection
void AppLayerParserRegisterParserAcceptableDataDirection(uint8_t ipproto, AppProto alproto,
uint8_t direction)
{
SCEnter();
alp_ctx.ctxs[FlowGetProtoMapping(ipproto)][alproto].first_data_dir |=
(direction & (STREAM_TOSERVER | STREAM_TOCLIENT));
SCReturn;
}
开发者ID:jack-flemming,项目名称:suricata,代码行数:10,代码来源:app-layer-parser.c
示例18: AppLayerParserRegisterGetFilesFunc
void AppLayerParserRegisterGetFilesFunc(uint8_t ipproto, AppProto alproto,
FileContainer *(*StateGetFiles)(void *, uint8_t))
{
SCEnter();
alp_ctx.ctxs[FlowGetProtoMapping(ipproto)][alproto].StateGetFiles =
StateGetFiles;
SCReturn;
}
开发者ID:jack-flemming,项目名称:suricata,代码行数:10,代码来源:app-layer-parser.c
示例19: AppLayerParserHasDecoderEvents
int AppLayerParserHasDecoderEvents(uint8_t ipproto, AppProto alproto,
void *alstate, AppLayerParserState *pstate,
uint8_t flags)
{
SCEnter();
if (alstate == NULL || pstate == NULL)
goto not_present;
AppLayerDecoderEvents *decoder_events;
uint64_t tx_id;
uint64_t max_id;
if (AppLayerParserProtocolIsTxEventAware(ipproto, alproto)) {
/* fast path if supported by alproto */
if (alp_ctx.ctxs[FlowGetProtoMapping(ipproto)][alproto].StateHasEvents != NULL) {
if (alp_ctx.ctxs[FlowGetProtoMapping(ipproto)][alproto].
StateHasEvents(alstate) == 1)
{
goto present;
}
} else {
/* check each tx */
tx_id = AppLayerParserGetTransactionInspectId(pstate, flags);
max_id = AppLayerParserGetTxCnt(ipproto, alproto, alstate);
for ( ; tx_id < max_id; tx_id++) {
decoder_events = AppLayerParserGetEventsByTx(ipproto, alproto, alstate, tx_id);
if (decoder_events && decoder_events->cnt)
goto present;
}
}
}
decoder_events = AppLayerParserGetDecoderEvents(pstate);
if (decoder_events && decoder_events->cnt)
goto present;
/* if we have reached here, we don't have events */
not_present:
SCReturnInt(0);
present:
SCReturnInt(1);
}
开发者ID:jack-flemming,项目名称:suricata,代码行数:43,代码来源:app-layer-parser.c
示例20: AppLayerTransactionGetActiveDetectLog
/** \brief active TX retrieval for normal ops: so with detection and logging
*
* \retval tx_id lowest tx_id that still needs work */
uint64_t AppLayerTransactionGetActiveDetectLog(Flow *f, uint8_t flags) {
AppLayerParserProtoCtx *p = &alp_ctx.ctxs[FlowGetProtoMapping(f->proto)][f->alproto];
uint64_t log_id = f->alparser->log_id;
uint64_t inspect_id = f->alparser->inspect_id[flags & STREAM_TOSERVER ? 0 : 1];
if (p->logger == TRUE) {
return (log_id < inspect_id) ? log_id : inspect_id;
} else {
return inspect_id;
}
}
开发者ID:jack-flemming,项目名称:suricata,代码行数:13,代码来源:app-layer-parser.c
注:本文中的FlowGetProtoMapping函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论