suricata
output-json-file.c File Reference
#include "suricata-common.h"
#include "debug.h"
#include "detect.h"
#include "pkt-var.h"
#include "conf.h"
#include "threadvars.h"
#include "tm-modules.h"
#include "threads.h"
#include "app-layer-parser.h"
#include "detect-filemagic.h"
#include "stream.h"
#include "util-print.h"
#include "util-unittest.h"
#include "util-privs.h"
#include "util-debug.h"
#include "util-atomic.h"
#include "util-file.h"
#include "util-time.h"
#include "util-buffer.h"
#include "util-byte.h"
#include "util-validate.h"
#include "util-logopenfile.h"
#include "output.h"
#include "output-json.h"
#include "output-json-file.h"
#include "output-json-http.h"
#include "output-json-smtp.h"
#include "output-json-email-common.h"
#include "output-json-nfs.h"
#include "output-json-smb.h"
#include "app-layer-htp.h"
#include "app-layer-htp-xff.h"
#include "util-memcmp.h"
#include "stream-tcp-reassemble.h"
Include dependency graph for output-json-file.c:

Go to the source code of this file.

Data Structures

struct  OutputFileCtx_
 
struct  JsonFileLogThread_
 

Typedefs

typedef struct OutputFileCtx_ OutputFileCtx
 
typedef struct JsonFileLogThread_ JsonFileLogThread
 

Functions

json_t * JsonBuildFileInfoRecord (const Packet *p, const File *ff, const bool stored, uint8_t dir, HttpXFFCfg *xff_cfg)
 
void JsonFileLogRegister (void)
 

Detailed Description

Author
Tom DeCanio td@np.nosp@m.ulse.nosp@m.tech..nosp@m.com

Log files we track.

Definition in file output-json-file.c.

Typedef Documentation

typedef struct OutputFileCtx_ OutputFileCtx

Function Documentation

json_t* JsonBuildFileInfoRecord ( const Packet p,
const File ff,
const bool  stored,
uint8_t  dir,
HttpXFFCfg xff_cfg 
)

Definition at line 83 of file output-json-file.c.

References Flow_::alproto, ALPROTO_HTTP, ALPROTO_NFS, ALPROTO_SMB, ALPROTO_SMTP, AppProtoToString(), JsonFileLogThread_::buffer, BUG_ON, BytesToStringBuffer(), ConfNodeLookupChild(), ConfNodeLookupChildValue(), ConfValIsTrue(), CreateJSONHeader(), OutputInitResult_::ctx, OutputCtx_::data, DEBUG_VALIDATE_BUG_ON, OutputCtx_::DeInit, File_::end, OutputFileCtx_::file_ctx, OutputJsonCtx_::file_ctx, FILE_HAS_GAPS, FILE_LOGGED, FILE_MD5, FILE_SHA1, FILE_SHA256, FILE_STATE_CLOSED, FILE_STATE_ERROR, FILE_STATE_TRUNCATED, File_::file_store_id, FILE_STORED, FileForceFilestoreEnable(), FileForceHashParseCfg(), FileForceMagicEnable(), FileForceTrackingEnable(), JsonFileLogThread_::filelog_ctx, FileTrackedSize(), HttpXFFCfg_::flags, File_::flags, Packet_::flow, FLOW_PKT_TOCLIENT, Packet_::flowflags, FlowGetAppProtocol(), HttpXFFGetCfg(), HttpXFFGetIPFromTx(), json_boolean, JSON_OUTPUT_BUFFER_SIZE, JsonBuildFileInfoRecord(), JsonEmailAddMetadata(), JsonHttpAddMetadata(), JsonNFSAddMetadata(), JsonNFSAddMetadataRPC(), JsonSMBAddMetadata(), JsonSMTPAddMetadata(), LOG_DIR_FLOW, LOG_DIR_FLOW_TOCLIENT, LOG_DIR_FLOW_TOSERVER, MemBufferCreateNew(), MemBufferFree(), MemBufferReset, File_::name, File_::name_len, OutputInitResult_::ok, OutputJSONBuffer(), OutputFileCtx_::parent_xff_cfg, SCCalloc, SCEnter, SCFree, SCJsonString(), SCLogDebug, SCMalloc, File_::sid, File_::sid_cnt, File_::start, File_::state, str, STREAM_TOCLIENT, STREAM_TOSERVER, TM_ECODE_FAILED, TM_ECODE_OK, File_::txid, unlikely, OutputFileCtx_::xff_cfg, OutputJsonCtx_::xff_cfg, XFF_DISABLED, XFF_EXTRADATA, XFF_MAXLEN, and XFF_OVERWRITE.

Referenced by JsonBuildFileInfoRecord().

Here is the call graph for this function:

Here is the caller graph for this function:

void JsonFileLogRegister ( void  )

Definition at line 393 of file output-json-file.c.

References LOGGER_JSON_FILE, and OutputRegisterFileSubModule().

Referenced by OutputRegisterLoggers().

Here is the call graph for this function:

Here is the caller graph for this function: