suricata
filetype.c File Reference
#include "suricata-common.h"
#include "suricata-plugin.h"
#include "output-eve.h"
#include "util-mem.h"
#include "util-debug.h"
Include dependency graph for filetype.c:

Go to the source code of this file.

Data Structures

struct  ThreadData_
 
struct  Context_
 

Macros

#define FILETYPE_NAME   "json-filetype-plugin"
 

Typedefs

typedef struct ThreadData_ ThreadData
 
typedef struct Context_ Context
 

Functions

void PluginInit (void)
 
const SCPluginSCPluginRegister ()
 

Variables

const SCPlugin PluginRegistration
 

Macro Definition Documentation

◆ FILETYPE_NAME

#define FILETYPE_NAME   "json-filetype-plugin"

Definition at line 25 of file filetype.c.

Typedef Documentation

◆ Context

typedef struct Context_ Context

A context object for each eve logger using this output.

◆ ThreadData

typedef struct ThreadData_ ThreadData

Per thread context data for each logging thread.

Function Documentation

◆ PluginInit()

void PluginInit ( void  )

Called by Suricata to initialize the module. This module registers new file type to the JSON logger.

Definition at line 194 of file filetype.c.

References FILETYPE_NAME, SCEveFileType_::Init, SCEveFileType_::name, and SCCalloc.

◆ SCPluginRegister()

const SCPlugin* SCPluginRegister ( )

The function called by Suricata after loading this plugin.

A pointer to a populated SCPlugin struct must be returned.

Definition at line 220 of file filetype.c.

References PluginRegistration.

Variable Documentation

◆ PluginRegistration

const SCPlugin PluginRegistration
Initial value:
= {
.name = FILETYPE_NAME,
.author = "FirstName LastName <name@example.org>",
.license = "GPL-2.0-only",
.Init = PluginInit,
}

Definition at line 208 of file filetype.c.

Referenced by SCPluginRegister().

FILETYPE_NAME
#define FILETYPE_NAME
Definition: filetype.c:24
PluginInit
void PluginInit(void)
Definition: filetype.c:194