log api: use AppProto instead of uint16_t

pull/805/head
Victor Julien 12 years ago
parent 52c3d3ad7c
commit 4bd37cc46a

@ -44,7 +44,7 @@ typedef struct OutputLoggerThreadData_ {
* it's perfectly valid that have multiple instances of the same
* log module (e.g. http.log) with different output ctx'. */
typedef struct OutputTxLogger_ {
uint16_t alproto;
AppProto alproto;
TxLogger LogFunc;
OutputCtx *output_ctx;
struct OutputTxLogger_ *next;
@ -53,7 +53,7 @@ typedef struct OutputTxLogger_ {
static OutputTxLogger *list = NULL;
int OutputRegisterTxLogger(const char *name, uint16_t alproto, TxLogger LogFunc, OutputCtx *output_ctx)
int OutputRegisterTxLogger(const char *name, AppProto alproto, TxLogger LogFunc, OutputCtx *output_ctx)
{
OutputTxLogger *op = SCMalloc(sizeof(*op));
if (op == NULL)

@ -36,7 +36,7 @@ typedef int (*TxLogger)(ThreadVars *, void *thread_data, const Packet *, Flow *f
*/
//typedef int (*TxLogCondition)(ThreadVars *, const Packet *);
int OutputRegisterTxLogger(const char *name, uint16_t alproto, TxLogger LogFunc, OutputCtx *);
int OutputRegisterTxLogger(const char *name, AppProto alproto, TxLogger LogFunc, OutputCtx *);
void TmModuleTxLoggerRegister (void);

@ -147,7 +147,7 @@ error:
*/
void
OutputRegisterTxModule(const char *name, const char *conf_name,
OutputCtx *(*InitFunc)(ConfNode *), uint16_t alproto,
OutputCtx *(*InitFunc)(ConfNode *), AppProto alproto,
TxLogger TxLogFunc)
{
if (unlikely(TxLogFunc == NULL)) {
@ -176,7 +176,7 @@ error:
void
OutputRegisterTxSubModule(const char *parent_name, const char *name,
const char *conf_name, OutputCtx *(*InitFunc)(ConfNode *, OutputCtx *parent_ctx),
uint16_t alproto, TxLogger TxLogFunc)
AppProto alproto, TxLogger TxLogFunc)
{
if (unlikely(TxLogFunc == NULL)) {
goto error;

@ -47,7 +47,7 @@ typedef struct OutputModule_ {
TxLogger TxLogFunc;
FileLogger FileLogFunc;
FiledataLogger FiledataLogFunc;
uint16_t alproto;
AppProto alproto;
TAILQ_ENTRY(OutputModule_) entries;
} OutputModule;
@ -62,11 +62,11 @@ void OutputRegisterPacketSubModule(const char *parent_name, const char *name,
PacketLogger LogFunc, PacketLogCondition ConditionFunc);
void OutputRegisterTxModule(const char *name, const char *conf_name,
OutputCtx *(*InitFunc)(ConfNode *), uint16_t alproto,
OutputCtx *(*InitFunc)(ConfNode *), AppProto alproto,
TxLogger TxLogFunc);
void OutputRegisterTxSubModule(const char *parent_name, const char *name,
const char *conf_name, OutputCtx *(*InitFunc)(ConfNode *, OutputCtx *parent_ctx),
uint16_t alproto, TxLogger TxLogFunc);
AppProto alproto, TxLogger TxLogFunc);
void OutputRegisterFileModule(const char *name, const char *conf_name,
OutputCtx *(*InitFunc)(ConfNode *), FileLogger FileLogFunc);

Loading…
Cancel
Save