Crate retina_datatypes
source ·Expand description
Subscribable data types.
A subscription is a request for a callback on a subset of network traffic specified by a filter. Each callback function requires one or more subscribable data types as parameter(s), which it immutably borrows.
Each subscribable datatype must:
- Be defined as a [retina_core::filter::DataType], with appropriate parameters and [retina_core::filter::Level].
- Implement one of the traits defined in this module (Tracked, FromSession, etc.)
- Be added to the [crate::typedefs::DATATYPES] map
Re-exports§
pub use connection::ConnRecord;
pub use http_transaction::HttpTransaction;
pub use dns_transaction::DnsTransaction;
pub use tls_handshake::TlsHandshake;
pub use quic_stream::QuicStream;
pub use packet::Payload;
pub use packet::ZcFrame;
pub use conn_fts::*;
pub use static_type::*;
pub use typedefs::*;
Modules§
- Various individual connection-level subscribable types for TCP and/or UDP connection information, statistics, and state history.
- A sample connection record that provides various TCP and/or UDP connection information, statistics, and state history. It does not deliver payload data.
- A DNS transaction. Subscribable alias for [
retina_core::protocols::stream::dns::Dns
] - An Http transaction. Subscribable alias for [
retina_core::protocols::stream::http::Http
] - Raw packet-level datatypes.
- A Quic stream. Subscribable alias for [
retina_core::protocols::stream::quic::QuicConn
] - Static-level datatypes. A data type is considered “static” if it can be inferred at or before the first packet in a connection and it stays constant throughout a connection.
- A TLS handshake. Subscribable alias for [
retina_core::protocols::stream::tls::Tls
] - New datatypes are defined in this module. Newly-defined datatypes must be added to the DATATYPES map in this module.
Traits§
- Trait implemented by datatypes that are built from a packet (Mbuf). This is used when subscribing to packet-level data.
- Trait implemented by datatypes that are built from session data. This is used when subscribing to specific parsed application-layer data.
- Trait implemented by datatypes that are constant throughout a connection and inferrable at first packet.
- Trait implemented by datatypes that require inline tracking. This is typically required for subscribable types that require calculating metrics throughout a connection, e.g. QoS metrics.