[−][src]Crate t2plugin
This crate allows to easily develop Rust plugins for Tranalyzer2, a network traffic analysis tool.
An example Rust plugin for Tranalyzer2 using this crate can be found here: https://github.com/Tranalyzer/rustExample
Create a new plugin
-
Clone the Tranalyzer2 Rust plugin template and rename it.
cd $T2HOME/plugins git clone https://github.com/Tranalyzer/rustTemplate.git myPluginName cd myPluginName ./autogen.sh --rename
-
Optional: change the
PLUGINORDER
at the top ofautogen.sh
. -
Fill the different methods of the
T2Plugin
trait implementation insrc/lib.rs
.
Modules
flow | Contains the definition of a |
nethdr | Contains the definition of the different protocol headers (IP, TCP, UDP, ...). |
packet | Contains the definition of a |
slread | Contains the |
Macros
t2plugin | This macro transforms a |
Structs
Header | This structure represents the output header of this plugin. |
Enums
BinaryType | Types of values which can be outputted in Tranalyzer2 flow files. |
BinaryValue | Rust opaque representation of |
OutputBuffer | Rust opaque representation of |
Constants
Traits
T2Plugin | Trait to tranform a per flow |
Functions
getflow | Returns the |
hashchaintable_size | Returns the number of flows that Tranalyzer2 can store in its internal hashtable. |
output_bytes | Appends bytes to Tranalyzer2 output buffer. |
output_ip | Appends an IP address to Tranalyzer2 output buffer. |
output_num | Appends a number (integer or float) to Tranalyzer2 output buffer. |
output_nums | Appends a list of numbers (integers or floats) to Tranalyzer2 output buffer. |
output_string | Appends a string to Tranalyzer2 output buffer. |
output_strings | Appends a list of strings to Tranalyzer2 output buffer. |
Type Definitions
c_ulong |
|