unittests/app-layer: add helper to get app tx trackers

pull/3573/head
Victor Julien 8 years ago
parent fc395eb2c5
commit 37203c98a1

@ -164,6 +164,17 @@ struct AppLayerParserState_ {
AppLayerDecoderEvents *decoder_events; AppLayerDecoderEvents *decoder_events;
}; };
#ifdef UNITTESTS
void UTHAppLayerParserStateGetIds(void *ptr, uint64_t *i1, uint64_t *i2, uint64_t *log, uint64_t *min)
{
struct AppLayerParserState_ *s = ptr;
*i1 = s->inspect_id[0];
*i2 = s->inspect_id[1];
*log = s->log_id;
*min = s->min_id;
}
#endif
/* Static global version of the parser context. /* Static global version of the parser context.
* Post 2.0 let's look at changing this to move it out to app-layer.c. */ * Post 2.0 let's look at changing this to move it out to app-layer.c. */
static AppLayerParserCtx alp_ctx; static AppLayerParserCtx alp_ctx;

@ -277,6 +277,7 @@ void AppLayerParserRegisterProtocolUnittests(uint8_t ipproto, AppProto alproto,
void AppLayerParserRegisterUnittests(void); void AppLayerParserRegisterUnittests(void);
void AppLayerParserBackupParserTable(void); void AppLayerParserBackupParserTable(void);
void AppLayerParserRestoreParserTable(void); void AppLayerParserRestoreParserTable(void);
void UTHAppLayerParserStateGetIds(void *ptr, uint64_t *i1, uint64_t *i2, uint64_t *log, uint64_t *min);
#endif #endif
#endif /* __APP_LAYER_PARSER_H__ */ #endif /* __APP_LAYER_PARSER_H__ */

Loading…
Cancel
Save