From 0be99f3e3540133a7da750899778cd39fb057be4 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Sun, 6 Feb 2022 13:32:25 +0100 Subject: [PATCH] output: minor header cleanups --- src/output-file.h | 9 ++------- src/output-filedata.h | 9 ++------- src/output-flow.h | 9 +-------- src/output-streaming.h | 6 +++--- src/output-tx.h | 10 +++++----- 5 files changed, 13 insertions(+), 30 deletions(-) diff --git a/src/output-file.h b/src/output-file.h index 14b661251b..cb467610c4 100644 --- a/src/output-file.h +++ b/src/output-file.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2007-2014 Open Information Security Foundation +/* Copyright (C) 2007-2022 Open Information Security Foundation * * You can copy, redistribute or modify this Program under the terms of * the GNU General Public License version 2 as published by the Free @@ -29,15 +29,10 @@ #include "decode.h" #include "util-file.h" -/** packet logger function pointer type */ +/** file logger function pointer type */ typedef int (*FileLogger)(ThreadVars *, void *thread_data, const Packet *, const File *, uint8_t direction); -/** packet logger condition function pointer type, - * must return true for packets that should be logged - */ -//typedef int (*TxLogCondition)(ThreadVars *, const Packet *); - int OutputRegisterFileLogger(LoggerId id, const char *name, FileLogger LogFunc, OutputCtx *, ThreadInitFunc ThreadInit, ThreadDeinitFunc ThreadDeinit, ThreadExitPrintStatsFunc ThreadExitPrintStats); diff --git a/src/output-filedata.h b/src/output-filedata.h index b823510505..204970a1dc 100644 --- a/src/output-filedata.h +++ b/src/output-filedata.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2007-2014 Open Information Security Foundation +/* Copyright (C) 2007-2022 Open Information Security Foundation * * You can copy, redistribute or modify this Program under the terms of * the GNU General Public License version 2 as published by the Free @@ -36,11 +36,6 @@ typedef int (*FiledataLogger)(ThreadVars *, void *thread_data, const Packet *, File *, const uint8_t *, uint32_t, uint8_t, uint8_t dir); -/** packet logger condition function pointer type, - * must return true for packets that should be logged - */ -//typedef int (*TxLogCondition)(ThreadVars *, const Packet *); - int OutputRegisterFiledataLogger(LoggerId id, const char *name, FiledataLogger LogFunc, OutputCtx *, ThreadInitFunc ThreadInit, ThreadDeinitFunc ThreadDeinit, @@ -50,4 +45,4 @@ void OutputFiledataLoggerRegister(void); void OutputFiledataShutdown(void); -#endif /* __OUTPUT_FILE_H__ */ +#endif /* __OUTPUT_FILEDATA_H__ */ diff --git a/src/output-flow.h b/src/output-flow.h index 26bfc32450..8445d6fa13 100644 --- a/src/output-flow.h +++ b/src/output-flow.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2007-2013 Open Information Security Foundation +/* Copyright (C) 2007-2022 Open Information Security Foundation * * You can copy, redistribute or modify this Program under the terms of * the GNU General Public License version 2 as published by the Free @@ -31,22 +31,15 @@ /** flow logger function pointer type */ typedef int (*FlowLogger)(ThreadVars *, void *thread_data, Flow *f); -/** packet logger condition function pointer type, - * must return true for packets that should be logged - */ -//typedef int (*TxLogCondition)(ThreadVars *, const Packet *); - int OutputRegisterFlowLogger(const char *name, FlowLogger LogFunc, OutputCtx *, ThreadInitFunc ThreadInit, ThreadDeinitFunc ThreadDeinit, ThreadExitPrintStatsFunc ThreadExitPrintStats); void OutputFlowShutdown(void); - TmEcode OutputFlowLog(ThreadVars *tv, void *thread_data, Flow *f); TmEcode OutputFlowLogThreadInit(ThreadVars *tv, void *initdata, void **data); TmEcode OutputFlowLogThreadDeinit(ThreadVars *tv, void *thread_data); void OutputFlowLogExitPrintStats(ThreadVars *tv, void *thread_data); - #endif /* __OUTPUT_FLOW_H__ */ diff --git a/src/output-streaming.h b/src/output-streaming.h index bc02fe543b..d47a3e432c 100644 --- a/src/output-streaming.h +++ b/src/output-streaming.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2007-2014 Open Information Security Foundation +/* Copyright (C) 2007-2022 Open Information Security Foundation * * You can copy, redistribute or modify this Program under the terms of * the GNU General Public License version 2 as published by the Free @@ -20,7 +20,7 @@ * * \author Victor Julien * - * AppLayer Filedata Logger Output registration functions + * Streaming Logger Output registration functions */ #ifndef __OUTPUT_STREAMING_H__ @@ -40,7 +40,7 @@ enum OutputStreamingType { STREAMING_HTTP_BODIES, }; -/** filedata logger function pointer type */ +/** streaming logger function pointer type */ typedef int (*StreamingLogger)(ThreadVars *, void *thread_data, const Flow *f, const uint8_t *data, uint32_t data_len, uint64_t tx_id, uint8_t flags); diff --git a/src/output-tx.h b/src/output-tx.h index 847d0b472b..ae2c6d9063 100644 --- a/src/output-tx.h +++ b/src/output-tx.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2007-2013 Open Information Security Foundation +/* Copyright (C) 2007-2022 Open Information Security Foundation * * You can copy, redistribute or modify this Program under the terms of * the GNU General Public License version 2 as published by the Free @@ -28,11 +28,11 @@ #include "decode.h" -/** packet logger function pointer type */ +/** tx logger function pointer type */ typedef int (*TxLogger)(ThreadVars *, void *thread_data, const Packet *, Flow *f, void *state, void *tx, uint64_t tx_id); -/** packet logger condition function pointer type, - * must return true for packets that should be logged +/** tx logger condition function pointer type, + * must return true for tx that should be logged */ typedef int (*TxLoggerCondition)(ThreadVars *, const Packet *, void *state, void *tx, uint64_t tx_id); @@ -47,4 +47,4 @@ void OutputTxLoggerRegister (void); void OutputTxShutdown(void); -#endif /* __OUTPUT_PACKET_H__ */ +#endif /* __OUTPUT_TX_H__ */