You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
suricata/rust
Jeff Lucovsky 746f471382 transform/subslice: Add subslice transform
Issue: 7672

The subslice transform creates a slice of the input buffer.

Specify the subslice desired -- nbytes and truncate are optional:
        subslice: offset <,nbytes> <,truncate>

offset: Specifies the starting offset for the new subslice. When
negative, expresses how far from the end of the input buffer to begin.

nbytes: Specifies the size of the subslice. When negative, specifies
that the subslice will end that many bytes from the end of the input
buffer. Nbytes must be non-zero.

When nbytes is not specified, the size of the subslice will be the size
of the input buffer - offset.

truncate: Specify behavior when offset + nbytes exceeds buffer length.
When present, trims nbytes such that offset + nbytes equals buffer
length. When not present, an empty buffer is produced.

Examples:
        subslice: 1;     - The subslice will be a copy of the input
            buffer but omits the input buffer's first byte
            "This is Suricata" -> "his is Suricata"
        subslice: 0, 13; - The slice is created from the first 13 bytes
            of the input buffer
            "This is Suricata" -> "This is Suric"
        subslice: 10, -5; - The subslice is created starting at offset 10
            and continues to 5 bytes before the end of the input buffer
            "This is Suricata" -> "r"
        subslice: -3; - The subslice will be the last 3 bytes of the
            input buffer.
            "This is Suricata" -> "ata"
6 months ago
..
.cargo rust: rename .cargo/config to .cargo/config.toml 2 years ago
derive rust: rust fmt derive crate 7 months ago
ffi rust/ffi: move app-layer traits to ffi crate 6 months ago
htp rust/htp: formatting fixup 10 months ago
src transform/subslice: Add subslice transform 6 months ago
suricatactl rust: limit clap verson to 4.5.57 7 months ago
suricatasc rust: pin unicode-segmentation crate to 1.12.0 7 months ago
sys rust: bindgen SCFlowGetAppProtocol 6 months ago
.gitignore rust: rename .cargo/config to .cargo/config.toml 2 years ago
Cargo.lock.in rust: cargo update 6 months ago
Cargo.toml.in rust/debug: use functions from ffi crate where possible 9 months ago
Makefile.am rust: bindgen SIGMATCH_ constants 7 months ago
cbindgen.toml rust: remove obsolete inclusions from cbindgen.toml 7 months ago
rustfmt.toml
…