* 02110-1301, USA.
*/
-//! Parser registration functions and common interface
+//! Parser registration functions and common interface module.
use std;
use crate::core::{self,DetectEngineState,Flow,AppLayerEventType,AppProto,Direction};
* 02110-1301, USA.
*/
+//! Application layer template parser and logger module.
+
mod parser;
pub mod template;
/* TEMPLATE_START_REMOVE */
* 02110-1301, USA.
*/
+//! ASN.1 parser module.
+
use der_parser::ber::{parse_ber_recursive, BerObject, BerObjectContent, Tag};
use nom7::Err;
use std::convert::TryFrom;
* 02110-1301, USA.
*/
+//! BitTorrent DHT application layer, logger and parser module.
+
pub mod bittorrent_dht;
pub mod logger;
pub mod parser;
+//! Utility library module for commonly used strings, hexadecimals and other elements.
+
use super::build_slice;
use crate::jsonbuilder::HEX;
use std::ffi::CString;
* 02110-1301, USA.
*/
+//! Module for retrieving configuration details.
+
use std::os::raw::c_char;
use std::os::raw::c_void;
use std::os::raw::c_int;
* 02110-1301, USA.
*/
-// This file exposes items from the core "C" code to Rust.
+//! This module exposes items from the core "C" code to Rust.
use std;
use crate::filecontainer::*;
* 02110-1301, USA.
*/
+//! DCE/RPC protocol parser, logger and detection module.
+
pub mod dcerpc;
pub mod dcerpc_udp;
pub mod parser;
* 02110-1301, USA.
*/
+//! Module for rule parsing.
+
pub mod byte_math;
pub mod error;
pub mod iprep;
* 02110-1301, USA.
*/
+//! DHCP parser, detection and logger module.
+
pub mod dhcp;
pub mod parser;
pub mod logger;
* 02110-1301, USA.
*/
+//! DNS parser, detection, logger and application layer module.
+
pub mod detect;
pub mod dns;
pub mod log;
* 02110-1301, USA.
*/
+//! Module that exposes C bindings to the Suricata Rust library.
+
pub mod hashing;
pub mod base64;
pub mod strings;
* 02110-1301, USA.
*/
+//! This module handles file container operations (open, append, close).
+
use std::ptr;
use std::os::raw::{c_void};
* 02110-1301, USA.
*/
-/**
- * \file
- * \author Victor Julien <victor@inliniac.net>
- *
- * Tracks chunk based file transfers. Chunks may be transferred out
- * of order, but cannot be transferred in parallel. So only one
- * chunk at a time.
- *
- * GAP handling. If a data gap is encountered, the file is truncated
- * and new data is no longer pushed down to the lower level APIs.
- * The tracker does continue to follow the file.
- */
+//! Gap handling and Chunk-based file transfer tracker module.
+//!
+//! GAP handling. If a data gap is encountered, the file is truncated
+//! and new data is no longer pushed down to the lower level APIs.
+//! The tracker does continue to follow the file
+//
+//! Tracks chunk based file transfers. Chunks may be transferred out
+//! of order, but cannot be transferred in parallel. So only one
+//! chunk at a time.
+//!
+//! Author: Victor Julien <victor@inliniac.net>
use crate::core::*;
use std::collections::HashMap;
* 02110-1301, USA.
*/
+//! Module for bindings to the Suricata C frame API.
+
use crate::applayer::StreamSlice;
use crate::core::Flow;
#[cfg(not(test))]
* 02110-1301, USA.
*/
+//! FTP parser and application layer module.
+
use nom7::bytes::complete::{tag, take_until};
use nom7::character::complete::{digit1, multispace0};
use nom7::combinator::{complete, map_res, opt, verify};
* 02110-1301, USA.
*/
+//! HTTP/2 parser, detection, logger and application layer module.
+
#![allow(clippy::result_unit_err)]
mod decompression;
* 02110-1301, USA.
*/
+//! IKE parser, detection, logger and application layer module.
+
// written by Pierre Chifflier <chifflier@wzdftpd.net>
extern crate ipsec_parser;
* 02110-1301, USA.
*/
+ //! Module for building JSON documents.
+
#![allow(clippy::missing_safety_doc)]
use std::cmp::max;
* 02110-1301, USA.
*/
+//! Kerberos parser wrapper module.
+
use nom7::IResult;
use nom7::error::{ErrorKind, ParseError};
use nom7::number::streaming::le_u16;
* 02110-1301, USA.
*/
+//! Kerberos-v5 application layer, logger and detection module.
+
// written by Pierre Chifflier <chifflier@wzdftpd.net>
pub mod krb5;
* 02110-1301, USA.
*/
+//! Suricata is a network intrusion prevention and monitoring engine.
+//!
+//! Suricata is a hybrid C and Rust application. What is found here are
+//! the components written in Rust.
+
#![cfg_attr(feature = "strict", deny(warnings))]
// Allow these patterns as its a style we like.
* 02110-1301, USA.
*/
+//! Logging utility module.
+
use std;
use std::ffi::CString;
use std::path::Path;
* 02110-1301, USA.
*/
+//! Lua wrapper module.
+
use std::os::raw::c_char;
use std::os::raw::c_int;
use std::os::raw::c_long;
* 02110-1301, USA.
*/
+//! lzma decompression utility module.
+
use lzma_rs::decompress::{Options, Stream};
use lzma_rs::error::Error;
use std::io::{Cursor, Write};
* 02110-1301, USA.
*/
+//! MIME protocol parser module.
+
use crate::common::nom7::take_until_and_consume;
use nom7::branch::alt;
use nom7::bytes::streaming::{tag, take_until, take_while};
* 02110-1301, USA.
*/
+//! Modbus application layer, logger, parser and detection module.
+
pub mod detect;
pub mod log;
pub mod modbus;
* 02110-1301, USA.
*/
+//! MQTT application layer, detection, logger and parser module.
+
pub mod detect;
pub mod logger;
pub mod mqtt;
* 02110-1301, USA.
*/
+//! NFS application layer, parser, logger module.
+
pub mod types;
pub mod rpc_records;
pub mod nfs_records;
* 02110-1301, USA.
*/
+//! NTP application layer and parser module.
+
// written by Pierre Chifflier <chifflier@wzdftpd.net>
pub mod ntp;
* 02110-1301, USA.
*/
-//! PostgreSQL parser and application layer
+//! PostgreSQL parser, logger and application layer module.
//!
//! written by Juliana Fajardini <jufajardini@oisf.net>
* 02110-1301, USA.
*/
+//! Plugin utility module.
+
pub fn init() {
unsafe {
let context = super::core::SCGetContext();
* 02110-1301, USA.
*/
+//! QUIC application layer, parser, detection and logger module.
+
mod crypto;
mod cyu;
pub mod detect;
* 02110-1301, USA.
*/
-//! RDP parser and application layer
+//! RDP parser, logger and application layer module.
//!
//! written by Zach Kelly <zach.kelly@lmco.com>
* 02110-1301, USA.
*/
+//! RFB protocol parser, logger and detection module.
+
// Author: Frank Honza <frank.honza@dcso.de>
pub mod detect;
* 02110-1301, USA.
*/
+//! SIP protocol parser, detection and logger module.
+
// written by Giuseppe Longo <giuseppe@glongo.it>
pub mod detect;
* 02110-1301, USA.
*/
+//! SMB application layer, detection, logger and parser module.
+
pub mod error;
pub mod smb_records;
pub mod smb_status;
* 02110-1301, USA.
*/
+//! SNMP application layer, parser, detection and logger module.
+
// written by Pierre Chifflier <chifflier@wzdftpd.net>
extern crate snmp_parser;
* 02110-1301, USA.
*/
+//! SSH application layer, logger, detection and parser module.
+
pub mod detect;
pub mod logger;
mod parser;
* 02110-1301, USA.
*/
+//! Telnet application layer and parser module.
+
pub mod telnet;
mod parser;
* 02110-1301, USA.
*/
+//! TFTP parser, logger and application layer module.
+
// written by Clément Galland <clement.galland@epita.fr>
pub mod tftp;
* 02110-1301, USA.
*/
+//! Utility module.
+
use std::ffi::CStr;
use std::os::raw::c_char;
* 02110-1301, USA.
*/
+//! Module for SSL/TLS X.509 certificates parser and decoder.
+
// written by Pierre Chifflier <chifflier@wzdftpd.net>
use crate::common::rust_string_to_c;