这篇教程C++ FlowGetProtoMapping函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中FlowGetProtoMapping函数的典型用法代码示例。如果您正苦于以下问题:C++ FlowGetProtoMapping函数的具体用法?C++ FlowGetProtoMapping怎么用?C++ FlowGetProtoMapping使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了FlowGetProtoMapping函数的29个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: AppLayerParserProtocolHasLoggerint 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,
示例2: SCEnterFileContainer *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,
示例3: AppLayerParserProtocolSupportsTxsint 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,
示例4: AppLayerParserProtocolIsTxEventAwareint 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,
示例5: AppLayerParserGetStateProgressCompletionStatusint AppLayerParserGetStateProgressCompletionStatus(uint8_t ipproto, AppProto alproto, uint8_t direction){ SCEnter(); SCReturnInt(alp_ctx.ctxs[FlowGetProtoMapping(ipproto)][alproto]. StateGetProgressCompletionStatus(direction));}
开发者ID:denji,项目名称:suricata,代码行数:7,
示例6: AppLayerParserSetStreamDepthvoid 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,
示例7: AppLayerParserGetTxCntuint64_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,
示例8: AppLayerParserRegisterProtocolUnittestsvoid AppLayerParserRegisterProtocolUnittests(uint8_t ipproto, AppProto alproto, void (*RegisterUnittests)(void)){ SCEnter(); alp_ctx.ctxs[FlowGetProtoMapping(ipproto)][alproto]. RegisterUnittests = RegisterUnittests; SCReturn;}
开发者ID:jack-flemming,项目名称:suricata,代码行数:8,
示例9: AppLayerParserGetFirstDataDiruint8_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,
示例10: SCEntervoid *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,
示例11: AppLayerParserRegisterLoggervoid AppLayerParserRegisterLogger(uint8_t ipproto, AppProto alproto){ SCEnter(); alp_ctx.ctxs[FlowGetProtoMapping(ipproto)][alproto].logger = TRUE; SCReturn;}
开发者ID:jack-flemming,项目名称:suricata,代码行数:8,
示例12: AppLayerParserGetStateProgressint 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,
示例13: AppLayerParserRegisterTruncateFuncvoid 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,
示例14: AppLayerParserGetEventInfoint 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,
示例15: AppLayerParserRegisterHasEventsFuncvoid AppLayerParserRegisterHasEventsFunc(uint8_t ipproto, AppProto alproto, int (*StateHasEvents)(void *)){ SCEnter(); alp_ctx.ctxs[FlowGetProtoMapping(ipproto)][alproto].StateHasEvents = StateHasEvents; SCReturn;}
开发者ID:jack-flemming,项目名称:suricata,代码行数:10,
示例16: AppLayerParserRegisterGetEventsFuncvoid 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,
示例17: AppLayerParserRegisterParserAcceptableDataDirectionvoid 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,
示例18: AppLayerParserRegisterGetFilesFuncvoid 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,
示例19: AppLayerParserHasDecoderEventsint 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,
示例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,
示例21: AppLayerParserRegisterGetTxvoid AppLayerParserRegisterGetTx(uint8_t ipproto, AppProto alproto, void *(StateGetTx)(void *alstate, uint64_t tx_id)){ SCEnter(); alp_ctx.ctxs[FlowGetProtoMapping(ipproto)][alproto]. StateGetTx = StateGetTx; SCReturn;}
开发者ID:jack-flemming,项目名称:suricata,代码行数:10,
示例22: AppLayerParserRegisterGetTxCntvoid AppLayerParserRegisterGetTxCnt(uint8_t ipproto, AppProto alproto, uint64_t (*StateGetTxCnt)(void *alstate)){ SCEnter(); alp_ctx.ctxs[FlowGetProtoMapping(ipproto)][alproto]. StateGetTxCnt = StateGetTxCnt; SCReturn;}
开发者ID:jack-flemming,项目名称:suricata,代码行数:10,
示例23: AppLayerParserRegisterTxFreeFuncvoid AppLayerParserRegisterTxFreeFunc(uint8_t ipproto, AppProto alproto, void (*StateTransactionFree)(void *, uint64_t)){ SCEnter(); alp_ctx.ctxs[FlowGetProtoMapping(ipproto)][alproto]. StateTransactionFree = StateTransactionFree; SCReturn;}
开发者ID:jack-flemming,项目名称:suricata,代码行数:10,
示例24: AppLayerParserRegisterGetStateProgressFuncvoid AppLayerParserRegisterGetStateProgressFunc(uint8_t ipproto, AppProto alproto, int (*StateGetProgress)(void *alstate, uint8_t direction)){ SCEnter(); alp_ctx.ctxs[FlowGetProtoMapping(ipproto)][alproto]. StateGetProgress = StateGetProgress; SCReturn;}
开发者ID:jack-flemming,项目名称:suricata,代码行数:10,
示例25: AppLayerParserRegisterGetEventInfovoid AppLayerParserRegisterGetEventInfo(uint8_t ipproto, AppProto alproto, int (*StateGetEventInfo)(const char *event_name, int *event_id, AppLayerEventType *event_type)){ SCEnter(); alp_ctx.ctxs[FlowGetProtoMapping(ipproto)][alproto]. StateGetEventInfo = StateGetEventInfo; SCReturn;}
开发者ID:jack-flemming,项目名称:suricata,代码行数:11,
示例26: AppLayerParserRegisterGetStateProgressCompletionStatusvoid AppLayerParserRegisterGetStateProgressCompletionStatus(uint8_t ipproto, AppProto alproto, int (*StateGetProgressCompletionStatus)(uint8_t direction)){ SCEnter(); alp_ctx.ctxs[FlowGetProtoMapping(ipproto)][alproto]. StateGetProgressCompletionStatus = StateGetProgressCompletionStatus; SCReturn;}
开发者ID:jack-flemming,项目名称:suricata,代码行数:11,
示例27: FlowInit/* initialize the flow from the first packet * we see from it. */void FlowInit(Flow *f, const Packet *p){ SCEnter(); SCLogDebug("flow %p", f); f->proto = p->proto; f->recursion_level = p->recursion_level; f->vlan_id[0] = p->vlan_id[0]; f->vlan_id[1] = p->vlan_id[1]; if (PKT_IS_IPV4(p)) { FLOW_SET_IPV4_SRC_ADDR_FROM_PACKET(p, &f->src); FLOW_SET_IPV4_DST_ADDR_FROM_PACKET(p, &f->dst); f->flags |= FLOW_IPV4; } else if (PKT_IS_IPV6(p)) { FLOW_SET_IPV6_SRC_ADDR_FROM_PACKET(p, &f->src); FLOW_SET_IPV6_DST_ADDR_FROM_PACKET(p, &f->dst); f->flags |= FLOW_IPV6; }#ifdef DEBUG /* XXX handle default */ else { printf("FIXME: %s:%s:%" PRId32 "/n", __FILE__, __FUNCTION__, __LINE__); }#endif if (p->tcph != NULL) { /* XXX MACRO */ SET_TCP_SRC_PORT(p,&f->sp); SET_TCP_DST_PORT(p,&f->dp); } else if (p->udph != NULL) { /* XXX MACRO */ SET_UDP_SRC_PORT(p,&f->sp); SET_UDP_DST_PORT(p,&f->dp); } else if (p->icmpv4h != NULL) { f->type = p->type; f->code = p->code; } else if (p->icmpv6h != NULL) { f->type = p->type; f->code = p->code; } else if (p->sctph != NULL) { /* XXX MACRO */ SET_SCTP_SRC_PORT(p,&f->sp); SET_SCTP_DST_PORT(p,&f->dp); } /* XXX handle default */#ifdef DEBUG else { printf("FIXME: %s:%s:%" PRId32 "/n", __FILE__, __FUNCTION__, __LINE__); }#endif COPY_TIMESTAMP(&p->ts, &f->startts); f->protomap = FlowGetProtoMapping(f->proto); SCReturn;}
开发者ID:AmesianX,项目名称:suricata,代码行数:55,
示例28: AppLayerParserGetStateProgress/** * /brief get the progress value for a tx/protocol * * If the stream is disrupted, we return the 'completion' value. */int AppLayerParserGetStateProgress(uint8_t ipproto, AppProto alproto, void *alstate, uint8_t flags){ SCEnter(); int r = 0; if (unlikely(IS_DISRUPTED(flags))) { r = alp_ctx.ctxs[FLOW_PROTO_DEFAULT][alproto]. StateGetProgressCompletionStatus(flags); } else { r = alp_ctx.ctxs[FlowGetProtoMapping(ipproto)][alproto]. StateGetProgress(alstate, flags); } SCReturnInt(r);}
开发者ID:jviiret,项目名称:suricata,代码行数:19,
示例29: AppLayerParserRegisterParserint AppLayerParserRegisterParser(uint8_t ipproto, AppProto alproto, uint8_t direction, int (*Parser)(Flow *f, void *protocol_state, AppLayerParserState *pstate, uint8_t *buf, uint32_t buf_len, void *local_storage)){ SCEnter(); alp_ctx.ctxs[FlowGetProtoMapping(ipproto)][alproto]. Parser[(direction & STREAM_TOSERVER) ? 0 : 1] = Parser; SCReturnInt(0);}
开发者ID:jack-flemming,项目名称:suricata,代码行数:14,
注:本文中的FlowGetProtoMapping函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ FlowInitConfig函数代码示例 C++ FloatToStr函数代码示例 |