app-layer: add logger check to API

The new API call:
    int AppLayerParserProtocolHasLogger(uint8_t ipproto,
                                        AppProto alproto)

Returns TRUE if a logger is registered on the ip/alproto pair, and
FALSE otherwise.
pull/797/head
Victor Julien 11 years ago
parent 4c024f9658
commit 078ff0c0cc

@ -943,6 +943,14 @@ int AppLayerParserProtocolSupportsTxs(uint8_t ipproto, AppProto alproto)
SCReturnInt(r);
}
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);
}
void AppLayerParserTriggerRawStreamReassembly(Flow *f)
{
SCEnter();

@ -185,6 +185,7 @@ int AppLayerParserHasDecoderEvents(uint8_t ipproto, AppProto alproto, void *alst
int AppLayerParserProtocolIsTxAware(uint8_t ipproto, AppProto alproto);
int AppLayerParserProtocolIsTxEventAware(uint8_t ipproto, AppProto alproto);
int AppLayerParserProtocolSupportsTxs(uint8_t ipproto, AppProto alproto);
int AppLayerParserProtocolHasLogger(uint8_t ipproto, AppProto alproto);
void AppLayerParserTriggerRawStreamReassembly(Flow *f);
/***** Cleanup *****/

Loading…
Cancel
Save