You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#[doc = " \\brief Structure used to define an EVE output file type.\n\n EVE filetypes implement an object with a file-like interface and\n are used to output EVE log records to files, syslog, or\n database. They can be built-in such as the syslog (see\n SyslogInitialize()) and nullsink (see NullLogInitialize()) outputs,\n registered by a library user or dynamically loaded as a plugin.\n\n The life cycle of an EVE filetype is:\n - Init: called once for each EVE instance using this filetype\n - ThreadInit: called once for each output thread\n - Write: called for each log record\n - ThreadDeinit: called once for each output thread on exit\n - Deinit: called once for each EVE instance using this filetype on exit\n\n Examples:\n - built-in syslog: \\ref src/output-eve-syslog.c\n - built-in nullsink: \\ref src/output-eve-null.c\n - example plugin: \\ref examples/plugins/c-json-filetype/filetype.c\n\n ### Multi-Threaded Note:\n\n The EVE logging system can be configured by the Suricata user to\n run in threaded or non-threaded modes. In the default non-threaded\n mode, ThreadInit will only be called once and the filetype does not\n need to be concerned with threads.\n\n However, in **threaded** mode, ThreadInit will be called multiple\n times and the filetype needs to be thread aware and thread-safe. If\n utilizing a unique resource such as a file for each thread then you\n may be naturally thread safe. However, if sharing a single file\n handle across all threads then your filetype will have to take care\n of locking, etc."]
474
509
#[repr(C)]
475
510
#[derive(Debug,Copy,Clone)]
476
511
pubstructSCEveFileType_{
477
512
#[doc = " \\brief The name of the output, used in the configuration.\n\n This name is used by the configuration file to specify the EVE\n filetype used.\n\n For example:\n\n\\code{.yaml}\n outputs:\n - eve-log:\n filetype: my-output-name\n\\endcode"]
478
513
pubname:*const::std::os::raw::c_char,
479
514
#[doc = " \\brief Function to initialize this filetype.\n\n\\param conf The ConfNode of the `eve-log` configuration\n section this filetype is being initialized for\n\n\\param threaded Flag to specify if the EVE sub-systems is in\n threaded mode or not\n\n\\param init_data An output pointer for filetype specific data\n\n\\retval 0 on success, -1 on failure"]
480
-
pubInit:::std::option::Option<
481
-
unsafeextern"C"fn(
482
-
conf:*constSCConfNode,
483
-
threaded:bool,
484
-
init_data:*mut*mut::std::os::raw::c_void,
485
-
) -> ::std::os::raw::c_int,
486
-
>,
515
+
pubInit:SCEveFileTypeInitFunc,
487
516
#[doc = " \\brief Initialize thread specific data.\n\n Initialize any thread specific data. For example, if\n implementing a file output you might open the files here, so\n you have one output file per thread.\n\n\\param init_data Data setup during Init\n\n\\param thread_id A unique ID to differentiate this thread from\n others. If EVE is not in threaded mode this will be called\n once with a ThreadId of 0. In threaded mode the ThreadId of\n 0 correlates to the main Suricata thread.\n\n\\param thread_data Output pointer for any data required by this\n thread.\n\n\\retval 0 on success, -1 on failure"]
488
-
pubThreadInit:::std::option::Option<
489
-
unsafeextern"C"fn(
490
-
init_data:*const::std::os::raw::c_void,
491
-
thread_id:ThreadId,
492
-
thread_data:*mut*mut::std::os::raw::c_void,
493
-
) -> ::std::os::raw::c_int,
494
-
>,
517
+
pubThreadInit:SCEveFileTypeThreadInitFunc,
495
518
#[doc = " \\brief Called for each EVE log record.\n\n The Write function is called for each log EVE log record. The\n provided buffer contains a fully formatted EVE record in JSON\n format.\n\n\\param buffer The fully formatted JSON EVE log record\n\n\\param buffer_len The length of the buffer\n\n\\param init_data The data setup in the call to Init\n\n\\param thread_data The data setup in the call to ThreadInit\n\n\\retval 0 on success, -1 on failure"]
496
-
pubWrite:::std::option::Option<
497
-
unsafeextern"C"fn(
498
-
buffer:*const::std::os::raw::c_char,
499
-
buffer_len:::std::os::raw::c_int,
500
-
init_data:*const::std::os::raw::c_void,
501
-
thread_data:*mut::std::os::raw::c_void,
502
-
) -> ::std::os::raw::c_int,
503
-
>,
519
+
pubWrite:SCEveFileTypeWriteFunc,
504
520
#[doc = " \\brief Called to deinitialize each thread.\n\n This function will be called for each thread. It is where any\n resources allocated in ThreadInit should be released.\n\n\\param init_data The data setup in Init\n\n\\param thread_data The data setup in ThreadInit"]
505
-
pubThreadDeinit:::std::option::Option<
506
-
unsafeextern"C"fn(
507
-
init_data:*const::std::os::raw::c_void,
508
-
thread_data:*mut::std::os::raw::c_void,
509
-
),
510
-
>,
521
+
pubThreadDeinit:SCEveFileTypeThreadDeinitFunc,
511
522
#[doc = " \\brief Final call to deinitialize this filetype.\n\n Called, usually on exit to deinitialize and free any resources\n allocated during Init.\n\n\\param init_data Data setup in the call to Init."]
0 commit comments